@monocle.sh/studio 0.2.1 → 0.2.3

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 (311) hide show
  1. package/dist/config/static.js +5 -1
  2. package/dist/controllers/mcp_controller.js +3 -1
  3. package/dist/server.js +4 -2
  4. package/dist/start/routes.js +2 -0
  5. package/package.json +1 -1
  6. package/ui/dist/assets/abap-BdImnpbu.js +1 -0
  7. package/ui/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
  8. package/ui/dist/assets/ada-bCR0ucgS.js +1 -0
  9. package/ui/dist/assets/andromeeda-C4gqWexZ.js +1 -0
  10. package/ui/dist/assets/angular-html-DA-rfuFy.js +1 -0
  11. package/ui/dist/assets/angular-ts-BrjP3tb8.js +1 -0
  12. package/ui/dist/assets/apache-Pmp26Uib.js +1 -0
  13. package/ui/dist/assets/apex-D8_7TLub.js +1 -0
  14. package/ui/dist/assets/apl-CORt7UWP.js +1 -0
  15. package/ui/dist/assets/applescript-Co6uUVPk.js +1 -0
  16. package/ui/dist/assets/ara-BRHolxvo.js +1 -0
  17. package/ui/dist/assets/asciidoc-Ve4PFQV2.js +1 -0
  18. package/ui/dist/assets/asm-D_Q5rh1f.js +1 -0
  19. package/ui/dist/assets/astro-HNnZUWAn.js +1 -0
  20. package/ui/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
  21. package/ui/dist/assets/awk-DMzUqQB5.js +1 -0
  22. package/ui/dist/assets/ayu-dark-DYE7WIF3.js +1 -0
  23. package/ui/dist/assets/ayu-light-BA47KaF1.js +1 -0
  24. package/ui/dist/assets/ayu-mirage-32ctXXKs.js +1 -0
  25. package/ui/dist/assets/ballerina-BFfxhgS-.js +1 -0
  26. package/ui/dist/assets/bat-BkioyH1T.js +1 -0
  27. package/ui/dist/assets/beancount-k_qm7-4y.js +1 -0
  28. package/ui/dist/assets/berry-uYugtg8r.js +1 -0
  29. package/ui/dist/assets/bibtex-CHM0blh-.js +1 -0
  30. package/ui/dist/assets/bicep-Bmn6On1c.js +1 -0
  31. package/ui/dist/assets/bird2-BIv1doCn.js +1 -0
  32. package/ui/dist/assets/blade-BjGOyj-B.js +1 -0
  33. package/ui/dist/assets/bsl-BO_Y6i37.js +1 -0
  34. package/ui/dist/assets/c-BIGW1oBm.js +1 -0
  35. package/ui/dist/assets/c3-eo99z4R2.js +1 -0
  36. package/ui/dist/assets/cadence-Bv_4Rxtq.js +1 -0
  37. package/ui/dist/assets/cairo-KRGpt6FW.js +1 -0
  38. package/ui/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  39. package/ui/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  40. package/ui/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  41. package/ui/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  42. package/ui/dist/assets/clarity-D53aC0YG.js +1 -0
  43. package/ui/dist/assets/clojure-P80f7IUj.js +1 -0
  44. package/ui/dist/assets/cmake-D1j8_8rp.js +1 -0
  45. package/ui/dist/assets/cobol-nBiQ_Alo.js +1 -0
  46. package/ui/dist/assets/codeowners-Bp6g37R7.js +1 -0
  47. package/ui/dist/assets/codeql-DsOJ9woJ.js +1 -0
  48. package/ui/dist/assets/coffee-Ch7k5sss.js +1 -0
  49. package/ui/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
  50. package/ui/dist/assets/coq-DkFqJrB1.js +1 -0
  51. package/ui/dist/assets/cpp-CofmeUqb.js +1 -0
  52. package/ui/dist/assets/crystal-DNxU26gB.js +1 -0
  53. package/ui/dist/assets/csharp-COcwbKMJ.js +1 -0
  54. package/ui/dist/assets/css-CLj8gQPS.js +1 -0
  55. package/ui/dist/assets/csv-fuZLfV_i.js +1 -0
  56. package/ui/dist/assets/cue-D82EKSYY.js +1 -0
  57. package/ui/dist/assets/cypher-COkxafJQ.js +1 -0
  58. package/ui/dist/assets/d-85-TOEBH.js +1 -0
  59. package/ui/dist/assets/dark-plus-C3mMm8J8.js +1 -0
  60. package/ui/dist/assets/dart-bE4Kk8sk.js +1 -0
  61. package/ui/dist/assets/dax-CEL-wOlO.js +1 -0
  62. package/ui/dist/assets/desktop-BmXAJ9_W.js +1 -0
  63. package/ui/dist/assets/diff-D97Zzqfu.js +1 -0
  64. package/ui/dist/assets/docker-BcOcwvcX.js +1 -0
  65. package/ui/dist/assets/dotenv-Da5cRb03.js +1 -0
  66. package/ui/dist/assets/dracula-BzJJZx-M.js +1 -0
  67. package/ui/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
  68. package/ui/dist/assets/dream-maker-BtqSS_iP.js +1 -0
  69. package/ui/dist/assets/edge-FbVlp4U3.js +1 -0
  70. package/ui/dist/assets/elixir-CkH2-t6x.js +1 -0
  71. package/ui/dist/assets/elm-DbKCFpqz.js +1 -0
  72. package/ui/dist/assets/emacs-lisp-CXvaQtF9.js +1 -0
  73. package/ui/dist/assets/erb-BYCe7drp.js +1 -0
  74. package/ui/dist/assets/erlang-DsQrWhSR.js +1 -0
  75. package/ui/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
  76. package/ui/dist/assets/everforest-light-C8M2exoo.js +1 -0
  77. package/ui/dist/assets/fennel-BYunw83y.js +1 -0
  78. package/ui/dist/assets/fish-BvzEVeQv.js +1 -0
  79. package/ui/dist/assets/fluent-C4IJs8-o.js +1 -0
  80. package/ui/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  81. package/ui/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
  82. package/ui/dist/assets/fsharp-CXgrBDvD.js +1 -0
  83. package/ui/dist/assets/gdresource-BOOCDP_w.js +1 -0
  84. package/ui/dist/assets/gdscript-C5YyOfLZ.js +1 -0
  85. package/ui/dist/assets/gdshader-DkwncUOv.js +1 -0
  86. package/ui/dist/assets/genie-D0YGMca9.js +1 -0
  87. package/ui/dist/assets/gherkin-DyxjwDmM.js +1 -0
  88. package/ui/dist/assets/git-commit-F4YmCXRG.js +1 -0
  89. package/ui/dist/assets/git-rebase-r7XF79zn.js +1 -0
  90. package/ui/dist/assets/github-dark-DHJKELXO.js +1 -0
  91. package/ui/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
  92. package/ui/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  93. package/ui/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  94. package/ui/dist/assets/github-light-DAi9KRSo.js +1 -0
  95. package/ui/dist/assets/github-light-default-D7oLnXFd.js +1 -0
  96. package/ui/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  97. package/ui/dist/assets/gleam-BspZqrRM.js +1 -0
  98. package/ui/dist/assets/glimmer-js-ByusRIyA.js +1 -0
  99. package/ui/dist/assets/glimmer-ts-BfAWNZQY.js +1 -0
  100. package/ui/dist/assets/glsl-DplSGwfg.js +1 -0
  101. package/ui/dist/assets/gn-n2N0HUVH.js +1 -0
  102. package/ui/dist/assets/gnuplot-DdkO51Og.js +1 -0
  103. package/ui/dist/assets/go-C27-OAKa.js +1 -0
  104. package/ui/dist/assets/graphql-ChdNCCLP.js +1 -0
  105. package/ui/dist/assets/groovy-gcz8RCvz.js +1 -0
  106. package/ui/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  107. package/ui/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  108. package/ui/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  109. package/ui/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  110. package/ui/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  111. package/ui/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  112. package/ui/dist/assets/hack-i7_Ulhet.js +1 -0
  113. package/ui/dist/assets/haml-D5jkg6IW.js +1 -0
  114. package/ui/dist/assets/handlebars-BpdQsYii.js +1 -0
  115. package/ui/dist/assets/haskell-Df6bDoY_.js +1 -0
  116. package/ui/dist/assets/haxe-CzTSHFRz.js +1 -0
  117. package/ui/dist/assets/hcl-BWvSN4gD.js +1 -0
  118. package/ui/dist/assets/hjson-D5-asLiD.js +1 -0
  119. package/ui/dist/assets/hlsl-D3lLCCz7.js +1 -0
  120. package/ui/dist/assets/horizon-BUw7H-hv.js +1 -0
  121. package/ui/dist/assets/horizon-bright-CUuTKBJd.js +1 -0
  122. package/ui/dist/assets/houston-DnULxvSX.js +1 -0
  123. package/ui/dist/assets/html-derivative-DlHx6ybY.js +1 -0
  124. package/ui/dist/assets/html-pp8916En.js +1 -0
  125. package/ui/dist/assets/http-jrhK8wxY.js +1 -0
  126. package/ui/dist/assets/hurl-irOxFIW8.js +1 -0
  127. package/ui/dist/assets/hxml-Bvhsp5Yf.js +1 -0
  128. package/ui/dist/assets/hy-DFXneXwc.js +1 -0
  129. package/ui/dist/assets/imba-DGztddWO.js +1 -0
  130. package/ui/dist/assets/index-DBfqUvhJ.js +285 -0
  131. package/ui/dist/assets/index-DGK_-RC7.css +1 -0
  132. package/ui/dist/assets/ini-BEwlwnbL.js +1 -0
  133. package/ui/dist/assets/java-CylS5w8V.js +1 -0
  134. package/ui/dist/assets/javascript-wDzz0qaB.js +1 -0
  135. package/ui/dist/assets/jinja-f2NsQr07.js +1 -0
  136. package/ui/dist/assets/jison-wvAkD_A8.js +1 -0
  137. package/ui/dist/assets/json-Cp-IABpG.js +1 -0
  138. package/ui/dist/assets/json5-C9tS-k6U.js +1 -0
  139. package/ui/dist/assets/jsonc-Des-eS-w.js +1 -0
  140. package/ui/dist/assets/jsonl-DcaNXYhu.js +1 -0
  141. package/ui/dist/assets/jsonnet-DFQXde-d.js +1 -0
  142. package/ui/dist/assets/jssm-C2t-YnRu.js +1 -0
  143. package/ui/dist/assets/jsx-g9-lgVsj.js +1 -0
  144. package/ui/dist/assets/julia-CxzCAyBv.js +1 -0
  145. package/ui/dist/assets/just-VxiPbLrw.js +1 -0
  146. package/ui/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  147. package/ui/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  148. package/ui/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
  149. package/ui/dist/assets/kdl-DV7GczEv.js +1 -0
  150. package/ui/dist/assets/kotlin-BdnUsdx6.js +1 -0
  151. package/ui/dist/assets/kusto-wEQ09or8.js +1 -0
  152. package/ui/dist/assets/laserwave-DUszq2jm.js +1 -0
  153. package/ui/dist/assets/latex-CWtU0Tv5.js +1 -0
  154. package/ui/dist/assets/lean-BZvkOJ9d.js +1 -0
  155. package/ui/dist/assets/less-B1dDrJ26.js +1 -0
  156. package/ui/dist/assets/light-plus-B7mTdjB0.js +1 -0
  157. package/ui/dist/assets/liquid-C0sCDyMI.js +1 -0
  158. package/ui/dist/assets/llvm-DjAJT7YJ.js +1 -0
  159. package/ui/dist/assets/log-2UxHyX5q.js +1 -0
  160. package/ui/dist/assets/logo-BtOb2qkB.js +1 -0
  161. package/ui/dist/assets/lua-BaeVxFsk.js +1 -0
  162. package/ui/dist/assets/luau-C-HG3fhB.js +1 -0
  163. package/ui/dist/assets/make-CHLpvVh8.js +1 -0
  164. package/ui/dist/assets/markdown-Cvjx9yec.js +1 -0
  165. package/ui/dist/assets/marko-DjSrsDqO.js +1 -0
  166. package/ui/dist/assets/material-theme-D5KoaKCx.js +1 -0
  167. package/ui/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
  168. package/ui/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  169. package/ui/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
  170. package/ui/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  171. package/ui/dist/assets/matlab-D7o27uSR.js +1 -0
  172. package/ui/dist/assets/mdc-DTYItulj.js +1 -0
  173. package/ui/dist/assets/mdx-Cmh6b_Ma.js +1 -0
  174. package/ui/dist/assets/mermaid-mWjccvbQ.js +1 -0
  175. package/ui/dist/assets/min-dark-CafNBF8u.js +1 -0
  176. package/ui/dist/assets/min-light-CTRr51gU.js +1 -0
  177. package/ui/dist/assets/mipsasm-CKIfxQSi.js +1 -0
  178. package/ui/dist/assets/mojo-rZm6bMo-.js +1 -0
  179. package/ui/dist/assets/monokai-D4h5O-jR.js +1 -0
  180. package/ui/dist/assets/moonbit-_H4v1dQx.js +1 -0
  181. package/ui/dist/assets/move-IF9eRakj.js +1 -0
  182. package/ui/dist/assets/narrat-DRg8JJMk.js +1 -0
  183. package/ui/dist/assets/nextflow-C-mBbutL.js +1 -0
  184. package/ui/dist/assets/nextflow-groovy-vE_lwT2v.js +1 -0
  185. package/ui/dist/assets/nginx-BpAMiNFr.js +1 -0
  186. package/ui/dist/assets/night-owl-C39BiMTA.js +1 -0
  187. package/ui/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
  188. package/ui/dist/assets/nim-BIad80T-.js +1 -0
  189. package/ui/dist/assets/nix-CwoSXNpI.js +1 -0
  190. package/ui/dist/assets/nord-Ddv68eIx.js +1 -0
  191. package/ui/dist/assets/nushell-Cz2AlsmD.js +1 -0
  192. package/ui/dist/assets/objective-c-DXmwc3jG.js +1 -0
  193. package/ui/dist/assets/objective-cpp-CLxacb5B.js +1 -0
  194. package/ui/dist/assets/ocaml-C0hk2d4L.js +1 -0
  195. package/ui/dist/assets/odin-BBf5iR-q.js +1 -0
  196. package/ui/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  197. package/ui/dist/assets/one-light-C3Wv6jpd.js +1 -0
  198. package/ui/dist/assets/openscad-C4EeE6gA.js +1 -0
  199. package/ui/dist/assets/pascal-D93ZcfNL.js +1 -0
  200. package/ui/dist/assets/perl-NvoQZIq0.js +1 -0
  201. package/ui/dist/assets/php-R6g_5hLQ.js +1 -0
  202. package/ui/dist/assets/pkl-u5AG7uiY.js +1 -0
  203. package/ui/dist/assets/plastic-3e1v2bzS.js +1 -0
  204. package/ui/dist/assets/plsql-ChMvpjG-.js +1 -0
  205. package/ui/dist/assets/po-BTJTHyun.js +1 -0
  206. package/ui/dist/assets/poimandres-CS3Unz2-.js +1 -0
  207. package/ui/dist/assets/polar-C0HS_06l.js +1 -0
  208. package/ui/dist/assets/postcss-CXtECtnM.js +1 -0
  209. package/ui/dist/assets/powerquery-CEu0bR-o.js +1 -0
  210. package/ui/dist/assets/powershell-Dpen1YoG.js +1 -0
  211. package/ui/dist/assets/prisma-Dd19v3D-.js +1 -0
  212. package/ui/dist/assets/prolog-CbFg5uaA.js +1 -0
  213. package/ui/dist/assets/proto-C7zT0LnQ.js +1 -0
  214. package/ui/dist/assets/pug-DKIMFp6K.js +1 -0
  215. package/ui/dist/assets/puppet-BMWR74SV.js +1 -0
  216. package/ui/dist/assets/purescript-CklMAg4u.js +1 -0
  217. package/ui/dist/assets/python-B6aJPvgy.js +1 -0
  218. package/ui/dist/assets/qml-3beO22l8.js +1 -0
  219. package/ui/dist/assets/qmldir-C8lEn-DE.js +1 -0
  220. package/ui/dist/assets/qss-IeuSbFQv.js +1 -0
  221. package/ui/dist/assets/r-Dspwwk_N.js +1 -0
  222. package/ui/dist/assets/racket-BqYA7rlc.js +1 -0
  223. package/ui/dist/assets/raku-DXvB9xmW.js +1 -0
  224. package/ui/dist/assets/razor-BDqjjVU7.js +1 -0
  225. package/ui/dist/assets/red-bN70gL4F.js +1 -0
  226. package/ui/dist/assets/reg-C-SQnVFl.js +1 -0
  227. package/ui/dist/assets/regexp-CDVJQ6XC.js +1 -0
  228. package/ui/dist/assets/rel-C3B-1QV4.js +1 -0
  229. package/ui/dist/assets/riscv-BM1_JUlF.js +1 -0
  230. package/ui/dist/assets/ron-D8l8udqQ.js +1 -0
  231. package/ui/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  232. package/ui/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  233. package/ui/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
  234. package/ui/dist/assets/rosmsg-BJDFO7_C.js +1 -0
  235. package/ui/dist/assets/rst-CRjBmOyv.js +1 -0
  236. package/ui/dist/assets/ruby-Wjq7vjNf.js +1 -0
  237. package/ui/dist/assets/rust-B1yitclQ.js +1 -0
  238. package/ui/dist/assets/sas-cz2c8ADy.js +1 -0
  239. package/ui/dist/assets/sass-Cj5Yp3dK.js +1 -0
  240. package/ui/dist/assets/scala-C151Ov-r.js +1 -0
  241. package/ui/dist/assets/scheme-C98Dy4si.js +1 -0
  242. package/ui/dist/assets/scss-D5BDwBP9.js +1 -0
  243. package/ui/dist/assets/sdbl-DVxCFoDh.js +1 -0
  244. package/ui/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
  245. package/ui/dist/assets/shellscript-Yzrsuije.js +1 -0
  246. package/ui/dist/assets/shellsession-BADoaaVG.js +1 -0
  247. package/ui/dist/assets/slack-dark-BthQWCQV.js +1 -0
  248. package/ui/dist/assets/slack-ochin-DqwNpetd.js +1 -0
  249. package/ui/dist/assets/smalltalk-BERRCDM3.js +1 -0
  250. package/ui/dist/assets/snazzy-light-Bw305WKR.js +1 -0
  251. package/ui/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
  252. package/ui/dist/assets/solarized-light-L9t79GZl.js +1 -0
  253. package/ui/dist/assets/solidity-rGO070M0.js +1 -0
  254. package/ui/dist/assets/soy-8wufbnw4.js +1 -0
  255. package/ui/dist/assets/sparql-rVzFXLq3.js +1 -0
  256. package/ui/dist/assets/splunk-BtCnVYZw.js +1 -0
  257. package/ui/dist/assets/sql-BLtJtn59.js +1 -0
  258. package/ui/dist/assets/ssh-config-_ykCGR6B.js +1 -0
  259. package/ui/dist/assets/stata-BH5u7GGu.js +1 -0
  260. package/ui/dist/assets/stylus-BEDo0Tqx.js +1 -0
  261. package/ui/dist/assets/surrealql-Bq5Q-fJD.js +1 -0
  262. package/ui/dist/assets/svelte-Cy7k_4gC.js +1 -0
  263. package/ui/dist/assets/swift-D82vCrfD.js +1 -0
  264. package/ui/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
  265. package/ui/dist/assets/system-verilog-CnnmHF94.js +1 -0
  266. package/ui/dist/assets/systemd-4A_iFExJ.js +1 -0
  267. package/ui/dist/assets/talonscript-CkByrt1z.js +1 -0
  268. package/ui/dist/assets/tasl-QIJgUcNo.js +1 -0
  269. package/ui/dist/assets/tcl-dwOrl1Do.js +1 -0
  270. package/ui/dist/assets/templ-DhtptRzy.js +1 -0
  271. package/ui/dist/assets/terraform-BETggiCN.js +1 -0
  272. package/ui/dist/assets/tex-idrVyKtj.js +1 -0
  273. package/ui/dist/assets/tokyo-night-hegEt444.js +1 -0
  274. package/ui/dist/assets/toml-vGWfd6FD.js +1 -0
  275. package/ui/dist/assets/ts-tags-DQrlYJgV.js +1 -0
  276. package/ui/dist/assets/tsv-B_m7g4N7.js +1 -0
  277. package/ui/dist/assets/tsx-COt5Ahok.js +1 -0
  278. package/ui/dist/assets/turtle-BsS91CYL.js +1 -0
  279. package/ui/dist/assets/twig-xg9kU7Mw.js +1 -0
  280. package/ui/dist/assets/typescript-BPQ3VLAy.js +1 -0
  281. package/ui/dist/assets/typespec-CAFt9gP4.js +1 -0
  282. package/ui/dist/assets/typst-DHCkPAjA.js +1 -0
  283. package/ui/dist/assets/v-BcVCzyr7.js +1 -0
  284. package/ui/dist/assets/vala-CsfeWuGM.js +1 -0
  285. package/ui/dist/assets/vb-D17OF-Vu.js +1 -0
  286. package/ui/dist/assets/verilog-BQ8w6xss.js +1 -0
  287. package/ui/dist/assets/vesper-DU1UobuO.js +1 -0
  288. package/ui/dist/assets/vhdl-CeAyd5Ju.js +1 -0
  289. package/ui/dist/assets/viml-CJc9bBzg.js +1 -0
  290. package/ui/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
  291. package/ui/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
  292. package/ui/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
  293. package/ui/dist/assets/vue-D2xRrEX4.js +1 -0
  294. package/ui/dist/assets/vue-html-AaS7Mt5G.js +1 -0
  295. package/ui/dist/assets/vue-vine-BoDAl6tE.js +1 -0
  296. package/ui/dist/assets/vyper-CDx5xZoG.js +1 -0
  297. package/ui/dist/assets/wasm-CG6Dc4jp.js +1 -0
  298. package/ui/dist/assets/wasm-MzD3tlZU.js +1 -0
  299. package/ui/dist/assets/wenyan-BV7otONQ.js +1 -0
  300. package/ui/dist/assets/wgsl-Dx-B1_4e.js +1 -0
  301. package/ui/dist/assets/wikitext-BhOHFoWU.js +1 -0
  302. package/ui/dist/assets/wit-5i3qLPDT.js +1 -0
  303. package/ui/dist/assets/wolfram-lXgVvXCa.js +1 -0
  304. package/ui/dist/assets/xml-sdJ4AIDG.js +1 -0
  305. package/ui/dist/assets/xsl-CtQFsRM5.js +1 -0
  306. package/ui/dist/assets/yaml-Buea-lGh.js +1 -0
  307. package/ui/dist/assets/zenscript-DVFEvuxE.js +1 -0
  308. package/ui/dist/assets/zig-VOosw3JB.js +1 -0
  309. package/ui/dist/index.html +2 -2
  310. package/ui/dist/assets/index-B18TQ-3q.css +0 -1
  311. package/ui/dist/assets/index-BJQer59G.js +0 -115
@@ -0,0 +1,285 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-BjGOyj-B.js","assets/html-derivative-DlHx6ybY.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DNxU26gB.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-BYCe7drp.js","assets/ruby-Wjq7vjNf.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-i7_Ulhet.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-VxiPbLrw.js","assets/perl-NvoQZIq0.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-R6g_5hLQ.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BDqjjVU7.js","assets/csharp-COcwbKMJ.js","assets/rst-CRjBmOyv.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-DQrlYJgV.js","assets/twig-xg9kU7Mw.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ var RV=Object.defineProperty;var SV=Object.getPrototypeOf;var mV=Reflect.get;var cb=e=>{throw TypeError(e)};var AV=(e,t,n)=>t in e?RV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>AV(e,typeof t!="symbol"?t+"":t,n),fg=(e,t,n)=>t.has(e)||cb("Cannot "+n);var V=(e,t,n)=>(fg(e,t,"read from private field"),n?n.call(e):t.get(e)),$e=(e,t,n)=>t.has(e)?cb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Fe=(e,t,n,r)=>(fg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),we=(e,t,n)=>(fg(e,t,"access private method"),n);var Ff=(e,t,n,r)=>({set _(s){Fe(e,t,s,n)},get _(){return V(e,t,r)}}),ub=(e,t,n)=>mV(SV(e),n,t);function gV(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)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(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dg={exports:{}},Hf={};/**
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 Eb;function OV(){if(Eb)return Hf;Eb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var c in s)c!=="key"&&(o[c]=s[c])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return Hf.Fragment=t,Hf.jsx=n,Hf.jsxs=n,Hf}var fb;function IV(){return fb||(fb=1,dg.exports=OV()),dg.exports}var v=IV(),Tg={exports:{}},It={};/**
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 db;function NV(){if(db)return It;db=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function S(B){return B===null||typeof B!="object"?null:(B=p&&B[p]||B["@@iterator"],typeof B=="function"?B:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function I(B,Q,ue){this.props=B,this.context=Q,this.refs=g,this.updater=ue||R}I.prototype.isReactComponent={},I.prototype.setState=function(B,Q){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Q,"setState")},I.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function C(){}C.prototype=I.prototype;function L(B,Q,ue){this.props=B,this.context=Q,this.refs=g,this.updater=ue||R}var N=L.prototype=new C;N.constructor=L,m(N,I.prototype),N.isPureReactComponent=!0;var y=Array.isArray;function _(){}var M={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function F(B,Q,ue){var le=ue.ref;return{$$typeof:e,type:B,key:Q,ref:le!==void 0?le:null,props:ue}}function Y(B,Q){return F(B.type,Q,B.props)}function $(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function W(B){var Q={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ue){return Q[ue]})}var K=/\/+/g;function q(B,Q){return typeof B=="object"&&B!==null&&B.key!=null?W(""+B.key):Q.toString(36)}function j(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(_,_):(B.status="pending",B.then(function(Q){B.status==="pending"&&(B.status="fulfilled",B.value=Q)},function(Q){B.status==="pending"&&(B.status="rejected",B.reason=Q)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function k(B,Q,ue,le,he){var se=typeof B;(se==="undefined"||se==="boolean")&&(B=null);var fe=!1;if(B===null)fe=!0;else switch(se){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(B.$$typeof){case e:case t:fe=!0;break;case h:return fe=B._init,k(fe(B._payload),Q,ue,le,he)}}if(fe)return he=he(B),fe=le===""?"."+q(B,0):le,y(he)?(ue="",fe!=null&&(ue=fe.replace(K,"$&/")+"/"),k(he,Q,ue,"",function(We){return We})):he!=null&&($(he)&&(he=Y(he,ue+(he.key==null||B&&B.key===he.key?"":(""+he.key).replace(K,"$&/")+"/")+fe)),Q.push(he)),1;fe=0;var ge=le===""?".":le+":";if(y(B))for(var Le=0;Le<B.length;Le++)le=B[Le],se=ge+q(le,Le),fe+=k(le,Q,ue,se,he);else if(Le=S(B),typeof Le=="function")for(B=Le.call(B),Le=0;!(le=B.next()).done;)le=le.value,se=ge+q(le,Le++),fe+=k(le,Q,ue,se,he);else if(se==="object"){if(typeof B.then=="function")return k(j(B),Q,ue,le,he);throw Q=String(B),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return fe}function z(B,Q,ue){if(B==null)return B;var le=[],he=0;return k(B,le,"","",function(se){return Q.call(ue,se,he++)}),le}function Z(B){if(B._status===-1){var Q=B._result;Q=Q(),Q.then(function(ue){(B._status===0||B._status===-1)&&(B._status=1,B._result=ue)},function(ue){(B._status===0||B._status===-1)&&(B._status=2,B._result=ue)}),B._status===-1&&(B._status=0,B._result=Q)}if(B._status===1)return B._result.default;throw B._result}var ie=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},ne={map:z,forEach:function(B,Q,ue){z(B,function(){Q.apply(this,arguments)},ue)},count:function(B){var Q=0;return z(B,function(){Q++}),Q},toArray:function(B){return z(B,function(Q){return Q})||[]},only:function(B){if(!$(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return It.Activity=d,It.Children=ne,It.Component=I,It.Fragment=n,It.Profiler=s,It.PureComponent=L,It.StrictMode=r,It.Suspense=E,It.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,It.__COMPILER_RUNTIME={__proto__:null,c:function(B){return M.H.useMemoCache(B)}},It.cache=function(B){return function(){return B.apply(null,arguments)}},It.cacheSignal=function(){return null},It.cloneElement=function(B,Q,ue){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var le=m({},B.props),he=B.key;if(Q!=null)for(se in Q.key!==void 0&&(he=""+Q.key),Q)!w.call(Q,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&Q.ref===void 0||(le[se]=Q[se]);var se=arguments.length-2;if(se===1)le.children=ue;else if(1<se){for(var fe=Array(se),ge=0;ge<se;ge++)fe[ge]=arguments[ge+2];le.children=fe}return F(B.type,he,le)},It.createContext=function(B){return B={$$typeof:l,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:o,_context:B},B},It.createElement=function(B,Q,ue){var le,he={},se=null;if(Q!=null)for(le in Q.key!==void 0&&(se=""+Q.key),Q)w.call(Q,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(he[le]=Q[le]);var fe=arguments.length-2;if(fe===1)he.children=ue;else if(1<fe){for(var ge=Array(fe),Le=0;Le<fe;Le++)ge[Le]=arguments[Le+2];he.children=ge}if(B&&B.defaultProps)for(le in fe=B.defaultProps,fe)he[le]===void 0&&(he[le]=fe[le]);return F(B,se,he)},It.createRef=function(){return{current:null}},It.forwardRef=function(B){return{$$typeof:c,render:B}},It.isValidElement=$,It.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:Z}},It.memo=function(B,Q){return{$$typeof:f,type:B,compare:Q===void 0?null:Q}},It.startTransition=function(B){var Q=M.T,ue={};M.T=ue;try{var le=B(),he=M.S;he!==null&&he(ue,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(_,ie)}catch(se){ie(se)}finally{Q!==null&&ue.types!==null&&(Q.types=ue.types),M.T=Q}},It.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},It.use=function(B){return M.H.use(B)},It.useActionState=function(B,Q,ue){return M.H.useActionState(B,Q,ue)},It.useCallback=function(B,Q){return M.H.useCallback(B,Q)},It.useContext=function(B){return M.H.useContext(B)},It.useDebugValue=function(){},It.useDeferredValue=function(B,Q){return M.H.useDeferredValue(B,Q)},It.useEffect=function(B,Q){return M.H.useEffect(B,Q)},It.useEffectEvent=function(B){return M.H.useEffectEvent(B)},It.useId=function(){return M.H.useId()},It.useImperativeHandle=function(B,Q,ue){return M.H.useImperativeHandle(B,Q,ue)},It.useInsertionEffect=function(B,Q){return M.H.useInsertionEffect(B,Q)},It.useLayoutEffect=function(B,Q){return M.H.useLayoutEffect(B,Q)},It.useMemo=function(B,Q){return M.H.useMemo(B,Q)},It.useOptimistic=function(B,Q){return M.H.useOptimistic(B,Q)},It.useReducer=function(B,Q,ue){return M.H.useReducer(B,Q,ue)},It.useRef=function(B){return M.H.useRef(B)},It.useState=function(B){return M.H.useState(B)},It.useSyncExternalStore=function(B,Q,ue){return M.H.useSyncExternalStore(B,Q,ue)},It.useTransition=function(){return M.H.useTransition()},It.version="19.2.4",It}var Tb;function OE(){return Tb||(Tb=1,Tg.exports=NV()),Tg.exports}var D=OE();const dE=aC(D),lC=gV({__proto__:null,default:dE},[D]);var hg={exports:{}},Vf={},pg={exports:{}},Rg={};/**
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 hb;function CV(){return hb||(hb=1,(function(e){function t(k,z){var Z=k.length;k.push(z);e:for(;0<Z;){var ie=Z-1>>>1,ne=k[ie];if(0<s(ne,z))k[ie]=z,k[Z]=ne,Z=ie;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var z=k[0],Z=k.pop();if(Z!==z){k[0]=Z;e:for(var ie=0,ne=k.length,B=ne>>>1;ie<B;){var Q=2*(ie+1)-1,ue=k[Q],le=Q+1,he=k[le];if(0>s(ue,Z))le<ne&&0>s(he,ue)?(k[ie]=he,k[le]=Z,ie=le):(k[ie]=ue,k[Q]=Z,ie=Q);else if(le<ne&&0>s(he,Z))k[ie]=he,k[le]=Z,ie=le;else break e}}return z}function s(k,z){var Z=k.sortIndex-z.sortIndex;return Z!==0?Z:k.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var E=[],f=[],h=1,d=null,p=3,S=!1,R=!1,m=!1,g=!1,I=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function N(k){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=k)r(f),z.sortIndex=z.expirationTime,t(E,z);else break;z=n(f)}}function y(k){if(m=!1,N(k),!R)if(n(E)!==null)R=!0,_||(_=!0,W());else{var z=n(f);z!==null&&j(y,z.startTime-k)}}var _=!1,M=-1,w=5,F=-1;function Y(){return g?!0:!(e.unstable_now()-F<w)}function $(){if(g=!1,_){var k=e.unstable_now();F=k;var z=!0;try{e:{R=!1,m&&(m=!1,C(M),M=-1),S=!0;var Z=p;try{t:{for(N(k),d=n(E);d!==null&&!(d.expirationTime>k&&Y());){var ie=d.callback;if(typeof ie=="function"){d.callback=null,p=d.priorityLevel;var ne=ie(d.expirationTime<=k);if(k=e.unstable_now(),typeof ne=="function"){d.callback=ne,N(k),z=!0;break t}d===n(E)&&r(E),N(k)}else r(E);d=n(E)}if(d!==null)z=!0;else{var B=n(f);B!==null&&j(y,B.startTime-k),z=!1}}break e}finally{d=null,p=Z,S=!1}z=void 0}}finally{z?W():_=!1}}}var W;if(typeof L=="function")W=function(){L($)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,q=K.port2;K.port1.onmessage=$,W=function(){q.postMessage(null)}}else W=function(){I($,0)};function j(k,z){M=I(function(){k(e.unstable_now())},z)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(k){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var Z=p;p=z;try{return k()}finally{p=Z}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(k,z){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Z=p;p=k;try{return z()}finally{p=Z}},e.unstable_scheduleCallback=function(k,z,Z){var ie=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ie+Z:ie):Z=ie,k){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=Z+ne,k={id:h++,callback:z,priorityLevel:k,startTime:Z,expirationTime:ne,sortIndex:-1},Z>ie?(k.sortIndex=Z,t(f,k),n(E)===null&&k===n(f)&&(m?(C(M),M=-1):m=!0,j(y,Z-ie))):(k.sortIndex=ne,t(E,k),R||S||(R=!0,_||(_=!0,W()))),k},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(k){var z=p;return function(){var Z=p;p=z;try{return k.apply(this,arguments)}finally{p=Z}}}})(Rg)),Rg}var pb;function _V(){return pb||(pb=1,pg.exports=CV()),pg.exports}var Sg={exports:{}},wr={};/**
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 Rb;function LV(){if(Rb)return wr;Rb=1;var e=OE();function t(E){var f="https://react.dev/errors/"+E;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+E+"; 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},s=Symbol.for("react.portal");function o(E,f,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:d==null?null:""+d,children:E,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(E,f){if(E==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return wr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,wr.createPortal=function(E,f){var h=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(E,f,null,h)},wr.flushSync=function(E){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,E)return E()}finally{l.T=f,r.p=h,r.d.f()}},wr.preconnect=function(E,f){typeof E=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(E,f))},wr.prefetchDNS=function(E){typeof E=="string"&&r.d.D(E)},wr.preinit=function(E,f){if(typeof E=="string"&&f&&typeof f.as=="string"){var h=f.as,d=c(h,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(E,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:S}):h==="script"&&r.d.X(E,{crossOrigin:d,integrity:p,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},wr.preinitModule=function(E,f){if(typeof E=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(E,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(E)},wr.preload=function(E,f){if(typeof E=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,d=c(h,f.crossOrigin);r.d.L(E,h,{crossOrigin:d,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})}},wr.preloadModule=function(E,f){if(typeof E=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(E,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(E)},wr.requestFormReset=function(E){r.d.r(E)},wr.unstable_batchedUpdates=function(E,f){return E(f)},wr.useFormState=function(E,f,h){return l.H.useFormState(E,f,h)},wr.useFormStatus=function(){return l.H.useHostTransitionStatus()},wr.version="19.2.4",wr}var Sb;function gx(){if(Sb)return Sg.exports;Sb=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(),Sg.exports=LV(),Sg.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 mb;function yV(){if(mb)return Vf;mb=1;var e=_V(),t=OE(),n=gx();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var a=i,u=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(u=a.return),i=a.return;while(i)}return a.tag===3?u:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function c(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function E(i){if(o(i)!==i)throw Error(r(188))}function f(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var u=i,T=a;;){var A=u.return;if(A===null)break;var O=A.alternate;if(O===null){if(T=A.return,T!==null){u=T;continue}break}if(A.child===O.child){for(O=A.child;O;){if(O===u)return E(A),i;if(O===T)return E(A),a;O=O.sibling}throw Error(r(188))}if(u.return!==T.return)u=A,T=O;else{for(var U=!1,H=A.child;H;){if(H===u){U=!0,u=A,T=O;break}if(H===T){U=!0,T=A,u=O;break}H=H.sibling}if(!U){for(H=O.child;H;){if(H===u){U=!0,u=O,T=A;break}if(H===T){U=!0,T=O,u=A;break}H=H.sibling}if(!U)throw Error(r(189))}}if(u.alternate!==T)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:a}function h(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=h(i),a!==null)return a;i=i.sibling}return null}var d=Object.assign,p=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),L=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function W(i){return i===null||typeof i!="object"?null:(i=$&&i[$]||i["@@iterator"],typeof i=="function"?i:null)}var K=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===K?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case m:return"Fragment";case I:return"Profiler";case g:return"StrictMode";case y:return"Suspense";case _:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case R:return"Portal";case L:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case N:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case M:return a=i.displayName||null,a!==null?a:q(i.type)||"Memo";case w:a=i._payload,i=i._init;try{return q(i(a))}catch{}}return null}var j=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ie=[],ne=-1;function B(i){return{current:i}}function Q(i){0>ne||(i.current=ie[ne],ie[ne]=null,ne--)}function ue(i,a){ne++,ie[ne]=i.current,i.current=a}var le=B(null),he=B(null),se=B(null),fe=B(null);function ge(i,a){switch(ue(se,a),ue(he,i),ue(le,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?v0(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=v0(a),i=M0(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Q(le),ue(le,i)}function Le(){Q(le),Q(he),Q(se)}function We(i){i.memoizedState!==null&&ue(fe,i);var a=le.current,u=M0(a,i.type);a!==u&&(ue(he,i),ue(le,u))}function He(i){he.current===i&&(Q(le),Q(he)),fe.current===i&&(Q(fe),Uf._currentValue=Z)}var ot,Me;function Ue(i){if(ot===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);ot=a&&a[1]||"",Me=-1<u.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+ot+i+Me}var Xe=!1;function ct(i,a){if(!i||Xe)return"";Xe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var T={DetermineComponentFrameRoot:function(){try{if(a){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(Oe){var me=Oe}Reflect.construct(i,[],De)}else{try{De.call()}catch(Oe){me=Oe}i.call(De.prototype)}}else{try{throw Error()}catch(Oe){me=Oe}(De=i())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(Oe){if(Oe&&me&&typeof Oe.stack=="string")return[Oe.stack,me.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=T.DetermineComponentFrameRoot(),U=O[0],H=O[1];if(U&&H){var te=U.split(`
45
+ `),Re=H.split(`
46
+ `);for(A=T=0;T<te.length&&!te[T].includes("DetermineComponentFrameRoot");)T++;for(;A<Re.length&&!Re[A].includes("DetermineComponentFrameRoot");)A++;if(T===te.length||A===Re.length)for(T=te.length-1,A=Re.length-1;1<=T&&0<=A&&te[T]!==Re[A];)A--;for(;1<=T&&0<=A;T--,A--)if(te[T]!==Re[A]){if(T!==1||A!==1)do if(T--,A--,0>A||te[T]!==Re[A]){var Ne=`
47
+ `+te[T].replace(" at new "," at ");return i.displayName&&Ne.includes("<anonymous>")&&(Ne=Ne.replace("<anonymous>",i.displayName)),Ne}while(1<=T&&0<=A);break}}}finally{Xe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Ue(u):""}function Be(i,a){switch(i.tag){case 26:case 27:case 5:return Ue(i.type);case 16:return Ue("Lazy");case 13:return i.child!==a&&a!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return ct(i.type,!1);case 11:return ct(i.type.render,!1);case 1:return ct(i.type,!0);case 31:return Ue("Activity");default:return""}}function ke(i){try{var a="",u=null;do a+=Be(i,u),u=i,i=i.return;while(i);return a}catch(T){return`
48
+ Error generating stack: `+T.message+`
49
+ `+T.stack}}var ve=Object.prototype.hasOwnProperty,Ce=e.unstable_scheduleCallback,oe=e.unstable_cancelCallback,Ie=e.unstable_shouldYield,Pe=e.unstable_requestPaint,xe=e.unstable_now,Ze=e.unstable_getCurrentPriorityLevel,Et=e.unstable_ImmediatePriority,Xt=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,ft=e.unstable_LowPriority,Dt=e.unstable_IdlePriority,ht=e.log,ln=e.unstable_setDisableYieldValue,zt=null,qt=null;function In(i){if(typeof ht=="function"&&ln(i),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(zt,i)}catch{}}var $t=Math.clz32?Math.clz32:gt,Yt=Math.log,cn=Math.LN2;function gt(i){return i>>>=0,i===0?32:31-(Yt(i)/cn|0)|0}var Jt=256,hn=262144,Qt=4194304;function Nn(i){var a=i&42;if(a!==0)return a;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function An(i,a,u){var T=i.pendingLanes;if(T===0)return 0;var A=0,O=i.suspendedLanes,U=i.pingedLanes;i=i.warmLanes;var H=T&134217727;return H!==0?(T=H&~O,T!==0?A=Nn(T):(U&=H,U!==0?A=Nn(U):u||(u=H&~i,u!==0&&(A=Nn(u))))):(H=T&~O,H!==0?A=Nn(H):U!==0?A=Nn(U):u||(u=T&~i,u!==0&&(A=Nn(u)))),A===0?0:a!==0&&a!==A&&(a&O)===0&&(O=A&-A,u=a&-a,O>=u||O===32&&(u&4194048)!==0)?a:A}function Gn(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function is(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+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 er(){var i=Qt;return Qt<<=1,(Qt&62914560)===0&&(Qt=4194304),i}function cr(i){for(var a=[],u=0;31>u;u++)a.push(i);return a}function ur(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ot(i,a,u,T,A,O){var U=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var H=i.entanglements,te=i.expirationTimes,Re=i.hiddenUpdates;for(u=U&~u;0<u;){var Ne=31-$t(u),De=1<<Ne;H[Ne]=0,te[Ne]=-1;var me=Re[Ne];if(me!==null)for(Re[Ne]=null,Ne=0;Ne<me.length;Ne++){var Oe=me[Ne];Oe!==null&&(Oe.lane&=-536870913)}u&=~De}T!==0&&pn(i,T,0),O!==0&&A===0&&i.tag!==0&&(i.suspendedLanes|=O&~(U&~a))}function pn(i,a,u){i.pendingLanes|=a,i.suspendedLanes&=~a;var T=31-$t(a);i.entangledLanes|=a,i.entanglements[T]=i.entanglements[T]|1073741824|u&261930}function Rn(i,a){var u=i.entangledLanes|=a;for(i=i.entanglements;u;){var T=31-$t(u),A=1<<T;A&a|i[T]&a&&(i[T]|=a),u&=~A}}function Bn(i,a){var u=a&-a;return u=(u&42)!==0?1:yn(u),(u&(i.suspendedLanes|a))!==0?0:u}function yn(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Er(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Xr(){var i=z.p;return i!==0?i:(i=window.event,i===void 0?32:nb(i.type))}function gl(i,a){var u=z.p;try{return z.p=i,a()}finally{z.p=u}}var As=Math.random().toString(36).slice(2),Fn="__reactFiber$"+As,tr="__reactProps$"+As,os="__reactContainer$"+As,Vo="__reactEvents$"+As,cm="__reactListeners$"+As,um="__reactHandles$"+As,wE="__reactResources$"+As,ko="__reactMarker$"+As;function GE(i){delete i[Fn],delete i[tr],delete i[Vo],delete i[cm],delete i[um]}function Yo(i){var a=i[Fn];if(a)return a;for(var u=i.parentNode;u;){if(a=u[os]||u[Fn]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(i=H0(i);i!==null;){if(u=i[Fn])return u;i=H0(i)}return a}i=u,u=i.parentNode}return null}function Wo(i){if(i=i[Fn]||i[os]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function Ol(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function jo(i){var a=i[wE];return a||(a=i[wE]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function $n(i){i[ko]=!0}var BE=new Set,RT={};function Qi(i,a){Xo(i,a),Xo(i+"Capture",a)}function Xo(i,a){for(RT[i]=a,i=0;i<a.length;i++)BE.add(a[i])}var Em=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]*$"),ST={},mT={};function fm(i){return ve.call(mT,i)?!0:ve.call(ST,i)?!1:Em.test(i)?mT[i]=!0:(ST[i]=!0,!1)}function Wc(i,a,u){if(fm(a))if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var T=a.toLowerCase().slice(0,5);if(T!=="data-"&&T!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+u)}}function jc(i,a,u){if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+u)}}function ws(i,a,u,T){if(T===null)i.removeAttribute(u);else{switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(a,u,""+T)}}function $r(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function FE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function dm(i,a,u){var T=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof T<"u"&&typeof T.get=="function"&&typeof T.set=="function"){var A=T.get,O=T.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return A.call(this)},set:function(U){u=""+U,O.call(this,U)}}),Object.defineProperty(i,a,{enumerable:T.enumerable}),{getValue:function(){return u},setValue:function(U){u=""+U},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function HE(i){if(!i._valueTracker){var a=FE(i)?"checked":"value";i._valueTracker=dm(i,a,""+i[a])}}function AT(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),T="";return i&&(T=FE(i)?i.checked?"true":"false":i.value),i=T,i!==u?(a.setValue(i),!0):!1}function Xc(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 gT=/[\n"\\]/g;function Ar(i){return i.replace(gT,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function $c(i,a,u,T,A,O,U,H){i.name="",U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?i.type=U:i.removeAttribute("type"),a!=null?U==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+$r(a)):i.value!==""+$r(a)&&(i.value=""+$r(a)):U!=="submit"&&U!=="reset"||i.removeAttribute("value"),a!=null?VE(i,U,$r(a)):u!=null?VE(i,U,$r(u)):T!=null&&i.removeAttribute("value"),A==null&&O!=null&&(i.defaultChecked=!!O),A!=null&&(i.checked=A&&typeof A!="function"&&typeof A!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?i.name=""+$r(H):i.removeAttribute("name")}function OT(i,a,u,T,A,O,U,H){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(i.type=O),a!=null||u!=null){if(!(O!=="submit"&&O!=="reset"||a!=null)){HE(i);return}u=u!=null?""+$r(u):"",a=a!=null?""+$r(a):u,H||a===i.value||(i.value=a),i.defaultValue=a}T=T??A,T=typeof T!="function"&&typeof T!="symbol"&&!!T,i.checked=H?i.checked:!!T,i.defaultChecked=!!T,U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"&&(i.name=U),HE(i)}function VE(i,a,u){a==="number"&&Xc(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Zi(i,a,u,T){if(i=i.options,a){a={};for(var A=0;A<u.length;A++)a["$"+u[A]]=!0;for(u=0;u<i.length;u++)A=a.hasOwnProperty("$"+i[u].value),i[u].selected!==A&&(i[u].selected=A),A&&T&&(i[u].defaultSelected=!0)}else{for(u=""+$r(u),a=null,A=0;A<i.length;A++){if(i[A].value===u){i[A].selected=!0,T&&(i[A].defaultSelected=!0);return}a!==null||i[A].disabled||(a=i[A])}a!==null&&(a.selected=!0)}}function Kc(i,a,u){if(a!=null&&(a=""+$r(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+$r(u):""}function IT(i,a,u,T){if(a==null){if(T!=null){if(u!=null)throw Error(r(92));if(j(T)){if(1<T.length)throw Error(r(93));T=T[0]}u=T}u==null&&(u=""),a=u}u=$r(a),i.defaultValue=u,T=i.textContent,T===u&&T!==""&&T!==null&&(i.value=T),HE(i)}function $o(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var Tm=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 NT(i,a,u){var T=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?T?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":T?i.setProperty(a,u):typeof u!="number"||u===0||Tm.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function CT(i,a,u){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,u!=null){for(var T in u)!u.hasOwnProperty(T)||a!=null&&a.hasOwnProperty(T)||(T.indexOf("--")===0?i.setProperty(T,""):T==="float"?i.cssFloat="":i[T]="");for(var A in a)T=a[A],a.hasOwnProperty(A)&&u[A]!==T&&NT(i,A,T)}else for(var O in a)a.hasOwnProperty(O)&&NT(i,O,a[O])}function kE(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 hm=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"]]),pm=/^[\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 zc(i){return pm.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function li(){}var YE=null;function WE(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ko=null,zo=null;function jE(i){var a=Wo(i);if(a&&(i=a.stateNode)){var u=i[tr]||null;e:switch(i=a.stateNode,a.type){case"input":if($c(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Ar(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var T=u[a];if(T!==i&&T.form===i.form){var A=T[tr]||null;if(!A)throw Error(r(90));$c(T,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(a=0;a<u.length;a++)T=u[a],T.form===i.form&&AT(T)}break e;case"textarea":Kc(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Zi(i,!!u.multiple,a,!1)}}}var qc=!1;function _T(i,a,u){if(qc)return i(a,u);qc=!0;try{var T=i(a);return T}finally{if(qc=!1,(Ko!==null||zo!==null)&&(xh(),Ko&&(a=Ko,i=zo,zo=Ko=null,jE(a),i)))for(a=0;a<i.length;a++)jE(i[a])}}function eo(i,a){var u=i.stateNode;if(u===null)return null;var T=u[tr]||null;if(T===null)return null;u=T[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(i=i.type,T=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!T;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var Gs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jc=!1;if(Gs)try{var qo={};Object.defineProperty(qo,"passive",{get:function(){Jc=!0}}),window.addEventListener("test",qo,qo),window.removeEventListener("test",qo,qo)}catch{Jc=!1}var ci=null,XE=null,ui=null;function LT(){if(ui)return ui;var i,a=XE,u=a.length,T,A="value"in ci?ci.value:ci.textContent,O=A.length;for(i=0;i<u&&a[i]===A[i];i++);var U=u-i;for(T=1;T<=U&&a[u-T]===A[O-T];T++);return ui=A.slice(i,1<T?1-T:void 0)}function Qc(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Zc(){return!0}function yT(){return!1}function Mr(i){function a(u,T,A,O,U){this._reactName=u,this._targetInst=A,this.type=T,this.nativeEvent=O,this.target=U,this.currentTarget=null;for(var H in i)i.hasOwnProperty(H)&&(u=i[H],this[H]=u?u(O):O[H]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?Zc:yT,this.isPropagationStopped=yT,this}return d(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Zc)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Zc)},persist:function(){},isPersistent:Zc}),a}var to={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=Mr(to),Il=d({},to,{view:0,detail:0}),Ye=Mr(Il),Bs,tu,Jo,Nl=d({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zE,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!==Jo&&(Jo&&i.type==="mousemove"?(Bs=i.screenX-Jo.screenX,tu=i.screenY-Jo.screenY):tu=Bs=0,Jo=i),Bs)},movementY:function(i){return"movementY"in i?i.movementY:tu}}),bT=Mr(Nl),Rm=d({},Nl,{dataTransfer:0}),Fs=Mr(Rm),$E=d({},Il,{relatedTarget:0}),Cl=Mr($E),xr=d({},to,{animationName:0,elapsedTime:0,pseudoElement:0}),PT=Mr(xr),DT=d({},to,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),vT=Mr(DT),MT=d({},to,{data:0}),xT=Mr(MT),UT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wT={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"},GT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KE(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=GT[i])?!!a[i]:!1}function zE(){return KE}var BT=d({},Il,{key:function(i){if(i.key){var a=UT[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Qc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wT[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zE,charCode:function(i){return i.type==="keypress"?Qc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Qc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),FT=Mr(BT),HT=d({},Nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gr=Mr(HT),VT=d({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zE}),kT=Mr(VT),Sm=d({},to,{propertyName:0,elapsedTime:0,pseudoElement:0}),mm=Mr(Sm),Am=d({},Nl,{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}),qE=Mr(Am),gm=d({},to,{newState:0,oldState:0}),Om=Mr(gm),Im=[9,13,27,32],nu=Gs&&"CompositionEvent"in window,Hn=null;Gs&&"documentMode"in document&&(Hn=document.documentMode);var Nm=Gs&&"TextEvent"in window&&!Hn,YT=Gs&&(!nu||Hn&&8<Hn&&11>=Hn),WT=" ",jT=!1;function XT(i,a){switch(i){case"keyup":return Im.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $T(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Qo=!1;function Cm(i,a){switch(i){case"compositionend":return $T(a);case"keypress":return a.which!==32?null:(jT=!0,WT);case"textInput":return i=a.data,i===WT&&jT?null:i;default:return null}}function _m(i,a){if(Qo)return i==="compositionend"||!nu&&XT(i,a)?(i=LT(),ui=XE=ci=null,Qo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return YT&&a.locale!=="ko"?null:a.data;default:return null}}var Lm={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 KT(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!Lm[i.type]:a==="textarea"}function zT(i,a,u,T){Ko?zo?zo.push(T):zo=[T]:Ko=T,a=Vh(a,"onChange"),0<a.length&&(u=new eu("onChange","change",null,u,T),i.push({event:u,listeners:a}))}var _l=null,Ll=null;function ym(i){_0(i,0)}function ru(i){var a=Ol(i);if(AT(a))return i}function qT(i,a){if(i==="change")return a}var JT=!1;if(Gs){var su;if(Gs){var yl="oninput"in document;if(!yl){var QT=document.createElement("div");QT.setAttribute("oninput","return;"),yl=typeof QT.oninput=="function"}su=yl}else su=!1;JT=su&&(!document.documentMode||9<document.documentMode)}function JE(){_l&&(_l.detachEvent("onpropertychange",ZT),Ll=_l=null)}function ZT(i){if(i.propertyName==="value"&&ru(Ll)){var a=[];zT(a,Ll,i,WE(i)),_T(ym,a)}}function QE(i,a,u){i==="focusin"?(JE(),_l=a,Ll=u,_l.attachEvent("onpropertychange",ZT)):i==="focusout"&&JE()}function as(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ru(Ll)}function eh(i,a){if(i==="click")return ru(a)}function bm(i,a){if(i==="input"||i==="change")return ru(a)}function th(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Ur=typeof Object.is=="function"?Object.is:th;function Zo(i,a){if(Ur(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),T=Object.keys(a);if(u.length!==T.length)return!1;for(T=0;T<u.length;T++){var A=u[T];if(!ve.call(a,A)||!Ur(i[A],a[A]))return!1}return!0}function ZE(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function nh(i,a){var u=ZE(i);i=0;for(var T;u;){if(u.nodeType===3){if(T=i+u.textContent.length,i<=a&&T>=a)return{node:u,offset:a-i};i=T}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ZE(u)}}function ef(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?ef(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function rh(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Xc(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=Xc(i.document)}return a}function bl(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var Pm=Gs&&"documentMode"in document&&11>=document.documentMode,Ei=null,tf=null,Pl=null,nf=!1;function sh(i,a,u){var T=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;nf||Ei==null||Ei!==Xc(T)||(T=Ei,"selectionStart"in T&&bl(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),Pl&&Zo(Pl,T)||(Pl=T,T=Vh(tf,"onSelect"),0<T.length&&(a=new eu("onSelect","select",null,a,u),i.push({event:a,listeners:T}),a.target=Ei)))}function Hs(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var ea={animationend:Hs("Animation","AnimationEnd"),animationiteration:Hs("Animation","AnimationIteration"),animationstart:Hs("Animation","AnimationStart"),transitionrun:Hs("Transition","TransitionRun"),transitionstart:Hs("Transition","TransitionStart"),transitioncancel:Hs("Transition","TransitionCancel"),transitionend:Hs("Transition","TransitionEnd")},P={},b={};Gs&&(b=document.createElement("div").style,"AnimationEvent"in window||(delete ea.animationend.animation,delete ea.animationiteration.animation,delete ea.animationstart.animation),"TransitionEvent"in window||delete ea.transitionend.transition);function x(i){if(P[i])return P[i];if(!ea[i])return i;var a=ea[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in b)return P[i]=a[u];return i}var G=x("animationend"),J=x("animationiteration"),re=x("animationstart"),ce=x("transitionrun"),ee=x("transitionstart"),de=x("transitioncancel"),Ae=x("transitionend"),Ge=new Map,je="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");je.push("scrollEnd");function Ke(i,a){Ge.set(i,a),Qi(a,[i])}var ze=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},pt=[],Ht=0,lt=0;function _t(){for(var i=Ht,a=lt=Ht=0;a<i;){var u=pt[a];pt[a++]=null;var T=pt[a];pt[a++]=null;var A=pt[a];pt[a++]=null;var O=pt[a];if(pt[a++]=null,T!==null&&A!==null){var U=T.pending;U===null?A.next=A:(A.next=U.next,U.next=A),T.pending=A}O!==0&&Or(u,A,O)}}function Kt(i,a,u,T){pt[Ht++]=i,pt[Ht++]=a,pt[Ht++]=u,pt[Ht++]=T,lt|=T,i.lanes|=T,i=i.alternate,i!==null&&(i.lanes|=T)}function yt(i,a,u,T){return Kt(i,a,u,T),Vs(i)}function Vn(i,a){return Kt(i,null,null,a),Vs(i)}function Or(i,a,u){i.lanes|=u;var T=i.alternate;T!==null&&(T.lanes|=u);for(var A=!1,O=i.return;O!==null;)O.childLanes|=u,T=O.alternate,T!==null&&(T.childLanes|=u),O.tag===22&&(i=O.stateNode,i===null||i._visibility&1||(A=!0)),i=O,O=O.return;return i.tag===3?(O=i.stateNode,A&&a!==null&&(A=31-$t(u),i=O.hiddenUpdates,T=i[A],T===null?i[A]=[a]:T.push(a),a.lane=u|536870912),O):null}function Vs(i){if(50<yf)throw yf=0,wA=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Kr={};function fi(i,a,u,T){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(i,a,u,T){return new fi(i,a,u,T)}function iu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function gs(i,a){var u=i.alternate;return u===null?(u=un(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function rf(i,a){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Pi(i,a,u,T,A,O){var U=0;if(T=i,typeof i=="function")iu(i)&&(U=1);else if(typeof i=="string")U=iV(i,u,le.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=un(31,u,a,A),i.elementType=F,i.lanes=O,i;case m:return di(u.children,A,O,a);case g:U=8,A|=24;break;case I:return i=un(12,u,a,A|2),i.elementType=I,i.lanes=O,i;case y:return i=un(13,u,a,A),i.elementType=y,i.lanes=O,i;case _:return i=un(19,u,a,A),i.elementType=_,i.lanes=O,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case L:U=10;break e;case C:U=9;break e;case N:U=11;break e;case M:U=14;break e;case w:U=16,T=null;break e}U=29,u=Error(r(130,i===null?"null":typeof i,"")),T=null}return a=un(U,u,a,A),a.elementType=i,a.type=T,a.lanes=O,a}function di(i,a,u,T){return i=un(7,i,T,a),i.lanes=u,i}function Dl(i,a,u){return i=un(6,i,null,a),i.lanes=u,i}function ou(i){var a=un(18,null,null,0);return a.stateNode=i,a}function sf(i,a,u){return a=un(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var of=new WeakMap;function ks(i,a){if(typeof i=="object"&&i!==null){var u=of.get(i);return u!==void 0?u:(a={value:i,source:a,stack:ke(a)},of.set(i,a),a)}return{value:i,source:a,stack:ke(a)}}var au=[],lu=0,ih=null,af=0,Ys=[],Ws=0,ta=null,Di=1,vi="";function no(i,a){au[lu++]=af,au[lu++]=ih,ih=i,af=a}function EL(i,a,u){Ys[Ws++]=Di,Ys[Ws++]=vi,Ys[Ws++]=ta,ta=i;var T=Di;i=vi;var A=32-$t(T)-1;T&=~(1<<A),u+=1;var O=32-$t(a)+A;if(30<O){var U=A-A%5;O=(T&(1<<U)-1).toString(32),T>>=U,A-=U,Di=1<<32-$t(a)+A|u<<A|T,vi=O+i}else Di=1<<O|u<<A|T,vi=i}function Dm(i){i.return!==null&&(no(i,1),EL(i,1,0))}function vm(i){for(;i===ih;)ih=au[--lu],au[lu]=null,af=au[--lu],au[lu]=null;for(;i===ta;)ta=Ys[--Ws],Ys[Ws]=null,vi=Ys[--Ws],Ys[Ws]=null,Di=Ys[--Ws],Ys[Ws]=null}function fL(i,a){Ys[Ws++]=Di,Ys[Ws++]=vi,Ys[Ws++]=ta,Di=a.id,vi=a.overflow,ta=i}var Ir=null,Cn=null,Wt=!1,na=null,js=!1,Mm=Error(r(519));function ra(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lf(ks(a,i)),Mm}function dL(i){var a=i.stateNode,u=i.type,T=i.memoizedProps;switch(a[Fn]=i,a[tr]=T,u){case"dialog":Ft("cancel",a),Ft("close",a);break;case"iframe":case"object":case"embed":Ft("load",a);break;case"video":case"audio":for(u=0;u<Pf.length;u++)Ft(Pf[u],a);break;case"source":Ft("error",a);break;case"img":case"image":case"link":Ft("error",a),Ft("load",a);break;case"details":Ft("toggle",a);break;case"input":Ft("invalid",a),OT(a,T.value,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name,!0);break;case"select":Ft("invalid",a);break;case"textarea":Ft("invalid",a),IT(a,T.value,T.defaultValue,T.children)}u=T.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||T.suppressHydrationWarning===!0||P0(a.textContent,u)?(T.popover!=null&&(Ft("beforetoggle",a),Ft("toggle",a)),T.onScroll!=null&&Ft("scroll",a),T.onScrollEnd!=null&&Ft("scrollend",a),T.onClick!=null&&(a.onclick=li),a=!0):a=!1,a||ra(i,!0)}function TL(i){for(Ir=i.return;Ir;)switch(Ir.tag){case 5:case 31:case 13:js=!1;return;case 27:case 3:js=!0;return;default:Ir=Ir.return}}function cu(i){if(i!==Ir)return!1;if(!Wt)return TL(i),Wt=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||JA(i.type,i.memoizedProps)),u=!u),u&&Cn&&ra(i),TL(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Cn=F0(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Cn=F0(i)}else a===27?(a=Cn,Ra(i.type)?(i=ng,ng=null,Cn=i):Cn=a):Cn=Ir?$s(i.stateNode.nextSibling):null;return!0}function vl(){Cn=Ir=null,Wt=!1}function xm(){var i=na;return i!==null&&(Es===null?Es=i:Es.push.apply(Es,i),na=null),i}function lf(i){na===null?na=[i]:na.push(i)}var Um=B(null),Ml=null,ro=null;function sa(i,a,u){ue(Um,a._currentValue),a._currentValue=u}function so(i){i._currentValue=Um.current,Q(Um)}function wm(i,a,u){for(;i!==null;){var T=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,T!==null&&(T.childLanes|=a)):T!==null&&(T.childLanes&a)!==a&&(T.childLanes|=a),i===u)break;i=i.return}}function Gm(i,a,u,T){var A=i.child;for(A!==null&&(A.return=i);A!==null;){var O=A.dependencies;if(O!==null){var U=A.child;O=O.firstContext;e:for(;O!==null;){var H=O;O=A;for(var te=0;te<a.length;te++)if(H.context===a[te]){O.lanes|=u,H=O.alternate,H!==null&&(H.lanes|=u),wm(O.return,u,i),T||(U=null);break e}O=H.next}}else if(A.tag===18){if(U=A.return,U===null)throw Error(r(341));U.lanes|=u,O=U.alternate,O!==null&&(O.lanes|=u),wm(U,u,i),U=null}else U=A.child;if(U!==null)U.return=A;else for(U=A;U!==null;){if(U===i){U=null;break}if(A=U.sibling,A!==null){A.return=U.return,U=A;break}U=U.return}A=U}}function uu(i,a,u,T){i=null;for(var A=a,O=!1;A!==null;){if(!O){if((A.flags&524288)!==0)O=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var U=A.alternate;if(U===null)throw Error(r(387));if(U=U.memoizedProps,U!==null){var H=A.type;Ur(A.pendingProps.value,U.value)||(i!==null?i.push(H):i=[H])}}else if(A===fe.current){if(U=A.alternate,U===null)throw Error(r(387));U.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(i!==null?i.push(Uf):i=[Uf])}A=A.return}i!==null&&Gm(a,i,u,T),a.flags|=262144}function oh(i){for(i=i.firstContext;i!==null;){if(!Ur(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function xl(i){Ml=i,ro=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Nr(i){return hL(Ml,i)}function ah(i,a){return Ml===null&&xl(i),hL(i,a)}function hL(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},ro===null){if(i===null)throw Error(r(308));ro=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else ro=ro.next=a;return u}var t2=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,T){i.push(T)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},n2=e.unstable_scheduleCallback,r2=e.unstable_NormalPriority,Kn={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bm(){return{controller:new t2,data:new Map,refCount:0}}function cf(i){i.refCount--,i.refCount===0&&n2(r2,function(){i.controller.abort()})}var uf=null,Fm=0,Eu=0,fu=null;function s2(i,a){if(uf===null){var u=uf=[];Fm=0,Eu=kA(),fu={status:"pending",value:void 0,then:function(T){u.push(T)}}}return Fm++,a.then(pL,pL),a}function pL(){if(--Fm===0&&uf!==null){fu!==null&&(fu.status="fulfilled");var i=uf;uf=null,Eu=0,fu=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function i2(i,a){var u=[],T={status:"pending",value:null,reason:null,then:function(A){u.push(A)}};return i.then(function(){T.status="fulfilled",T.value=a;for(var A=0;A<u.length;A++)(0,u[A])(a)},function(A){for(T.status="rejected",T.reason=A,A=0;A<u.length;A++)(0,u[A])(void 0)}),T}var RL=k.S;k.S=function(i,a){e0=xe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&s2(i,a),RL!==null&&RL(i,a)};var Ul=B(null);function Hm(){var i=Ul.current;return i!==null?i:Sn.pooledCache}function lh(i,a){a===null?ue(Ul,Ul.current):ue(Ul,a.pool)}function SL(){var i=Hm();return i===null?null:{parent:Kn._currentValue,pool:i}}var du=Error(r(460)),Vm=Error(r(474)),ch=Error(r(542)),uh={then:function(){}};function mL(i){return i=i.status,i==="fulfilled"||i==="rejected"}function AL(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(li,li),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,OL(i),i;default:if(typeof a.status=="string")a.then(li,li);else{if(i=Sn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(T){if(a.status==="pending"){var A=a;A.status="fulfilled",A.value=T}},function(T){if(a.status==="pending"){var A=a;A.status="rejected",A.reason=T}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,OL(i),i}throw Gl=a,du}}function wl(i){try{var a=i._init;return a(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Gl=u,du):u}}var Gl=null;function gL(){if(Gl===null)throw Error(r(459));var i=Gl;return Gl=null,i}function OL(i){if(i===du||i===ch)throw Error(r(483))}var Tu=null,Ef=0;function Eh(i){var a=Ef;return Ef+=1,Tu===null&&(Tu=[]),AL(Tu,i,a)}function ff(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function fh(i,a){throw a.$$typeof===p?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function IL(i){function a(Ee,ae){if(i){var pe=Ee.deletions;pe===null?(Ee.deletions=[ae],Ee.flags|=16):pe.push(ae)}}function u(Ee,ae){if(!i)return null;for(;ae!==null;)a(Ee,ae),ae=ae.sibling;return null}function T(Ee){for(var ae=new Map;Ee!==null;)Ee.key!==null?ae.set(Ee.key,Ee):ae.set(Ee.index,Ee),Ee=Ee.sibling;return ae}function A(Ee,ae){return Ee=gs(Ee,ae),Ee.index=0,Ee.sibling=null,Ee}function O(Ee,ae,pe){return Ee.index=pe,i?(pe=Ee.alternate,pe!==null?(pe=pe.index,pe<ae?(Ee.flags|=67108866,ae):pe):(Ee.flags|=67108866,ae)):(Ee.flags|=1048576,ae)}function U(Ee){return i&&Ee.alternate===null&&(Ee.flags|=67108866),Ee}function H(Ee,ae,pe,ye){return ae===null||ae.tag!==6?(ae=Dl(pe,Ee.mode,ye),ae.return=Ee,ae):(ae=A(ae,pe),ae.return=Ee,ae)}function te(Ee,ae,pe,ye){var ut=pe.type;return ut===m?Ne(Ee,ae,pe.props.children,ye,pe.key):ae!==null&&(ae.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===w&&wl(ut)===ae.type)?(ae=A(ae,pe.props),ff(ae,pe),ae.return=Ee,ae):(ae=Pi(pe.type,pe.key,pe.props,null,Ee.mode,ye),ff(ae,pe),ae.return=Ee,ae)}function Re(Ee,ae,pe,ye){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==pe.containerInfo||ae.stateNode.implementation!==pe.implementation?(ae=sf(pe,Ee.mode,ye),ae.return=Ee,ae):(ae=A(ae,pe.children||[]),ae.return=Ee,ae)}function Ne(Ee,ae,pe,ye,ut){return ae===null||ae.tag!==7?(ae=di(pe,Ee.mode,ye,ut),ae.return=Ee,ae):(ae=A(ae,pe),ae.return=Ee,ae)}function De(Ee,ae,pe){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Dl(""+ae,Ee.mode,pe),ae.return=Ee,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case S:return pe=Pi(ae.type,ae.key,ae.props,null,Ee.mode,pe),ff(pe,ae),pe.return=Ee,pe;case R:return ae=sf(ae,Ee.mode,pe),ae.return=Ee,ae;case w:return ae=wl(ae),De(Ee,ae,pe)}if(j(ae)||W(ae))return ae=di(ae,Ee.mode,pe,null),ae.return=Ee,ae;if(typeof ae.then=="function")return De(Ee,Eh(ae),pe);if(ae.$$typeof===L)return De(Ee,ah(Ee,ae),pe);fh(Ee,ae)}return null}function me(Ee,ae,pe,ye){var ut=ae!==null?ae.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ut!==null?null:H(Ee,ae,""+pe,ye);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return pe.key===ut?te(Ee,ae,pe,ye):null;case R:return pe.key===ut?Re(Ee,ae,pe,ye):null;case w:return pe=wl(pe),me(Ee,ae,pe,ye)}if(j(pe)||W(pe))return ut!==null?null:Ne(Ee,ae,pe,ye,null);if(typeof pe.then=="function")return me(Ee,ae,Eh(pe),ye);if(pe.$$typeof===L)return me(Ee,ae,ah(Ee,pe),ye);fh(Ee,pe)}return null}function Oe(Ee,ae,pe,ye,ut){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return Ee=Ee.get(pe)||null,H(ae,Ee,""+ye,ut);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case S:return Ee=Ee.get(ye.key===null?pe:ye.key)||null,te(ae,Ee,ye,ut);case R:return Ee=Ee.get(ye.key===null?pe:ye.key)||null,Re(ae,Ee,ye,ut);case w:return ye=wl(ye),Oe(Ee,ae,pe,ye,ut)}if(j(ye)||W(ye))return Ee=Ee.get(pe)||null,Ne(ae,Ee,ye,ut,null);if(typeof ye.then=="function")return Oe(Ee,ae,pe,Eh(ye),ut);if(ye.$$typeof===L)return Oe(Ee,ae,pe,ah(ae,ye),ut);fh(ae,ye)}return null}function et(Ee,ae,pe,ye){for(var ut=null,Zt=null,it=ae,bt=ae=0,kt=null;it!==null&&bt<pe.length;bt++){it.index>bt?(kt=it,it=null):kt=it.sibling;var en=me(Ee,it,pe[bt],ye);if(en===null){it===null&&(it=kt);break}i&&it&&en.alternate===null&&a(Ee,it),ae=O(en,ae,bt),Zt===null?ut=en:Zt.sibling=en,Zt=en,it=kt}if(bt===pe.length)return u(Ee,it),Wt&&no(Ee,bt),ut;if(it===null){for(;bt<pe.length;bt++)it=De(Ee,pe[bt],ye),it!==null&&(ae=O(it,ae,bt),Zt===null?ut=it:Zt.sibling=it,Zt=it);return Wt&&no(Ee,bt),ut}for(it=T(it);bt<pe.length;bt++)kt=Oe(it,Ee,bt,pe[bt],ye),kt!==null&&(i&&kt.alternate!==null&&it.delete(kt.key===null?bt:kt.key),ae=O(kt,ae,bt),Zt===null?ut=kt:Zt.sibling=kt,Zt=kt);return i&&it.forEach(function(Oa){return a(Ee,Oa)}),Wt&&no(Ee,bt),ut}function dt(Ee,ae,pe,ye){if(pe==null)throw Error(r(151));for(var ut=null,Zt=null,it=ae,bt=ae=0,kt=null,en=pe.next();it!==null&&!en.done;bt++,en=pe.next()){it.index>bt?(kt=it,it=null):kt=it.sibling;var Oa=me(Ee,it,en.value,ye);if(Oa===null){it===null&&(it=kt);break}i&&it&&Oa.alternate===null&&a(Ee,it),ae=O(Oa,ae,bt),Zt===null?ut=Oa:Zt.sibling=Oa,Zt=Oa,it=kt}if(en.done)return u(Ee,it),Wt&&no(Ee,bt),ut;if(it===null){for(;!en.done;bt++,en=pe.next())en=De(Ee,en.value,ye),en!==null&&(ae=O(en,ae,bt),Zt===null?ut=en:Zt.sibling=en,Zt=en);return Wt&&no(Ee,bt),ut}for(it=T(it);!en.done;bt++,en=pe.next())en=Oe(it,Ee,bt,en.value,ye),en!==null&&(i&&en.alternate!==null&&it.delete(en.key===null?bt:en.key),ae=O(en,ae,bt),Zt===null?ut=en:Zt.sibling=en,Zt=en);return i&&it.forEach(function(pV){return a(Ee,pV)}),Wt&&no(Ee,bt),ut}function dn(Ee,ae,pe,ye){if(typeof pe=="object"&&pe!==null&&pe.type===m&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:e:{for(var ut=pe.key;ae!==null;){if(ae.key===ut){if(ut=pe.type,ut===m){if(ae.tag===7){u(Ee,ae.sibling),ye=A(ae,pe.props.children),ye.return=Ee,Ee=ye;break e}}else if(ae.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===w&&wl(ut)===ae.type){u(Ee,ae.sibling),ye=A(ae,pe.props),ff(ye,pe),ye.return=Ee,Ee=ye;break e}u(Ee,ae);break}else a(Ee,ae);ae=ae.sibling}pe.type===m?(ye=di(pe.props.children,Ee.mode,ye,pe.key),ye.return=Ee,Ee=ye):(ye=Pi(pe.type,pe.key,pe.props,null,Ee.mode,ye),ff(ye,pe),ye.return=Ee,Ee=ye)}return U(Ee);case R:e:{for(ut=pe.key;ae!==null;){if(ae.key===ut)if(ae.tag===4&&ae.stateNode.containerInfo===pe.containerInfo&&ae.stateNode.implementation===pe.implementation){u(Ee,ae.sibling),ye=A(ae,pe.children||[]),ye.return=Ee,Ee=ye;break e}else{u(Ee,ae);break}else a(Ee,ae);ae=ae.sibling}ye=sf(pe,Ee.mode,ye),ye.return=Ee,Ee=ye}return U(Ee);case w:return pe=wl(pe),dn(Ee,ae,pe,ye)}if(j(pe))return et(Ee,ae,pe,ye);if(W(pe)){if(ut=W(pe),typeof ut!="function")throw Error(r(150));return pe=ut.call(pe),dt(Ee,ae,pe,ye)}if(typeof pe.then=="function")return dn(Ee,ae,Eh(pe),ye);if(pe.$$typeof===L)return dn(Ee,ae,ah(Ee,pe),ye);fh(Ee,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,ae!==null&&ae.tag===6?(u(Ee,ae.sibling),ye=A(ae,pe),ye.return=Ee,Ee=ye):(u(Ee,ae),ye=Dl(pe,Ee.mode,ye),ye.return=Ee,Ee=ye),U(Ee)):u(Ee,ae)}return function(Ee,ae,pe,ye){try{Ef=0;var ut=dn(Ee,ae,pe,ye);return Tu=null,ut}catch(it){if(it===du||it===ch)throw it;var Zt=un(29,it,null,Ee.mode);return Zt.lanes=ye,Zt.return=Ee,Zt}finally{}}}var Bl=IL(!0),NL=IL(!1),ia=!1;function km(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ym(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function oa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function aa(i,a,u){var T=i.updateQueue;if(T===null)return null;if(T=T.shared,(tn&2)!==0){var A=T.pending;return A===null?a.next=a:(a.next=A.next,A.next=a),T.pending=a,a=Vs(i),Or(i,null,u),a}return Kt(i,T,a,u),Vs(i)}function df(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var T=a.lanes;T&=i.pendingLanes,u|=T,a.lanes=u,Rn(i,u)}}function Wm(i,a){var u=i.updateQueue,T=i.alternate;if(T!==null&&(T=T.updateQueue,u===T)){var A=null,O=null;if(u=u.firstBaseUpdate,u!==null){do{var U={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};O===null?A=O=U:O=O.next=U,u=u.next}while(u!==null);O===null?A=O=a:O=O.next=a}else A=O=a;u={baseState:T.baseState,firstBaseUpdate:A,lastBaseUpdate:O,shared:T.shared,callbacks:T.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var jm=!1;function Tf(){if(jm){var i=fu;if(i!==null)throw i}}function hf(i,a,u,T){jm=!1;var A=i.updateQueue;ia=!1;var O=A.firstBaseUpdate,U=A.lastBaseUpdate,H=A.shared.pending;if(H!==null){A.shared.pending=null;var te=H,Re=te.next;te.next=null,U===null?O=Re:U.next=Re,U=te;var Ne=i.alternate;Ne!==null&&(Ne=Ne.updateQueue,H=Ne.lastBaseUpdate,H!==U&&(H===null?Ne.firstBaseUpdate=Re:H.next=Re,Ne.lastBaseUpdate=te))}if(O!==null){var De=A.baseState;U=0,Ne=Re=te=null,H=O;do{var me=H.lane&-536870913,Oe=me!==H.lane;if(Oe?(Vt&me)===me:(T&me)===me){me!==0&&me===Eu&&(jm=!0),Ne!==null&&(Ne=Ne.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var et=i,dt=H;me=a;var dn=u;switch(dt.tag){case 1:if(et=dt.payload,typeof et=="function"){De=et.call(dn,De,me);break e}De=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=dt.payload,me=typeof et=="function"?et.call(dn,De,me):et,me==null)break e;De=d({},De,me);break e;case 2:ia=!0}}me=H.callback,me!==null&&(i.flags|=64,Oe&&(i.flags|=8192),Oe=A.callbacks,Oe===null?A.callbacks=[me]:Oe.push(me))}else Oe={lane:me,tag:H.tag,payload:H.payload,callback:H.callback,next:null},Ne===null?(Re=Ne=Oe,te=De):Ne=Ne.next=Oe,U|=me;if(H=H.next,H===null){if(H=A.shared.pending,H===null)break;Oe=H,H=Oe.next,Oe.next=null,A.lastBaseUpdate=Oe,A.shared.pending=null}}while(!0);Ne===null&&(te=De),A.baseState=te,A.firstBaseUpdate=Re,A.lastBaseUpdate=Ne,O===null&&(A.shared.lanes=0),fa|=U,i.lanes=U,i.memoizedState=De}}function CL(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function _L(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)CL(u[i],a)}var hu=B(null),dh=B(0);function LL(i,a){i=To,ue(dh,i),ue(hu,a),To=i|a.baseLanes}function Xm(){ue(dh,To),ue(hu,hu.current)}function $m(){To=dh.current,Q(hu),Q(dh)}var Os=B(null),Xs=null;function la(i){var a=i.alternate;ue(kn,kn.current&1),ue(Os,i),Xs===null&&(a===null||hu.current!==null||a.memoizedState!==null)&&(Xs=i)}function Km(i){ue(kn,kn.current),ue(Os,i),Xs===null&&(Xs=i)}function yL(i){i.tag===22?(ue(kn,kn.current),ue(Os,i),Xs===null&&(Xs=i)):ca()}function ca(){ue(kn,kn.current),ue(Os,Os.current)}function Is(i){Q(Os),Xs===i&&(Xs=null),Q(kn)}var kn=B(0);function Th(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||eg(u)||tg(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var io=0,Lt=null,En=null,zn=null,hh=!1,pu=!1,Fl=!1,ph=0,pf=0,Ru=null,o2=0;function Dn(){throw Error(r(321))}function zm(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!Ur(i[u],a[u]))return!1;return!0}function qm(i,a,u,T,A,O){return io=O,Lt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,k.H=i===null||i.memoizedState===null?Ey:EA,Fl=!1,O=u(T,A),Fl=!1,pu&&(O=PL(a,u,T,A)),bL(i),O}function bL(i){k.H=mf;var a=En!==null&&En.next!==null;if(io=0,zn=En=Lt=null,hh=!1,pf=0,Ru=null,a)throw Error(r(300));i===null||qn||(i=i.dependencies,i!==null&&oh(i)&&(qn=!0))}function PL(i,a,u,T){Lt=i;var A=0;do{if(pu&&(Ru=null),pf=0,pu=!1,25<=A)throw Error(r(301));if(A+=1,zn=En=null,i.updateQueue!=null){var O=i.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}k.H=fy,O=a(u,T)}while(pu);return O}function a2(){var i=k.H,a=i.useState()[0];return a=typeof a.then=="function"?Rf(a):a,i=i.useState()[0],(En!==null?En.memoizedState:null)!==i&&(Lt.flags|=1024),a}function Jm(){var i=ph!==0;return ph=0,i}function Qm(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function Zm(i){if(hh){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}hh=!1}io=0,zn=En=Lt=null,pu=!1,pf=ph=0,Ru=null}function zr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zn===null?Lt.memoizedState=zn=i:zn=zn.next=i,zn}function Yn(){if(En===null){var i=Lt.alternate;i=i!==null?i.memoizedState:null}else i=En.next;var a=zn===null?Lt.memoizedState:zn.next;if(a!==null)zn=a,En=i;else{if(i===null)throw Lt.alternate===null?Error(r(467)):Error(r(310));En=i,i={memoizedState:En.memoizedState,baseState:En.baseState,baseQueue:En.baseQueue,queue:En.queue,next:null},zn===null?Lt.memoizedState=zn=i:zn=zn.next=i}return zn}function Rh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rf(i){var a=pf;return pf+=1,Ru===null&&(Ru=[]),i=AL(Ru,i,a),a=Lt,(zn===null?a.memoizedState:zn.next)===null&&(a=a.alternate,k.H=a===null||a.memoizedState===null?Ey:EA),i}function Sh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Rf(i);if(i.$$typeof===L)return Nr(i)}throw Error(r(438,String(i)))}function eA(i){var a=null,u=Lt.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var T=Lt.alternate;T!==null&&(T=T.updateQueue,T!==null&&(T=T.memoCache,T!=null&&(a={data:T.data.map(function(A){return A.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=Rh(),Lt.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),T=0;T<i;T++)u[T]=Y;return a.index++,u}function oo(i,a){return typeof a=="function"?a(i):a}function mh(i){var a=Yn();return tA(a,En,i)}function tA(i,a,u){var T=i.queue;if(T===null)throw Error(r(311));T.lastRenderedReducer=u;var A=i.baseQueue,O=T.pending;if(O!==null){if(A!==null){var U=A.next;A.next=O.next,O.next=U}a.baseQueue=A=O,T.pending=null}if(O=i.baseState,A===null)i.memoizedState=O;else{a=A.next;var H=U=null,te=null,Re=a,Ne=!1;do{var De=Re.lane&-536870913;if(De!==Re.lane?(Vt&De)===De:(io&De)===De){var me=Re.revertLane;if(me===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),De===Eu&&(Ne=!0);else if((io&me)===me){Re=Re.next,me===Eu&&(Ne=!0);continue}else De={lane:0,revertLane:Re.revertLane,gesture:null,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},te===null?(H=te=De,U=O):te=te.next=De,Lt.lanes|=me,fa|=me;De=Re.action,Fl&&u(O,De),O=Re.hasEagerState?Re.eagerState:u(O,De)}else me={lane:De,revertLane:Re.revertLane,gesture:Re.gesture,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},te===null?(H=te=me,U=O):te=te.next=me,Lt.lanes|=De,fa|=De;Re=Re.next}while(Re!==null&&Re!==a);if(te===null?U=O:te.next=H,!Ur(O,i.memoizedState)&&(qn=!0,Ne&&(u=fu,u!==null)))throw u;i.memoizedState=O,i.baseState=U,i.baseQueue=te,T.lastRenderedState=O}return A===null&&(T.lanes=0),[i.memoizedState,T.dispatch]}function nA(i){var a=Yn(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var T=u.dispatch,A=u.pending,O=a.memoizedState;if(A!==null){u.pending=null;var U=A=A.next;do O=i(O,U.action),U=U.next;while(U!==A);Ur(O,a.memoizedState)||(qn=!0),a.memoizedState=O,a.baseQueue===null&&(a.baseState=O),u.lastRenderedState=O}return[O,T]}function DL(i,a,u){var T=Lt,A=Yn(),O=Wt;if(O){if(u===void 0)throw Error(r(407));u=u()}else u=a();var U=!Ur((En||A).memoizedState,u);if(U&&(A.memoizedState=u,qn=!0),A=A.queue,iA(xL.bind(null,T,A,i),[i]),A.getSnapshot!==a||U||zn!==null&&zn.memoizedState.tag&1){if(T.flags|=2048,Su(9,{destroy:void 0},ML.bind(null,T,A,u,a),null),Sn===null)throw Error(r(349));O||(io&127)!==0||vL(T,a,u)}return u}function vL(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=Lt.updateQueue,a===null?(a=Rh(),Lt.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function ML(i,a,u,T){a.value=u,a.getSnapshot=T,UL(a)&&wL(i)}function xL(i,a,u){return u(function(){UL(a)&&wL(i)})}function UL(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!Ur(i,u)}catch{return!0}}function wL(i){var a=Vn(i,2);a!==null&&fs(a,i,2)}function rA(i){var a=zr();if(typeof i=="function"){var u=i;if(i=u(),Fl){In(!0);try{u()}finally{In(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oo,lastRenderedState:i},a}function GL(i,a,u,T){return i.baseState=u,tA(i,En,typeof T=="function"?T:oo)}function l2(i,a,u,T,A){if(Oh(i))throw Error(r(485));if(i=a.action,i!==null){var O={payload:A,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(U){O.listeners.push(U)}};k.T!==null?u(!0):O.isTransition=!1,T(O),u=a.pending,u===null?(O.next=a.pending=O,BL(a,O)):(O.next=u.next,a.pending=u.next=O)}}function BL(i,a){var u=a.action,T=a.payload,A=i.state;if(a.isTransition){var O=k.T,U={};k.T=U;try{var H=u(A,T),te=k.S;te!==null&&te(U,H),FL(i,a,H)}catch(Re){sA(i,a,Re)}finally{O!==null&&U.types!==null&&(O.types=U.types),k.T=O}}else try{O=u(A,T),FL(i,a,O)}catch(Re){sA(i,a,Re)}}function FL(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(T){HL(i,a,T)},function(T){return sA(i,a,T)}):HL(i,a,u)}function HL(i,a,u){a.status="fulfilled",a.value=u,VL(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,BL(i,u)))}function sA(i,a,u){var T=i.pending;if(i.pending=null,T!==null){T=T.next;do a.status="rejected",a.reason=u,VL(a),a=a.next;while(a!==T)}i.action=null}function VL(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function kL(i,a){return a}function YL(i,a){if(Wt){var u=Sn.formState;if(u!==null){e:{var T=Lt;if(Wt){if(Cn){t:{for(var A=Cn,O=js;A.nodeType!==8;){if(!O){A=null;break t}if(A=$s(A.nextSibling),A===null){A=null;break t}}O=A.data,A=O==="F!"||O==="F"?A:null}if(A){Cn=$s(A.nextSibling),T=A.data==="F!";break e}}ra(T)}T=!1}T&&(a=u[0])}}return u=zr(),u.memoizedState=u.baseState=a,T={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kL,lastRenderedState:a},u.queue=T,u=ly.bind(null,Lt,T),T.dispatch=u,T=rA(!1),O=uA.bind(null,Lt,!1,T.queue),T=zr(),A={state:a,dispatch:null,action:i,pending:null},T.queue=A,u=l2.bind(null,Lt,A,O,u),A.dispatch=u,T.memoizedState=i,[a,u,!1]}function WL(i){var a=Yn();return jL(a,En,i)}function jL(i,a,u){if(a=tA(i,a,kL)[0],i=mh(oo)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var T=Rf(a)}catch(U){throw U===du?ch:U}else T=a;a=Yn();var A=a.queue,O=A.dispatch;return u!==a.memoizedState&&(Lt.flags|=2048,Su(9,{destroy:void 0},c2.bind(null,A,u),null)),[T,O,i]}function c2(i,a){i.action=a}function XL(i){var a=Yn(),u=En;if(u!==null)return jL(a,u,i);Yn(),a=a.memoizedState,u=Yn();var T=u.queue.dispatch;return u.memoizedState=i,[a,T,!1]}function Su(i,a,u,T){return i={tag:i,create:u,deps:T,inst:a,next:null},a=Lt.updateQueue,a===null&&(a=Rh(),Lt.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(T=u.next,u.next=i,i.next=T,a.lastEffect=i),i}function $L(){return Yn().memoizedState}function Ah(i,a,u,T){var A=zr();Lt.flags|=i,A.memoizedState=Su(1|a,{destroy:void 0},u,T===void 0?null:T)}function gh(i,a,u,T){var A=Yn();T=T===void 0?null:T;var O=A.memoizedState.inst;En!==null&&T!==null&&zm(T,En.memoizedState.deps)?A.memoizedState=Su(a,O,u,T):(Lt.flags|=i,A.memoizedState=Su(1|a,O,u,T))}function KL(i,a){Ah(8390656,8,i,a)}function iA(i,a){gh(2048,8,i,a)}function u2(i){Lt.flags|=4;var a=Lt.updateQueue;if(a===null)a=Rh(),Lt.updateQueue=a,a.events=[i];else{var u=a.events;u===null?a.events=[i]:u.push(i)}}function zL(i){var a=Yn().memoizedState;return u2({ref:a,nextImpl:i}),function(){if((tn&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function qL(i,a){return gh(4,2,i,a)}function JL(i,a){return gh(4,4,i,a)}function QL(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function ZL(i,a,u){u=u!=null?u.concat([i]):null,gh(4,4,QL.bind(null,a,i),u)}function oA(){}function ey(i,a){var u=Yn();a=a===void 0?null:a;var T=u.memoizedState;return a!==null&&zm(a,T[1])?T[0]:(u.memoizedState=[i,a],i)}function ty(i,a){var u=Yn();a=a===void 0?null:a;var T=u.memoizedState;if(a!==null&&zm(a,T[1]))return T[0];if(T=i(),Fl){In(!0);try{i()}finally{In(!1)}}return u.memoizedState=[T,a],T}function aA(i,a,u){return u===void 0||(io&1073741824)!==0&&(Vt&261930)===0?i.memoizedState=a:(i.memoizedState=u,i=n0(),Lt.lanes|=i,fa|=i,u)}function ny(i,a,u,T){return Ur(u,a)?u:hu.current!==null?(i=aA(i,u,T),Ur(i,a)||(qn=!0),i):(io&42)===0||(io&1073741824)!==0&&(Vt&261930)===0?(qn=!0,i.memoizedState=u):(i=n0(),Lt.lanes|=i,fa|=i,a)}function ry(i,a,u,T,A){var O=z.p;z.p=O!==0&&8>O?O:8;var U=k.T,H={};k.T=H,uA(i,!1,a,u);try{var te=A(),Re=k.S;if(Re!==null&&Re(H,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var Ne=i2(te,T);Sf(i,a,Ne,_s(i))}else Sf(i,a,T,_s(i))}catch(De){Sf(i,a,{then:function(){},status:"rejected",reason:De},_s())}finally{z.p=O,U!==null&&H.types!==null&&(U.types=H.types),k.T=U}}function E2(){}function lA(i,a,u,T){if(i.tag!==5)throw Error(r(476));var A=sy(i).queue;ry(i,A,a,Z,u===null?E2:function(){return iy(i),u(T)})}function sy(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oo,lastRenderedState:Z},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oo,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function iy(i){var a=sy(i);a.next===null&&(a=i.alternate.memoizedState),Sf(i,a.next.queue,{},_s())}function cA(){return Nr(Uf)}function oy(){return Yn().memoizedState}function ay(){return Yn().memoizedState}function f2(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=_s();i=oa(u);var T=aa(a,i,u);T!==null&&(fs(T,a,u),df(T,a,u)),a={cache:Bm()},i.payload=a;return}a=a.return}}function d2(i,a,u){var T=_s();u={lane:T,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Oh(i)?cy(a,u):(u=yt(i,a,u,T),u!==null&&(fs(u,i,T),uy(u,a,T)))}function ly(i,a,u){var T=_s();Sf(i,a,u,T)}function Sf(i,a,u,T){var A={lane:T,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Oh(i))cy(a,A);else{var O=i.alternate;if(i.lanes===0&&(O===null||O.lanes===0)&&(O=a.lastRenderedReducer,O!==null))try{var U=a.lastRenderedState,H=O(U,u);if(A.hasEagerState=!0,A.eagerState=H,Ur(H,U))return Kt(i,a,A,0),Sn===null&&_t(),!1}catch{}finally{}if(u=yt(i,a,A,T),u!==null)return fs(u,i,T),uy(u,a,T),!0}return!1}function uA(i,a,u,T){if(T={lane:2,revertLane:kA(),gesture:null,action:T,hasEagerState:!1,eagerState:null,next:null},Oh(i)){if(a)throw Error(r(479))}else a=yt(i,u,T,2),a!==null&&fs(a,i,2)}function Oh(i){var a=i.alternate;return i===Lt||a!==null&&a===Lt}function cy(i,a){pu=hh=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function uy(i,a,u){if((u&4194048)!==0){var T=a.lanes;T&=i.pendingLanes,u|=T,a.lanes=u,Rn(i,u)}}var mf={readContext:Nr,use:Sh,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useLayoutEffect:Dn,useInsertionEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useSyncExternalStore:Dn,useId:Dn,useHostTransitionStatus:Dn,useFormState:Dn,useActionState:Dn,useOptimistic:Dn,useMemoCache:Dn,useCacheRefresh:Dn};mf.useEffectEvent=Dn;var Ey={readContext:Nr,use:Sh,useCallback:function(i,a){return zr().memoizedState=[i,a===void 0?null:a],i},useContext:Nr,useEffect:KL,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,Ah(4194308,4,QL.bind(null,a,i),u)},useLayoutEffect:function(i,a){return Ah(4194308,4,i,a)},useInsertionEffect:function(i,a){Ah(4,2,i,a)},useMemo:function(i,a){var u=zr();a=a===void 0?null:a;var T=i();if(Fl){In(!0);try{i()}finally{In(!1)}}return u.memoizedState=[T,a],T},useReducer:function(i,a,u){var T=zr();if(u!==void 0){var A=u(a);if(Fl){In(!0);try{u(a)}finally{In(!1)}}}else A=a;return T.memoizedState=T.baseState=A,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:A},T.queue=i,i=i.dispatch=d2.bind(null,Lt,i),[T.memoizedState,i]},useRef:function(i){var a=zr();return i={current:i},a.memoizedState=i},useState:function(i){i=rA(i);var a=i.queue,u=ly.bind(null,Lt,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:oA,useDeferredValue:function(i,a){var u=zr();return aA(u,i,a)},useTransition:function(){var i=rA(!1);return i=ry.bind(null,Lt,i.queue,!0,!1),zr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var T=Lt,A=zr();if(Wt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),Sn===null)throw Error(r(349));(Vt&127)!==0||vL(T,a,u)}A.memoizedState=u;var O={value:u,getSnapshot:a};return A.queue=O,KL(xL.bind(null,T,O,i),[i]),T.flags|=2048,Su(9,{destroy:void 0},ML.bind(null,T,O,u,a),null),u},useId:function(){var i=zr(),a=Sn.identifierPrefix;if(Wt){var u=vi,T=Di;u=(T&~(1<<32-$t(T)-1)).toString(32)+u,a="_"+a+"R_"+u,u=ph++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=o2++,a="_"+a+"r_"+u.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:cA,useFormState:YL,useActionState:YL,useOptimistic:function(i){var a=zr();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=uA.bind(null,Lt,!0,u),u.dispatch=a,[i,a]},useMemoCache:eA,useCacheRefresh:function(){return zr().memoizedState=f2.bind(null,Lt)},useEffectEvent:function(i){var a=zr(),u={impl:i};return a.memoizedState=u,function(){if((tn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},EA={readContext:Nr,use:Sh,useCallback:ey,useContext:Nr,useEffect:iA,useImperativeHandle:ZL,useInsertionEffect:qL,useLayoutEffect:JL,useMemo:ty,useReducer:mh,useRef:$L,useState:function(){return mh(oo)},useDebugValue:oA,useDeferredValue:function(i,a){var u=Yn();return ny(u,En.memoizedState,i,a)},useTransition:function(){var i=mh(oo)[0],a=Yn().memoizedState;return[typeof i=="boolean"?i:Rf(i),a]},useSyncExternalStore:DL,useId:oy,useHostTransitionStatus:cA,useFormState:WL,useActionState:WL,useOptimistic:function(i,a){var u=Yn();return GL(u,En,i,a)},useMemoCache:eA,useCacheRefresh:ay};EA.useEffectEvent=zL;var fy={readContext:Nr,use:Sh,useCallback:ey,useContext:Nr,useEffect:iA,useImperativeHandle:ZL,useInsertionEffect:qL,useLayoutEffect:JL,useMemo:ty,useReducer:nA,useRef:$L,useState:function(){return nA(oo)},useDebugValue:oA,useDeferredValue:function(i,a){var u=Yn();return En===null?aA(u,i,a):ny(u,En.memoizedState,i,a)},useTransition:function(){var i=nA(oo)[0],a=Yn().memoizedState;return[typeof i=="boolean"?i:Rf(i),a]},useSyncExternalStore:DL,useId:oy,useHostTransitionStatus:cA,useFormState:XL,useActionState:XL,useOptimistic:function(i,a){var u=Yn();return En!==null?GL(u,En,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:eA,useCacheRefresh:ay};fy.useEffectEvent=zL;function fA(i,a,u,T){a=i.memoizedState,u=u(T,a),u=u==null?a:d({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var dA={enqueueSetState:function(i,a,u){i=i._reactInternals;var T=_s(),A=oa(T);A.payload=a,u!=null&&(A.callback=u),a=aa(i,A,T),a!==null&&(fs(a,i,T),df(a,i,T))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var T=_s(),A=oa(T);A.tag=1,A.payload=a,u!=null&&(A.callback=u),a=aa(i,A,T),a!==null&&(fs(a,i,T),df(a,i,T))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=_s(),T=oa(u);T.tag=2,a!=null&&(T.callback=a),a=aa(i,T,u),a!==null&&(fs(a,i,u),df(a,i,u))}};function dy(i,a,u,T,A,O,U){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(T,O,U):a.prototype&&a.prototype.isPureReactComponent?!Zo(u,T)||!Zo(A,O):!0}function Ty(i,a,u,T){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,T),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,T),a.state!==i&&dA.enqueueReplaceState(a,a.state,null)}function Hl(i,a){var u=a;if("ref"in a){u={};for(var T in a)T!=="ref"&&(u[T]=a[T])}if(i=i.defaultProps){u===a&&(u=d({},u));for(var A in i)u[A]===void 0&&(u[A]=i[A])}return u}function hy(i){ze(i)}function py(i){console.error(i)}function Ry(i){ze(i)}function Ih(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(T){setTimeout(function(){throw T})}}function Sy(i,a,u){try{var T=i.onCaughtError;T(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function TA(i,a,u){return u=oa(u),u.tag=3,u.payload={element:null},u.callback=function(){Ih(i,a)},u}function my(i){return i=oa(i),i.tag=3,i}function Ay(i,a,u,T){var A=u.type.getDerivedStateFromError;if(typeof A=="function"){var O=T.value;i.payload=function(){return A(O)},i.callback=function(){Sy(a,u,T)}}var U=u.stateNode;U!==null&&typeof U.componentDidCatch=="function"&&(i.callback=function(){Sy(a,u,T),typeof A!="function"&&(da===null?da=new Set([this]):da.add(this));var H=T.stack;this.componentDidCatch(T.value,{componentStack:H!==null?H:""})})}function T2(i,a,u,T,A){if(u.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){if(a=u.alternate,a!==null&&uu(a,u,A,!0),u=Os.current,u!==null){switch(u.tag){case 31:case 13:return Xs===null?Uh():u.alternate===null&&vn===0&&(vn=3),u.flags&=-257,u.flags|=65536,u.lanes=A,T===uh?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([T]):a.add(T),FA(i,T,A)),!1;case 22:return u.flags|=65536,T===uh?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([T])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([T]):u.add(T)),FA(i,T,A)),!1}throw Error(r(435,u.tag))}return FA(i,T,A),Uh(),!1}if(Wt)return a=Os.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=A,T!==Mm&&(i=Error(r(422),{cause:T}),lf(ks(i,u)))):(T!==Mm&&(a=Error(r(423),{cause:T}),lf(ks(a,u))),i=i.current.alternate,i.flags|=65536,A&=-A,i.lanes|=A,T=ks(T,u),A=TA(i.stateNode,T,A),Wm(i,A),vn!==4&&(vn=2)),!1;var O=Error(r(520),{cause:T});if(O=ks(O,u),Lf===null?Lf=[O]:Lf.push(O),vn!==4&&(vn=2),a===null)return!0;T=ks(T,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=A&-A,u.lanes|=i,i=TA(u.stateNode,T,i),Wm(u,i),!1;case 1:if(a=u.type,O=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(da===null||!da.has(O))))return u.flags|=65536,A&=-A,u.lanes|=A,A=my(A),Ay(A,i,u,T),Wm(u,A),!1}u=u.return}while(u!==null);return!1}var hA=Error(r(461)),qn=!1;function Cr(i,a,u,T){a.child=i===null?NL(a,null,u,T):Bl(a,i.child,u,T)}function gy(i,a,u,T,A){u=u.render;var O=a.ref;if("ref"in T){var U={};for(var H in T)H!=="ref"&&(U[H]=T[H])}else U=T;return xl(a),T=qm(i,a,u,U,O,A),H=Jm(),i!==null&&!qn?(Qm(i,a,A),ao(i,a,A)):(Wt&&H&&Dm(a),a.flags|=1,Cr(i,a,T,A),a.child)}function Oy(i,a,u,T,A){if(i===null){var O=u.type;return typeof O=="function"&&!iu(O)&&O.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=O,Iy(i,a,O,T,A)):(i=Pi(u.type,null,T,a,a.mode,A),i.ref=a.ref,i.return=a,a.child=i)}if(O=i.child,!IA(i,A)){var U=O.memoizedProps;if(u=u.compare,u=u!==null?u:Zo,u(U,T)&&i.ref===a.ref)return ao(i,a,A)}return a.flags|=1,i=gs(O,T),i.ref=a.ref,i.return=a,a.child=i}function Iy(i,a,u,T,A){if(i!==null){var O=i.memoizedProps;if(Zo(O,T)&&i.ref===a.ref)if(qn=!1,a.pendingProps=T=O,IA(i,A))(i.flags&131072)!==0&&(qn=!0);else return a.lanes=i.lanes,ao(i,a,A)}return pA(i,a,u,T,A)}function Ny(i,a,u,T){var A=T.children,O=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),T.mode==="hidden"){if((a.flags&128)!==0){if(O=O!==null?O.baseLanes|u:u,i!==null){for(T=a.child=i.child,A=0;T!==null;)A=A|T.lanes|T.childLanes,T=T.sibling;T=A&~O}else T=0,a.child=null;return Cy(i,a,O,u,T)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&lh(a,O!==null?O.cachePool:null),O!==null?LL(a,O):Xm(),yL(a);else return T=a.lanes=536870912,Cy(i,a,O!==null?O.baseLanes|u:u,u,T)}else O!==null?(lh(a,O.cachePool),LL(a,O),ca(),a.memoizedState=null):(i!==null&&lh(a,null),Xm(),ca());return Cr(i,a,A,u),a.child}function Af(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Cy(i,a,u,T,A){var O=Hm();return O=O===null?null:{parent:Kn._currentValue,pool:O},a.memoizedState={baseLanes:u,cachePool:O},i!==null&&lh(a,null),Xm(),yL(a),i!==null&&uu(i,a,T,!0),a.childLanes=A,null}function Nh(i,a){return a=_h({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function _y(i,a,u){return Bl(a,i.child,null,u),i=Nh(a,a.pendingProps),i.flags|=2,Is(a),a.memoizedState=null,i}function h2(i,a,u){var T=a.pendingProps,A=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(Wt){if(T.mode==="hidden")return i=Nh(a,T),a.lanes=536870912,Af(null,i);if(Km(a),(i=Cn)?(i=B0(i,js),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:ta!==null?{id:Di,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},u=ou(i),u.return=a,a.child=u,Ir=a,Cn=null)):i=null,i===null)throw ra(a);return a.lanes=536870912,null}return Nh(a,T)}var O=i.memoizedState;if(O!==null){var U=O.dehydrated;if(Km(a),A)if(a.flags&256)a.flags&=-257,a=_y(i,a,u);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(qn||uu(i,a,u,!1),A=(u&i.childLanes)!==0,qn||A){if(T=Sn,T!==null&&(U=Bn(T,u),U!==0&&U!==O.retryLane))throw O.retryLane=U,Vn(i,U),fs(T,i,U),hA;Uh(),a=_y(i,a,u)}else i=O.treeContext,Cn=$s(U.nextSibling),Ir=a,Wt=!0,na=null,js=!1,i!==null&&fL(a,i),a=Nh(a,T),a.flags|=4096;return a}return i=gs(i.child,{mode:T.mode,children:T.children}),i.ref=a.ref,a.child=i,i.return=a,i}function Ch(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function pA(i,a,u,T,A){return xl(a),u=qm(i,a,u,T,void 0,A),T=Jm(),i!==null&&!qn?(Qm(i,a,A),ao(i,a,A)):(Wt&&T&&Dm(a),a.flags|=1,Cr(i,a,u,A),a.child)}function Ly(i,a,u,T,A,O){return xl(a),a.updateQueue=null,u=PL(a,T,u,A),bL(i),T=Jm(),i!==null&&!qn?(Qm(i,a,O),ao(i,a,O)):(Wt&&T&&Dm(a),a.flags|=1,Cr(i,a,u,O),a.child)}function yy(i,a,u,T,A){if(xl(a),a.stateNode===null){var O=Kr,U=u.contextType;typeof U=="object"&&U!==null&&(O=Nr(U)),O=new u(T,O),a.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=dA,a.stateNode=O,O._reactInternals=a,O=a.stateNode,O.props=T,O.state=a.memoizedState,O.refs={},km(a),U=u.contextType,O.context=typeof U=="object"&&U!==null?Nr(U):Kr,O.state=a.memoizedState,U=u.getDerivedStateFromProps,typeof U=="function"&&(fA(a,u,U,T),O.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(U=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),U!==O.state&&dA.enqueueReplaceState(O,O.state,null),hf(a,T,O,A),Tf(),O.state=a.memoizedState),typeof O.componentDidMount=="function"&&(a.flags|=4194308),T=!0}else if(i===null){O=a.stateNode;var H=a.memoizedProps,te=Hl(u,H);O.props=te;var Re=O.context,Ne=u.contextType;U=Kr,typeof Ne=="object"&&Ne!==null&&(U=Nr(Ne));var De=u.getDerivedStateFromProps;Ne=typeof De=="function"||typeof O.getSnapshotBeforeUpdate=="function",H=a.pendingProps!==H,Ne||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H||Re!==U)&&Ty(a,O,T,U),ia=!1;var me=a.memoizedState;O.state=me,hf(a,T,O,A),Tf(),Re=a.memoizedState,H||me!==Re||ia?(typeof De=="function"&&(fA(a,u,De,T),Re=a.memoizedState),(te=ia||dy(a,u,te,T,me,Re,U))?(Ne||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(a.flags|=4194308)):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=T,a.memoizedState=Re),O.props=T,O.state=Re,O.context=U,T=te):(typeof O.componentDidMount=="function"&&(a.flags|=4194308),T=!1)}else{O=a.stateNode,Ym(i,a),U=a.memoizedProps,Ne=Hl(u,U),O.props=Ne,De=a.pendingProps,me=O.context,Re=u.contextType,te=Kr,typeof Re=="object"&&Re!==null&&(te=Nr(Re)),H=u.getDerivedStateFromProps,(Re=typeof H=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(U!==De||me!==te)&&Ty(a,O,T,te),ia=!1,me=a.memoizedState,O.state=me,hf(a,T,O,A),Tf();var Oe=a.memoizedState;U!==De||me!==Oe||ia||i!==null&&i.dependencies!==null&&oh(i.dependencies)?(typeof H=="function"&&(fA(a,u,H,T),Oe=a.memoizedState),(Ne=ia||dy(a,u,Ne,T,me,Oe,te)||i!==null&&i.dependencies!==null&&oh(i.dependencies))?(Re||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(T,Oe,te),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(T,Oe,te)),typeof O.componentDidUpdate=="function"&&(a.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof O.componentDidUpdate!="function"||U===i.memoizedProps&&me===i.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&me===i.memoizedState||(a.flags|=1024),a.memoizedProps=T,a.memoizedState=Oe),O.props=T,O.state=Oe,O.context=te,T=Ne):(typeof O.componentDidUpdate!="function"||U===i.memoizedProps&&me===i.memoizedState||(a.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||U===i.memoizedProps&&me===i.memoizedState||(a.flags|=1024),T=!1)}return O=T,Ch(i,a),T=(a.flags&128)!==0,O||T?(O=a.stateNode,u=T&&typeof u.getDerivedStateFromError!="function"?null:O.render(),a.flags|=1,i!==null&&T?(a.child=Bl(a,i.child,null,A),a.child=Bl(a,null,u,A)):Cr(i,a,u,A),a.memoizedState=O.state,i=a.child):i=ao(i,a,A),i}function by(i,a,u,T){return vl(),a.flags|=256,Cr(i,a,u,T),a.child}var RA={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function SA(i){return{baseLanes:i,cachePool:SL()}}function mA(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=Cs),i}function Py(i,a,u){var T=a.pendingProps,A=!1,O=(a.flags&128)!==0,U;if((U=O)||(U=i!==null&&i.memoizedState===null?!1:(kn.current&2)!==0),U&&(A=!0,a.flags&=-129),U=(a.flags&32)!==0,a.flags&=-33,i===null){if(Wt){if(A?la(a):ca(),(i=Cn)?(i=B0(i,js),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:ta!==null?{id:Di,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},u=ou(i),u.return=a,a.child=u,Ir=a,Cn=null)):i=null,i===null)throw ra(a);return tg(i)?a.lanes=32:a.lanes=536870912,null}var H=T.children;return T=T.fallback,A?(ca(),A=a.mode,H=_h({mode:"hidden",children:H},A),T=di(T,A,u,null),H.return=a,T.return=a,H.sibling=T,a.child=H,T=a.child,T.memoizedState=SA(u),T.childLanes=mA(i,U,u),a.memoizedState=RA,Af(null,T)):(la(a),AA(a,H))}var te=i.memoizedState;if(te!==null&&(H=te.dehydrated,H!==null)){if(O)a.flags&256?(la(a),a.flags&=-257,a=gA(i,a,u)):a.memoizedState!==null?(ca(),a.child=i.child,a.flags|=128,a=null):(ca(),H=T.fallback,A=a.mode,T=_h({mode:"visible",children:T.children},A),H=di(H,A,u,null),H.flags|=2,T.return=a,H.return=a,T.sibling=H,a.child=T,Bl(a,i.child,null,u),T=a.child,T.memoizedState=SA(u),T.childLanes=mA(i,U,u),a.memoizedState=RA,a=Af(null,T));else if(la(a),tg(H)){if(U=H.nextSibling&&H.nextSibling.dataset,U)var Re=U.dgst;U=Re,T=Error(r(419)),T.stack="",T.digest=U,lf({value:T,source:null,stack:null}),a=gA(i,a,u)}else if(qn||uu(i,a,u,!1),U=(u&i.childLanes)!==0,qn||U){if(U=Sn,U!==null&&(T=Bn(U,u),T!==0&&T!==te.retryLane))throw te.retryLane=T,Vn(i,T),fs(U,i,T),hA;eg(H)||Uh(),a=gA(i,a,u)}else eg(H)?(a.flags|=192,a.child=i.child,a=null):(i=te.treeContext,Cn=$s(H.nextSibling),Ir=a,Wt=!0,na=null,js=!1,i!==null&&fL(a,i),a=AA(a,T.children),a.flags|=4096);return a}return A?(ca(),H=T.fallback,A=a.mode,te=i.child,Re=te.sibling,T=gs(te,{mode:"hidden",children:T.children}),T.subtreeFlags=te.subtreeFlags&65011712,Re!==null?H=gs(Re,H):(H=di(H,A,u,null),H.flags|=2),H.return=a,T.return=a,T.sibling=H,a.child=T,Af(null,T),T=a.child,H=i.child.memoizedState,H===null?H=SA(u):(A=H.cachePool,A!==null?(te=Kn._currentValue,A=A.parent!==te?{parent:te,pool:te}:A):A=SL(),H={baseLanes:H.baseLanes|u,cachePool:A}),T.memoizedState=H,T.childLanes=mA(i,U,u),a.memoizedState=RA,Af(i.child,T)):(la(a),u=i.child,i=u.sibling,u=gs(u,{mode:"visible",children:T.children}),u.return=a,u.sibling=null,i!==null&&(U=a.deletions,U===null?(a.deletions=[i],a.flags|=16):U.push(i)),a.child=u,a.memoizedState=null,u)}function AA(i,a){return a=_h({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function _h(i,a){return i=un(22,i,null,a),i.lanes=0,i}function gA(i,a,u){return Bl(a,i.child,null,u),i=AA(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function Dy(i,a,u){i.lanes|=a;var T=i.alternate;T!==null&&(T.lanes|=a),wm(i.return,a,u)}function OA(i,a,u,T,A,O){var U=i.memoizedState;U===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:T,tail:u,tailMode:A,treeForkCount:O}:(U.isBackwards=a,U.rendering=null,U.renderingStartTime=0,U.last=T,U.tail=u,U.tailMode=A,U.treeForkCount=O)}function vy(i,a,u){var T=a.pendingProps,A=T.revealOrder,O=T.tail;T=T.children;var U=kn.current,H=(U&2)!==0;if(H?(U=U&1|2,a.flags|=128):U&=1,ue(kn,U),Cr(i,a,T,u),T=Wt?af:0,!H&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Dy(i,u,a);else if(i.tag===19)Dy(i,u,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(A){case"forwards":for(u=a.child,A=null;u!==null;)i=u.alternate,i!==null&&Th(i)===null&&(A=u),u=u.sibling;u=A,u===null?(A=a.child,a.child=null):(A=u.sibling,u.sibling=null),OA(a,!1,A,u,O,T);break;case"backwards":case"unstable_legacy-backwards":for(u=null,A=a.child,a.child=null;A!==null;){if(i=A.alternate,i!==null&&Th(i)===null){a.child=A;break}i=A.sibling,A.sibling=u,u=A,A=i}OA(a,!0,u,null,O,T);break;case"together":OA(a,!1,null,null,void 0,T);break;default:a.memoizedState=null}return a.child}function ao(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),fa|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(uu(i,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,u=gs(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=gs(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function IA(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&oh(i)))}function p2(i,a,u){switch(a.tag){case 3:ge(a,a.stateNode.containerInfo),sa(a,Kn,i.memoizedState.cache),vl();break;case 27:case 5:We(a);break;case 4:ge(a,a.stateNode.containerInfo);break;case 10:sa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Km(a),null;break;case 13:var T=a.memoizedState;if(T!==null)return T.dehydrated!==null?(la(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Py(i,a,u):(la(a),i=ao(i,a,u),i!==null?i.sibling:null);la(a);break;case 19:var A=(i.flags&128)!==0;if(T=(u&a.childLanes)!==0,T||(uu(i,a,u,!1),T=(u&a.childLanes)!==0),A){if(T)return vy(i,a,u);a.flags|=128}if(A=a.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),ue(kn,kn.current),T)break;return null;case 22:return a.lanes=0,Ny(i,a,u,a.pendingProps);case 24:sa(a,Kn,i.memoizedState.cache)}return ao(i,a,u)}function My(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)qn=!0;else{if(!IA(i,u)&&(a.flags&128)===0)return qn=!1,p2(i,a,u);qn=(i.flags&131072)!==0}else qn=!1,Wt&&(a.flags&1048576)!==0&&EL(a,af,a.index);switch(a.lanes=0,a.tag){case 16:e:{var T=a.pendingProps;if(i=wl(a.elementType),a.type=i,typeof i=="function")iu(i)?(T=Hl(i,T),a.tag=1,a=yy(null,a,i,T,u)):(a.tag=0,a=pA(null,a,i,T,u));else{if(i!=null){var A=i.$$typeof;if(A===N){a.tag=11,a=gy(null,a,i,T,u);break e}else if(A===M){a.tag=14,a=Oy(null,a,i,T,u);break e}}throw a=q(i)||i,Error(r(306,a,""))}}return a;case 0:return pA(i,a,a.type,a.pendingProps,u);case 1:return T=a.type,A=Hl(T,a.pendingProps),yy(i,a,T,A,u);case 3:e:{if(ge(a,a.stateNode.containerInfo),i===null)throw Error(r(387));T=a.pendingProps;var O=a.memoizedState;A=O.element,Ym(i,a),hf(a,T,null,u);var U=a.memoizedState;if(T=U.cache,sa(a,Kn,T),T!==O.cache&&Gm(a,[Kn],u,!0),Tf(),T=U.element,O.isDehydrated)if(O={element:T,isDehydrated:!1,cache:U.cache},a.updateQueue.baseState=O,a.memoizedState=O,a.flags&256){a=by(i,a,T,u);break e}else if(T!==A){A=ks(Error(r(424)),a),lf(A),a=by(i,a,T,u);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Cn=$s(i.firstChild),Ir=a,Wt=!0,na=null,js=!0,u=NL(a,null,T,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(vl(),T===A){a=ao(i,a,u);break e}Cr(i,a,T,u)}a=a.child}return a;case 26:return Ch(i,a),i===null?(u=W0(a.type,null,a.pendingProps,null))?a.memoizedState=u:Wt||(u=a.type,i=a.pendingProps,T=kh(se.current).createElement(u),T[Fn]=a,T[tr]=i,_r(T,u,i),$n(T),a.stateNode=T):a.memoizedState=W0(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return We(a),i===null&&Wt&&(T=a.stateNode=V0(a.type,a.pendingProps,se.current),Ir=a,js=!0,A=Cn,Ra(a.type)?(ng=A,Cn=$s(T.firstChild)):Cn=A),Cr(i,a,a.pendingProps.children,u),Ch(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&Wt&&((A=T=Cn)&&(T=X2(T,a.type,a.pendingProps,js),T!==null?(a.stateNode=T,Ir=a,Cn=$s(T.firstChild),js=!1,A=!0):A=!1),A||ra(a)),We(a),A=a.type,O=a.pendingProps,U=i!==null?i.memoizedProps:null,T=O.children,JA(A,O)?T=null:U!==null&&JA(A,U)&&(a.flags|=32),a.memoizedState!==null&&(A=qm(i,a,a2,null,null,u),Uf._currentValue=A),Ch(i,a),Cr(i,a,T,u),a.child;case 6:return i===null&&Wt&&((i=u=Cn)&&(u=$2(u,a.pendingProps,js),u!==null?(a.stateNode=u,Ir=a,Cn=null,i=!0):i=!1),i||ra(a)),null;case 13:return Py(i,a,u);case 4:return ge(a,a.stateNode.containerInfo),T=a.pendingProps,i===null?a.child=Bl(a,null,T,u):Cr(i,a,T,u),a.child;case 11:return gy(i,a,a.type,a.pendingProps,u);case 7:return Cr(i,a,a.pendingProps,u),a.child;case 8:return Cr(i,a,a.pendingProps.children,u),a.child;case 12:return Cr(i,a,a.pendingProps.children,u),a.child;case 10:return T=a.pendingProps,sa(a,a.type,T.value),Cr(i,a,T.children,u),a.child;case 9:return A=a.type._context,T=a.pendingProps.children,xl(a),A=Nr(A),T=T(A),a.flags|=1,Cr(i,a,T,u),a.child;case 14:return Oy(i,a,a.type,a.pendingProps,u);case 15:return Iy(i,a,a.type,a.pendingProps,u);case 19:return vy(i,a,u);case 31:return h2(i,a,u);case 22:return Ny(i,a,u,a.pendingProps);case 24:return xl(a),T=Nr(Kn),i===null?(A=Hm(),A===null&&(A=Sn,O=Bm(),A.pooledCache=O,O.refCount++,O!==null&&(A.pooledCacheLanes|=u),A=O),a.memoizedState={parent:T,cache:A},km(a),sa(a,Kn,A)):((i.lanes&u)!==0&&(Ym(i,a),hf(a,null,null,u),Tf()),A=i.memoizedState,O=a.memoizedState,A.parent!==T?(A={parent:T,cache:T},a.memoizedState=A,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=A),sa(a,Kn,T)):(T=O.cache,sa(a,Kn,T),T!==A.cache&&Gm(a,[Kn],u,!0))),Cr(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function lo(i){i.flags|=4}function NA(i,a,u,T,A){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(A&335544128)===A)if(i.stateNode.complete)i.flags|=8192;else if(o0())i.flags|=8192;else throw Gl=uh,Vm}else i.flags&=-16777217}function xy(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!z0(a))if(o0())i.flags|=8192;else throw Gl=uh,Vm}function Lh(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?er():536870912,i.lanes|=a,Ou|=a)}function gf(i,a){if(!Wt)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var T=null;u!==null;)u.alternate!==null&&(T=u),u=u.sibling;T===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:T.sibling=null}}function _n(i){var a=i.alternate!==null&&i.alternate.child===i.child,u=0,T=0;if(a)for(var A=i.child;A!==null;)u|=A.lanes|A.childLanes,T|=A.subtreeFlags&65011712,T|=A.flags&65011712,A.return=i,A=A.sibling;else for(A=i.child;A!==null;)u|=A.lanes|A.childLanes,T|=A.subtreeFlags,T|=A.flags,A.return=i,A=A.sibling;return i.subtreeFlags|=T,i.childLanes=u,a}function R2(i,a,u){var T=a.pendingProps;switch(vm(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _n(a),null;case 1:return _n(a),null;case 3:return u=a.stateNode,T=null,i!==null&&(T=i.memoizedState.cache),a.memoizedState.cache!==T&&(a.flags|=2048),so(Kn),Le(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(cu(a)?lo(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,xm())),_n(a),null;case 26:var A=a.type,O=a.memoizedState;return i===null?(lo(a),O!==null?(_n(a),xy(a,O)):(_n(a),NA(a,A,null,T,u))):O?O!==i.memoizedState?(lo(a),_n(a),xy(a,O)):(_n(a),a.flags&=-16777217):(i=i.memoizedProps,i!==T&&lo(a),_n(a),NA(a,A,i,T,u)),null;case 27:if(He(a),u=se.current,A=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==T&&lo(a);else{if(!T){if(a.stateNode===null)throw Error(r(166));return _n(a),null}i=le.current,cu(a)?dL(a):(i=V0(A,T,u),a.stateNode=i,lo(a))}return _n(a),null;case 5:if(He(a),A=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==T&&lo(a);else{if(!T){if(a.stateNode===null)throw Error(r(166));return _n(a),null}if(O=le.current,cu(a))dL(a);else{var U=kh(se.current);switch(O){case 1:O=U.createElementNS("http://www.w3.org/2000/svg",A);break;case 2:O=U.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;default:switch(A){case"svg":O=U.createElementNS("http://www.w3.org/2000/svg",A);break;case"math":O=U.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;case"script":O=U.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof T.is=="string"?U.createElement("select",{is:T.is}):U.createElement("select"),T.multiple?O.multiple=!0:T.size&&(O.size=T.size);break;default:O=typeof T.is=="string"?U.createElement(A,{is:T.is}):U.createElement(A)}}O[Fn]=a,O[tr]=T;e:for(U=a.child;U!==null;){if(U.tag===5||U.tag===6)O.appendChild(U.stateNode);else if(U.tag!==4&&U.tag!==27&&U.child!==null){U.child.return=U,U=U.child;continue}if(U===a)break e;for(;U.sibling===null;){if(U.return===null||U.return===a)break e;U=U.return}U.sibling.return=U.return,U=U.sibling}a.stateNode=O;e:switch(_r(O,A,T),A){case"button":case"input":case"select":case"textarea":T=!!T.autoFocus;break e;case"img":T=!0;break e;default:T=!1}T&&lo(a)}}return _n(a),NA(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,u),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==T&&lo(a);else{if(typeof T!="string"&&a.stateNode===null)throw Error(r(166));if(i=se.current,cu(a)){if(i=a.stateNode,u=a.memoizedProps,T=null,A=Ir,A!==null)switch(A.tag){case 27:case 5:T=A.memoizedProps}i[Fn]=a,i=!!(i.nodeValue===u||T!==null&&T.suppressHydrationWarning===!0||P0(i.nodeValue,u)),i||ra(a,!0)}else i=kh(i).createTextNode(T),i[Fn]=a,a.stateNode=i}return _n(a),null;case 31:if(u=a.memoizedState,i===null||i.memoizedState!==null){if(T=cu(a),u!==null){if(i===null){if(!T)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Fn]=a}else vl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;_n(a),i=!1}else u=xm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return a.flags&256?(Is(a),a):(Is(a),null);if((a.flags&128)!==0)throw Error(r(558))}return _n(a),null;case 13:if(T=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(A=cu(a),T!==null&&T.dehydrated!==null){if(i===null){if(!A)throw Error(r(318));if(A=a.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[Fn]=a}else vl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;_n(a),A=!1}else A=xm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=A),A=!0;if(!A)return a.flags&256?(Is(a),a):(Is(a),null)}return Is(a),(a.flags&128)!==0?(a.lanes=u,a):(u=T!==null,i=i!==null&&i.memoizedState!==null,u&&(T=a.child,A=null,T.alternate!==null&&T.alternate.memoizedState!==null&&T.alternate.memoizedState.cachePool!==null&&(A=T.alternate.memoizedState.cachePool.pool),O=null,T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(O=T.memoizedState.cachePool.pool),O!==A&&(T.flags|=2048)),u!==i&&u&&(a.child.flags|=8192),Lh(a,a.updateQueue),_n(a),null);case 4:return Le(),i===null&&XA(a.stateNode.containerInfo),_n(a),null;case 10:return so(a.type),_n(a),null;case 19:if(Q(kn),T=a.memoizedState,T===null)return _n(a),null;if(A=(a.flags&128)!==0,O=T.rendering,O===null)if(A)gf(T,!1);else{if(vn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(O=Th(i),O!==null){for(a.flags|=128,gf(T,!1),i=O.updateQueue,a.updateQueue=i,Lh(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)rf(u,i),u=u.sibling;return ue(kn,kn.current&1|2),Wt&&no(a,T.treeForkCount),a.child}i=i.sibling}T.tail!==null&&xe()>vh&&(a.flags|=128,A=!0,gf(T,!1),a.lanes=4194304)}else{if(!A)if(i=Th(O),i!==null){if(a.flags|=128,A=!0,i=i.updateQueue,a.updateQueue=i,Lh(a,i),gf(T,!0),T.tail===null&&T.tailMode==="hidden"&&!O.alternate&&!Wt)return _n(a),null}else 2*xe()-T.renderingStartTime>vh&&u!==536870912&&(a.flags|=128,A=!0,gf(T,!1),a.lanes=4194304);T.isBackwards?(O.sibling=a.child,a.child=O):(i=T.last,i!==null?i.sibling=O:a.child=O,T.last=O)}return T.tail!==null?(i=T.tail,T.rendering=i,T.tail=i.sibling,T.renderingStartTime=xe(),i.sibling=null,u=kn.current,ue(kn,A?u&1|2:u&1),Wt&&no(a,T.treeForkCount),i):(_n(a),null);case 22:case 23:return Is(a),$m(),T=a.memoizedState!==null,i!==null?i.memoizedState!==null!==T&&(a.flags|=8192):T&&(a.flags|=8192),T?(u&536870912)!==0&&(a.flags&128)===0&&(_n(a),a.subtreeFlags&6&&(a.flags|=8192)):_n(a),u=a.updateQueue,u!==null&&Lh(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),T=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(T=a.memoizedState.cachePool.pool),T!==u&&(a.flags|=2048),i!==null&&Q(Ul),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),so(Kn),_n(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function S2(i,a){switch(vm(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return so(Kn),Le(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return He(a),null;case 31:if(a.memoizedState!==null){if(Is(a),a.alternate===null)throw Error(r(340));vl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(Is(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));vl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return Q(kn),null;case 4:return Le(),null;case 10:return so(a.type),null;case 22:case 23:return Is(a),$m(),i!==null&&Q(Ul),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return so(Kn),null;case 25:return null;default:return null}}function Uy(i,a){switch(vm(a),a.tag){case 3:so(Kn),Le();break;case 26:case 27:case 5:He(a);break;case 4:Le();break;case 31:a.memoizedState!==null&&Is(a);break;case 13:Is(a);break;case 19:Q(kn);break;case 10:so(a.type);break;case 22:case 23:Is(a),$m(),i!==null&&Q(Ul);break;case 24:so(Kn)}}function Of(i,a){try{var u=a.updateQueue,T=u!==null?u.lastEffect:null;if(T!==null){var A=T.next;u=A;do{if((u.tag&i)===i){T=void 0;var O=u.create,U=u.inst;T=O(),U.destroy=T}u=u.next}while(u!==A)}}catch(H){on(a,a.return,H)}}function ua(i,a,u){try{var T=a.updateQueue,A=T!==null?T.lastEffect:null;if(A!==null){var O=A.next;T=O;do{if((T.tag&i)===i){var U=T.inst,H=U.destroy;if(H!==void 0){U.destroy=void 0,A=a;var te=u,Re=H;try{Re()}catch(Ne){on(A,te,Ne)}}}T=T.next}while(T!==O)}}catch(Ne){on(a,a.return,Ne)}}function wy(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{_L(a,u)}catch(T){on(i,i.return,T)}}}function Gy(i,a,u){u.props=Hl(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(T){on(i,a,T)}}function If(i,a){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var T=i.stateNode;break;case 30:T=i.stateNode;break;default:T=i.stateNode}typeof u=="function"?i.refCleanup=u(T):u.current=T}}catch(A){on(i,a,A)}}function Mi(i,a){var u=i.ref,T=i.refCleanup;if(u!==null)if(typeof T=="function")try{T()}catch(A){on(i,a,A)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(A){on(i,a,A)}else u.current=null}function By(i){var a=i.type,u=i.memoizedProps,T=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&T.focus();break e;case"img":u.src?T.src=u.src:u.srcSet&&(T.srcset=u.srcSet)}}catch(A){on(i,i.return,A)}}function CA(i,a,u){try{var T=i.stateNode;H2(T,i.type,u,a),T[tr]=a}catch(A){on(i,i.return,A)}}function Fy(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ra(i.type)||i.tag===4}function _A(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Fy(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ra(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function LA(i,a,u){var T=i.tag;if(T===5||T===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=li));else if(T!==4&&(T===27&&Ra(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(LA(i,a,u),i=i.sibling;i!==null;)LA(i,a,u),i=i.sibling}function yh(i,a,u){var T=i.tag;if(T===5||T===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(T!==4&&(T===27&&Ra(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(yh(i,a,u),i=i.sibling;i!==null;)yh(i,a,u),i=i.sibling}function Hy(i){var a=i.stateNode,u=i.memoizedProps;try{for(var T=i.type,A=a.attributes;A.length;)a.removeAttributeNode(A[0]);_r(a,T,u),a[Fn]=i,a[tr]=u}catch(O){on(i,i.return,O)}}var co=!1,Jn=!1,yA=!1,Vy=typeof WeakSet=="function"?WeakSet:Set,fr=null;function m2(i,a){if(i=i.containerInfo,zA=zh,i=rh(i),bl(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var T=u.getSelection&&u.getSelection();if(T&&T.rangeCount!==0){u=T.anchorNode;var A=T.anchorOffset,O=T.focusNode;T=T.focusOffset;try{u.nodeType,O.nodeType}catch{u=null;break e}var U=0,H=-1,te=-1,Re=0,Ne=0,De=i,me=null;t:for(;;){for(var Oe;De!==u||A!==0&&De.nodeType!==3||(H=U+A),De!==O||T!==0&&De.nodeType!==3||(te=U+T),De.nodeType===3&&(U+=De.nodeValue.length),(Oe=De.firstChild)!==null;)me=De,De=Oe;for(;;){if(De===i)break t;if(me===u&&++Re===A&&(H=U),me===O&&++Ne===T&&(te=U),(Oe=De.nextSibling)!==null)break;De=me,me=De.parentNode}De=Oe}u=H===-1||te===-1?null:{start:H,end:te}}else u=null}u=u||{start:0,end:0}}else u=null;for(qA={focusedElem:i,selectionRange:u},zh=!1,fr=a;fr!==null;)if(a=fr,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,fr=i;else for(;fr!==null;){switch(a=fr,O=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)A=i[u],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&O!==null){i=void 0,u=a,A=O.memoizedProps,O=O.memoizedState,T=u.stateNode;try{var et=Hl(u.type,A);i=T.getSnapshotBeforeUpdate(et,O),T.__reactInternalSnapshotBeforeUpdate=i}catch(dt){on(u,u.return,dt)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)ZA(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":ZA(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=a.sibling,i!==null){i.return=a.return,fr=i;break}fr=a.return}}function ky(i,a,u){var T=u.flags;switch(u.tag){case 0:case 11:case 15:Eo(i,u),T&4&&Of(5,u);break;case 1:if(Eo(i,u),T&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(U){on(u,u.return,U)}else{var A=Hl(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(A,a,i.__reactInternalSnapshotBeforeUpdate)}catch(U){on(u,u.return,U)}}T&64&&wy(u),T&512&&If(u,u.return);break;case 3:if(Eo(i,u),T&64&&(i=u.updateQueue,i!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{_L(i,a)}catch(U){on(u,u.return,U)}}break;case 27:a===null&&T&4&&Hy(u);case 26:case 5:Eo(i,u),a===null&&T&4&&By(u),T&512&&If(u,u.return);break;case 12:Eo(i,u);break;case 31:Eo(i,u),T&4&&jy(i,u);break;case 13:Eo(i,u),T&4&&Xy(i,u),T&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=y2.bind(null,u),K2(i,u))));break;case 22:if(T=u.memoizedState!==null||co,!T){a=a!==null&&a.memoizedState!==null||Jn,A=co;var O=Jn;co=T,(Jn=a)&&!O?fo(i,u,(u.subtreeFlags&8772)!==0):Eo(i,u),co=A,Jn=O}break;case 30:break;default:Eo(i,u)}}function Yy(i){var a=i.alternate;a!==null&&(i.alternate=null,Yy(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&GE(a)),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 bn=null,ls=!1;function uo(i,a,u){for(u=u.child;u!==null;)Wy(i,a,u),u=u.sibling}function Wy(i,a,u){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(zt,u)}catch{}switch(u.tag){case 26:Jn||Mi(u,a),uo(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Jn||Mi(u,a);var T=bn,A=ls;Ra(u.type)&&(bn=u.stateNode,ls=!1),uo(i,a,u),vf(u.stateNode),bn=T,ls=A;break;case 5:Jn||Mi(u,a);case 6:if(T=bn,A=ls,bn=null,uo(i,a,u),bn=T,ls=A,bn!==null)if(ls)try{(bn.nodeType===9?bn.body:bn.nodeName==="HTML"?bn.ownerDocument.body:bn).removeChild(u.stateNode)}catch(O){on(u,a,O)}else try{bn.removeChild(u.stateNode)}catch(O){on(u,a,O)}break;case 18:bn!==null&&(ls?(i=bn,w0(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Pu(i)):w0(bn,u.stateNode));break;case 4:T=bn,A=ls,bn=u.stateNode.containerInfo,ls=!0,uo(i,a,u),bn=T,ls=A;break;case 0:case 11:case 14:case 15:ua(2,u,a),Jn||ua(4,u,a),uo(i,a,u);break;case 1:Jn||(Mi(u,a),T=u.stateNode,typeof T.componentWillUnmount=="function"&&Gy(u,a,T)),uo(i,a,u);break;case 21:uo(i,a,u);break;case 22:Jn=(T=Jn)||u.memoizedState!==null,uo(i,a,u),Jn=T;break;default:uo(i,a,u)}}function jy(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Pu(i)}catch(u){on(a,a.return,u)}}}function Xy(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Pu(i)}catch(u){on(a,a.return,u)}}function A2(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new Vy),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new Vy),a;default:throw Error(r(435,i.tag))}}function bh(i,a){var u=A2(i);a.forEach(function(T){if(!u.has(T)){u.add(T);var A=b2.bind(null,i,T);T.then(A,A)}})}function cs(i,a){var u=a.deletions;if(u!==null)for(var T=0;T<u.length;T++){var A=u[T],O=i,U=a,H=U;e:for(;H!==null;){switch(H.tag){case 27:if(Ra(H.type)){bn=H.stateNode,ls=!1;break e}break;case 5:bn=H.stateNode,ls=!1;break e;case 3:case 4:bn=H.stateNode.containerInfo,ls=!0;break e}H=H.return}if(bn===null)throw Error(r(160));Wy(O,U,A),bn=null,ls=!1,O=A.alternate,O!==null&&(O.return=null),A.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)$y(a,i),a=a.sibling}var Ti=null;function $y(i,a){var u=i.alternate,T=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:cs(a,i),us(i),T&4&&(ua(3,i,i.return),Of(3,i),ua(5,i,i.return));break;case 1:cs(a,i),us(i),T&512&&(Jn||u===null||Mi(u,u.return)),T&64&&co&&(i=i.updateQueue,i!==null&&(T=i.callbacks,T!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?T:u.concat(T))));break;case 26:var A=Ti;if(cs(a,i),us(i),T&512&&(Jn||u===null||Mi(u,u.return)),T&4){var O=u!==null?u.memoizedState:null;if(T=i.memoizedState,u===null)if(T===null)if(i.stateNode===null){e:{T=i.type,u=i.memoizedProps,A=A.ownerDocument||A;t:switch(T){case"title":O=A.getElementsByTagName("title")[0],(!O||O[ko]||O[Fn]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=A.createElement(T),A.head.insertBefore(O,A.querySelector("head > title"))),_r(O,T,u),O[Fn]=i,$n(O),T=O;break e;case"link":var U=$0("link","href",A).get(T+(u.href||""));if(U){for(var H=0;H<U.length;H++)if(O=U[H],O.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&O.getAttribute("rel")===(u.rel==null?null:u.rel)&&O.getAttribute("title")===(u.title==null?null:u.title)&&O.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){U.splice(H,1);break t}}O=A.createElement(T),_r(O,T,u),A.head.appendChild(O);break;case"meta":if(U=$0("meta","content",A).get(T+(u.content||""))){for(H=0;H<U.length;H++)if(O=U[H],O.getAttribute("content")===(u.content==null?null:""+u.content)&&O.getAttribute("name")===(u.name==null?null:u.name)&&O.getAttribute("property")===(u.property==null?null:u.property)&&O.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&O.getAttribute("charset")===(u.charSet==null?null:u.charSet)){U.splice(H,1);break t}}O=A.createElement(T),_r(O,T,u),A.head.appendChild(O);break;default:throw Error(r(468,T))}O[Fn]=i,$n(O),T=O}i.stateNode=T}else K0(A,i.type,i.stateNode);else i.stateNode=X0(A,T,i.memoizedProps);else O!==T?(O===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):O.count--,T===null?K0(A,i.type,i.stateNode):X0(A,T,i.memoizedProps)):T===null&&i.stateNode!==null&&CA(i,i.memoizedProps,u.memoizedProps)}break;case 27:cs(a,i),us(i),T&512&&(Jn||u===null||Mi(u,u.return)),u!==null&&T&4&&CA(i,i.memoizedProps,u.memoizedProps);break;case 5:if(cs(a,i),us(i),T&512&&(Jn||u===null||Mi(u,u.return)),i.flags&32){A=i.stateNode;try{$o(A,"")}catch(et){on(i,i.return,et)}}T&4&&i.stateNode!=null&&(A=i.memoizedProps,CA(i,A,u!==null?u.memoizedProps:A)),T&1024&&(yA=!0);break;case 6:if(cs(a,i),us(i),T&4){if(i.stateNode===null)throw Error(r(162));T=i.memoizedProps,u=i.stateNode;try{u.nodeValue=T}catch(et){on(i,i.return,et)}}break;case 3:if(jh=null,A=Ti,Ti=Yh(a.containerInfo),cs(a,i),Ti=A,us(i),T&4&&u!==null&&u.memoizedState.isDehydrated)try{Pu(a.containerInfo)}catch(et){on(i,i.return,et)}yA&&(yA=!1,Ky(i));break;case 4:T=Ti,Ti=Yh(i.stateNode.containerInfo),cs(a,i),us(i),Ti=T;break;case 12:cs(a,i),us(i);break;case 31:cs(a,i),us(i),T&4&&(T=i.updateQueue,T!==null&&(i.updateQueue=null,bh(i,T)));break;case 13:cs(a,i),us(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Dh=xe()),T&4&&(T=i.updateQueue,T!==null&&(i.updateQueue=null,bh(i,T)));break;case 22:A=i.memoizedState!==null;var te=u!==null&&u.memoizedState!==null,Re=co,Ne=Jn;if(co=Re||A,Jn=Ne||te,cs(a,i),Jn=Ne,co=Re,us(i),T&8192)e:for(a=i.stateNode,a._visibility=A?a._visibility&-2:a._visibility|1,A&&(u===null||te||co||Jn||Vl(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){te=u=a;try{if(O=te.stateNode,A)U=O.style,typeof U.setProperty=="function"?U.setProperty("display","none","important"):U.display="none";else{H=te.stateNode;var De=te.memoizedProps.style,me=De!=null&&De.hasOwnProperty("display")?De.display:null;H.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(et){on(te,te.return,et)}}}else if(a.tag===6){if(u===null){te=a;try{te.stateNode.nodeValue=A?"":te.memoizedProps}catch(et){on(te,te.return,et)}}}else if(a.tag===18){if(u===null){te=a;try{var Oe=te.stateNode;A?G0(Oe,!0):G0(te.stateNode,!1)}catch(et){on(te,te.return,et)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}T&4&&(T=i.updateQueue,T!==null&&(u=T.retryQueue,u!==null&&(T.retryQueue=null,bh(i,u))));break;case 19:cs(a,i),us(i),T&4&&(T=i.updateQueue,T!==null&&(i.updateQueue=null,bh(i,T)));break;case 30:break;case 21:break;default:cs(a,i),us(i)}}function us(i){var a=i.flags;if(a&2){try{for(var u,T=i.return;T!==null;){if(Fy(T)){u=T;break}T=T.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var A=u.stateNode,O=_A(i);yh(i,O,A);break;case 5:var U=u.stateNode;u.flags&32&&($o(U,""),u.flags&=-33);var H=_A(i);yh(i,H,U);break;case 3:case 4:var te=u.stateNode.containerInfo,Re=_A(i);LA(i,Re,te);break;default:throw Error(r(161))}}catch(Ne){on(i,i.return,Ne)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function Ky(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;Ky(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Eo(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)ky(i,a.alternate,a),a=a.sibling}function Vl(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:ua(4,a,a.return),Vl(a);break;case 1:Mi(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&Gy(a,a.return,u),Vl(a);break;case 27:vf(a.stateNode);case 26:case 5:Mi(a,a.return),Vl(a);break;case 22:a.memoizedState===null&&Vl(a);break;case 30:Vl(a);break;default:Vl(a)}i=i.sibling}}function fo(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var T=a.alternate,A=i,O=a,U=O.flags;switch(O.tag){case 0:case 11:case 15:fo(A,O,u),Of(4,O);break;case 1:if(fo(A,O,u),T=O,A=T.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(Re){on(T,T.return,Re)}if(T=O,A=T.updateQueue,A!==null){var H=T.stateNode;try{var te=A.shared.hiddenCallbacks;if(te!==null)for(A.shared.hiddenCallbacks=null,A=0;A<te.length;A++)CL(te[A],H)}catch(Re){on(T,T.return,Re)}}u&&U&64&&wy(O),If(O,O.return);break;case 27:Hy(O);case 26:case 5:fo(A,O,u),u&&T===null&&U&4&&By(O),If(O,O.return);break;case 12:fo(A,O,u);break;case 31:fo(A,O,u),u&&U&4&&jy(A,O);break;case 13:fo(A,O,u),u&&U&4&&Xy(A,O);break;case 22:O.memoizedState===null&&fo(A,O,u),If(O,O.return);break;case 30:break;default:fo(A,O,u)}a=a.sibling}}function bA(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&cf(u))}function PA(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&cf(i))}function hi(i,a,u,T){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zy(i,a,u,T),a=a.sibling}function zy(i,a,u,T){var A=a.flags;switch(a.tag){case 0:case 11:case 15:hi(i,a,u,T),A&2048&&Of(9,a);break;case 1:hi(i,a,u,T);break;case 3:hi(i,a,u,T),A&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&cf(i)));break;case 12:if(A&2048){hi(i,a,u,T),i=a.stateNode;try{var O=a.memoizedProps,U=O.id,H=O.onPostCommit;typeof H=="function"&&H(U,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(te){on(a,a.return,te)}}else hi(i,a,u,T);break;case 31:hi(i,a,u,T);break;case 13:hi(i,a,u,T);break;case 23:break;case 22:O=a.stateNode,U=a.alternate,a.memoizedState!==null?O._visibility&2?hi(i,a,u,T):Nf(i,a):O._visibility&2?hi(i,a,u,T):(O._visibility|=2,mu(i,a,u,T,(a.subtreeFlags&10256)!==0||!1)),A&2048&&bA(U,a);break;case 24:hi(i,a,u,T),A&2048&&PA(a.alternate,a);break;default:hi(i,a,u,T)}}function mu(i,a,u,T,A){for(A=A&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var O=i,U=a,H=u,te=T,Re=U.flags;switch(U.tag){case 0:case 11:case 15:mu(O,U,H,te,A),Of(8,U);break;case 23:break;case 22:var Ne=U.stateNode;U.memoizedState!==null?Ne._visibility&2?mu(O,U,H,te,A):Nf(O,U):(Ne._visibility|=2,mu(O,U,H,te,A)),A&&Re&2048&&bA(U.alternate,U);break;case 24:mu(O,U,H,te,A),A&&Re&2048&&PA(U.alternate,U);break;default:mu(O,U,H,te,A)}a=a.sibling}}function Nf(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,T=a,A=T.flags;switch(T.tag){case 22:Nf(u,T),A&2048&&bA(T.alternate,T);break;case 24:Nf(u,T),A&2048&&PA(T.alternate,T);break;default:Nf(u,T)}a=a.sibling}}var Cf=8192;function Au(i,a,u){if(i.subtreeFlags&Cf)for(i=i.child;i!==null;)qy(i,a,u),i=i.sibling}function qy(i,a,u){switch(i.tag){case 26:Au(i,a,u),i.flags&Cf&&i.memoizedState!==null&&oV(u,Ti,i.memoizedState,i.memoizedProps);break;case 5:Au(i,a,u);break;case 3:case 4:var T=Ti;Ti=Yh(i.stateNode.containerInfo),Au(i,a,u),Ti=T;break;case 22:i.memoizedState===null&&(T=i.alternate,T!==null&&T.memoizedState!==null?(T=Cf,Cf=16777216,Au(i,a,u),Cf=T):Au(i,a,u));break;default:Au(i,a,u)}}function Jy(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function _f(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var T=a[u];fr=T,Zy(T,i)}Jy(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Qy(i),i=i.sibling}function Qy(i){switch(i.tag){case 0:case 11:case 15:_f(i),i.flags&2048&&ua(9,i,i.return);break;case 3:_f(i);break;case 12:_f(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Ph(i)):_f(i);break;default:_f(i)}}function Ph(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var T=a[u];fr=T,Zy(T,i)}Jy(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:ua(8,a,a.return),Ph(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Ph(a));break;default:Ph(a)}i=i.sibling}}function Zy(i,a){for(;fr!==null;){var u=fr;switch(u.tag){case 0:case 11:case 15:ua(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var T=u.memoizedState.cachePool.pool;T!=null&&T.refCount++}break;case 24:cf(u.memoizedState.cache)}if(T=u.child,T!==null)T.return=u,fr=T;else e:for(u=i;fr!==null;){T=fr;var A=T.sibling,O=T.return;if(Yy(T),T===u){fr=null;break e}if(A!==null){A.return=O,fr=A;break e}fr=O}}}var g2={getCacheForType:function(i){var a=Nr(Kn),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u},cacheSignal:function(){return Nr(Kn).controller.signal}},O2=typeof WeakMap=="function"?WeakMap:Map,tn=0,Sn=null,Bt=null,Vt=0,sn=0,Ns=null,Ea=!1,gu=!1,DA=!1,To=0,vn=0,fa=0,kl=0,vA=0,Cs=0,Ou=0,Lf=null,Es=null,MA=!1,Dh=0,e0=0,vh=1/0,Mh=null,da=null,nr=0,Ta=null,Iu=null,ho=0,xA=0,UA=null,t0=null,yf=0,wA=null;function _s(){return(tn&2)!==0&&Vt!==0?Vt&-Vt:k.T!==null?kA():Xr()}function n0(){if(Cs===0)if((Vt&536870912)===0||Wt){var i=hn;hn<<=1,(hn&3932160)===0&&(hn=262144),Cs=i}else Cs=536870912;return i=Os.current,i!==null&&(i.flags|=32),Cs}function fs(i,a,u){(i===Sn&&(sn===2||sn===9)||i.cancelPendingCommit!==null)&&(Nu(i,0),ha(i,Vt,Cs,!1)),ur(i,u),((tn&2)===0||i!==Sn)&&(i===Sn&&((tn&2)===0&&(kl|=u),vn===4&&ha(i,Vt,Cs,!1)),xi(i))}function r0(i,a,u){if((tn&6)!==0)throw Error(r(327));var T=!u&&(a&127)===0&&(a&i.expiredLanes)===0||Gn(i,a),A=T?C2(i,a):BA(i,a,!0),O=T;do{if(A===0){gu&&!T&&ha(i,a,0,!1);break}else{if(u=i.current.alternate,O&&!I2(u)){A=BA(i,a,!1),O=!1;continue}if(A===2){if(O=a,i.errorRecoveryDisabledLanes&O)var U=0;else U=i.pendingLanes&-536870913,U=U!==0?U:U&536870912?536870912:0;if(U!==0){a=U;e:{var H=i;A=Lf;var te=H.current.memoizedState.isDehydrated;if(te&&(Nu(H,U).flags|=256),U=BA(H,U,!1),U!==2){if(DA&&!te){H.errorRecoveryDisabledLanes|=O,kl|=O,A=4;break e}O=Es,Es=A,O!==null&&(Es===null?Es=O:Es.push.apply(Es,O))}A=U}if(O=!1,A!==2)continue}}if(A===1){Nu(i,0),ha(i,a,0,!0);break}e:{switch(T=i,O=A,O){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:ha(T,a,Cs,!Ea);break e;case 2:Es=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(A=Dh+300-xe(),10<A)){if(ha(T,a,Cs,!Ea),An(T,0,!0)!==0)break e;ho=a,T.timeoutHandle=x0(s0.bind(null,T,u,Es,Mh,MA,a,Cs,kl,Ou,Ea,O,"Throttled",-0,0),A);break e}s0(T,u,Es,Mh,MA,a,Cs,kl,Ou,Ea,O,null,-0,0)}}break}while(!0);xi(i)}function s0(i,a,u,T,A,O,U,H,te,Re,Ne,De,me,Oe){if(i.timeoutHandle=-1,De=a.subtreeFlags,De&8192||(De&16785408)===16785408){De={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:li},qy(a,O,De);var et=(O&62914560)===O?Dh-xe():(O&4194048)===O?e0-xe():0;if(et=aV(De,et),et!==null){ho=O,i.cancelPendingCommit=et(f0.bind(null,i,a,O,u,T,A,U,H,te,Ne,De,null,me,Oe)),ha(i,O,U,!Re);return}}f0(i,a,O,u,T,A,U,H,te)}function I2(i){for(var a=i;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var T=0;T<u.length;T++){var A=u[T],O=A.getSnapshot;A=A.value;try{if(!Ur(O(),A))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ha(i,a,u,T){a&=~vA,a&=~kl,i.suspendedLanes|=a,i.pingedLanes&=~a,T&&(i.warmLanes|=a),T=i.expirationTimes;for(var A=a;0<A;){var O=31-$t(A),U=1<<O;T[O]=-1,A&=~U}u!==0&&pn(i,u,a)}function xh(){return(tn&6)===0?(bf(0),!1):!0}function GA(){if(Bt!==null){if(sn===0)var i=Bt.return;else i=Bt,ro=Ml=null,Zm(i),Tu=null,Ef=0,i=Bt;for(;i!==null;)Uy(i.alternate,i),i=i.return;Bt=null}}function Nu(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,Y2(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ho=0,GA(),Sn=i,Bt=u=gs(i.current,null),Vt=a,sn=0,Ns=null,Ea=!1,gu=Gn(i,a),DA=!1,Ou=Cs=vA=kl=fa=vn=0,Es=Lf=null,MA=!1,(a&8)!==0&&(a|=a&32);var T=i.entangledLanes;if(T!==0)for(i=i.entanglements,T&=a;0<T;){var A=31-$t(T),O=1<<A;a|=i[A],T&=~O}return To=a,_t(),u}function i0(i,a){Lt=null,k.H=mf,a===du||a===ch?(a=gL(),sn=3):a===Vm?(a=gL(),sn=4):sn=a===hA?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ns=a,Bt===null&&(vn=1,Ih(i,ks(a,i.current)))}function o0(){var i=Os.current;return i===null?!0:(Vt&4194048)===Vt?Xs===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?i===Xs:!1}function a0(){var i=k.H;return k.H=mf,i===null?mf:i}function l0(){var i=k.A;return k.A=g2,i}function Uh(){vn=4,Ea||(Vt&4194048)!==Vt&&Os.current!==null||(gu=!0),(fa&134217727)===0&&(kl&134217727)===0||Sn===null||ha(Sn,Vt,Cs,!1)}function BA(i,a,u){var T=tn;tn|=2;var A=a0(),O=l0();(Sn!==i||Vt!==a)&&(Mh=null,Nu(i,a)),a=!1;var U=vn;e:do try{if(sn!==0&&Bt!==null){var H=Bt,te=Ns;switch(sn){case 8:GA(),U=6;break e;case 3:case 2:case 9:case 6:Os.current===null&&(a=!0);var Re=sn;if(sn=0,Ns=null,Cu(i,H,te,Re),u&&gu){U=0;break e}break;default:Re=sn,sn=0,Ns=null,Cu(i,H,te,Re)}}N2(),U=vn;break}catch(Ne){i0(i,Ne)}while(!0);return a&&i.shellSuspendCounter++,ro=Ml=null,tn=T,k.H=A,k.A=O,Bt===null&&(Sn=null,Vt=0,_t()),U}function N2(){for(;Bt!==null;)c0(Bt)}function C2(i,a){var u=tn;tn|=2;var T=a0(),A=l0();Sn!==i||Vt!==a?(Mh=null,vh=xe()+500,Nu(i,a)):gu=Gn(i,a);e:do try{if(sn!==0&&Bt!==null){a=Bt;var O=Ns;t:switch(sn){case 1:sn=0,Ns=null,Cu(i,a,O,1);break;case 2:case 9:if(mL(O)){sn=0,Ns=null,u0(a);break}a=function(){sn!==2&&sn!==9||Sn!==i||(sn=7),xi(i)},O.then(a,a);break e;case 3:sn=7;break e;case 4:sn=5;break e;case 7:mL(O)?(sn=0,Ns=null,u0(a)):(sn=0,Ns=null,Cu(i,a,O,7));break;case 5:var U=null;switch(Bt.tag){case 26:U=Bt.memoizedState;case 5:case 27:var H=Bt;if(U?z0(U):H.stateNode.complete){sn=0,Ns=null;var te=H.sibling;if(te!==null)Bt=te;else{var Re=H.return;Re!==null?(Bt=Re,wh(Re)):Bt=null}break t}}sn=0,Ns=null,Cu(i,a,O,5);break;case 6:sn=0,Ns=null,Cu(i,a,O,6);break;case 8:GA(),vn=6;break e;default:throw Error(r(462))}}_2();break}catch(Ne){i0(i,Ne)}while(!0);return ro=Ml=null,k.H=T,k.A=A,tn=u,Bt!==null?0:(Sn=null,Vt=0,_t(),vn)}function _2(){for(;Bt!==null&&!Ie();)c0(Bt)}function c0(i){var a=My(i.alternate,i,To);i.memoizedProps=i.pendingProps,a===null?wh(i):Bt=a}function u0(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=Ly(u,a,a.pendingProps,a.type,void 0,Vt);break;case 11:a=Ly(u,a,a.pendingProps,a.type.render,a.ref,Vt);break;case 5:Zm(a);default:Uy(u,a),a=Bt=rf(a,To),a=My(u,a,To)}i.memoizedProps=i.pendingProps,a===null?wh(i):Bt=a}function Cu(i,a,u,T){ro=Ml=null,Zm(a),Tu=null,Ef=0;var A=a.return;try{if(T2(i,A,a,u,Vt)){vn=1,Ih(i,ks(u,i.current)),Bt=null;return}}catch(O){if(A!==null)throw Bt=A,O;vn=1,Ih(i,ks(u,i.current)),Bt=null;return}a.flags&32768?(Wt||T===1?i=!0:gu||(Vt&536870912)!==0?i=!1:(Ea=i=!0,(T===2||T===9||T===3||T===6)&&(T=Os.current,T!==null&&T.tag===13&&(T.flags|=16384))),E0(a,i)):wh(a)}function wh(i){var a=i;do{if((a.flags&32768)!==0){E0(a,Ea);return}i=a.return;var u=R2(a.alternate,a,To);if(u!==null){Bt=u;return}if(a=a.sibling,a!==null){Bt=a;return}Bt=a=i}while(a!==null);vn===0&&(vn=5)}function E0(i,a){do{var u=S2(i.alternate,i);if(u!==null){u.flags&=32767,Bt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){Bt=i;return}Bt=i=u}while(i!==null);vn=6,Bt=null}function f0(i,a,u,T,A,O,U,H,te){i.cancelPendingCommit=null;do Gh();while(nr!==0);if((tn&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(O=a.lanes|a.childLanes,O|=lt,Ot(i,u,O,U,H,te),i===Sn&&(Bt=Sn=null,Vt=0),Iu=a,Ta=i,ho=u,xA=O,UA=A,t0=T,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,P2(Ut,function(){return R0(),null})):(i.callbackNode=null,i.callbackPriority=0),T=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||T){T=k.T,k.T=null,A=z.p,z.p=2,U=tn,tn|=4;try{m2(i,a,u)}finally{tn=U,z.p=A,k.T=T}}nr=1,d0(),T0(),h0()}}function d0(){if(nr===1){nr=0;var i=Ta,a=Iu,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=k.T,k.T=null;var T=z.p;z.p=2;var A=tn;tn|=4;try{$y(a,i);var O=qA,U=rh(i.containerInfo),H=O.focusedElem,te=O.selectionRange;if(U!==H&&H&&H.ownerDocument&&ef(H.ownerDocument.documentElement,H)){if(te!==null&&bl(H)){var Re=te.start,Ne=te.end;if(Ne===void 0&&(Ne=Re),"selectionStart"in H)H.selectionStart=Re,H.selectionEnd=Math.min(Ne,H.value.length);else{var De=H.ownerDocument||document,me=De&&De.defaultView||window;if(me.getSelection){var Oe=me.getSelection(),et=H.textContent.length,dt=Math.min(te.start,et),dn=te.end===void 0?dt:Math.min(te.end,et);!Oe.extend&&dt>dn&&(U=dn,dn=dt,dt=U);var Ee=nh(H,dt),ae=nh(H,dn);if(Ee&&ae&&(Oe.rangeCount!==1||Oe.anchorNode!==Ee.node||Oe.anchorOffset!==Ee.offset||Oe.focusNode!==ae.node||Oe.focusOffset!==ae.offset)){var pe=De.createRange();pe.setStart(Ee.node,Ee.offset),Oe.removeAllRanges(),dt>dn?(Oe.addRange(pe),Oe.extend(ae.node,ae.offset)):(pe.setEnd(ae.node,ae.offset),Oe.addRange(pe))}}}}for(De=[],Oe=H;Oe=Oe.parentNode;)Oe.nodeType===1&&De.push({element:Oe,left:Oe.scrollLeft,top:Oe.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<De.length;H++){var ye=De[H];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}zh=!!zA,qA=zA=null}finally{tn=A,z.p=T,k.T=u}}i.current=a,nr=2}}function T0(){if(nr===2){nr=0;var i=Ta,a=Iu,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=k.T,k.T=null;var T=z.p;z.p=2;var A=tn;tn|=4;try{ky(i,a.alternate,a)}finally{tn=A,z.p=T,k.T=u}}nr=3}}function h0(){if(nr===4||nr===3){nr=0,Pe();var i=Ta,a=Iu,u=ho,T=t0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?nr=5:(nr=0,Iu=Ta=null,p0(i,i.pendingLanes));var A=i.pendingLanes;if(A===0&&(da=null),Er(u),a=a.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(zt,a,void 0,(a.current.flags&128)===128)}catch{}if(T!==null){a=k.T,A=z.p,z.p=2,k.T=null;try{for(var O=i.onRecoverableError,U=0;U<T.length;U++){var H=T[U];O(H.value,{componentStack:H.stack})}}finally{k.T=a,z.p=A}}(ho&3)!==0&&Gh(),xi(i),A=i.pendingLanes,(u&261930)!==0&&(A&42)!==0?i===wA?yf++:(yf=0,wA=i):yf=0,bf(0)}}function p0(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,cf(a)))}function Gh(){return d0(),T0(),h0(),R0()}function R0(){if(nr!==5)return!1;var i=Ta,a=xA;xA=0;var u=Er(ho),T=k.T,A=z.p;try{z.p=32>u?32:u,k.T=null,u=UA,UA=null;var O=Ta,U=ho;if(nr=0,Iu=Ta=null,ho=0,(tn&6)!==0)throw Error(r(331));var H=tn;if(tn|=4,Qy(O.current),zy(O,O.current,U,u),tn=H,bf(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(zt,O)}catch{}return!0}finally{z.p=A,k.T=T,p0(i,a)}}function S0(i,a,u){a=ks(u,a),a=TA(i.stateNode,a,2),i=aa(i,a,2),i!==null&&(ur(i,2),xi(i))}function on(i,a,u){if(i.tag===3)S0(i,i,u);else for(;a!==null;){if(a.tag===3){S0(a,i,u);break}else if(a.tag===1){var T=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(da===null||!da.has(T))){i=ks(u,i),u=my(2),T=aa(a,u,2),T!==null&&(Ay(u,T,a,i),ur(T,2),xi(T));break}}a=a.return}}function FA(i,a,u){var T=i.pingCache;if(T===null){T=i.pingCache=new O2;var A=new Set;T.set(a,A)}else A=T.get(a),A===void 0&&(A=new Set,T.set(a,A));A.has(u)||(DA=!0,A.add(u),i=L2.bind(null,i,a,u),a.then(i,i))}function L2(i,a,u){var T=i.pingCache;T!==null&&T.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Sn===i&&(Vt&u)===u&&(vn===4||vn===3&&(Vt&62914560)===Vt&&300>xe()-Dh?(tn&2)===0&&Nu(i,0):vA|=u,Ou===Vt&&(Ou=0)),xi(i)}function m0(i,a){a===0&&(a=er()),i=Vn(i,a),i!==null&&(ur(i,a),xi(i))}function y2(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),m0(i,u)}function b2(i,a){var u=0;switch(i.tag){case 31:case 13:var T=i.stateNode,A=i.memoizedState;A!==null&&(u=A.retryLane);break;case 19:T=i.stateNode;break;case 22:T=i.stateNode._retryCache;break;default:throw Error(r(314))}T!==null&&T.delete(a),m0(i,u)}function P2(i,a){return Ce(i,a)}var Bh=null,_u=null,HA=!1,Fh=!1,VA=!1,pa=0;function xi(i){i!==_u&&i.next===null&&(_u===null?Bh=_u=i:_u=_u.next=i),Fh=!0,HA||(HA=!0,v2())}function bf(i,a){if(!VA&&Fh){VA=!0;do for(var u=!1,T=Bh;T!==null;){if(i!==0){var A=T.pendingLanes;if(A===0)var O=0;else{var U=T.suspendedLanes,H=T.pingedLanes;O=(1<<31-$t(42|i)+1)-1,O&=A&~(U&~H),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(u=!0,I0(T,O))}else O=Vt,O=An(T,T===Sn?O:0,T.cancelPendingCommit!==null||T.timeoutHandle!==-1),(O&3)===0||Gn(T,O)||(u=!0,I0(T,O));T=T.next}while(u);VA=!1}}function D2(){A0()}function A0(){Fh=HA=!1;var i=0;pa!==0&&k2()&&(i=pa);for(var a=xe(),u=null,T=Bh;T!==null;){var A=T.next,O=g0(T,a);O===0?(T.next=null,u===null?Bh=A:u.next=A,A===null&&(_u=u)):(u=T,(i!==0||(O&3)!==0)&&(Fh=!0)),T=A}nr!==0&&nr!==5||bf(i),pa!==0&&(pa=0)}function g0(i,a){for(var u=i.suspendedLanes,T=i.pingedLanes,A=i.expirationTimes,O=i.pendingLanes&-62914561;0<O;){var U=31-$t(O),H=1<<U,te=A[U];te===-1?((H&u)===0||(H&T)!==0)&&(A[U]=is(H,a)):te<=a&&(i.expiredLanes|=H),O&=~H}if(a=Sn,u=Vt,u=An(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),T=i.callbackNode,u===0||i===a&&(sn===2||sn===9)||i.cancelPendingCommit!==null)return T!==null&&T!==null&&oe(T),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Gn(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(T!==null&&oe(T),Er(u)){case 2:case 8:u=Xt;break;case 32:u=Ut;break;case 268435456:u=Dt;break;default:u=Ut}return T=O0.bind(null,i),u=Ce(u,T),i.callbackPriority=a,i.callbackNode=u,a}return T!==null&&T!==null&&oe(T),i.callbackPriority=2,i.callbackNode=null,2}function O0(i,a){if(nr!==0&&nr!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Gh()&&i.callbackNode!==u)return null;var T=Vt;return T=An(i,i===Sn?T:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),T===0?null:(r0(i,T,a),g0(i,xe()),i.callbackNode!=null&&i.callbackNode===u?O0.bind(null,i):null)}function I0(i,a){if(Gh())return null;r0(i,a,!0)}function v2(){W2(function(){(tn&6)!==0?Ce(Et,D2):A0()})}function kA(){if(pa===0){var i=Eu;i===0&&(i=Jt,Jt<<=1,(Jt&261888)===0&&(Jt=256)),pa=i}return pa}function N0(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:zc(""+i)}function C0(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function M2(i,a,u,T,A){if(a==="submit"&&u&&u.stateNode===A){var O=N0((A[tr]||null).action),U=T.submitter;U&&(a=(a=U[tr]||null)?N0(a.formAction):U.getAttribute("formAction"),a!==null&&(O=a,U=null));var H=new eu("action","action",null,T,A);i.push({event:H,listeners:[{instance:null,listener:function(){if(T.defaultPrevented){if(pa!==0){var te=U?C0(A,U):new FormData(A);lA(u,{pending:!0,data:te,method:A.method,action:O},null,te)}}else typeof O=="function"&&(H.preventDefault(),te=U?C0(A,U):new FormData(A),lA(u,{pending:!0,data:te,method:A.method,action:O},O,te))},currentTarget:A}]})}}for(var YA=0;YA<je.length;YA++){var WA=je[YA],x2=WA.toLowerCase(),U2=WA[0].toUpperCase()+WA.slice(1);Ke(x2,"on"+U2)}Ke(G,"onAnimationEnd"),Ke(J,"onAnimationIteration"),Ke(re,"onAnimationStart"),Ke("dblclick","onDoubleClick"),Ke("focusin","onFocus"),Ke("focusout","onBlur"),Ke(ce,"onTransitionRun"),Ke(ee,"onTransitionStart"),Ke(de,"onTransitionCancel"),Ke(Ae,"onTransitionEnd"),Xo("onMouseEnter",["mouseout","mouseover"]),Xo("onMouseLeave",["mouseout","mouseover"]),Xo("onPointerEnter",["pointerout","pointerover"]),Xo("onPointerLeave",["pointerout","pointerover"]),Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pf="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(" "),w2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pf));function _0(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var T=i[u],A=T.event;T=T.listeners;e:{var O=void 0;if(a)for(var U=T.length-1;0<=U;U--){var H=T[U],te=H.instance,Re=H.currentTarget;if(H=H.listener,te!==O&&A.isPropagationStopped())break e;O=H,A.currentTarget=Re;try{O(A)}catch(Ne){ze(Ne)}A.currentTarget=null,O=te}else for(U=0;U<T.length;U++){if(H=T[U],te=H.instance,Re=H.currentTarget,H=H.listener,te!==O&&A.isPropagationStopped())break e;O=H,A.currentTarget=Re;try{O(A)}catch(Ne){ze(Ne)}A.currentTarget=null,O=te}}}}function Ft(i,a){var u=a[Vo];u===void 0&&(u=a[Vo]=new Set);var T=i+"__bubble";u.has(T)||(L0(a,i,2,!1),u.add(T))}function jA(i,a,u){var T=0;a&&(T|=4),L0(u,i,T,a)}var Hh="_reactListening"+Math.random().toString(36).slice(2);function XA(i){if(!i[Hh]){i[Hh]=!0,BE.forEach(function(u){u!=="selectionchange"&&(w2.has(u)||jA(u,!1,i),jA(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Hh]||(a[Hh]=!0,jA("selectionchange",!1,a))}}function L0(i,a,u,T){switch(nb(a)){case 2:var A=uV;break;case 8:A=EV;break;default:A=ag}u=A.bind(null,a,u,i),A=void 0,!Jc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(A=!0),T?A!==void 0?i.addEventListener(a,u,{capture:!0,passive:A}):i.addEventListener(a,u,!0):A!==void 0?i.addEventListener(a,u,{passive:A}):i.addEventListener(a,u,!1)}function $A(i,a,u,T,A){var O=T;if((a&1)===0&&(a&2)===0&&T!==null)e:for(;;){if(T===null)return;var U=T.tag;if(U===3||U===4){var H=T.stateNode.containerInfo;if(H===A)break;if(U===4)for(U=T.return;U!==null;){var te=U.tag;if((te===3||te===4)&&U.stateNode.containerInfo===A)return;U=U.return}for(;H!==null;){if(U=Yo(H),U===null)return;if(te=U.tag,te===5||te===6||te===26||te===27){T=O=U;continue e}H=H.parentNode}}T=T.return}_T(function(){var Re=O,Ne=WE(u),De=[];e:{var me=Ge.get(i);if(me!==void 0){var Oe=eu,et=i;switch(i){case"keypress":if(Qc(u)===0)break e;case"keydown":case"keyup":Oe=FT;break;case"focusin":et="focus",Oe=Cl;break;case"focusout":et="blur",Oe=Cl;break;case"beforeblur":case"afterblur":Oe=Cl;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=bT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=Fs;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=kT;break;case G:case J:case re:Oe=PT;break;case Ae:Oe=mm;break;case"scroll":case"scrollend":Oe=Ye;break;case"wheel":Oe=qE;break;case"copy":case"cut":case"paste":Oe=vT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=gr;break;case"toggle":case"beforetoggle":Oe=Om}var dt=(a&4)!==0,dn=!dt&&(i==="scroll"||i==="scrollend"),Ee=dt?me!==null?me+"Capture":null:me;dt=[];for(var ae=Re,pe;ae!==null;){var ye=ae;if(pe=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||pe===null||Ee===null||(ye=eo(ae,Ee),ye!=null&&dt.push(Df(ae,ye,pe))),dn)break;ae=ae.return}0<dt.length&&(me=new Oe(me,et,null,u,Ne),De.push({event:me,listeners:dt}))}}if((a&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",me&&u!==YE&&(et=u.relatedTarget||u.fromElement)&&(Yo(et)||et[os]))break e;if((Oe||me)&&(me=Ne.window===Ne?Ne:(me=Ne.ownerDocument)?me.defaultView||me.parentWindow:window,Oe?(et=u.relatedTarget||u.toElement,Oe=Re,et=et?Yo(et):null,et!==null&&(dn=o(et),dt=et.tag,et!==dn||dt!==5&&dt!==27&&dt!==6)&&(et=null)):(Oe=null,et=Re),Oe!==et)){if(dt=bT,ye="onMouseLeave",Ee="onMouseEnter",ae="mouse",(i==="pointerout"||i==="pointerover")&&(dt=gr,ye="onPointerLeave",Ee="onPointerEnter",ae="pointer"),dn=Oe==null?me:Ol(Oe),pe=et==null?me:Ol(et),me=new dt(ye,ae+"leave",Oe,u,Ne),me.target=dn,me.relatedTarget=pe,ye=null,Yo(Ne)===Re&&(dt=new dt(Ee,ae+"enter",et,u,Ne),dt.target=pe,dt.relatedTarget=dn,ye=dt),dn=ye,Oe&&et)t:{for(dt=G2,Ee=Oe,ae=et,pe=0,ye=Ee;ye;ye=dt(ye))pe++;ye=0;for(var ut=ae;ut;ut=dt(ut))ye++;for(;0<pe-ye;)Ee=dt(Ee),pe--;for(;0<ye-pe;)ae=dt(ae),ye--;for(;pe--;){if(Ee===ae||ae!==null&&Ee===ae.alternate){dt=Ee;break t}Ee=dt(Ee),ae=dt(ae)}dt=null}else dt=null;Oe!==null&&y0(De,me,Oe,dt,!1),et!==null&&dn!==null&&y0(De,dn,et,dt,!0)}}e:{if(me=Re?Ol(Re):window,Oe=me.nodeName&&me.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&me.type==="file")var Zt=qT;else if(KT(me))if(JT)Zt=bm;else{Zt=as;var it=QE}else Oe=me.nodeName,!Oe||Oe.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?Re&&kE(Re.elementType)&&(Zt=qT):Zt=eh;if(Zt&&(Zt=Zt(i,Re))){zT(De,Zt,u,Ne);break e}it&&it(i,me,Re),i==="focusout"&&Re&&me.type==="number"&&Re.memoizedProps.value!=null&&VE(me,"number",me.value)}switch(it=Re?Ol(Re):window,i){case"focusin":(KT(it)||it.contentEditable==="true")&&(Ei=it,tf=Re,Pl=null);break;case"focusout":Pl=tf=Ei=null;break;case"mousedown":nf=!0;break;case"contextmenu":case"mouseup":case"dragend":nf=!1,sh(De,u,Ne);break;case"selectionchange":if(Pm)break;case"keydown":case"keyup":sh(De,u,Ne)}var bt;if(nu)e:{switch(i){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else Qo?XT(i,u)&&(kt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(kt="onCompositionStart");kt&&(YT&&u.locale!=="ko"&&(Qo||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&Qo&&(bt=LT()):(ci=Ne,XE="value"in ci?ci.value:ci.textContent,Qo=!0)),it=Vh(Re,kt),0<it.length&&(kt=new xT(kt,i,null,u,Ne),De.push({event:kt,listeners:it}),bt?kt.data=bt:(bt=$T(u),bt!==null&&(kt.data=bt)))),(bt=Nm?Cm(i,u):_m(i,u))&&(kt=Vh(Re,"onBeforeInput"),0<kt.length&&(it=new xT("onBeforeInput","beforeinput",null,u,Ne),De.push({event:it,listeners:kt}),it.data=bt)),M2(De,i,Re,u,Ne)}_0(De,a)})}function Df(i,a,u){return{instance:i,listener:a,currentTarget:u}}function Vh(i,a){for(var u=a+"Capture",T=[];i!==null;){var A=i,O=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||O===null||(A=eo(i,u),A!=null&&T.unshift(Df(i,A,O)),A=eo(i,a),A!=null&&T.push(Df(i,A,O))),i.tag===3)return T;i=i.return}return[]}function G2(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function y0(i,a,u,T,A){for(var O=a._reactName,U=[];u!==null&&u!==T;){var H=u,te=H.alternate,Re=H.stateNode;if(H=H.tag,te!==null&&te===T)break;H!==5&&H!==26&&H!==27||Re===null||(te=Re,A?(Re=eo(u,O),Re!=null&&U.unshift(Df(u,Re,te))):A||(Re=eo(u,O),Re!=null&&U.push(Df(u,Re,te)))),u=u.return}U.length!==0&&i.push({event:a,listeners:U})}var B2=/\r\n?/g,F2=/\u0000|\uFFFD/g;function b0(i){return(typeof i=="string"?i:""+i).replace(B2,`
50
+ `).replace(F2,"")}function P0(i,a){return a=b0(a),b0(i)===a}function fn(i,a,u,T,A,O){switch(u){case"children":typeof T=="string"?a==="body"||a==="textarea"&&T===""||$o(i,T):(typeof T=="number"||typeof T=="bigint")&&a!=="body"&&$o(i,""+T);break;case"className":jc(i,"class",T);break;case"tabIndex":jc(i,"tabindex",T);break;case"dir":case"role":case"viewBox":case"width":case"height":jc(i,u,T);break;case"style":CT(i,T,O);break;case"data":if(a!=="object"){jc(i,"data",T);break}case"src":case"href":if(T===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(T==null||typeof T=="function"||typeof T=="symbol"||typeof T=="boolean"){i.removeAttribute(u);break}T=zc(""+T),i.setAttribute(u,T);break;case"action":case"formAction":if(typeof T=="function"){i.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof O=="function"&&(u==="formAction"?(a!=="input"&&fn(i,a,"name",A.name,A,null),fn(i,a,"formEncType",A.formEncType,A,null),fn(i,a,"formMethod",A.formMethod,A,null),fn(i,a,"formTarget",A.formTarget,A,null)):(fn(i,a,"encType",A.encType,A,null),fn(i,a,"method",A.method,A,null),fn(i,a,"target",A.target,A,null)));if(T==null||typeof T=="symbol"||typeof T=="boolean"){i.removeAttribute(u);break}T=zc(""+T),i.setAttribute(u,T);break;case"onClick":T!=null&&(i.onclick=li);break;case"onScroll":T!=null&&Ft("scroll",i);break;case"onScrollEnd":T!=null&&Ft("scrollend",i);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(u=T.__html,u!=null){if(A.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=T&&typeof T!="function"&&typeof T!="symbol";break;case"muted":i.muted=T&&typeof T!="function"&&typeof T!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(T==null||typeof T=="function"||typeof T=="boolean"||typeof T=="symbol"){i.removeAttribute("xlink:href");break}u=zc(""+T),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":T!=null&&typeof T!="function"&&typeof T!="symbol"?i.setAttribute(u,""+T):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":T&&typeof T!="function"&&typeof T!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":T===!0?i.setAttribute(u,""):T!==!1&&T!=null&&typeof T!="function"&&typeof T!="symbol"?i.setAttribute(u,T):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":T!=null&&typeof T!="function"&&typeof T!="symbol"&&!isNaN(T)&&1<=T?i.setAttribute(u,T):i.removeAttribute(u);break;case"rowSpan":case"start":T==null||typeof T=="function"||typeof T=="symbol"||isNaN(T)?i.removeAttribute(u):i.setAttribute(u,T);break;case"popover":Ft("beforetoggle",i),Ft("toggle",i),Wc(i,"popover",T);break;case"xlinkActuate":ws(i,"http://www.w3.org/1999/xlink","xlink:actuate",T);break;case"xlinkArcrole":ws(i,"http://www.w3.org/1999/xlink","xlink:arcrole",T);break;case"xlinkRole":ws(i,"http://www.w3.org/1999/xlink","xlink:role",T);break;case"xlinkShow":ws(i,"http://www.w3.org/1999/xlink","xlink:show",T);break;case"xlinkTitle":ws(i,"http://www.w3.org/1999/xlink","xlink:title",T);break;case"xlinkType":ws(i,"http://www.w3.org/1999/xlink","xlink:type",T);break;case"xmlBase":ws(i,"http://www.w3.org/XML/1998/namespace","xml:base",T);break;case"xmlLang":ws(i,"http://www.w3.org/XML/1998/namespace","xml:lang",T);break;case"xmlSpace":ws(i,"http://www.w3.org/XML/1998/namespace","xml:space",T);break;case"is":Wc(i,"is",T);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=hm.get(u)||u,Wc(i,u,T))}}function KA(i,a,u,T,A,O){switch(u){case"style":CT(i,T,O);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(u=T.__html,u!=null){if(A.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof T=="string"?$o(i,T):(typeof T=="number"||typeof T=="bigint")&&$o(i,""+T);break;case"onScroll":T!=null&&Ft("scroll",i);break;case"onScrollEnd":T!=null&&Ft("scrollend",i);break;case"onClick":T!=null&&(i.onclick=li);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!RT.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(A=u.endsWith("Capture"),a=u.slice(2,A?u.length-7:void 0),O=i[tr]||null,O=O!=null?O[u]:null,typeof O=="function"&&i.removeEventListener(a,O,A),typeof T=="function")){typeof O!="function"&&O!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,T,A);break e}u in i?i[u]=T:T===!0?i.setAttribute(u,""):Wc(i,u,T)}}}function _r(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",i),Ft("load",i);var T=!1,A=!1,O;for(O in u)if(u.hasOwnProperty(O)){var U=u[O];if(U!=null)switch(O){case"src":T=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:fn(i,a,O,U,u,null)}}A&&fn(i,a,"srcSet",u.srcSet,u,null),T&&fn(i,a,"src",u.src,u,null);return;case"input":Ft("invalid",i);var H=O=U=A=null,te=null,Re=null;for(T in u)if(u.hasOwnProperty(T)){var Ne=u[T];if(Ne!=null)switch(T){case"name":A=Ne;break;case"type":U=Ne;break;case"checked":te=Ne;break;case"defaultChecked":Re=Ne;break;case"value":O=Ne;break;case"defaultValue":H=Ne;break;case"children":case"dangerouslySetInnerHTML":if(Ne!=null)throw Error(r(137,a));break;default:fn(i,a,T,Ne,u,null)}}OT(i,O,H,te,Re,U,A,!1);return;case"select":Ft("invalid",i),T=U=O=null;for(A in u)if(u.hasOwnProperty(A)&&(H=u[A],H!=null))switch(A){case"value":O=H;break;case"defaultValue":U=H;break;case"multiple":T=H;default:fn(i,a,A,H,u,null)}a=O,u=U,i.multiple=!!T,a!=null?Zi(i,!!T,a,!1):u!=null&&Zi(i,!!T,u,!0);return;case"textarea":Ft("invalid",i),O=A=T=null;for(U in u)if(u.hasOwnProperty(U)&&(H=u[U],H!=null))switch(U){case"value":T=H;break;case"defaultValue":A=H;break;case"children":O=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(91));break;default:fn(i,a,U,H,u,null)}IT(i,T,A,O);return;case"option":for(te in u)if(u.hasOwnProperty(te)&&(T=u[te],T!=null))switch(te){case"selected":i.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:fn(i,a,te,T,u,null)}return;case"dialog":Ft("beforetoggle",i),Ft("toggle",i),Ft("cancel",i),Ft("close",i);break;case"iframe":case"object":Ft("load",i);break;case"video":case"audio":for(T=0;T<Pf.length;T++)Ft(Pf[T],i);break;case"image":Ft("error",i),Ft("load",i);break;case"details":Ft("toggle",i);break;case"embed":case"source":case"link":Ft("error",i),Ft("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(Re in u)if(u.hasOwnProperty(Re)&&(T=u[Re],T!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:fn(i,a,Re,T,u,null)}return;default:if(kE(a)){for(Ne in u)u.hasOwnProperty(Ne)&&(T=u[Ne],T!==void 0&&KA(i,a,Ne,T,u,void 0));return}}for(H in u)u.hasOwnProperty(H)&&(T=u[H],T!=null&&fn(i,a,H,T,u,null))}function H2(i,a,u,T){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,O=null,U=null,H=null,te=null,Re=null,Ne=null;for(Oe in u){var De=u[Oe];if(u.hasOwnProperty(Oe)&&De!=null)switch(Oe){case"checked":break;case"value":break;case"defaultValue":te=De;default:T.hasOwnProperty(Oe)||fn(i,a,Oe,null,T,De)}}for(var me in T){var Oe=T[me];if(De=u[me],T.hasOwnProperty(me)&&(Oe!=null||De!=null))switch(me){case"type":O=Oe;break;case"name":A=Oe;break;case"checked":Re=Oe;break;case"defaultChecked":Ne=Oe;break;case"value":U=Oe;break;case"defaultValue":H=Oe;break;case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(r(137,a));break;default:Oe!==De&&fn(i,a,me,Oe,T,De)}}$c(i,U,H,te,Re,Ne,O,A);return;case"select":Oe=U=H=me=null;for(O in u)if(te=u[O],u.hasOwnProperty(O)&&te!=null)switch(O){case"value":break;case"multiple":Oe=te;default:T.hasOwnProperty(O)||fn(i,a,O,null,T,te)}for(A in T)if(O=T[A],te=u[A],T.hasOwnProperty(A)&&(O!=null||te!=null))switch(A){case"value":me=O;break;case"defaultValue":H=O;break;case"multiple":U=O;default:O!==te&&fn(i,a,A,O,T,te)}a=H,u=U,T=Oe,me!=null?Zi(i,!!u,me,!1):!!T!=!!u&&(a!=null?Zi(i,!!u,a,!0):Zi(i,!!u,u?[]:"",!1));return;case"textarea":Oe=me=null;for(H in u)if(A=u[H],u.hasOwnProperty(H)&&A!=null&&!T.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:fn(i,a,H,null,T,A)}for(U in T)if(A=T[U],O=u[U],T.hasOwnProperty(U)&&(A!=null||O!=null))switch(U){case"value":me=A;break;case"defaultValue":Oe=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(91));break;default:A!==O&&fn(i,a,U,A,T,O)}Kc(i,me,Oe);return;case"option":for(var et in u)if(me=u[et],u.hasOwnProperty(et)&&me!=null&&!T.hasOwnProperty(et))switch(et){case"selected":i.selected=!1;break;default:fn(i,a,et,null,T,me)}for(te in T)if(me=T[te],Oe=u[te],T.hasOwnProperty(te)&&me!==Oe&&(me!=null||Oe!=null))switch(te){case"selected":i.selected=me&&typeof me!="function"&&typeof me!="symbol";break;default:fn(i,a,te,me,T,Oe)}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 dt in u)me=u[dt],u.hasOwnProperty(dt)&&me!=null&&!T.hasOwnProperty(dt)&&fn(i,a,dt,null,T,me);for(Re in T)if(me=T[Re],Oe=u[Re],T.hasOwnProperty(Re)&&me!==Oe&&(me!=null||Oe!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,a));break;default:fn(i,a,Re,me,T,Oe)}return;default:if(kE(a)){for(var dn in u)me=u[dn],u.hasOwnProperty(dn)&&me!==void 0&&!T.hasOwnProperty(dn)&&KA(i,a,dn,void 0,T,me);for(Ne in T)me=T[Ne],Oe=u[Ne],!T.hasOwnProperty(Ne)||me===Oe||me===void 0&&Oe===void 0||KA(i,a,Ne,me,T,Oe);return}}for(var Ee in u)me=u[Ee],u.hasOwnProperty(Ee)&&me!=null&&!T.hasOwnProperty(Ee)&&fn(i,a,Ee,null,T,me);for(De in T)me=T[De],Oe=u[De],!T.hasOwnProperty(De)||me===Oe||me==null&&Oe==null||fn(i,a,De,me,T,Oe)}function D0(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function V2(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),T=0;T<u.length;T++){var A=u[T],O=A.transferSize,U=A.initiatorType,H=A.duration;if(O&&H&&D0(U)){for(U=0,H=A.responseEnd,T+=1;T<u.length;T++){var te=u[T],Re=te.startTime;if(Re>H)break;var Ne=te.transferSize,De=te.initiatorType;Ne&&D0(De)&&(te=te.responseEnd,U+=Ne*(te<H?1:(H-Re)/(te-Re)))}if(--T,a+=8*(O+U)/(A.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var zA=null,qA=null;function kh(i){return i.nodeType===9?i:i.ownerDocument}function v0(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 M0(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function JA(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var QA=null;function k2(){var i=window.event;return i&&i.type==="popstate"?i===QA?!1:(QA=i,!0):(QA=null,!1)}var x0=typeof setTimeout=="function"?setTimeout:void 0,Y2=typeof clearTimeout=="function"?clearTimeout:void 0,U0=typeof Promise=="function"?Promise:void 0,W2=typeof queueMicrotask=="function"?queueMicrotask:typeof U0<"u"?function(i){return U0.resolve(null).then(i).catch(j2)}:x0;function j2(i){setTimeout(function(){throw i})}function Ra(i){return i==="head"}function w0(i,a){var u=a,T=0;do{var A=u.nextSibling;if(i.removeChild(u),A&&A.nodeType===8)if(u=A.data,u==="/$"||u==="/&"){if(T===0){i.removeChild(A),Pu(a);return}T--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")T++;else if(u==="html")vf(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,vf(u);for(var O=u.firstChild;O;){var U=O.nextSibling,H=O.nodeName;O[ko]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&O.rel.toLowerCase()==="stylesheet"||u.removeChild(O),O=U}}else u==="body"&&vf(i.ownerDocument.body);u=A}while(u);Pu(a)}function G0(i,a){var u=i;i=0;do{var T=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),T&&T.nodeType===8)if(u=T.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=T}while(u)}function ZA(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":ZA(u),GE(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function X2(i,a,u,T){for(;i.nodeType===1;){var A=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!T&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(T){if(!i[ko])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(O=i.getAttribute("rel"),O==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(O!==A.rel||i.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||i.getAttribute("title")!==(A.title==null?null:A.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(O=i.getAttribute("src"),(O!==(A.src==null?null:A.src)||i.getAttribute("type")!==(A.type==null?null:A.type)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&O&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var O=A.name==null?null:""+A.name;if(A.type==="hidden"&&i.getAttribute("name")===O)return i}else return i;if(i=$s(i.nextSibling),i===null)break}return null}function $2(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=$s(i.nextSibling),i===null))return null;return i}function B0(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=$s(i.nextSibling),i===null))return null;return i}function eg(i){return i.data==="$?"||i.data==="$~"}function tg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function K2(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var T=function(){a(),u.removeEventListener("DOMContentLoaded",T)};u.addEventListener("DOMContentLoaded",T),i._reactRetry=T}}function $s(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var ng=null;function F0(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return $s(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function H0(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function V0(i,a,u){switch(a=kh(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function vf(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);GE(i)}var Ks=new Map,k0=new Set;function Yh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var po=z.d;z.d={f:z2,r:q2,D:J2,C:Q2,L:Z2,m:eV,X:nV,S:tV,M:rV};function z2(){var i=po.f(),a=xh();return i||a}function q2(i){var a=Wo(i);a!==null&&a.tag===5&&a.type==="form"?iy(a):po.r(i)}var Lu=typeof document>"u"?null:document;function Y0(i,a,u){var T=Lu;if(T&&typeof a=="string"&&a){var A=Ar(a);A='link[rel="'+i+'"][href="'+A+'"]',typeof u=="string"&&(A+='[crossorigin="'+u+'"]'),k0.has(A)||(k0.add(A),i={rel:i,crossOrigin:u,href:a},T.querySelector(A)===null&&(a=T.createElement("link"),_r(a,"link",i),$n(a),T.head.appendChild(a)))}}function J2(i){po.D(i),Y0("dns-prefetch",i,null)}function Q2(i,a){po.C(i,a),Y0("preconnect",i,a)}function Z2(i,a,u){po.L(i,a,u);var T=Lu;if(T&&i&&a){var A='link[rel="preload"][as="'+Ar(a)+'"]';a==="image"&&u&&u.imageSrcSet?(A+='[imagesrcset="'+Ar(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(A+='[imagesizes="'+Ar(u.imageSizes)+'"]')):A+='[href="'+Ar(i)+'"]';var O=A;switch(a){case"style":O=yu(i);break;case"script":O=bu(i)}Ks.has(O)||(i=d({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Ks.set(O,i),T.querySelector(A)!==null||a==="style"&&T.querySelector(Mf(O))||a==="script"&&T.querySelector(xf(O))||(a=T.createElement("link"),_r(a,"link",i),$n(a),T.head.appendChild(a)))}}function eV(i,a){po.m(i,a);var u=Lu;if(u&&i){var T=a&&typeof a.as=="string"?a.as:"script",A='link[rel="modulepreload"][as="'+Ar(T)+'"][href="'+Ar(i)+'"]',O=A;switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=bu(i)}if(!Ks.has(O)&&(i=d({rel:"modulepreload",href:i},a),Ks.set(O,i),u.querySelector(A)===null)){switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(xf(O)))return}T=u.createElement("link"),_r(T,"link",i),$n(T),u.head.appendChild(T)}}}function tV(i,a,u){po.S(i,a,u);var T=Lu;if(T&&i){var A=jo(T).hoistableStyles,O=yu(i);a=a||"default";var U=A.get(O);if(!U){var H={loading:0,preload:null};if(U=T.querySelector(Mf(O)))H.loading=5;else{i=d({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Ks.get(O))&&rg(i,u);var te=U=T.createElement("link");$n(te),_r(te,"link",i),te._p=new Promise(function(Re,Ne){te.onload=Re,te.onerror=Ne}),te.addEventListener("load",function(){H.loading|=1}),te.addEventListener("error",function(){H.loading|=2}),H.loading|=4,Wh(U,a,T)}U={type:"stylesheet",instance:U,count:1,state:H},A.set(O,U)}}}function nV(i,a){po.X(i,a);var u=Lu;if(u&&i){var T=jo(u).hoistableScripts,A=bu(i),O=T.get(A);O||(O=u.querySelector(xf(A)),O||(i=d({src:i,async:!0},a),(a=Ks.get(A))&&sg(i,a),O=u.createElement("script"),$n(O),_r(O,"link",i),u.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},T.set(A,O))}}function rV(i,a){po.M(i,a);var u=Lu;if(u&&i){var T=jo(u).hoistableScripts,A=bu(i),O=T.get(A);O||(O=u.querySelector(xf(A)),O||(i=d({src:i,async:!0,type:"module"},a),(a=Ks.get(A))&&sg(i,a),O=u.createElement("script"),$n(O),_r(O,"link",i),u.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},T.set(A,O))}}function W0(i,a,u,T){var A=(A=se.current)?Yh(A):null;if(!A)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=yu(u.href),u=jo(A).hoistableStyles,T=u.get(a),T||(T={type:"style",instance:null,count:0,state:null},u.set(a,T)),T):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=yu(u.href);var O=jo(A).hoistableStyles,U=O.get(i);if(U||(A=A.ownerDocument||A,U={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(i,U),(O=A.querySelector(Mf(i)))&&!O._p&&(U.instance=O,U.state.loading=5),Ks.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ks.set(i,u),O||sV(A,i,u,U.state))),a&&T===null)throw Error(r(528,""));return U}if(a&&T!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=bu(u),u=jo(A).hoistableScripts,T=u.get(a),T||(T={type:"script",instance:null,count:0,state:null},u.set(a,T)),T):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function yu(i){return'href="'+Ar(i)+'"'}function Mf(i){return'link[rel="stylesheet"]['+i+"]"}function j0(i){return d({},i,{"data-precedence":i.precedence,precedence:null})}function sV(i,a,u,T){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?T.loading=1:(a=i.createElement("link"),T.preload=a,a.addEventListener("load",function(){return T.loading|=1}),a.addEventListener("error",function(){return T.loading|=2}),_r(a,"link",u),$n(a),i.head.appendChild(a))}function bu(i){return'[src="'+Ar(i)+'"]'}function xf(i){return"script[async]"+i}function X0(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var T=i.querySelector('style[data-href~="'+Ar(u.href)+'"]');if(T)return a.instance=T,$n(T),T;var A=d({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return T=(i.ownerDocument||i).createElement("style"),$n(T),_r(T,"style",A),Wh(T,u.precedence,i),a.instance=T;case"stylesheet":A=yu(u.href);var O=i.querySelector(Mf(A));if(O)return a.state.loading|=4,a.instance=O,$n(O),O;T=j0(u),(A=Ks.get(A))&&rg(T,A),O=(i.ownerDocument||i).createElement("link"),$n(O);var U=O;return U._p=new Promise(function(H,te){U.onload=H,U.onerror=te}),_r(O,"link",T),a.state.loading|=4,Wh(O,u.precedence,i),a.instance=O;case"script":return O=bu(u.src),(A=i.querySelector(xf(O)))?(a.instance=A,$n(A),A):(T=u,(A=Ks.get(O))&&(T=d({},u),sg(T,A)),i=i.ownerDocument||i,A=i.createElement("script"),$n(A),_r(A,"link",T),i.head.appendChild(A),a.instance=A);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(T=a.instance,a.state.loading|=4,Wh(T,u.precedence,i));return a.instance}function Wh(i,a,u){for(var T=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=T.length?T[T.length-1]:null,O=A,U=0;U<T.length;U++){var H=T[U];if(H.dataset.precedence===a)O=H;else if(O!==A)break}O?O.parentNode.insertBefore(i,O.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function rg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function sg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var jh=null;function $0(i,a,u){if(jh===null){var T=new Map,A=jh=new Map;A.set(u,T)}else A=jh,T=A.get(u),T||(T=new Map,A.set(u,T));if(T.has(i))return T;for(T.set(i,null),u=u.getElementsByTagName(i),A=0;A<u.length;A++){var O=u[A];if(!(O[ko]||O[Fn]||i==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var U=O.getAttribute(a)||"";U=i+U;var H=T.get(U);H?H.push(O):T.set(U,[O])}}return T}function K0(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function iV(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function z0(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function oV(i,a,u,T){if(u.type==="stylesheet"&&(typeof T.media!="string"||matchMedia(T.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var A=yu(T.href),O=a.querySelector(Mf(A));if(O){a=O._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=Xh.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=O,$n(O);return}O=a.ownerDocument||a,T=j0(T),(A=Ks.get(A))&&rg(T,A),O=O.createElement("link"),$n(O);var U=O;U._p=new Promise(function(H,te){U.onload=H,U.onerror=te}),_r(O,"link",T),u.instance=O}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Xh.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var ig=0;function aV(i,a){return i.stylesheets&&i.count===0&&Kh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var T=setTimeout(function(){if(i.stylesheets&&Kh(i,i.stylesheets),i.unsuspend){var O=i.unsuspend;i.unsuspend=null,O()}},6e4+a);0<i.imgBytes&&ig===0&&(ig=62500*V2());var A=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Kh(i,i.stylesheets),i.unsuspend)){var O=i.unsuspend;i.unsuspend=null,O()}},(i.imgBytes>ig?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(T),clearTimeout(A)}}:null}function Xh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var $h=null;function Kh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,$h=new Map,a.forEach(lV,i),$h=null,Xh.call(i))}function lV(i,a){if(!(a.state.loading&4)){var u=$h.get(i);if(u)var T=u.get(null);else{u=new Map,$h.set(i,u);for(var A=i.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<A.length;O++){var U=A[O];(U.nodeName==="LINK"||U.getAttribute("media")!=="not all")&&(u.set(U.dataset.precedence,U),T=U)}T&&u.set(null,T)}A=a.instance,U=A.getAttribute("data-precedence"),O=u.get(U)||T,O===T&&u.set(null,A),u.set(U,A),this.count++,T=Xh.bind(this),A.addEventListener("load",T),A.addEventListener("error",T),O?O.parentNode.insertBefore(A,O.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(A,i.firstChild)),a.state.loading|=4}}var Uf={$$typeof:L,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function cV(i,a,u,T,A,O,U,H,te){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=cr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cr(0),this.hiddenUpdates=cr(null),this.identifierPrefix=T,this.onUncaughtError=A,this.onCaughtError=O,this.onRecoverableError=U,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function q0(i,a,u,T,A,O,U,H,te,Re,Ne,De){return i=new cV(i,a,u,U,te,Re,Ne,De,H),a=1,O===!0&&(a|=24),O=un(3,null,null,a),i.current=O,O.stateNode=i,a=Bm(),a.refCount++,i.pooledCache=a,a.refCount++,O.memoizedState={element:T,isDehydrated:u,cache:a},km(O),i}function J0(i){return i?(i=Kr,i):Kr}function Q0(i,a,u,T,A,O){A=J0(A),T.context===null?T.context=A:T.pendingContext=A,T=oa(a),T.payload={element:u},O=O===void 0?null:O,O!==null&&(T.callback=O),u=aa(i,T,a),u!==null&&(fs(u,i,a),df(u,i,a))}function Z0(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function og(i,a){Z0(i,a),(i=i.alternate)&&Z0(i,a)}function eb(i){if(i.tag===13||i.tag===31){var a=Vn(i,67108864);a!==null&&fs(a,i,67108864),og(i,67108864)}}function tb(i){if(i.tag===13||i.tag===31){var a=_s();a=yn(a);var u=Vn(i,a);u!==null&&fs(u,i,a),og(i,a)}}var zh=!0;function uV(i,a,u,T){var A=k.T;k.T=null;var O=z.p;try{z.p=2,ag(i,a,u,T)}finally{z.p=O,k.T=A}}function EV(i,a,u,T){var A=k.T;k.T=null;var O=z.p;try{z.p=8,ag(i,a,u,T)}finally{z.p=O,k.T=A}}function ag(i,a,u,T){if(zh){var A=lg(T);if(A===null)$A(i,a,T,qh,u),rb(i,T);else if(dV(A,i,a,u,T))T.stopPropagation();else if(rb(i,T),a&4&&-1<fV.indexOf(i)){for(;A!==null;){var O=Wo(A);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var U=Nn(O.pendingLanes);if(U!==0){var H=O;for(H.pendingLanes|=2,H.entangledLanes|=2;U;){var te=1<<31-$t(U);H.entanglements[1]|=te,U&=~te}xi(O),(tn&6)===0&&(vh=xe()+500,bf(0))}}break;case 31:case 13:H=Vn(O,2),H!==null&&fs(H,O,2),xh(),og(O,2)}if(O=lg(T),O===null&&$A(i,a,T,qh,u),O===A)break;A=O}A!==null&&T.stopPropagation()}else $A(i,a,T,null,u)}}function lg(i){return i=WE(i),cg(i)}var qh=null;function cg(i){if(qh=null,i=Yo(i),i!==null){var a=o(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return qh=i,null}function nb(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(Ze()){case Et:return 2;case Xt:return 8;case Ut:case ft:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var ug=!1,Sa=null,ma=null,Aa=null,wf=new Map,Gf=new Map,ga=[],fV="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 rb(i,a){switch(i){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":ma=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":wf.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gf.delete(a.pointerId)}}function Bf(i,a,u,T,A,O){return i===null||i.nativeEvent!==O?(i={blockedOn:a,domEventName:u,eventSystemFlags:T,nativeEvent:O,targetContainers:[A]},a!==null&&(a=Wo(a),a!==null&&eb(a)),i):(i.eventSystemFlags|=T,a=i.targetContainers,A!==null&&a.indexOf(A)===-1&&a.push(A),i)}function dV(i,a,u,T,A){switch(a){case"focusin":return Sa=Bf(Sa,i,a,u,T,A),!0;case"dragenter":return ma=Bf(ma,i,a,u,T,A),!0;case"mouseover":return Aa=Bf(Aa,i,a,u,T,A),!0;case"pointerover":var O=A.pointerId;return wf.set(O,Bf(wf.get(O)||null,i,a,u,T,A)),!0;case"gotpointercapture":return O=A.pointerId,Gf.set(O,Bf(Gf.get(O)||null,i,a,u,T,A)),!0}return!1}function sb(i){var a=Yo(i.target);if(a!==null){var u=o(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,gl(i.priority,function(){tb(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,gl(i.priority,function(){tb(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Jh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=lg(i.nativeEvent);if(u===null){u=i.nativeEvent;var T=new u.constructor(u.type,u);YE=T,u.target.dispatchEvent(T),YE=null}else return a=Wo(u),a!==null&&eb(a),i.blockedOn=u,!1;a.shift()}return!0}function ib(i,a,u){Jh(i)&&u.delete(a)}function TV(){ug=!1,Sa!==null&&Jh(Sa)&&(Sa=null),ma!==null&&Jh(ma)&&(ma=null),Aa!==null&&Jh(Aa)&&(Aa=null),wf.forEach(ib),Gf.forEach(ib)}function Qh(i,a){i.blockedOn===a&&(i.blockedOn=null,ug||(ug=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,TV)))}var Zh=null;function ob(i){Zh!==i&&(Zh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zh===i&&(Zh=null);for(var a=0;a<i.length;a+=3){var u=i[a],T=i[a+1],A=i[a+2];if(typeof T!="function"){if(cg(T||u)===null)continue;break}var O=Wo(u);O!==null&&(i.splice(a,3),a-=3,lA(O,{pending:!0,data:A,method:u.method,action:T},T,A))}}))}function Pu(i){function a(te){return Qh(te,i)}Sa!==null&&Qh(Sa,i),ma!==null&&Qh(ma,i),Aa!==null&&Qh(Aa,i),wf.forEach(a),Gf.forEach(a);for(var u=0;u<ga.length;u++){var T=ga[u];T.blockedOn===i&&(T.blockedOn=null)}for(;0<ga.length&&(u=ga[0],u.blockedOn===null);)sb(u),u.blockedOn===null&&ga.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(T=0;T<u.length;T+=3){var A=u[T],O=u[T+1],U=A[tr]||null;if(typeof O=="function")U||ob(u);else if(U){var H=null;if(O&&O.hasAttribute("formAction")){if(A=O,U=O[tr]||null)H=U.formAction;else if(cg(A)!==null)continue}else H=U.action;typeof H=="function"?u[T+1]=H:(u.splice(T,3),T-=3),ob(u)}}}function ab(){function i(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(U){return A=U})},focusReset:"manual",scroll:"manual"})}function a(){A!==null&&(A(),A=null),T||setTimeout(u,20)}function u(){if(!T&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var T=!1,A=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){T=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),A!==null&&(A(),A=null)}}}function Eg(i){this._internalRoot=i}ep.prototype.render=Eg.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,T=_s();Q0(u,T,i,a,null,null)},ep.prototype.unmount=Eg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;Q0(i.current,2,null,i,null,null),xh(),a[os]=null}};function ep(i){this._internalRoot=i}ep.prototype.unstable_scheduleHydration=function(i){if(i){var a=Xr();i={blockedOn:null,target:i,priority:a};for(var u=0;u<ga.length&&a!==0&&a<ga[u].priority;u++);ga.splice(u,0,i),u===0&&sb(i)}};var lb=t.version;if(lb!=="19.2.4")throw Error(r(527,lb,"19.2.4"));z.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var hV={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tp.isDisabled&&tp.supportsFiber)try{zt=tp.inject(hV),qt=tp}catch{}}return Vf.createRoot=function(i,a){if(!s(i))throw Error(r(299));var u=!1,T="",A=hy,O=py,U=Ry;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(T=a.identifierPrefix),a.onUncaughtError!==void 0&&(A=a.onUncaughtError),a.onCaughtError!==void 0&&(O=a.onCaughtError),a.onRecoverableError!==void 0&&(U=a.onRecoverableError)),a=q0(i,1,!1,null,null,u,T,null,A,O,U,ab),i[os]=a.current,XA(i),new Eg(a)},Vf.hydrateRoot=function(i,a,u){if(!s(i))throw Error(r(299));var T=!1,A="",O=hy,U=py,H=Ry,te=null;return u!=null&&(u.unstable_strictMode===!0&&(T=!0),u.identifierPrefix!==void 0&&(A=u.identifierPrefix),u.onUncaughtError!==void 0&&(O=u.onUncaughtError),u.onCaughtError!==void 0&&(U=u.onCaughtError),u.onRecoverableError!==void 0&&(H=u.onRecoverableError),u.formState!==void 0&&(te=u.formState)),a=q0(i,1,!0,a,u??null,T,A,te,O,U,H,ab),a.context=J0(null),u=a.current,T=_s(),T=yn(T),A=oa(T),A.callback=null,aa(u,A,T),u=T,a.current.lanes=u,ur(a,u),xi(a),i[os]=a.current,XA(i),new ep(a)},Vf.version="19.2.4",Vf}var Ab;function bV(){if(Ab)return hg.exports;Ab=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(),hg.exports=yV(),hg.exports}var PV=bV(),nT=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},uc,Ua,eE,lx,DV=(lx=class extends nT{constructor(){super();$e(this,uc);$e(this,Ua);$e(this,eE);Fe(this,eE,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){V(this,Ua)||this.setEventListener(V(this,eE))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,Ua))==null||t.call(this),Fe(this,Ua,void 0))}setEventListener(t){var n;Fe(this,eE,t),(n=V(this,Ua))==null||n.call(this),Fe(this,Ua,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){V(this,uc)!==t&&(Fe(this,uc,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof V(this,uc)=="boolean"?V(this,uc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},uc=new WeakMap,Ua=new WeakMap,eE=new WeakMap,lx),cC=new DV,vV={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wa,oC,cx,MV=(cx=class{constructor(){$e(this,wa,vV);$e(this,oC,!1)}setTimeoutProvider(e){Fe(this,wa,e)}setTimeout(e,t){return V(this,wa).setTimeout(e,t)}clearTimeout(e){V(this,wa).clearTimeout(e)}setInterval(e,t){return V(this,wa).setInterval(e,t)}clearInterval(e){V(this,wa).clearInterval(e)}},wa=new WeakMap,oC=new WeakMap,cx),tc=new MV;function xV(e){setTimeout(e,0)}var UV=typeof window>"u"||"Deno"in globalThis;function hs(){}function wV(e,t){return typeof e=="function"?e(t):e}function EI(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ox(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Za(e,t){return typeof e=="function"?e(t):e}function Zs(e,t){return typeof e=="function"?e(t):e}function gb(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==uC(l,t.options))return!1}else if(!Nd(t.queryKey,l))return!1}if(n!=="all"){const E=t.isActive();if(n==="active"&&!E||n==="inactive"&&E)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||s&&s!==t.state.fetchStatus||o&&!o(t))}function Ob(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Id(t.options.mutationKey)!==Id(o))return!1}else if(!Nd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function uC(e,t){return((t==null?void 0:t.queryKeyHashFn)||Id)(e)}function Id(e){return JSON.stringify(e,(t,n)=>dI(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Nd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Nd(e[n],t[n])):!1}var GV=Object.prototype.hasOwnProperty;function Ix(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Ib(e)&&Ib(t);if(!r&&!(dI(e)&&dI(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,E=r?new Array(c):{};let f=0;for(let h=0;h<c;h++){const d=r?h:l[h],p=e[d],S=t[d];if(p===S){E[d]=p,(r?h<o:GV.call(e,d))&&f++;continue}if(p===null||S===null||typeof p!="object"||typeof S!="object"){E[d]=S;continue}const R=Ix(p,S,n+1);E[d]=R,R===p&&f++}return o===c&&f===o?e:E}function fI(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ib(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dI(e){if(!Nb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Nb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Nb(e){return Object.prototype.toString.call(e)==="[object Object]"}function BV(e){return new Promise(t=>{tc.setTimeout(t,e)})}function TI(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ix(e,t):t}function FV(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function HV(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ol=Symbol();function Nx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ol?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cx(e,t){return typeof e=="function"?e(...t):!!e}function VV(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Cd=(()=>{let e=()=>UV;return{isServer(){return e()},setIsServer(t){e=t}}})();function hI(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var kV=xV;function YV(){let e=[],t=0,n=c=>{c()},r=c=>{c()},s=kV;const o=c=>{t?e.push(c):s(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&s(()=>{r(()=>{c.forEach(E=>{n(E)})})})};return{batch:c=>{let E;t++;try{E=c()}finally{t--,t||l()}return E},batchCalls:c=>(...E)=>{o(()=>{c(...E)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{s=c}}}var yr=YV(),tE,Ga,nE,ux,WV=(ux=class extends nT{constructor(){super();$e(this,tE,!0);$e(this,Ga);$e(this,nE);Fe(this,nE,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){V(this,Ga)||this.setEventListener(V(this,nE))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,Ga))==null||t.call(this),Fe(this,Ga,void 0))}setEventListener(t){var n;Fe(this,nE,t),(n=V(this,Ga))==null||n.call(this),Fe(this,Ga,t(this.setOnline.bind(this)))}setOnline(t){V(this,tE)!==t&&(Fe(this,tE,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return V(this,tE)}},tE=new WeakMap,Ga=new WeakMap,nE=new WeakMap,ux),pR=new WV;function jV(e){return Math.min(1e3*2**e,3e4)}function _x(e){return(e??"online")==="online"?pR.isOnline():!0}var pI=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Lx(e){let t=!1,n=0,r;const s=hI(),o=()=>s.status!=="pending",l=m=>{var g;if(!o()){const I=new pI(m);p(I),(g=e.onCancel)==null||g.call(e,I)}},c=()=>{t=!0},E=()=>{t=!1},f=()=>cC.isFocused()&&(e.networkMode==="always"||pR.isOnline())&&e.canRun(),h=()=>_x(e.networkMode)&&e.canRun(),d=m=>{o()||(r==null||r(),s.resolve(m))},p=m=>{o()||(r==null||r(),s.reject(m))},S=()=>new Promise(m=>{var g;r=I=>{(o()||f())&&m(I)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;r=void 0,o()||(m=e.onContinue)==null||m.call(e)}),R=()=>{if(o())return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(I){m=Promise.reject(I)}Promise.resolve(m).then(d).catch(I=>{var _;if(o())return;const C=e.retry??(Cd.isServer()?0:3),L=e.retryDelay??jV,N=typeof L=="function"?L(n,I):L,y=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,I);if(t||!y){p(I);return}n++,(_=e.onFail)==null||_.call(e,n,I),BV(N).then(()=>f()?void 0:S()).then(()=>{t?p(I):R()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:c,continueRetry:E,canStart:h,start:()=>(h()?R():S().then(R),s)}}var Ec,Ex,yx=(Ex=class{constructor(){$e(this,Ec)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),EI(this.gcTime)&&Fe(this,Ec,tc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cd.isServer()?1/0:300*1e3))}clearGcTimeout(){V(this,Ec)&&(tc.clearTimeout(V(this,Ec)),Fe(this,Ec,void 0))}},Ec=new WeakMap,Ex),fc,rE,Js,dc,hr,Kd,Tc,bs,bx,Oo,fx,XV=(fx=class extends yx{constructor(t){super();$e(this,bs);$e(this,fc);$e(this,rE);$e(this,Js);$e(this,dc);$e(this,hr);$e(this,Kd);$e(this,Tc);Fe(this,Tc,!1),Fe(this,Kd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Fe(this,dc,t.client),Fe(this,Js,V(this,dc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Fe(this,fc,_b(this.options)),this.state=t.state??V(this,fc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=V(this,hr))==null?void 0:t.promise}setOptions(t){if(this.options={...V(this,Kd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=_b(this.options);n.data!==void 0&&(this.setState(Cb(n.data,n.dataUpdatedAt)),Fe(this,fc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,Js).remove(this)}setData(t,n){const r=TI(this.state.data,t,this.options);return we(this,bs,Oo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){we(this,bs,Oo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=V(this,hr))==null?void 0:r.promise;return(s=V(this,hr))==null||s.cancel(t),n?n.then(hs).catch(hs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return V(this,fc)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Zs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ol||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Za(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ox(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,hr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=V(this,hr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),V(this,Js).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(V(this,hr)&&(V(this,Tc)||we(this,bs,bx).call(this)?V(this,hr).cancel({revert:!0}):V(this,hr).cancelRetry()),this.scheduleGc()),V(this,Js).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||we(this,bs,Oo).call(this,{type:"invalidate"})}async fetch(t,n){var E,f,h,d,p,S,R,m,g,I,C,L;if(this.state.fetchStatus!=="idle"&&((E=V(this,hr))==null?void 0:E.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(V(this,hr))return V(this,hr).continueRetry(),V(this,hr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(y=>y.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Fe(this,Tc,!0),r.signal)})},o=()=>{const N=Nx(this.options,n),_=(()=>{const M={client:V(this,dc),queryKey:this.queryKey,meta:this.meta};return s(M),M})();return Fe(this,Tc,!1),this.options.persister?this.options.persister(N,_,this):N(_)},c=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:V(this,dc),state:this.state,fetchFn:o};return s(N),N})();(f=this.options.behavior)==null||f.onFetch(c,this),Fe(this,rE,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=c.fetchOptions)==null?void 0:h.meta))&&we(this,bs,Oo).call(this,{type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta}),Fe(this,hr,Lx({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:N=>{N instanceof pI&&N.revert&&this.setState({...V(this,rE),fetchStatus:"idle"}),r.abort()},onFail:(N,y)=>{we(this,bs,Oo).call(this,{type:"failed",failureCount:N,error:y})},onPause:()=>{we(this,bs,Oo).call(this,{type:"pause"})},onContinue:()=>{we(this,bs,Oo).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const N=await V(this,hr).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(S=(p=V(this,Js).config).onSuccess)==null||S.call(p,N,this),(m=(R=V(this,Js).config).onSettled)==null||m.call(R,N,this.state.error,this),N}catch(N){if(N instanceof pI){if(N.silent)return V(this,hr).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw we(this,bs,Oo).call(this,{type:"error",error:N}),(I=(g=V(this,Js).config).onError)==null||I.call(g,N,this),(L=(C=V(this,Js).config).onSettled)==null||L.call(C,this.state.data,N,this),N}finally{this.scheduleGc()}}},fc=new WeakMap,rE=new WeakMap,Js=new WeakMap,dc=new WeakMap,hr=new WeakMap,Kd=new WeakMap,Tc=new WeakMap,bs=new WeakSet,bx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Oo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Px(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Cb(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Fe(this,rE,t.manual?s:void 0),s;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),yr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),V(this,Js).notify({query:this,type:"updated",action:t})})},fx);function Px(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_x(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Cb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _b(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ts,jt,zd,qr,hc,sE,_o,Ba,qd,iE,oE,pc,Rc,Fa,aE,rn,Qf,RI,SI,mI,AI,gI,OI,II,vx,dx,Dx=(dx=class extends nT{constructor(t,n){super();$e(this,rn);$e(this,Ts);$e(this,jt);$e(this,zd);$e(this,qr);$e(this,hc);$e(this,sE);$e(this,_o);$e(this,Ba);$e(this,qd);$e(this,iE);$e(this,oE);$e(this,pc);$e(this,Rc);$e(this,Fa);$e(this,aE,new Set);this.options=n,Fe(this,Ts,t),Fe(this,Ba,null),Fe(this,_o,hI()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,jt).addObserver(this),Lb(V(this,jt),this.options)?we(this,rn,Qf).call(this):this.updateResult(),we(this,rn,AI).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return NI(V(this,jt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return NI(V(this,jt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,rn,gI).call(this),we(this,rn,OI).call(this),V(this,jt).removeObserver(this)}setOptions(t){const n=this.options,r=V(this,jt);if(this.options=V(this,Ts).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zs(this.options.enabled,V(this,jt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");we(this,rn,II).call(this),V(this,jt).setOptions(this.options),n._defaulted&&!fI(this.options,n)&&V(this,Ts).getQueryCache().notify({type:"observerOptionsUpdated",query:V(this,jt),observer:this});const s=this.hasListeners();s&&yb(V(this,jt),r,this.options,n)&&we(this,rn,Qf).call(this),this.updateResult(),s&&(V(this,jt)!==r||Zs(this.options.enabled,V(this,jt))!==Zs(n.enabled,V(this,jt))||Za(this.options.staleTime,V(this,jt))!==Za(n.staleTime,V(this,jt)))&&we(this,rn,RI).call(this);const o=we(this,rn,SI).call(this);s&&(V(this,jt)!==r||Zs(this.options.enabled,V(this,jt))!==Zs(n.enabled,V(this,jt))||o!==V(this,Fa))&&we(this,rn,mI).call(this,o)}getOptimisticResult(t){const n=V(this,Ts).getQueryCache().build(V(this,Ts),t),r=this.createResult(n,t);return KV(this,r)&&(Fe(this,qr,r),Fe(this,sE,this.options),Fe(this,hc,V(this,jt).state)),r}getCurrentResult(){return V(this,qr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&V(this,_o).status==="pending"&&V(this,_o).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){V(this,aE).add(t)}getCurrentQuery(){return V(this,jt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=V(this,Ts).defaultQueryOptions(t),r=V(this,Ts).getQueryCache().build(V(this,Ts),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return we(this,rn,Qf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),V(this,qr)))}createResult(t,n){var F;const r=V(this,jt),s=this.options,o=V(this,qr),l=V(this,hc),c=V(this,sE),f=t!==r?t.state:V(this,zd),{state:h}=t;let d={...h},p=!1,S;if(n._optimisticResults){const Y=this.hasListeners(),$=!Y&&Lb(t,n),W=Y&&yb(t,r,n,s);($||W)&&(d={...d,...Px(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:R,errorUpdatedAt:m,status:g}=d;S=d.data;let I=!1;if(n.placeholderData!==void 0&&S===void 0&&g==="pending"){let Y;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(Y=o.data,I=!0):Y=typeof n.placeholderData=="function"?n.placeholderData((F=V(this,oE))==null?void 0:F.state.data,V(this,oE)):n.placeholderData,Y!==void 0&&(g="success",S=TI(o==null?void 0:o.data,Y,n),p=!0)}if(n.select&&S!==void 0&&!I)if(o&&S===(l==null?void 0:l.data)&&n.select===V(this,qd))S=V(this,iE);else try{Fe(this,qd,n.select),S=n.select(S),S=TI(o==null?void 0:o.data,S,n),Fe(this,iE,S),Fe(this,Ba,null)}catch(Y){Fe(this,Ba,Y)}V(this,Ba)&&(R=V(this,Ba),S=V(this,iE),m=Date.now(),g="error");const C=d.fetchStatus==="fetching",L=g==="pending",N=g==="error",y=L&&C,_=S!==void 0,w={status:g,fetchStatus:d.fetchStatus,isPending:L,isSuccess:g==="success",isError:N,isInitialLoading:y,isLoading:y,data:S,dataUpdatedAt:d.dataUpdatedAt,error:R,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!L,isLoadingError:N&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:N&&_,isStale:EC(t,n),refetch:this.refetch,promise:V(this,_o),isEnabled:Zs(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Y=w.data!==void 0,$=w.status==="error"&&!Y,W=j=>{$?j.reject(w.error):Y&&j.resolve(w.data)},K=()=>{const j=Fe(this,_o,w.promise=hI());W(j)},q=V(this,_o);switch(q.status){case"pending":t.queryHash===r.queryHash&&W(q);break;case"fulfilled":($||w.data!==q.value)&&K();break;case"rejected":(!$||w.error!==q.reason)&&K();break}}return w}updateResult(){const t=V(this,qr),n=this.createResult(V(this,jt),this.options);if(Fe(this,hc,V(this,jt).state),Fe(this,sE,this.options),V(this,hc).data!==void 0&&Fe(this,oE,V(this,jt)),fI(n,t))return;Fe(this,qr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!V(this,aE).size)return!0;const l=new Set(o??V(this,aE));return this.options.throwOnError&&l.add("error"),Object.keys(V(this,qr)).some(c=>{const E=c;return V(this,qr)[E]!==t[E]&&l.has(E)})};we(this,rn,vx).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,rn,AI).call(this)}},Ts=new WeakMap,jt=new WeakMap,zd=new WeakMap,qr=new WeakMap,hc=new WeakMap,sE=new WeakMap,_o=new WeakMap,Ba=new WeakMap,qd=new WeakMap,iE=new WeakMap,oE=new WeakMap,pc=new WeakMap,Rc=new WeakMap,Fa=new WeakMap,aE=new WeakMap,rn=new WeakSet,Qf=function(t){we(this,rn,II).call(this);let n=V(this,jt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(hs)),n},RI=function(){we(this,rn,gI).call(this);const t=Za(this.options.staleTime,V(this,jt));if(Cd.isServer()||V(this,qr).isStale||!EI(t))return;const r=Ox(V(this,qr).dataUpdatedAt,t)+1;Fe(this,pc,tc.setTimeout(()=>{V(this,qr).isStale||this.updateResult()},r))},SI=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V(this,jt)):this.options.refetchInterval)??!1},mI=function(t){we(this,rn,OI).call(this),Fe(this,Fa,t),!(Cd.isServer()||Zs(this.options.enabled,V(this,jt))===!1||!EI(V(this,Fa))||V(this,Fa)===0)&&Fe(this,Rc,tc.setInterval(()=>{(this.options.refetchIntervalInBackground||cC.isFocused())&&we(this,rn,Qf).call(this)},V(this,Fa)))},AI=function(){we(this,rn,RI).call(this),we(this,rn,mI).call(this,we(this,rn,SI).call(this))},gI=function(){V(this,pc)&&(tc.clearTimeout(V(this,pc)),Fe(this,pc,void 0))},OI=function(){V(this,Rc)&&(tc.clearInterval(V(this,Rc)),Fe(this,Rc,void 0))},II=function(){const t=V(this,Ts).getQueryCache().build(V(this,Ts),this.options);if(t===V(this,jt))return;const n=V(this,jt);Fe(this,jt,t),Fe(this,zd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},vx=function(t){yr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(V(this,qr))}),V(this,Ts).getQueryCache().notify({query:V(this,jt),type:"observerResultsUpdated"})})},dx);function $V(e,t){return Zs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Lb(e,t){return $V(e,t)||e.state.data!==void 0&&NI(e,t,t.refetchOnMount)}function NI(e,t,n){if(Zs(t.enabled,e)!==!1&&Za(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&EC(e,t)}return!1}function yb(e,t,n,r){return(e!==t||Zs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&EC(e,n)}function EC(e,t){return Zs(t.enabled,e)!==!1&&e.isStaleByTime(Za(t.staleTime,e))}function KV(e,t){return!fI(e.getCurrentResult(),t)}function RR(e){return{onFetch:(t,n)=>{var h,d,p,S,R;const r=t.options,s=(p=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,o=((S=t.state.data)==null?void 0:S.pages)||[],l=((R=t.state.data)==null?void 0:R.pageParams)||[];let c={pages:[],pageParams:[]},E=0;const f=async()=>{let m=!1;const g=L=>{VV(L,()=>t.signal,()=>m=!0)},I=Nx(t.options,t.fetchOptions),C=async(L,N,y)=>{if(m)return Promise.reject();if(N==null&&L.pages.length)return Promise.resolve(L);const M=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:N,direction:y?"backward":"forward",meta:t.options.meta};return g($),$})(),w=await I(M),{maxPages:F}=t.options,Y=y?HV:FV;return{pages:Y(L.pages,w,F),pageParams:Y(L.pageParams,N,F)}};if(s&&o.length){const L=s==="backward",N=L?Mx:CI,y={pages:o,pageParams:l},_=N(r,y);c=await C(y,_,L)}else{const L=e??o.length;do{const N=E===0?l[0]??r.initialPageParam:CI(r,c);if(E>0&&N==null)break;c=await C(c,N),E++}while(E<L)}return c};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function CI(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Mx(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function zV(e,t){return t?CI(e,t)!=null:!1}function qV(e,t){return!t||!e.getPreviousPageParam?!1:Mx(e,t)!=null}var JV=class extends Dx{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:RR()})}getOptimisticResult(e){return e.behavior=RR(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var R,m;const{state:n}=e,r=super.createResult(e,t),{isFetching:s,isRefetching:o,isError:l,isRefetchError:c}=r,E=(m=(R=n.fetchMeta)==null?void 0:R.fetchMore)==null?void 0:m.direction,f=l&&E==="forward",h=s&&E==="forward",d=l&&E==="backward",p=s&&E==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:zV(t,n.data),hasPreviousPage:qV(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:c&&!f&&!d,isRefetching:o&&!h&&!p}}},Jd,Fi,Fr,Sc,Hi,_a,Tx,QV=(Tx=class extends yx{constructor(t){super();$e(this,Hi);$e(this,Jd);$e(this,Fi);$e(this,Fr);$e(this,Sc);Fe(this,Jd,t.client),this.mutationId=t.mutationId,Fe(this,Fr,t.mutationCache),Fe(this,Fi,[]),this.state=t.state||ZV(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){V(this,Fi).includes(t)||(V(this,Fi).push(t),this.clearGcTimeout(),V(this,Fr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Fe(this,Fi,V(this,Fi).filter(n=>n!==t)),this.scheduleGc(),V(this,Fr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){V(this,Fi).length||(this.state.status==="pending"?this.scheduleGc():V(this,Fr).remove(this))}continue(){var t;return((t=V(this,Sc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,E,f,h,d,p,S,R,m,g,I,C,L,N,y,_,M;const n=()=>{we(this,Hi,_a).call(this,{type:"continue"})},r={client:V(this,Jd),meta:this.options.meta,mutationKey:this.options.mutationKey};Fe(this,Sc,Lx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(w,F)=>{we(this,Hi,_a).call(this,{type:"failed",failureCount:w,error:F})},onPause:()=>{we(this,Hi,_a).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,Fr).canRun(this)}));const s=this.state.status==="pending",o=!V(this,Sc).canStart();try{if(s)n();else{we(this,Hi,_a).call(this,{type:"pending",variables:t,isPaused:o}),V(this,Fr).config.onMutate&&await V(this,Fr).config.onMutate(t,this,r);const F=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));F!==this.state.context&&we(this,Hi,_a).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const w=await V(this,Sc).start();return await((f=(E=V(this,Fr).config).onSuccess)==null?void 0:f.call(E,w,t,this.state.context,this,r)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,w,t,this.state.context,r)),await((S=(p=V(this,Fr).config).onSettled)==null?void 0:S.call(p,w,null,this.state.variables,this.state.context,this,r)),await((m=(R=this.options).onSettled)==null?void 0:m.call(R,w,null,t,this.state.context,r)),we(this,Hi,_a).call(this,{type:"success",data:w}),w}catch(w){try{await((I=(g=V(this,Fr).config).onError)==null?void 0:I.call(g,w,t,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((L=(C=this.options).onError)==null?void 0:L.call(C,w,t,this.state.context,r))}catch(F){Promise.reject(F)}try{await((y=(N=V(this,Fr).config).onSettled)==null?void 0:y.call(N,void 0,w,this.state.variables,this.state.context,this,r))}catch(F){Promise.reject(F)}try{await((M=(_=this.options).onSettled)==null?void 0:M.call(_,void 0,w,t,this.state.context,r))}catch(F){Promise.reject(F)}throw we(this,Hi,_a).call(this,{type:"error",error:w}),w}finally{V(this,Fr).runNext(this)}}},Jd=new WeakMap,Fi=new WeakMap,Fr=new WeakMap,Sc=new WeakMap,Hi=new WeakSet,_a=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),yr.batch(()=>{V(this,Fi).forEach(r=>{r.onMutationUpdate(t)}),V(this,Fr).notify({mutation:this,type:"updated",action:t})})},Tx);function ZV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lo,mi,Qd,hx,ek=(hx=class extends nT{constructor(t={}){super();$e(this,Lo);$e(this,mi);$e(this,Qd);this.config=t,Fe(this,Lo,new Set),Fe(this,mi,new Map),Fe(this,Qd,0)}build(t,n,r){const s=new QV({client:t,mutationCache:this,mutationId:++Ff(this,Qd)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){V(this,Lo).add(t);const n=rp(t);if(typeof n=="string"){const r=V(this,mi).get(n);r?r.push(t):V(this,mi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(V(this,Lo).delete(t)){const n=rp(t);if(typeof n=="string"){const r=V(this,mi).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&V(this,mi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=rp(t);if(typeof n=="string"){const r=V(this,mi).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=rp(t);if(typeof n=="string"){const s=(r=V(this,mi).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yr.batch(()=>{V(this,Lo).forEach(t=>{this.notify({type:"removed",mutation:t})}),V(this,Lo).clear(),V(this,mi).clear()})}getAll(){return Array.from(V(this,Lo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ob(n,r))}findAll(t={}){return this.getAll().filter(n=>Ob(t,n))}notify(t){yr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return yr.batch(()=>Promise.all(t.map(n=>n.continue().catch(hs))))}},Lo=new WeakMap,mi=new WeakMap,Qd=new WeakMap,hx);function rp(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vi,px,tk=(px=class extends nT{constructor(t={}){super();$e(this,Vi);this.config=t,Fe(this,Vi,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??uC(s,n);let l=this.get(o);return l||(l=new XV({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){V(this,Vi).has(t.queryHash)||(V(this,Vi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=V(this,Vi).get(t.queryHash);n&&(t.destroy(),n===t&&V(this,Vi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){yr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return V(this,Vi).get(t)}getAll(){return[...V(this,Vi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gb(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>gb(t,r)):n}notify(t){yr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){yr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){yr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Vi=new WeakMap,px),Mn,Ha,Va,lE,cE,ka,uE,EE,Rx,nk=(Rx=class{constructor(e={}){$e(this,Mn);$e(this,Ha);$e(this,Va);$e(this,lE);$e(this,cE);$e(this,ka);$e(this,uE);$e(this,EE);Fe(this,Mn,e.queryCache||new tk),Fe(this,Ha,e.mutationCache||new ek),Fe(this,Va,e.defaultOptions||{}),Fe(this,lE,new Map),Fe(this,cE,new Map),Fe(this,ka,0)}mount(){Ff(this,ka)._++,V(this,ka)===1&&(Fe(this,uE,cC.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Mn).onFocus())})),Fe(this,EE,pR.subscribe(async e=>{e&&(await this.resumePausedMutations(),V(this,Mn).onOnline())})))}unmount(){var e,t;Ff(this,ka)._--,V(this,ka)===0&&((e=V(this,uE))==null||e.call(this),Fe(this,uE,void 0),(t=V(this,EE))==null||t.call(this),Fe(this,EE,void 0))}isFetching(e){return V(this,Mn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return V(this,Ha).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Mn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=V(this,Mn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Za(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return V(this,Mn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=V(this,Mn).get(r.queryHash),o=s==null?void 0:s.state.data,l=wV(t,o);if(l!==void 0)return V(this,Mn).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return yr.batch(()=>V(this,Mn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=V(this,Mn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=V(this,Mn);yr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=V(this,Mn);return yr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=yr.batch(()=>V(this,Mn).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(hs).catch(hs)}invalidateQueries(e,t={}){return yr.batch(()=>(V(this,Mn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=yr.batch(()=>V(this,Mn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(hs)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(hs)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=V(this,Mn).build(this,t);return n.isStaleByTime(Za(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hs).catch(hs)}fetchInfiniteQuery(e){return e.behavior=RR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hs).catch(hs)}ensureInfiniteQueryData(e){return e.behavior=RR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pR.isOnline()?V(this,Ha).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Mn)}getMutationCache(){return V(this,Ha)}getDefaultOptions(){return V(this,Va)}setDefaultOptions(e){Fe(this,Va,e)}setQueryDefaults(e,t){V(this,lE).set(Id(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...V(this,lE).values()],n={};return t.forEach(r=>{Nd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){V(this,cE).set(Id(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...V(this,cE).values()],n={};return t.forEach(r=>{Nd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...V(this,Va).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=uC(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ol&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...V(this,Va).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){V(this,Mn).clear(),V(this,Ha).clear()}},Mn=new WeakMap,Ha=new WeakMap,Va=new WeakMap,lE=new WeakMap,cE=new WeakMap,ka=new WeakMap,uE=new WeakMap,EE=new WeakMap,Rx),xx=D.createContext(void 0),Ki=e=>{const t=D.useContext(xx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rk=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(xx.Provider,{value:e,children:t})),Ux=D.createContext(!1),sk=()=>D.useContext(Ux);Ux.Provider;function ik(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ok=D.createContext(ik()),ak=()=>D.useContext(ok),lk=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Cx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ck=e=>{D.useEffect(()=>{e.clearReset()},[e])},uk=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Cx(n,[e.error,r])),Ek=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fk=(e,t)=>e.isLoading&&e.isFetching&&!t,dk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,bb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wx(e,t,n){var p,S,R,m;const r=sk(),s=ak(),o=Ki(),l=o.defaultQueryOptions(e);(S=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||S.call(p,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",Ek(l),lk(l,s,c),ck(s);const E=!o.getQueryCache().get(l.queryHash),[f]=D.useState(()=>new t(o,l)),h=f.getOptimisticResult(l),d=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(g=>{const I=d?f.subscribe(yr.batchCalls(g)):hs;return f.updateResult(),I},[f,d]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),D.useEffect(()=>{f.setOptions(l)},[l,f]),dk(l,h))throw bb(l,f,s);if(uk({result:h,errorResetBoundary:s,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw h.error;if((m=(R=o.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||m.call(R,l,h),l.experimental_prefetchInRender&&!Cd.isServer()&&fk(h,r)){const g=E?bb(l,f,s):c==null?void 0:c.promise;g==null||g.catch(hs).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?h:f.trackResult(h)}function Gx(e,t){return wx(e,Dx)}function xc(e,t){return wx(e,JV)}var Zf=typeof window<"u"?D.useLayoutEffect:D.useEffect;function mg(e){const t=D.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Tk(e,t,n={},r={}){D.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{t(o)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function hk(e){const t=D.useRef(null);return D.useImperativeHandle(e,()=>t.current,[]),t}var pk=!1;function _d(e){return e[e.length-1]}function Rk(e){return typeof e=="function"}function $a(e,t){return Rk(e)?e(t):e}var Sk=Object.prototype.hasOwnProperty,Pb=Object.prototype.propertyIsEnumerable,mk=()=>Object.create(null),Yl=(e,t)=>Ka(e,t,mk);function Ka(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const s=t,o=Mb(e)&&Mb(s);if(!o&&!(SR(e)&&SR(s)))return s;const l=o?e:Db(e);if(!l)return s;const c=o?s:Db(s);if(!c)return s;const E=l.length,f=c.length,h=o?new Array(f):n();let d=0;for(let p=0;p<f;p++){const S=o?p:c[p],R=e[S],m=s[S];if(R===m){h[S]=R,(o?p<E:Sk.call(e,S))&&d++;continue}if(R===null||m===null||typeof R!="object"||typeof m!="object"){h[S]=m;continue}const g=Ka(R,m,n,r+1);h[S]=g,g===R&&d++}return E===f&&d===E?e:h}function Db(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!Pb.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const s of n){if(!Pb.call(e,s))return!1;r.push(s)}return r}function SR(e){if(!vb(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!vb(n)||!n.hasOwnProperty("isPrototypeOf"))}function vb(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nc(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!Nc(e[r],t[r],n))return!1;return!0}if(SR(e)&&SR(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Nc(e[l],t[l],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&s++;let o=0;for(const l in t)if((!r||t[l]!==void 0)&&(o++,o>s||!Nc(e[l],t[l],n)))return!1;return s===o}return!1}function TE(e){let t,n;const r=new Promise((s,o)=>{t=s,n=o});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e==null||e(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Ld(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Ak(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function xb(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Ak(t)}var gk=["http:","https:","mailto:","tel:"];function mR(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function kf(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",s;for(;(s=t.exec(e))!==null;)r+=xb(e.slice(n,s.index))+s[0],n=t.lastIndex;r=r+xb(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Ok(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ik(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Uo(){throw new Error("Invariant failed")}function yd(e){const t=new Map;let n,r;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const l=t.get(o);if(l)return s(l),l.value},set(o,l){if(t.size>=e&&n){const E=n;t.delete(E.key),E.next&&(n=E.next,E.next.prev=void 0),E===r&&(r=void 0)}const c=t.get(o);if(c)c.value=l,s(c);else{const E={key:o,value:l,prev:r};r&&(r.next=E),r=E,n||(n=E),t.set(o,E)}},clear(){t.clear(),n=void 0,r=void 0}}}var nc=4,Bx=5;function Nk(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function fC(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,o=e.substring(t,s);if(!o||!o.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(o==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const l=Nk(o);if(l){const[c,E]=l,f=o.charCodeAt(c+1);if(f===45){if(c+2<o.length&&o.charCodeAt(c+2)===36){const h=c+3,d=E;if(h<d)return n[0]=3,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+E+1,n[5]=s,n}}else if(f===36){const h=c+1,d=c+2;return d===E?(n[0]=2,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+E+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+d,n[3]=t+E,n[4]=t+E+1,n[5]=s,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function pS(e,t,n,r,s,o,l){var E,f,h,d,p,S,R,m,g,I,C,L,N;l==null||l(n);let c=r;{const y=n.fullPath??n.from,_=y.length,M=((E=n.options)==null?void 0:E.caseSensitive)??e,w=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((p=(d=n.options)==null?void 0:d.skipRouteOnParseError)!=null&&p.params));for(;c<_;){const Y=fC(y,c,t);let $;const W=c,K=Y[5];switch(c=K+1,o++,Y[0]){case 0:{const q=y.substring(Y[2],Y[3]);if(M){const j=(S=s.static)==null?void 0:S.get(q);if(j)$=j;else{s.static??(s.static=new Map);const k=rc(n.fullPath??n.from);k.parent=s,k.depth=o,$=k,s.static.set(q,k)}}else{const j=q.toLowerCase(),k=(R=s.staticInsensitive)==null?void 0:R.get(j);if(k)$=k;else{s.staticInsensitive??(s.staticInsensitive=new Map);const z=rc(n.fullPath??n.from);z.parent=s,z.depth=o,$=z,s.staticInsensitive.set(j,z)}}break}case 1:{const q=y.substring(W,Y[1]),j=y.substring(Y[4],K),k=M&&!!(q||j),z=q?k?q:q.toLowerCase():void 0,Z=j?k?j:j.toLowerCase():void 0,ie=!w&&((m=s.dynamic)==null?void 0:m.find(ne=>!ne.skipOnParamError&&ne.caseSensitive===k&&ne.prefix===z&&ne.suffix===Z));if(ie)$=ie;else{const ne=gg(1,n.fullPath??n.from,k,z,Z);$=ne,ne.depth=o,ne.parent=s,s.dynamic??(s.dynamic=[]),s.dynamic.push(ne)}break}case 3:{const q=y.substring(W,Y[1]),j=y.substring(Y[4],K),k=M&&!!(q||j),z=q?k?q:q.toLowerCase():void 0,Z=j?k?j:j.toLowerCase():void 0,ie=!w&&((g=s.optional)==null?void 0:g.find(ne=>!ne.skipOnParamError&&ne.caseSensitive===k&&ne.prefix===z&&ne.suffix===Z));if(ie)$=ie;else{const ne=gg(3,n.fullPath??n.from,k,z,Z);$=ne,ne.parent=s,ne.depth=o,s.optional??(s.optional=[]),s.optional.push(ne)}break}case 2:{const q=y.substring(W,Y[1]),j=y.substring(Y[4],K),k=M&&!!(q||j),z=q?k?q:q.toLowerCase():void 0,Z=j?k?j:j.toLowerCase():void 0,ie=gg(2,n.fullPath??n.from,k,z,Z);$=ie,ie.parent=s,ie.depth=o,s.wildcard??(s.wildcard=[]),s.wildcard.push(ie)}}s=$}if(w&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const Y=rc(n.fullPath??n.from);Y.kind=Bx,Y.parent=s,o++,Y.depth=o,s.pathless??(s.pathless=[]),s.pathless.push(Y),s=Y}const F=(n.path||!n.children)&&!n.isRoot;if(F&&y.endsWith("/")){const Y=rc(n.fullPath??n.from);Y.kind=nc,Y.parent=s,o++,Y.depth=o,s.index=Y,s=Y}s.parse=((C=(I=n.options)==null?void 0:I.params)==null?void 0:C.parse)??null,s.skipOnParamError=w,s.parsingPriority=((N=(L=n.options)==null?void 0:L.skipRouteOnParseError)==null?void 0:N.priority)??0,F&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const y of n.children)pS(e,t,y,c,s,o,l)}function Ag(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function va(e){var t,n,r;if(e.pathless)for(const s of e.pathless)va(s);if(e.static)for(const s of e.static.values())va(s);if(e.staticInsensitive)for(const s of e.staticInsensitive.values())va(s);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Ag);for(const s of e.dynamic)va(s)}if((n=e.optional)!=null&&n.length){e.optional.sort(Ag);for(const s of e.optional)va(s)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(Ag);for(const s of e.wildcard)va(s)}}function rc(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function gg(e,t,n,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:s}}function Ck(e,t){const n=rc("/"),r=new Uint16Array(6);for(const s of e)pS(!1,r,s,1,n,0);va(n),t.masksTree=n,t.flatCache=yd(1e3)}function _k(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=dC(e,t.masksTree);return t.flatCache.set(e,r),r}function Lk(e,t,n,r,s){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let l=s.singleCache.get(o);return l||(l=rc("/"),pS(t,new Uint16Array(6),{from:e},1,l,0),s.singleCache.set(o,l)),dC(r,l,n)}function yk(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let o;try{o=dC(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=Dk(o.route)),t.matchCache.set(r,o),o}function bk(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Pk(e,t=!1,n){const r=rc(e.fullPath),s=new Uint16Array(6),o={},l={};let c=0;return pS(t,s,e,1,r,0,E=>{if(n==null||n(E,c),E.id in o&&Uo(),o[E.id]=E,c!==0&&E.path){const f=bk(E.fullPath);(!l[f]||E.fullPath.endsWith("/"))&&(l[f]=E)}c++}),va(r),{processedTree:{segmentTree:r,singleCache:yd(1e3),matchCache:yd(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function dC(e,t,n=!1){const r=e.split("/"),s=Mk(e,r,t,n);if(!s)return null;const[o]=Fx(e,r,s);return{route:s.node.route,rawParams:o,parsedParams:s.parsedParams}}function Fx(e,t,n){var h,d,p,S,R,m,g,I,C,L;const r=vk(n.node);let s=null;const o=Object.create(null);let l=((h=n.extract)==null?void 0:h.part)??0,c=((d=n.extract)==null?void 0:d.node)??0,E=((p=n.extract)==null?void 0:p.path)??0,f=((S=n.extract)==null?void 0:S.segment)??0;for(;c<r.length;l++,c++,E++,f++){const N=r[c];if(N.kind===nc)break;if(N.kind===Bx){f--,l--,E--;continue}const y=t[l],_=E;if(y&&(E+=y.length),N.kind===1){s??(s=n.node.fullPath.split("/"));const M=s[f],w=((R=N.prefix)==null?void 0:R.length)??0;if(M.charCodeAt(w)===123){const F=((m=N.suffix)==null?void 0:m.length)??0,Y=M.substring(w+2,M.length-F-1),$=y.substring(w,y.length-F);o[Y]=decodeURIComponent($)}else{const F=M.substring(1);o[F]=decodeURIComponent(y)}}else if(N.kind===3){if(n.skipped&1<<c){l--,E=_-1;continue}s??(s=n.node.fullPath.split("/"));const M=s[f],w=((g=N.prefix)==null?void 0:g.length)??0,F=((I=N.suffix)==null?void 0:I.length)??0,Y=M.substring(w+3,M.length-F-1),$=N.suffix||N.prefix?y.substring(w,y.length-F):y;$&&(o[Y]=decodeURIComponent($))}else if(N.kind===2){const M=N,w=e.substring(_+(((C=M.prefix)==null?void 0:C.length)??0),e.length-(((L=M.suffix)==null?void 0:L.length)??0)),F=decodeURIComponent(w);o["*"]=F,o._splat=F;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:l,node:c,path:E,segment:f}]}function Dk(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function vk(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Mk(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!_d(t),o=s&&e!=="/",l=t.length-(s?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let E=null,f=null,h=null;for(;c.length;){const d=c.pop(),{node:p,index:S,skipped:R,depth:m,statics:g,dynamics:I,optionals:C}=d;let{extract:L,rawParams:N,parsedParams:y}=d;if(p.skipOnParamError){if(!Og(e,t,d))continue;N=d.rawParams,L=d.extract,y=d.parsedParams}r&&p.route&&p.kind!==nc&&Yf(f,d)&&(f=d);const _=S===l;if(_&&(p.route&&!o&&Yf(h,d)&&(h=d),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const M=_?void 0:t[S];let w;if(_&&p.index){const F={node:p.index,index:S,skipped:R,depth:m+1,statics:g,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y};let Y=!0;if(p.index.skipOnParamError&&(Og(e,t,F)||(Y=!1)),Y){if(g===l&&!I&&!C&&!R)return F;Yf(h,F)&&(h=F)}}if(p.wildcard&&Yf(E,d))for(const F of p.wildcard){const{prefix:Y,suffix:$}=F;if(Y&&(_||!(F.caseSensitive?M:w??(w=M.toLowerCase())).startsWith(Y)))continue;if($){if(_)continue;const K=t.slice(S).join("/").slice(-$.length);if((F.caseSensitive?K:K.toLowerCase())!==$)continue}const W={node:F,index:l,skipped:R,depth:m,statics:g,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y};if(!(F.skipOnParamError&&!Og(e,t,W))){E=W;break}}if(p.optional){const F=R|1<<m,Y=m+1;for(let $=p.optional.length-1;$>=0;$--){const W=p.optional[$];c.push({node:W,index:S,skipped:F,depth:Y,statics:g,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y})}if(!_)for(let $=p.optional.length-1;$>=0;$--){const W=p.optional[$],{prefix:K,suffix:q}=W;if(K||q){const j=W.caseSensitive?M:w??(w=M.toLowerCase());if(K&&!j.startsWith(K)||q&&!j.endsWith(q))continue}c.push({node:W,index:S+1,skipped:R,depth:Y,statics:g,dynamics:I,optionals:C+1,extract:L,rawParams:N,parsedParams:y})}}if(!_&&p.dynamic&&M)for(let F=p.dynamic.length-1;F>=0;F--){const Y=p.dynamic[F],{prefix:$,suffix:W}=Y;if($||W){const K=Y.caseSensitive?M:w??(w=M.toLowerCase());if($&&!K.startsWith($)||W&&!K.endsWith(W))continue}c.push({node:Y,index:S+1,skipped:R,depth:m+1,statics:g,dynamics:I+1,optionals:C,extract:L,rawParams:N,parsedParams:y})}if(!_&&p.staticInsensitive){const F=p.staticInsensitive.get(w??(w=M.toLowerCase()));F&&c.push({node:F,index:S+1,skipped:R,depth:m+1,statics:g+1,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y})}if(!_&&p.static){const F=p.static.get(M);F&&c.push({node:F,index:S+1,skipped:R,depth:m+1,statics:g+1,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y})}if(p.pathless){const F=m+1;for(let Y=p.pathless.length-1;Y>=0;Y--){const $=p.pathless[Y];c.push({node:$,index:S,skipped:R,depth:F,statics:g,dynamics:I,optionals:C,extract:L,rawParams:N,parsedParams:y})}}}if(h&&E)return Yf(E,h)?h:E;if(h)return h;if(E)return E;if(r&&f){let d=f.index;for(let S=0;S<f.index;S++)d+=t[S].length;const p=d===e.length?"/":e.slice(d);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(p),f}return null}function Og(e,t,n){try{const[r,s]=Fx(e,t,n);n.rawParams=r,n.extract=s;const o=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,o),!0}catch{return null}}function Yf(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===nc)>(e.node.kind===nc)||t.node.kind===nc==(e.node.kind===nc)&&t.depth>e.depth))):!0}function Vp(e){return TC(e.filter(t=>t!==void 0).join("/"))}function TC(e){return e.replace(/\/{2,}/g,"/")}function Hx(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function el(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Vx(e){return el(Hx(e))}function AR(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function xk(e,t,n){return AR(e,n)===AR(t,n)}function Uk({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),o=!s&&t===".";let l;if(r){l=s?t:o?e:e+"\0"+t;const d=r.get(l);if(d)return d}let c;if(o)c=e.split("/");else if(s)c=t.split("/");else{for(c=e.split("/");c.length>1&&_d(c)==="";)c.pop();const d=t.split("/");for(let p=0,S=d.length;p<S;p++){const R=d[p];R===""?p?p===S-1&&c.push(R):c=[R]:R===".."?c.pop():R==="."||c.push(R)}}c.length>1&&(_d(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));let E,f="";for(let d=0;d<c.length;d++){d>0&&(f+="/");const p=c[d];if(!p)continue;E=fC(p,0,E);const S=E[0];if(S===0){f+=p;continue}const R=E[5],m=p.substring(0,E[1]),g=p.substring(E[4],R),I=p.substring(E[2],E[3]);S===1?f+=m||g?`${m}{$${I}}${g}`:`$${I}`:S===2?f+=m||g?`${m}{$}${g}`:"$":f+=`${m}{-$${I}}${g}`}f=TC(f);const h=f||"/";return l&&r&&r.set(l,h),h}function wk(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,o=>t.get(o)??o)}function Ig(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>wb(s,n)).join("/"):wb(r,n)}function Ub({path:e,params:t,decoder:n,...r}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const l=e.length;let c=0,E,f="";for(;c<l;){const h=c;E=fC(e,h,E);const d=E[5];if(c=d+1,h===d)continue;const p=E[0];if(p===0){f+="/"+e.substring(h,d);continue}if(p===2){const S=t._splat;o._splat=S,o["*"]=S;const R=e.substring(h,E[1]),m=e.substring(E[4],d);if(!S){s=!0,(R||m)&&(f+="/"+R+m);continue}const g=Ig("_splat",t,n);f+="/"+R+g+m;continue}if(p===1){const S=e.substring(E[2],E[3]);!s&&!(S in t)&&(s=!0),o[S]=t[S];const R=e.substring(h,E[1]),m=e.substring(E[4],d),g=Ig(S,t,n)??"undefined";f+="/"+R+g+m;continue}if(p===3){const S=e.substring(E[2],E[3]),R=t[S];if(R==null)continue;o[S]=R;const m=e.substring(h,E[1]),g=e.substring(E[4],d),I=Ig(S,t,n)??"";f+="/"+m+I+g;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function wb(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function rs(e){return!!(e!=null&&e.isNotFound)}function Gk(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}var _I="tsr-scroll-restoration-v1_3",Bk=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function Fk(){const e=Gk();if(!e)return null;const t=e.getItem(_I);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=$a(r,n)||n;try{e.setItem(_I,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}var sp=Fk(),Hk=e=>e.state.__TSR_key||e.href;function Vk(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}var gR=!1;function kk({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:s,location:o}){var f,h;let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(d){console.error(d);return}const c=t||((f=window.history.state)==null?void 0:f.__TSR_key),E=l[c];gR=!0;e:{if(r&&E&&Object.keys(E).length>0){for(const S in E){const R=E[S];if(S==="window")window.scrollTo({top:R.scrollY,left:R.scrollX,behavior:n});else if(S){const m=document.querySelector(S);m&&(m.scrollLeft=R.scrollX,m.scrollTop=R.scrollY)}}break e}const d=(o??window.location).hash.split("#",2)[1];if(d){const S=((h=window.history.state)==null?void 0:h.__hashScrollIntoViewOptions)??!0;if(S){const R=document.getElementById(d);R&&R.scrollIntoView(S)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),s)for(const S of s){if(S==="window")continue;const R=typeof S=="function"?S():document.querySelector(S);R&&R.scrollTo(p)}}gR=!1}function Yk(e,t){if(!sp||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!sp))return;e.isScrollRestorationSetup=!0,gR=!1;const n=e.options.getScrollRestorationKey||Hk;window.history.scrollRestoration="manual";const r=s=>{if(gR||!e.isScrollRestoring)return;let o="";if(s.target===document||s.target===window)o="window";else{const c=s.target.getAttribute("data-scroll-restoration-id");c?o=`[data-scroll-restoration-id="${c}"]`:o=Vk(s.target)}const l=n(e.stores.location.state);sp.set(c=>{const E=c[l]||(c[l]={}),f=E[o]||(E[o]={});if(o==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(o){const h=document.querySelector(o);h&&(f.scrollX=h.scrollLeft||0,f.scrollY=h.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",Bk(r,100),!0),e.subscribe("onRendered",s=>{const o=n(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(kk({storageKey:_I,key:o,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&sp.set(l=>(l[o]||(l[o]={}),l)))})}function Wk(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.state,n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function jk(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function Ng(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Xk(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,s]of t.entries()){const o=n[r];o==null?n[r]=Ng(s):Array.isArray(o)?o.push(Ng(s)):n[r]=[o,Ng(s)]}return n}var $k=zk(JSON.parse),Kk=qk(JSON.stringify,JSON.parse);function zk(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Xk(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function qk(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=jk(s,r);return o?`?${o}`:""}}var Cc="__root__";function Jk(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ps(e){return e instanceof Response&&!!e.options}function Qk(e){return{input:({url:t})=>{for(const n of e)t=LI(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=kx(e[n],t);return t}}}function Zk(e){const t=Vx(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===s?l.pathname="/":c.startsWith(o)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Vp(["/",t,l.pathname]),l)}}function LI(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function kx(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function eY(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:o}=t,l=new Map,c=new Map,E=new Map,f=n(e.status),h=n(e.loadedAt),d=n(e.isLoading),p=n(e.isTransitioning),S=n(e.location),R=n(e.resolvedLocation),m=n(e.statusCode),g=n(e.redirect),I=n([]),C=n([]),L=n([]),N=r(()=>Cg(l,I.state)),y=r(()=>Cg(c,C.state)),_=r(()=>Cg(E,L.state)),M=r(()=>I.state[0]),w=r(()=>I.state.some(z=>{var Z;return((Z=l.get(z))==null?void 0:Z.state.status)==="pending"})),F=r(()=>{var z;return{locationHref:S.state.href,resolvedLocationHref:(z=R.state)==null?void 0:z.href,status:f.state}}),Y=r(()=>({status:f.state,loadedAt:h.state,isLoading:d.state,isTransitioning:p.state,matches:N.state,location:S.state,resolvedLocation:R.state,statusCode:m.state,redirect:g.state})),$=yd(64);function W(z){let Z=$.get(z);return Z||(Z=r(()=>{const ie=I.state;for(const ne of ie){const B=l.get(ne);if(B&&B.routeId===z)return B.state}}),$.set(z,Z)),Z}const K={status:f,loadedAt:h,isLoading:d,isTransitioning:p,location:S,resolvedLocation:R,statusCode:m,redirect:g,matchesId:I,pendingMatchesId:C,cachedMatchesId:L,activeMatchesSnapshot:N,pendingMatchesSnapshot:y,cachedMatchesSnapshot:_,firstMatchId:M,hasPendingMatches:w,matchRouteReactivity:F,activeMatchStoresById:l,pendingMatchStoresById:c,cachedMatchStoresById:E,__store:Y,getMatchStoreByRouteId:W,setActiveMatches:q,setPendingMatches:j,setCachedMatches:k};q(e.matches),o==null||o(K);function q(z){_g(z,l,I,n,s)}function j(z){_g(z,c,C,n,s)}function k(z){_g(z,E,L,n,s)}return K}function Cg(e,t){const n=[];for(const r of t){const s=e.get(r);s&&n.push(s.state)}return n}function _g(e,t,n,r,s){const o=e.map(c=>c.id),l=new Set(o);s(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const E=t.get(c.id);if(!E){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}E.routeId=c.routeId,E.state!==c&&E.setState(()=>c)}Ik(n.state,o)||n.setState(()=>o)})}var yI=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},tY=e=>e.stores.matchesId.state.some(t=>{var n;return(n=e.stores.activeMatchStoresById.get(t))==null?void 0:n.state._forcePending}),RS=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),_c=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let o=0;o<=s;o++){const l=e.matches[o];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},Gb=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),s=r>=0?r:0;let o=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=s);for(let l=o;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?o:s},za=(e,t,n)=>{var r,s,o;if(!(!ps(n)&&!rs(n)))throw ps(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(s=t._nonReactive.loaderPromise)==null||s.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,l=>({...l,status:ps(n)?"redirected":l.status==="pending"?"success":l.status,context:_c(e,t.index),isFetching:!1,error:n})),rs(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),ps(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Yx=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Bb=(e,t,n)=>{const r=_c(e,n);e.updateMatch(t,s=>({...s,context:r}))},Wf=(e,t,n,r)=>{var c,E;const{id:s,routeId:o}=e.matches[t],l=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),za(e,e.router.getMatch(s),n);try{(E=(c=l.options).onError)==null||E.call(c,n)}catch(f){n=f,za(e,e.router.getMatch(s),n)}e.updateMatch(s,f=>{var h,d;return(h=f._nonReactive.beforeLoadPromise)==null||h.resolve(),f._nonReactive.beforeLoadPromise=void 0,(d=f._nonReactive.loadPromise)==null||d.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!ps(n)&&!rs(n)&&(e.serialError??(e.serialError=n))},Wx=(e,t,n,r)=>{var o;if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!RS(e,t)&&(n.options.loader||n.options.beforeLoad||Xx(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const l=setTimeout(()=>{yI(e)},s);r._nonReactive.pendingTimeout=l}},nY=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Wx(e,t,n,r);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&za(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},rY=(e,t,n,r)=>{const s=e.router.getMatch(t);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=TE(()=>{o==null||o.resolve(),o=void 0});const{paramsError:l,searchError:c}=s;l&&Wf(e,n,l,"PARSE_PARAMS"),c&&Wf(e,n,c,"VALIDATE_SEARCH"),Wx(e,t,r,s);const E=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:E})))},d=()=>{var N;(N=s._nonReactive.beforeLoadPromise)==null||N.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,y=>({...y,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),d()});return}s._nonReactive.beforeLoadPromise=TE();const p={..._c(e,n,!1),...s.__routeContext},{search:S,params:R,cause:m}=s,g=RS(e,t),I={search:S,abortController:E,params:R,preload:g,context:p,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?"preload":m,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},C=N=>{if(N===void 0){e.router.batch(()=>{h(),d()});return}(ps(N)||rs(N))&&(h(),Wf(e,n,N,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,y=>({...y,__beforeLoadContext:N})),d()})};let L;try{if(L=r.options.beforeLoad(I),Ld(L))return h(),L.catch(N=>{Wf(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){h(),Wf(e,n,N,"BEFORE_LOAD")}C(L)},sY=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],o=()=>c(),l=()=>rY(e,n,t,s),c=()=>{if(Yx(e,n))return;const E=nY(e,n,s);return Ld(E)?E.then(l):l()};return o()},iY=(e,t,n)=>{var o,l,c,E,f,h;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(l=(o=n.options).head)==null?void 0:l.call(o,s),(E=(c=n.options).scripts)==null?void 0:E.call(c,s),(h=(f=n.options).headers)==null?void 0:h.call(f,s)]).then(([d,p,S])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:S,scripts:p,styles:d==null?void 0:d.styles}))},jx=(e,t,n,r,s)=>{const o=t[r-1],{params:l,loaderDeps:c,abortController:E,cause:f}=e.router.getMatch(n),h=_c(e,r),d=RS(e,n);return{params:l,deps:c,preload:!!d,parentMatchPromise:o,abortController:E,context:h,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:d?"preload":f,route:s,...e.router.options.additionalContext}},Fb=async(e,t,n,r,s)=>{var o,l,c,E,f;try{const h=e.router.getMatch(n);try{(!(pk??e.router.isServer)||h.ssr===!0)&&bd(s);const d=s.options.loader,p=typeof d=="function"?d:d==null?void 0:d.handler,S=p==null?void 0:p(jx(e,t,n,r,s)),R=!!p&&Ld(S);if((R||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,g=>({...g,isFetching:"loader"})),p){const g=R?await S:S;za(e,e.router.getMatch(n),g),g!==void 0&&e.updateMatch(n,I=>({...I,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const m=h._nonReactive.minPendingPromise;m&&await m,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,g=>({...g,error:void 0,context:_c(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let p=d;if((p==null?void 0:p.name)==="AbortError"){if(h.abortController.signal.aborted){(o=h._nonReactive.loaderPromise)==null||o.resolve(),h._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,R=>({...R,status:R.status==="pending"?"success":R.status,isFetching:!1,context:_c(e,r)}));return}const S=h._nonReactive.minPendingPromise;S&&await S,rs(d)&&await((c=(l=s.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:c.call(l)),za(e,e.router.getMatch(n),d);try{(f=(E=s.options).onError)==null||f.call(E,d)}catch(R){p=R,za(e,e.router.getMatch(n),R)}!ps(p)&&!rs(p)&&await bd(s,["errorComponent"]),e.updateMatch(n,R=>({...R,error:p,context:_c(e,r),status:"error",isFetching:!1}))}}catch(h){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),za(e,d,h)}},oY=async(e,t,n)=>{var S,R,m,g;async function r(I,C,L,N,y){const _=Date.now()-C.updatedAt,M=I?y.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:y.options.staleTime??e.router.options.defaultStaleTime??0,w=y.options.shouldReload,F=typeof w=="function"?w(jx(e,t,s,n,y)):w,{status:Y,invalid:$}=N,W=_>=M&&(!!e.forceStaleReload||N.cause==="enter"||L!==void 0&&L!==N.id);l=Y==="success"&&($||(F??W)),I&&y.options.preload===!1||(l&&!e.sync&&h?(c=!0,(async()=>{var K,q;try{await Fb(e,t,s,n,y);const j=e.router.getMatch(s);(K=j._nonReactive.loaderPromise)==null||K.resolve(),(q=j._nonReactive.loadPromise)==null||q.resolve(),j._nonReactive.loaderPromise=void 0,j._nonReactive.loadPromise=void 0}catch(j){ps(j)&&await e.router.navigate(j.options)}})()):Y!=="success"||l?await Fb(e,t,s,n,y):Bb(e,s,n))}const{id:s,routeId:o}=e.matches[n];let l=!1,c=!1;const E=e.router.looseRoutesById[o],f=E.options.loader,h=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Yx(e,s)){if(!e.router.getMatch(s))return e.matches[n];Bb(e,s,n)}else{const I=e.router.getMatch(s),C=e.router.stores.matchesId.state[n],L=((S=C&&e.router.stores.activeMatchStoresById.get(C)||null)==null?void 0:S.routeId)===o?C:(R=e.router.stores.activeMatchesSnapshot.state.find(y=>y.routeId===o))==null?void 0:R.id,N=RS(e,s);if(I._nonReactive.loaderPromise){if(I.status==="success"&&!e.sync&&!I.preload&&h)return I;await I._nonReactive.loaderPromise;const y=e.router.getMatch(s),_=y._nonReactive.error||y.error;_&&za(e,y,_),y.status==="pending"&&await r(N,I,L,y,E)}else{const y=N&&!e.router.stores.activeMatchStoresById.has(s),_=e.router.getMatch(s);_._nonReactive.loaderPromise=TE(),y!==_.preload&&e.updateMatch(s,M=>({...M,preload:y})),await r(N,I,L,_,E)}}const d=e.router.getMatch(s);c||((m=d._nonReactive.loaderPromise)==null||m.resolve(),(g=d._nonReactive.loadPromise)==null||g.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,c||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const p=c?d.isFetching:!1;return p!==d.isFetching||d.invalid!==!1?(e.updateMatch(s,I=>({...I,isFetching:p,invalid:!1})),e.router.getMatch(s)):d};async function Hb(e){var p,S;const t=e,n=[];tY(t.router)&&yI(t);let r;for(let R=0;R<t.matches.length;R++){try{const m=sY(t,R);Ld(m)&&await m}catch(m){if(ps(m))throw m;if(rs(m))r=m;else if(!t.preload)throw m;break}if(t.serialError)break}const s=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?Gb(t,r):void 0,l=r&&t.preload?0:o!==void 0?Math.min(o+1,s):s;let c,E;for(let R=0;R<l;R++)n.push(oY(t,n,R));try{await Promise.all(n)}catch{const R=await Promise.allSettled(n);for(const m of R){if(m.status!=="rejected")continue;const g=m.reason;if(ps(g))throw g;rs(g)?c??(c=g):E??(E=g)}if(E!==void 0)throw E}const f=c??(r&&!t.preload?r:void 0);let h=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const R=Gb(t,f);R===void 0&&Uo();const m=t.matches[R],g=t.router.looseRoutesById[m.routeId],I=(p=t.router.options)==null?void 0:p.defaultNotFoundComponent;!g.options.notFoundComponent&&I&&(g.options.notFoundComponent=I),f.routeId=m.routeId;const C=m.routeId===t.router.routeTree.id;t.updateMatch(m.id,L=>({...L,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=R,await bd(g,["notFoundComponent"])}else if(!t.preload){const R=t.matches[0];R.globalNotFound||(S=t.router.getMatch(R.id))!=null&&S.globalNotFound&&t.updateMatch(R.id,m=>({...m,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const R=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await bd(R,["errorComponent"])}for(let R=0;R<=h;R++){const{id:m,routeId:g}=t.matches[R],I=t.router.looseRoutesById[g];try{const C=iY(t,m,I);if(C){const L=await C;t.updateMatch(m,N=>({...N,...L}))}}catch(C){console.error(`Error executing head for route ${g}:`,C)}}const d=yI(t);if(Ld(d)&&await d,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Vb(e,t){const n=t.map(r=>{var s,o;return(o=(s=e.options[r])==null?void 0:s.preload)==null?void 0:o.call(s)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function bd(e,t=kp){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:s,...o}=r.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===kp?(()=>{if(e._componentsPromise===void 0){const r=Vb(e,kp);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Vb(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Xx(e){var t;for(const n of kp)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var kp=["component","errorComponent","pendingComponent","notFoundComponent"],tl="__TSR_index",kb="popstate",Yb="beforeunload";function aY(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},s=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},o=async({task:l,navigateOpts:c,...E})=>{var d,p;if((c==null?void 0:c.ignoreBlocker)??!1){l();return}const f=((d=e.getBlockers)==null?void 0:d.call(e))??[],h=E.type==="PUSH"||E.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const S of f){const R=IR(E.path,E.state);if(await S.blockerFn({currentLocation:t,nextLocation:R,action:E.type})){(p=e.onBlocked)==null||p.call(e);return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,E)=>{const f=t.state[tl];c=Wb(f+1,c),o({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:E,type:"PUSH",path:l,state:c})},replace:(l,c,E)=>{const f=t.state[tl];c=Wb(f,c),o({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:E,type:"REPLACE",path:l,state:c})},go:(l,c)=>{o({task:()=>{e.go(l),s({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{o({task:()=>{e.back((l==null?void 0:l.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{o({task:()=>{e.forward((l==null?void 0:l.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[tl]!==0,createHref:l=>e.createHref(l),block:l=>{var E;if(!e.setBlockers)return()=>{};const c=((E=e.getBlockers)==null?void 0:E.call(e))??[];return e.setBlockers([...c,l]),()=>{var h,d;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(d=e.setBlockers)==null||d.call(e,f.filter(p=>p!==l))}},flush:()=>{var l;return(l=e.flush)==null?void 0:l.call(e)},destroy:()=>{var l;return(l=e.destroy)==null?void 0:l.call(e)},notify:r}}function Wb(e,t){t||(t={});const n=hC();return{...t,key:n,__TSR_key:n,[tl]:e}}function lY(e){var w,F;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const o=()=>s,l=Y=>s=Y,c=(Y=>Y),E=(()=>IR(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((w=t.history.state)!=null&&w.__TSR_key)&&!((F=t.history.state)!=null&&F.key)){const Y=hC();t.history.replaceState({[tl]:0,key:Y,__TSR_key:Y},"")}let f=E(),h,d=!1,p=!1,S=!1,R=!1;const m=()=>f;let g,I;const C=()=>{g&&(M._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,"",g.href),M._ignoreSubscribers=!1,g=void 0,I=void 0,h=void 0)},L=(Y,$,W)=>{const K=c($);I||(h=f),f=IR($,W),g={href:K,state:W,isPush:(g==null?void 0:g.isPush)||Y==="push"},I||(I=Promise.resolve().then(()=>C()))},N=Y=>{f=E(),M.notify({type:Y})},y=async()=>{if(p){p=!1;return}const Y=E(),$=Y.state[tl]-f.state[tl],W=$===1,K=$===-1,q=!W&&!K||d;d=!1;const j=q?"GO":K?"BACK":"FORWARD",k=q?{type:"GO",index:$}:{type:K?"BACK":"FORWARD"};if(S)S=!1;else{const z=o();if(typeof document<"u"&&z.length){for(const Z of z)if(await Z.blockerFn({currentLocation:f,nextLocation:Y,action:j})){p=!0,t.history.go(1),M.notify(k);return}}}f=E(),M.notify(k)},_=Y=>{if(R){R=!1;return}let $=!1;const W=o();if(typeof document<"u"&&W.length)for(const K of W){const q=K.enableBeforeUnload??!0;if(q===!0){$=!0;break}if(typeof q=="function"&&q()===!0){$=!0;break}}if($)return Y.preventDefault(),Y.returnValue=""},M=aY({getLocation:m,getLength:()=>t.history.length,pushState:(Y,$)=>L("push",Y,$),replaceState:(Y,$)=>L("replace",Y,$),back:Y=>(Y&&(S=!0),R=!0,t.history.back()),forward:Y=>{Y&&(S=!0),R=!0,t.history.forward()},go:Y=>{d=!0,t.history.go(Y)},createHref:Y=>c(Y),flush:C,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Yb,_,{capture:!0}),t.removeEventListener(kb,y)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(Yb,_,{capture:!0}),t.addEventListener(kb,y),t.history.pushState=function(...Y){const $=n.apply(t.history,Y);return M._ignoreSubscribers||N("PUSH"),$},t.history.replaceState=function(...Y){const $=r.apply(t.history,Y);return M._ignoreSubscribers||N("REPLACE"),$},M}function cY(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function IR(e,t){const n=cY(e),r=n.indexOf("#"),s=n.indexOf("?"),o=hC();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:t||{[tl]:0,key:o,__TSR_key:o}}}function hC(){return(Math.random()+1).toString(36).substring(7)}function Ku(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var uY=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var h;const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,l=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=wk(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lY()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let d;this.resolvePathCache=yd(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=eY(fY(this.latestLocation),d),Yk(this)}let c=!1;const E=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==E||l!==f){this.basepath=E;const d=[],p=Vx(E);p&&p!=="/"&&d.push(Zk({basepath:E})),f&&d.push(f),this.rewrite=d.length===0?void 0:d.length===1?d[0]:Qk(d),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Pk(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Ck(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:E,search:f,hash:h,href:d,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(E)){const I=this.options.parseSearch(f),C=this.options.stringifySearch(I);return{href:E+C+h,publicHref:d,pathname:kf(E).path,external:!1,searchStr:C,search:Yl(r==null?void 0:r.search,I),hash:kf(h.slice(1)).path,state:Ka(r==null?void 0:r.state,p)}}const S=new URL(d,this.origin),R=LI(this.rewrite,S),m=this.options.parseSearch(R.search),g=this.options.stringifySearch(m);return R.search=g,{href:R.href.replace(R.origin,""),publicHref:d,pathname:kf(R.pathname).path,external:!!this.rewrite&&R.origin!==this.origin,searchStr:g,search:Yl(r==null?void 0:r.search,m),hash:kf(R.hash.slice(1)).path,state:Ka(r==null?void 0:r.state,p)}},o=s(n),{__tempLocation:l,__tempKey:c}=o.state;if(l&&(!c||c===this.tempLocationKey)){const E=s(l);return E.state.key=o.state.key,E.state.__TSR_key=o.state.__TSR_key,delete E.state.__tempLocation,{...E,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>Uk({base:n,to:TC(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>dY({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.state.forEach(n=>{var s;if(this.stores.pendingMatchStoresById.has(n))return;const r=(s=this.stores.activeMatchStoresById.get(n))==null?void 0:s.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{var Y,$;const l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);o.from;const E=o.unsafeRelative==="path"?l.pathname:o.from??c.fullPath,f=this.resolvePathWithBase(E,"."),h=c.search,d=Object.assign(Object.create(null),c.params),p=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),S=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?d:Object.assign(d,$a(o.params,d)),R=this.getMatchedRoutes(p);let m=R.matchedRoutes;if((!R.foundRoute||R.foundRoute.path!=="/"&&R.routeParams["**"])&&this.options.notFoundRoute&&(m=[...m,this.options.notFoundRoute]),Object.keys(S).length>0)for(const W of m){const K=((Y=W.options.params)==null?void 0:Y.stringify)??W.options.stringifyParams;if(K)try{Object.assign(S,K(S))}catch{}}const g=n.leaveParams?p:kf(Ub({path:p,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let I=h;if(n._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const W={};m.forEach(K=>{if(K.options.validateSearch)try{Object.assign(W,Yp(K.options.validateSearch,{...W,...I}))}catch{}}),I=W}I=TY({search:I,dest:o,destRoutes:m,_includeValidateSearch:n._includeValidateSearch}),I=Yl(h,I);const C=this.options.stringifySearch(I),L=o.hash===!0?l.hash:o.hash?$a(o.hash,l.hash):void 0,N=L?`#${L}`:"";let y=o.state===!0?l.state:o.state?$a(o.state,l.state):{};y=Ka(l.state,y);const _=`${g}${C}${N}`;let M,w,F=!1;if(this.rewrite){const W=new URL(_,this.origin),K=kx(this.rewrite,W);M=W.href.replace(W.origin,""),K.origin!==this.origin?(w=K.href,F=!0):w=K.pathname+K.search+K.hash}else M=Ok(_),w=M;return{publicHref:w,href:M,pathname:g,search:I,searchStr:C,state:y,hash:L??"",external:F,unmaskOnReload:o.unmaskOnReload}},s=(o={},l)=>{const c=r(o);let E=l?r(l):void 0;if(!E){const f=Object.create(null);if(this.options.routeMasks){const h=_k(c.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:d,params:p,...S}=h.route,R=p===!1||p===null?Object.create(null):(p??!0)===!0?f:Object.assign(f,$a(p,f));l={from:n.from,...S,params:R},E=r(l)}}}return E&&(c.maskedLocation=E),c};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{const o=()=>{const E=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];E.forEach(h=>{s.state[h]=this.latestLocation.state[h]});const f=Nc(s.state,this.latestLocation.state);return E.forEach(h=>{delete s.state[h]}),f},l=el(this.latestLocation.href)===el(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=TE(()=>{c==null||c.resolve(),c=void 0}),l&&o())this.load();else{let{maskedLocation:E,hashScrollIntoView:f,...h}=s;E&&(h={...E,state:{...E.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:l,href:c,...E}={})=>{if(c){const d=this.history.location.state.__TSR_index,p=IR(c,{__TSR_index:n?d:d+1}),S=new URL(p.pathname,this.origin);E.to=LI(this.rewrite,S).pathname,E.search=this.options.parseSearch(p.search),E.hash=p.hash.slice(1)}const f=this.buildLocation({...E,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:o,...l})=>{var E,f;let c=!1;if(s)try{new URL(`${s}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!s){const d=this.buildLocation({to:n,...l});s=s??d.publicHref,o=o??d.publicHref}const h=!c&&o?o:s;if(mR(h,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const d=((f=(E=this.history).getBlockers)==null?void 0:f.call(E))??[];for(const p of d)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...l,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(s=>!n.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(n),this.stores.setCachedMatches(r)})},this.load=async n=>{let r,s,o;const l=this.stores.resolvedLocation.state??this.stores.location.state;for(o=new Promise(E=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const h=this.latestLocation,d=this.stores.resolvedLocation.state,p=Ku(h,d);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await Hb({router:this,sync:n==null?void 0:n.sync,forceStaleReload:l.href===h.href,matches:this.stores.pendingMatchesSnapshot.state,location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var I,C;let S=null,R=null,m=null,g=null;this.batch(()=>{const L=this.stores.pendingMatchesSnapshot.state,N=L.length,y=this.stores.activeMatchesSnapshot.state;S=N?y.filter(w=>!this.stores.pendingMatchStoresById.has(w.id)):null;const _=new Set;for(const w of this.stores.pendingMatchStoresById.values())w.routeId&&_.add(w.routeId);const M=new Set;for(const w of this.stores.activeMatchStoresById.values())w.routeId&&M.add(w.routeId);R=N?y.filter(w=>!_.has(w.routeId)):null,m=N?L.filter(w=>!M.has(w.routeId)):null,g=N?L.filter(w=>M.has(w.routeId)):y,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),N&&(this.stores.setActiveMatches(L),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...S.filter(w=>w.status!=="error"&&w.status!=="notFound"&&w.status!=="redirected")]),this.clearExpiredCache())});for(const[L,N]of[[R,"onLeave"],[m,"onEnter"],[g,"onStay"]])if(L)for(const y of L)(C=(I=this.looseRoutesById[y.routeId].options)[N])==null||C.call(I,y)})})}})}catch(h){ps(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):rs(h)&&(s=h);const d=r?r.status:s?404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>d),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),E()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(E=>E.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.setState(()=>c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,l=this.stores.resolvedLocation.state,c=typeof r.types=="function"?r.types(Ku(o,l)):r.types;if(c===!1){n();return}s={update:n,types:c}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStoresById.get(n);if(s){s.setState(r);return}const o=this.stores.activeMatchStoresById.get(n);if(o){o.setState(r);return}const l=this.stores.cachedMatchStoresById.get(n);if(l){const c=r(l.state);c.status==="redirected"?this.stores.cachedMatchStoresById.delete(n)&&this.stores.cachedMatchesId.setState(E=>E.filter(f=>f!==n)):l.setState(()=>c)}})},this.getMatch=n=>{var r,s,o;return((r=this.stores.cachedMatchStoresById.get(n))==null?void 0:r.state)??((s=this.stores.pendingMatchStoresById.get(n))==null?void 0:s.state)??((o=this.stores.activeMatchStoresById.get(n))==null?void 0:o.state)},this.invalidate=n=>{const r=s=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,s))??!0?{...s,invalid:!0,...n!=null&&n.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(s);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&mR(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(s=>!r(s))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const l=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=bd,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),l=new Set([...o,...this.stores.cachedMatchesId.state]),c=s.filter(E=>!l.has(E.id));if(c.length){const E=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...E,...c])}try{return s=await Hb({router:this,matches:s,location:r,preload:!0,updateMatch:(E,f)=>{o.has(E)?s=s.map(h=>h.id===E?f(h):h):this.updateMatch(E,f)}}),s}catch(E){if(ps(E))return E.options.reloadDocument?void 0:await this.preloadRoute({...E.options,_fromLocation:r});rs(E)||console.error(E);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(r!=null&&r.pending&&this.stores.status.state!=="pending")return!1;const l=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,c=Lk(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,l.pathname,this.processedTree);return!c||n.params&&!Nc(c.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Nc(l.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Kk,parseSearch:e.parseSearch??$k,protocolAllowlist:e.protocolAllowlist??gk}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var d,p;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:s,parsedParams:o}=n;let{matchedRoutes:l}=n,c=!1;(r?r.path!=="/"&&s["**"]:el(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const E=c?pY(this.options.notFoundMode,l):void 0,f=new Array(l.length),h=new Map;for(const S of this.stores.activeMatchStoresById.values())S.routeId&&h.set(S.routeId,S.state);for(let S=0;S<l.length;S++){const R=l[S],m=f[S-1];let g,I,C;{const j=(m==null?void 0:m.search)??e.search,k=(m==null?void 0:m._strictSearch)??void 0;try{const z=Yp(R.options.validateSearch,{...j})??void 0;g={...j,...z},I={...k,...z},C=void 0}catch(z){let Z=z;if(z instanceof NR||(Z=new NR(z.message,{cause:z})),t!=null&&t.throwOnError)throw Z;g=j,I={},C=Z}}const L=((p=(d=R.options).loaderDeps)==null?void 0:p.call(d,{search:g}))??"",N=L?JSON.stringify(L):"",{interpolatedPath:y,usedParams:_}=Ub({path:R.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),M=R.id+y+N,w=this.getMatch(M),F=h.get(R.id),Y=(w==null?void 0:w._strictParams)??_;let $;if(!w)try{jb(R,_,o,Y)}catch(j){if(rs(j)||ps(j)?$=j:$=new EY(j.message,{cause:j}),t!=null&&t.throwOnError)throw $}Object.assign(s,Y);const W=F?"stay":"enter";let K;if(w)K={...w,cause:W,params:(F==null?void 0:F.params)??s,_strictParams:Y,search:Yl(F?F.search:w.search,g),_strictSearch:I};else{const j=R.options.loader||R.options.beforeLoad||R.lazyFn||Xx(R)?"pending":"success";K={id:M,ssr:R.options.ssr,index:S,routeId:R.id,params:(F==null?void 0:F.params)??s,_strictParams:Y,pathname:y,updatedAt:Date.now(),search:F?Yl(F.search,g):g,_strictSearch:I,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:TE()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:F?Ka(F.loaderDeps,L):L,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:R.options.staticData||{},fullPath:R.fullPath}}t!=null&&t.preload||(K.globalNotFound=E===R.id),K.searchError=C;const q=this.getParentContext(m);K.context={...q,...K.__routeContext,...K.__beforeLoadContext},f[S]=K}for(let S=0;S<f.length;S++){const R=f[S],m=this.looseRoutesById[R.routeId],g=this.getMatch(R.id),I=h.get(R.routeId);if(R.params=I?Yl(I.params,s):s,!g){const C=f[S-1],L=this.getParentContext(C);if(m.options.context){const N={deps:R.loaderDeps,params:R.params,context:L??{},location:e,navigate:y=>this.navigate({...y,_fromLocation:e}),buildLocation:this.buildLocation,cause:R.cause,abortController:R.abortController,preload:!!R.preload,matches:f,routeId:m.id};R.__routeContext=m.options.context(N)??void 0}R.context={...L,...R.__routeContext,...R.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),s=_d(t),o={...e.search};for(const d of t)try{Object.assign(o,Yp(d.options.validateSearch,o))}catch{}const l=_d(this.stores.matchesId.state),c=l&&((h=this.stores.activeMatchStoresById.get(l))==null?void 0:h.state),E=c&&c.routeId===s.id&&c.pathname===e.pathname;let f;if(E)f=c.params;else{const d=Object.assign(Object.create(null),n);for(const p of t)try{jb(p,n,r??{},d)}catch{}f=d}return{matchedRoutes:t,fullPath:s.fullPath,search:o,params:f}}},NR=class extends Error{},EY=class extends Error{};function fY(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Yp(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new NR("Async validation not supported");if(n.issues)throw new NR(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function dY({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),s=el(e);let o,l;const c=yk(s,n,!0);return c&&(o=c.route,Object.assign(r,c.rawParams),l=Object.assign(Object.create(null),c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t.__root__],routeParams:r,foundRoute:o,parsedParams:l}}function TY({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return hY(n)(e,t,r??!1)}function hY(e){var s;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(s=o.options.search)!=null&&s.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:c,next:E})=>{let f=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((d,p)=>p(d),c));const h=E(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((d,p)=>p(d),h):h};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:E})=>{const f=E(c);if(!t._includeValidateSearch)return f;try{return{...f,...Yp(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(l)}}const n=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:$a(l.search,o):{}};t.middlewares.push(n);const r=(o,l,c)=>{if(o>=c.length)return l;const E=c[o];return E({search:l,next:h=>r(o+1,h,c)})};return function(l,c,E){return t.dest=c,t._includeValidateSearch=E,r(0,l,t.middlewares)}}function pY(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Cc}function jb(e,t,n,r){var o;const s=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const l in t)l in n&&(r[l]=n[l]);else{const l=s(r);Object.assign(r,l)}}var RY="Error preloading route! ☝️",$x=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var E,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(E=this.options).getParentRoute)==null?void 0:f.call(E),r?this._path=Cc:this.parentRoute||Uo();let s=r?Cc:n==null?void 0:n.path;s&&s!=="/"&&(s=Hx(s));const o=(n==null?void 0:n.id)||s;let l=r?Cc:Vp([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),l!=="__root__"&&(l=Vp(["/",l]));const c=l==="__root__"?"/":Vp([this.parentRoute.fullPath,s]);this._path=s,this._id=l,this._fullPath=c,this._to=el(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Jk({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},SY=class extends $x{constructor(e){super(e)}};function pC(e){const t=e.errorComponent??RC;return v.jsx(mY,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?D.createElement(t,{error:n,reset:r}):e.children})}var mY=class extends D.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function RC({error:e}){const[t,n]=D.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function AY({children:e,fallback:t=null}){return Kx()?v.jsx(dE.Fragment,{children:e}):v.jsx(dE.Fragment,{children:t})}function Kx(){return dE.useSyncExternalStore(gY,()=>!0,()=>!1)}function gY(){return()=>{}}var zx=D.createContext(null);function ss(e){return D.useContext(zx)}var SS=D.createContext(void 0),OY=D.createContext(void 0),Pn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Pn||{});function qx({update:e,notify:t,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:l,shallowPropagate:c};function r(f,h,d){const p=h.depsTail;if(p!==void 0&&p.dep===f)return;const S=p!==void 0?p.nextDep:h.deps;if(S!==void 0&&S.dep===f){S.version=d,h.depsTail=S;return}const R=f.subsTail;if(R!==void 0&&R.version===d&&R.sub===h)return;const m=h.depsTail=f.subsTail={version:d,dep:f,sub:h,prevDep:p,nextDep:S,prevSub:R,nextSub:void 0};S!==void 0&&(S.prevDep=m),p!==void 0?p.nextDep=m:h.deps=m,R!==void 0?R.nextSub=m:f.subs=m}function s(f,h=f.sub){const d=f.dep,p=f.prevDep,S=f.nextDep,R=f.nextSub,m=f.prevSub;return S!==void 0?S.prevDep=p:h.depsTail=p,p!==void 0?p.nextDep=S:h.deps=S,R!==void 0?R.prevSub=m:d.subsTail=m,m!==void 0?m.nextSub=R:(d.subs=R)===void 0&&n(d),S}function o(f){let h=f.nextSub,d;e:do{const p=f.sub;let S=p.flags;if(S&60?S&12?S&4?!(S&48)&&E(f,p)?(p.flags=S|40,S&=1):S=0:p.flags=S&-9|32:S=0:p.flags=S|32,S&2&&t(p),S&1){const R=p.subs;if(R!==void 0){const m=(f=R).nextSub;m!==void 0&&(d={value:h,prev:d},h=m);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;d!==void 0;)if(f=d.value,d=d.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function l(f,h){let d,p=0,S=!1;e:do{const R=f.dep,m=R.flags;if(h.flags&16)S=!0;else if((m&17)===17){if(e(R)){const g=R.subs;g.nextSub!==void 0&&c(g),S=!0}}else if((m&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(d={value:f,prev:d}),f=R.deps,h=R,++p;continue}if(!S){const g=f.nextDep;if(g!==void 0){f=g;continue}}for(;p--;){const g=h.subs,I=g.nextSub!==void 0;if(I?(f=d.value,d=d.prev):f=g,S){if(e(h)){I&&c(g),h=f.sub;continue}S=!1}else h.flags&=-33;h=f.sub;const C=f.nextDep;if(C!==void 0){f=C;continue e}}return S}while(!0)}function c(f){do{const h=f.sub,d=h.flags;(d&48)===32&&(h.flags=d|16,(d&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function E(f,h){let d=h.depsTail;for(;d!==void 0;){if(d===f)return!0;d=d.prevDep}return!1}}let SC=0,Wl=0,ld=0;const bo=[],{link:dce,unlink:Jx,propagate:Tce,checkDirty:IY,shallowPropagate:hce}=qx({update(e){return e.depsTail!==void 0?LY(e):yY(e)},notify(e){var r;let t=ld,n=t;do if(bo[t++]=e,e.flags&=-3,e=(r=e.subs)==null?void 0:r.sub,e===void 0||!(e.flags&2))break;while(!0);for(ld=t;n<--t;){const s=bo[n];bo[n++]=bo[t],bo[t]=s}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,mS(e)):DY.call(e)}});function NY(){return SC}function CY(){++SC}function _Y(){--SC||PY()}function LY(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,mS(e)}}function yY(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function bY(e){const t=e.flags;if(t&16||t&32&&IY(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,mS(e)}}else e.flags=2}function PY(){try{for(;Wl<ld;){const e=bo[Wl];bo[Wl++]=void 0,bY(e)}}finally{for(;Wl<ld;){const e=bo[Wl];bo[Wl++]=void 0,e.flags|=10}Wl=0,ld=0}}function DY(){this.depsTail=void 0,this.flags=0,mS(this);const e=this.subs;e!==void 0&&Jx(e)}function mS(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Jx(n,e)}function mC(e,t,n){var o,l,c;const r=typeof e=="object",s=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(s),error:(l=r?e.error:t)==null?void 0:l.bind(s),complete:(c=r?e.complete:n)==null?void 0:c.bind(s)}}const bI=[];let Wp=0;const{link:Xb,unlink:vY,propagate:MY,checkDirty:Qx,shallowPropagate:$b}=qx({update(e){return e._update()},notify(e){bI[PI++]=e,e.flags&=~Pn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Pn.Mutable|Pn.Dirty,CR(e))}});let ip=0,PI=0,Bi;function CR(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=vY(n,e)}function Zx(){if(!(NY()>0)){for(;ip<PI;){const e=bI[ip];bI[ip++]=void 0,e.notify()}ip=0,PI=0}}function eU(e,t){const n=typeof e=="function",r=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Pn.None:Pn.Mutable,get(){return Bi!==void 0&&Xb(s,Bi,Wp),s._snapshot},subscribe(o){const l=mC(o),c={current:!1},E=xY(()=>{var f;s.get(),c.current?(f=l.next)==null||f.call(l,s._snapshot):c.current=!0});return{unsubscribe:()=>{E.stop()}}},_update(o){const l=Bi,c=Object.is;if(n)Bi=s,++Wp,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=Pn.Mutable|Pn.RecursedCheck);try{const E=s._snapshot,f=typeof o=="function"?o(E):o===void 0&&n?r(E):o;return E===void 0||!c(E,f)?(s._snapshot=f,!0):!1}finally{Bi=l,n&&(s.flags&=~Pn.RecursedCheck),CR(s)}}};return n?(s.flags=Pn.Mutable|Pn.Dirty,s.get=function(){const o=s.flags;if(o&Pn.Dirty||o&Pn.Pending&&Qx(s.deps,s)){if(s._update()){const l=s.subs;l!==void 0&&$b(l)}}else o&Pn.Pending&&(s.flags=o&~Pn.Pending);return Bi!==void 0&&Xb(s,Bi,Wp),s._snapshot}):s.set=function(o){if(s._update(o)){const l=s.subs;l!==void 0&&(MY(l),$b(l),Zx())}},s}function xY(e){const t=()=>{const r=Bi;Bi=n,++Wp,n.depsTail=void 0,n.flags=Pn.Watching|Pn.RecursedCheck;try{return e()}finally{Bi=r,n.flags&=~Pn.RecursedCheck,CR(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Pn.Watching|Pn.RecursedCheck,notify(){const r=this.flags;r&Pn.Dirty||r&Pn.Pending&&Qx(this.deps,this)?t():this.flags=Pn.Watching},stop(){this.flags=Pn.None,this.depsTail=void 0,CR(this)}};return t(),n}let UY=class{constructor(t){this.atom=eU(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(mC(t))}};class wY{constructor(t){this.atom=eU(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(mC(t))}}function Kb(e){return typeof e=="function"?new wY(e):new UY(e)}function tU(e){try{CY(),e()}finally{_Y(),Zx()}}var Lg={exports:{}},yg={},bg={exports:{}},Pg={};/**
51
+ * @license React
52
+ * use-sync-external-store-shim.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var zb;function GY(){if(zb)return Pg;zb=1;var e=OE();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(d,p){var S=p(),R=r({inst:{value:S,getSnapshot:p}}),m=R[0].inst,g=R[1];return o(function(){m.value=S,m.getSnapshot=p,E(m)&&g({inst:m})},[d,S,p]),s(function(){return E(m)&&g({inst:m}),d(function(){E(m)&&g({inst:m})})},[d]),l(S),S}function E(d){var p=d.getSnapshot;d=d.value;try{var S=p();return!n(d,S)}catch{return!0}}function f(d,p){return p()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Pg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Pg}var qb;function nU(){return qb||(qb=1,bg.exports=GY()),bg.exports}/**
59
+ * @license React
60
+ * use-sync-external-store-shim/with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var Jb;function BY(){if(Jb)return yg;Jb=1;var e=OE(),t=nU();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,E=e.useDebugValue;return yg.useSyncExternalStoreWithSelector=function(f,h,d,p,S){var R=o(null);if(R.current===null){var m={hasValue:!1,value:null};R.current=m}else m=R.current;R=c(function(){function I(_){if(!C){if(C=!0,L=_,_=p(_),S!==void 0&&m.hasValue){var M=m.value;if(S(M,_))return N=M}return N=_}if(M=N,r(L,_))return M;var w=p(_);return S!==void 0&&S(M,w)?(L=_,M):(L=_,N=w)}var C=!1,L,N,y=d===void 0?null:d;return[function(){return I(h())},y===null?void 0:function(){return I(y())}]},[h,d,p,S]);var g=s(f,R[0],R[1]);return l(function(){m.hasValue=!0,m.value=g},[g]),E(g),g},yg}var Qb;function FY(){return Qb||(Qb=1,Lg.exports=BY()),Lg.exports}var rU=FY();function HY(e,t){return e===t}function Ss(e,t,n=HY){const r=D.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),s=D.useCallback(()=>e==null?void 0:e.get(),[e]);return rU.useSyncExternalStoreWithSelector(r,s,s,t,n)}var VY={state:void 0,get:()=>{},subscribe:()=>()=>{}};function Tl(e){const t=ss(),n=D.useContext(e.from?OY:SS),r=e.from??n,s=r?e.from?t.stores.getMatchStoreByRouteId(r):t.stores.activeMatchStoresById.get(r):void 0,o=D.useRef(void 0);return Ss(s??VY,l=>{if((e.shouldThrow??!0)&&!l&&Uo(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const E=Ka(o.current,c);return o.current=E,E}return c})}function AC(e){return Tl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function gC(e){const{select:t,...n}=e;return Tl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function OC(e){return Tl({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ai(e){return Tl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Us(e){const t=ss();return D.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function kY(e){const t=ss(),n=Us(),r=D.useRef(null);return Zf(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function IC(e){return Tl({...e,select:t=>e.select?e.select(t.context):t.context})}var zi=gx();function YY(e,t){const n=ss(),r=hk(t),{activeProps:s,inactiveProps:o,activeOptions:l,to:c,preload:E,preloadDelay:f,hashScrollIntoView:h,replace:d,startTransition:p,resetScroll:S,viewTransition:R,children:m,target:g,disabled:I,style:C,className:L,onClick:N,onBlur:y,onFocus:_,onMouseEnter:M,onMouseLeave:w,onTouchStart:F,ignoreBlocker:Y,params:$,search:W,hash:K,state:q,mask:j,reloadDocument:k,unsafeRelative:z,from:Z,_fromLocation:ie,...ne}=e,B=Kx(),Q=D.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=Ss(n.stores.location,xe=>xe,(xe,Ze)=>xe.href===Ze.href),le=D.useMemo(()=>{const xe={_fromLocation:ue,...Q};return n.buildLocation(xe)},[n,ue,Q]),he=le.maskedLocation?le.maskedLocation.publicHref:le.publicHref,se=le.maskedLocation?le.maskedLocation.external:le.external,fe=D.useMemo(()=>zY(he,se,n.history,I),[I,se,he,n.history]),ge=D.useMemo(()=>{if(fe!=null&&fe.external)return mR(fe.href,n.protocolAllowlist)?void 0:fe.href;if(!qY(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),mR(c,n.protocolAllowlist)?void 0:c}catch{}},[c,fe,n.protocolAllowlist]),Le=D.useMemo(()=>{if(ge)return!1;if(l!=null&&l.exact){if(!xk(ue.pathname,le.pathname,n.basepath))return!1}else{const xe=AR(ue.pathname,n.basepath),Ze=AR(le.pathname,n.basepath);if(!(xe.startsWith(Ze)&&(xe.length===Ze.length||xe[Ze.length]==="/")))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Nc(ue.search,le.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?B&&ue.hash===le.hash:!0},[l==null?void 0:l.exact,l==null?void 0:l.explicitUndefined,l==null?void 0:l.includeHash,l==null?void 0:l.includeSearch,ue,ge,B,le.hash,le.pathname,le.search,n.basepath]),We=Le?$a(s,{})??WY:Dg,He=Le?Dg:$a(o,{})??Dg,ot=[L,We.className,He.className].filter(Boolean).join(" "),Me=(C||We.style||He.style)&&{...C,...We.style,...He.style},[Ue,Xe]=D.useState(!1),ct=D.useRef(!1),Be=e.reloadDocument||ge?!1:E??n.options.defaultPreload,ke=f??n.options.defaultPreloadDelay??0,ve=D.useCallback(()=>{n.preloadRoute({...Q,_builtLocation:le}).catch(xe=>{console.warn(xe),console.warn(RY)})},[n,Q,le]);Tk(r,D.useCallback(xe=>{xe!=null&&xe.isIntersecting&&ve()},[ve]),KY,{disabled:!!I||Be!=="viewport"}),D.useEffect(()=>{ct.current||!I&&Be==="render"&&(ve(),ct.current=!0)},[I,ve,Be]);const Ce=xe=>{const Ze=xe.currentTarget.getAttribute("target"),Et=g!==void 0?g:Ze;if(!I&&!JY(xe)&&!xe.defaultPrevented&&(!Et||Et==="_self")&&xe.button===0){xe.preventDefault(),zi.flushSync(()=>{Xe(!0)});const Xt=n.subscribe("onResolved",()=>{Xt(),Xe(!1)});n.navigate({...Q,replace:d,resetScroll:S,hashScrollIntoView:h,startTransition:p,viewTransition:R,ignoreBlocker:Y})}};if(ge)return{...ne,ref:r,href:ge,...m&&{children:m},...g&&{target:g},...I&&{disabled:I},...C&&{style:C},...L&&{className:L},...N&&{onClick:N},...y&&{onBlur:y},..._&&{onFocus:_},...M&&{onMouseEnter:M},...w&&{onMouseLeave:w},...F&&{onTouchStart:F}};const oe=xe=>{if(I||Be!=="intent")return;if(!ke){ve();return}const Ze=xe.currentTarget;if(jf.has(Ze))return;const Et=setTimeout(()=>{jf.delete(Ze),ve()},ke);jf.set(Ze,Et)},Ie=xe=>{I||Be!=="intent"||ve()},Pe=xe=>{if(I||!Be||!ke)return;const Ze=xe.currentTarget,Et=jf.get(Ze);Et&&(clearTimeout(Et),jf.delete(Ze))};return{...ne,...We,...He,href:fe==null?void 0:fe.href,ref:r,onClick:Du([N,Ce]),onBlur:Du([y,Pe]),onFocus:Du([_,oe]),onMouseEnter:Du([M,oe]),onMouseLeave:Du([w,Pe]),onTouchStart:Du([F,Ie]),disabled:!!I,target:g,...Me&&{style:Me},...ot&&{className:ot},...I&&jY,...Le&&XY,...B&&Ue&&$Y}}var Dg={},WY={className:"active"},jY={role:"link","aria-disabled":!0},XY={"data-status":"active","aria-current":"page"},$Y={"data-transitioning":"transitioning"},jf=new WeakMap,KY={rootMargin:"100px"},Du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function zY(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function qY(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var AS=D.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,...o}=YY(r,t),l=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...E}=o;return D.createElement("a",E,l)}return D.createElement(n,o,l)});function JY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var QY=class extends $x{constructor(t){super(t),this.useMatch=n=>Tl({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>IC({...n,from:this.id}),this.useSearch=n=>ai({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>OC({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>gC({...n,from:this.id}),this.useLoaderData=n=>AC({...n,from:this.id}),this.useNavigate=()=>Us({from:this.fullPath}),this.Link=dE.forwardRef((n,r)=>v.jsx(AS,{ref:r,from:this.fullPath,...n}))}};function ZY(e){return new QY(e)}var e5=class extends SY{constructor(e){super(e),this.useMatch=t=>Tl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>IC({...t,from:this.id}),this.useSearch=t=>ai({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>OC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>gC({...t,from:this.id}),this.useLoaderData=t=>AC({...t,from:this.id}),this.useNavigate=()=>Us({from:this.fullPath}),this.Link=dE.forwardRef((t,n)=>v.jsx(AS,{ref:n,from:this.fullPath,...t}))}};function t5(e){return new e5(e)}function yi(e){return typeof e=="object"?new Zb(e,{silent:!0}).createRoute(e):new Zb(e,{silent:!0}).createRoute}var Zb=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=ZY(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}},eP=class{constructor(e){this.useMatch=t=>Tl({select:t==null?void 0:t.select,from:this.options.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>IC({...t,from:this.options.id}),this.useSearch=t=>ai({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.options.id}),this.useParams=t=>OC({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.options.id}),this.useLoaderDeps=t=>gC({...t,from:this.options.id}),this.useLoaderData=t=>AC({...t,from:this.options.id}),this.useNavigate=()=>Us({from:ss().routesById[this.options.id].fullPath}),this.options=e}};function tP(e){return typeof e=="object"?new eP(e):t=>new eP({id:e,...t})}function n5(e){const t=ss(),n=`not-found-${Ss(t.stores.location,r=>r.pathname)}-${Ss(t.stores.status,r=>r)}`;return v.jsx(pC,{getResetKey:()=>n,onCatch:(r,s)=>{var o;if(rs(r))(o=e.onCatch)==null||o.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(rs(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function r5(){return v.jsx("p",{children:"Not Found"})}function Gu(e){return v.jsx(v.Fragment,{children:e.children})}function sU(e,t,n){return t.options.notFoundComponent?v.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?v.jsx(e.options.defaultNotFoundComponent,{...n}):v.jsx(r5,{})}function s5(){return ss().isScrollRestoring,null}var iU=D.memo(function({matchId:t}){const n=ss(),r=n.stores.activeMatchStoresById.get(t);r||Uo();const s=Ss(n.stores.loadedAt,l=>l),o=Ss(r,l=>l);return v.jsx(i5,{router:n,matchId:t,resetKey:s,matchState:D.useMemo(()=>{var E;const l=o.routeId,c=(E=n.routesById[l].parentRoute)==null?void 0:E.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:c}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function i5({router:e,matchId:t,resetKey:n,matchState:r}){var R,m;const s=e.routesById[r.routeId],o=s.options.pendingComponent??e.options.defaultPendingComponent,l=o?v.jsx(o,{}):null,c=s.options.errorComponent??e.options.defaultErrorComponent,E=s.options.onCatch??e.options.defaultOnCatch,f=s.isRoot?s.options.notFoundComponent??((R=e.options.notFoundRoute)==null?void 0:R.options.component):s.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",d=(!s.isRoot||s.options.wrapInSuspense||h)&&(s.options.wrapInSuspense??o??(((m=s.options.errorComponent)==null?void 0:m.preload)||h))?D.Suspense:Gu,p=c?pC:Gu,S=f?n5:Gu;return v.jsxs(s.isRoot?s.options.shellComponent??Gu:Gu,{children:[v.jsx(SS.Provider,{value:t,children:v.jsx(d,{fallback:l,children:v.jsx(p,{getResetKey:()=>n,errorComponent:c||RC,onCatch:(g,I)=>{if(rs(g))throw g;E==null||E(g,I)},children:v.jsx(S,{fallback:g=>{if(!f||g.routeId&&g.routeId!==r.routeId||!g.routeId&&!s.isRoot)throw g;return D.createElement(f,g)},children:h||r._displayPending?v.jsx(AY,{fallback:l,children:v.jsx(nP,{matchId:t})}):v.jsx(nP,{matchId:t})})})})}),r.parentRouteId===Cc&&e.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(o5,{}),v.jsx(s5,{})]}):null]})}function o5(){const e=ss(),t=D.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ku(e.stores.location.state,e.stores.resolvedLocation.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var nP=D.memo(function({matchId:t}){var f,h,d,p;const n=ss(),r=n.stores.activeMatchStoresById.get(t);r||Uo();const s=Ss(r,S=>S),o=s.routeId,l=n.routesById[o],c=D.useMemo(()=>{var R;const S=(R=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:R({routeId:o,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return S?JSON.stringify(S):void 0},[o,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),E=D.useMemo(()=>{const S=l.options.component??n.options.defaultComponent;return S?v.jsx(S,{},c):v.jsx(oU,{})},[c,l.options.component,n.options.defaultComponent]);if(s._displayPending)throw(f=n.getMatch(s.id))==null?void 0:f._nonReactive.displayPendingPromise;if(s._forcePending)throw(h=n.getMatch(s.id))==null?void 0:h._nonReactive.minPendingPromise;if(s.status==="pending"){const S=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(S){const R=n.getMatch(s.id);if(R&&!R._nonReactive.minPendingPromise){const m=TE();R._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),R._nonReactive.minPendingPromise=void 0},S)}}throw(d=n.getMatch(s.id))==null?void 0:d._nonReactive.loadPromise}if(s.status==="notFound")return rs(s.error)||Uo(),sU(n,l,s.error);if(s.status==="redirected")throw ps(s.error)||Uo(),(p=n.getMatch(s.id))==null?void 0:p._nonReactive.loadPromise;if(s.status==="error")throw s.error;return E}),oU=D.memo(function(){const t=ss(),n=D.useContext(SS);let r,s=!1,o;{const f=n?t.stores.activeMatchStoresById.get(n):void 0;[r,s]=Ss(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=Ss(t.stores.matchesId,h=>h[h.findIndex(d=>d===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?v.jsx(t.options.defaultPendingComponent,{}):null;if(s)return l||Uo(),sU(t,l,void 0);if(!o)return null;const E=v.jsx(iU,{matchId:o});return r===Cc?v.jsx(D.Suspense,{fallback:c,children:E}):E});function a5(){const e=ss(),t=D.useRef({router:e,mounted:!1}),[n,r]=D.useState(!1),s=Ss(e.stores.isLoading,d=>d),o=Ss(e.stores.hasPendingMatches,d=>d),l=mg(s),c=s||n||o,E=mg(c),f=s||o,h=mg(f);return e.startTransition=d=>{r(!0),D.startTransition(()=>{d(),r(!1)})},D.useEffect(()=>{const d=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return el(e.latestLocation.publicHref)!==el(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{d()}},[e,e.history]),Zf(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),Zf(()=>{l&&!s&&e.emit({type:"onLoad",...Ku(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,s]),Zf(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Ku(e.stores.location.state,e.stores.resolvedLocation.state)})},[f,h,e]),Zf(()=>{if(E&&!c){const d=Ku(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...d}),tU(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),d.hrefChanged&&Wk(e)}},[c,E,e]),null}function l5(){const e=ss(),t=e.routesById[Cc].options.pendingComponent??e.options.defaultPendingComponent,n=t?v.jsx(t,{}):null,r=v.jsxs(typeof document<"u"&&e.ssr?Gu:D.Suspense,{fallback:n,children:[v.jsx(a5,{}),v.jsx(c5,{})]});return e.options.InnerWrap?v.jsx(e.options.InnerWrap,{children:r}):r}function c5(){const e=ss(),t=Ss(e.stores.firstMatchId,s=>s),n=Ss(e.stores.loadedAt,s=>s),r=t?v.jsx(iU,{matchId:t}):null;return v.jsx(SS.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:v.jsx(pC,{getResetKey:()=>n,errorComponent:RC,onCatch:void 0,children:r})})}var u5=e=>({createMutableStore:Kb,createReadonlyStore:Kb,batch:tU}),E5=e=>new f5(e),f5=class extends uY{constructor(e){super(e,u5)}};typeof globalThis<"u"?(globalThis.createFileRoute=yi,globalThis.createLazyFileRoute=tP):typeof window<"u"&&(window.createFileRoute=yi,window.createLazyFileRoute=tP);function d5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=v.jsx(zx.Provider,{value:e,children:t});return e.options.Wrap?v.jsx(e.options.Wrap,{children:r}):r}function T5({router:e,...t}){return v.jsx(d5,{router:e,...t,children:v.jsx(l5,{})})}function NC(e){const t=ss({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=D.useRef(void 0);return Ss(n.stores.__store,s=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Ka(r.current,e.select(s));return r.current=o,o}return e.select(s)}return s})}const h5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},Pr=D.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:s="",altIcon:o,showAlt:l=!1,icon:c,primaryColor:E,secondaryColor:f,disableSecondaryOpacity:h=!1,...d},p)=>{const S=n!==void 0?r?Number(n)*24/Number(t):n:void 0,R=S!==void 0?{strokeWidth:S,stroke:"currentColor"}:{},m={ref:p,...h5,width:t,height:t,color:E||e,className:s,...R,...d},I=[...l&&o?o:c].sort(([,C],[,L])=>{const N=C.opacity!==void 0;return L.opacity!==void 0?1:N?-1:0}).map(([C,L])=>{const N=L.opacity!==void 0,y=N&&!h?L.opacity:void 0,_=f?{...L.stroke!==void 0?{stroke:N?f:E||e}:{fill:N?f:E||e}}:{};return D.createElement(C,{...L,...R,..._,opacity:y,key:L.key})});return D.createElement("svg",m,I)});Pr.displayName="HugeiconsIcon";const aU=D.createContext({});function p5(e){const t=D.useRef(null);return t.current===null&&(t.current=e()),t.current}const R5=typeof window<"u",S5=R5?D.useLayoutEffect:D.useEffect,CC=D.createContext(null);function _C(e,t){e.indexOf(t)===-1&&e.push(t)}function _R(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $i=(e,t,n)=>n>t?t:n<e?e:n;let LC=()=>{};const al={},lU=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function cU(e){return typeof e=="object"&&e!==null}const uU=e=>/^0[^.\s]+$/u.test(e);function EU(e){let t;return()=>(t===void 0&&(t=e()),t)}const oi=e=>e,m5=(e,t)=>n=>t(e(n)),rT=(...e)=>e.reduce(m5),Pd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class yC{constructor(){this.subscriptions=[]}add(t){return _C(this.subscriptions,t),()=>_R(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vs=e=>e*1e3,ri=e=>e/1e3;function fU(e,t){return t?e*(1e3/t):0}const dU=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,A5=1e-7,g5=12;function O5(e,t,n,r,s){let o,l,c=0;do l=t+(n-t)/2,o=dU(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>A5&&++c<g5);return l}function sT(e,t,n,r){if(e===t&&n===r)return oi;const s=o=>O5(o,0,1,e,n);return o=>o===0||o===1?o:dU(s(o),t,r)}const TU=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hU=e=>t=>1-e(1-t),pU=sT(.33,1.53,.69,.99),bC=hU(pU),RU=TU(bC),SU=e=>e>=1?1:(e*=2)<1?.5*bC(e):.5*(2-Math.pow(2,-10*(e-1))),PC=e=>1-Math.sin(Math.acos(e)),mU=hU(PC),AU=TU(PC),I5=sT(.42,0,1,1),N5=sT(0,0,.58,1),gU=sT(.42,0,.58,1),C5=e=>Array.isArray(e)&&typeof e[0]!="number",OU=e=>Array.isArray(e)&&typeof e[0]=="number",_5={linear:oi,easeIn:I5,easeInOut:gU,easeOut:N5,circIn:PC,circInOut:AU,circOut:mU,backIn:bC,backInOut:RU,backOut:pU,anticipate:SU},L5=e=>typeof e=="string",rP=e=>{if(OU(e)){LC(e.length===4);const[t,n,r,s]=e;return sT(t,n,r,s)}else if(L5(e))return _5[e];return e},op=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function y5(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function E(h){l.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,d=!1,p=!1)=>{const R=p&&s?n:r;return d&&l.add(h),R.add(h),h},cancel:h=>{r.delete(h),l.delete(h)},process:h=>{if(c=h,s){o=!0;return}s=!0;const d=n;n=r,r=d,n.forEach(E),n.clear(),s=!1,o&&(o=!1,f.process(h))}};return f}const b5=40;function IU(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=op.reduce((L,N)=>(L[N]=y5(o),L),{}),{setup:c,read:E,resolveKeyframes:f,preUpdate:h,update:d,preRender:p,render:S,postRender:R}=l,m=()=>{const L=al.useManualTiming,N=L?s.timestamp:performance.now();n=!1,L||(s.delta=r?1e3/60:Math.max(Math.min(N-s.timestamp,b5),1)),s.timestamp=N,s.isProcessing=!0,c.process(s),E.process(s),f.process(s),h.process(s),d.process(s),p.process(s),S.process(s),R.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:op.reduce((L,N)=>{const y=l[N];return L[N]=(_,M=!1,w=!1)=>(n||g(),y.schedule(_,M,w)),L},{}),cancel:L=>{for(let N=0;N<op.length;N++)l[op[N]].cancel(L)},state:s,steps:l}}const{schedule:mn,cancel:ll,state:Lr,steps:vg}=IU(typeof requestAnimationFrame<"u"?requestAnimationFrame:oi,!0);let jp;function P5(){jp=void 0}const Zr={now:()=>(jp===void 0&&Zr.set(Lr.isProcessing||al.useManualTiming?Lr.timestamp:performance.now()),jp),set:e=>{jp=e,queueMicrotask(P5)}},NU=e=>t=>typeof t=="string"&&t.startsWith(e),CU=NU("--"),D5=NU("var(--"),DC=e=>D5(e)?v5.test(e.split("/*")[0].trim()):!1,v5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function sP(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const IE={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dd={...IE,transform:e=>$i(0,1,e)},ap={...IE,default:1},cd=e=>Math.round(e*1e5)/1e5,vC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function M5(e){return e==null}const x5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,MC=(e,t)=>n=>!!(typeof n=="string"&&x5.test(n)&&n.startsWith(e)||t&&!M5(n)&&Object.prototype.hasOwnProperty.call(n,t)),_U=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,c]=r.match(vC);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},U5=e=>$i(0,255,e),Mg={...IE,transform:e=>Math.round(U5(e))},sc={test:MC("rgb","red"),parse:_U("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mg.transform(e)+", "+Mg.transform(t)+", "+Mg.transform(n)+", "+cd(Dd.transform(r))+")"};function w5(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const DI={test:MC("#"),parse:w5,transform:sc.transform},iT=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),La=iT("deg"),ji=iT("%"),nt=iT("px"),G5=iT("vh"),B5=iT("vw"),iP={...ji,parse:e=>ji.parse(e)/100,transform:e=>ji.transform(e*100)},Wu={test:MC("hsl","hue"),parse:_U("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ji.transform(cd(t))+", "+ji.transform(cd(n))+", "+cd(Dd.transform(r))+")"},Zn={test:e=>sc.test(e)||DI.test(e)||Wu.test(e),parse:e=>sc.test(e)?sc.parse(e):Wu.test(e)?Wu.parse(e):DI.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?sc.transform(e):Wu.transform(e),getAnimatableNone:e=>{const t=Zn.parse(e);return t.alpha=0,Zn.transform(t)}},F5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function H5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(vC))==null?void 0:t.length)||0)+(((n=e.match(F5))==null?void 0:n.length)||0)>0}const LU="number",yU="color",V5="var",k5="var(",oP="${}",Y5=/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 hE(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(Y5,E=>(Zn.test(E)?(r.color.push(o),s.push(yU),n.push(Zn.parse(E))):E.startsWith(k5)?(r.var.push(o),s.push(V5),n.push(E)):(r.number.push(o),s.push(LU),n.push(parseFloat(E))),++o,oP)).split(oP);return{values:n,split:c,indexes:r,types:s}}function W5(e){return hE(e).values}function bU({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],r[o]!==void 0){const l=t[o];l===LU?s+=cd(r[o]):l===yU?s+=Zn.transform(r[o]):s+=r[o]}return s}}function j5(e){return bU(hE(e))}const X5=e=>typeof e=="number"?0:Zn.test(e)?Zn.getAnimatableNone(e):e,$5=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:X5(e);function K5(e){const t=hE(e);return bU(t)(t.values.map((r,s)=>$5(r,t.split[s])))}const Ii={test:H5,parse:W5,createTransformer:j5,getAnimatableNone:K5};function xg(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 z5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,l=0;if(!t)s=o=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,E=2*n-c;s=xg(E,c,e+1/3),o=xg(E,c,e),l=xg(E,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function LR(e,t){return n=>n>0?t:e}const Ln=(e,t,n)=>e+(t-e)*n,Ug=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},q5=[DI,sc,Wu],J5=e=>q5.find(t=>t.test(e));function aP(e){const t=J5(e);if(!t)return!1;let n=t.parse(e);return t===Wu&&(n=z5(n)),n}const lP=(e,t)=>{const n=aP(e),r=aP(t);if(!n||!r)return LR(e,t);const s={...n};return o=>(s.red=Ug(n.red,r.red,o),s.green=Ug(n.green,r.green,o),s.blue=Ug(n.blue,r.blue,o),s.alpha=Ln(n.alpha,r.alpha,o),sc.transform(s))},vI=new Set(["none","hidden"]);function Q5(e,t){return vI.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Z5(e,t){return n=>Ln(e,t,n)}function xC(e){return typeof e=="number"?Z5:typeof e=="string"?DC(e)?LR:Zn.test(e)?lP:n3:Array.isArray(e)?PU:typeof e=="object"?Zn.test(e)?lP:e3:LR}function PU(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>xC(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function e3(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=xC(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function t3(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][r[o]],c=e.values[l]??0;n[s]=c,r[o]++}return n}const n3=(e,t)=>{const n=Ii.createTransformer(t),r=hE(e),s=hE(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?vI.has(e)&&!s.values.length||vI.has(t)&&!r.values.length?Q5(e,t):rT(PU(t3(r,s),s.values),n):LR(e,t)};function DU(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ln(e,t,n):xC(e)(e,t)}const r3=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>mn.update(t,n),stop:()=>ll(t),now:()=>Lr.isProcessing?Lr.timestamp:Zr.now()}},vU=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},yR=2e4;function UC(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<yR;)t+=n,r=e.next(t);return t>=yR?1/0:t}function s3(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(UC(r),yR);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:ri(s)}}const xn={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};function MI(e,t){return e*Math.sqrt(1-t*t)}const i3=12;function o3(e,t,n){let r=n;for(let s=1;s<i3;s++)r=r-e(r)/t(r);return r}const wg=.001;function a3({duration:e=xn.duration,bounce:t=xn.bounce,velocity:n=xn.velocity,mass:r=xn.mass}){let s,o,l=1-t;l=$i(xn.minDamping,xn.maxDamping,l),e=$i(xn.minDuration,xn.maxDuration,ri(e)),l<1?(s=f=>{const h=f*l,d=h*e,p=h-n,S=MI(f,l),R=Math.exp(-d);return wg-p/S*R},o=f=>{const d=f*l*e,p=d*n+n,S=Math.pow(l,2)*Math.pow(f,2)*e,R=Math.exp(-d),m=MI(Math.pow(f,2),l);return(-s(f)+wg>0?-1:1)*((p-S)*R)/m}):(s=f=>{const h=Math.exp(-f*e),d=(f-n)*e+1;return-wg+h*d},o=f=>{const h=Math.exp(-f*e),d=(n-f)*(e*e);return h*d});const c=5/e,E=o3(s,o,c);if(e=vs(e),isNaN(E))return{stiffness:xn.stiffness,damping:xn.damping,duration:e};{const f=Math.pow(E,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const l3=["duration","bounce"],c3=["stiffness","damping","mass"];function cP(e,t){return t.some(n=>e[n]!==void 0)}function u3(e){let t={velocity:xn.velocity,stiffness:xn.stiffness,damping:xn.damping,mass:xn.mass,isResolvedFromDuration:!1,...e};if(!cP(e,c3)&&cP(e,l3))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*$i(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:xn.mass,stiffness:s,damping:o}}else{const n=a3({...e,velocity:0});t={...t,...n,mass:xn.mass},t.isResolvedFromDuration=!0}return t}function bR(e=xn.visualDuration,t=xn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:E,damping:f,mass:h,duration:d,velocity:p,isResolvedFromDuration:S}=u3({...n,velocity:-ri(n.velocity||0)}),R=p||0,m=f/(2*Math.sqrt(E*h)),g=l-o,I=ri(Math.sqrt(E/h)),C=Math.abs(g)<5;r||(r=C?xn.restSpeed.granular:xn.restSpeed.default),s||(s=C?xn.restDelta.granular:xn.restDelta.default);let L,N,y,_,M,w;if(m<1)y=MI(I,m),_=(R+m*I*g)/y,L=Y=>{const $=Math.exp(-m*I*Y);return l-$*(_*Math.sin(y*Y)+g*Math.cos(y*Y))},M=m*I*_+g*y,w=m*I*g-_*y,N=Y=>Math.exp(-m*I*Y)*(M*Math.sin(y*Y)+w*Math.cos(y*Y));else if(m===1){L=$=>l-Math.exp(-I*$)*(g+(R+I*g)*$);const Y=R+I*g;N=$=>Math.exp(-I*$)*(I*Y*$-R)}else{const Y=I*Math.sqrt(m*m-1);L=q=>{const j=Math.exp(-m*I*q),k=Math.min(Y*q,300);return l-j*((R+m*I*g)*Math.sinh(k)+Y*g*Math.cosh(k))/Y};const $=(R+m*I*g)/Y,W=m*I*$-g*Y,K=m*I*g-$*Y;N=q=>{const j=Math.exp(-m*I*q),k=Math.min(Y*q,300);return j*(W*Math.sinh(k)+K*Math.cosh(k))}}const F={calculatedDuration:S&&d||null,velocity:Y=>vs(N(Y)),next:Y=>{if(!S&&m<1){const W=Math.exp(-m*I*Y),K=Math.sin(y*Y),q=Math.cos(y*Y),j=l-W*(_*K+g*q),k=vs(W*(M*K+w*q));return c.done=Math.abs(k)<=r&&Math.abs(l-j)<=s,c.value=c.done?l:j,c}const $=L(Y);if(S)c.done=Y>=d;else{const W=vs(N(Y));c.done=Math.abs(W)<=r&&Math.abs(l-$)<=s}return c.value=c.done?l:$,c},toString:()=>{const Y=Math.min(UC(F),yR),$=vU(W=>F.next(Y*W).value,Y,30);return Y+"ms "+$},toTransition:()=>{}};return F}bR.applyToOptions=e=>{const t=s3(e,100,bR);return e.ease=t.ease,e.duration=vs(t.duration),e.type="keyframes",e};const E3=5;function MU(e,t,n){const r=Math.max(t-E3,0);return fU(n-e(r),t-r)}function xI({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:c,max:E,restDelta:f=.5,restSpeed:h}){const d=e[0],p={done:!1,value:d},S=w=>c!==void 0&&w<c||E!==void 0&&w>E,R=w=>c===void 0?E:E===void 0||Math.abs(c-w)<Math.abs(E-w)?c:E;let m=n*t;const g=d+m,I=l===void 0?g:l(g);I!==g&&(m=I-d);const C=w=>-m*Math.exp(-w/r),L=w=>I+C(w),N=w=>{const F=C(w),Y=L(w);p.done=Math.abs(F)<=f,p.value=p.done?I:Y};let y,_;const M=w=>{S(p.value)&&(y=w,_=bR({keyframes:[p.value,R(p.value)],velocity:MU(L,w,p.value),damping:s,stiffness:o,restDelta:f,restSpeed:h}))};return M(0),{calculatedDuration:null,next:w=>{let F=!1;return!_&&y===void 0&&(F=!0,N(w),M(w)),y!==void 0&&w>=y?_.next(w-y):(!F&&N(w),p)}}}function f3(e,t,n){const r=[],s=n||al.mix||DU,o=e.length-1;for(let l=0;l<o;l++){let c=s(e[l],e[l+1]);if(t){const E=Array.isArray(t)?t[l]||oi:t;c=rT(E,c)}r.push(c)}return r}function d3(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(LC(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 c=f3(t,r,s),E=c.length,f=h=>{if(l&&h<e[0])return t[0];let d=0;if(E>1)for(;d<e.length-2&&!(h<e[d+1]);d++);const p=Pd(e[d],e[d+1],h);return c[d](p)};return n?h=>f($i(e[0],e[o-1],h)):f}function T3(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Pd(0,t,r);e.push(Ln(n,1,s))}}function h3(e){const t=[0];return T3(t,e.length-1),t}function p3(e,t){return e.map(n=>n*t)}function R3(e,t){return e.map(()=>t||gU).splice(0,e.length-1)}function ud({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=C5(r)?r.map(rP):rP(r),o={done:!1,value:t[0]},l=p3(n&&n.length===t.length?n:h3(t),e),c=d3(l,t,{ease:Array.isArray(s)?s:R3(t,s)});return{calculatedDuration:e,next:E=>(o.value=c(E),o.done=E>=e,o)}}const S3=e=>e!==null;function gS(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(S3),c=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||r===void 0?o[c]:r}const m3={decay:xI,inertia:xI,tween:ud,keyframes:ud,spring:bR};function xU(e){typeof e.type=="string"&&(e.type=m3[e.type])}class wC{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const A3=e=>e/100;class PR extends wC{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Zr.now()&&this.tick(Zr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xU(t);const{type:n=ud,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:c}=t;const E=n||ud;E!==ud&&typeof c[0]!="number"&&(this.mixKeyframes=rT(A3,DU(c[0],c[1])),c=[0,100]);const f=E({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=E({...t,keyframes:[...c].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=UC(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:E}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:d,repeatType:p,repeatDelay:S,type:R,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const I=this.currentTime-f*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?I<0:I>s;this.currentTime=Math.max(I,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let L=this.currentTime,N=r;if(d){const w=Math.min(this.currentTime,s)/c;let F=Math.floor(w),Y=w%1;!Y&&w>=1&&(Y=1),Y===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(p==="reverse"?(Y=1-Y,S&&(Y-=S/c)):p==="mirror"&&(N=l)),L=$i(0,1,Y)*c}let y;C?(this.delayState.value=h[0],y=this.delayState):y=N.next(L),o&&!C&&(y.value=o(y.value));let{done:_}=y;!C&&E!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return M&&R!==xI&&(y.value=gS(h,this.options,g,this.speed)),m&&m(y.value),M&&this.finish(),y}then(t,n){return this.finished.then(t,n)}get duration(){return ri(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ri(t)}get time(){return ri(this.currentTime)}set time(t){t=vs(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return MU(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Zr.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=ri(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=r3,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Zr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function g3(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ic=e=>e*180/Math.PI,UI=e=>{const t=ic(Math.atan2(e[1],e[0]));return wI(t)},O3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:UI,rotateZ:UI,skewX:e=>ic(Math.atan(e[1])),skewY:e=>ic(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wI=e=>(e=e%360,e<0&&(e+=360),e),uP=UI,EP=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fP=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),I3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:EP,scaleY:fP,scale:e=>(EP(e)+fP(e))/2,rotateX:e=>wI(ic(Math.atan2(e[6],e[5]))),rotateY:e=>wI(ic(Math.atan2(-e[2],e[0]))),rotateZ:uP,rotate:uP,skewX:e=>ic(Math.atan(e[4])),skewY:e=>ic(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function GI(e){return e.includes("scale")?1:0}function BI(e,t){if(!e||e==="none")return GI(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=I3,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=O3,s=c}if(!s)return GI(t);const o=r[t],l=s[1].split(",").map(C3);return typeof o=="function"?o(l):l[o]}const N3=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return BI(n,t)};function C3(e){return parseFloat(e.trim())}const NE=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],CE=new Set(NE),dP=e=>e===IE||e===nt,_3=new Set(["x","y","z"]),L3=NE.filter(e=>!_3.has(e));function y3(e){const t=[];return L3.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-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})=>BI(t,"x"),y:(e,{transform:t})=>BI(t,"y")};qa.translateX=qa.x;qa.translateY=qa.y;const Lc=new Set;let FI=!1,HI=!1,VI=!1;function UU(){if(HI){const e=Array.from(Lc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=y3(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,l])=>{var c;(c=r.getValue(o))==null||c.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}HI=!1,FI=!1,Lc.forEach(e=>e.complete(VI)),Lc.clear()}function wU(){Lc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(HI=!0)})}function b3(){VI=!0,wU(),UU(),VI=!1}class GC{constructor(t,n,r,s,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Lc.add(this),FI||(FI=!0,mn.read(wU),mn.resolveKeyframes(UU))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}g3(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Lc.delete(this)}cancel(){this.state==="scheduled"&&(Lc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const P3=e=>e.startsWith("--");function GU(e,t,n){P3(t)?e.style.setProperty(t,n):e.style[t]=n}const D3={};function BU(e,t){const n=EU(e);return()=>D3[t]??n()}const v3=BU(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),FU=BU(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ed=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,TP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ed([0,.65,.55,1]),circOut:ed([.55,0,1,.45]),backIn:ed([.31,.01,.66,-.59]),backOut:ed([.33,1.53,.69,.99])};function HU(e,t){if(e)return typeof e=="function"?FU()?vU(e,t):"ease-out":OU(e)?ed(e):Array.isArray(e)?e.map(n=>HU(n,t)||TP.easeOut):TP[e]}function M3(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:c="easeOut",times:E}={},f=void 0){const h={[t]:n};E&&(h.offset=E);const d=HU(c,s);Array.isArray(d)&&(h.easing=d);const p={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return f&&(p.pseudoElement=f),e.animate(h,p)}function VU(e){return typeof e=="function"&&"applyToOptions"in e}function x3({type:e,...t}){return VU(e)&&FU()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class kU extends wC{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:c,onComplete:E}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,LC(typeof t.type!="string");const f=x3(t);this.animation=M3(n,r,s,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const h=gS(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(h),GU(n,r,h),this.animation.cancel()}E==null||E(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ri(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ri(t)}get time(){return ri(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=vs(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&v3()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),oi):s(this)}}const YU={anticipate:SU,backInOut:RU,circInOut:AU};function U3(e){return e in YU}function w3(e){typeof e.ease=="string"&&U3(e.ease)&&(e.ease=YU[e.ease])}const Gg=10;class G3 extends kU{constructor(t){w3(t),xU(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new PR({...l,autoplay:!1}),E=Math.max(Gg,Zr.now()-this.startTime),f=$i(0,Gg,E-Gg),h=c.sample(E).value,{name:d}=this.options;o&&d&&GU(o,d,h),n.setWithVelocity(c.sample(Math.max(0,E-f)).value,h,f),c.stop()}}const hP=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ii.test(e)||e==="0")&&!e.startsWith("url("));function B3(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 F3(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=hP(s,t),c=hP(o,t);return!l||!c?!1:B3(e)||(n==="spring"||VU(n))&&r}function kI(e){e.duration=0,e.type="keyframes"}const WU=new Set(["opacity","clipPath","filter","transform"]),H3=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function V3(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&H3.test(e[t]))return!0;return!1}const k3=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Y3=EU(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function W3(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:l,keyframes:c}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:h}=t.owner.getProps();return Y3()&&n&&(WU.has(n)||k3.has(n)&&V3(c))&&(n!=="transform"||!h)&&!f&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const j3=40;class X3 extends wC{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:c,name:E,motionValue:f,element:h,...d}){var R;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=Zr.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:E,motionValue:f,element:h,...d},S=(h==null?void 0:h.KeyframeResolver)||GC;this.keyframeResolver=new S(c,(m,g,I)=>this.onKeyframesResolved(m,g,p,!I),E,f,h),(R=this.keyframeResolver)==null||R.scheduleResolve()}onKeyframesResolved(t,n,r,s){var I,C;this.keyframeResolver=void 0;const{name:o,type:l,velocity:c,delay:E,isHandoff:f,onUpdate:h}=r;this.resolvedAt=Zr.now();let d=!0;F3(t,o,l,c)||(d=!1,(al.instantAnimations||!E)&&(h==null||h(gS(t,r,n))),t[0]=t[t.length-1],kI(r),r.repeat=0);const S={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>j3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},R=d&&!f&&W3(S),m=(C=(I=S.motionValue)==null?void 0:I.owner)==null?void 0:C.current;let g;if(R)try{g=new G3({...S,element:m})}catch{g=new PR(S)}else g=new PR(S);g.finished.then(()=>{this.notifyFinished()}).catch(oi),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),b3()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function jU(e,t,n,r=0,s=1){const o=Array.from(e).sort((f,h)=>f.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(o,l):s===1?o*r:c-o*r}const $3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K3(e){const t=$3.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function XU(e,t,n=1){const[r,s]=K3(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return lU(l)?parseFloat(l):l}return DC(s)?XU(s,t,n+1):s}const z3={type:"spring",stiffness:500,damping:25,restSpeed:10},q3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),J3={type:"keyframes",duration:.8},Q3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z3=(e,{keyframes:t})=>t.length>2?J3:CE.has(e)?e.startsWith("scale")?q3(t[1]):z3:Q3;function $U(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function BC(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?$U(n,e):n}const eW=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function tW(e){for(const t in e)if(!eW.has(t))return!0;return!1}const FC=(e,t,n,r={},s,o)=>l=>{const c=BC(r,e)||{},E=c.delay||r.delay||0;let{elapsed:f=0}=r;f=f-vs(E);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:p=>{t.set(p),c.onUpdate&&c.onUpdate(p)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};tW(c)||Object.assign(h,Z3(e,h)),h.duration&&(h.duration=vs(h.duration)),h.repeatDelay&&(h.repeatDelay=vs(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let d=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(kI(h),h.delay===0&&(d=!0)),(al.instantAnimations||al.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,kI(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,d&&!o&&t.get()!==void 0){const p=gS(h.keyframes,c);if(p!==void 0){mn.update(()=>{h.onUpdate(p),h.onComplete()});return}}return c.isSync?new PR(h):new X3(h)};function pP(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function HC(e,t,n,r){if(typeof t=="function"){const[s,o]=pP(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=pP(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function yc(e,t,n){const r=e.getProps();return HC(r,t,n!==void 0?n:r.custom,e)}const KU=new Set(["width","height","top","left","right","bottom",...NE]),RP=30,nW=e=>!isNaN(parseFloat(e));class rW{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Zr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Zr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=nW(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 yC);const r=this.events[t].add(n);return t==="change"?()=>{r(),mn.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>RP)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,RP);return fU(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pE(e,t){return new rW(e,t)}const YI=e=>Array.isArray(e);function sW(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pE(n))}function iW(e){return YI(e)?e[e.length-1]||0:e}function oW(e,t){const n=yc(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const c=iW(o[l]);sW(e,l,c)}}const br=e=>!!(e&&e.getVelocity);function aW(e){return!!(br(e)&&e.add)}function WI(e,t){const n=e.getValue("willChange");if(aW(n))return n.add(t);if(!n&&al.WillChange){const r=new al.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function VC(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const lW="framerAppearId",zU="data-"+VC(lW);function qU(e){return e.props[zU]}function cW({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function JU(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:l,...c}=t;const E=e.getDefaultTransition();o=o?$U(o,E):E;const f=o==null?void 0:o.reduceMotion;r&&(o=r);const h=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const p in c){const S=e.getValue(p,e.latestValues[p]??null),R=c[p];if(R===void 0||d&&cW(d,p))continue;const m={delay:n,...BC(o||{},p)},g=S.get();if(g!==void 0&&!S.isAnimating()&&!Array.isArray(R)&&R===g&&!m.velocity){mn.update(()=>S.set(R));continue}let I=!1;if(window.MotionHandoffAnimation){const N=qU(e);if(N){const y=window.MotionHandoffAnimation(N,p,mn);y!==null&&(m.startTime=y,I=!0)}}WI(e,p);const C=f??e.shouldReduceMotion;S.start(FC(p,S,R,C&&KU.has(p)?{type:!1}:m,e,I));const L=S.animation;L&&h.push(L)}if(l){const p=()=>mn.update(()=>{l&&oW(e,l)});h.length?Promise.all(h).then(p):p()}return h}function jI(e,t,n={}){var E;const r=yc(e,t,n.type==="exit"?(E=e.presenceContext)==null?void 0:E.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(JU(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:d,staggerDirection:p}=s;return uW(e,t,f,h,d,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[f,h]=c==="beforeChildren"?[o,l]:[l,o];return f().then(()=>h())}else return Promise.all([o(),l(n.delay)])}function uW(e,t,n=0,r=0,s=0,o=1,l){const c=[];for(const E of e.variantChildren)E.notify("AnimationStart",t),c.push(jI(E,t,{...l,delay:n+(typeof r=="function"?0:r)+jU(e.variantChildren,E,r,s,o)}).then(()=>E.notify("AnimationComplete",t)));return Promise.all(c)}function EW(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>jI(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=jI(e,t,n);else{const s=typeof t=="function"?yc(e,t,n.custom):t;r=Promise.all(JU(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const fW={test:e=>e==="auto",parse:e=>e},QU=e=>t=>t.test(e),ZU=[IE,nt,ji,La,B5,G5,fW],SP=e=>ZU.find(QU(e));function dW(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||uU(e):!0}const TW=new Set(["brightness","contrast","saturate","opacity"]);function hW(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vC)||[];if(!r)return e;const s=n.replace(r,"");let o=TW.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const pW=/\b([a-z-]*)\(.*?\)/gu,XI={...Ii,getAnimatableNone:e=>{const t=e.match(pW);return t?t.map(hW).join(" "):e}},$I={...Ii,getAnimatableNone:e=>{const t=Ii.parse(e);return Ii.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},mP={...IE,transform:Math.round},RW={rotate:La,rotateX:La,rotateY:La,rotateZ:La,scale:ap,scaleX:ap,scaleY:ap,scaleZ:ap,skew:La,skewX:La,skewY:La,distance:nt,translateX:nt,translateY:nt,translateZ:nt,x:nt,y:nt,z:nt,perspective:nt,transformPerspective:nt,opacity:Dd,originX:iP,originY:iP,originZ:nt},kC={borderWidth:nt,borderTopWidth:nt,borderRightWidth:nt,borderBottomWidth:nt,borderLeftWidth:nt,borderRadius:nt,borderTopLeftRadius:nt,borderTopRightRadius:nt,borderBottomRightRadius:nt,borderBottomLeftRadius:nt,width:nt,maxWidth:nt,height:nt,maxHeight:nt,top:nt,right:nt,bottom:nt,left:nt,inset:nt,insetBlock:nt,insetBlockStart:nt,insetBlockEnd:nt,insetInline:nt,insetInlineStart:nt,insetInlineEnd:nt,padding:nt,paddingTop:nt,paddingRight:nt,paddingBottom:nt,paddingLeft:nt,paddingBlock:nt,paddingBlockStart:nt,paddingBlockEnd:nt,paddingInline:nt,paddingInlineStart:nt,paddingInlineEnd:nt,margin:nt,marginTop:nt,marginRight:nt,marginBottom:nt,marginLeft:nt,marginBlock:nt,marginBlockStart:nt,marginBlockEnd:nt,marginInline:nt,marginInlineStart:nt,marginInlineEnd:nt,fontSize:nt,backgroundPositionX:nt,backgroundPositionY:nt,...RW,zIndex:mP,fillOpacity:Dd,strokeOpacity:Dd,numOctaves:mP},SW={...kC,color:Zn,backgroundColor:Zn,outlineColor:Zn,fill:Zn,stroke:Zn,borderColor:Zn,borderTopColor:Zn,borderRightColor:Zn,borderBottomColor:Zn,borderLeftColor:Zn,filter:XI,WebkitFilter:XI,mask:$I,WebkitMask:$I},e1=e=>SW[e],mW=new Set([XI,$I]);function t1(e,t){let n=e1(e);return mW.has(n)||(n=Ii),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const AW=new Set(["auto","none","0"]);function gW(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!AW.has(o)&&hE(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=t1(n,s)}class OW extends GC{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let d=t[h];if(typeof d=="string"&&(d=d.trim(),DC(d))){const p=XU(d,n.current);p!==void 0&&(t[h]=p),h===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!KU.has(r)||t.length!==2)return;const[s,o]=t,l=SP(s),c=SP(o),E=sP(s),f=sP(o);if(E!==f&&qa[r]){this.needsMeasurement=!0;return}if(l!==c)if(dP(l)&&dP(c))for(let h=0;h<t.length;h++){const d=t[h];typeof d=="string"&&(t[h]=parseFloat(d))}else qa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||dW(t[s]))&&r.push(s);r.length&&gW(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=qa[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var c;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=qa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([E,f])=>{t.getValue(E).set(f)}),this.resolveNoneKeyframes()}}function n1(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const r1=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function IW(e){return cU(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:YC}=IU(queueMicrotask,!1),Si={x:!1,y:!1};function s1(){return Si.x||Si.y}function NW(e){return e==="x"||e==="y"?Si[e]?null:(Si[e]=!0,()=>{Si[e]=!1}):Si.x||Si.y?null:(Si.x=Si.y=!0,()=>{Si.x=Si.y=!1})}function i1(e,t){const n=n1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function CW(e){return!(e.pointerType==="touch"||s1())}function _W(e,t,n={}){const[r,s,o]=i1(e,n);return r.forEach(l=>{let c=!1,E=!1,f;const h=()=>{l.removeEventListener("pointerleave",R)},d=g=>{f&&(f(g),f=void 0),h()},p=g=>{c=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),E&&(E=!1,d(g))},S=()=>{c=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)},R=g=>{if(g.pointerType!=="touch"){if(c){E=!0;return}d(g)}},m=g=>{if(!CW(g))return;E=!1;const I=t(l,g);typeof I=="function"&&(f=I,l.addEventListener("pointerleave",R,s))};l.addEventListener("pointerenter",m,s),l.addEventListener("pointerdown",S,s)}),o}const o1=(e,t)=>t?e===t?!0:o1(e,t.parentElement):!1,WC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,LW=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yW(e){return LW.has(e.tagName)||e.isContentEditable===!0}const bW=new Set(["INPUT","SELECT","TEXTAREA"]);function PW(e){return bW.has(e.tagName)||e.isContentEditable===!0}const Xp=new WeakSet;function AP(e){return t=>{t.key==="Enter"&&e(t)}}function Bg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const DW=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=AP(()=>{if(Xp.has(n))return;Bg(n,"down");const s=AP(()=>{Bg(n,"up")}),o=()=>Bg(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function gP(e){return WC(e)&&!s1()}const OP=new WeakSet;function vW(e,t,n={}){const[r,s,o]=i1(e,n),l=c=>{const E=c.currentTarget;if(!gP(c)||OP.has(c))return;Xp.add(E),n.stopPropagation&&OP.add(c);const f=t(E,c),h=(S,R)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),Xp.has(E)&&Xp.delete(E),gP(S)&&typeof f=="function"&&f(S,{success:R})},d=S=>{h(S,E===window||E===document||n.useGlobalTarget||o1(E,S.target))},p=S=>{h(S,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",p,s)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,s),IW(c)&&(c.addEventListener("focus",f=>DW(f,s)),!yW(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function jC(e){return cU(e)&&"ownerSVGElement"in e}const $p=new WeakMap;let ya;const a1=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:jC(r)&&"getBBox"in r?r.getBBox()[t]:r[n],MW=a1("inline","width","offsetWidth"),xW=a1("block","height","offsetHeight");function UW({target:e,borderBoxSize:t}){var n;(n=$p.get(e))==null||n.forEach(r=>{r(e,{get width(){return MW(e,t)},get height(){return xW(e,t)}})})}function wW(e){e.forEach(UW)}function GW(){typeof ResizeObserver>"u"||(ya=new ResizeObserver(wW))}function BW(e,t){ya||GW();const n=n1(e);return n.forEach(r=>{let s=$p.get(r);s||(s=new Set,$p.set(r,s)),s.add(t),ya==null||ya.observe(r)}),()=>{n.forEach(r=>{const s=$p.get(r);s==null||s.delete(t),s!=null&&s.size||ya==null||ya.unobserve(r)})}}const Kp=new Set;let ju;function FW(){ju=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Kp.forEach(t=>t(e))},window.addEventListener("resize",ju)}function HW(e){return Kp.add(e),ju||FW(),()=>{Kp.delete(e),!Kp.size&&typeof ju=="function"&&(window.removeEventListener("resize",ju),ju=void 0)}}function IP(e,t){return typeof e=="function"?HW(e):BW(e,t)}function VW(e){return jC(e)&&e.tagName==="svg"}const kW=[...ZU,Zn,Ii],YW=e=>kW.find(QU(e)),NP=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xu=()=>({x:NP(),y:NP()}),CP=()=>({min:0,max:0}),ir=()=>({x:CP(),y:CP()}),WW=new WeakMap;function OS(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vd(e){return typeof e=="string"||Array.isArray(e)}const XC=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$C=["initial",...XC];function IS(e){return OS(e.animate)||$C.some(t=>vd(e[t]))}function l1(e){return!!(IS(e)||e.variants)}function jW(e,t,n){for(const r in t){const s=t[r],o=n[r];if(br(s))e.addValue(r,s);else if(br(o))e.addValue(r,pE(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,pE(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const KI={current:null},c1={current:!1},XW=typeof window<"u";function $W(){if(c1.current=!0,!!XW)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>KI.current=e.matches;e.addEventListener("change",t),t()}else KI.current=!1}const _P=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let DR={};function u1(e){DR=e}function KW(){return DR}class zW{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:l,visualState:c},E={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=GC,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 S=Zr.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,mn.render(this.render,!1,!0))};const{latestValues:f,renderState:h}=c;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=E,this.blockInitialAnimation=!!l,this.isControllingVariants=IS(n),this.isVariantNode=l1(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const S in p){const R=p[S];f[S]!==void 0&&br(R)&&R.set(f[S])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,WW.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(c1.current||$W(),this.shouldReduceMotion=KI.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ll(this.notifyUpdate),ll(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&WU.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:c,times:E,ease:f,duration:h}=n.accelerate,d=new kU({element:this.current,name:t,keyframes:c,times:E,ease:f,duration:vs(h)}),p=l(d);this.valueSubscriptions.set(t,()=>{p(),d.cancel()});return}const r=CE.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&mn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),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 DR){const n=DR[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(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):ir()}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<_P.length;r++){const s=_P[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,l=t[o];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=jW(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=pE(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(lU(r)||uU(r))?r=parseFloat(r):!YW(r)&&Ii.test(n)&&(r=t1(t,n)),this.setBaseTarget(t,br(r)?r.get():r)),br(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=HC(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!br(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yC),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){YC.render(this.render)}}class E1 extends zW{constructor(){super(...arguments),this.KeyframeResolver=OW}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;br(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class hl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function f1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function qW({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function JW(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}}function Fg(e){return e===void 0||e===1}function zI({scale:e,scaleX:t,scaleY:n}){return!Fg(e)||!Fg(t)||!Fg(n)}function Jl(e){return zI(e)||d1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function d1(e){return LP(e.x)||LP(e.y)}function LP(e){return e&&e!=="0%"}function vR(e,t,n){const r=e-n,s=t*r;return n+s}function yP(e,t,n,r,s){return s!==void 0&&(e=vR(e,s,r)),vR(e,n,r)+t}function qI(e,t=0,n=1,r,s){e.min=yP(e.min,t,n,r,s),e.max=yP(e.max,t,n,r,s)}function T1(e,{x:t,y:n}){qI(e.x,t.translate,t.scale,t.originPoint),qI(e.y,n.translate,n.scale,n.originPoint)}const bP=.999999999999,PP=1.0000000000001;function QW(e,t,n,r=!1){var c;const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let E=0;E<s;E++){o=n[E],l=o.projectionDelta;const{visualElement:f}=o.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Yi(e.x,-o.scroll.offset.x),Yi(e.y,-o.scroll.offset.y)),l&&(t.x*=l.x.scale,t.y*=l.y.scale,T1(e,l)),r&&Jl(o.latestValues)&&zp(e,o.latestValues,(c=o.layout)==null?void 0:c.layoutBox))}t.x<PP&&t.x>bP&&(t.x=1),t.y<PP&&t.y>bP&&(t.y=1)}function Yi(e,t){e.min+=t,e.max+=t}function DP(e,t,n,r,s=.5){const o=Ln(e.min,e.max,s);qI(e,t,n,o,r)}function vP(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function zp(e,t,n){const r=n??e;DP(e.x,vP(t.x,r.x),t.scaleX,t.scale,t.originX),DP(e.y,vP(t.y,r.y),t.scaleY,t.scale,t.originY)}function h1(e,t){return f1(JW(e.getBoundingClientRect(),t))}function ZW(e,t,n){const r=h1(e,n),{scroll:s}=t;return s&&(Yi(r.x,s.offset.x),Yi(r.y,s.offset.y)),r}const ej={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tj=NE.length;function nj(e,t,n){let r="",s=!0;for(let o=0;o<tj;o++){const l=NE[o],c=e[l];if(c===void 0)continue;let E=!0;if(typeof c=="number")E=c===(l.startsWith("scale")?1:0);else{const f=parseFloat(c);E=l.startsWith("scale")?f===1:f===0}if(!E||n){const f=r1(c,kC[l]);if(!E){s=!1;const h=ej[l]||l;r+=`${h}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function KC(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,c=!1;for(const E in t){const f=t[E];if(CE.has(E)){l=!0;continue}else if(CU(E)){s[E]=f;continue}else{const h=r1(f,kC[E]);E.startsWith("origin")?(c=!0,o[E]=h):r[E]=h}}if(t.transform||(l||n?r.transform=nj(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:E="50%",originY:f="50%",originZ:h=0}=o;r.transformOrigin=`${E} ${f} ${h}`}}function p1(e,{style:t,vars:n},r,s){const o=e.style;let l;for(l in t)o[l]=t[l];s==null||s.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function MP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(nt.test(e))e=parseFloat(e);else return e;const n=MP(e,t.target.x),r=MP(e,t.target.y);return`${n}% ${r}%`}},rj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ii.parse(e);if(s.length>5)return r;const o=Ii.createTransformer(e),l=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,E=n.y.scale*t.y;s[0+l]/=c,s[1+l]/=E;const f=Ln(c,E,.5);return typeof s[2+l]=="number"&&(s[2+l]/=f),typeof s[3+l]=="number"&&(s[3+l]/=f),o(s)}},JI={borderRadius:{...Xf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xf,borderTopRightRadius:Xf,borderBottomLeftRadius:Xf,borderBottomRightRadius:Xf,boxShadow:rj};function R1(e,{layout:t,layoutId:n}){return CE.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!JI[e]||e==="opacity")}function zC(e,t,n){var l;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const c in r)(br(r[c])||s&&br(s[c])||R1(c,e)||((l=n==null?void 0:n.getValue(c))==null?void 0:l.liveStyle)!==void 0)&&(o[c]=r[c]);return o}function sj(e){return window.getComputedStyle(e)}class ij extends E1{constructor(){super(...arguments),this.type="html",this.renderInstance=p1}readValueFromInstance(t,n){var r;if(CE.has(n))return(r=this.projection)!=null&&r.isProjecting?GI(n):N3(t,n);{const s=sj(t),o=(CU(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return h1(t,n)}build(t,n,r){KC(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zC(t,n,r)}}const oj={offset:"stroke-dashoffset",array:"stroke-dasharray"},aj={offset:"strokeDashoffset",array:"strokeDasharray"};function lj(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?oj:aj;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const cj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function S1(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},E,f,h){if(KC(e,c,f),E){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete d.transformBox);for(const S of cj)d[S]!==void 0&&(p[S]=d[S],delete d[S]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&lj(d,s,o,l,!1)}const m1=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"]),A1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uj(e,t,n,r){p1(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(m1.has(s)?s:VC(s),t.attrs[s])}function g1(e,t,n){const r=zC(e,t,n);for(const s in e)if(br(e[s])||br(t[s])){const o=NE.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class Ej extends E1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ir}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(CE.has(n)){const r=e1(n);return r&&r.default||0}return n=m1.has(n)?n:VC(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return g1(t,n,r)}build(t,n,r){S1(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){uj(t,n,r,s)}mount(t){this.isSVGTag=A1(t.tagName),super.mount(t)}}const fj=$C.length;function O1(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?O1(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fj;n++){const r=$C[n],s=e.props[r];(vd(s)||s===!1)&&(t[r]=s)}return t}function I1(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 dj=[...XC].reverse(),Tj=XC.length;function hj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>EW(e,n,r)))}function pj(e){let t=hj(e),n=xP(),r=!0,s=!1;const o=f=>(h,d)=>{var S;const p=yc(e,d,f==="exit"?(S=e.presenceContext)==null?void 0:S.custom:void 0);if(p){const{transition:R,transitionEnd:m,...g}=p;h={...h,...g,...m}}return h};function l(f){t=f(e)}function c(f){const{props:h}=e,d=O1(e.parent)||{},p=[],S=new Set;let R={},m=1/0;for(let I=0;I<Tj;I++){const C=dj[I],L=n[C],N=h[C]!==void 0?h[C]:d[C],y=vd(N),_=C===f?L.isActive:null;_===!1&&(m=I);let M=N===d[C]&&N!==h[C]&&y;if(M&&(r||s)&&e.manuallyAnimateOnMount&&(M=!1),L.protectedKeys={...R},!L.isActive&&_===null||!N&&!L.prevProp||OS(N)||typeof N=="boolean")continue;if(C==="exit"&&L.isActive&&_!==!0){L.prevResolvedValues&&(R={...R,...L.prevResolvedValues});continue}const w=Rj(L.prevProp,N);let F=w||C===f&&L.isActive&&!M&&y||I>m&&y,Y=!1;const $=Array.isArray(N)?N:[N];let W=$.reduce(o(C),{});_===!1&&(W={});const{prevResolvedValues:K={}}=L,q={...K,...W},j=Z=>{F=!0,S.has(Z)&&(Y=!0,S.delete(Z)),L.needsAnimating[Z]=!0;const ie=e.getValue(Z);ie&&(ie.liveStyle=!1)};for(const Z in q){const ie=W[Z],ne=K[Z];if(R.hasOwnProperty(Z))continue;let B=!1;YI(ie)&&YI(ne)?B=!I1(ie,ne):B=ie!==ne,B?ie!=null?j(Z):S.add(Z):ie!==void 0&&S.has(Z)?j(Z):L.protectedKeys[Z]=!0}L.prevProp=N,L.prevResolvedValues=W,L.isActive&&(R={...R,...W}),(r||s)&&e.blockInitialAnimation&&(F=!1);const k=M&&w;F&&(!k||Y)&&p.push(...$.map(Z=>{const ie={type:C};if(typeof Z=="string"&&(r||s)&&!k&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,B=yc(ne,Z);if(ne.enteringChildren&&B){const{delayChildren:Q}=B.transition||{};ie.delay=jU(ne.enteringChildren,e,Q)}}return{animation:Z,options:ie}}))}if(S.size){const I={};if(typeof h.initial!="boolean"){const C=yc(e,Array.isArray(h.initial)?h.initial[0]:h.initial);C&&C.transition&&(I.transition=C.transition)}S.forEach(C=>{const L=e.getBaseTarget(C),N=e.getValue(C);N&&(N.liveStyle=!0),I[C]=L??null}),p.push({animation:I})}let g=!!p.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,s=!1,g?t(p):Promise.resolve()}function E(f,h){var p;if(n[f].isActive===h)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(S=>{var R;return(R=S.animationState)==null?void 0:R.setActive(f,h)}),n[f].isActive=h;const d=c(f);for(const S in n)n[S].protectedKeys={};return d}return{animateChanges:c,setActive:E,setAnimateFunction:l,getState:()=>n,reset:()=>{n=xP(),s=!0}}}function Rj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!I1(t,e):!1}function jl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xP(){return{animate:jl(!0),whileInView:jl(),whileHover:jl(),whileTap:jl(),whileDrag:jl(),whileFocus:jl(),exit:jl()}}function QI(e,t){e.min=t.min,e.max=t.max}function pi(e,t){QI(e.x,t.x),QI(e.y,t.y)}function UP(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const N1=1e-4,Sj=1-N1,mj=1+N1,C1=.01,Aj=0-C1,gj=0+C1;function es(e){return e.max-e.min}function Oj(e,t,n){return Math.abs(e-t)<=n}function wP(e,t,n,r=.5){e.origin=r,e.originPoint=Ln(t.min,t.max,e.origin),e.scale=es(n)/es(t),e.translate=Ln(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Sj&&e.scale<=mj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Aj&&e.translate<=gj||isNaN(e.translate))&&(e.translate=0)}function Ed(e,t,n,r){wP(e.x,t.x,n.x,r?r.originX:void 0),wP(e.y,t.y,n.y,r?r.originY:void 0)}function GP(e,t,n,r=0){const s=r?Ln(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+es(t)}function Ij(e,t,n,r){GP(e.x,t.x,n.x,r==null?void 0:r.x),GP(e.y,t.y,n.y,r==null?void 0:r.y)}function BP(e,t,n,r=0){const s=r?Ln(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+es(t)}function MR(e,t,n,r){BP(e.x,t.x,n.x,r==null?void 0:r.x),BP(e.y,t.y,n.y,r==null?void 0:r.y)}function FP(e,t,n,r,s){return e-=t,e=vR(e,1/n,r),s!==void 0&&(e=vR(e,1/s,r)),e}function Nj(e,t=0,n=1,r=.5,s,o=e,l=e){if(ji.test(t)&&(t=parseFloat(t),t=Ln(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Ln(o.min,o.max,r);e===o&&(c-=t),e.min=FP(e.min,t,n,c,s),e.max=FP(e.max,t,n,c,s)}function HP(e,t,[n,r,s],o,l){Nj(e,t[n],t[r],t[s],t.scale,o,l)}const Cj=["x","scaleX","originX"],_j=["y","scaleY","originY"];function VP(e,t,n,r){HP(e.x,t,Cj,n?n.x:void 0,r?r.x:void 0),HP(e.y,t,_j,n?n.y:void 0,r?r.y:void 0)}function kP(e){return e.translate===0&&e.scale===1}function _1(e){return kP(e.x)&&kP(e.y)}function YP(e,t){return e.min===t.min&&e.max===t.max}function Lj(e,t){return YP(e.x,t.x)&&YP(e.y,t.y)}function WP(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L1(e,t){return WP(e.x,t.x)&&WP(e.y,t.y)}function jP(e){return es(e.x)/es(e.y)}function XP(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Gi(e){return[e("x"),e("y")]}function yj(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||o||l)&&(r=`translate3d(${s}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:d,rotateY:p,skewX:S,skewY:R}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),S&&(r+=`skewX(${S}deg) `),R&&(r+=`skewY(${R}deg) `)}const c=e.x.scale*t.x,E=e.y.scale*t.y;return(c!==1||E!==1)&&(r+=`scale(${c}, ${E})`),r||"none"}const y1=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],bj=y1.length,$P=e=>typeof e=="string"?parseFloat(e):e,KP=e=>typeof e=="number"||nt.test(e);function Pj(e,t,n,r,s,o){s?(e.opacity=Ln(0,n.opacity??1,Dj(r)),e.opacityExit=Ln(t.opacity??1,0,vj(r))):o&&(e.opacity=Ln(t.opacity??1,n.opacity??1,r));for(let l=0;l<bj;l++){const c=y1[l];let E=zP(t,c),f=zP(n,c);if(E===void 0&&f===void 0)continue;E||(E=0),f||(f=0),E===0||f===0||KP(E)===KP(f)?(e[c]=Math.max(Ln($P(E),$P(f),r),0),(ji.test(f)||ji.test(E))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=Ln(t.rotate||0,n.rotate||0,r))}function zP(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Dj=b1(0,.5,mU),vj=b1(.5,.95,oi);function b1(e,t,n){return r=>r<e?0:r>t?1:n(Pd(e,t,r))}function Mj(e,t,n){const r=br(e)?e:pE(e);return r.start(FC("",r,t,n)),r.animation}function Md(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const xj=(e,t)=>e.depth-t.depth;class Uj{constructor(){this.children=[],this.isDirty=!1}add(t){_C(this.children,t),this.isDirty=!0}remove(t){_R(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xj),this.isDirty=!1,this.children.forEach(t)}}function wj(e,t){const n=Zr.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ll(r),e(o-t))};return mn.setup(r,!0),()=>ll(r)}function qp(e){return br(e)?e.get():e}class Gj{constructor(){this.members=[]}add(t){_C(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(_R(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(_R(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){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:l}=t.options;(o===void 0||o!==l)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,o,l;(r=(n=t.options).onExitComplete)==null||r.call(n),(l=(s=t.resumingFrom)==null?void 0:(o=s.options).onExitComplete)==null||l.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Jp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Hg=["","X","Y","Z"],Bj=1e3;let Fj=0;function Vg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function P1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=qU(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mn,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&P1(r)}function D1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},c=t==null?void 0:t()){this.id=Fj++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(kj),this.nodes.forEach(Kj),this.nodes.forEach(zj),this.nodes.forEach(Yj)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let E=0;E<this.path.length;E++)this.path[E].shouldResetTransform=!0;this.root===this&&(this.nodes=new Uj)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new yC),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const E=this.eventHandlers.get(l);E&&E.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=jC(l)&&!VW(l),this.instance=l;const{layoutId:c,layout:E,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(E||c)&&(this.isLayoutDirty=!0),e){let h,d=0;const p=()=>this.root.updateBlockedByResize=!1;mn.read(()=>{d=window.innerWidth}),e(l,()=>{const S=window.innerWidth;S!==d&&(d=S,this.root.updateBlockedByResize=!0,h&&h(),h=wj(p,250),Jp.hasAnimatedSinceResize&&(Jp.hasAnimatedSinceResize=!1,this.nodes.forEach(QP)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||E)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=this.options.transition||f.getDefaultTransition()||e4,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=f.getProps(),I=!this.targetLayout||!L1(this.targetLayout,S),C=!d&&p;if(this.options.layoutRoot||this.resumeFrom||C||d&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...BC(R,"layout"),onPlay:m,onComplete:g};(f.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(h,C)}else d||QP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}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,this.eventHandlers.clear(),ll(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(qj),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&&P1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const d=this.path[h];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:c,layout:E}=this.options;if(c===void 0&&!E)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()){const E=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),E&&this.nodes.forEach(jj),this.nodes.forEach(qP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(JP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xj),this.nodes.forEach($j),this.nodes.forEach(Hj),this.nodes.forEach(Vj)):this.nodes.forEach(JP),this.clearAllSnapshots();const c=Zr.now();Lr.delta=$i(0,1e3/60,c-Lr.timestamp),Lr.timestamp=c,Lr.isProcessing=!0,vg.update.process(Lr),vg.preRender.process(Lr),vg.render.process(Lr),Lr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,YC.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wj),this.sharedNodes.forEach(Jj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!es(this.snapshot.measuredBox.x)&&!es(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 E=0;E<this.path.length;E++)this.path[E].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ir()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const E=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:E,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:E}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!_1(this.projectionDelta),E=this.getTransformTemplate(),f=E?E(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;l&&this.instance&&(c||Jl(this.latestValues)||h)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let E=this.removeElementScroll(c);return l&&(E=this.removeTransform(E)),t4(E),{animationId:this.root.animationId,measuredBox:c,layoutBox:E,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return ir();const c=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(n4))){const{scroll:h}=this.root;h&&(Yi(c.x,h.offset.x),Yi(c.y,h.offset.y))}return c}removeElementScroll(l){var E;const c=ir();if(pi(c,l),(E=this.scroll)!=null&&E.wasRoot)return c;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:d,options:p}=h;h!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&pi(c,l),Yi(c.x,d.offset.x),Yi(c.y,d.offset.y))}return c}applyTransform(l,c=!1,E){var h,d;const f=E||ir();pi(f,l);for(let p=0;p<this.path.length;p++){const S=this.path[p];!c&&S.options.layoutScroll&&S.scroll&&S!==S.root&&(Yi(f.x,-S.scroll.offset.x),Yi(f.y,-S.scroll.offset.y)),Jl(S.latestValues)&&zp(f,S.latestValues,(h=S.layout)==null?void 0:h.layoutBox)}return Jl(this.latestValues)&&zp(f,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),f}removeTransform(l){var E;const c=ir();pi(c,l);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!Jl(h.latestValues))continue;let d;h.instance&&(zI(h.latestValues)&&h.updateSnapshot(),d=ir(),pi(d,h.measurePageBox())),VP(c,h.latestValues,(E=h.snapshot)==null?void 0:E.layoutBox,d)}return Jl(this.latestValues)&&VP(c,this.latestValues),c}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!==Lr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var S;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const E=!!this.resumingFrom||this!==c;if(!(l||E&&this.isSharedProjectionDirty||this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!this.layout||!(h||d))return;this.resolvedRelativeTargetAt=Lr.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ir(),this.targetWithTransforms=ir()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ij(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):pi(this.target,this.layout.layoutBox),T1(this.target,this.targetDelta)):pi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||zI(this.parent.latestValues)||d1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,E){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ir(),this.relativeTargetOrigin=ir(),MR(this.relativeTargetOrigin,c,E,this.options.layoutAnchor||void 0),pi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var R;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let E=!0;if((this.isProjectionDirty||(R=this.parent)!=null&&R.isProjectionDirty)&&(E=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(E=!1),this.resolvedRelativeTargetAt===Lr.timestamp&&(E=!1),E)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;pi(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;QW(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=ir());const{target:S}=l;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(UP(this.prevProjectionDelta.x,this.projectionDelta.x),UP(this.prevProjectionDelta.y,this.projectionDelta.y)),Ed(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!XP(this.projectionDelta.x,this.prevProjectionDelta.x)||!XP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const E=this.getStack();E&&E.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xu(),this.projectionDelta=Xu(),this.projectionDeltaWithTransform=Xu()}setAnimationOrigin(l,c=!1){const E=this.snapshot,f=E?E.latestValues:{},h={...this.latestValues},d=Xu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const p=ir(),S=E?E.source:void 0,R=this.layout?this.layout.source:void 0,m=S!==R,g=this.getStack(),I=!g||g.members.length<=1,C=!!(m&&!I&&this.options.crossfade===!0&&!this.path.some(Zj));this.animationProgress=0;let L;this.mixTargetDelta=N=>{const y=N/1e3;ZP(d.x,l.x,y),ZP(d.y,l.y,y),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(MR(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Qj(this.relativeTarget,this.relativeTargetOrigin,p,y),L&&Lj(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=ir()),pi(L,this.relativeTarget)),m&&(this.animationValues=h,Pj(h,f,this.latestValues,y,C,I)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,E,f;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(f=(E=this.resumingFrom)==null?void 0:E.currentAnimation)==null||f.stop(),this.pendingAnimation&&(ll(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mn.update(()=>{Jp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pE(0)),this.motionValue.jump(0,!1),this.currentAnimation=Mj(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),l.onUpdate&&l.onUpdate(h)},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(Bj),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:E,layout:f,latestValues:h}=l;if(!(!c||!E||!f)){if(this!==l&&this.layout&&f&&v1(this.options.animationType,this.layout.layoutBox,f.layoutBox)){E=this.target||ir();const d=es(this.layout.layoutBox.x);E.x.min=l.target.x.min,E.x.max=E.x.min+d;const p=es(this.layout.layoutBox.y);E.y.min=l.target.y.min,E.y.max=E.y.min+p}pi(c,E),zp(c,h),Ed(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new Gj),this.sharedNodes.get(l).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:E}={}){const f=this.getStack();f&&f.promote(this,E),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:E}=l;if((E.z||E.rotate||E.rotateX||E.rotateY||E.rotateZ||E.skewX||E.skewY)&&(c=!0),!c)return;const f={};E.z&&Vg("z",l,f,this.animationValues);for(let h=0;h<Hg.length;h++)Vg(`rotate${Hg[h]}`,l,f,this.animationValues),Vg(`skew${Hg[h]}`,l,f,this.animationValues);l.render();for(const h in f)l.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const E=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=qp(c==null?void 0:c.pointerEvents)||"",l.transform=E?E(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=qp(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Jl(this.latestValues)&&(l.transform=E?E({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let d=yj(this.projectionDeltaWithTransform,this.treeScale,h);E&&(d=E(h,d)),l.transform=d;const{x:p,y:S}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${S.origin*100}% 0`,f.animationValues?l.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const R in JI){if(h[R]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:I}=JI[R],C=d==="none"?h[R]:m(h[R],f);if(g){const L=g.length;for(let N=0;N<L;N++)l[g[N]]=C}else I?this.options.visualElement.renderState.vars[R]=C:l[R]=C}this.options.layoutId&&(l.pointerEvents=f===this?qp(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(qP),this.root.sharedNodes.clear()}}}function Hj(e){e.updateLayout()}function Vj(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;if(o==="size")Gi(d=>{const p=l?t.measuredBox[d]:t.layoutBox[d],S=es(p);p.min=r[d].min,p.max=p.min+S});else if(o==="x"||o==="y"){const d=o==="x"?"y":"x";QI(l?t.measuredBox[d]:t.layoutBox[d],r[d])}else v1(o,t.layoutBox,r)&&Gi(d=>{const p=l?t.measuredBox[d]:t.layoutBox[d],S=es(r[d]);p.max=p.min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+S)});const c=Xu();Ed(c,r,t.layoutBox);const E=Xu();l?Ed(E,e.applyTransform(s,!0),t.measuredBox):Ed(E,r,t.layoutBox);const f=!_1(c);let h=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:S}=d;if(p&&S){const R=e.options.layoutAnchor||void 0,m=ir();MR(m,t.layoutBox,p.layoutBox,R);const g=ir();MR(g,r,S.layoutBox,R),L1(m,g)||(h=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:E,layoutDelta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function kj(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 Yj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wj(e){e.clearSnapshot()}function qP(e){e.clearMeasurements()}function jj(e){e.isLayoutDirty=!0,e.updateLayout()}function JP(e){e.isLayoutDirty=!1}function Xj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function $j(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function QP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kj(e){e.resolveTargetDelta()}function zj(e){e.calcProjection()}function qj(e){e.resetSkewAndRotation()}function Jj(e){e.removeLeadSnapshot()}function ZP(e,t,n){e.translate=Ln(t.translate,0,n),e.scale=Ln(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function eD(e,t,n,r){e.min=Ln(t.min,n.min,r),e.max=Ln(t.max,n.max,r)}function Qj(e,t,n,r){eD(e.x,t.x,n.x,r),eD(e.y,t.y,n.y,r)}function Zj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const e4={duration:.45,ease:[.4,0,.1,1]},tD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nD=tD("applewebkit/")&&!tD("chrome/")?Math.round:oi;function rD(e){e.min=nD(e.min),e.max=nD(e.max)}function t4(e){rD(e.x),rD(e.y)}function v1(e,t,n){return e==="position"||e==="preserve-aspect"&&!Oj(jP(t),jP(n),.2)}function n4(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const r4=D1({attachResizeListener:(e,t)=>Md(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),kg={current:void 0},M1=D1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!kg.current){const e=new r4({});e.mount(window),e.setOptions({layoutScroll:!0}),kg.current=e}return kg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),x1=D.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function s4(e=!0){const t=D.useContext(CC);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=D.useId();D.useEffect(()=>{if(e)return s(o)},[e]);const l=D.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const U1=D.createContext({strict:!1}),sD={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"]};let iD=!1;function i4(){if(iD)return;const e={};for(const t in sD)e[t]={isEnabled:n=>sD[t].some(r=>!!n[r])};u1(e),iD=!0}function w1(){return i4(),KW()}function o4(e){const t=w1();for(const n in e)t[n]={...t[n],...e[n]};u1(t)}const a4=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","propagate","ignoreStrict","viewport"]);function xR(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a4.has(e)}let G1=e=>!xR(e);function l4(e){typeof e=="function"&&(G1=t=>t.startsWith("on")?!xR(t):e(t))}try{l4(require("@emotion/is-prop-valid").default)}catch{}function c4(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||br(e[s])||(G1(s)||n===!0&&xR(s)||!t&&!xR(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const NS=D.createContext({});function u4(e,t){if(IS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vd(n)?n:void 0,animate:vd(r)?r:void 0}}return e.inherit!==!1?t:{}}function E4(e){const{initial:t,animate:n}=u4(e,D.useContext(NS));return D.useMemo(()=>({initial:t,animate:n}),[oD(t),oD(n)])}function oD(e){return Array.isArray(e)?e.join(" "):e}const qC=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function B1(e,t,n){for(const r in t)!br(t[r])&&!R1(r,n)&&(e[r]=t[r])}function f4({transformTemplate:e},t){return D.useMemo(()=>{const n=qC();return KC(n,t,e),Object.assign({},n.vars,n.style)},[t])}function d4(e,t){const n=e.style||{},r={};return B1(r,n,e),Object.assign(r,f4(e,t)),r}function T4(e,t){const n={},r=d4(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 F1=()=>({...qC(),attrs:{}});function h4(e,t,n,r){const s=D.useMemo(()=>{const o=F1();return S1(o,t,A1(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};B1(o,e.style,e),s.style={...o,...s.style}}return s}const p4=["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 JC(e){return typeof e!="string"||e.includes("-")?!1:!!(p4.indexOf(e)>-1||/[A-Z]/u.test(e))}function R4(e,t,n,{latestValues:r},s,o=!1,l){const E=(l??JC(e)?h4:T4)(t,r,s,e),f=c4(t,typeof e=="string",o),h=e!==D.Fragment?{...f,...E,ref:n}:{},{children:d}=t,p=D.useMemo(()=>br(d)?d.get():d,[d]);return D.createElement(e,{...h,children:p})}function S4({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:m4(n,r,s,e),renderState:t()}}function m4(e,t,n,r){const s={},o=r(e,{});for(const p in o)s[p]=qp(o[p]);let{initial:l,animate:c}=e;const E=IS(e),f=l1(e);t&&f&&!E&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const d=h?c:l;if(d&&typeof d!="boolean"&&!OS(d)){const p=Array.isArray(d)?d:[d];for(let S=0;S<p.length;S++){const R=HC(e,p[S]);if(R){const{transitionEnd:m,transition:g,...I}=R;for(const C in I){let L=I[C];if(Array.isArray(L)){const N=h?L.length-1:0;L=L[N]}L!==null&&(s[C]=L)}for(const C in m)s[C]=m[C]}}}return s}const H1=e=>(t,n)=>{const r=D.useContext(NS),s=D.useContext(CC),o=()=>S4(e,t,r,s);return n?o():p5(o)},A4=H1({scrapeMotionValuesFromProps:zC,createRenderState:qC}),g4=H1({scrapeMotionValuesFromProps:g1,createRenderState:F1}),O4=Symbol.for("motionComponentSymbol");function I4(e,t,n){const r=D.useRef(n);D.useInsertionEffect(()=>{r.current=n});const s=D.useRef(null);return D.useCallback(o=>{var c;o&&((c=e.onMount)==null||c.call(e,o));const l=r.current;if(typeof l=="function")if(o){const E=l(o);typeof E=="function"&&(s.current=E)}else s.current?(s.current(),s.current=null):l(o);else l&&(l.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const V1=D.createContext({});function Bu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function N4(e,t,n,r,s,o){var L,N;const{visualElement:l}=D.useContext(NS),c=D.useContext(U1),E=D.useContext(CC),f=D.useContext(x1),h=f.reducedMotion,d=f.skipAnimations,p=D.useRef(null),S=D.useRef(!1);r=r||c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:l,props:n,presenceContext:E,blockInitialAnimation:E?E.initial===!1:!1,reducedMotionConfig:h,skipAnimations:d,isSVG:o}),S.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const R=p.current,m=D.useContext(V1);R&&!R.projection&&s&&(R.type==="html"||R.type==="svg")&&C4(p.current,n,s,m);const g=D.useRef(!1);D.useInsertionEffect(()=>{R&&g.current&&R.update(n,E)});const I=n[zU],C=D.useRef(!!I&&typeof window<"u"&&!((L=window.MotionHandoffIsComplete)!=null&&L.call(window,I))&&((N=window.MotionHasOptimisedAnimation)==null?void 0:N.call(window,I)));return S5(()=>{S.current=!0,R&&(g.current=!0,window.MotionIsMounted=!0,R.updateFeatures(),R.scheduleRenderMicrotask(),C.current&&R.animationState&&R.animationState.animateChanges())}),D.useEffect(()=>{R&&(!C.current&&R.animationState&&R.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,I)}),C.current=!1),R.enteringChildren=void 0)}),R}function C4(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:c,layoutScroll:E,layoutRoot:f,layoutAnchor:h,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:k1(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||c&&Bu(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:E,layoutRoot:f,layoutAnchor:h})}function k1(e){if(e)return e.options.allowProjection!==!1?e.projection:k1(e.parent)}function Yg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&o4(r);const o=n?n==="svg":JC(e),l=o?g4:A4;function c(f,h){let d;const p={...D.useContext(x1),...f,layoutId:_4(f)},{isStatic:S}=p,R=E4(f),m=l(f,S);if(!S&&typeof window<"u"){L4();const g=y4(p);d=g.MeasureLayout,R.visualElement=N4(e,m,p,s,g.ProjectionNode,o)}return v.jsxs(NS.Provider,{value:R,children:[d&&R.visualElement?v.jsx(d,{visualElement:R.visualElement,...p}):null,R4(e,f,I4(m,R.visualElement,h),m,S,t,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const E=D.forwardRef(c);return E[O4]=e,E}function _4({layoutId:e}){const t=D.useContext(aU).id;return t&&e!==void 0?t+"-"+e:e}function L4(e,t){D.useContext(U1).strict}function y4(e){const t=w1(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function b4(e,t){if(typeof Proxy>"u")return Yg;const n=new Map,r=(o,l)=>Yg(o,l,e,t),s=(o,l)=>r(o,l);return new Proxy(s,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,Yg(l,void 0,e,t)),n.get(l))})}const P4=(e,t)=>t.isSVG??JC(e)?new Ej(t):new ij(t,{allowProjection:e!==D.Fragment});class D4 extends hl{constructor(t){super(t),t.animationState||(t.animationState=pj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();OS(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.call(this)}}let v4=0;class M4 extends hl{constructor(){super(...arguments),this.id=v4++,this.isExitComplete=!1}update(){var o;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;if(t&&r===!1){if(this.isExitComplete){const{initial:l,custom:c}=this.node.getProps();if(typeof l=="string"){const E=yc(this.node,l,c);if(E){const{transition:f,transitionEnd:h,...d}=E;for(const p in d)(o=this.node.getValue(p))==null||o.jump(d[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const x4={animation:{Feature:D4},exit:{Feature:M4}};function oT(e){return{point:{x:e.pageX,y:e.pageY}}}const U4=e=>t=>WC(t)&&e(t,oT(t));function fd(e,t,n,r){return Md(e,t,U4(n),r)}const Y1=({current:e})=>e?e.ownerDocument.defaultView:null,aD=(e,t)=>Math.abs(e-t);function w4(e,t){const n=aD(e.x,t.x),r=aD(e.y,t.y);return Math.sqrt(n**2+r**2)}const lD=new Set(["auto","scroll"]);class W1{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=lp(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Wg(this.lastMoveEventInfo,this.history),R=this.startEvent!==null,m=w4(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!R&&!m)return;const{point:g}=S,{timestamp:I}=Lr;this.history.push({...g,timestamp:I});const{onStart:C,onMove:L}=this.handlers;R||(C&&C(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,S)},this.handlePointerMove=(S,R)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=R,this.lastMoveEventInfo=lp(R,this.transformPagePoint),mn.update(this.updatePoint,!0)},this.handlePointerUp=(S,R)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:I}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&I&&I(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Wg(S.type==="pointercancel"?this.lastMoveEventInfo:lp(R,this.transformPagePoint),this.history);this.startEvent&&m&&m(S,C),g&&g(S,C)},!WC(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const E=oT(t),f=lp(E,this.transformPagePoint),{point:h}=f,{timestamp:d}=Lr;this.history=[{...h,timestamp:d}];const{onSessionStart:p}=n;p&&p(t,Wg(f,this.history)),this.removeListeners=rT(fd(this.contextWindow,"pointermove",this.handlePointerMove),fd(this.contextWindow,"pointerup",this.handlePointerUp),fd(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(lD.has(r.overflowX)||lD.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),mn.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ll(this.updatePoint)}}function lp(e,t){return t?{point:t(e.point)}:e}function cD(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wg({point:e},t){return{point:e,delta:cD(e,j1(t)),offset:cD(e,G4(t)),velocity:B4(t,.1)}}function G4(e){return e[0]}function j1(e){return e[e.length-1]}function B4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=j1(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>vs(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>vs(t)*2&&(r=e[1]);const o=ri(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function F4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ln(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ln(n,e,r.max):Math.min(e,n)),e}function uD(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 H4(e,{top:t,left:n,bottom:r,right:s}){return{x:uD(e.x,n,s),y:uD(e.y,t,r)}}function ED(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 V4(e,t){return{x:ED(e.x,t.x),y:ED(e.y,t.y)}}function k4(e,t){let n=.5;const r=es(e),s=es(t);return s>r?n=Pd(t.min,t.max-r,e.min):r>s&&(n=Pd(e.min,e.max-s,t.min)),$i(0,1,n)}function Y4(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 ZI=.35;function W4(e=ZI){return e===!1?e=0:e===!0&&(e=ZI),{x:fD(e,"left","right"),y:fD(e,"top","bottom")}}function fD(e,t,n){return{min:dD(e,t),max:dD(e,n)}}function dD(e,t){return typeof e=="number"?e:e[t]||0}const j4=new WeakMap;class X4{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=ir(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{n&&this.snapToCursor(oT(d).point),this.stopAnimation()},l=(d,p)=>{const{drag:S,dragPropagation:R,onDragStart:m}=this.getProps();if(S&&!R&&(this.openDragLock&&this.openDragLock(),this.openDragLock=NW(S),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gi(I=>{let C=this.getAxisMotionValue(I).get()||0;if(ji.test(C)){const{projection:L}=this.visualElement;if(L&&L.layout){const N=L.layout.layoutBox[I];N&&(C=es(N)*(parseFloat(C)/100))}}this.originPoint[I]=C}),m&&mn.update(()=>m(d,p),!1,!0),WI(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},c=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:S,dragDirectionLock:R,onDirectionLock:m,onDrag:g}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:I}=p;if(R&&this.currentDirection===null){this.currentDirection=K4(I),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,I),this.updateAxis("y",p.point,I),this.visualElement.render(),g&&mn.update(()=>g(d,p),!1,!0)},E=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new W1(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:E,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:Y1(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&mn.postRender(()=>c(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!cp(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=F4(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Bu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=H4(r.layoutBox,t):this.constraints=!1,this.elastic=W4(n),s!==this.constraints&&!Bu(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Gi(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=Y4(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bu(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=ZW(r,s.root,this.visualElement.getTransformPagePoint());let l=V4(s.layout.layoutBox,o);if(n){const c=n(qW(l));this.hasMutatedConstraints=!!c,c&&(l=f1(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),E=this.constraints||{},f=Gi(h=>{if(!cp(h,n,this.currentDirection))return;let d=E&&E[h]||{};(l===!0||l===h)&&(d={min:0,max:0});const p=s?200:1e6,S=s?40:1e7,R={type:"inertia",velocity:r?t[h]:0,bounceStiffness:p,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(h,R)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return WI(this.visualElement,t),r.start(FC(t,r,0,n,this.visualElement,!1))}stopAnimation(){Gi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Gi(n=>{const{drag:r}=this.getProps();if(!cp(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:c}=s.layout.layoutBox[n],E=o.get()||0;o.set(t[n]-Ln(l,c,.5)+E)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bu(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Gi(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const E=c.get();s[l]=k4({min:E,max:E},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.constraints=!1,this.resolveConstraints(),Gi(l=>{if(!cp(l,t,null))return;const c=this.getAxisMotionValue(l),{min:E,max:f}=this.constraints[l];c.set(Ln(E,f,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;j4.set(this.visualElement,this);const t=this.visualElement.current,n=fd(t,"pointerdown",f=>{const{drag:h,dragListener:d=!0}=this.getProps(),p=f.target,S=p!==t&&PW(p);h&&d&&!S&&this.start(f)});let r;const s=()=>{const{dragConstraints:f}=this.getProps();Bu(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=$4(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),mn.read(s);const c=Md(window,"resize",()=>this.scalePositionWithinConstraints()),E=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(Gi(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=f[d].translate,p.set(p.get()+f[d].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),E&&E(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=ZI,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:c}}}function TD(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function $4(e,t,n){const r=IP(e,TD(n)),s=IP(t,TD(n));return()=>{r(),s()}}function cp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function K4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class z4 extends hl{constructor(t){super(t),this.removeGroupControls=oi,this.removeListeners=oi,this.controls=new X4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oi}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const jg=e=>(t,n)=>{e&&mn.update(()=>e(t,n),!1,!0)};class q4 extends hl{constructor(){super(...arguments),this.removePointerDownListener=oi}onPointerDown(t){this.session=new W1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Y1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:jg(t),onStart:jg(n),onMove:jg(r),onEnd:(o,l)=>{delete this.session,s&&mn.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=fd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Xg=!1;class J4 extends D.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),Xg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Jp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Xg=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||mn.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),YC.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Xg=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function X1(e){const[t,n]=s4(),r=D.useContext(aU);return v.jsx(J4,{...e,layoutGroup:r,switchLayoutGroup:D.useContext(V1),isPresent:t,safeToRemove:n})}const Q4={pan:{Feature:q4},drag:{Feature:z4,ProjectionNode:M1,MeasureLayout:X1}};function hD(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&mn.postRender(()=>o(t,oT(t)))}class Z4 extends hl{mount(){const{current:t}=this.node;t&&(this.unmount=_W(t,(n,r)=>(hD(this.node,r,"Start"),s=>hD(this.node,s,"End"))))}unmount(){}}class e6 extends hl{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=rT(Md(this.node.current,"focus",()=>this.onFocus()),Md(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function pD(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 s="onTap"+(n==="End"?"":n),o=r[s];o&&mn.postRender(()=>o(t,oT(t)))}class t6 extends hl{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=vW(t,(s,o)=>(pD(this.node,o,"Start"),(l,{success:c})=>pD(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const eN=new WeakMap,$g=new WeakMap,n6=e=>{const t=eN.get(e.target);t&&t(e)},r6=e=>{e.forEach(n6)};function s6({root:e,...t}){const n=e||document;$g.has(n)||$g.set(n,{});const r=$g.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(r6,{root:e,...t})),r[s]}function i6(e,t,n){const r=s6(t);return eN.set(e,n),r.observe(e),()=>{eN.delete(e),r.unobserve(e)}}const o6={some:0,all:1};class a6 extends hl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var E;(E=this.stopObserver)==null||E.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:o6[s]},c=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),S=h?d:p;S&&S(f)};this.stopObserver=i6(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(l6(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function l6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c6={inView:{Feature:a6},tap:{Feature:t6},focus:{Feature:e6},hover:{Feature:Z4}},u6={layout:{ProjectionNode:M1,MeasureLayout:X1}},E6={...x4,...c6,...Q4,...u6},vo=b4(E6,P4),f6=[["path",{d:"M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 9V13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 16.9922V17.0022",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",key:"2"}]],d6=[["path",{d:"M19 9H6.65856C5.65277 9 5.14987 9 5.02472 8.69134C4.89957 8.38268 5.25517 8.01942 5.96637 7.29289L8.21091 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 15H17.3414C18.3472 15 18.8501 15 18.9753 15.3087C19.1004 15.6173 18.7448 15.9806 18.0336 16.7071L15.7891 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],QC=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],T6=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],$1=[["path",{d:"M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],K1=[["path",{d:"M9 6.65032C9 6.65032 15.9383 6.10759 16.9154 7.08463C17.8924 8.06167 17.3496 15 17.3496 15M16.5 7.5L6.5 17.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],h6=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],p6=[["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 9H21.5",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M6.99981 6H7.00879",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}],["path",{d:"M10.9998 6H11.0088",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"3"}],["path",{d:"M16 13L17.2265 14.0572C17.7422 14.5016 18 14.7239 18 15C18 15.2761 17.7422 15.4984 17.2265 15.9428L16 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M8 13L6.77346 14.0572C6.25782 14.5016 6 14.7239 6 15C6 15.2761 6.25782 15.4984 6.77346 15.9428L8 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M13 12L11 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}]],CS=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],R6=[["ellipse",{cx:"12",cy:"5",rx:"8",ry:"3",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 10.842C7.60158 11.0229 8.27434 11.1718 9 11.282",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M20 12C20 13.6569 16.4183 15 12 15C7.58172 15 4 13.6569 4 12",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M7 17.842C7.60158 18.0229 8.27434 18.1718 9 18.282",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M20 5V19C20 20.6569 16.4183 22 12 22C7.58172 22 4 20.6569 4 19V5",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],S6=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],m6=[["path",{d:"M8 7L16 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 11L12 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],A6=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12C8 18 12 22 12 22C12 22 16 18 16 12C16 6 12 2 12 2C12 2 8 6 8 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 15H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],g6=[["path",{d:"M4 5L20 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M4 12L20 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M4 19L20 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],O6=[["path",{d:"M20.4879 15C19.2524 18.4956 15.9187 21 12 21C7.02943 21 3 16.9706 3 12C3 7.02943 7.02943 3 12 3C15.7292 3 18.9286 5.26806 20.2941 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 9H18C19.4142 9 20.1213 9 20.5607 8.56066C21 8.12132 21 7.41421 21 6V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],I6=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],_S=[["path",{d:"M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.0588 8.83333 19 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],N6=[["path",{d:"M8.62814 12.6736H8.16918C6.68545 12.6736 5.94358 12.6736 5.62736 12.1844C5.31114 11.6953 5.61244 11.0138 6.21504 9.65083L8.02668 5.55323C8.57457 4.314 8.84852 3.69438 9.37997 3.34719C9.91142 3 10.5859 3 11.935 3H14.0244C15.6632 3 16.4826 3 16.7916 3.53535C17.1007 4.0707 16.6942 4.78588 15.8811 6.21623L14.8092 8.10188C14.405 8.81295 14.2029 9.16849 14.2057 9.45952C14.2094 9.83775 14.4105 10.1862 14.7354 10.377C14.9854 10.5239 15.3927 10.5239 16.2074 10.5239C17.2373 10.5239 17.7523 10.5239 18.0205 10.7022C18.3689 10.9338 18.5513 11.3482 18.4874 11.7632C18.4382 12.0826 18.0918 12.4656 17.399 13.2317L11.8639 19.3523C10.7767 20.5545 10.2331 21.1556 9.86807 20.9654C9.50303 20.7751 9.67833 19.9822 10.0289 18.3962L10.7157 15.2896C10.9826 14.082 11.1161 13.4782 10.7951 13.0759C10.4741 12.6736 9.85877 12.6736 8.62814 12.6736Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]];function ZC(e){return v.jsxs("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[v.jsx("path",{d:"M46 56.5H15V72H58L71.5 56.5V16H55.5V47.3397L46 56.5Z",fill:"currentColor"}),v.jsx("path",{d:"M0 16V56.5H15V20.5L19.5 16H55.5V1H15L0 16Z",fill:"currentColor"})]})}var C6=/\s+/g,_6=e=>typeof e!="string"||!e?e:e.replace(C6," ").trim(),UR=(...e)=>{const t=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let o=0,l=r.length;o<l;o++)n(r[o]);return}const s=typeof r;if(s==="string"||s==="number"||s==="bigint"){if(s==="number"&&r!==r)return;t.push(String(r))}else if(s==="object"){const o=Object.keys(r);for(let l=0,c=o.length;l<c;l++){const E=o[l];r[E]&&t.push(E)}}};for(let r=0,s=e.length;r<s;r++){const o=e[r];o!=null&&n(o)}return t.length>0?_6(t.join(" ")):void 0},RD=e=>e===!1?"false":e===!0?"true":e===0?"0":e,ds=e=>{if(!e||typeof e!="object")return!0;for(const t in e)return!1;return!0},L6=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){const o=n[s];if(!r.includes(o)||e[o]!==t[o])return!1}return!0},y6=(e,t)=>{for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n in e?e[n]=UR(e[n],r):e[n]=r}return e},z1=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];Array.isArray(r)?z1(r,t):r&&t.push(r)}},q1=(...e)=>{const t=[];z1(e,t);const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},tN=(e,t)=>{const n={};for(const r in e){const s=e[r];if(r in t){const o=t[r];Array.isArray(s)||Array.isArray(o)?n[r]=q1(o,s):typeof s=="object"&&typeof o=="object"&&s&&o?n[r]=tN(s,o):n[r]=o+" "+s}else n[r]=s}for(const r in t)r in e||(n[r]=t[r]);return n},b6={twMerge:!0,twMergeConfig:{}};function P6(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(r){e=r},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(r){t=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){e=null,t={},n=!1}}}var Co=P6(),D6=e=>{const t=(r,s)=>{const{extend:o=null,slots:l={},variants:c={},compoundVariants:E=[],compoundSlots:f=[],defaultVariants:h={}}=r,d={...b6,...s},p=o!=null&&o.base?UR(o.base,r==null?void 0:r.base):r==null?void 0:r.base,S=o!=null&&o.variants&&!ds(o.variants)?tN(c,o.variants):c,R=o!=null&&o.defaultVariants&&!ds(o.defaultVariants)?{...o.defaultVariants,...h}:h;!ds(d.twMergeConfig)&&!L6(d.twMergeConfig,Co.cachedTwMergeConfig)&&(Co.didTwMergeConfigChange=!0,Co.cachedTwMergeConfig=d.twMergeConfig);const m=ds(o==null?void 0:o.slots),g=ds(l)?{}:{base:UR(r==null?void 0:r.base,m&&(o==null?void 0:o.base)),...l},I=m?g:y6({...o==null?void 0:o.slots},ds(g)?{base:r==null?void 0:r.base}:g),C=ds(o==null?void 0:o.compoundVariants)?E:q1(o==null?void 0:o.compoundVariants,E),L=y=>{if(ds(S)&&ds(l)&&m)return e(p,y==null?void 0:y.class,y==null?void 0:y.className)(d);if(C&&!Array.isArray(C))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof C}`);if(f&&!Array.isArray(f))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof f}`);const _=(q,j=S,k=null,z=null)=>{const Z=j[q];if(!Z||ds(Z))return null;const ie=(z==null?void 0:z[q])??(y==null?void 0:y[q]);if(ie===null)return null;const ne=RD(ie);if(typeof ne=="object")return null;const B=R==null?void 0:R[q],Q=ne??RD(B);return Z[Q||"false"]},M=()=>{if(!S)return null;const q=Object.keys(S),j=[];for(let k=0;k<q.length;k++){const z=_(q[k],S);z&&j.push(z)}return j},w=(q,j)=>{if(!S||typeof S!="object")return null;const k=[];for(const z in S){const Z=_(z,S,q,j),ie=q==="base"&&typeof Z=="string"?Z:Z&&Z[q];ie&&k.push(ie)}return k},F={};for(const q in y){const j=y[q];j!==void 0&&(F[q]=j)}const Y=(q,j)=>{var z;const k=typeof(y==null?void 0:y[q])=="object"?{[q]:(z=y[q])==null?void 0:z.initial}:{};return{...R,...F,...k,...j}},$=(q=[],j)=>{const k=[],z=q.length;for(let Z=0;Z<z;Z++){const{class:ie,className:ne,...B}=q[Z];let Q=!0;const ue=Y(null,j);for(const le in B){const he=B[le],se=ue[le];if(Array.isArray(he)){if(!he.includes(se)){Q=!1;break}}else{if((he==null||he===!1)&&(se==null||se===!1))continue;if(se!==he){Q=!1;break}}}Q&&(ie&&k.push(ie),ne&&k.push(ne))}return k},W=q=>{const j=$(C,q);if(!Array.isArray(j))return j;const k={},z=e;for(let Z=0;Z<j.length;Z++){const ie=j[Z];if(typeof ie=="string")k.base=z(k.base,ie)(d);else if(typeof ie=="object")for(const ne in ie)k[ne]=z(k[ne],ie[ne])(d)}return k},K=q=>{if(f.length<1)return null;const j={},k=Y(null,q);for(let z=0;z<f.length;z++){const{slots:Z=[],class:ie,className:ne,...B}=f[z];if(!ds(B)){let Q=!0;for(const ue in B){const le=k[ue],he=B[ue];if(le===void 0||(Array.isArray(he)?!he.includes(le):he!==le)){Q=!1;break}}if(!Q)continue}for(let Q=0;Q<Z.length;Q++){const ue=Z[Q];j[ue]||(j[ue]=[]),j[ue].push([ie,ne])}}return j};if(!ds(l)||!m){const q={};if(typeof I=="object"&&!ds(I)){const j=e;for(const k in I)q[k]=z=>{const Z=W(z),ie=K(z);return j(I[k],w(k,z),Z?Z[k]:void 0,ie?ie[k]:void 0,z==null?void 0:z.class,z==null?void 0:z.className)(d)}}return q}return e(p,M(),$(C),y==null?void 0:y.class,y==null?void 0:y.className)(d)},N=()=>{if(!(!S||typeof S!="object"))return Object.keys(S)};return L.variantKeys=N(),L.extend=o,L.base=p,L.slots=I,L.variants=S,L.defaultVariants=R,L.compoundSlots=f,L.compoundVariants=C,L};return{tv:t,createTV:r=>(s,o)=>t(s,o?tN(r,o):r)}};const v6=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},M6=(e,t)=>({classGroupId:e,validator:t}),J1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wR="-",SD=[],x6="arbitrary..",U6=e=>{const t=G6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return w6(l);const c=l.split(wR),E=c[0]===""&&c.length>1?1:0;return Q1(c,E,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const E=r[l],f=n[l];return E?f?v6(f,E):E:f||SD}return n[l]||SD}}},Q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=Q1(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(wR):e.slice(t).join(wR),E=l.length;for(let f=0;f<E;f++){const h=l[f];if(h.validator(c))return h.classGroupId}},w6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?x6+r:void 0})(),G6=e=>{const{theme:t,classGroups:n}=e;return B6(n,t)},B6=(e,t)=>{const n=J1();for(const r in e){const s=e[r];e_(s,n,r,t)}return n},e_=(e,t,n,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o];F6(l,t,n,r)}},F6=(e,t,n,r)=>{if(typeof e=="string"){H6(e,t,n);return}if(typeof e=="function"){V6(e,t,n,r);return}k6(e,t,n,r)},H6=(e,t,n)=>{const r=e===""?t:Z1(t,e);r.classGroupId=n},V6=(e,t,n,r)=>{if(Y6(e)){e_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(M6(n,e))},k6=(e,t,n,r)=>{const s=Object.entries(e),o=s.length;for(let l=0;l<o;l++){const[c,E]=s[l];e_(E,Z1(t,c),n,r)}},Z1=(e,t)=>{let n=e;const r=t.split(wR),s=r.length;for(let o=0;o<s;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=J1(),n.nextPart.set(l,c)),n=c}return n},Y6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,W6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return s(o,l),l},set(o,l){o in n?n[o]=l:s(o,l)}}},nN="!",mD=":",j6=[],AD=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),X6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,c=0,E=0,f;const h=s.length;for(let m=0;m<h;m++){const g=s[m];if(l===0&&c===0){if(g===mD){o.push(s.slice(E,m)),E=m+1;continue}if(g==="/"){f=m;continue}}g==="["?l++:g==="]"?l--:g==="("?c++:g===")"&&c--}const d=o.length===0?s:s.slice(E);let p=d,S=!1;d.endsWith(nN)?(p=d.slice(0,-1),S=!0):d.startsWith(nN)&&(p=d.slice(1),S=!0);const R=f&&f>E?f-E:void 0;return AD(o,S,p,R)};if(t){const s=t+mD,o=r;r=l=>l.startsWith(s)?o(l.slice(s.length)):AD(j6,!1,l,void 0,!0)}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},$6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",E=t.has(l);c||E?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(l)):s.push(l)}return s.length>0&&(s.sort(),r.push(...s)),r}},K6=e=>({cache:W6(e.cacheSize),parseClassName:X6(e),sortModifiers:$6(e),...U6(e)}),z6=/\s+/,q6=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],c=e.trim().split(z6);let E="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:d,modifiers:p,hasImportantModifier:S,baseClassName:R,maybePostfixModifierPosition:m}=n(h);if(d){E=h+(E.length>0?" "+E:E);continue}let g=!!m,I=r(g?R.substring(0,m):R);if(!I){if(!g){E=h+(E.length>0?" "+E:E);continue}if(I=r(R),!I){E=h+(E.length>0?" "+E:E);continue}g=!1}const C=p.length===0?"":p.length===1?p[0]:o(p).join(":"),L=S?C+nN:C,N=L+I;if(l.indexOf(N)>-1)continue;l.push(N);const y=s(I,g);for(let _=0;_<y.length;++_){const M=y[_];l.push(L+M)}E=h+(E.length>0?" "+E:E)}return E},J6=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=ew(n))&&(s&&(s+=" "),s+=r);return s},ew=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ew(e[r]))&&(n&&(n+=" "),n+=t);return n},rN=(e,...t)=>{let n,r,s,o;const l=E=>{const f=t.reduce((h,d)=>d(h),e());return n=K6(f),r=n.cache.get,s=n.cache.set,o=c,c(E)},c=E=>{const f=r(E);if(f)return f;const h=q6(E,n);return s(E,h),h};return o=l,(...E)=>o(J6(...E))},Q6=[],rr=e=>{const t=n=>n[e]||Q6;return t.isThemeGetter=!0,t},tw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Z6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tX=/\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$/,nX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ia=e=>Z6.test(e),wt=e=>!!e&&!Number.isNaN(Number(e)),Na=e=>!!e&&Number.isInteger(Number(e)),Kg=e=>e.endsWith("%")&&wt(e.slice(0,-1)),Ro=e=>eX.test(e),rw=()=>!0,iX=e=>tX.test(e)&&!nX.test(e),t_=()=>!1,oX=e=>rX.test(e),aX=e=>sX.test(e),lX=e=>!tt(e)&&!rt(e),cX=e=>pl(e,ow,t_),tt=e=>tw.test(e),Xl=e=>pl(e,aw,iX),gD=e=>pl(e,RX,wt),uX=e=>pl(e,cw,rw),EX=e=>pl(e,lw,t_),OD=e=>pl(e,sw,t_),fX=e=>pl(e,iw,aX),up=e=>pl(e,uw,oX),rt=e=>nw.test(e),$f=e=>Uc(e,aw),dX=e=>Uc(e,lw),ID=e=>Uc(e,sw),TX=e=>Uc(e,ow),hX=e=>Uc(e,iw),Ep=e=>Uc(e,uw,!0),pX=e=>Uc(e,cw,!0),pl=(e,t,n)=>{const r=tw.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Uc=(e,t,n=!1)=>{const r=nw.exec(e);return r?r[1]?t(r[1]):n:!1},sw=e=>e==="position"||e==="percentage",iw=e=>e==="image"||e==="url",ow=e=>e==="length"||e==="size"||e==="bg-size",aw=e=>e==="length",RX=e=>e==="number",lw=e=>e==="family-name",cw=e=>e==="number"||e==="weight",uw=e=>e==="shadow",sN=()=>{const e=rr("color"),t=rr("font"),n=rr("text"),r=rr("font-weight"),s=rr("tracking"),o=rr("leading"),l=rr("breakpoint"),c=rr("container"),E=rr("spacing"),f=rr("radius"),h=rr("shadow"),d=rr("inset-shadow"),p=rr("text-shadow"),S=rr("drop-shadow"),R=rr("blur"),m=rr("perspective"),g=rr("aspect"),I=rr("ease"),C=rr("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...N(),rt,tt],_=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],w=()=>[rt,tt,E],F=()=>[Ia,"full","auto",...w()],Y=()=>[Na,"none","subgrid",rt,tt],$=()=>["auto",{span:["full",Na,rt,tt]},Na,rt,tt],W=()=>[Na,"auto",rt,tt],K=()=>["auto","min","max","fr",rt,tt],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...w()],z=()=>[Ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],Z=()=>[Ia,"screen","full","dvw","lvw","svw","min","max","fit",...w()],ie=()=>[Ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],ne=()=>[e,rt,tt],B=()=>[...N(),ID,OD,{position:[rt,tt]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",TX,cX,{size:[rt,tt]}],le=()=>[Kg,$f,Xl],he=()=>["","none","full",f,rt,tt],se=()=>["",wt,$f,Xl],fe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[wt,Kg,ID,OD],We=()=>["","none",R,rt,tt],He=()=>["none",wt,rt,tt],ot=()=>["none",wt,rt,tt],Me=()=>[wt,rt,tt],Ue=()=>[Ia,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ro],breakpoint:[Ro],color:[rw],container:[Ro],"drop-shadow":[Ro],ease:["in","out","in-out"],font:[lX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ro],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ro],shadow:[Ro],spacing:["px",wt],text:[Ro],"text-shadow":[Ro],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ia,tt,rt,g]}],container:["container"],columns:[{columns:[wt,tt,rt,c]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:y()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Na,"auto",rt,tt]}],basis:[{basis:[Ia,"full","auto",c,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wt,Ia,"auto","initial","none",tt]}],grow:[{grow:["",wt,rt,tt]}],shrink:[{shrink:["",wt,rt,tt]}],order:[{order:[Na,"first","last","none",rt,tt]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[c,"screen",...z()]}],"min-w":[{"min-w":[c,"screen","none",...z()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",n,$f,Xl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pX,uX]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kg,tt]}],"font-family":[{font:[dX,EX,t]}],"font-features":[{"font-features":[tt]}],"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:[s,rt,tt]}],"line-clamp":[{"line-clamp":[wt,"none",rt,gD]}],leading:[{leading:[o,...w()]}],"list-image":[{"list-image":["none",rt,tt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",rt,tt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[wt,"from-font","auto",rt,Xl]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[wt,"auto",rt,tt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rt,tt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",rt,tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Na,rt,tt],radial:["",rt,tt],conic:[Na,rt,tt]},hX,fX]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wt,rt,tt]}],"outline-w":[{outline:["",wt,$f,Xl]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",h,Ep,up]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",d,Ep,up]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[wt,Xl]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",p,Ep,up]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[wt,rt,tt]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[wt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[rt,tt]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[wt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",rt,tt]}],filter:[{filter:["","none",rt,tt]}],blur:[{blur:We()}],brightness:[{brightness:[wt,rt,tt]}],contrast:[{contrast:[wt,rt,tt]}],"drop-shadow":[{"drop-shadow":["","none",S,Ep,up]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",wt,rt,tt]}],"hue-rotate":[{"hue-rotate":[wt,rt,tt]}],invert:[{invert:["",wt,rt,tt]}],saturate:[{saturate:[wt,rt,tt]}],sepia:[{sepia:["",wt,rt,tt]}],"backdrop-filter":[{"backdrop-filter":["","none",rt,tt]}],"backdrop-blur":[{"backdrop-blur":We()}],"backdrop-brightness":[{"backdrop-brightness":[wt,rt,tt]}],"backdrop-contrast":[{"backdrop-contrast":[wt,rt,tt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wt,rt,tt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wt,rt,tt]}],"backdrop-invert":[{"backdrop-invert":["",wt,rt,tt]}],"backdrop-opacity":[{"backdrop-opacity":[wt,rt,tt]}],"backdrop-saturate":[{"backdrop-saturate":[wt,rt,tt]}],"backdrop-sepia":[{"backdrop-sepia":["",wt,rt,tt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",rt,tt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wt,"initial",rt,tt]}],ease:[{ease:["linear","initial",I,rt,tt]}],delay:[{delay:[wt,rt,tt]}],animate:[{animate:["none",C,rt,tt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,rt,tt]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[rt,tt,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ue()}],"translate-x":[{"translate-x":Ue()}],"translate-y":[{"translate-y":Ue()}],"translate-z":[{"translate-z":Ue()}],"translate-none":["translate-none"],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"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",rt,tt]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",rt,tt]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[wt,$f,Xl,gD]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},SX=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:s={},override:o={}})=>(td(e,"cacheSize",t),td(e,"prefix",n),td(e,"experimentalParseClassName",r),fp(e.theme,o.theme),fp(e.classGroups,o.classGroups),fp(e.conflictingClassGroups,o.conflictingClassGroups),fp(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),td(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),dp(e.theme,s.theme),dp(e.classGroups,s.classGroups),dp(e.conflictingClassGroups,s.conflictingClassGroups),dp(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Ew(e,s,"orderSensitiveModifiers"),e),td=(e,t,n)=>{n!==void 0&&(e[t]=n)},fp=(e,t)=>{if(t)for(const n in t)td(e,n,t[n])},dp=(e,t)=>{if(t)for(const n in t)Ew(e,t,n)},Ew=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},mX=(e,...t)=>typeof e=="function"?rN(sN,e,...t):rN(()=>SX(sN(),e),...t),AX=rN(sN);var gX=e=>ds(e)?AX:mX({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),OX=(e,t)=>{const n=UR(e);return!n||!((t==null?void 0:t.twMerge)??!0)?n:((!Co.cachedTwMerge||Co.didTwMergeConfigChange)&&(Co.didTwMergeConfigChange=!1,Co.cachedTwMerge=gX(Co.cachedTwMergeConfig)),Co.cachedTwMerge(n)||void 0)},IX=(...e)=>t=>OX(e,t),{tv:fw}=D6(IX);const NX=fw({base:"inline-flex items-center truncate rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium",variants:{color:{primary:"bg-primary/10 text-primary",success:"bg-emerald-500/10 text-emerald-400",warning:"bg-yellow-500/10 text-yellow-600",danger:"bg-red-500/10 text-red-500",fatal:"bg-red-600/10 text-red-600",info:"bg-blue-500/10 text-blue-500",purple:"bg-violet-500/15 text-violet-400",debug:"bg-purple-500/10 text-purple-500",muted:"bg-muted text-muted-foreground",trace:"bg-gray-500/10 text-gray-400"},bordered:{true:"border"}},compoundVariants:[{color:"danger",bordered:!0,className:"border-red-500/20"},{color:"fatal",bordered:!0,className:"border-red-600/20"},{color:"warning",bordered:!0,className:"border-yellow-500/20"},{color:"info",bordered:!0,className:"border-blue-500/20"},{color:"debug",bordered:!0,className:"border-purple-500/20"},{color:"trace",bordered:!0,className:"border-gray-500/20"},{color:"primary",bordered:!0,className:"border-primary/20"},{color:"success",bordered:!0,className:"border-emerald-500/20"},{color:"purple",bordered:!0,className:"border-violet-500/20"},{color:"muted",bordered:!0,className:"border-border"}],defaultVariants:{color:"muted",bordered:!1}});function ts({children:e,color:t,bordered:n,className:r}){return v.jsx("span",{className:NX({color:t,bordered:n,className:r}),children:e})}function aT({statusCode:e,httpStatus:t}){if(t){const n=t>=500?"danger":t>=400?"warning":"success";return v.jsx(ts,{color:n,children:t})}return e==="ERROR"?v.jsx(ts,{color:"danger",children:"ERROR"}):e==="OK"?v.jsx(ts,{color:"success",children:"OK"}):v.jsx(ts,{color:"muted",children:"UNSET"})}function wc({ms:e}){const t=e>1e3?"text-yellow-600":e>500?"text-yellow-600/70":"text-muted-foreground",n=e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(0)}ms`;return v.jsx("span",{className:`font-mono text-xs ${t}`,children:n})}const ND={error:{label:"ERROR",color:"danger"},fatal:{label:"FATAL",color:"fatal"},warn:{label:"WARN",color:"warning"},warning:{label:"WARN",color:"warning"},info:{label:"INFO",color:"info"},debug:{label:"DEBUG",color:"debug"},trace:{label:"TRACE",color:"trace"}};function CX({severity:e}){const t=(e||"info").toLowerCase(),n=ND[t]||ND.info;return v.jsx(ts,{color:n.color,bordered:!0,children:n.label})}const _X=fw({base:"inline-flex items-center justify-center gap-1.5 rounded-md text-xs font-medium transition-colors disabled:pointer-events-none disabled:opacity-50",variants:{variant:{ghost:"text-muted-foreground hover:bg-accent hover:text-foreground",outline:"border border-border/50 bg-muted/30 text-foreground hover:bg-muted/50",primary:"bg-primary text-primary-foreground hover:bg-primary/90",danger:"text-destructive hover:bg-destructive/10"},size:{sm:"h-7 px-2",md:"h-8 px-3",icon:"size-7 p-0"}},defaultVariants:{variant:"ghost",size:"sm"}}),cl=D.forwardRef(({className:e,variant:t,size:n,...r},s)=>v.jsx("button",{ref:s,className:_X({variant:t,size:n,className:e}),...r}));function Fu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function dw(e){return e==null?void 0:e()}function Ca(e){const{segments:t,request:n,type:r}=e,s=t.flatMap(o=>o.split("."));if(!n&&r==="any")return s.length?[s]:[];if(r==="infinite"&&Fu(n)){const o=n.query,l=n.body,c=Fu(o)&&("direction"in o||"cursor"in o),E=Fu(l)&&("direction"in l||"cursor"in l);if(c||E){const f={...n};if(c&&Fu(o)){const{cursor:h,direction:d,...p}=o;f.query=p}if(E&&Fu(l)){const{cursor:h,direction:d,...p}=l;f.body=p}return[s,{request:f,type:"infinite"}]}}return[s,{...typeof n<"u"&&n!==ol&&{request:n},...r&&r!=="any"&&{type:r}}]}function n_(e){if(!e)return{};const{abortOnUnmount:t,...n}=e;return n}function LX(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function yX(e){return e.map(LX).join(".")}function bX(e){const{request:t,routeName:n,opts:r,client:s,globalOptions:o}=e;return dw(()=>t===ol?ol:async l=>{var f;const c=((f=r==null?void 0:r.tuyau)==null?void 0:f.abortOnUnmount)??(o==null?void 0:o.abortOnUnmount)??!1,E=n_(r==null?void 0:r.tuyau);return await s.request(n,{...t,...E,retry:0,...c?{signal:l.signal}:{}})})}function PX(e){const{request:t,routeName:n,opts:r,client:s,globalOptions:o}=e;return dw(()=>t===ol?ol:async l=>{var p;const{pageParam:c}=l,E=((p=r==null?void 0:r.tuyau)==null?void 0:p.abortOnUnmount)??(o==null?void 0:o.abortOnUnmount)??!1,f=n_(r==null?void 0:r.tuyau),h=(r==null?void 0:r.pageParamKey)||"page";let d;return Fu(t)?c!==void 0?d={...t,query:{...t.query,[h]:c}}:d=t:d={query:c!==void 0?{[h]:c}:{}},await s.request(n,{...d,...f,retry:0,...E?{signal:l.signal}:{}})})}function Tw(e){return[e.segments.flatMap(n=>n.split("."))]}function DX(e){return async t=>{var s;const n=n_((s=e.opts)==null?void 0:s.tuyau),r=t||{};return await e.client.request(e.routeName,{...r,...n,retry:0})}}function vX(e){const{queryKey:t,...n}=e,r=bX(n);return{...e.opts,queryKey:t,queryFn:r}}function MX(e){const{request:t,routeName:n,opts:r,queryKey:s,client:o,globalOptions:l}=e,c=PX({request:t,routeName:n,opts:r,client:o,globalOptions:l});return{...r,queryKey:s,queryFn:c,initialPageParam:(r==null?void 0:r.initialPageParam)??1,getNextPageParam:(r==null?void 0:r.getNextPageParam)??(()=>null),getPreviousPageParam:r==null?void 0:r.getPreviousPageParam}}function xX(e){const{opts:t,routeName:n,client:r}=e,s=Tw({segments:n.split(".")}),o=DX({opts:t,routeName:n,client:r});return{...t,mutationKey:s,mutationFn:o}}function UX(e){const{client:t,globalOptions:n}=e;function r(s){const o=yX(s),l={queryOptions:(c,E)=>vX({opts:E,client:t,request:c,routeName:o,globalOptions:n,queryKey:Ca({segments:s,request:c,type:"query"})}),queryKey:c=>Ca({segments:s,request:c,type:"query"}),queryFilter:(c,E)=>({queryKey:Ca({segments:s,request:c,type:"query"}),...E}),infiniteQueryOptions:(c,E)=>MX({opts:E,client:t,request:c,routeName:o,globalOptions:n,queryKey:Ca({segments:s,request:c,type:"infinite"})}),infiniteQueryKey:c=>Ca({segments:s,request:c,type:"infinite"}),infiniteQueryFilter:(c,E)=>({queryKey:Ca({segments:s,request:c,type:"infinite"}),...E}),mutationOptions:c=>xX({opts:c,client:t,routeName:o}),mutationKey:()=>Tw({segments:s}),pathKey:()=>Ca({segments:s,type:"any"}),pathFilter:c=>({queryKey:Ca({segments:s,type:"any"}),...c})};return new Proxy(l,{get:(c,E)=>{if(typeof E!="symbol")return E in c?c[E]:r([...s,String(E)])}})}return r([])}var zg,CD;function wX(){if(CD)return zg;CD=1;function e(h){return h===void 0}function t(h){return h===null}function n(h){return typeof h=="boolean"}function r(h){return h===Object(h)}function s(h){return Array.isArray(h)}function o(h){return h instanceof Date}function l(h,d){return d?r(h)&&!e(h.uri):r(h)&&typeof h.size=="number"&&typeof h.type=="string"&&typeof h.slice=="function"}function c(h,d){return l(h,d)&&typeof h.name=="string"&&(r(h.lastModifiedDate)||typeof h.lastModified=="number")}function E(h){return e(h)?!1:h}function f(h,d,p,S){d=d||{},p=p||new FormData,d.indices=E(d.indices),d.nullsAsUndefineds=E(d.nullsAsUndefineds),d.booleansAsIntegers=E(d.booleansAsIntegers),d.allowEmptyArrays=E(d.allowEmptyArrays),d.noAttributesWithArrayNotation=E(d.noAttributesWithArrayNotation),d.noFilesWithArrayNotation=E(d.noFilesWithArrayNotation),d.dotsForObjectNotation=E(d.dotsForObjectNotation);const R=typeof p.getParts=="function";return e(h)||(t(h)?d.nullsAsUndefineds||p.append(S,""):n(h)?d.booleansAsIntegers?p.append(S,h?1:0):p.append(S,h):s(h)?h.length?h.forEach((m,g)=>{let I=S+"["+(d.indices?g:"")+"]";(d.noAttributesWithArrayNotation||d.noFilesWithArrayNotation&&c(m,R))&&(I=S),f(m,d,p,I)}):d.allowEmptyArrays&&p.append(d.noAttributesWithArrayNotation?S:S+"[]",""):o(h)?p.append(S,h.toISOString()):r(h)&&!l(h,R)?Object.keys(h).forEach(m=>{const g=h[m];if(s(g))for(;m.length>2&&m.lastIndexOf("[]")===m.length-2;)m=m.substring(0,m.length-2);const I=S?d.dotsForObjectNotation?S+"."+m:S+"["+m+"]":m;f(g,d,p,I)}):p.append(S,h)),p}return zg={serialize:f},zg}var GX=wX();class GR extends Error{constructor(n,r,s){const o=n.status||n.status===0?n.status:"",l=n.statusText??"",c=`${o} ${l}`.trim(),E=c?`status code ${c}`:"an unknown error";super(`Request failed with ${E}: ${r.method} ${r.url}`);Te(this,"response");Te(this,"request");Te(this,"options");this.name="HTTPError",this.response=n,this.request=r,this.options=s}}class hw extends Error{constructor(n){let r="Non-error value was thrown";try{typeof n=="string"?r=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(r=n.message)}catch{}super(r);Te(this,"name","NonError");Te(this,"value");this.value=n}}class qg extends Error{constructor(n){const r=n!=null&&n.cause?n.cause instanceof Error?n.cause:new hw(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",r?{cause:r}:void 0);Te(this,"name","ForceRetryError");Te(this,"customDelay");Te(this,"code");Te(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const _D=(()=>{let e=!1,t=!1;const n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return e&&!t})(),BX=typeof globalThis.AbortController=="function",pw=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",FX=typeof globalThis.ReadableStream=="function",HX=typeof globalThis.FormData=="function",Rw=["get","post","put","patch","head","delete"],VX={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Jg=2147483647,kX=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,Sw=Symbol("stop");class mw{constructor(t){Te(this,"options");this.options=t}}const YX=e=>new mw(e),WX={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},jX={next:!0},XX={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},$X=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=kX,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r=="string"?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e=="string")return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if(typeof e=="object"&&e!==null)try{const t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},Aw=(e,t,n)=>{let r,s=0;return e.pipeThrough(new TransformStream({transform(o,l){if(l.enqueue(o),r){s+=r.byteLength;let c=t===0?0:s/t;c>=1&&(c=1-Number.EPSILON),n==null||n({percent:c,totalBytes:Math.max(t,s),transferredBytes:s},r)}r=o},flush(){r&&(s+=r.byteLength,n==null||n({percent:1,totalBytes:Math.max(t,s),transferredBytes:s},r))}}))},KX=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const n=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Aw(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},zX=(e,t,n)=>{if(!e.body)return e;const r=$X(n??e.body);return new Request(e,{duplex:"half",body:Aw(e.body,r,t)})},Zl=e=>e!==null&&typeof e=="object",Tp=(...e)=>{for(const t of e)if((!Zl(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return r_({},...e)},gw=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,s=new globalThis.Headers(t);for(const[o,l]of s.entries())r&&l==="undefined"||l===void 0?n.delete(o):n.set(o,l);return n};function hp(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:r_(e[n]??[],t[n]??[])}const Ow=(e={},t={})=>({beforeRequest:hp(e,t,"beforeRequest"),beforeRetry:hp(e,t,"beforeRetry"),afterResponse:hp(e,t,"afterResponse"),beforeError:hp(e,t,"beforeError")}),qX=(e,t)=>{const n=new URLSearchParams;for(const r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(const[s,o]of r.entries())n.append(s,o);else if(Array.isArray(r))for(const s of r){if(!Array.isArray(s)||s.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(s[0]),String(s[1]))}else if(Zl(r))for(const[s,o]of Object.entries(r))o!==void 0&&n.append(s,String(o));else{const s=new URLSearchParams(r);for(const[o,l]of s.entries())n.append(o,l)}return n},r_=(...e)=>{let t={},n={},r={},s;const o=[];for(const l of e)if(Array.isArray(l))Array.isArray(t)||(t=[]),t=[...t,...l];else if(Zl(l)){for(let[c,E]of Object.entries(l)){if(c==="signal"&&E instanceof globalThis.AbortSignal){o.push(E);continue}if(c==="context"){if(E!=null&&(!Zl(E)||Array.isArray(E)))throw new TypeError("The `context` option must be an object");t={...t,context:E==null?{}:{...t.context,...E}};continue}if(c==="searchParams"){E==null?s=void 0:s=s===void 0?E:qX(s,E);continue}Zl(E)&&c in t&&(E=r_(t[c],E)),t={...t,[c]:E}}Zl(l.hooks)&&(r=Ow(r,l.hooks),t.hooks=r),Zl(l.headers)&&(n=gw(n,l.headers),t.headers=n)}return s!==void 0&&(t.searchParams=s),o.length>0&&(o.length===1?t.signal=o[0]:pw?t.signal=AbortSignal.any(o):t.signal=o.at(-1)),t},JX=e=>Rw.includes(e)?e.toUpperCase():e,QX=["get","put","head","delete","options","trace"],ZX=[408,413,429,500,502,503,504],e$=[413,429,503],LD={limit:2,methods:QX,statusCodes:ZX,afterStatusCodes:e$,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},t$=(e={})=>{if(typeof e=="number")return{...LD,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&(e.methods=e.methods.map(n=>n.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0));return{...LD,...t}};class iN extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);Te(this,"request");this.name="TimeoutError",this.request=n}}async function n$(e,t,n,r){return new Promise((s,o)=>{const l=setTimeout(()=>{n&&n.abort(),o(new iN(e))},r.timeout);r.fetch(e,t).then(s).catch(o).then(()=>{clearTimeout(l)})})}async function r$(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(o),r(t.reason)}const o=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e)})}const s$=(e,t)=>{const n={};for(const r in t)Object.hasOwn(t,r)&&!(r in XX)&&!(r in WX)&&(!(r in e)||r in jX)&&(n[r]=t[r]);return n},i$=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e=="object"?Object.keys(e).length>0:typeof e=="string"?e.trim().length>0:!!e;function o$(e){return e instanceof GR||(e==null?void 0:e.name)===GR.name}function a$(e){return e instanceof iN||(e==null?void 0:e.name)===iN.name}var hS,Iw,Ai,Qs,Hr,qe,Ya,ki,mc,Mt,Qp,Nw,oN,Zp,ba,aN,Cw,nd,eR,lN;const Od=class Od{constructor(t,n={}){$e(this,Mt);Te(this,"request");$e(this,Ai);$e(this,Qs,0);$e(this,Hr);$e(this,qe);$e(this,Ya);$e(this,ki);$e(this,mc);var s,o,l;if(Fe(this,Hr,t),Fe(this,qe,{...n,headers:gw(V(this,Hr).headers,n.headers),hooks:Ow({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:JX(n.method??V(this,Hr).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:t$(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof V(this,Hr)!="string"&&!(V(this,Hr)instanceof URL||V(this,Hr)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(V(this,qe).prefixUrl&&typeof V(this,Hr)=="string"){if(V(this,Hr).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");V(this,qe).prefixUrl.endsWith("/")||(V(this,qe).prefixUrl+="/"),Fe(this,Hr,V(this,qe).prefixUrl+V(this,Hr))}BX&&pw&&(Fe(this,ki,V(this,qe).signal??V(this,Hr).signal),Fe(this,Ai,new globalThis.AbortController),V(this,qe).signal=V(this,ki)?AbortSignal.any([V(this,ki),V(this,Ai).signal]):V(this,Ai).signal),_D&&(V(this,qe).duplex="half"),V(this,qe).json!==void 0&&(V(this,qe).body=((o=(s=V(this,qe)).stringifyJson)==null?void 0:o.call(s,V(this,qe).json))??JSON.stringify(V(this,qe).json),V(this,qe).headers.set("content-type",V(this,qe).headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(V(this,Hr)instanceof globalThis.Request&&(HX&&V(this,qe).body instanceof globalThis.FormData||V(this,qe).body instanceof URLSearchParams)&&!r&&V(this,qe).headers.delete("content-type"),this.request=new globalThis.Request(V(this,Hr),V(this,qe)),i$(V(this,qe).searchParams)){const E="?"+(typeof V(this,qe).searchParams=="string"?V(this,qe).searchParams.replace(/^\?/,""):new URLSearchParams(we(l=Od,hS,Iw).call(l,V(this,qe).searchParams)).toString()),f=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,E);this.request=new globalThis.Request(f,V(this,qe))}if(V(this,qe).onUploadProgress){if(typeof V(this,qe).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!_D)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=we(this,Mt,lN).call(this,this.request,V(this,qe).body??void 0)}}static create(t,n){var l,c,E;const r=new Od(t,n),s=async()=>{var h,d,p,S,R,m,g,I,C,L,N,y;if(typeof V(r,qe).timeout=="number"&&V(r,qe).timeout>Jg)throw new RangeError(`The \`timeout\` option cannot be greater than ${Jg}`);await Promise.resolve();let f=await we(h=r,Mt,Cw).call(h);for(const _ of V(r,qe).hooks.afterResponse){const M=we(d=r,Mt,oN).call(d,f.clone());let w;try{w=await _(r.request,we(p=r,Mt,nd).call(p),M,{retryCount:V(r,Qs)})}catch(Y){throw we(S=r,Mt,ba).call(S,M),we(R=r,Mt,ba).call(R,f),Y}if(w instanceof mw)throw we(m=r,Mt,ba).call(m,M),we(g=r,Mt,ba).call(g,f),new qg(w.options);const F=w instanceof globalThis.Response?w:f;M!==F&&we(I=r,Mt,ba).call(I,M),f!==F&&we(C=r,Mt,ba).call(C,f),f=F}if(we(L=r,Mt,oN).call(L,f),!f.ok&&(typeof V(r,qe).throwHttpErrors=="function"?V(r,qe).throwHttpErrors(f.status):V(r,qe).throwHttpErrors)){let _=new GR(f,r.request,we(N=r,Mt,nd).call(N));for(const M of V(r,qe).hooks.beforeError)_=await M(_,{retryCount:V(r,Qs)});throw _}if(V(r,qe).onDownloadProgress){if(typeof V(r,qe).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!FX)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const _=f.clone();return we(y=r,Mt,ba).call(y,f),KX(_,V(r,qe).onDownloadProgress)}return f},o=we(l=r,Mt,aN).call(l,s).finally(()=>{var h,d;const f=V(r,Ya);we(h=r,Mt,Zp).call(h,(f==null?void 0:f.body)??void 0),we(d=r,Mt,Zp).call(d,r.request.body??void 0)});for(const[f,h]of Object.entries(VX))f==="bytes"&&typeof((E=(c=globalThis.Response)==null?void 0:c.prototype)==null?void 0:E.bytes)!="function"||(o[f]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||h);const d=await o;if(f==="json"){if(d.status===204)return"";const p=await d.text();return p===""?"":n.parseJson?n.parseJson(p):JSON.parse(p)}return d[f]()});return o}};hS=new WeakSet,Iw=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof URLSearchParams)?Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0)):t},Ai=new WeakMap,Qs=new WeakMap,Hr=new WeakMap,qe=new WeakMap,Ya=new WeakMap,ki=new WeakMap,mc=new WeakMap,Mt=new WeakSet,Qp=function(){const t=V(this,qe).retry.delay(V(this,Qs));let n=t;V(this,qe).retry.jitter===!0?n=Math.random()*t:typeof V(this,qe).retry.jitter=="function"&&(n=V(this,qe).retry.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t));const r=V(this,qe).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,n)},Nw=async function(t){if(Ff(this,Qs)._++,V(this,Qs)>V(this,qe).retry.limit)throw t;const n=t instanceof Error?t:new hw(t);if(n instanceof qg)return n.customDelay??we(this,Mt,Qp).call(this);if(!V(this,qe).retry.methods.includes(this.request.method.toLowerCase()))throw t;if(V(this,qe).retry.shouldRetry!==void 0){const r=await V(this,qe).retry.shouldRetry({error:n,retryCount:V(this,Qs)});if(r===!1)throw t;if(r===!0)return we(this,Mt,Qp).call(this)}if(a$(t)&&!V(this,qe).retry.retryOnTimeout)throw t;if(o$(t)){if(!V(this,qe).retry.statusCodes.includes(t.response.status))throw t;const r=t.response.headers.get("Retry-After")??t.response.headers.get("RateLimit-Reset")??t.response.headers.get("X-RateLimit-Retry-After")??t.response.headers.get("X-RateLimit-Reset")??t.response.headers.get("X-Rate-Limit-Reset");if(r&&V(this,qe).retry.afterStatusCodes.includes(t.response.status)){let s=Number(r)*1e3;Number.isNaN(s)?s=Date.parse(r)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const o=V(this,qe).retry.maxRetryAfter??s;return s<o?s:o}if(t.response.status===413)throw t}return we(this,Mt,Qp).call(this)},oN=function(t){return V(this,qe).parseJson&&(t.json=async()=>V(this,qe).parseJson(await t.text())),t},Zp=function(t){t&&t.cancel().catch(()=>{})},ba=function(t){we(this,Mt,Zp).call(this,t.body??void 0)},aN=async function(t){try{return await t()}catch(n){const r=Math.min(await we(this,Mt,Nw).call(this,n),Jg);if(V(this,Qs)<1)throw n;if(await r$(r,V(this,ki)?{signal:V(this,ki)}:{}),n instanceof qg&&n.customRequest){const s=V(this,qe).signal?new globalThis.Request(n.customRequest,{signal:V(this,qe).signal}):new globalThis.Request(n.customRequest);we(this,Mt,eR).call(this,s)}for(const s of V(this,qe).hooks.beforeRetry){const o=await s({request:this.request,options:we(this,Mt,nd).call(this),error:n,retryCount:V(this,Qs)});if(o instanceof globalThis.Request){we(this,Mt,eR).call(this,o);break}if(o instanceof globalThis.Response)return o;if(o===Sw)return}return we(this,Mt,aN).call(this,t)}},Cw=async function(){var n;(n=V(this,Ai))!=null&&n.signal.aborted&&(Fe(this,Ai,new globalThis.AbortController),V(this,qe).signal=V(this,ki)?AbortSignal.any([V(this,ki),V(this,Ai).signal]):V(this,Ai).signal,this.request=new globalThis.Request(this.request,{signal:V(this,qe).signal}));for(const r of V(this,qe).hooks.beforeRequest){const s=await r(this.request,we(this,Mt,nd).call(this),{retryCount:V(this,Qs)});if(s instanceof Response)return s;if(s instanceof globalThis.Request){we(this,Mt,eR).call(this,s);break}}const t=s$(this.request,V(this,qe));return Fe(this,Ya,this.request),this.request=V(this,Ya).clone(),V(this,qe).timeout===!1?V(this,qe).fetch(V(this,Ya),t):n$(V(this,Ya),t,V(this,Ai),V(this,qe))},nd=function(){if(!V(this,mc)){const{hooks:t,...n}=V(this,qe);Fe(this,mc,Object.freeze(n))}return V(this,mc)},eR=function(t){Fe(this,mc,void 0),this.request=we(this,Mt,lN).call(this,t)},lN=function(t,n){return!V(this,qe).onUploadProgress||!t.body?t:zX(t,V(this,qe).onUploadProgress,n??V(this,qe).body??void 0)},$e(Od,hS);let BR=Od;/*! MIT License © Sindre Sorhus */const cN=e=>{const t=(n,r)=>BR.create(n,Tp(e,r));for(const n of Rw)t[n]=(r,s)=>BR.create(r,Tp(e,s,{method:n}));return t.create=n=>cN(Tp(n)),t.extend=n=>(typeof n=="function"&&(n=n(e??{})),cN(Tp(e,n))),t.stop=Sw,t.retry=YX,t},l$=cN();function _w(e,t,n,r,s){if(!n){let c=null;for(const E of Object.keys(e))if(c=_w(e,t,E,r),c)break;return c}const o=e[n];if(!o)return null;const l=!1;return o.find(c=>r&&!c.methods.includes(r)?!1:!!(c.name===t||l))||null}function c$(e,t,n,r,s){const o=[],l=Array.isArray(r)?r:null,c=Array.isArray(r)?{}:r??{};let E=0;for(const h of t){if(h.type===0){o.push(h.val==="/"?"":`${h.val}${h.end}`);continue}if(h.type===2){const R=l?l.slice(E):c["*"];if(!Array.isArray(R)||!R.length)throw new Error(`Cannot make URL for "${e}". Invalid value provided for the wildcard param`);o.push(`${R.join("/")}${h.end}`);break}const d=h.val,p=l?l[E]:c[d],S=p!=null;if(h.type===1&&!S)throw new Error(`Cannot make URL for "${e}". Missing value for the "${d}" param`);S&&o.push(`${p}${h.end}`),E++}let f=`/${o.join("/")}`;if(s!=null&&s.prefixUrl&&(f=`${s==null?void 0:s.prefixUrl.replace(/\/$/,"")}${f}`),s!=null&&s.qs){const h=n(s==null?void 0:s.qs);f=h?`${f}?${h}`:f}return f}function u$(e,t,n){let r,s;function o(c,E,f,h){if(!s){if(s=typeof e=="function"?e():e,!s||typeof s!="object")throw new Error(`Cannot construct routes. Expected the value to be an object, instead received ${typeof s}`);r||(r=Object.keys(s).filter(m=>m!=="root"))}const d=r.find(m=>c.startsWith(`${m}@`)),p=d?c.replace(new RegExp(`^${d}@`),""):c,S=_w(s,p,d,h);if(!S)throw h?new Error(`Cannot lookup route "${p}" for method "${h}"`):new Error(`Cannot lookup route "${p}"`);const R=f?{...n,...f}:void 0;return c$(S.name??S.pattern,S.tokens,t,E,R)}const l=function(...[E,f,h]){return o(E,f,h)};return l.get=function(...[E,f,h]){const p=o(E,f,h,"GET");return{url:p,method:"GET",toString(){return p},form:{action:p,method:"GET"}}},l.post=function(...[E,f,h]){const d="POST",p=o(E,f,h,d);return{url:p,method:d,toString(){return p},form:{action:p,method:d}}},l.put=function(...[E,f,h]){const p=o(E,f,h,"PUT");return{url:p,method:"PUT",toString(){return p},form:{action:p,method:"PUT"}}},l.patch=function(...[E,f,h]){const d="PATCH",p=o(E,f,h,d);return{url:p,method:d,toString(){return p},form:{action:p,method:d}}},l.delete=function(...[E,f,h]){const d="DELETE",p=o(E,f,h,d);return{url:p,method:d,toString(){return p},form:{action:p,method:d}}},l.method=function(E,...[f,h,d]){const p=o(f,h,d,E);return{url:p,method:E,toString(){return p},form:{action:p,method:E}}},l}function uN(e){if(!e)return"";const t=[];function n(r,s=""){for(const[o,l]of Object.entries(r)){if(l==null)continue;const c=encodeURIComponent(o),E=s?`${s}[${c}]`:c;Array.isArray(l)?l.forEach((f,h)=>{f!=null&&(f instanceof Date?t.push(`${E}[]=${encodeURIComponent(f.toISOString())}`):typeof f=="object"?n(f,`${E}[${h}]`):t.push(`${E}[]=${encodeURIComponent(f)}`))}):l instanceof Date?t.push(`${E}=${encodeURIComponent(l.toISOString())}`):typeof l=="object"?n(l,E):t.push(`${E}=${encodeURIComponent(l)}`)}}return n(e),t.length?t.join("&"):""}var Ac,Zd,jr,Lw,EN,yw,bw,fN,Pw,xo,E$=(xo=class{constructor(t,n){$e(this,jr);$e(this,Ac);$e(this,Zd);Fe(this,Ac,t),Fe(this,Zd,n)}static matchesRouteNamePattern(t,n){if(n===t)return!0;if(!n.includes("*"))return!1;const r=n.split("."),s=t.split(".");function o(l,c){if(l===r.length)return c===s.length;if(r[l]==="*"){const E=r.length-l-1;for(let f=c+1;f<=s.length-E;f++)if(o(l+1,f))return!0;return!1}return c>=s.length||r[l]!==s[c]?!1:o(l+1,c+1)}return o(0,0)}static matchPathAgainstPattern(t,n){const r=t.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o={};let l=0;for(const c of s){if(c==="*")return l>=r.length?null:(o["*"]=r.slice(l).join("/"),o);if(c.startsWith(":")){const E=c.endsWith("?"),f=c.slice(1,E?-1:void 0);if(l<r.length)o[f]=r[l++];else if(!E)return null;continue}if(l>=r.length||r[l]!==c)return null;l++}return l===r.length?o:null}has(t){return V(this,Ac).some(([n])=>xo.matchesRouteNamePattern(n,t))}current(t,n){const r=we(this,jr,Lw).call(this);return r?t?we(this,jr,bw).call(this,r,t,n):we(this,jr,yw).call(this,r):t?!1:void 0}},Ac=new WeakMap,Zd=new WeakMap,jr=new WeakSet,Lw=function(){if(typeof globalThis.window>"u")return;const t=globalThis.window.location.pathname,n=new URL(V(this,Zd)).pathname;return n!=="/"&&t.startsWith(n)?t.slice(n.length)||"/":t},EN=function(t){return t.methods.includes("GET")||t.methods.includes("HEAD")},yw=function(t){for(const[n,r]of V(this,Ac))if(we(this,jr,EN).call(this,r)&&xo.matchPathAgainstPattern(t,r.pattern))return n},bw=function(t,n,r){for(const[s,o]of V(this,Ac)){if(!we(this,jr,EN).call(this,o)||!xo.matchesRouteNamePattern(s,n))continue;const l=xo.matchPathAgainstPattern(t,o.pattern);if(l&&!(r!=null&&r.params&&Object.entries(r.params).some(([E,f])=>l[E]!==String(f)))&&!(r!=null&&r.query&&!we(this,jr,Pw).call(this,globalThis.window.location.search,r.query)))return!0}return!1},fN=function(t){if(!t||t==="?")return{};const n={};for(const[r,s]of new URLSearchParams(t)){const o=n[r];if(o===void 0){n[r]=s;continue}n[r]=Array.isArray(o)?[...o,s]:[o,s]}return n},Pw=function(t,n){const r=we(this,jr,fN).call(this,t),s=we(this,jr,fN).call(this,uN(n));return Object.entries(s).every(([o,l])=>{const c=r[o];return c===void 0?!1:Array.isArray(l)?Array.isArray(c)?l.length===c.length&&l.every((E,f)=>c[f]===E):l.length===1&&c===l[0]:Array.isArray(c)?c.length===1&&c[0]===l:c===l})},xo),Sx,Wa,mx,f$=(Sx=Symbol.toStringTag,mx=class{constructor(e){Te(this,Sx,"TuyauPromise");$e(this,Wa);Fe(this,Wa,e)}then(e,t){return V(this,Wa).then(e,t)}catch(e){return V(this,Wa).catch(e)}finally(e){return V(this,Wa).finally(e)}safe(){return V(this,Wa).then(e=>[e,null],e=>[null,e])}},Wa=new WeakMap,mx),Dw=class extends Error{constructor(t,n){super(t,n);Te(this,"kind");Te(this,"status");Te(this,"rawResponse");Te(this,"rawRequest");Te(this,"response");this.status=void 0,this.response=void 0,this.rawResponse=void 0,this.rawRequest=void 0,this.name="TuyauError"}isStatus(t){return this.kind==="http"&&this.status===t}isValidationError(){return this.isStatus(422)}},d$=class extends Dw{constructor(e,t){var l,c,E,f;const n=(l=e.response)==null?void 0:l.status,r=n?`status code ${n}`:"an unknown error",s=(c=e.request)==null?void 0:c.url.replace(e.options.prefixUrl||"",""),o=e.response?`Request failed with ${r}: ${(E=e.request)==null?void 0:E.method.toUpperCase()} /${s}`:`Request failed with ${r}`;super(o,{cause:e}),this.kind="http",this.rawResponse=e.response,this.response=t,this.status=(f=e.response)==null?void 0:f.status,this.rawRequest=e.request,this.name="TuyauHTTPError"}},T$=class extends Dw{constructor(e,t){const n=t?`Network error: ${t.method.toUpperCase()} ${t.url}`:"Network error occurred";super(n,{cause:e}),this.kind="network",this.name="TuyauNetworkError"}};function h$(e){return e.replace(/^\//,"")}function Qg(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}var p$=typeof FileList>"u",R$=typeof navigator<"u"&&navigator.product==="ReactNative";function S$(e){return e.map(t=>t.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`)).join(".")}function m$(e){return e.map(t=>t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)).join(".")}async function A$(e){var n;if(!e)return;const t=(n=e.headers.get("Content-Type"))==null?void 0:n.split(";")[0];return t==="application/json"?await e.json():t==="application/octet-stream"?await e.arrayBuffer():await e.text()}var gc,eT,Vr,fE,xt,vw,Mw,xw,Uw,dN,tR,TN,hN,nR,ww,Ql,rR,Ax,g$=(Ax=class{constructor(e){$e(this,xt);Te(this,"api");Te(this,"urlFor");$e(this,gc);$e(this,eT);$e(this,Vr);$e(this,fE);Fe(this,Vr,e),this.api=we(this,xt,rR).call(this,[]),Fe(this,gc,Object.entries(V(this,Vr).registry.routes)),this.urlFor=we(this,xt,xw).call(this),Fe(this,fE,new E$(V(this,gc),V(this,Vr).baseUrl)),we(this,xt,Mw).call(this),Fe(this,eT,l$.create(we(this,xt,vw).call(this)))}get(e,t){return we(this,xt,Ql).call(this,"GET",e,t)}post(e,t){return we(this,xt,Ql).call(this,"POST",e,t)}put(e,t){return we(this,xt,Ql).call(this,"PUT",e,t)}patch(e,t){return we(this,xt,Ql).call(this,"PATCH",e,t)}delete(e,t){return we(this,xt,Ql).call(this,"DELETE",e,t)}head(e,t){return we(this,xt,Ql).call(this,"HEAD",e,t)}request(e,t){const n=V(this,Vr).registry.routes[e];return we(this,xt,nR).call(this,e,n.methods[0],t)}getRoute(e,t){const n=V(this,Vr).registry.routes[e];if(!n)throw new Error(`Route ${String(e)} not found`);return{url:we(this,xt,hN).call(this,e,n.methods[0],t),methods:n.methods}}has(e){return V(this,fE).has(e)}current(e,t){return V(this,fE).current(e,t)}},gc=new WeakMap,eT=new WeakMap,Vr=new WeakMap,fE=new WeakMap,xt=new WeakSet,vw=function(){var e;return{prefixUrl:V(this,Vr).baseUrl,...V(this,Vr),hooks:{...V(this,Vr).hooks,beforeRequest:[...((e=V(this,Vr).hooks)==null?void 0:e.beforeRequest)||[],we(this,xt,Uw).bind(this)]}}},Mw=function(){var e;(e=V(this,Vr).plugins)==null||e.forEach(t=>t({options:V(this,Vr)}))},xw=function(){const e=V(this,gc).map(([t,n])=>({name:t,domain:"root",...n}));return u$({root:e},uN)},Uw=function(e){var s;const t=(s=globalThis.document)==null?void 0:s.cookie;if(!t)return;const n=t.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/),r=n==null?void 0:n[1];if(r)try{e.headers.set("X-XSRF-TOKEN",decodeURIComponent(r))}catch{}},dN=function(e){return R$&&Qg(e)&&e.uri?!0:p$?e instanceof Blob:e instanceof FileList||e instanceof File},tR=function(e,t=0){return!e||t>5?!1:Object.values(e).some(n=>we(this,xt,dN).call(this,n)?!0:Array.isArray(n)?n.some(r=>we(this,xt,dN).call(this,r)||Qg(r)&&we(this,xt,tR).call(this,r,t+1)):Qg(n)?we(this,xt,tR).call(this,n,t+1):!1)},TN=function(e){return e.toLowerCase()},hN=function(e,t,n){const r=we(this,xt,TN).call(this,t),s=r==="head"||r==="options"?"get":r;return this.urlFor[s](e,(n==null?void 0:n.params)||{}).url},nR=function(e,t,n){const r=(async()=>{var p,S;const s=we(this,xt,hN).call(this,e,t,n);let o="json",l=n.body;!(l instanceof FormData)&&we(this,xt,tR).call(this,l)?(l=GX.serialize(l,{indices:!0}),o="body"):l instanceof FormData&&(o="body");const c=["GET","HEAD"].includes(t),{body:E,responseType:f,...h}=n,d={searchParams:uN((n==null?void 0:n.query)||{}),[o]:c?void 0:l,...h};try{const R=await V(this,eT)[we(this,xt,TN).call(this,t)](h$(s),d);let m;if(f)m=await R[f]();else{const g=(S=(p=R.headers.get("Content-Type"))==null?void 0:p.split(";")[0])==null?void 0:S.trim();g==="application/json"?m=await R.json():g==="application/octet-stream"?m=await R.arrayBuffer():m=await R.text()}return m}catch(R){if(R instanceof GR){const m=await A$(R.response);throw new d$(R,m)}throw new T$(R,{url:s,method:t})}})();return new f$(r)},ww=function(e,t){const[n,r]=V(this,gc).find(([,s])=>s.methods[0]===e&&s.pattern===t)||[null,null];if(!n||!r)throw new Error(`No ${e} ${t}`);return{name:n,endpoint:r}},Ql=function(e,t,n){const{name:r,endpoint:s}=we(this,xt,ww).call(this,e,t);return we(this,xt,nR).call(this,r,s.methods[0],n)},rR=function(e){let t=S$(e),n=V(this,Vr).registry.routes[t];if(n||(t=m$(e),n=V(this,Vr).registry.routes[t]),n){const r=s=>we(this,xt,nR).call(this,t,n.methods[0],s);return new Proxy(r,{get:(s,o)=>we(this,xt,rR).call(this,[...e,String(o)]),apply:(s,o,l)=>r(...l)})}return new Proxy({},{get:(r,s)=>we(this,xt,rR).call(this,[...e,String(s)])})},Ax);function O$(e){return new g$(e)}const zs={},I$={"otlp.traces":{methods:["POST"],pattern:"/v1/traces",tokens:[{old:"/v1/traces",type:0,val:"v1",end:""},{old:"/v1/traces",type:0,val:"traces",end:""}],types:zs},"otlp.logs":{methods:["POST"],pattern:"/v1/logs",tokens:[{old:"/v1/logs",type:0,val:"v1",end:""},{old:"/v1/logs",type:0,val:"logs",end:""}],types:zs},"traces.index":{methods:["GET","HEAD"],pattern:"/api/traces",tokens:[{old:"/api/traces",type:0,val:"api",end:""},{old:"/api/traces",type:0,val:"traces",end:""}],types:zs},"traces.show":{methods:["GET","HEAD"],pattern:"/api/traces/:traceId",tokens:[{old:"/api/traces/:traceId",type:0,val:"api",end:""},{old:"/api/traces/:traceId",type:0,val:"traces",end:""},{old:"/api/traces/:traceId",type:1,val:"traceId",end:""}],types:zs},"queries.index":{methods:["GET","HEAD"],pattern:"/api/queries",tokens:[{old:"/api/queries",type:0,val:"api",end:""},{old:"/api/queries",type:0,val:"queries",end:""}],types:zs},"exceptions.index":{methods:["GET","HEAD"],pattern:"/api/exceptions",tokens:[{old:"/api/exceptions",type:0,val:"api",end:""},{old:"/api/exceptions",type:0,val:"exceptions",end:""}],types:zs},"logs.index":{methods:["GET","HEAD"],pattern:"/api/logs",tokens:[{old:"/api/logs",type:0,val:"api",end:""},{old:"/api/logs",type:0,val:"logs",end:""}],types:zs},"services.index":{methods:["GET","HEAD"],pattern:"/api/services",tokens:[{old:"/api/services",type:0,val:"api",end:""},{old:"/api/services",type:0,val:"services",end:""}],types:zs},"jobs.index":{methods:["GET","HEAD"],pattern:"/api/jobs",tokens:[{old:"/api/jobs",type:0,val:"api",end:""},{old:"/api/jobs",type:0,val:"jobs",end:""}],types:zs},"commands.index":{methods:["GET","HEAD"],pattern:"/api/commands",tokens:[{old:"/api/commands",type:0,val:"api",end:""},{old:"/api/commands",type:0,val:"commands",end:""}],types:zs},"external_calls.index":{methods:["GET","HEAD"],pattern:"/api/external-calls",tokens:[{old:"/api/external-calls",type:0,val:"api",end:""},{old:"/api/external-calls",type:0,val:"external-calls",end:""}],types:zs},"events.stream":{methods:["GET","HEAD"],pattern:"/api/events",tokens:[{old:"/api/events",type:0,val:"api",end:""},{old:"/api/events",type:0,val:"events",end:""}],types:zs}},N$={routes:I$,$tree:{}},C$=O$({baseUrl:window.location.origin,registry:N$}),Wr=UX({client:C$}),Gw={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},s_={...Gw,position:"fixed",top:0,left:0},Bw={...Gw,position:"absolute"},yD={};function Dr(e,t){const n=D.useRef(yD);return n.current===yD&&(n.current=e(t)),n}function Pc(e,t,n,r){const s=Dr(Fw).current;return L$(s,e,t,n,r)&&Hw(s,[e,t,n,r]),s.callback}function _$(e){const t=Dr(Fw).current;return y$(t,e)&&Hw(t,e),t.callback}function Fw(){return{callback:null,cleanup:null,refs:[]}}function L$(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function y$(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Hw(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const l=o(n);typeof l=="function"&&(r[s]=l);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const l=r[s];typeof l=="function"?l():o(null);break}case"object":{o.current=null;break}}}}}}}function i_(e){const t=D.useRef(!0);t.current&&(t.current=!1,e())}function pN({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=D.useRef(e!==void 0),[o,l]=D.useState(t),c=s?e:o,E=D.useCallback(f=>{s||l(f)},[]);return[c,E]}const b$=()=>{},Je=typeof document<"u"?D.useLayoutEffect:b$,Zg=lC[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],P$=Zg&&Zg!==D.useLayoutEffect?Zg:e=>e();function at(e){const t=Dr(D$).current;return t.next=e,P$(t.effect),t.trampoline}function D$(){const e={next:void 0,callback:v$,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function v$(){}function Rr(e){const t=Dr(M$,e).current;return t.next=e,Je(t.effect),t}function M$(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function x$(e,t){return function(r,...s){const o=new URL(e);return o.searchParams.set("code",r.toString()),s.forEach(l=>o.searchParams.append("args[]",l)),`${t} error #${r}; visit ${o} for the full message.`}}const vr=x$("https://base-ui.com/production-error","Base UI");var FR=Symbol("NOT_FOUND");function U$(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function w$(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function G$(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var bD=e=>Array.isArray(e)?e:[e];function B$(e){const t=Array.isArray(e[0])?e[0]:e;return G$(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function F$(e,t){const n=[],{length:r}=e;for(let s=0;s<r;s++)n.push(e[s].apply(null,t));return n}function H$(e){let t;return{get(n){return t&&e(t.key,n)?t.value:FR},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function V$(e,t){let n=[];function r(c){const E=n.findIndex(f=>t(c,f.key));if(E>-1){const f=n[E];return E>0&&(n.splice(E,1),n.unshift(f)),f.value}return FR}function s(c,E){r(c)===FR&&(n.unshift({key:c,value:E}),n.length>e&&n.pop())}function o(){return n}function l(){n=[]}return{get:r,put:s,getEntries:o,clear:l}}var k$=(e,t)=>e===t;function Y$(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:s}=n;for(let o=0;o<s;o++)if(!e(n[o],r[o]))return!1;return!0}}function W$(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=k$,maxSize:s=1,resultEqualityCheck:o}=n,l=Y$(r);let c=0;const E=s<=1?H$(l):V$(s,l);function f(){let h=E.get(arguments);if(h===FR){if(h=e.apply(null,arguments),c++,o){const p=E.getEntries().find(S=>o(S.value,h));p&&(h=p.value,c!==0&&c--)}E.put(arguments,h)}return h}return f.clearCache=()=>{E.clear(),f.resetResultsCount()},f.resultsCount=()=>c,f.resetResultsCount=()=>{c=0},f}var j$=class{constructor(e){this.value=e}deref(){return this.value}},X$=typeof WeakRef<"u"?WeakRef:j$,$$=0,PD=1;function pp(){return{s:$$,v:void 0,o:null,p:null}}function Vw(e,t={}){let n=pp();const{resultEqualityCheck:r}=t;let s,o=0;function l(){var d;let c=n;const{length:E}=arguments;for(let p=0,S=E;p<S;p++){const R=arguments[p];if(typeof R=="function"||typeof R=="object"&&R!==null){let m=c.o;m===null&&(c.o=m=new WeakMap);const g=m.get(R);g===void 0?(c=pp(),m.set(R,c)):c=g}else{let m=c.p;m===null&&(c.p=m=new Map);const g=m.get(R);g===void 0?(c=pp(),m.set(R,c)):c=g}}const f=c;let h;if(c.s===PD)h=c.v;else if(h=e.apply(null,arguments),o++,r){const p=((d=s==null?void 0:s.deref)==null?void 0:d.call(s))??s;p!=null&&r(p,h)&&(h=p,o!==0&&o--),s=typeof h=="object"&&h!==null||typeof h=="function"?new X$(h):h}return f.s=PD,f.v=h,h}return l.clearCache=()=>{n=pp(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function kw(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...s)=>{let o=0,l=0,c,E={},f=s.pop();typeof f=="object"&&(E=f,f=s.pop()),U$(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...E},{memoize:d,memoizeOptions:p=[],argsMemoize:S=Vw,argsMemoizeOptions:R=[]}=h,m=bD(p),g=bD(R),I=B$(s),C=d(function(){return o++,f.apply(null,arguments)},...m),L=S(function(){l++;const y=F$(I,arguments);return c=C.apply(null,y),c},...g);return Object.assign(L,{resultFunc:f,memoizedResultFunc:C,dependencies:I,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var K$=kw(Vw),z$=Object.assign((e,t=K$)=>{w$(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,c,E)=>(l[n[E]]=c,l),{}))},{withTypes:()=>z$});kw({memoize:W$,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Qe=(e,t,n,r,s,o,...l)=>{if(l.length>0)throw new Error(vr(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Yw=nU();const q$=parseInt(D.version,10);function o_(e){return q$>=e}const RN=[];let SN;function J$(){return SN}function Q$(e){RN.push(e)}function Ww(e){const t=(n,r)=>{const s=Dr(e8).current;let o;try{SN=s;for(const l of RN)l.before(s);o=e(n,r);for(const l of RN)l.after(s);s.didInitialize=!0}finally{SN=void 0}return o};return t.displayName=e.displayName||e.name,t}function Z$(e){return D.forwardRef(Ww(e))}function e8(){return{didInitialize:!1}}const t8=o_(19),n8=t8?s8:i8;function At(e,t,n,r,s){return n8(e,t,n,r,s)}function r8(e,t,n,r,s){const o=D.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Yw.useSyncExternalStore(e.subscribe,o,o)}Q$({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,s))&&(t=!0,r.value=s,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),Yw.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function s8(e,t,n,r,s){const o=J$();if(!o)return r8(e,t,n,r,s);const l=o.syncIndex;o.syncIndex+=1;let c;return o.didInitialize?(c=o.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(o.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.didChange=!0)):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s),didChange:!1},o.syncHooks.push(c)),c.value}function i8(e,t,n,r,s){return rU.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,s))}class jw{constructor(t){Te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return At(this,t,n,r,s)}}function kr(){}const DD=Object.freeze([]),Sr=Object.freeze({});class a_ extends jw{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){D.useDebugValue(t),Je(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Je(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Je(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){D.useDebugValue(t);const r=n!==void 0;Je(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,s){const o=this.selectors[t];return o(this.state,n,r,s)}useState(t,n,r,s){return D.useDebugValue(t),At(this,this.selectors[t],n,r,s)}useContextCallback(t,n){D.useDebugValue(t);const r=at(n??kr);this.context[t]=r}useStateSetter(t){const n=D.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(o=>{const l=r(o);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}const o8=[];function l_(e){D.useEffect(e,o8)}const Rp=null;class a8{constructor(){Te(this,"callbacks",[]);Te(this,"callbacksCount",0);Te(this,"nextId",1);Te(this,"startId",1);Te(this,"isScheduled",!1);Te(this,"tick",t=>{var s;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(s=n[o])==null||s.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Sp=new a8;class Wi{constructor(){Te(this,"currentId",Rp);Te(this,"cancel",()=>{this.currentId!==Rp&&(Sp.cancel(this.currentId),this.currentId=Rp)});Te(this,"disposeEffect",()=>this.cancel)}static create(){return new Wi}static request(t){return Sp.request(t)}static cancel(t){return Sp.cancel(t)}request(t){this.cancel(),this.currentId=Sp.request(()=>{this.currentId=Rp,t()})}}function LS(){const e=Dr(Wi.create).current;return l_(e.disposeEffect),e}const Kf=0;class bi{constructor(){Te(this,"currentId",Kf);Te(this,"clear",()=>{this.currentId!==Kf&&(clearTimeout(this.currentId),this.currentId=Kf)});Te(this,"disposeEffect",()=>this.clear)}static create(){return new bi}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Kf,n()},t)}isStarted(){return this.currentId!==Kf}}function ns(){const e=Dr(bi.create).current;return l_(e.disposeEffect),e}function yS(){return typeof window<"u"}function Rl(e){return c_(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qi(e){var t;return(t=(c_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function c_(e){return yS()?e instanceof Node||e instanceof wn(e).Node:!1}function nn(e){return yS()?e instanceof Element||e instanceof wn(e).Element:!1}function jn(e){return yS()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function xd(e){return!yS()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Sl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ms(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function l8(e){return/^(table|td|th)$/.test(Rl(e))}function bS(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const c8=/transform|translate|scale|rotate|perspective|filter/,u8=/paint|layout|strict|content/,$l=e=>!!e&&e!=="none";let eO;function u_(e){const t=nn(e)?Ms(e):e;return $l(t.transform)||$l(t.translate)||$l(t.scale)||$l(t.rotate)||$l(t.perspective)||!PS()&&($l(t.backdropFilter)||$l(t.filter))||c8.test(t.willChange||"")||u8.test(t.contain||"")}function E8(e){let t=Bo(e);for(;jn(t)&&!wo(t);){if(u_(t))return t;if(bS(t))return null;t=Bo(t)}return null}function PS(){return eO==null&&(eO=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),eO}function wo(e){return/^(html|body|#document)$/.test(Rl(e))}function Ms(e){return wn(e).getComputedStyle(e)}function DS(e){return nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bo(e){if(Rl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xd(e)&&e.host||qi(e);return xd(t)?t.host:t}function Xw(e){const t=Bo(e);return wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:jn(t)&&Sl(t)?t:Xw(t)}function Ud(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Xw(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=wn(s);if(o){const c=mN(l);return t.concat(l,l.visualViewport||[],Sl(s)?s:[],c&&n?Ud(c):[])}else return t.concat(s,Ud(s,[],n))}function mN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const _E=typeof navigator<"u",tO=d8(),$w=h8(),Kw=T8(),E_=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),zw=tO.platform==="MacIntel"&&tO.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(tO.platform),qw=_E&&/apple/i.test(navigator.vendor),AN=_E&&/android/i.test($w)||/android/i.test(Kw),f8=_E&&$w.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Jw=Kw.includes("jsdom/");function d8(){if(!_E)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function T8(){if(!_E)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function h8(){if(!_E)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const gN="data-base-ui-focusable",Qw="active",Zw="selected",eG="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",nl="ArrowLeft",rl="ArrowRight",f_="ArrowUp",lT="ArrowDown";function ei(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function Nt(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&xd(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function HR(e,t){if(!nn(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(Nt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Qr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ri(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function p8(e){return e.matches("html,body")}function vS(e){return jn(e)&&e.matches(eG)}function ON(e){return e?e.getAttribute("role")==="combobox"&&vS(e):!1}function R8(e){if(!e||Jw)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function wd(e){return e?e.hasAttribute(gN)?e:e.querySelector(`[${gN}]`)||e:null}function Go(e,t,n=!0){return e.filter(s=>{var o;return s.parentId===t&&(!n||((o=s.context)==null?void 0:o.open))}).flatMap(s=>[s,...Go(e,s.id,n)])}function vD(e,t){var s;let n=[],r=(s=e.find(o=>o.id===t))==null?void 0:s.parentId;for(;r;){const o=e.find(l=>l.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function Ps(e){e.preventDefault(),e.stopPropagation()}function S8(e){return"nativeEvent"in e}function tG(e){return e.pointerType===""&&e.isTrusted?!0:AN&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function nG(e){return Jw?!1:!AN&&e.width===0&&e.height===0||AN&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function RE(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function rG(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const m8=["top","right","bottom","left"],SE=Math.min,Ds=Math.max,VR=Math.round,oc=Math.floor,Xi=e=>({x:e,y:e}),A8={left:"right",right:"left",bottom:"top",top:"bottom"};function IN(e,t,n){return Ds(e,SE(t,n))}function Fo(e,t){return typeof e=="function"?e(t):e}function Rs(e){return e.split("-")[0]}function ml(e){return e.split("-")[1]}function d_(e){return e==="x"?"y":"x"}function T_(e){return e==="y"?"height":"width"}function si(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function h_(e){return d_(si(e))}function g8(e,t,n){n===void 0&&(n=!1);const r=ml(e),s=h_(e),o=T_(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=kR(l)),[l,kR(l)]}function O8(e){const t=kR(e);return[NN(e),t,NN(t)]}function NN(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const MD=["left","right"],xD=["right","left"],I8=["top","bottom"],N8=["bottom","top"];function C8(e,t,n){switch(e){case"top":case"bottom":return n?t?xD:MD:t?MD:xD;case"left":case"right":return t?I8:N8;default:return[]}}function _8(e,t,n,r){const s=ml(e);let o=C8(Rs(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(NN)))),o}function kR(e){const t=Rs(e);return A8[t]+e.slice(t.length)}function L8(e){return{top:0,right:0,bottom:0,left:0,...e}}function sG(e){return typeof e!="number"?L8(e):{top:e,right:e,bottom:e,left:e}}function Gd(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function mp(e,t,n){return Math.floor(e/t)!==n}function YR(e,t){return t<0||t>=e.current.length}function nO(e,t){return Jr(e,{disabledIndices:t})}function UD(e,t){return Jr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Jr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let o=t;do o+=n?-s:s;while(o>=0&&o<=e.current.length-1&&zu(e,o,r));return o}function y8(e,{event:t,orientation:n,loopFocus:r,rtl:s,cols:o,disabledIndices:l,minIndex:c,maxIndex:E,prevIndex:f,stopEvent:h=!1}){let d=f,p;if(t.key===f_?p="up":t.key===lT&&(p="down"),p){const S=[],R=[];let m=!1,g=0;{let w=null,F=-1;e.current.forEach((Y,$)=>{if(Y==null)return;g+=1;const W=Y.closest('[role="row"]');W&&(m=!0),(W!==w||F===-1)&&(w=W,F+=1,S[F]=[]),S[F].push($),R[$]=F})}let I=!1,C=0;if(m)for(const w of S){const F=w.length;F>C&&(C=F),F!==o&&(I=!0)}const L=I&&g<e.current.length,N=C||o,y=w=>{if(!I||f===-1)return;const F=R[f];if(F==null)return;const Y=S[F].indexOf(f),$=w==="up"?-1:1;for(let W=F+$,K=0;K<S.length;K+=1,W+=$){if(W<0||W>=S.length){if(!r||L)return;W=W<0?S.length-1:0}const q=S[W];for(let j=Math.min(Y,q.length-1);j>=0;j-=1){const k=q[j];if(!zu(e,k,l))return k}}},_=w=>{if(!L||f===-1)return;const F=f%N,Y=w==="up"?-N:N,$=E-E%N,W=oc(E/N)+1;for(let K=f-F+Y,q=0;q<W;q+=1,K+=Y){if(K<0||K>E){if(!r)return;K=K<0?$:0}const j=Math.min(K+N-1,E);for(let k=Math.min(K+F,j);k>=K;k-=1)if(!zu(e,k,l))return k}};h&&Ps(t);const M=y(p)??_(p);if(M!==void 0)d=M;else if(f===-1)d=p==="up"?E:c;else if(d=Jr(e,{startingIndex:f,amount:N,decrement:p==="up",disabledIndices:l}),r){if(p==="up"&&(f-N<c||d<0)){const w=f%N,F=E%N,Y=E-(F-w);F===w?d=E:d=F>w?Y:Y-N}p==="down"&&f+N>E&&(d=Jr(e,{startingIndex:f%N-N,amount:N,disabledIndices:l}))}YR(e,d)&&(d=f)}if(n==="both"){const S=oc(f/o);t.key===(s?nl:rl)&&(h&&Ps(t),f%o!==o-1?(d=Jr(e,{startingIndex:f,disabledIndices:l}),r&&mp(d,o,S)&&(d=Jr(e,{startingIndex:f-f%o-1,disabledIndices:l}))):r&&(d=Jr(e,{startingIndex:f-f%o-1,disabledIndices:l})),mp(d,o,S)&&(d=f)),t.key===(s?rl:nl)&&(h&&Ps(t),f%o!==0?(d=Jr(e,{startingIndex:f,decrement:!0,disabledIndices:l}),r&&mp(d,o,S)&&(d=Jr(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:l}))):r&&(d=Jr(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:l})),mp(d,o,S)&&(d=f));const R=oc(E/o)===S;YR(e,d)&&(r&&R?d=t.key===(s?rl:nl)?E:Jr(e,{startingIndex:f-f%o-1,disabledIndices:l}):d=f)}return d}function b8(e,t,n){const r=[];let s=0;return e.forEach(({width:o,height:l},c)=>{let E=!1;for(;!E;){const f=[];for(let h=0;h<o;h+=1)for(let d=0;d<l;d+=1)f.push(s+h+d*t);s%t+o<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=c}),E=!0):s+=1}}),[...r]}function P8(e,t,n,r,s){if(e===-1)return-1;const o=n.indexOf(e),l=t[e];switch(s){case"tl":return o;case"tr":return l?o+l.width-1:o;case"bl":return l?o+(l.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function D8(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function zu(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const s=e.current[t];return s?p_(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function p_(e){return Ms(e).display!=="none"}/*!
67
+ * tabbable 6.4.0
68
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
69
+ */var v8=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],WR=v8.join(","),iG=typeof Element>"u",mE=iG?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jR=!iG&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},XR=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=s===""||s==="true",l=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):XR(t.parentNode));return l},M8=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},oG=function(t,n,r){if(XR(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(WR));return n&&mE.call(t,WR)&&s.unshift(t),s=s.filter(r),s},$R=function(t,n,r){for(var s=[],o=Array.from(t);o.length;){var l=o.shift();if(!XR(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),E=c.length?c:l.children,f=$R(E,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=mE.call(l,WR);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var d=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),p=!XR(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(d&&p){var S=$R(d===!0?l.children:d.children,!0,r);r.flatten?s.push.apply(s,S):s.push({scopeParent:l,candidates:S})}else o.unshift.apply(o,l.children)}}return s},aG=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lG=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||M8(t))&&!aG(t)?0:t.tabIndex},x8=function(t,n){var r=lG(t);return r<0&&n&&!aG(t)?0:r},U8=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},cG=function(t){return t.tagName==="INPUT"},w8=function(t){return cG(t)&&t.type==="hidden"},G8=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},B8=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},F8=function(t){if(!t.name)return!0;var n=t.form||jR(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var o=B8(s,t.form);return!o||o===t},H8=function(t){return cG(t)&&t.type==="radio"},V8=function(t){return H8(t)&&!F8(t)},k8=function(t){var n,r=t&&jR(t),s=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var l,c,E;for(o=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(E=t.ownerDocument)!==null&&E!==void 0&&E.contains(t));!o&&s;){var f,h,d;r=jR(s),s=(f=r)===null||f===void 0?void 0:f.host,o=!!((h=s)!==null&&h!==void 0&&(d=h.ownerDocument)!==null&&d!==void 0&&d.contains(s))}}return o},wD=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},Y8=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var l=mE.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(mE.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var E=t;t;){var f=t.parentElement,h=jR(t);if(f&&!f.shadowRoot&&s(f)===!0)return wD(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=E}if(k8(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wD(t);return!1},W8=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return mE.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},CN=function(t,n){return!(n.disabled||w8(n)||Y8(n,t)||G8(n)||W8(n))},_N=function(t,n){return!(V8(n)||lG(n)<0||!CN(t,n))},j8=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},uG=function(t){var n=[],r=[];return t.forEach(function(s,o){var l=!!s.scopeParent,c=l?s.scopeParent:s,E=x8(c,l),f=l?uG(s.candidates):c;E===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:o,tabIndex:E,item:s,isScope:l,content:f})}),r.sort(U8).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(n)},MS=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$R([t],n.includeContainer,{filter:_N.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:j8}):r=oG(t,n.includeContainer,_N.bind(null,n)),uG(r)},X8=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$R([t],n.includeContainer,{filter:CN.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=oG(t,n.includeContainer,CN.bind(null,n)),r},EG=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return mE.call(t,WR)===!1?!1:_N(n,t)};function an(e){return(e==null?void 0:e.ownerDocument)||document}const cT=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function fG(e,t){const n=MS(e,cT()),r=n.length;if(r===0)return;const s=ei(an(e)),o=n.indexOf(s),l=o===-1?t===1?0:r-1:o+t;return n[l]}function dG(e){return fG(an(e).body,1)||e}function TG(e){return fG(an(e).body,-1)||e}function dd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Nt(n,r)}function $8(e){MS(e,cT()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GD(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function K8(e,t){return t!=null&&!RE(t)?0:typeof e=="function"?e():e}function Td(e,t,n){const r=K8(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function BD(e){return typeof e=="function"?e():e}function hG(e,t){return t||e==="click"||e==="mousedown"}const z8={style:{transition:"none"}},pG="data-base-ui-click-trigger",q8={fallbackAxisSide:"none"},J8={fallbackAxisSide:"end"},Q8={clipPath:"inset(50%)",position:"fixed",top:0,left:0},LE="none",Bd="trigger-press",gi="trigger-hover",sR="trigger-focus",R_="outside-press",rO="item-press",Z8="close-press",xS="focus-out",S_="escape-key",sO="list-navigation",eK="cancel-open",tK="disabled",RG="imperative-action",nK="window-resize";function Gt(e,t,n,r){let s=!1,o=!1;const l=Sr;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...l}}const SG=D.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new bi,currentIdRef:{current:null},currentContextRef:{current:null}});function rK(e){const{children:t,delay:n,timeoutMs:r=0}=e,s=D.useRef(n),o=D.useRef(n),l=D.useRef(null),c=D.useRef(null),E=ns();return v.jsx(SG.Provider,{value:D.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:o,currentIdRef:l,timeoutMs:r,currentContextRef:c,timeout:E}),[r,E]),children:t})}function sK(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:s}=t,o=D.useContext(SG),{currentIdRef:l,delayRef:c,timeoutMs:E,initialDelayRef:f,currentContextRef:h,hasProvider:d,timeout:p}=o,[S,R]=D.useState(!1);return Je(()=>{function m(){var g;R(!1),(g=h.current)==null||g.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current}if(l.current&&!s&&l.current===r){if(R(!1),E){const g=r;return p.start(E,()=>{n.select("open")||l.current&&l.current!==g||m()}),()=>{p.clear()}}m()}},[s,r,l,c,E,f,h,p,n]),Je(()=>{if(!s)return;const m=h.current,g=l.current;p.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:R},l.current=r,c.current={open:0,close:Td(f.current,"close")},g!==null&&g!==r?(R(!0),m==null||m.setIsInstantPhase(!0),m==null||m.onOpenChange(!1,Gt(LE))):(R(!1),m==null||m.setIsInstantPhase(!1))},[s,r,n,l,c,E,f,h,p]),Je(()=>()=>{h.current=null},[h]),D.useMemo(()=>({hasProvider:d,delayRef:c,isInstantPhase:S}),[d,c,S])}const KR=D.forwardRef(function(t,n){const[r,s]=D.useState();Je(()=>{qw&&s("button")},[]);const o={tabIndex:0,role:r};return v.jsx("span",{...t,ref:n,style:s_,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});function Fd(e){return`data-base-ui-${e}`}let FD=0;function hd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(FD);const o=()=>e==null?void 0:e.focus({preventScroll:n});s?o():FD=requestAnimationFrame(o)}const iO={inert:new WeakMap,"aria-hidden":new WeakMap},HD="data-base-ui-inert",LN={inert:new WeakSet,"aria-hidden":new WeakSet};let zf=new WeakMap,oO=0;function iK(e){return LN[e]}function mG(e){return e?xd(e)?e.host:mG(e.parentNode):null}const aO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=mG(n);return e.contains(r)?r:null}).filter(n=>n!=null),VD=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},kD=(e,t,n)=>{const r=[],s=o=>{!o||n.has(o)||Array.from(o.children).forEach(l=>{Rl(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function oK(e,t,n,r,{mark:s=!0,markerIgnoreElements:o=[]}){const l=r?"inert":n?"aria-hidden":null;let c=null,E=null;const f=aO(t,e),h=s?aO(t,o):[],d=new Set(h),p=s?kD(t,VD(f),new Set(f)).filter(m=>!d.has(m)):[],S=[],R=[];if(l){const m=iO[l],g=iK(l);E=g,c=m;const I=aO(t,Array.from(t.querySelectorAll("[aria-live]"))),C=f.concat(I);kD(t,VD(C),new Set(C)).forEach(N=>{const y=N.getAttribute(l),_=y!==null&&y!=="false",M=(m.get(N)||0)+1;m.set(N,M),S.push(N),M===1&&_&&g.add(N),_||N.setAttribute(l,l==="inert"?"":"true")})}return s&&p.forEach(m=>{const g=(zf.get(m)||0)+1;zf.set(m,g),R.push(m),g===1&&m.setAttribute(HD,"")}),oO+=1,()=>{c&&S.forEach(m=>{const I=(c.get(m)||0)-1;c.set(m,I),I||(!(E!=null&&E.has(m))&&l&&m.removeAttribute(l),E==null||E.delete(m))}),s&&R.forEach(m=>{const g=(zf.get(m)||0)-1;zf.set(m,g),g||m.removeAttribute(HD)}),oO-=1,oO||(iO.inert=new WeakMap,iO["aria-hidden"]=new WeakMap,LN.inert=new WeakSet,LN["aria-hidden"]=new WeakSet,zf=new WeakMap)}}function YD(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0,markerIgnoreElements:o=[]}=t,l=an(e[0]).body;return oK(e,l,n,r,{mark:s,markerIgnoreElements:o})}const aK={...lC};let WD=0;function lK(e,t="mui"){const[n,r]=D.useState(e),s=e||n;return D.useEffect(()=>{n==null&&(WD+=1,r(`${t}-${WD}`))},[n,t]),s}const jD=aK.useId;function uT(e,t){if(jD!==void 0){const n=jD();return e??(t?`${t}-${n}`:n)}return lK(e,t)}function XD(e){if(!D.isValidElement(e))return null;const t=e,n=t.props;return(o_(19)?n==null?void 0:n.ref:t.ref)??null}function yN(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function cK(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function uK(e,t){return typeof e=="function"?e(t):e}function EK(e,t){return typeof e=="function"?e(t):e}const pd={};function ET(e,t,n,r,s){let o={...bN(e,pd)};return t&&(o=rd(o,t)),n&&(o=rd(o,n)),r&&(o=rd(o,r)),s&&(o=rd(o,s)),o}function fK(e){if(e.length===0)return pd;if(e.length===1)return bN(e[0],pd);let t={...bN(e[0],pd)};for(let n=1;n<e.length;n+=1)t=rd(t,e[n]);return t}function rd(e,t){return AG(t)?t(e):dK(e,t)}function dK(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=yN(e.style,r);break}case"className":{e[n]=gG(e.className,r);break}default:TK(n,r)?e[n]=hK(e[n],r):e[n]=r}}return e}function TK(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function AG(e){return typeof e=="function"}function bN(e,t){return AG(e)?e(t):e??pd}function hK(e,t){return t?e?n=>{if(pK(n)){const s=n;PN(s);const o=t(s);return s.baseUIHandlerPrevented||e==null||e(s),o}const r=t(n);return e==null||e(n),r}:t:e}function PN(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function gG(e,t){return t?e?t+" "+e:t:e}function pK(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Xn(e,t,n={}){const r=t.render,s=RK(t,n);if(n.enabled===!1)return null;const o=n.state??Sr;return mK(e,r,s,o)}function RK(e,t={}){const{className:n,style:r,render:s}=e,{state:o=Sr,ref:l,props:c,stateAttributesMapping:E,enabled:f=!0}=t,h=f?uK(n,o):void 0,d=f?EK(r,o):void 0,p=f?cK(o,E):Sr,S=f?yN(p,Array.isArray(c)?fK(c):c)??Sr:Sr;return typeof document<"u"&&(f?Array.isArray(l)?S.ref=_$([S.ref,XD(s),...l]):S.ref=Pc(S.ref,XD(s),l):Pc(null,null)),f?(h!==void 0&&(S.className=gG(S.className,h)),d!==void 0&&(S.style=yN(S.style,d)),S):Sr}const SK=Symbol.for("react.lazy");function mK(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=ET(n,t.props);s.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===SK&&(o=D.Children.toArray(t)[0]),D.cloneElement(o,s)}if(e&&typeof e=="string")return AK(e,n);throw new Error(vr(8))}function AK(e,t){return e==="button"?D.createElement("button",{type:"button",...t,key:t.key}):e==="img"?D.createElement("img",{alt:"",...t,key:t.key}):D.createElement(e,t)}const OG=D.createContext(null),IG=()=>D.useContext(OG),gK=Fd("portal");function NG(e={}){const{ref:t,container:n,componentProps:r=Sr,elementProps:s}=e,o=uT(),l=IG(),c=l==null?void 0:l.portalNode,[E,f]=D.useState(null),[h,d]=D.useState(null),p=at(g=>{g!==null&&d(g)}),S=D.useRef(null);Je(()=>{if(n===null){S.current&&(S.current=null,d(null),f(null));return}if(o==null)return;const g=(n&&(c_(n)?n:n.current))??c??document.body;if(g==null){S.current&&(S.current=null,d(null),f(null));return}S.current!==g&&(S.current=g,d(null),f(g))},[n,c,o]);const R=Xn("div",r,{ref:[t,p],props:[{id:o,[gK]:""},s]});return{portalNode:h,portalSubtree:E&&R?zi.createPortal(R,E):null}}const CG=D.forwardRef(function(t,n){const{children:r,container:s,className:o,render:l,renderGuards:c,...E}=t,{portalNode:f,portalSubtree:h}=NG({container:s,ref:n,componentProps:t,elementProps:E}),d=D.useRef(null),p=D.useRef(null),S=D.useRef(null),R=D.useRef(null),[m,g]=D.useState(null),I=m==null?void 0:m.modal,C=m==null?void 0:m.open,L=typeof c=="boolean"?c:!!m&&!m.modal&&m.open&&!!f;D.useEffect(()=>{if(!f||I)return;function y(_){f&&_.relatedTarget&&dd(_)&&(_.type==="focusin"?GD:$8)(f)}return f.addEventListener("focusin",y,!0),f.addEventListener("focusout",y,!0),()=>{f.removeEventListener("focusin",y,!0),f.removeEventListener("focusout",y,!0)}},[f,I]),D.useEffect(()=>{!f||C||GD(f)},[C,f]);const N=D.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:p,beforeInsideRef:S,afterInsideRef:R,portalNode:f,setFocusManagerState:g}),[f]);return v.jsxs(D.Fragment,{children:[h,v.jsxs(OG.Provider,{value:N,children:[L&&f&&v.jsx(KR,{"data-type":"outside",ref:d,onFocus:y=>{var _;if(dd(y,f))(_=S.current)==null||_.focus();else{const M=m?m.domReference:null,w=TG(M);w==null||w.focus()}}}),L&&f&&v.jsx("span",{"aria-owns":f.id,style:Q8}),f&&zi.createPortal(r,f),L&&f&&v.jsx(KR,{"data-type":"outside",ref:p,onFocus:y=>{var _;if(dd(y,f))(_=R.current)==null||_.focus();else{const M=m?m.domReference:null,w=dG(M);w==null||w.focus(),m!=null&&m.closeOnFocusOut&&(m==null||m.onOpenChange(!1,Gt(xS,y.nativeEvent)))}}})]})]})});function OK(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const IK=D.createContext(null),NK=D.createContext(null),fT=()=>{var e;return((e=D.useContext(IK))==null?void 0:e.id)||null},yE=e=>{const t=D.useContext(NK);return e??t};function Io(e){return e==null?e:"current"in e?e.current:e}function CK(e,t){const n=wn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const $D=20;let Ja=[];function m_(){Ja=Ja.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function _K(e){m_(),e&&Rl(e)!=="body"&&(Ja.push(new WeakRef(e)),Ja.length>$D&&(Ja=Ja.slice(-$D)))}function lO(){var e;return m_(),(e=Ja[Ja.length-1])==null?void 0:e.deref()}function LK(e){if(!e)return null;const t=cT();return EG(e,t)?e:MS(e,t)[0]||e}function yK(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():p_(e)}function KD(e,t){var l;if(!t.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const n=cT(),s=X8(e,n).filter(c=>{const E=c.getAttribute("data-tabindex")||"";return EG(c,n)||c.hasAttribute("data-tabindex")&&!E.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function _G(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:o=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:E=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:d,beforeContentFocusGuardRef:p,externalTree:S,getInsideElements:R}=e,m="rootStore"in t?t.rootStore:t,g=m.useState("open"),I=m.useState("domReferenceElement"),C=m.useState("floatingElement"),{events:L,dataRef:N}=m.context,y=at(()=>{var Me;return(Me=N.current.floatingContext)==null?void 0:Me.nodeId}),_=s===!1,M=ON(I)&&_,w=D.useRef(["content"]),F=Rr(s),Y=Rr(o),$=Rr(f),W=yE(S),K=IG(),q=D.useRef(!1),j=D.useRef(!1),k=D.useRef(!1),z=D.useRef(-1),Z=D.useRef(""),ie=D.useRef(""),ne=D.useRef(null),B=D.useRef(null),Q=Pc(ne,p,K==null?void 0:K.beforeInsideRef),ue=Pc(B,K==null?void 0:K.afterInsideRef),le=ns(),he=ns(),se=LS(),fe=K!=null,ge=wd(C),Le=at((Me=ge)=>Me?MS(Me,cT()):[]),We=at(()=>(R==null?void 0:R().filter(Me=>Me!=null))??[]),He=at(Me=>{const Ue=Le(Me);return w.current.map(()=>Ue).filter(Boolean).flat()});D.useEffect(()=>{if(r||!c)return;function Me(Xe){Xe.key==="Tab"&&Nt(ge,ei(an(ge)))&&Le().length===0&&!M&&Ps(Xe)}const Ue=an(ge);return Ue.addEventListener("keydown",Me),()=>{Ue.removeEventListener("keydown",Me)}},[r,I,ge,c,w,M,Le,He]),D.useEffect(()=>{if(r||!g)return;const Me=an(ge);function Ue(){k.current=!1}function Xe(Be){const ke=Qr(Be),ve=We(),Ce=Nt(C,ke)||Nt(I,ke)||Nt(K==null?void 0:K.portalNode,ke)||ve.some(oe=>oe===ke||Nt(oe,ke));k.current=!Ce,ie.current=Be.pointerType||"keyboard",ke!=null&&ke.closest(`[${pG}]`)&&(j.current=!0)}function ct(){ie.current="keyboard"}return Me.addEventListener("pointerdown",Xe,!0),Me.addEventListener("pointerup",Ue,!0),Me.addEventListener("pointercancel",Ue,!0),Me.addEventListener("keydown",ct,!0),()=>{Me.removeEventListener("pointerdown",Xe,!0),Me.removeEventListener("pointerup",Ue,!0),Me.removeEventListener("pointercancel",Ue,!0),Me.removeEventListener("keydown",ct,!0)}},[r,C,I,ge,g,K,We]),D.useEffect(()=>{if(r||!E)return;const Me=an(ge);function Ue(){j.current=!0,he.start(0,()=>{j.current=!1})}function Xe(Ce){const oe=Qr(Ce),Pe=Le().indexOf(oe);Pe!==-1&&(z.current=Pe)}function ct(Ce){const oe=Ce.relatedTarget,Ie=Ce.currentTarget,Pe=Qr(Ce);queueMicrotask(()=>{const xe=y(),Ze=m.context.triggerElements,Et=We(),Xt=(oe==null?void 0:oe.hasAttribute(Fd("focus-guard")))&&[ne.current,B.current,K==null?void 0:K.beforeInsideRef.current,K==null?void 0:K.afterInsideRef.current,K==null?void 0:K.beforeOutsideRef.current,K==null?void 0:K.afterOutsideRef.current,Io(d),Io(h)].includes(oe),Ut=!(Nt(I,oe)||Nt(C,oe)||Nt(oe,C)||Nt(K==null?void 0:K.portalNode,oe)||Et.some(ft=>ft===oe||Nt(ft,oe))||oe!=null&&Ze.hasElement(oe)||Ze.hasMatchingElement(ft=>Nt(ft,oe))||Xt||W&&(Go(W.nodesRef.current,xe).find(ft=>{var Dt,ht;return Nt((Dt=ft.context)==null?void 0:Dt.elements.floating,oe)||Nt((ht=ft.context)==null?void 0:ht.elements.domReference,oe)})||vD(W.nodesRef.current,xe).find(ft=>{var Dt,ht,ln;return[(Dt=ft.context)==null?void 0:Dt.elements.floating,wd((ht=ft.context)==null?void 0:ht.elements.floating)].includes(oe)||((ln=ft.context)==null?void 0:ln.elements.domReference)===oe})));if(Ie===I&&ge&&KD(ge,w),l&&Ie!==I&&!yK(Pe)&&ei(Me)===Me.body){if(jn(ge)&&(ge.focus(),l==="popup")){se.request(()=>{ge.focus()});return}const ft=z.current,Dt=Le(),ht=Dt[ft]||Dt[Dt.length-1]||ge;jn(ht)&&ht.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(M||!c)&&oe&&Ut&&!j.current&&(M||oe!==lO())&&(q.current=!0,m.setOpen(!1,Gt(xS,Ce)))})}function Be(){k.current||(N.current.insideReactTree=!0,le.start(0,()=>{N.current.insideReactTree=!1}))}const ke=jn(I)?I:null,ve=[];if(!(!C&&!ke))return ke&&(ke.addEventListener("focusout",ct),ke.addEventListener("pointerdown",Ue),ve.push(()=>{ke.removeEventListener("focusout",ct),ke.removeEventListener("pointerdown",Ue)})),C&&(C.addEventListener("focusin",Xe),C.addEventListener("focusout",ct),K&&(C.addEventListener("focusout",Be,!0),ve.push(()=>{C.removeEventListener("focusout",Be,!0)})),ve.push(()=>{C.removeEventListener("focusin",Xe),C.removeEventListener("focusout",ct)})),()=>{ve.forEach(Ce=>{Ce()})}},[r,I,C,ge,c,W,K,m,E,l,Le,M,y,w,N,le,he,se,h,d,We]),D.useEffect(()=>{var oe,Ie,Pe;if(r||!C||!g)return;const Me=Array.from(((oe=K==null?void 0:K.portalNode)==null?void 0:oe.querySelectorAll(`[${Fd("portal")}]`))||[]),Xe=(Pe=(Ie=(W?vD(W.nodesRef.current,y()):[]).find(xe=>{var Ze;return ON(((Ze=xe.context)==null?void 0:Ze.elements.domReference)||null)}))==null?void 0:Ie.context)==null?void 0:Pe.elements.domReference,Be=[...[C,...Me,ne.current,B.current,K==null?void 0:K.beforeOutsideRef.current,K==null?void 0:K.afterOutsideRef.current,...We()],Xe,Io(d),Io(h),M?I:null].filter(xe=>xe!=null),ke=YD(Be,{ariaHidden:c||M,mark:!1}),ve=[C,...Me].filter(xe=>xe!=null),Ce=YD(ve);return()=>{Ce(),ke()}},[g,r,I,C,c,w,K,M,W,y,h,d,We]),Je(()=>{if(!g||r||!jn(ge))return;const Me=an(ge),Ue=ei(Me);queueMicrotask(()=>{const Xe=He(ge),ct=F.current,Be=typeof ct=="function"?ct($.current||""):ct;if(Be===void 0||Be===!1)return;let ke;Be===!0||Be===null?ke=Xe[0]||ge:ke=Io(Be),ke=ke||Xe[0]||ge,!Nt(ge,Ue)&&hd(ke,{preventScroll:ke===ge})})},[r,g,ge,_,He,F,$]),Je(()=>{if(r||!ge)return;const Me=an(ge),Ue=ei(Me);_K(Ue);function Xe(Be){if(Be.open||(Z.current=CK(Be.nativeEvent,ie.current)),Be.reason===gi&&Be.nativeEvent.type==="mouseleave"&&(q.current=!0),Be.reason===R_)if(Be.nested)q.current=!1;else if(tG(Be.nativeEvent)||nG(Be.nativeEvent))q.current=!1;else{let ke=!1;document.createElement("div").focus({get preventScroll(){return ke=!0,!1}}),ke?q.current=!1:q.current=!0}}L.on("openchange",Xe);function ct(){const Be=Y.current;let ke=typeof Be=="function"?Be(Z.current):Be;if(ke===void 0||ke===!1)return null;if(ke===null&&(ke=!0),typeof ke=="boolean"){const Ce=I||lO();return Ce&&Ce.isConnected?Ce:null}const ve=I||lO();return Io(ke)||ve||null}return()=>{L.off("openchange",Xe);const Be=ei(Me),ke=We(),ve=Nt(C,Be)||ke.some(oe=>oe===Be||Nt(oe,Be))||W&&Go(W.nodesRef.current,y(),!1).some(oe=>{var Ie;return Nt((Ie=oe.context)==null?void 0:Ie.elements.floating,Be)}),Ce=ct();queueMicrotask(()=>{const oe=LK(Ce),Ie=typeof Y.current!="boolean";Y.current&&!q.current&&jn(oe)&&(!(!Ie&&oe!==Be&&Be!==Me.body)||ve)&&oe.focus({preventScroll:!0}),q.current=!1})}},[r,C,ge,Y,N,L,W,I,y,We]),Je(()=>{if(!E_||g||!C)return;const Me=ei(an(C));!jn(Me)||!vS(Me)||Nt(C,Me)&&Me.blur()},[g,C]),Je(()=>{if(!(r||!K))return K.setFocusManagerState({modal:c,closeOnFocusOut:E,open:g,onOpenChange:m.setOpen,domReference:I}),()=>{K.setFocusManagerState(null)}},[r,K,c,g,m,E,I]),Je(()=>{if(!(r||!ge))return KD(ge,w),()=>{queueMicrotask(m_)}},[r,ge,w]);const ot=!r&&(c?!M:!0)&&(fe||c);return v.jsxs(D.Fragment,{children:[ot&&v.jsx(KR,{"data-type":"inside",ref:Q,onFocus:Me=>{var Ue;if(c){const Xe=He();hd(Xe[Xe.length-1])}else if(K!=null&&K.portalNode)if(q.current=!1,dd(Me,K.portalNode)){const Xe=dG(I);Xe==null||Xe.focus()}else(Ue=Io(d??K.beforeOutsideRef))==null||Ue.focus()}}),n,ot&&v.jsx(KR,{"data-type":"inside",ref:ue,onFocus:Me=>{var Ue;if(c)hd(He()[0]);else if(K!=null&&K.portalNode)if(E&&(q.current=!0),dd(Me,K.portalNode)){const Xe=TG(I);Xe==null||Xe.focus()}else(Ue=Io(h??K.afterOutsideRef))==null||Ue.focus()}})]})}function LG(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:s=!0,event:o="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:E=!0,touchOpenDelay:f=0,reason:h=Bd}=t,d=D.useRef(void 0),p=LS(),S=ns(),R=D.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){const g=d.current,I=m.nativeEvent,C=n.select("open");if(m.button!==0||o==="click"||RE(g,!0)&&c)return;const L=r.current.openEvent,N=L==null?void 0:L.type,y=n.select("domReferenceElement")!==m.currentTarget,_=C&&y||!(C&&l&&(!(L&&E)||N==="click"||N==="mousedown"));if(vS(I.target)){const w=Gt(h,I,I.target);_&&g==="touch"&&f>0?S.start(f,()=>{n.setOpen(!0,w)}):n.setOpen(_,w);return}const M=m.currentTarget;p.request(()=>{const w=Gt(h,I,M);_&&g==="touch"&&f>0?S.start(f,()=>{n.setOpen(!0,w)}):n.setOpen(_,w)})},onClick(m){if(o==="mousedown-only")return;const g=d.current;if(o==="mousedown"&&g){d.current=void 0;return}if(RE(g,!0)&&c)return;const I=n.select("open"),C=r.current.openEvent,L=n.select("domReferenceElement")!==m.currentTarget,N=I&&L||!(I&&l&&(!(C&&E)||rG(C))),y=Gt(h,m.nativeEvent,m.currentTarget);N&&g==="touch"&&f>0?S.start(f,()=>{n.setOpen(!0,y)}):n.setOpen(N,y)},onKeyDown(){d.current=void 0}}),[r,o,c,n,E,l,p,S,f,h]);return D.useMemo(()=>s?{reference:R}:Sr,[s,R])}function bK(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){var S;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",E=["mouseenter","mousemove"].includes(((S=t.dataRef.current.openEvent)==null?void 0:S.type)||"")&&t.pointerType!=="touch";let f=o.width,h=o.height,d=o.x,p=o.y;return n==null&&t.x&&l&&(n=o.x-t.x),r==null&&t.y&&c&&(r=o.y-t.y),d-=n||0,p-=r||0,f=0,h=0,!s||E?(f=t.axis==="y"?o.width:0,h=t.axis==="x"?o.height:0,d=l&&t.x!=null?t.x:d,p=c&&t.y!=null?t.y:p):s&&!E&&(h=t.axis==="x"?o.height:h,f=t.axis==="y"?o.width:f),s=!0,{width:f,height:h,x:d,y:p,top:p,right:d+f,bottom:p+h,left:d}}}}function zD(e){return e!=null&&e.clientX!=null}function PK(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),o=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:c=!0,axis:E="both"}=t,f=D.useRef(!1),h=D.useRef(null),[d,p]=D.useState(),[S,R]=D.useState([]),m=at((N,y,_)=>{f.current||l.current.openEvent&&!zD(l.current.openEvent)||n.set("positionReference",bK(_??o,{x:N,y,axis:E,dataRef:l,pointerType:d}))}),g=at(N=>{r?h.current||R([]):m(N.clientX,N.clientY,N.currentTarget)}),I=RE(d)?s:r,C=D.useCallback(()=>{if(!I||!c)return;const N=wn(s);function y(_){const M=Qr(_);Nt(s,M)?(N.removeEventListener("mousemove",y),h.current=null):m(_.clientX,_.clientY)}if(!l.current.openEvent||zD(l.current.openEvent)){N.addEventListener("mousemove",y);const _=()=>{N.removeEventListener("mousemove",y),h.current=null};return h.current=_,_}n.set("positionReference",o)},[I,c,s,l,o,n,m]);D.useEffect(()=>C(),[C,S]),D.useEffect(()=>{c&&!s&&(f.current=!1)},[c,s]),D.useEffect(()=>{!c&&r&&(f.current=!0)},[c,r]);const L=D.useMemo(()=>{function N(y){p(y.pointerType)}return{onPointerDown:N,onPointerEnter:N,onMouseMove:g,onMouseEnter:g}},[g]);return D.useMemo(()=>c?{reference:L,trigger:L}:{},[c,L])}const DK={intentional:"onClick",sloppy:"onPointerDown"};function vK(){return!1}function MK(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function A_(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),{dataRef:o}=n.context,{enabled:l=!0,escapeKey:c=!0,outsidePress:E=!0,outsidePressEvent:f="sloppy",referencePress:h=vK,referencePressEvent:d="sloppy",bubbles:p,externalTree:S}=t,R=yE(S),m=at(typeof E=="function"?E:()=>!1),g=typeof E=="function"?m:E,I=g!==!1,C=at(()=>f),L=D.useRef(!1),N=D.useRef(!1),y=D.useRef(!1),{escapeKey:_,outsidePress:M}=MK(p),w=D.useRef(null),F=ns(),Y=ns(),$=at(()=>{Y.clear(),o.current.insideReactTree=!1}),W=D.useRef(!1),K=D.useRef(""),q=at(h),j=at(B=>{var se;if(!r||!l||!c||B.key!=="Escape"||W.current)return;const Q=(se=o.current.floatingContext)==null?void 0:se.nodeId,ue=R?Go(R.nodesRef.current,Q):[];if(!_&&ue.length>0){let fe=!0;if(ue.forEach(ge=>{var Le;(Le=ge.context)!=null&&Le.open&&!ge.context.dataRef.current.__escapeKeyBubbles&&(fe=!1)}),!fe)return}const le=S8(B)?B.nativeEvent:B,he=Gt(S_,le);n.setOpen(!1,he),!_&&!he.isPropagationAllowed&&B.stopPropagation()}),k=at(()=>{o.current.insideReactTree=!0,Y.start(0,$)});D.useEffect(()=>{if(!r||!l)return;o.current.__escapeKeyBubbles=_,o.current.__outsidePressBubbles=M;const B=new bi,Q=new bi;function ue(){B.clear(),W.current=!0}function le(){B.start(PS()?5:0,()=>{W.current=!1})}function he(){y.current=!0,Q.start(0,()=>{y.current=!1})}function se(){L.current=!1,N.current=!1}function fe(){const oe=K.current,Ie=oe==="pen"||!oe?"mouse":oe,Pe=C(),xe=typeof Pe=="function"?Pe():Pe;return typeof xe=="string"?xe:xe[Ie]}function ge(oe){const Ie=fe();return Ie==="intentional"&&oe.type!=="click"||Ie==="sloppy"&&oe.type==="click"}function Le(oe){var xe;const Ie=(xe=o.current.floatingContext)==null?void 0:xe.nodeId,Pe=R&&Go(R.nodesRef.current,Ie).some(Ze=>{var Et;return Ri(oe,(Et=Ze.context)==null?void 0:Et.elements.floating)});return Ri(oe,n.select("floatingElement"))||Ri(oe,n.select("domReferenceElement"))||Pe}function We(oe){var Dt;if(ge(oe)){$();return}if(o.current.insideReactTree){$();return}const Ie=Qr(oe),Pe=`[${Fd("inert")}]`;let xe=Array.from(an(n.select("floatingElement")).querySelectorAll(Pe));const Ze=nn(Ie)?Ie.getRootNode():null;xd(Ze)&&(xe=xe.concat(Array.from(Ze.querySelectorAll(Pe))));const Et=n.context.triggerElements;if(Ie&&(Et.hasElement(Ie)||Et.hasMatchingElement(ht=>Nt(ht,Ie))))return;let Xt=nn(Ie)?Ie:null;for(;Xt&&!wo(Xt);){const ht=Bo(Xt);if(wo(ht)||!nn(ht))break;Xt=ht}if(xe.length&&nn(Ie)&&!p8(Ie)&&!Nt(Ie,n.select("floatingElement"))&&xe.every(ht=>!Nt(Xt,ht)))return;if(jn(Ie)&&!("touches"in oe)){const ht=wo(Ie),ln=Ms(Ie),zt=/auto|scroll/,qt=ht||zt.test(ln.overflowX),In=ht||zt.test(ln.overflowY),$t=qt&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,Yt=In&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,cn=ln.direction==="rtl",gt=Yt&&(cn?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),Jt=$t&&oe.offsetY>Ie.clientHeight;if(gt||Jt)return}if(Le(oe))return;if(fe()==="intentional"&&y.current){Q.clear(),y.current=!1;return}if(typeof g=="function"&&!g(oe))return;const Ut=(Dt=o.current.floatingContext)==null?void 0:Dt.nodeId,ft=R?Go(R.nodesRef.current,Ut):[];if(ft.length>0){let ht=!0;if(ft.forEach(ln=>{var zt;(zt=ln.context)!=null&&zt.open&&!ln.context.dataRef.current.__outsidePressBubbles&&(ht=!1)}),!ht)return}n.setOpen(!1,Gt(R_,oe)),$()}function He(oe){fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!l||Ri(oe,n.select("floatingElement"))||Ri(oe,n.select("domReferenceElement"))||We(oe)}function ot(oe){if(fe()!=="sloppy"||!n.select("open")||!l||Ri(oe,n.select("floatingElement"))||Ri(oe,n.select("domReferenceElement")))return;const Ie=oe.touches[0];Ie&&(w.current={startTime:Date.now(),startX:Ie.clientX,startY:Ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{w.current&&(w.current.dismissOnTouchEnd=!1,w.current.dismissOnMouseDown=!1)}))}function Me(oe){K.current="touch";const Ie=Qr(oe);function Pe(){ot(oe),Ie==null||Ie.removeEventListener(oe.type,Pe)}Ie==null||Ie.addEventListener(oe.type,Pe)}function Ue(oe){if(F.clear(),oe.type==="pointerdown"&&(K.current=oe.pointerType),oe.type==="mousedown"&&w.current&&!w.current.dismissOnMouseDown)return;const Ie=Qr(oe);function Pe(){oe.type==="pointerdown"?He(oe):We(oe),Ie==null||Ie.removeEventListener(oe.type,Pe)}Ie==null||Ie.addEventListener(oe.type,Pe)}function Xe(oe){if(!L.current)return;const Ie=N.current;if(se(),fe()==="intentional"){if(oe.type==="pointercancel"){Ie&&he();return}if(!Le(oe)){if(Ie){he();return}typeof g=="function"&&!g(oe)||(Q.clear(),y.current=!0,$())}}}function ct(oe){if(fe()!=="sloppy"||!w.current||Ri(oe,n.select("floatingElement"))||Ri(oe,n.select("domReferenceElement")))return;const Ie=oe.touches[0];if(!Ie)return;const Pe=Math.abs(Ie.clientX-w.current.startX),xe=Math.abs(Ie.clientY-w.current.startY),Ze=Math.sqrt(Pe*Pe+xe*xe);Ze>5&&(w.current.dismissOnTouchEnd=!0),Ze>10&&(We(oe),F.clear(),w.current=null)}function Be(oe){const Ie=Qr(oe);function Pe(){ct(oe),Ie==null||Ie.removeEventListener(oe.type,Pe)}Ie==null||Ie.addEventListener(oe.type,Pe)}function ke(oe){fe()!=="sloppy"||!w.current||Ri(oe,n.select("floatingElement"))||Ri(oe,n.select("domReferenceElement"))||(w.current.dismissOnTouchEnd&&We(oe),F.clear(),w.current=null)}function ve(oe){const Ie=Qr(oe);function Pe(){ke(oe),Ie==null||Ie.removeEventListener(oe.type,Pe)}Ie==null||Ie.addEventListener(oe.type,Pe)}const Ce=an(s);return c&&(Ce.addEventListener("keydown",j),Ce.addEventListener("compositionstart",ue),Ce.addEventListener("compositionend",le)),I&&(Ce.addEventListener("click",Ue,!0),Ce.addEventListener("pointerdown",Ue,!0),Ce.addEventListener("pointerup",Xe,!0),Ce.addEventListener("pointercancel",Xe,!0),Ce.addEventListener("mousedown",Ue,!0),Ce.addEventListener("mouseup",Xe,!0),Ce.addEventListener("touchstart",Me,!0),Ce.addEventListener("touchmove",Be,!0),Ce.addEventListener("touchend",ve,!0)),()=>{c&&(Ce.removeEventListener("keydown",j),Ce.removeEventListener("compositionstart",ue),Ce.removeEventListener("compositionend",le)),I&&(Ce.removeEventListener("click",Ue,!0),Ce.removeEventListener("pointerdown",Ue,!0),Ce.removeEventListener("pointerup",Xe,!0),Ce.removeEventListener("pointercancel",Xe,!0),Ce.removeEventListener("mousedown",Ue,!0),Ce.removeEventListener("mouseup",Xe,!0),Ce.removeEventListener("touchstart",Me,!0),Ce.removeEventListener("touchmove",Be,!0),Ce.removeEventListener("touchend",ve,!0)),B.clear(),Q.clear(),se(),y.current=!1}},[o,s,c,I,g,r,l,_,M,j,$,C,R,n,F]),D.useEffect($,[g,$]);const z=D.useMemo(()=>({onKeyDown:j,[DK[d]]:B=>{q()&&n.setOpen(!1,Gt(Bd,B.nativeEvent))},...d!=="intentional"&&{onClick(B){q()&&n.setOpen(!1,Gt(Bd,B.nativeEvent))}}}),[j,n,d,q]),Z=at(B=>{if(!r||!l||B.button!==0)return;const Q=Qr(B.nativeEvent);Nt(n.select("floatingElement"),Q)&&(L.current||(L.current=!0,N.current=!1))}),ie=at(B=>{!r||!l||(B.defaultPrevented||B.nativeEvent.defaultPrevented)&&L.current&&(N.current=!0)}),ne=D.useMemo(()=>({onKeyDown:j,onPointerDown:ie,onMouseDown:ie,onClickCapture:k,onMouseDownCapture(B){k(),Z(B)},onPointerDownCapture(B){k(),Z(B)},onMouseUpCapture:k,onTouchEndCapture:k,onTouchMoveCapture:k}),[j,k,Z,ie]);return D.useMemo(()=>l?{reference:z,floating:ne,trigger:z}:{},[l,z,ne])}function qD(e,t,n){let{reference:r,floating:s}=e;const o=si(t),l=h_(t),c=T_(l),E=Rs(t),f=o==="y",h=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,p=r[c]/2-s[c]/2;let S;switch(E){case"top":S={x:h,y:r.y-s.height};break;case"bottom":S={x:h,y:r.y+r.height};break;case"right":S={x:r.x+r.width,y:d};break;case"left":S={x:r.x-s.width,y:d};break;default:S={x:r.x,y:r.y}}switch(ml(t)){case"start":S[l]-=p*(n&&f?-1:1);break;case"end":S[l]+=p*(n&&f?-1:1);break}return S}async function xK(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:c,strategy:E}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:S=0}=Fo(t,e),R=sG(S),g=c[p?d==="floating"?"reference":"floating":d],I=Gd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:E})),C=d==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),N=await(o.isElement==null?void 0:o.isElement(L))?await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1}:{x:1,y:1},y=Gd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:L,strategy:E}):C);return{top:(I.top-y.top+R.top)/N.y,bottom:(y.bottom-I.bottom+R.bottom)/N.y,left:(I.left-y.left+R.left)/N.x,right:(y.right-I.right+R.right)/N.x}}const UK=50,wK=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:xK},E=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:d}=qD(f,r,E),p=r,S=0;const R={};for(let m=0;m<o.length;m++){const g=o[m];if(!g)continue;const{name:I,fn:C}=g,{x:L,y:N,data:y,reset:_}=await C({x:h,y:d,initialPlacement:r,placement:p,strategy:s,middlewareData:R,rects:f,platform:c,elements:{reference:e,floating:t}});h=L??h,d=N??d,R[I]={...R[I],...y},_&&S<UK&&(S++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(f=_.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:h,y:d}=qD(f,p,E)),m=-1)}return{x:h,y:d,placement:p,strategy:s,middlewareData:R}},GK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:c,platform:E,elements:f}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:m=!0,...g}=Fo(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const I=Rs(s),C=si(c),L=Rs(c)===c,N=await(E.isRTL==null?void 0:E.isRTL(f.floating)),y=p||(L||!m?[kR(c)]:O8(c)),_=R!=="none";!p&&_&&y.push(..._8(c,m,R,N));const M=[c,...y],w=await E.detectOverflow(t,g),F=[];let Y=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&F.push(w[I]),d){const q=g8(s,l,N);F.push(w[q[0]],w[q[1]])}if(Y=[...Y,{placement:s,overflows:F}],!F.every(q=>q<=0)){var $,W;const q=((($=o.flip)==null?void 0:$.index)||0)+1,j=M[q];if(j&&(!(d==="alignment"?C!==si(j):!1)||Y.every(Z=>si(Z.placement)===C?Z.overflows[0]>0:!0)))return{data:{index:q,overflows:Y},reset:{placement:j}};let k=(W=Y.filter(z=>z.overflows[0]<=0).sort((z,Z)=>z.overflows[1]-Z.overflows[1])[0])==null?void 0:W.placement;if(!k)switch(S){case"bestFit":{var K;const z=(K=Y.filter(Z=>{if(_){const ie=si(Z.placement);return ie===C||ie==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ie=>ie>0).reduce((ie,ne)=>ie+ne,0)]).sort((Z,ie)=>Z[1]-ie[1])[0])==null?void 0:K[0];z&&(k=z);break}case"initialPlacement":k=c;break}if(s!==k)return{reset:{placement:k}}}return{}}}};function JD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QD(e){return m8.some(t=>e[t]>=0)}const BK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=Fo(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=JD(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:QD(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=JD(l,n.floating);return{data:{escapedOffsets:c,escaped:QD(c)}}}default:return{}}}}},yG=new Set(["left","top"]);async function FK(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Rs(n),c=ml(n),E=si(n)==="y",f=yG.has(l)?-1:1,h=o&&E?-1:1,d=Fo(t,e);let{mainAxis:p,crossAxis:S,alignmentAxis:R}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof R=="number"&&(S=c==="end"?R*-1:R),E?{x:S*h,y:p*f}:{x:p*f,y:S*h}}const HK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:c}=t,E=await FK(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+E.x,y:o+E.y,data:{...E,placement:l}}}}},VK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:E={fn:I=>{let{x:C,y:L}=I;return{x:C,y:L}}},...f}=Fo(e,t),h={x:n,y:r},d=await o.detectOverflow(t,f),p=si(Rs(s)),S=d_(p);let R=h[S],m=h[p];if(l){const I=S==="y"?"top":"left",C=S==="y"?"bottom":"right",L=R+d[I],N=R-d[C];R=IN(L,R,N)}if(c){const I=p==="y"?"top":"left",C=p==="y"?"bottom":"right",L=m+d[I],N=m-d[C];m=IN(L,m,N)}const g=E.fn({...t,[S]:R,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[S]:l,[p]:c}}}}}},kK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:E=!0,crossAxis:f=!0}=Fo(e,t),h={x:n,y:r},d=si(s),p=d_(d);let S=h[p],R=h[d];const m=Fo(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(E){const L=p==="y"?"height":"width",N=o.reference[p]-o.floating[L]+g.mainAxis,y=o.reference[p]+o.reference[L]-g.mainAxis;S<N?S=N:S>y&&(S=y)}if(f){var I,C;const L=p==="y"?"width":"height",N=yG.has(Rs(s)),y=o.reference[d]-o.floating[L]+(N&&((I=l.offset)==null?void 0:I[d])||0)+(N?0:g.crossAxis),_=o.reference[d]+o.reference[L]+(N?0:((C=l.offset)==null?void 0:C[d])||0)-(N?g.crossAxis:0);R<y?R=y:R>_&&(R=_)}return{[p]:S,[d]:R}}}},YK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:c}=t,{apply:E=()=>{},...f}=Fo(e,t),h=await l.detectOverflow(t,f),d=Rs(s),p=ml(s),S=si(s)==="y",{width:R,height:m}=o.floating;let g,I;d==="top"||d==="bottom"?(g=d,I=p===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(I=d,g=p==="end"?"top":"bottom");const C=m-h.top-h.bottom,L=R-h.left-h.right,N=SE(m-h[g],C),y=SE(R-h[I],L),_=!t.middlewareData.shift;let M=N,w=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=L),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=C),_&&!p){const Y=Ds(h.left,0),$=Ds(h.right,0),W=Ds(h.top,0),K=Ds(h.bottom,0);S?w=R-2*(Y!==0||$!==0?Y+$:Ds(h.left,h.right)):M=m-2*(W!==0||K!==0?W+K:Ds(h.top,h.bottom))}await E({...t,availableWidth:w,availableHeight:M});const F=await l.getDimensions(c.floating);return R!==F.width||m!==F.height?{reset:{rects:!0}}:{}}}};function bG(e){const t=Ms(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=jn(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=VR(n)!==o||VR(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function g_(e){return nn(e)?e:e.contextElement}function qu(e){const t=g_(e);if(!jn(t))return Xi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=bG(t);let l=(o?VR(n.width):n.width)/r,c=(o?VR(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const WK=Xi(0);function PG(e){const t=wn(e);return!PS()||!t.visualViewport?WK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wn(e)?!1:t}function Dc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=g_(e);let l=Xi(1);t&&(r?nn(r)&&(l=qu(r)):l=qu(e));const c=jK(o,n,r)?PG(o):Xi(0);let E=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,d=s.height/l.y;if(o){const p=wn(o),S=r&&nn(r)?wn(r):r;let R=p,m=mN(R);for(;m&&r&&S!==R;){const g=qu(m),I=m.getBoundingClientRect(),C=Ms(m),L=I.left+(m.clientLeft+parseFloat(C.paddingLeft))*g.x,N=I.top+(m.clientTop+parseFloat(C.paddingTop))*g.y;E*=g.x,f*=g.y,h*=g.x,d*=g.y,E+=L,f+=N,R=wn(m),m=mN(R)}}return Gd({width:h,height:d,x:E,y:f})}function US(e,t){const n=DS(e).scrollLeft;return t?t.left+n:Dc(qi(e)).left+n}function DG(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-US(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function XK(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=qi(r),c=t?bS(t.floating):!1;if(r===l||c&&o)return n;let E={scrollLeft:0,scrollTop:0},f=Xi(1);const h=Xi(0),d=jn(r);if((d||!d&&!o)&&((Rl(r)!=="body"||Sl(l))&&(E=DS(r)),d)){const S=Dc(r);f=qu(r),h.x=S.x+r.clientLeft,h.y=S.y+r.clientTop}const p=l&&!d&&!o?DG(l,E):Xi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-E.scrollLeft*f.x+h.x+p.x,y:n.y*f.y-E.scrollTop*f.y+h.y+p.y}}function $K(e){return Array.from(e.getClientRects())}function KK(e){const t=qi(e),n=DS(e),r=e.ownerDocument.body,s=Ds(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ds(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+US(e);const c=-n.scrollTop;return Ms(r).direction==="rtl"&&(l+=Ds(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:c}}const ZD=25;function zK(e,t){const n=wn(e),r=qi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,E=0;if(s){o=s.width,l=s.height;const h=PS();(!h||h&&t==="fixed")&&(c=s.offsetLeft,E=s.offsetTop)}const f=US(r);if(f<=0){const h=r.ownerDocument,d=h.body,p=getComputedStyle(d),S=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,R=Math.abs(r.clientWidth-d.clientWidth-S);R<=ZD&&(o-=R)}else f<=ZD&&(o+=f);return{width:o,height:l,x:c,y:E}}function qK(e,t){const n=Dc(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=jn(e)?qu(e):Xi(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,E=s*o.x,f=r*o.y;return{width:l,height:c,x:E,y:f}}function ev(e,t,n){let r;if(t==="viewport")r=zK(e,n);else if(t==="document")r=KK(qi(e));else if(nn(t))r=qK(t,n);else{const s=PG(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Gd(r)}function vG(e,t){const n=Bo(e);return n===t||!nn(n)||wo(n)?!1:Ms(n).position==="fixed"||vG(n,t)}function JK(e,t){const n=t.get(e);if(n)return n;let r=Ud(e,[],!1).filter(c=>nn(c)&&Rl(c)!=="body"),s=null;const o=Ms(e).position==="fixed";let l=o?Bo(e):e;for(;nn(l)&&!wo(l);){const c=Ms(l),E=u_(l);!E&&c.position==="fixed"&&(s=null),(o?!E&&!s:!E&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Sl(l)&&!E&&vG(e,l))?r=r.filter(h=>h!==l):s=c,l=Bo(l)}return t.set(e,r),r}function QK(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?bS(t)?[]:JK(t,this._c):[].concat(n),r],c=ev(t,l[0],s);let E=c.top,f=c.right,h=c.bottom,d=c.left;for(let p=1;p<l.length;p++){const S=ev(t,l[p],s);E=Ds(S.top,E),f=SE(S.right,f),h=SE(S.bottom,h),d=Ds(S.left,d)}return{width:f-d,height:h-E,x:d,y:E}}function ZK(e){const{width:t,height:n}=bG(e);return{width:t,height:n}}function ez(e,t,n){const r=jn(t),s=qi(t),o=n==="fixed",l=Dc(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const E=Xi(0);function f(){E.x=US(s)}if(r||!r&&!o)if((Rl(t)!=="body"||Sl(s))&&(c=DS(t)),r){const S=Dc(t,!0,o,t);E.x=S.x+t.clientLeft,E.y=S.y+t.clientTop}else s&&f();o&&!r&&s&&f();const h=s&&!r&&!o?DG(s,c):Xi(0),d=l.left+c.scrollLeft-E.x-h.x,p=l.top+c.scrollTop-E.y-h.y;return{x:d,y:p,width:l.width,height:l.height}}function cO(e){return Ms(e).position==="static"}function tv(e,t){if(!jn(e)||Ms(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qi(e)===n&&(n=n.ownerDocument.body),n}function MG(e,t){const n=wn(e);if(bS(e))return n;if(!jn(e)){let s=Bo(e);for(;s&&!wo(s);){if(nn(s)&&!cO(s))return s;s=Bo(s)}return n}let r=tv(e,t);for(;r&&l8(r)&&cO(r);)r=tv(r,t);return r&&wo(r)&&cO(r)&&!u_(r)?n:r||E8(e)||n}const tz=async function(e){const t=this.getOffsetParent||MG,n=this.getDimensions,r=await n(e.floating);return{reference:ez(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nz(e){return Ms(e).direction==="rtl"}const xG={convertOffsetParentRelativeRectToViewportRelativeRect:XK,getDocumentElement:qi,getClippingRect:QK,getOffsetParent:MG,getElementRects:tz,getClientRects:$K,getDimensions:ZK,getScale:qu,isElement:nn,isRTL:nz};function UG(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rz(e,t){let n=null,r;const s=qi(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,E){c===void 0&&(c=!1),E===void 0&&(E=1),o();const f=e.getBoundingClientRect(),{left:h,top:d,width:p,height:S}=f;if(c||t(),!p||!S)return;const R=oc(d),m=oc(s.clientWidth-(h+p)),g=oc(s.clientHeight-(d+S)),I=oc(h),L={rootMargin:-R+"px "+-m+"px "+-g+"px "+-I+"px",threshold:Ds(0,SE(1,E))||1};let N=!0;function y(_){const M=_[0].intersectionRatio;if(M!==E){if(!N)return l();M?l(!1,M):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!UG(f,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{n=new IntersectionObserver(y,L)}n.observe(e)}return l(!0),o}function nv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:E=!1}=r,f=g_(e),h=s||o?[...f?Ud(f):[],...t?Ud(t):[]]:[];h.forEach(I=>{s&&I.addEventListener("scroll",n,{passive:!0}),o&&I.addEventListener("resize",n)});const d=f&&c?rz(f,n):null;let p=-1,S=null;l&&(S=new ResizeObserver(I=>{let[C]=I;C&&C.target===f&&S&&t&&(S.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var L;(L=S)==null||L.observe(t)})),n()}),f&&!E&&S.observe(f),t&&S.observe(t));let R,m=E?Dc(e):null;E&&g();function g(){const I=Dc(e);m&&!UG(m,I)&&n(),m=I,R=requestAnimationFrame(g)}return n(),()=>{var I;h.forEach(C=>{s&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),d==null||d(),(I=S)==null||I.disconnect(),S=null,E&&cancelAnimationFrame(R)}}const sz=HK,iz=VK,oz=GK,az=YK,lz=BK,cz=kK,uz=(e,t,n)=>{const r=new Map,s={platform:xG,...n},o={...s.platform,_c:r};return wK(e,t,{...s,platform:o})};var Ez=typeof document<"u",fz=function(){},iR=Ez?D.useLayoutEffect:fz;function zR(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,s;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(!zR(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!zR(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function wG(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rv(e,t){const n=wG(e);return Math.round(t*n)/n}function uO(e){const t=D.useRef(e);return iR(()=>{t.current=e}),t}function dz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:E,open:f}=e,[h,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,S]=D.useState(r);zR(p,r)||S(r);const[R,m]=D.useState(null),[g,I]=D.useState(null),C=D.useCallback(Z=>{Z!==_.current&&(_.current=Z,m(Z))},[]),L=D.useCallback(Z=>{Z!==M.current&&(M.current=Z,I(Z))},[]),N=o||R,y=l||g,_=D.useRef(null),M=D.useRef(null),w=D.useRef(h),F=E!=null,Y=uO(E),$=uO(s),W=uO(f),K=D.useCallback(()=>{if(!_.current||!M.current)return;const Z={placement:t,strategy:n,middleware:p};$.current&&(Z.platform=$.current),uz(_.current,M.current,Z).then(ie=>{const ne={...ie,isPositioned:W.current!==!1};q.current&&!zR(w.current,ne)&&(w.current=ne,zi.flushSync(()=>{d(ne)}))})},[p,t,n,$,W]);iR(()=>{f===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(Z=>({...Z,isPositioned:!1})))},[f]);const q=D.useRef(!1);iR(()=>(q.current=!0,()=>{q.current=!1}),[]),iR(()=>{if(N&&(_.current=N),y&&(M.current=y),N&&y){if(Y.current)return Y.current(N,y,K);K()}},[N,y,K,Y,F]);const j=D.useMemo(()=>({reference:_,floating:M,setReference:C,setFloating:L}),[C,L]),k=D.useMemo(()=>({reference:N,floating:y}),[N,y]),z=D.useMemo(()=>{const Z={position:n,left:0,top:0};if(!k.floating)return Z;const ie=rv(k.floating,h.x),ne=rv(k.floating,h.y);return c?{...Z,transform:"translate("+ie+"px, "+ne+"px)",...wG(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ie,top:ne}},[n,c,k.floating,h.x,h.y]);return D.useMemo(()=>({...h,update:K,refs:j,elements:k,floatingStyles:z}),[h,K,j,k,z])}const Tz=(e,t)=>{const n=sz(e);return{name:n.name,fn:n.fn,options:[e,t]}},hz=(e,t)=>{const n=iz(e);return{name:n.name,fn:n.fn,options:[e,t]}},pz=(e,t)=>({fn:cz(e).fn,options:[e,t]}),Rz=(e,t)=>{const n=oz(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sz=(e,t)=>{const n=az(e);return{name:n.name,fn:n.fn,options:[e,t]}},mz=(e,t)=>{const n=lz(e);return{name:n.name,fn:n.fn,options:[e,t]}},Az={open:Qe(e=>e.open),domReferenceElement:Qe(e=>e.domReferenceElement),referenceElement:Qe(e=>e.positionReference??e.referenceElement),floatingElement:Qe(e=>e.floatingElement),floatingId:Qe(e=>e.floatingId)};class O_ extends a_{constructor(n){const{nested:r,noEmit:s,onOpenChange:o,triggerElements:l,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:OK(),nested:r,noEmit:s,triggerElements:l},Az);Te(this,"setOpen",(n,r)=>{var s,o;if((!n||!this.state.open||rG(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const l={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",l)}(o=(s=this.context).onOpenChange)==null||o.call(s,n,r)})}}function wS(e,t=!1,n=!1){const[r,s]=D.useState(e&&t?"idle":void 0),[o,l]=D.useState(e);return e&&!o&&(l(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),Je(()=>{if(!e&&o&&r!=="ending"&&n){const c=Wi.request(()=>{s("ending")});return()=>{Wi.cancel(c)}}},[e,o,r,n]),Je(()=>{if(!e||t)return;const c=Wi.request(()=>{s(void 0)});return()=>{Wi.cancel(c)}},[t,e]),Je(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const c=Wi.request(()=>{s("idle")});return()=>{Wi.cancel(c)}},[t,e,o,s,r]),D.useMemo(()=>({mounted:o,setMounted:l,transitionStatus:r}),[o,r])}let Hd=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const gz={[Hd.startingStyle]:""},Oz={[Hd.endingStyle]:""},bE={transitionStatus(e){return e==="starting"?gz:e==="ending"?Oz:null}};function Iz(e,t=!1,n=!0){const r=LS();return at((s,o=null)=>{r.cancel();function l(){zi.flushSync(s)}const c=Io(e);if(c==null)return;const E=c;if(typeof E.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let d=function(){const S=Hd.startingStyle;if(!E.hasAttribute(S)){r.request(p);return}const R=new MutationObserver(()=>{E.hasAttribute(S)||(R.disconnect(),p())});R.observe(E,{attributes:!0,attributeFilter:[S]}),o==null||o.addEventListener("abort",()=>R.disconnect(),{once:!0})},p=function(){Promise.all(E.getAnimations().map(S=>S.finished)).then(()=>{o!=null&&o.aborted||l()}).catch(()=>{const S=E.getAnimations();if(n){if(o!=null&&o.aborted)return;l()}else S.length>0&&S.some(R=>R.pending||R.playState!=="finished")&&p()})};var f=d,h=p;if(t){d();return}r.request(p)}})}function Gc(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,o=at(s),l=Iz(r,n,!1);D.useEffect(()=>{if(!t)return;const c=new AbortController;return l(o,c.signal),()=>{c.abort()}},[t,n,o,l])}function Nz(e,t){const n=D.useRef(null),r=D.useRef(null);return D.useCallback(s=>{if(e!==void 0){if(n.current!==null){const o=n.current,l=r.current,c=t.context.triggerElements.getById(o);l&&c===l&&t.context.triggerElements.delete(o),n.current=null,r.current=null}s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function GG(e,t,n,r){const s=n.useState("isMountedByTrigger",e),o=Nz(e,n),l=at(c=>{if(o(c),!c||!n.select("open"))return;const E=n.select("activeTriggerId");if(E===e){n.update({activeTriggerElement:c,...r});return}E==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Je(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function BG(e){const t=e.useState("open");Je(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,s]=n.value;e.update({activeTriggerId:r,activeTriggerElement:s})}}},[t,e])}function FG(e,t,n){const{mounted:r,setMounted:s,transitionStatus:o}=wS(e);t.useSyncedValues({mounted:r,transitionStatus:o});const l=at(()=>{var E,f;s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),(f=(E=t.context).onOpenChangeComplete)==null||f.call(E,!1)}),c=t.useState("preventUnmountingOnClose");return Gc({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}class GS{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Cz(){return new O_({open:!1,floatingElement:null,referenceElement:null,triggerElements:new GS,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function HG(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:Cz(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Sr,inactiveTriggerProps:Sr,popupProps:Sr}}const Ap=Qe(e=>e.triggerIdProp??e.activeTriggerId),VG={open:Qe(e=>e.openProp??e.open),mounted:Qe(e=>e.mounted),transitionStatus:Qe(e=>e.transitionStatus),floatingRootContext:Qe(e=>e.floatingRootContext),preventUnmountingOnClose:Qe(e=>e.preventUnmountingOnClose),payload:Qe(e=>e.payload),activeTriggerId:Ap,activeTriggerElement:Qe(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Qe((e,t)=>t!==void 0&&Ap(e)===t),isOpenedByTrigger:Qe((e,t)=>t!==void 0&&Ap(e)===t&&e.open),isMountedByTrigger:Qe((e,t)=>t!==void 0&&Ap(e)===t&&e.mounted),triggerProps:Qe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Qe(e=>e.popupProps),popupElement:Qe(e=>e.popupElement),positionerElement:Qe(e=>e.positionerElement)};function kG(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=uT(),o=fT()!=null,l=Dr(()=>new O_({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new GS,floatingId:s,nested:o,noEmit:!1})).current;return Je(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=nn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=o,l.context.noEmit=!1,l}function _z(e={}){const{nodeId:t,externalTree:n}=e,r=kG(e),s=e.rootContext||r,o={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[l,c]=D.useState(null),E=D.useRef(null),f=yE(n);Je(()=>{o.domReference&&(E.current=o.domReference)},[o.domReference]);const h=dz({...e,elements:{...o,...l&&{reference:l}}}),d=D.useCallback(M=>{const w=nn(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;c(w),h.refs.setReference(w)},[h.refs]),[p,S]=D.useState(null),[R,m]=D.useState(null);s.useSyncedValue("referenceElement",p),s.useSyncedValue("domReferenceElement",nn(p)?p:null),s.useSyncedValue("floatingElement",R);const g=D.useCallback(M=>{(nn(M)||M===null)&&(E.current=M,S(M)),(nn(h.refs.reference.current)||h.refs.reference.current===null||M!==null&&!nn(M))&&h.refs.setReference(M)},[h.refs,S]),I=D.useCallback(M=>{m(M),h.refs.setFloating(M)},[h.refs]),C=D.useMemo(()=>({...h.refs,setReference:g,setFloating:I,setPositionReference:d,domReference:E}),[h.refs,g,I,d]),L=D.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),N=s.useState("open"),y=s.useState("floatingId"),_=D.useMemo(()=>({...h,dataRef:s.context.dataRef,open:N,onOpenChange:s.setOpen,events:s.context.events,floatingId:y,refs:C,elements:L,nodeId:t,rootStore:s}),[h,C,L,t,s,N,y]);return Je(()=>{s.context.dataRef.current.floatingContext=_;const M=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);M&&(M.context=_)}),D.useMemo(()=>({...h,context:_,refs:C,elements:L,rootStore:s}),[h,C,L,_,s])}function YG(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:s}=e,o=uT(),l=fT()!=null,c=t.useState("open"),E=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,d=Dr(()=>new O_({open:c,referenceElement:E,floatingElement:f,triggerElements:h,onOpenChange:s,floatingId:o,nested:l,noEmit:n})).current;return Je(()=>{const p={open:c,floatingId:o,referenceElement:E,floatingElement:f};nn(E)&&(p.domReferenceElement=E),d.state.positionReference===d.state.referenceElement&&(p.positionReference=E),d.update(p)},[c,o,E,f,d]),d.context.onOpenChange=s,d.context.nested=l,d.context.noEmit=n,d}const EO=f8&&qw;function Lz(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:s}=n.context,{enabled:o=!0,delay:l}=t,c=D.useRef(!1),E=D.useRef(null),f=ns(),h=D.useRef(!0);D.useEffect(()=>{const p=n.select("domReferenceElement");if(!o)return;const S=wn(p);function R(){const I=n.select("domReferenceElement");!n.select("open")&&jn(I)&&I===ei(an(I))&&(c.current=!0)}function m(){h.current=!0}function g(){h.current=!1}return S.addEventListener("blur",R),EO&&(S.addEventListener("keydown",m,!0),S.addEventListener("pointerdown",g,!0)),()=>{S.removeEventListener("blur",R),EO&&(S.removeEventListener("keydown",m,!0),S.removeEventListener("pointerdown",g,!0))}},[n,o]),D.useEffect(()=>{if(!o)return;function p(S){if(S.reason===Bd||S.reason===S_){const R=n.select("domReferenceElement");nn(R)&&(E.current=R,c.current=!0)}}return r.on("openchange",p),()=>{r.off("openchange",p)}},[r,o,n]);const d=D.useMemo(()=>({onMouseLeave(){c.current=!1,E.current=null},onFocus(p){const S=p.currentTarget;if(c.current){if(E.current===S)return;c.current=!1,E.current=null}const R=Qr(p.nativeEvent);if(nn(R)){if(EO&&!p.relatedTarget){if(!h.current&&!vS(R))return}else if(!R8(R))return}const m=HR(p.relatedTarget,n.context.triggerElements),{nativeEvent:g,currentTarget:I}=p,C=typeof l=="function"?l():l;if(n.select("open")&&m||C===0||C===void 0){n.setOpen(!0,Gt(sR,g,I));return}f.start(C,()=>{c.current||n.setOpen(!0,Gt(sR,g,I))})},onBlur(p){c.current=!1,E.current=null;const S=p.relatedTarget,R=p.nativeEvent,m=nn(S)&&S.hasAttribute(Fd("focus-guard"))&&S.getAttribute("data-type")==="outside";f.start(0,()=>{var L;const g=n.select("domReferenceElement"),I=ei(g?g.ownerDocument:document);!S&&I===g||Nt((L=s.current.floatingContext)==null?void 0:L.refs.floating.current,I)||Nt(g,I)||m||HR(S??I,n.context.triggerElements)||n.setOpen(!1,Gt(sR,R))})}}),[s,n,f,l]);return D.useMemo(()=>o?{reference:d,trigger:d}:{},[o,d])}const yz=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${eG}`;function bz(e){return e?!!e.closest(yz):!1}class I_{constructor(){Te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new bi,this.restTimeout=new bi,this.handleCloseOptions=void 0}static create(){return new I_}}function N_(e){var t,n,r;e.performedPointerEventsMutation&&((t=e.pointerEventsScopeElement)==null||t.style.removeProperty("pointer-events"),(n=e.pointerEventsReferenceElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsFloatingElement)==null||r.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function Pz(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t;N_(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function WG(e){const t=Dr(I_.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),l_(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Dz(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:c=!0,closeDelay:E=0}=t,f=WG(n),h=yE(),d=fT(),p=at(()=>{var L;return hG((L=l.current.openEvent)==null?void 0:L.type,f.interactedInside)}),S=at(()=>{var N;const L=(N=l.current.openEvent)==null?void 0:N.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"}),R=at(L=>HR(L,n.context.triggerElements)),m=D.useCallback(L=>{const N=Td(E,"close",f.pointerType),y=()=>{n.setOpen(!1,Gt(gi,L)),h==null||h.events.emit("floating.closed",L)};N?f.openChangeTimeout.start(N,y):(f.openChangeTimeout.clear(),y())},[E,n,f,h]),g=at(()=>{N_(f)}),I=at(L=>{const N=Qr(L);if(!bz(N)){f.interactedInside=!1;return}f.interactedInside=(N==null?void 0:N.closest("[aria-haspopup]"))!=null});Je(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[r,f,g]),D.useEffect(()=>g,[g]),Je(()=>{var L,N,y,_,M;if(c&&r&&(L=f.handleCloseOptions)!=null&&L.blockPointerEvents&&S()&&nn(o)&&s){const w=o,F=s,Y=an(s),$=(y=(N=h==null?void 0:h.nodesRef.current.find(K=>K.id===d))==null?void 0:N.context)==null?void 0:y.elements.floating;$&&($.style.pointerEvents="");const W=((M=(_=f.handleCloseOptions)==null?void 0:_.getScope)==null?void 0:M.call(_))??f.pointerEventsScopeElement??$??w.closest("[data-rootownerid]")??Y.body;return Pz(f,{scopeElement:W,referenceElement:w,floatingElement:F}),()=>{g()}}},[c,r,o,s,f,S,h,d,g]);const C=ns();D.useEffect(()=>{if(!c)return;function L(){f.openChangeTimeout.clear(),C.clear(),h==null||h.events.off("floating.closed",y),g()}function N(M){if(h&&d&&Go(h.nodesRef.current,d).length>0){h.events.on("floating.closed",y);return}if(!R(M.relatedTarget)){if(f.handler){f.handler(M);return}g(),p()||m(M)}}function y(M){!h||!d||Go(h.nodesRef.current,d).length>0||C.start(0,()=>{h.events.off("floating.closed",y),n.setOpen(!1,Gt(gi,M)),h.events.emit("floating.closed",M)})}const _=s;return _&&(_.addEventListener("mouseenter",L),_.addEventListener("mouseleave",N),_.addEventListener("pointerdown",I,!0)),()=>{_&&(_.removeEventListener("mouseenter",L),_.removeEventListener("mouseleave",N),_.removeEventListener("pointerdown",I,!0)),h==null||h.events.off("floating.closed",y)}},[c,s,n,l,p,R,m,g,I,f,h,d,C])}const vz={current:null};function Mz(e,t={}){var $;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:s}=n.context,{enabled:o=!0,delay:l=0,handleClose:c=null,mouseOnly:E=!1,restMs:f=0,move:h=!0,triggerElementRef:d=vz,externalTree:p,isActiveTrigger:S=!0,getHandleCloseContext:R}=t,m=yE(p),g=WG(n),I=Rr(c),C=Rr(l),L=Rr(f),N=Rr(o);S&&(g.handleCloseOptions=($=I.current)==null?void 0:$.__options);const y=at(()=>{var W;return hG((W=r.current.openEvent)==null?void 0:W.type,g.interactedInside)}),_=at(W=>HR(W,n.context.triggerElements)),M=at((W,K,q)=>{const j=n.context.triggerElements;if(j.hasElement(K))return!W||!Nt(W,K);if(!nn(q))return!1;const k=q;return j.hasMatchingElement(z=>Nt(z,k))&&(!W||!Nt(W,k))}),w=D.useCallback((W,K=!0)=>{const q=Td(C.current,"close",g.pointerType);q?g.openChangeTimeout.start(q,()=>{n.setOpen(!1,Gt(gi,W)),m==null||m.events.emit("floating.closed",W)}):K&&(g.openChangeTimeout.clear(),n.setOpen(!1,Gt(gi,W)),m==null||m.events.emit("floating.closed",W))},[C,n,g,m]),F=at(()=>{if(!g.handler)return;an(n.select("domReferenceElement")).removeEventListener("mousemove",g.handler),g.handler=void 0});D.useEffect(()=>F,[F]);const Y=at(()=>{N_(g)});return D.useEffect(()=>{if(!o)return;function W(K){K.open||(F(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return s.on("openchange",W),()=>{s.off("openchange",W)}},[o,s,g,F]),D.useEffect(()=>{if(!o)return;const W=d.current??(S?n.select("domReferenceElement"):null);if(!nn(W))return;function K(j){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,E&&!RE(g.pointerType)||BD(L.current)>0&&!Td(C.current,"open"))return;const z=Td(C.current,"open",g.pointerType),Z=j.currentTarget??null,ie=n.select("domReferenceElement"),ne=Z==null?!1:M(ie,Z,j.target),B=n.select("open"),Q=!B||ne;ne&&B?n.setOpen(!0,Gt(gi,j,Z)):z?g.openChangeTimeout.start(z,()=>{Q&&n.setOpen(!0,Gt(gi,j,Z))}):Q&&n.setOpen(!0,Gt(gi,j,Z))}function q(j){if(y()){Y();return}F();const k=n.select("domReferenceElement"),z=an(k);g.restTimeout.clear(),g.restTimeoutPending=!1;const Z=r.current.floatingContext??(R==null?void 0:R());if(_(j.relatedTarget))return;if(I.current&&Z){n.select("open")||g.openChangeTimeout.clear();const B=d.current;g.handler=I.current({...Z,tree:m,x:j.clientX,y:j.clientY,onClose(){Y(),F(),N.current&&!y()&&B===n.select("domReferenceElement")&&w(j,!0)}}),z.addEventListener("mousemove",g.handler),g.handler(j);return}(g.pointerType==="touch"?!Nt(n.select("floatingElement"),j.relatedTarget):!0)&&w(j)}return h&&W.addEventListener("mousemove",K,{once:!0}),W.addEventListener("mouseenter",K),W.addEventListener("mouseleave",q),()=>{h&&W.removeEventListener("mousemove",K),W.removeEventListener("mouseenter",K),W.removeEventListener("mouseleave",q)}},[F,Y,r,C,w,n,o,I,g,S,M,y,_,E,h,L,d,m,N,R]),D.useMemo(()=>{if(!o)return;function W(K){g.pointerType=K.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(K){const{nativeEvent:q}=K,j=K.currentTarget,k=n.select("domReferenceElement"),z=n.select("open"),Z=M(k,j,K.target);if(E&&!RE(g.pointerType))return;const ie=BD(L.current);if(z&&!Z||ie===0||!Z&&g.restTimeoutPending&&K.movementX**2+K.movementY**2<2)return;g.restTimeout.clear();function ne(){if(g.restTimeoutPending=!1,y())return;const B=n.select("open");!g.blockMouseMove&&(!B||Z)&&n.setOpen(!0,Gt(gi,q,j))}g.pointerType==="touch"?zi.flushSync(()=>{ne()}):Z&&z?ne():(g.restTimeoutPending=!0,g.restTimeout.start(ie,ne))}}},[o,g,y,M,E,n,L])}function BS(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),s=e.map(f=>f==null?void 0:f.trigger),o=D.useCallback(f=>gp(f,e,"reference"),t),l=D.useCallback(f=>gp(f,e,"floating"),n),c=D.useCallback(f=>gp(f,e,"item"),r),E=D.useCallback(f=>gp(f,e,"trigger"),s);return D.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:c,getTriggerProps:E}),[o,l,c,E])}function gp(e,t,n){var l;const r=new Map,s=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[gN]="");for(const c in e)s&&e&&(c===Qw||c===Zw)||(o[c]=e[c]);for(let c=0;c<t.length;c+=1){let E;const f=(l=t[c])==null?void 0:l[n];typeof f=="function"?E=e?f(e):null:E=f,E&&sv(o,E,s,r)}return sv(o,e,s,r),o}function sv(e,t,n,r){var s;for(const o in t){const l=t[o];n&&(o===Qw||o===Zw)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof l=="function"&&((s=r.get(o))==null||s.push(l),e[o]=(...c)=>{var E;return(E=r.get(o))==null?void 0:E.map(f=>f(...c)).find(f=>f!==void 0)})):e[o]=l)}}const xz="Escape";function FS(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Op(e,t){return FS(t,e===f_||e===lT,e===nl||e===rl)}function fO(e,t,n){return FS(t,e===lT,n?e===nl:e===rl)||e==="Enter"||e===" "||e===""}function Uz(e,t,n){return FS(t,n?e===nl:e===rl,e===lT)}function wz(e,t,n,r){const s=n?e===rl:e===nl,o=e===f_;return t==="both"||t==="horizontal"&&r&&r>1?e===xz:FS(t,s,o)}function Gz(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingElement"),o=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:E,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:d=null,allowEscape:p=!1,loopFocus:S=!1,nested:R=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:I="auto",focusItemOnHover:C=!0,openOnArrowKeyDown:L=!0,disabledIndices:N=void 0,orientation:y="vertical",parentOrientation:_,cols:M=1,id:w,resetOnPointerLeave:F=!0,externalTree:Y}=t,$=wd(s),W=Rr($),K=fT(),q=yE(Y);Je(()=>{l.current.orientation=y},[l,y]);const j=ON(o),k=D.useRef(I),z=D.useRef(d??-1),Z=D.useRef(null),ie=D.useRef(!0),ne=at(ve=>{f(z.current===-1?null:z.current,ve)}),B=D.useRef(ne),Q=D.useRef(!!s),ue=D.useRef(r),le=D.useRef(!1),he=D.useRef(!1),se=Rr(N),fe=Rr(r),ge=Rr(d),Le=Rr(F),We=at(()=>{function ve(Pe){g?q==null||q.events.emit("virtualfocus",Pe):hd(Pe,{sync:le.current,preventScroll:!0})}const Ce=c.current[z.current],oe=he.current;Ce&&ve(Ce),(le.current?Pe=>Pe():requestAnimationFrame)(()=>{var Ze;const Pe=c.current[z.current]||Ce;if(!Pe)return;Ce||ve(Pe),ot&&(oe||!ie.current)&&((Ze=Pe.scrollIntoView)==null||Ze.call(Pe,{block:"nearest",inline:"nearest"}))})});Je(()=>{h&&(r&&s?(z.current=d??-1,k.current&&d!=null&&(he.current=!0,ne())):Q.current&&(z.current=-1,B.current()))},[h,r,s,d,ne]),Je(()=>{if(h){if(!r){le.current=!1;return}if(s)if(E==null){if(le.current=!1,ge.current!=null)return;if(Q.current&&(z.current=-1,We()),(!ue.current||!Q.current)&&k.current&&(Z.current!=null||k.current===!0&&Z.current==null)){let ve=0;const Ce=()=>{c.current[0]==null?(ve<2&&(ve?requestAnimationFrame:queueMicrotask)(Ce),ve+=1):(z.current=Z.current==null||fO(Z.current,y,m)||R?nO(c):UD(c),Z.current=null,ne())};Ce()}}else YR(c,E)||(z.current=E,We(),he.current=!1)}},[h,r,s,E,ge,R,c,y,m,ne,We,se]),Je(()=>{var Pe,xe;if(!h||s||!q||g||!Q.current)return;const ve=q.nodesRef.current,Ce=(xe=(Pe=ve.find(Ze=>Ze.id===K))==null?void 0:Pe.context)==null?void 0:xe.elements.floating,oe=ei(an(s)),Ie=ve.some(Ze=>Ze.context&&Nt(Ze.context.elements.floating,oe));Ce&&!Ie&&ie.current&&Ce.focus({preventScroll:!0})},[h,s,q,K,g]),Je(()=>{B.current=ne,ue.current=r,Q.current=!!s}),Je(()=>{r||(Z.current=null,k.current=I)},[r,I]);const He=E!=null,ot=D.useMemo(()=>{function ve(oe){if(!fe.current)return;const Ie=c.current.indexOf(oe.currentTarget);Ie!==-1&&z.current!==Ie&&(z.current=Ie,ne(oe))}return{onFocus(oe){le.current=!0,ve(oe)},onClick:({currentTarget:oe})=>oe.focus({preventScroll:!0}),onMouseMove(oe){le.current=!0,he.current=!1,C&&ve(oe)},onPointerLeave(oe){if(!fe.current||!ie.current||oe.pointerType==="touch")return;le.current=!0;const Ie=oe.relatedTarget;if(!(!C||c.current.includes(Ie))&&Le.current&&(hd(null,{sync:!0}),z.current=-1,ne(oe),!g)){const Pe=W.current,xe=ei(an(Pe));Pe&&Nt(Pe,xe)&&Pe.focus({preventScroll:!0})}}}},[fe,W,C,c,ne,Le,g]),Me=D.useCallback(()=>{var ve,Ce,oe;return _??((oe=(Ce=(ve=q==null?void 0:q.nodesRef.current.find(Ie=>Ie.id===K))==null?void 0:ve.context)==null?void 0:Ce.dataRef)==null?void 0:oe.current.orientation)},[K,q,_]),Ue=at(ve=>{if(ie.current=!1,le.current=!0,ve.which===229||!fe.current&&ve.currentTarget===W.current)return;if(R&&wz(ve.key,y,m,M)){Op(ve.key,Me())||Ps(ve),n.setOpen(!1,Gt(sO,ve.nativeEvent)),jn(o)&&(g?q==null||q.events.emit("virtualfocus",o):o.focus());return}const Ce=z.current,oe=nO(c,N),Ie=UD(c,N);if(j||(ve.key==="Home"&&(Ps(ve),z.current=oe,ne(ve)),ve.key==="End"&&(Ps(ve),z.current=Ie,ne(ve))),M>1){const Pe=Array.from({length:c.current.length},()=>({width:1,height:1})),xe=b8(Pe,M),Ze=xe.findIndex(Ut=>Ut!=null&&!zu(c,Ut,N)),Et=xe.reduce((Ut,ft,Dt)=>ft!=null&&!zu(c,ft,N)?Dt:Ut,-1),Xt=xe[y8({current:xe.map(Ut=>Ut!=null?c.current[Ut]:null)},{event:ve,orientation:y,loopFocus:S,rtl:m,cols:M,disabledIndices:D8([...(typeof N!="function"?N:null)||c.current.map((Ut,ft)=>zu(c,ft,N)?ft:void 0),void 0],xe),minIndex:Ze,maxIndex:Et,prevIndex:P8(z.current>Ie?oe:z.current,Pe,xe,M,ve.key===lT?"bl":ve.key===(m?nl:rl)?"tr":"tl"),stopEvent:!0})];if(Xt!=null&&(z.current=Xt,ne(ve)),y==="both")return}if(Op(ve.key,y)){if(Ps(ve),r&&!g&&ei(ve.currentTarget.ownerDocument)===ve.currentTarget){z.current=fO(ve.key,y,m)?oe:Ie,ne(ve);return}fO(ve.key,y,m)?S?Ce>=Ie?p&&Ce!==c.current.length?z.current=-1:(le.current=!1,z.current=oe):z.current=Jr(c,{startingIndex:Ce,disabledIndices:N}):z.current=Math.min(Ie,Jr(c,{startingIndex:Ce,disabledIndices:N})):S?Ce<=oe?p&&Ce!==-1?z.current=c.current.length:(le.current=!1,z.current=Ie):z.current=Jr(c,{startingIndex:Ce,decrement:!0,disabledIndices:N}):z.current=Math.max(oe,Jr(c,{startingIndex:Ce,decrement:!0,disabledIndices:N})),YR(c,z.current)&&(z.current=-1),ne(ve)}}),Xe=D.useMemo(()=>g&&r&&He&&{"aria-activedescendant":`${w}-${E}`},[g,r,He,w,E]),ct=D.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...j?{}:Xe,onKeyDown(ve){if(ve.key==="Tab"&&ve.shiftKey&&r&&!g){const Ce=Qr(ve.nativeEvent);if(Ce&&!Nt(W.current,Ce))return;Ps(ve),n.setOpen(!1,Gt(xS,ve.nativeEvent)),jn(o)&&o.focus();return}Ue(ve)},onPointerMove(){ie.current=!0}}),[Xe,Ue,W,y,j,n,r,g,o]),Be=D.useMemo(()=>{function ve(oe){I==="auto"&&tG(oe.nativeEvent)&&(k.current=!g)}function Ce(oe){k.current=I,I==="auto"&&nG(oe.nativeEvent)&&(k.current=!0)}return{onKeyDown(oe){const Ie=n.select("open");ie.current=!1;const Pe=oe.key.startsWith("Arrow"),xe=Uz(oe.key,Me(),m),Ze=Op(oe.key,y),Et=(R?xe:Ze)||oe.key==="Enter"||oe.key.trim()==="";if(g&&Ie)return Ue(oe);if(!(!Ie&&!L&&Pe)){if(Et){const Xt=Op(oe.key,Me());Z.current=R&&Xt?null:oe.key}if(R){xe&&(Ps(oe),Ie?(z.current=nO(c,se.current),ne(oe)):n.setOpen(!0,Gt(sO,oe.nativeEvent,oe.currentTarget)));return}Ze&&(ge.current!=null&&(z.current=ge.current),Ps(oe),!Ie&&L?n.setOpen(!0,Gt(sO,oe.nativeEvent,oe.currentTarget)):Ue(oe),Ie&&ne(oe))}},onFocus(oe){n.select("open")&&!g&&(z.current=-1,ne(oe))},onPointerDown:Ce,onPointerEnter:Ce,onMouseDown:ve,onClick:ve}},[Ue,se,I,c,R,ne,n,L,y,Me,m,ge,g]),ke=D.useMemo(()=>({...Xe,...Be}),[Xe,Be]);return D.useMemo(()=>h?{reference:ke,floating:ct,item:ot,trigger:Be}:{},[h,ke,ct,Be,ot])}const Bz=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fz(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),s=n.useState("floatingId"),o=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{role:c="dialog"}=t,E=uT(),f=(o==null?void 0:o.id)||E,h=D.useMemo(()=>{var C;return((C=wd(l))==null?void 0:C.id)||s},[l,s]),d=Bz.get(c)??c,S=fT()!=null,R=D.useMemo(()=>d==="tooltip"||c==="label"?Sr:{"aria-haspopup":d==="alertdialog"?"dialog":d,"aria-expanded":"false",...d==="listbox"&&{role:"combobox"},...d==="menu"&&S&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[d,S,c]),m=D.useMemo(()=>d==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...R,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...d==="menu"&&{id:f}},[d,h,r,f,c,R]),g=D.useMemo(()=>{const C={id:h,...d&&{role:d}};return d==="tooltip"||c==="label"?C:{...C,...d==="menu"&&{"aria-labelledby":f}}},[d,h,f,c]),I=D.useCallback(({active:C,selected:L})=>{const N={role:"option",...C&&{id:`${h}-fui-option`}};switch(c){case"select":case"combobox":return{...N,"aria-selected":L}}return{}},[h,c]);return D.useMemo(()=>({reference:m,floating:g,item:I,trigger:R}),[m,g,R,I])}function Hz(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,s=n.useState("open"),{listRef:o,elementsRef:l,activeIndex:c,onMatch:E,onTypingChange:f,enabled:h=!0,resetMs:d=750,selectedIndex:p=null}=t,S=ns(),R=D.useRef(""),m=D.useRef(p??c??-1),g=D.useRef(null);Je(()=>{!s&&p!==null||(S.clear(),g.current=null,R.current!==""&&(R.current=""))},[s,p,S]),Je(()=>{s&&R.current===""&&(m.current=p??c??-1)},[s,p,c]);const I=at(_=>{_?r.current.typing||(r.current.typing=_,f==null||f(_)):r.current.typing&&(r.current.typing=_,f==null||f(_))}),C=at(_=>{function M(j){const k=l==null?void 0:l.current[j];return!k||p_(k)}function w(j,k,z=0){if(j.length===0)return-1;const Z=(z%j.length+j.length)%j.length,ie=k.toLocaleLowerCase();for(let ne=0;ne<j.length;ne+=1){const B=(Z+ne)%j.length,Q=j[B];if(!(!(Q!=null&&Q.toLocaleLowerCase().startsWith(ie))||!M(B)))return B}return-1}const F=o.current;if(R.current.length>0&&_.key===" "&&(Ps(_),I(!0)),R.current.length>0&&R.current[0]!==" "&&w(F,R.current)===-1&&_.key!==" "&&I(!1),F==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;s&&_.key!==" "&&(Ps(_),I(!0));const Y=R.current==="";Y&&(m.current=p??c??-1),F.every(j=>{var k,z;return j?((k=j[0])==null?void 0:k.toLocaleLowerCase())!==((z=j[1])==null?void 0:z.toLocaleLowerCase()):!0})&&R.current===_.key&&(R.current="",m.current=g.current),R.current+=_.key,S.start(d,()=>{R.current="",m.current=g.current,I(!1)});const K=((Y?p??c??-1:m.current)??0)+1,q=w(F,R.current,K);q!==-1?(E==null||E(q),g.current=q):_.key!==" "&&(R.current="",I(!1))}),L=at(_=>{const M=_.relatedTarget,w=n.select("domReferenceElement"),F=n.select("floatingElement"),Y=Nt(w,M),$=Nt(F,M);Y||$||(S.clear(),R.current="",m.current=g.current,I(!1))}),N=D.useMemo(()=>({onKeyDown:C,onBlur:L}),[C,L]),y=D.useMemo(()=>({onKeyDown:C,onBlur:L}),[C,L]);return D.useMemo(()=>h?{reference:N,floating:y}:{},[h,N,y])}const iv=.1,Vz=iv*iv,Tn=.5;function Ip(e,t,n,r,s,o){return r>=t!=o>=t&&e<=(s-n)*(t-r)/(o-r)+n}function Np(e,t,n,r,s,o,l,c,E,f){let h=!1;return Ip(e,t,n,r,s,o)&&(h=!h),Ip(e,t,s,o,l,c)&&(h=!h),Ip(e,t,l,c,E,f)&&(h=!h),Ip(e,t,E,f,n,r)&&(h=!h),h}function kz(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Cp(e,t,n,r,s,o){const l=Math.min(n,s),c=Math.max(n,s),E=Math.min(r,o),f=Math.max(r,o);return e>=l&&e<=c&&t>=E&&t<=f}function Yz(e={}){const{blockPointerEvents:t=!1}=e,n=new bi,r=({x:s,y:o,placement:l,elements:c,onClose:E,nodeId:f,tree:h})=>{const d=l==null?void 0:l.split("-")[0];let p=!1,S=null,R=null,m=typeof performance<"u"?performance.now():0;function g(C,L){const N=performance.now(),y=N-m;if(S===null||R===null||y===0)return S=C,R=L,m=N,!1;const _=C-S,M=L-R,w=_*_+M*M,F=y*y*Vz;return S=C,R=L,m=N,w<F}function I(){n.clear(),E()}return function(L){n.clear();const N=c.domReference,y=c.floating;if(!N||!y||d==null||s==null||o==null)return;const{clientX:_,clientY:M}=L,w=Qr(L),F=L.type==="mouseleave",Y=Nt(y,w),$=Nt(N,w);if(Y&&(p=!0,!F))return;if($&&(p=!1,!F)){p=!0;return}if(F&&nn(L.relatedTarget)&&Nt(y,L.relatedTarget))return;function W(){return!!(h&&Go(h.nodesRef.current,f).length>0)}function K(){W()||I()}if(W())return;const q=N.getBoundingClientRect(),j=y.getBoundingClientRect(),k=s>j.right-j.width/2,z=o>j.bottom-j.height/2,Z=j.width>q.width,ie=j.height>q.height,ne=(Z?q:j).left,B=(Z?q:j).right,Q=(ie?q:j).top,ue=(ie?q:j).bottom;if(d==="top"&&o>=q.bottom-1||d==="bottom"&&o<=q.top+1||d==="left"&&s>=q.right-1||d==="right"&&s<=q.left+1){K();return}let le=!1;switch(d){case"top":le=Cp(_,M,ne,q.top+1,B,j.bottom-1);break;case"bottom":le=Cp(_,M,ne,j.top+1,B,q.bottom-1);break;case"left":le=Cp(_,M,j.right-1,ue,q.left+1,Q);break;case"right":le=Cp(_,M,q.right-1,ue,j.left+1,Q);break}if(le)return;if(p&&!kz(_,M,q)){K();return}if(!F&&g(_,M)){K();return}let he=!1;switch(d){case"top":{const se=Z?Tn/2:Tn*4,fe=Z||k?s+se:s-se,ge=Z?s-se:k?s+se:s-se,Le=o+Tn+1,We=k||Z?j.bottom-Tn:j.top,He=k?Z?j.bottom-Tn:j.top:j.bottom-Tn;he=Np(_,M,fe,Le,ge,Le,j.left,We,j.right,He);break}case"bottom":{const se=Z?Tn/2:Tn*4,fe=Z||k?s+se:s-se,ge=Z?s-se:k?s+se:s-se,Le=o-Tn,We=k||Z?j.top+Tn:j.bottom,He=k?Z?j.top+Tn:j.bottom:j.top+Tn;he=Np(_,M,fe,Le,ge,Le,j.left,We,j.right,He);break}case"left":{const se=ie?Tn/2:Tn*4,fe=ie||z?o+se:o-se,ge=ie?o-se:z?o+se:o-se,Le=s+Tn+1,We=z||ie?j.right-Tn:j.left,He=z?ie?j.right-Tn:j.left:j.right-Tn;he=Np(_,M,We,j.top,He,j.bottom,Le,fe,Le,ge);break}case"right":{const se=ie?Tn/2:Tn*4,fe=ie||z?o+se:o-se,ge=ie?o-se:z?o+se:o-se,Le=s-Tn,We=z||ie?j.left+Tn:j.right,He=z?ie?j.left+Tn:j.right:j.left+Tn;he=Np(_,M,Le,fe,Le,ge,We,j.top,He,j.bottom);break}}he?p||n.start(40,K):K()}};return r.__options={blockPointerEvents:t},r}const jG=D.createContext(null),XG=D.createContext(null);function Ho(){const e=D.useContext(jG);if(e===null)throw new Error(vr(60));return e}function $G(){const e=D.useContext(XG);if(e===null)throw new Error(vr(61));return e}let ov=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Wz={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},sd={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},jz={disabled:!1,...sd},C_={valid(e){return e===null?null:e?{[ov.valid]:""}:{[ov.invalid]:""}}},Xz=D.createContext({invalid:void 0,name:void 0,validityData:{state:Wz,errors:[],error:"",value:"",initialValue:null},setValidityData:kr,disabled:void 0,touched:sd.touched,setTouched:kr,dirty:sd.dirty,setDirty:kr,filled:sd.filled,setFilled:kr,focused:sd.focused,setFocused:kr,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:jz,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Sr)=>e,getInputValidationProps:(e=Sr)=>e,inputRef:{current:null},commit:async()=>{}}});function HS(e=!0){const t=D.useContext(Xz);if(t.setValidityData===kr&&!e)throw new Error(vr(28));return t}function ul(e){return uT(e,"base-ui")}const $z=D.createContext({controlId:void 0,registerControlId:kr,labelId:void 0,setLabelId:kr,messageIds:[],setMessageIds:kr,getDescriptionProps:e=>e});function __(){return D.useContext($z)}function KG(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:o}=__(),l=ul(t),c=n?s:void 0,E=Dr(()=>Symbol("labelable-control")),f=D.useRef(!1),h=D.useRef(t!=null),d=at(()=>{!f.current||o===kr||(f.current=!1,o(E.current,void 0))});return Je(()=>{if(o===kr)return;let p;if(n){const S=r==null?void 0:r.current;nn(S)&&S.closest("label")!=null?p=t??null:p=c??l}else if(t!=null)h.current=!0,p=t;else if(h.current)p=l;else{d();return}if(p===void 0){d();return}f.current=!0,o(E.current,p)},[t,r,c,o,n,l,E,d]),D.useEffect(()=>d,[d]),s??l}const Kz=(e,t)=>Object.is(e,t);function AE(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function zz(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:AE(t,r,n))}function Rd(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:AE(r,t,n))}function qz(e,t,n){return e.filter(r=>!AE(t,r,n))}function DN(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function zG(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Jz(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(zG(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Qz(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return DN(e)}function Hu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?DN(e.value):DN(e)}function qG(e,t,n){function r(){return Qz(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const s=t,o=zG(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=o.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=o.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function Zz(e,t,n){return e.reduce((r,s,o)=>(o>0&&r.push(", "),r.push(v.jsx(D.Fragment,{children:qG(s,t,n)},o)),r),[])}const mt={id:Qe(e=>e.id),labelId:Qe(e=>e.labelId),modal:Qe(e=>e.modal),multiple:Qe(e=>e.multiple),items:Qe(e=>e.items),itemToStringLabel:Qe(e=>e.itemToStringLabel),itemToStringValue:Qe(e=>e.itemToStringValue),isItemEqualToValue:Qe(e=>e.isItemEqualToValue),value:Qe(e=>e.value),hasSelectedValue:Qe(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Hu(t,r)!==""}),hasNullItemLabel:Qe((e,t)=>t?Jz(e.items):!1),open:Qe(e=>e.open),mounted:Qe(e=>e.mounted),forceMount:Qe(e=>e.forceMount),transitionStatus:Qe(e=>e.transitionStatus),openMethod:Qe(e=>e.openMethod),activeIndex:Qe(e=>e.activeIndex),selectedIndex:Qe(e=>e.selectedIndex),isActive:Qe((e,t)=>e.activeIndex===t),isSelected:Qe((e,t,n)=>{const r=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(o=>AE(n,o,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:AE(n,s,r)}),isSelectedByFocus:Qe((e,t)=>e.selectedIndex===t),popupProps:Qe(e=>e.popupProps),triggerProps:Qe(e=>e.triggerProps),triggerElement:Qe(e=>e.triggerElement),positionerElement:Qe(e=>e.positionerElement),listElement:Qe(e=>e.listElement),scrollUpArrowVisible:Qe(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Qe(e=>e.scrollDownArrowVisible),hasScrollArrows:Qe(e=>e.hasScrollArrows)},e9=D.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:kr,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function L_(){return D.useContext(e9)}function t9(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function JG(e){const{enabled:t=!0,value:n,id:r,name:s,controlRef:o,commit:l}=e,{formRef:c}=L_(),{invalid:E,markedDirtyRef:f,validityData:h,setValidityData:d}=HS(),p=at(e.getValue);Je(()=>{if(!t)return;let S=n;S===void 0&&(S=p()),h.initialValue===null&&S!==null&&d(R=>({...R,initialValue:S}))},[t,d,n,h.initialValue,p]),Je(()=>{!t||!r||c.current.fields.set(r,{getValue:p,name:s,controlRef:o,validityData:t9(h,E),validate(S=!0){let R=n;R===void 0&&(R=p()),f.current=!0,S?zi.flushSync(()=>l(R)):l(R)}})},[l,o,t,c,p,r,E,f,s,h,n]),Je(()=>{const S=c.current.fields;return()=>{r&&S.delete(r)}},[c,r])}function y_(e,t){const n=D.useRef(e),r=at(t);Je(()=>{n.current!==e&&r(n.current)},[e,r]),Je(()=>{n.current=e},[e])}function n9(e){const t=D.useRef(""),n=D.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:D.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function QG(e){const[t,n]=D.useState(null),r=at((l,c)=>{e||n(c||(zw?"touch":""))});y_(e,l=>{l&&!e&&n(null)});const{onClick:s,onPointerDown:o}=n9(r);return D.useMemo(()=>({openMethod:t,triggerProps:{onClick:s,onPointerDown:o}}),[t,s,o])}function r9(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:o,defaultOpen:l=!1,onOpenChange:c,name:E,autoComplete:f,disabled:h=!1,readOnly:d=!1,required:p=!1,modal:S=!0,actionsRef:R,inputRef:m,onOpenChangeComplete:g,items:I,multiple:C=!1,itemToStringLabel:L,itemToStringValue:N,isItemEqualToValue:y=Kz,highlightItemOnHover:_=!0,children:M}=e,{clearErrors:w}=L_(),{setDirty:F,setTouched:Y,setFocused:$,shouldValidateOnChange:W,validityData:K,setFilled:q,name:j,disabled:k,validation:z,validationMode:Z}=HS(),ie=KG({id:t}),ne=k||h,B=j??E,[Q,ue]=pN({controlled:n,default:C?r??DD:r,name:"Select",state:"value"}),[le,he]=pN({controlled:o,default:l,name:"Select",state:"open"}),se=D.useRef([]),fe=D.useRef([]),ge=D.useRef(null),Le=D.useRef(null),We=D.useRef(0),He=D.useRef(null),ot=D.useRef([]),Me=D.useRef(!1),Ue=D.useRef(!1),Xe=D.useRef(null),ct=D.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Be=D.useRef(!1),{mounted:ke,setMounted:ve,transitionStatus:Ce}=wS(le),{openMethod:oe,triggerProps:Ie}=QG(le),Pe=Dr(()=>new jw({id:ie,labelId:void 0,modal:S,multiple:C,itemToStringLabel:L,itemToStringValue:N,isItemEqualToValue:y,value:Q,open:le,mounted:ke,transitionStatus:Ce,items:I,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,xe=At(Pe,mt.activeIndex),Ze=At(Pe,mt.selectedIndex),Et=At(Pe,mt.triggerElement),Xt=At(Pe,mt.positionerElement),Ut=D.useMemo(()=>C&&Array.isArray(Q)&&Q.length===0?"":Hu(Q,N),[C,Q,N]),ft=D.useMemo(()=>C&&Array.isArray(Q)?Q.map(Ot=>Hu(Ot,N)):Hu(Q,N),[C,Q,N]),Dt=Rr(Pe.state.triggerElement);JG({id:ie,commit:z.commit,value:Q,controlRef:Dt,name:B,getValue:()=>ft});const ht=D.useRef(Q);Je(()=>{Q!==ht.current&&Pe.set("forceMount",!0)},[Pe,Q]),Je(()=>{q(C?Array.isArray(Q)&&Q.length>0:Q!=null)},[C,Q,q]),Je(function(){if(le)return;const pn=ot.current;if(C){const Bn=Array.isArray(Q)?Q:[];if(Bn.length===0){Pe.set("selectedIndex",null);return}const yn=Bn[Bn.length-1],Er=Rd(pn,yn,y);Pe.set("selectedIndex",Er===-1?null:Er);return}const Rn=Rd(pn,Q,y);Pe.set("selectedIndex",Rn===-1?null:Rn)},[C,le,Q,ot,y,Pe]),y_(Q,()=>{w(B),F(Q!==K.initialValue),W()?z.commit(Q):z.commit(Q,!0)});const ln=at((Ot,pn)=>{if(c==null||c(Ot,pn),!pn.isCanceled&&(he(Ot),!Ot&&(pn.reason===xS||pn.reason===R_)&&(Y(!0),$(!1),Z==="onBlur"&&z.commit(Q)),!Ot&&Pe.state.activeIndex!==null)){const Rn=se.current[Pe.state.activeIndex];queueMicrotask(()=>{Rn==null||Rn.setAttribute("tabindex","-1")})}}),zt=at(()=>{ve(!1),Pe.set("activeIndex",null),g==null||g(!1)});Gc({enabled:!R,open:le,ref:ge,onComplete(){le||zt()}}),D.useImperativeHandle(R,()=>({unmount:zt}),[zt]);const qt=at((Ot,pn)=>{s==null||s(Ot,pn),!pn.isCanceled&&ue(Ot)}),In=at(()=>{const Ot=Pe.state.listElement||ge.current;if(!Ot)return;const pn=Ot.scrollTop,Rn=Ot.scrollTop+Ot.clientHeight,Bn=pn>1,yn=Rn<Ot.scrollHeight-1;Pe.state.scrollUpArrowVisible!==Bn&&Pe.set("scrollUpArrowVisible",Bn),Pe.state.scrollDownArrowVisible!==yn&&Pe.set("scrollDownArrowVisible",yn)}),$t=kG({open:le,onOpenChange:ln,elements:{reference:Et,floating:Xt}}),Yt=LG($t,{enabled:!d&&!ne,event:"mousedown"}),cn=A_($t,{bubbles:!1}),gt=Gz($t,{enabled:!d&&!ne,listRef:se,activeIndex:xe,selectedIndex:Ze,disabledIndices:DD,onNavigate(Ot){Ot===null&&!le||Pe.set("activeIndex",Ot)},focusItemOnHover:!1}),Jt=Hz($t,{enabled:!d&&!ne&&(le||!C),listRef:fe,activeIndex:xe,selectedIndex:Ze,onMatch(Ot){le?Pe.set("activeIndex",Ot):qt(ot.current[Ot],Gt("none"))},onTypingChange(Ot){Me.current=Ot}}),{getReferenceProps:hn,getFloatingProps:Qt,getItemProps:Nn}=BS([Yt,cn,gt,Jt]),An=D.useMemo(()=>ET(hn(),Ie,ie?{id:ie}:Sr),[hn,Ie,ie]);i_(()=>{Pe.update({popupProps:Qt(),triggerProps:An})}),Je(()=>{Pe.update({id:ie,modal:S,multiple:C,value:Q,open:le,mounted:ke,transitionStatus:Ce,popupProps:Qt(),triggerProps:An,items:I,itemToStringLabel:L,itemToStringValue:N,isItemEqualToValue:y,openMethod:oe})},[Pe,ie,S,C,Q,le,ke,Ce,Qt,An,I,L,N,y,oe]);const Gn=D.useMemo(()=>({store:Pe,name:B,required:p,disabled:ne,readOnly:d,multiple:C,itemToStringLabel:L,itemToStringValue:N,highlightItemOnHover:_,setValue:qt,setOpen:ln,listRef:se,popupRef:ge,scrollHandlerRef:Le,handleScrollArrowVisibility:In,scrollArrowsMountedCountRef:We,getItemProps:Nn,events:$t.context.events,valueRef:He,valuesRef:ot,labelsRef:fe,typingRef:Me,selectionRef:ct,selectedItemTextRef:Xe,validation:z,onOpenChangeComplete:g,keyboardActiveRef:Ue,alignItemWithTriggerActiveRef:Be,initialValueRef:ht}),[Pe,B,p,ne,d,C,L,N,_,qt,ln,Nn,$t.context.events,z,g,In]),is=Pc(m,z.inputRef),er=C&&Array.isArray(Q)&&Q.length>0,cr=C?void 0:B,ur=D.useMemo(()=>!C||!Array.isArray(Q)||!B?null:Q.map(Ot=>{const pn=Hu(Ot,N);return v.jsx("input",{type:"hidden",name:B,value:pn},pn)}),[C,Q,B,N]);return v.jsx(jG.Provider,{value:Gn,children:v.jsxs(XG.Provider,{value:$t,children:[M,v.jsx("input",{...z.getInputValidationProps({onFocus(){var Ot;(Ot=Pe.state.triggerElement)==null||Ot.focus({focusVisible:!0})},onChange(Ot){if(Ot.nativeEvent.defaultPrevented)return;const pn=Ot.target.value,Rn=Gt(LE,Ot.nativeEvent);function Bn(){if(C)return;const yn=ot.current.find(Er=>Hu(Er,N).toLowerCase()===pn.toLowerCase());yn!=null&&(F(yn!==K.initialValue),qt(yn,Rn),W()&&z.commit(yn))}Pe.set("forceMount",!0),queueMicrotask(Bn)}}),id:ie&&cr==null?`${ie}-hidden-input`:void 0,name:cr,autoComplete:f,value:Ut,disabled:ne,required:p&&!er,readOnly:d,ref:is,style:B?Bw:s_,tabIndex:-1,"aria-hidden":!0}),ur]})})}function s9(e,t){return e??t}let ac=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Hd.startingStyle]="startingStyle",e[e.endingStyle=Hd.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),qR=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const i9={[qR.popupOpen]:""},o9={[qR.popupOpen]:"",[qR.pressed]:""},a9={[ac.open]:""},l9={[ac.closed]:""},c9={[ac.anchorHidden]:""},b_={open(e){return e?i9:null}},u9={open(e){return e?o9:null}},PE={open(e){return e?a9:l9},anchorHidden(e){return e?c9:null}};function E9(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const o=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,E=parseFloat(r.height)||0,f=Math.max(t.width,o,c),h=Math.max(t.height,l,E),d=f-t.width,p=h-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-p/2,bottom:t.bottom+p/2}}const f9=D.createContext(void 0);function d9(e=!1){const t=D.useContext(f9);if(t===void 0&&!e)throw new Error(vr(16));return t}function T9(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,l=r&&t!==!1,c=r&&t===!1;return{props:D.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=s,!o&&n&&(f.tabIndex=t?s:-1)),(o&&(t||l)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,o,s])}}function dT(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:o}=e,l=D.useRef(null),c=d9(!0),E=o??c!==void 0,{props:f}=T9({focusableWhenDisabled:n,disabled:t,composite:E,tabIndex:r,isNativeButton:s}),h=D.useCallback(()=>{const S=l.current;dO(S)&&E&&t&&f.disabled===void 0&&S.disabled&&(S.disabled=!1)},[t,f.disabled,E]);Je(h,[h]);const d=D.useCallback((S={})=>{const{onClick:R,onMouseDown:m,onKeyUp:g,onKeyDown:I,onPointerDown:C,...L}=S;return ET({type:s?"button":void 0,onClick(y){if(t){y.preventDefault();return}R==null||R(y)},onMouseDown(y){t||m==null||m(y)},onKeyDown(y){if(t||(PN(y),I==null||I(y),y.baseUIHandlerPrevented))return;const _=y.target===y.currentTarget,M=y.currentTarget,w=dO(M),F=!s&&h9(M),Y=_&&(s?w:!F),$=y.key==="Enter",W=y.key===" ",K=M.getAttribute("role"),q=(K==null?void 0:K.startsWith("menuitem"))||K==="option"||K==="gridcell";if(_&&E&&W){if(y.defaultPrevented&&q)return;y.preventDefault(),F||s&&w?(M.click(),y.preventBaseUIHandler()):Y&&(R==null||R(y),y.preventBaseUIHandler());return}Y&&(!s&&(W||$)&&y.preventDefault(),!s&&$&&(R==null||R(y)))},onKeyUp(y){if(!t){if(PN(y),g==null||g(y),y.target===y.currentTarget&&s&&E&&dO(y.currentTarget)&&y.key===" "){y.preventDefault();return}y.baseUIHandlerPrevented||y.target===y.currentTarget&&!s&&!E&&y.key===" "&&(R==null||R(y))}},onPointerDown(y){if(t){y.preventDefault();return}C==null||C(y)}},s?void 0:{role:"button"},f,L)},[t,f,E,s]),p=at(S=>{l.current=S,h()});return{getButtonProps:d,buttonRef:p}}function dO(e){return jn(e)&&e.tagName==="BUTTON"}function h9(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const _p=2,p9=400,av=200,R9={...u9,...C_,value:()=>null},S9=D.forwardRef(function(t,n){const{render:r,className:s,id:o,disabled:l=!1,nativeButton:c=!0,...E}=t,{setTouched:f,setFocused:h,validationMode:d,state:p,disabled:S}=HS(),{labelId:R}=__(),{store:m,setOpen:g,selectionRef:I,validation:C,readOnly:L,required:N,alignItemWithTriggerActiveRef:y,disabled:_,keyboardActiveRef:M}=Ho(),w=S||_||l,F=At(m,mt.open),Y=At(m,mt.value),$=At(m,mt.triggerProps),W=At(m,mt.positionerElement),K=At(m,mt.listElement),q=At(m,mt.id),j=At(m,mt.labelId),k=At(m,mt.hasSelectedValue),z=!k&&F,Z=At(m,mt.hasNullItemLabel,z),ie=o??q,ne=s9(R,j);KG({id:ie});const B=Rr(W),Q=D.useRef(null),{getButtonProps:ue,buttonRef:le}=dT({disabled:w,native:c}),he=at(Ue=>{m.set("triggerElement",Ue)}),se=Pc(n,Q,le,he),fe=ns(),ge=ns(),Le=ns(),We=ns();D.useEffect(()=>{if(F)return!(k||Z)?Le.start(p9,()=>{I.current.allowUnselectedMouseUp=!0,I.current.allowSelectedMouseUp=!0}):We.start(av,()=>{I.current.allowUnselectedMouseUp=!0,Le.start(av,()=>{I.current.allowSelectedMouseUp=!0})}),()=>{Le.clear(),We.clear()};I.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ge.clear()},[F,k,Z,I,ge,Le,We]);const He=D.useMemo(()=>{var Ue;return(K==null?void 0:K.id)??((Ue=wd(W))==null?void 0:Ue.id)},[K,W]),ot=ET($,{id:ie,role:"combobox","aria-expanded":F?"true":"false","aria-haspopup":"listbox","aria-controls":F?He:void 0,"aria-labelledby":ne,"aria-readonly":L||void 0,"aria-required":N||void 0,tabIndex:w?-1:0,ref:se,onFocus(Ue){h(!0),F&&y.current&&g(!1,Gt(LE,Ue.nativeEvent)),fe.start(0,()=>{m.set("forceMount",!0)})},onBlur(Ue){Nt(W,Ue.relatedTarget)||(f(!0),h(!1),d==="onBlur"&&C.commit(Y))},onPointerMove(){M.current=!1},onKeyDown(){M.current=!0},onMouseDown(Ue){if(F)return;const Xe=an(Ue.currentTarget);function ct(Be){if(!Q.current)return;const ke=Be.target;if(Nt(Q.current,ke)||Nt(B.current,ke)||ke===Q.current)return;const ve=E9(Q.current);Be.clientX>=ve.left-_p&&Be.clientX<=ve.right+_p&&Be.clientY>=ve.top-_p&&Be.clientY<=ve.bottom+_p||g(!1,Gt(eK,Be))}ge.start(0,()=>{Xe.addEventListener("mouseup",ct,{once:!0})})}},C.getValidationProps,E,ue);ot.role="combobox";const Me={...p,open:F,disabled:w,value:Y,readOnly:L,placeholder:!k};return Xn("button",t,{ref:[n,Q],state:Me,stateAttributesMapping:R9,props:ot})}),m9={value:()=>null},A9=D.forwardRef(function(t,n){const{className:r,render:s,children:o,placeholder:l,...c}=t,{store:E,valueRef:f}=Ho(),h=At(E,mt.value),d=At(E,mt.items),p=At(E,mt.itemToStringLabel),S=At(E,mt.hasSelectedValue),R=!S&&l!=null&&o==null,m=At(E,mt.hasNullItemLabel,R),g={value:h,placeholder:!S};let I=null;return typeof o=="function"?I=o(h):o!=null?I=o:!S&&l!=null&&!m?I=l:Array.isArray(h)?I=Zz(h,d,p):I=qG(h,d,p),Xn("span",t,{state:g,ref:[n,f],props:[{children:I},c],stateAttributesMapping:m9})}),g9=D.forwardRef(function(t,n){const{className:r,render:s,...o}=t,{store:l}=Ho(),E={open:At(l,mt.open)};return Xn("span",t,{state:E,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:b_})}),O9=D.createContext(void 0),I9=D.forwardRef(function(t,n){const{store:r}=Ho(),s=At(r,mt.mounted),o=At(r,mt.forceMount);return s||o?v.jsx(O9.Provider,{value:!0,children:v.jsx(CG,{ref:n,...t})}):null});function ZG(e){return o_(19)?e:e?"true":void 0}let lv={},cv={},uv="";function N9(e){if(typeof document>"u")return!1;const t=an(e);return wn(t).innerWidth-t.documentElement.clientWidth>0}function C9(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=an(e),r=n.documentElement,s=n.body,o=Sl(r)?r:s,l=o.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const E=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=l,r.style.scrollbarGutter=c,E===f}function _9(e){const t=an(e),n=t.documentElement,r=t.body,s=Sl(n)?n:r,o={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,o)}}function L9(e){var p;const t=an(e),n=t.documentElement,r=t.body,s=wn(n);let o=0,l=0,c=!1;const E=Wi.create();if(E_&&(((p=s.visualViewport)==null?void 0:p.scale)??1)!==1)return()=>{};function f(){const S=s.getComputedStyle(n),R=s.getComputedStyle(r),I=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,l=n.scrollLeft,lv={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},uv=n.style.scrollBehavior,cv={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,L=n.scrollWidth>n.clientWidth,N=S.overflowY==="scroll"||R.overflowY==="scroll",y=S.overflowX==="scroll"||R.overflowX==="scroll",_=Math.max(0,s.innerWidth-r.clientWidth),M=Math.max(0,s.innerHeight-r.clientHeight),w=parseFloat(R.marginTop)+parseFloat(R.marginBottom),F=parseFloat(R.marginLeft)+parseFloat(R.marginRight),Y=Sl(n)?n:r;if(c=C9(e),c){n.style.scrollbarGutter=I,Y.style.overflowY="hidden",Y.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:I,overflowY:"hidden",overflowX:"hidden"}),(C||N)&&(n.style.overflowY="scroll"),(L||y)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:w||M?`calc(100dvh - ${w+M}px)`:"100dvh",width:F||_?`calc(100vw - ${F+_}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,lv),Object.assign(r.style,cv),c||(n.scrollTop=o,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=uv)}function d(){h(),E.request(f)}return f(),s.addEventListener("resize",d),()=>{E.cancel(),h(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",d)}}class y9{constructor(){Te(this,"lockCount",0);Te(this,"restore",null);Te(this,"timeoutLock",bi.create());Te(this,"timeoutUnlock",bi.create());Te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=an(t).documentElement,s=wn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=kr;return}const o=zw||!N9(t);this.restore=o?_9(t):L9(t)}}const b9=new y9;function eB(e=!0,t=null){Je(()=>{if(e)return b9.acquire(t)},[e,t])}const tB=D.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function P9(){return D.useContext(tB)}function D9(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,o=at(s),l=D.useRef(0),c=Dr(M9).current,E=Dr(v9).current,[f,h]=D.useState(0),d=D.useRef(f),p=at((I,C)=>{E.set(I,C??null),d.current+=1,h(d.current)}),S=at(I=>{E.delete(I),d.current+=1,h(d.current)}),R=D.useMemo(()=>{const I=new Map;return Array.from(E.keys()).filter(L=>L.isConnected).sort(x9).forEach((L,N)=>{const y=E.get(L)??{};I.set(L,{...y,index:N})}),I},[E,f]);Je(()=>{if(typeof MutationObserver!="function"||R.size===0)return;const I=new MutationObserver(C=>{const L=new Set,N=y=>L.has(y)?L.delete(y):L.add(y);C.forEach(y=>{y.removedNodes.forEach(N),y.addedNodes.forEach(N)}),L.size===0&&(d.current+=1,h(d.current))});return R.forEach((C,L)=>{L.parentElement&&I.observe(L.parentElement,{childList:!0})}),()=>{I.disconnect()}},[R]),Je(()=>{d.current===f&&(n.current.length!==R.size&&(n.current.length=R.size),r&&r.current.length!==R.size&&(r.current.length=R.size),l.current=R.size),o(R)},[o,R,n,r,f]),Je(()=>()=>{n.current=[]},[n]),Je(()=>()=>{r&&(r.current=[])},[r]);const m=at(I=>(c.add(I),()=>{c.delete(I)}));Je(()=>{c.forEach(I=>I(R))},[c,R]);const g=D.useMemo(()=>({register:p,unregister:S,subscribeMapChange:m,elementsRef:n,labelsRef:r,nextIndexRef:l}),[p,S,m,n,r,l]);return v.jsx(tB.Provider,{value:g,children:t})}function v9(){return new Map}function M9(){return new Set}function x9(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const U9=D.createContext(void 0);function w9(){const e=D.useContext(U9);return(e==null?void 0:e.direction)??"ltr"}const G9=e=>({name:"arrow",options:e,async fn(t){var ie,ne;const{x:n,y:r,placement:s,rects:o,platform:l,elements:c,middlewareData:E}=t,{element:f,padding:h=0,offsetParent:d="real"}=Fo(e,t)||{};if(f==null)return{};const p=sG(h),S={x:n,y:r},R=h_(s),m=T_(R),g=await l.getDimensions(f),I=R==="y",C=I?"top":"left",L=I?"bottom":"right",N=I?"clientHeight":"clientWidth",y=o.reference[m]+o.reference[R]-S[R]-o.floating[m],_=S[R]-o.reference[R],M=d==="real"?await((ie=l.getOffsetParent)==null?void 0:ie.call(l,f)):c.floating;let w=c.floating[N]||o.floating[m];(!w||!await((ne=l.isElement)==null?void 0:ne.call(l,M)))&&(w=c.floating[N]||o.floating[m]);const F=y/2-_/2,Y=w/2-g[m]/2-1,$=Math.min(p[C],Y),W=Math.min(p[L],Y),K=$,q=w-g[m]-W,j=w/2-g[m]/2+F,k=IN(K,j,q),z=!E.arrow&&ml(s)!=null&&j!==k&&o.reference[m]/2-(j<K?$:W)-g[m]/2<0,Z=z?j<K?j-K:j-q:0;return{[R]:S[R]+Z,data:{[R]:k,centerOffset:j-k-Z,...z&&{alignmentOffset:Z}},reset:z}}}),B9=(e,t)=>({...G9(e),options:[e,t]}),F9={name:"hide",async fn(e){var c;const{width:t,height:n,x:r,y:s}=e.rects.reference,o=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:((c=(await mz().fn(e)).data)==null?void 0:c.referenceHidden)||o}}}},oR={sideX:"left",sideY:"top"},H9={name:"adaptiveOrigin",async fn(e){var C,L;const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:o,strategy:l,placement:c}=e,E=wn(s),f=E.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:oR};const d=await((C=o.getOffsetParent)==null?void 0:C.call(o,s));let p={width:0,height:0};if(l==="fixed"&&(E!=null&&E.visualViewport))p={width:E.visualViewport.width,height:E.visualViewport.height};else if(d===E){const N=an(s);p={width:N.documentElement.clientWidth,height:N.documentElement.clientHeight}}else await((L=o.isElement)==null?void 0:L.call(o,d))&&(p=await o.getDimensions(d));const S=Rs(c);let R=t,m=n;S==="left"&&(R=p.width-(t+r.width)),S==="top"&&(m=p.height-(n+r.height));const g=S==="left"?"right":oR.sideX,I=S==="top"?"bottom":oR.sideY;return{x:R,y:m,data:{sideX:g,sideY:I}}}};function nB(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Ev(e,t,n){const{rects:r,placement:s}=e;return{side:nB(t,Rs(s),n),align:ml(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function rB(e){var Yt,cn;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:E=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:d=!1,keepMounted:p=!1,floatingRootContext:S,mounted:R,collisionAvoidance:m,shiftCrossAxis:g=!1,nodeId:I,adaptiveOrigin:C,lazyFlip:L=!1,externalTree:N}=e,[y,_]=D.useState(null);!R&&y!==null&&_(null);const M=m.side||"flip",w=m.align||"flip",F=m.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,$=at(Y),W=Y?$:t,K=Rr(t),j=w9()==="rtl",k=y||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],z=o==="center"?k:`${k}-${o}`;let Z=E;const ie=1,ne=r==="bottom"?ie:0,B=r==="top"?ie:0,Q=r==="right"?ie:0,ue=r==="left"?ie:0;typeof Z=="number"?Z={top:Z+ne,right:Z+ue,bottom:Z+B,left:Z+Q}:Z&&(Z={top:(Z.top||0)+ne,right:(Z.right||0)+ue,bottom:(Z.bottom||0)+B,left:(Z.left||0)+Q});const le={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:Z},he=D.useRef(null),se=Rr(s),fe=Rr(l),We=[Tz(gt=>{const Jt=Ev(gt,r,j),hn=typeof se.current=="function"?se.current(Jt):se.current,Qt=typeof fe.current=="function"?fe.current(Jt):fe.current;return{mainAxis:hn,crossAxis:Qt,alignmentAxis:Qt}},[typeof s!="function"?s:0,typeof l!="function"?l:0,j,r])],He=w==="none"&&M!=="shift",ot=!He&&(f||g||M==="shift"),Me=M==="none"?null:Rz({...le,padding:{top:Z.top+ie,right:Z.right+ie,bottom:Z.bottom+ie,left:Z.left+ie},mainAxis:!g&&M==="flip",crossAxis:w==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),Ue=He?null:hz(gt=>{const Jt=an(gt.elements.floating).documentElement;return{...le,rootBoundary:g?{x:0,y:0,width:Jt.clientWidth,height:Jt.clientHeight}:void 0,mainAxis:w!=="none",crossAxis:ot,limiter:f||g?void 0:pz(hn=>{if(!he.current)return{};const{width:Qt,height:Nn}=he.current.getBoundingClientRect(),An=si(Rs(hn.placement)),Gn=An==="y"?Qt:Nn,is=An==="y"?Z.left+Z.right:Z.top+Z.bottom;return{offset:Gn/2+is/2}})}},[le,f,g,Z,w]);M==="shift"||w==="shift"||o==="center"?We.push(Ue,Me):We.push(Me,Ue),We.push(Sz({...le,apply({elements:{floating:gt},availableWidth:Jt,availableHeight:hn,rects:Qt}){const Nn=gt.style;Nn.setProperty("--available-width",`${Jt}px`),Nn.setProperty("--available-height",`${hn}px`);const An=window.devicePixelRatio||1,{x:Gn,y:is,width:er,height:cr}=Qt.reference,ur=(Math.round((Gn+er)*An)-Math.round(Gn*An))/An,Ot=(Math.round((is+cr)*An)-Math.round(is*An))/An;Nn.setProperty("--anchor-width",`${ur}px`),Nn.setProperty("--anchor-height",`${Ot}px`)}}),B9(()=>({element:he.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(gt){var tr,os,Vo;const{elements:Jt,middlewareData:hn,placement:Qt,rects:Nn,y:An}=gt,Gn=Rs(Qt),is=si(Gn),er=he.current,cr=((tr=hn.arrow)==null?void 0:tr.x)||0,ur=((os=hn.arrow)==null?void 0:os.y)||0,Ot=(er==null?void 0:er.clientWidth)||0,pn=(er==null?void 0:er.clientHeight)||0,Rn=cr+Ot/2,Bn=ur+pn/2,yn=Math.abs(((Vo=hn.shift)==null?void 0:Vo.y)||0),Er=Nn.reference.height/2,Xr=typeof s=="function"?s(Ev(gt,r,j)):s,gl=yn>Xr,As={top:`${Rn}px calc(100% + ${Xr}px)`,bottom:`${Rn}px ${-Xr}px`,left:`calc(100% + ${Xr}px) ${Bn}px`,right:`${-Xr}px ${Bn}px`}[Gn],Fn=`${Rn}px ${Nn.reference.y+Er-An}px`;return Jt.floating.style.setProperty("--transform-origin",ot&&is==="y"&&gl?Fn:As),{}}},F9,C),Je(()=>{!R&&S&&S.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[R,S]);const Xe=D.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:ct,elements:Be,x:ke,y:ve,middlewareData:Ce,update:oe,placement:Ie,context:Pe,isPositioned:xe,floatingStyles:Ze}=_z({rootContext:S,placement:z,middleware:We,strategy:n,whileElementsMounted:p?void 0:(...gt)=>nv(...gt,Xe),nodeId:I,externalTree:N}),{sideX:Et,sideY:Xt}=Ce.adaptiveOrigin||oR,Ut=xe?n:"fixed",ft=D.useMemo(()=>{const gt=C?{position:Ut,[Et]:ke,[Xt]:ve}:{position:Ut,...Ze};return xe||(gt.opacity=0),gt},[C,Ut,Et,ke,Xt,ve,Ze,xe]),Dt=D.useRef(null);Je(()=>{if(!R)return;const gt=K.current,Jt=typeof gt=="function"?gt():gt,Qt=(fv(Jt)?Jt.current:Jt)||null||null;Qt!==Dt.current&&(ct.setPositionReference(Qt),Dt.current=Qt)},[R,ct,W,K]),D.useEffect(()=>{if(!R)return;const gt=K.current;typeof gt!="function"&&fv(gt)&&gt.current!==Dt.current&&(ct.setPositionReference(gt.current),Dt.current=gt.current)},[R,ct,W,K]),D.useEffect(()=>{if(p&&R&&Be.domReference&&Be.floating)return nv(Be.domReference,Be.floating,oe,Xe)},[p,R,Be,oe,Xe]);const ht=Rs(Ie),ln=nB(r,ht,j),zt=ml(Ie)||"center",qt=!!((Yt=Ce.hide)!=null&&Yt.referenceHidden);Je(()=>{L&&R&&xe&&_(ht)},[L,R,xe,ht]);const In=D.useMemo(()=>{var gt,Jt;return{position:"absolute",top:(gt=Ce.arrow)==null?void 0:gt.y,left:(Jt=Ce.arrow)==null?void 0:Jt.x}},[Ce.arrow]),$t=((cn=Ce.arrow)==null?void 0:cn.centerOffset)!==0;return D.useMemo(()=>({positionerStyles:ft,arrowStyles:In,arrowRef:he,arrowUncentered:$t,side:ln,align:zt,physicalSide:ht,anchorHidden:qt,refs:ct,context:Pe,isPositioned:xe,update:oe}),[ft,In,he,$t,ln,zt,ht,qt,ct,Pe,xe,oe])}function fv(e){return e!=null&&"current"in e}const sB=D.createContext(void 0);function iB(){const e=D.useContext(sB);if(!e)throw new Error(vr(59));return e}const oB=D.forwardRef(function(t,n){const{cutout:r,...s}=t;let o;if(r){const l=r==null?void 0:r.getBoundingClientRect();o=`polygon(
70
+ 0% 0%,
71
+ 100% 0%,
72
+ 100% 100%,
73
+ 0% 100%,
74
+ 0% 0%,
75
+ ${l.left}px ${l.top}px,
76
+ ${l.left}px ${l.bottom}px,
77
+ ${l.right}px ${l.bottom}px,
78
+ ${l.right}px ${l.top}px,
79
+ ${l.left}px ${l.top}px
80
+ )`}return v.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function VS(e){return e==="starting"?z8:Sr}function JR(e,t){e&&Object.assign(e.style,t)}const aB={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},V9={position:"fixed"},k9=D.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:o,render:l,side:c="bottom",align:E="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p,arrowPadding:S=5,sticky:R=!1,disableAnchorTracking:m,alignItemWithTrigger:g=!0,collisionAvoidance:I=q8,...C}=t,{store:L,listRef:N,labelsRef:y,alignItemWithTriggerActiveRef:_,selectedItemTextRef:M,valuesRef:w,initialValueRef:F,popupRef:Y,setValue:$}=Ho(),W=$G(),K=At(L,mt.open),q=At(L,mt.mounted),j=At(L,mt.modal),k=At(L,mt.value),z=At(L,mt.openMethod),Z=At(L,mt.positionerElement),ie=At(L,mt.triggerElement),ne=At(L,mt.isItemEqualToValue),B=At(L,mt.transitionStatus),Q=D.useRef(null),ue=D.useRef(null),[le,he]=D.useState(g),se=q&&le&&z!=="touch";!q&&le!==g&&he(g),Je(()=>{q||(mt.scrollUpArrowVisible(L.state)&&L.set("scrollUpArrowVisible",!1),mt.scrollDownArrowVisible(L.state)&&L.set("scrollDownArrowVisible",!1))},[L,q]),D.useImperativeHandle(_,()=>se),eB((se||j)&&K&&z!=="touch",ie);const fe=rB({anchor:r,floatingRootContext:W,positionMethod:s,mounted:q,side:c,sideOffset:f,align:E,alignOffset:h,arrowPadding:S,collisionBoundary:d,collisionPadding:p,sticky:R,disableAnchorTracking:m??se,collisionAvoidance:I,keepMounted:!0}),ge=se?"none":fe.side,Le=se?V9:fe.positionerStyles,We=D.useMemo(()=>{const Be={};return K||(Be.pointerEvents="none"),{role:"presentation",hidden:!q,style:{...Le,...Be}}},[K,q,Le]),He={open:K,side:ge,align:fe.align,anchorHidden:fe.anchorHidden},ot=at(Be=>{L.set("positionerElement",Be)}),Me=Xn("div",t,{ref:[n,ot],state:He,stateAttributesMapping:PE,props:[We,VS(B),C]}),Ue=D.useRef(0),Xe=at(Be=>{if(Be.size===0&&Ue.current===0||w.current.length===0)return;const ke=Ue.current;if(Ue.current=Be.size,Be.size===ke)return;const ve=Gt(LE);if(ke!==0&&!L.state.multiple&&k!==null&&Rd(w.current,k,ne)===-1){const oe=F.current,Pe=oe!=null&&Rd(w.current,oe,ne)!==-1?oe:null;$(Pe,ve),Pe===null&&(L.set("selectedIndex",null),M.current=null)}if(ke!==0&&L.state.multiple&&Array.isArray(k)){const Ce=Ie=>Rd(w.current,Ie,ne)!==-1,oe=k.filter(Ie=>Ce(Ie));(oe.length!==k.length||oe.some(Ie=>!zz(k,Ie,ne)))&&($(oe,ve),oe.length===0&&(L.set("selectedIndex",null),M.current=null))}if(K&&se){L.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ce={height:""};JR(Z,Ce),JR(Y.current,Ce)}}),ct=D.useMemo(()=>({...fe,side:ge,alignItemWithTriggerActive:se,setControlledAlignItemWithTrigger:he,scrollUpArrowRef:Q,scrollDownArrowRef:ue}),[fe,ge,se,he]);return v.jsx(D9,{elementsRef:N,labelsRef:y,onMapChange:Xe,children:v.jsxs(sB.Provider,{value:ct,children:[q&&j&&v.jsx(oB,{inert:ZG(!K),cutout:ie}),Me]})})});function lB(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Lp="base-ui-disable-scrollbar",vN={className:Lp,getElement(e){return v.jsx("style",{nonce:e,href:Lp,precedence:"base-ui:low",children:`.${Lp}{scrollbar-width:none}.${Lp}::-webkit-scrollbar{display:none}`})}},Y9=D.createContext(void 0);function W9(e){return D.useContext(Y9)}const cB="ArrowUp",uB="ArrowDown",EB="ArrowLeft",fB="ArrowRight",dB="Home",TB="End",j9=new Set([EB,fB]),X9=new Set([cB,uB]),$9=new Set([...j9,...X9]);[...$9];const hB=new Set([cB,uB,EB,fB,dB,TB]);function TO(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const K9=D.createContext(void 0),z9={disableStyleElements:!1};function q9(){return D.useContext(K9)??z9}const So=1,J9={...PE,...bE},Q9=D.forwardRef(function(t,n){const{render:r,className:s,finalFocus:o,...l}=t,{store:c,popupRef:E,onOpenChangeComplete:f,setOpen:h,valueRef:d,selectedItemTextRef:p,keyboardActiveRef:S,multiple:R,handleScrollArrowVisibility:m,scrollHandlerRef:g,highlightItemOnHover:I}=Ho(),{side:C,align:L,alignItemWithTriggerActive:N,setControlledAlignItemWithTrigger:y,scrollDownArrowRef:_,scrollUpArrowRef:M}=iB(),w=W9()!=null,F=$G(),{nonce:Y,disableStyleElements:$}=q9(),W=ns(),K=At(c,mt.id),q=At(c,mt.open),j=At(c,mt.mounted),k=At(c,mt.popupProps),z=At(c,mt.transitionStatus),Z=At(c,mt.triggerElement),ie=At(c,mt.positionerElement),ne=At(c,mt.listElement),B=D.useRef(0),Q=D.useRef(!1),ue=D.useRef(0),le=D.useRef(!1),he=D.useRef({}),se=LS(),fe=at(He=>{if(!ie||!E.current||!le.current)return;if(Q.current||!N){m();return}const ot=ie.style.top==="0px",Me=ie.style.bottom==="0px",Ue=ie.getBoundingClientRect().height,Xe=an(ie),ct=getComputedStyle(ie),Be=parseFloat(ct.marginTop),ke=parseFloat(ct.marginBottom),ve=dv(getComputedStyle(E.current)),Ce=Math.min(Xe.documentElement.clientHeight-Be-ke,ve),oe=He.scrollTop,Ie=yp(He);let Pe=0,xe=null,Ze=!1,Et=!1;const Xt=ft=>{ie.style.height=`${ft}px`},Ut=(ft,Dt)=>{const ht=TO(ft,0,Ce-Ue);ht>0&&Xt(Ue+ht),He.scrollTop=Dt,Ce-(Ue+ht)<=So&&(Q.current=!0),m()};if(ot){const ft=Ie-oe,Dt=Ue+ft,ht=Math.min(Dt,Ce);if(Pe=ht,ft<=So){Ut(ft,Ie);return}Ce-ht>So?Et=!0:Ze=!0}else if(Me){const ft=oe,Dt=Ue+ft,ht=Math.min(Dt,Ce),ln=Dt-Ce;if(Pe=ht,ft<=So){Ut(ft,0);return}Ce-ht>So?xe=0:(Ze=!0,oe<Ie&&(xe=oe-(ft-ln)))}if(Pe=Math.ceil(Pe),Pe!==0&&Xt(Pe),Et||xe!=null){const ft=yp(He),Dt=Et?ft:TO(xe,0,ft);Math.abs(He.scrollTop-Dt)>So&&(He.scrollTop=Dt)}(Ze||Pe>=Ce-So)&&(Q.current=!0),m()});D.useImperativeHandle(g,()=>fe,[fe]),Gc({open:q,ref:E,onComplete(){q&&(f==null||f(!0))}});const ge={open:q,transitionStatus:z,side:C,align:L};Je(()=>{!ie||!E.current||Object.keys(he.current).length||(he.current={top:ie.style.top||"0",left:ie.style.left||"0",right:ie.style.right,height:ie.style.height,bottom:ie.style.bottom,minHeight:ie.style.minHeight,maxHeight:ie.style.maxHeight,marginTop:ie.style.marginTop,marginBottom:ie.style.marginBottom})},[E,ie]),Je(()=>{q||N||(le.current=!1,Q.current=!1,B.current=0,ue.current=0,JR(ie,he.current))},[q,N,ie,E]),Je(()=>{const He=E.current;if(!(!q||!Z||!ie||!He||c.state.transitionStatus==="ending")){if(!N){le.current=!0,se.request(m),He.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{var Me;const ot=e7(He);He.style.removeProperty("--transform-origin");try{const Ue=getComputedStyle(ie),Xe=getComputedStyle(He),ct=an(Z),Be=wn(ie),ke=Z9(Z),ve=bp(Z.getBoundingClientRect(),ke),Ce=bp(ie.getBoundingClientRect(),ke),oe=ve.left,Ie=ve.height,Pe=ne||He,xe=Pe.scrollHeight,Ze=parseFloat(Xe.borderBottomWidth),Et=parseFloat(Ue.marginTop)||10,Xt=parseFloat(Ue.marginBottom)||10,Ut=parseFloat(Ue.minHeight)||100,ft=dv(Xe),Dt=5,ht=5,ln=20,zt=ct.documentElement.clientHeight-Et-Xt,qt=ct.documentElement.clientWidth,In=zt-ve.bottom+Ie,$t=p.current,Yt=d.current;let cn,gt=0,Jt=0;if($t&&Yt){const Rn=bp(Yt.getBoundingClientRect(),ke);cn=bp($t.getBoundingClientRect(),ke);const Bn=Rn.left-oe,yn=cn.left-Ce.left,Er=Rn.top-ve.top+Rn.height/2,Xr=cn.top-Ce.top+cn.height/2;gt=Bn-yn,Jt=Xr-Er}const hn=In+Jt+Xt+Ze;let Qt=Math.min(zt,hn);const Nn=zt-Et-Xt,An=hn-Qt,Gn=Math.max(Dt,oe+gt),is=qt-ht,er=Math.max(0,Gn+Ce.width-is);ie.style.left=`${Gn-er}px`,ie.style.height=`${Qt}px`,ie.style.maxHeight="auto",ie.style.marginTop=`${Et}px`,ie.style.marginBottom=`${Xt}px`,He.style.height="100%";const cr=yp(Pe),ur=An>=cr-So;ur&&(Qt=Math.min(zt,Ce.height)-(An-cr));const Ot=ve.top<ln||ve.bottom>zt-ln||Math.ceil(Qt)+So<Math.min(xe,Ut),pn=(((Me=Be.visualViewport)==null?void 0:Me.scale)??1)!==1&&E_;if(Ot||pn){le.current=!0,JR(ie,he.current),zi.flushSync(()=>y(!1));return}if(ur){const Rn=Math.max(0,zt-hn);ie.style.top=Ce.height>=Nn?"0":`${Rn}px`,ie.style.height=`${Qt}px`,Pe.scrollTop=yp(Pe),B.current=Math.max(Ut,Qt)}else ie.style.bottom="0",B.current=Math.max(Ut,Qt),Pe.scrollTop=An;if(cn){const Rn=Ce.top,Bn=Ce.height,yn=cn.top+cn.height/2,Er=Bn>0?(yn-Rn)/Bn*100:50,Xr=TO(Er,0,100);He.style.setProperty("--transform-origin",`50% ${Xr}%`)}(B.current===zt||Qt>=ft)&&(Q.current=!0),m(),setTimeout(()=>{le.current=!0})}finally{ot()}})}},[c,q,ie,Z,d,p,E,m,N,y,se,_,M,ne]),D.useEffect(()=>{if(!N||!ie||!q)return;const He=wn(ie);function ot(Me){h(!1,Gt(nK,Me))}return He.addEventListener("resize",ot),()=>{He.removeEventListener("resize",ot)}},[h,N,ie,q]);const Le={...ne?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":R||void 0,id:`${K}-list`},onKeyDown(He){S.current=!0,w&&hB.has(He.key)&&He.stopPropagation()},onMouseMove(){S.current=!1},onPointerLeave(He){if(!I||lB(He)||He.pointerType==="touch")return;const ot=He.currentTarget;W.start(0,()=>{c.set("activeIndex",null),ot.focus({preventScroll:!0})})},onScroll(He){ne||fe(He.currentTarget)},...N&&{style:ne?{height:"100%"}:aB}},We=Xn("div",t,{ref:[n,E],state:ge,stateAttributesMapping:J9,props:[k,Le,VS(z),{className:!ne&&N?vN.className:void 0},l]});return v.jsxs(D.Fragment,{children:[!$&&vN.getElement(Y),v.jsx(_G,{context:F,modal:!1,disabled:!j,returnFocus:o,restoreFocus:!0,children:We})]})});function dv(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function yp(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Z9(e){return xG.getScale(e)}function bp(e,t){return Gd({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}const Tv=[["transform","none"],["scale","1"],["translate","0 0"]];function e7(e){const{style:t}=e,n={};for(const[r,s]of Tv)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of Tv){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const t7=D.forwardRef(function(t,n){const{className:r,render:s,...o}=t,{store:l,scrollHandlerRef:c}=Ho(),{alignItemWithTriggerActive:E}=iB(),f=At(l,mt.hasScrollArrows),h=At(l,mt.openMethod),d=At(l,mt.multiple),S={id:`${At(l,mt.id)}-list`,role:"listbox","aria-multiselectable":d||void 0,onScroll(m){var g;(g=c.current)==null||g.call(c,m.currentTarget)},...E&&{style:aB},className:f&&h!=="touch"?vN.className:void 0},R=at(m=>{l.set("listElement",m)});return Xn("div",t,{ref:[n,R],props:[S,o]})});let pB=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function n7(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:o}=e,{register:l,unregister:c,subscribeMapChange:E,elementsRef:f,labelsRef:h,nextIndexRef:d}=P9(),p=D.useRef(-1),[S,R]=D.useState(o??(s===pB.GuessFromOrder?()=>{if(p.current===-1){const I=d.current;d.current+=1,p.current=I}return p.current}:-1)),m=D.useRef(null),g=D.useCallback(I=>{var C;if(m.current=I,S!==-1&&I!==null&&(f.current[S]=I,h)){const L=t!==void 0;h.current[S]=L?t:((C=r==null?void 0:r.current)==null?void 0:C.textContent)??I.textContent}},[S,f,h,t,r]);return Je(()=>{if(o!=null)return;const I=m.current;if(I)return l(I,n),()=>{c(I)}},[o,l,c,n]),Je(()=>{if(o==null)return E(I=>{var L;const C=m.current?(L=I.get(m.current))==null?void 0:L.index:null;C!=null&&R(C)})},[o,E,R]),D.useMemo(()=>({ref:g,index:S}),[S,g])}const RB=D.createContext(void 0);function P_(){const e=D.useContext(RB);if(!e)throw new Error(vr(57));return e}const r7=D.memo(D.forwardRef(function(t,n){const{render:r,className:s,value:o=null,label:l,disabled:c=!1,nativeButton:E=!1,...f}=t,h=D.useRef(null),d=n7({label:l,textRef:h,indexGuessBehavior:pB.GuessFromOrder}),{store:p,getItemProps:S,setOpen:R,setValue:m,selectionRef:g,typingRef:I,valuesRef:C,keyboardActiveRef:L,multiple:N,highlightItemOnHover:y}=Ho(),_=ns(),M=At(p,mt.isActive,d.index),w=At(p,mt.isSelected,d.index,o),F=At(p,mt.isSelectedByFocus,d.index),Y=At(p,mt.isItemEqualToValue),$=d.index,W=$!==-1,K=D.useRef(null),q=Rr($);Je(()=>{if(!W)return;const se=C.current;return se[$]=o,()=>{delete se[$]}},[W,$,o,C]),Je(()=>{if(!W)return;const se=p.state.value;let fe=se;N&&Array.isArray(se)&&se.length>0&&(fe=se[se.length-1]),fe!==void 0&&AE(o,fe,Y)&&p.set("selectedIndex",$)},[W,$,N,Y,p,o]);const j={disabled:c,selected:w,highlighted:M},k=S({active:M,selected:w});k.onFocus=void 0,k.id=void 0;const z=D.useRef(null),Z=D.useRef("mouse"),ie=D.useRef(!1),{getButtonProps:ne,buttonRef:B}=dT({disabled:c,focusableWhenDisabled:!0,native:E,composite:!0});function Q(se){const fe=p.state.value;if(N){const ge=Array.isArray(fe)?fe:[],Le=w?qz(ge,o,Y):[...ge,o];m(Le,Gt(rO,se))}else m(o,Gt(rO,se)),R(!1,Gt(rO,se))}const ue={role:"option","aria-selected":w,tabIndex:M?0:-1,onFocus(){p.set("activeIndex",$)},onMouseEnter(){!L.current&&p.state.selectedIndex===null&&y&&p.set("activeIndex",$)},onMouseMove(){y&&p.set("activeIndex",$)},onMouseLeave(se){!y||L.current||lB(se)||_.start(0,()=>{p.state.activeIndex===$&&p.set("activeIndex",null)})},onTouchStart(){g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(se){z.current=se.key,p.set("activeIndex",$),se.key===" "&&I.current&&se.preventDefault()},onClick(se){ie.current=!1,!(se.type==="keydown"&&z.current===null)&&(c||se.type==="keydown"&&z.current===" "&&I.current||Z.current!=="touch"&&!M||(z.current=null,Q(se.nativeEvent)))},onPointerEnter(se){Z.current=se.pointerType},onPointerDown(se){Z.current=se.pointerType,ie.current=!0},onMouseUp(){var ge;if(c)return;if(ie.current){ie.current=!1;return}const se=!g.current.allowSelectedMouseUp&&w,fe=!g.current.allowUnselectedMouseUp&&!w;se||fe||Z.current!=="touch"&&!M||(ge=K.current)==null||ge.click()}},le=Xn("div",t,{ref:[B,n,d.ref,K],state:j,props:[k,ue,f,ne]}),he=D.useMemo(()=>({selected:w,indexRef:q,textRef:h,selectedByFocus:F,hasRegistered:W}),[w,q,h,F,W]);return v.jsx(RB.Provider,{value:he,children:le})})),s7=D.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=P_();return r||s?v.jsx(i7,{...t,ref:n}):null}),i7=D.memo(D.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:s,...o}=e,{selected:l}=P_(),c=D.useRef(null),{transitionStatus:E,setMounted:f}=wS(l),d=Xn("span",e,{ref:[t,c],state:{selected:l,transitionStatus:E},props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:bE});return Gc({open:l,ref:c,onComplete(){l||f(!1)}}),d})),o7=D.memo(D.forwardRef(function(t,n){const{indexRef:r,textRef:s,selectedByFocus:o,hasRegistered:l}=P_(),{selectedItemTextRef:c}=Ho(),{className:E,render:f,...h}=t,d=D.useCallback(S=>{if(!S||!l)return;const R=c.current===null||!c.current.isConnected;(o||R&&r.current===0)&&(c.current=S)},[c,r,o,l]);return Xn("div",t,{ref:[d,n,s],props:h})}));function SB(e){return v.jsx(r9,{...e})}function mB({children:e,...t}){return v.jsxs(S9,{className:"flex h-7 items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2.5 text-xs text-foreground transition-colors hover:bg-muted/50",...t,children:[e,v.jsx(g9,{children:v.jsx("span",{className:"text-[10px] text-muted-foreground",children:"▾"})})]})}function AB(e){return v.jsx(A9,{className:"flex items-center gap-1.5",...e})}function gB({children:e,...t}){return v.jsx(I9,{children:v.jsx(k9,{side:"bottom",sideOffset:4,className:"z-50",children:v.jsx(Q9,{className:"min-w-32 overflow-hidden rounded-md bg-popover/90 shadow-popover backdrop-blur-sm",...t,children:v.jsx(t7,{className:"p-1",children:e})})})})}function QR({children:e,...t}){return v.jsxs(r7,{className:"flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs text-foreground outline-none select-none data-[highlighted]:bg-accent",...t,children:[v.jsx(o7,{children:e}),v.jsx(s7,{className:"ml-auto text-[10px] text-primary",children:"✓"})]})}function a7({className:e}){const{traceId:t,service:n}=ai({from:"__root__"}),r=Us(),s=Ki(),[o,l]=D.useState(t??""),[c,E]=D.useState(!1),{data:f}=Gx(Wr.services.index.queryOptions()),h=(f==null?void 0:f.data)??[],d=D.useCallback(()=>{E(!0),s.invalidateQueries(),setTimeout(()=>E(!1),500)},[s]);function p(){const m=o.trim()||void 0;r({search:{traceId:m,service:n}})}function S(){l(""),r({search:{service:n}})}function R(m){r({search:{traceId:t,service:m||void 0}})}return v.jsxs("div",{className:["flex items-center gap-2 bg-card px-4",e].filter(Boolean).join(" "),children:[v.jsx(Pr,{icon:I6,size:14,strokeWidth:1.5,className:"text-muted-foreground"}),v.jsx("input",{type:"text",value:o,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Enter"&&p(),m.key==="Escape"&&S()},placeholder:"Filter by Trace ID...",className:"h-full flex-1 bg-transparent text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none"}),t&&v.jsx("button",{onClick:S,className:"flex items-center gap-1 transition-colors hover:opacity-80",children:v.jsxs(ts,{color:"primary",className:"gap-1",children:[v.jsx("span",{className:"max-w-32 truncate",children:t}),v.jsx(Pr,{icon:h6,size:12,strokeWidth:2})]})}),h.length>0&&v.jsxs(SB,{value:n??"",onValueChange:m=>R(m||null),children:[v.jsx(mB,{children:v.jsx(AB,{placeholder:"All services"})}),v.jsxs(gB,{children:[v.jsx(QR,{value:"",children:"All services"}),h.map(m=>v.jsx(QR,{value:m,children:m},m))]})]}),v.jsx(cl,{variant:"ghost",size:"icon",onClick:d,children:v.jsx("span",{className:c?"animate-spin inline-block":"inline-block",children:v.jsx(Pr,{icon:O6,size:14,strokeWidth:1.5})})})]})}const OB=D.createContext(void 0);function kS(e){const t=D.useContext(OB);if(t===void 0&&!e)throw new Error(vr(72));return t}const l7={...VG,disabled:Qe(e=>e.disabled),instantType:Qe(e=>e.instantType),isInstantPhase:Qe(e=>e.isInstantPhase),trackCursorAxis:Qe(e=>e.trackCursorAxis),disableHoverablePopup:Qe(e=>e.disableHoverablePopup),lastOpenChangeReason:Qe(e=>e.openChangeReason),closeOnClick:Qe(e=>e.closeOnClick),closeDelay:Qe(e=>e.closeDelay),hasViewport:Qe(e=>e.hasViewport)};class D_ extends a_{constructor(n){super({...c7(),...n},{popupRef:D.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new GS},l7);Te(this,"setOpen",(n,r)=>{var f,h;const s=r.reason,o=s===gi,l=n&&s===sR,c=!n&&(s===Bd||s===S_);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const E=()=>{var S;const d={open:n,openChangeReason:s};l?d.instantType="focus":c?d.instantType="dismiss":s===gi&&(d.instantType=void 0);const p=((S=r.trigger)==null?void 0:S.id)??null;(p||n)&&(d.activeTriggerId=p,d.activeTriggerElement=r.trigger??null),this.update(d)};o?zi.flushSync(E):E()})}static useStore(n,r){const s=Dr(()=>new D_(r)).current,o=n??s,l=YG({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=l,o}}function c7(){return{...HG(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const u7=Ww(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:o=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:E,onOpenChangeComplete:f,handle:h,triggerId:d,defaultTriggerId:p=null,children:S}=t,R=D_.useStore(h==null?void 0:h.store,{open:r,openProp:s,activeTriggerId:p,triggerIdProp:d});i_(()=>{s===void 0&&R.state.open===!1&&r===!0&&R.update({open:!0,activeTriggerId:p})}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",d),R.useContextCallback("onOpenChange",E),R.useContextCallback("onOpenChangeComplete",f);const m=R.useState("open"),g=!n&&m,I=R.useState("activeTriggerId"),C=R.useState("payload");R.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:o}),Je(()=>{m&&n&&R.setOpen(!1,Gt(tK))},[m,n,R]),R.useSyncedValue("disabled",n),BG(R);const{forceUnmount:L,transitionStatus:N}=FG(g,R),y=R.useState("isInstantPhase"),_=R.useState("instantType"),M=R.useState("lastOpenChangeReason"),w=D.useRef(null);Je(()=>{N==="ending"&&M===LE||N!=="ending"&&y?(_!=="delay"&&(w.current=_),R.set("instantType","delay")):w.current!==null&&(R.set("instantType",w.current),w.current=null)},[N,y,M,_,R]),Je(()=>{g&&I==null&&R.set("payload",void 0)},[R,I,g]);const F=D.useCallback(()=>{R.setOpen(!1,E7(R,RG))},[R]);D.useImperativeHandle(c,()=>({unmount:L,close:F}),[L,F]);const Y=R.useState("floatingRootContext"),$=A_(Y,{enabled:!n,referencePress:()=>R.select("closeOnClick")}),W=PK(Y,{enabled:!n&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:K,getFloatingProps:q,getTriggerProps:j}=BS([$,W]),k=D.useMemo(()=>K(),[K]),z=D.useMemo(()=>j(),[j]),Z=D.useMemo(()=>q(),[q]);return R.useSyncedValues({activeTriggerProps:k,inactiveTriggerProps:z,popupProps:Z}),v.jsx(OB.Provider,{value:R,children:typeof S=="function"?S({payload:C}):S})});function E7(e,t){const n=Gt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const IB=D.createContext(void 0);function f7(){return D.useContext(IB)}let d7=(function(e){return e[e.popupOpen=qR.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const T7=600,h7=Z$(function(t,n){const{className:r,render:s,handle:o,payload:l,disabled:c,delay:E,closeOnClick:f=!0,closeDelay:h,id:d,...p}=t,S=kS(!0),R=(o==null?void 0:o.store)??S;if(!R)throw new Error(vr(82));const m=ul(d),g=R.useState("isTriggerActive",m),I=R.useState("isOpenedByTrigger",m),C=R.useState("floatingRootContext"),L=D.useRef(null),N=E??T7,y=h??0,{registerTrigger:_,isMountedByThisTrigger:M}=GG(m,L,R,{payload:l,closeOnClick:f,closeDelay:y}),w=f7(),{delayRef:F,isInstantPhase:Y,hasProvider:$}=sK(C,{open:I});R.useSyncedValue("isInstantPhase",Y);const W=R.useState("disabled"),K=c??W,q=R.useState("trackCursorAxis"),j=R.useState("disableHoverablePopup"),k=Mz(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!j&&q!=="both"?Yz():null,restMs(){const B=w==null?void 0:w.delay,Q=typeof F.current=="object"?F.current.open:void 0;let ue=N;return $&&(Q!==0?ue=E??B??N:ue=0),ue},delay(){const B=typeof F.current=="object"?F.current.close:void 0;let Q=y;return h==null&&$&&(Q=B),{close:Q}},triggerElementRef:L,isActiveTrigger:g}),z=Lz(C,{enabled:!K}).reference,Z={open:I},ie=R.useState("triggerProps",M);return Xn("button",t,{state:Z,ref:[n,_,L],props:[k,z,ie,{onPointerDown(){R.set("closeOnClick",f)},id:m,[d7.triggerDisabled]:K?"":void 0},p],stateAttributesMapping:b_})}),NB=D.createContext(void 0);function p7(){const e=D.useContext(NB);if(e===void 0)throw new Error(vr(70));return e}const R7=D.forwardRef(function(t,n){const{children:r,container:s,className:o,render:l,...c}=t,{portalNode:E,portalSubtree:f}=NG({container:s,ref:n,componentProps:t,elementProps:c});return!f&&!E?null:v.jsxs(D.Fragment,{children:[f,E&&zi.createPortal(r,E)]})}),S7=D.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return kS().useState("mounted")||r?v.jsx(NB.Provider,{value:r,children:v.jsx(R7,{ref:n,...s})}):null}),CB=D.createContext(void 0);function m7(){const e=D.useContext(CB);if(e===void 0)throw new Error(vr(71));return e}const A7=D.forwardRef(function(t,n){const{render:r,className:s,anchor:o,positionMethod:l="absolute",side:c="top",align:E="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:S=5,sticky:R=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=J8,...I}=t,C=kS(),L=p7(),N=C.useState("open"),y=C.useState("mounted"),_=C.useState("trackCursorAxis"),M=C.useState("disableHoverablePopup"),w=C.useState("floatingRootContext"),F=C.useState("instantType"),Y=C.useState("transitionStatus"),$=C.useState("hasViewport"),W=rB({anchor:o,positionMethod:l,floatingRootContext:w,mounted:y,side:c,sideOffset:f,align:E,alignOffset:h,collisionBoundary:d,collisionPadding:p,sticky:R,arrowPadding:S,disableAnchorTracking:m,keepMounted:L,collisionAvoidance:g,adaptiveOrigin:$?H9:void 0}),K=D.useMemo(()=>{const z={};return(!N||_==="both"||M)&&(z.pointerEvents="none"),{role:"presentation",hidden:!y,style:{...W.positionerStyles,...z}}},[N,_,M,y,W.positionerStyles]),q=D.useMemo(()=>({open:N,side:W.side,align:W.align,anchorHidden:W.anchorHidden,instant:_!=="none"?"tracking-cursor":F}),[N,W.side,W.align,W.anchorHidden,_,F]),j=D.useMemo(()=>({...q,arrowRef:W.arrowRef,arrowStyles:W.arrowStyles,arrowUncentered:W.arrowUncentered}),[q,W.arrowRef,W.arrowStyles,W.arrowUncentered]),k=Xn("div",t,{state:q,props:[K,VS(Y),I],ref:[n,C.useStateSetter("positionerElement")],stateAttributesMapping:PE});return v.jsx(CB.Provider,{value:j,children:k})}),g7={...PE,...bE},O7=D.forwardRef(function(t,n){const{className:r,render:s,...o}=t,l=kS(),{side:c,align:E}=m7(),f=l.useState("open"),h=l.useState("instantType"),d=l.useState("transitionStatus"),p=l.useState("popupProps"),S=l.useState("floatingRootContext");Gc({open:f,ref:l.context.popupRef,onComplete(){var C,L;f&&((L=(C=l.context).onOpenChangeComplete)==null||L.call(C,!0))}});const R=l.useState("disabled"),m=l.useState("closeDelay");return Dz(S,{enabled:!R,closeDelay:m}),Xn("div",t,{state:{open:f,side:c,align:E,instant:h,transitionStatus:d},ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[p,VS(d),o],stateAttributesMapping:g7})}),I7=function(t){const{delay:n,closeDelay:r,timeout:s=400}=t,o=D.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=D.useMemo(()=>({open:n,close:r}),[n,r]);return v.jsx(IB.Provider,{value:o,children:v.jsx(rK,{delay:l,timeoutMs:s,children:t.children})})};function _B({...e}){return v.jsx(I7,{delay:0,children:v.jsx(u7,{"data-slot":"tooltip",...e})})}function LB({...e}){return v.jsx(h7,{"data-slot":"tooltip-trigger",...e})}function yB({side:e="top",sideOffset:t=4,align:n="center",children:r,...s}){return v.jsx(S7,{children:v.jsx(A7,{align:n,side:e,sideOffset:t,className:"z-50",children:v.jsx(O7,{className:"rounded-md bg-popover/90 px-2.5 py-1 text-xs text-muted-foreground shadow-popover backdrop-blur-sm",...s,children:r})})})}const bB=D.createContext(void 0);function Al(e){const t=D.useContext(bB);if(e===!1&&t===void 0)throw new Error(vr(27));return t}const N7={...PE,...bE},C7=D.forwardRef(function(t,n){const{render:r,className:s,forceRender:o=!1,...l}=t,{store:c}=Al(),E=c.useState("open"),f=c.useState("nested"),h=c.useState("mounted"),d=c.useState("transitionStatus");return Xn("div",t,{state:{open:E,transitionStatus:d},ref:[c.context.backdropRef,n],stateAttributesMapping:N7,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:o||!f})}),_7=D.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:l=!0,...c}=t,{store:E}=Al(),f=E.useState("open");function h(R){f&&E.setOpen(!1,Gt(Z8,R.nativeEvent))}const{getButtonProps:d,buttonRef:p}=dT({disabled:o,native:l});return Xn("button",t,{state:{disabled:o},ref:[n,p],props:[{onClick:h},c,d]})}),L7=D.forwardRef(function(t,n){const{render:r,className:s,id:o,...l}=t,{store:c}=Al(),E=ul(o);return c.useSyncedValueWithCleanup("descriptionElementId",E),Xn("p",t,{ref:n,props:[{id:E},l]})});let y7=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),b7=(function(e){return e[e.open=ac.open]="open",e[e.closed=ac.closed]="closed",e[e.startingStyle=ac.startingStyle]="startingStyle",e[e.endingStyle=ac.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const PB=D.createContext(void 0);function P7(){const e=D.useContext(PB);if(e===void 0)throw new Error(vr(26));return e}const D7={...PE,...bE,nestedDialogOpen(e){return e?{[b7.nestedDialogOpen]:""}:null}},v7=D.forwardRef(function(t,n){const{className:r,finalFocus:s,initialFocus:o,render:l,...c}=t,{store:E}=Al(),f=E.useState("descriptionElementId"),h=E.useState("disablePointerDismissal"),d=E.useState("floatingRootContext"),p=E.useState("popupProps"),S=E.useState("modal"),R=E.useState("mounted"),m=E.useState("nested"),g=E.useState("nestedOpenDialogCount"),I=E.useState("open"),C=E.useState("openMethod"),L=E.useState("titleElementId"),N=E.useState("transitionStatus"),y=E.useState("role");P7(),Gc({open:I,ref:E.context.popupRef,onComplete(){var $,W;I&&((W=($=E.context).onOpenChangeComplete)==null||W.call($,!0))}});function _($){return $==="touch"?E.context.popupRef.current:!0}const M=o===void 0?_:o,w=g>0,Y=Xn("div",t,{state:{open:I,nested:m,transitionStatus:N,nestedDialogOpen:w},props:[p,{"aria-labelledby":L??void 0,"aria-describedby":f??void 0,role:y,tabIndex:-1,hidden:!R,onKeyDown($){hB.has($.key)&&$.stopPropagation()},style:{[y7.nestedDialogs]:g}},c],ref:[n,E.context.popupRef,E.useStateSetter("popupElement")],stateAttributesMapping:D7});return v.jsx(_G,{context:d,openInteractionType:C,disabled:!R,closeOnFocusOut:!h,initialFocus:M,returnFocus:s,modal:S!==!1,restoreFocus:"popup",children:Y})}),M7=D.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t,{store:o}=Al(),l=o.useState("mounted"),c=o.useState("modal"),E=o.useState("open");return l||r?v.jsx(PB.Provider,{value:r,children:v.jsxs(CG,{ref:n,...s,children:[l&&c===!0&&v.jsx(oB,{ref:o.context.internalBackdropRef,inert:ZG(!E)}),t.children]})}):null});function x7(e){const{store:t,parentContext:n,actionsRef:r}=e,s=t.useState("open"),o=t.useState("disablePointerDismissal"),l=t.useState("modal"),c=t.useState("popupElement"),{openMethod:E,triggerProps:f}=QG(s);BG(t);const{forceUnmount:h}=FG(s,t),d=at(F=>{const Y=Gt(F);return Y.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},Y}),p=D.useCallback(()=>{t.setOpen(!1,d(RG))},[t,d]);D.useImperativeHandle(r,()=>({unmount:h,close:p}),[h,p]);const S=YG({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[R,m]=D.useState(0),g=R===0,I=Fz(S),C=A_(S,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(F){if(!t.context.outsidePressEnabledRef.current||"button"in F&&F.button!==0||"touches"in F&&F.touches.length!==1)return!1;const Y=Qr(F);if(g&&!o){const $=Y;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===$||t.context.backdropRef.current===$||Nt($,c)&&!($!=null&&$.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:g});eB(s&&l===!0,c);const{getReferenceProps:L,getFloatingProps:N,getTriggerProps:y}=BS([I,C]);t.useContextCallback("onNestedDialogOpen",F=>{m(F+1)}),t.useContextCallback("onNestedDialogClose",()=>{m(0)}),D.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&s&&n.onNestedDialogOpen(R),n!=null&&n.onNestedDialogClose&&!s&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&s&&n.onNestedDialogClose()}),[s,n,R]);const _=D.useMemo(()=>L(f),[L,f]),M=D.useMemo(()=>y(f),[y,f]),w=D.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:E,activeTriggerProps:_,inactiveTriggerProps:M,popupProps:w,floatingRootContext:S,nestedOpenDialogCount:R})}const U7={...VG,modal:Qe(e=>e.modal),nested:Qe(e=>e.nested),nestedOpenDialogCount:Qe(e=>e.nestedOpenDialogCount),disablePointerDismissal:Qe(e=>e.disablePointerDismissal),openMethod:Qe(e=>e.openMethod),descriptionElementId:Qe(e=>e.descriptionElementId),titleElementId:Qe(e=>e.titleElementId),viewportElement:Qe(e=>e.viewportElement),role:Qe(e=>e.role)};class w7 extends a_{constructor(n){super(G7(n),{popupRef:D.createRef(),backdropRef:D.createRef(),internalBackdropRef:D.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new GS,onOpenChange:void 0,onOpenChangeComplete:void 0},U7);Te(this,"setOpen",(n,r)=>{var c,E,f,h;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(E=(c=this.context).onOpenChange)==null||E.call(c,n,r),r.isCanceled)return;const s={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};(f=this.state.floatingRootContext.context.events)==null||f.emit("openchange",s);const o={open:n},l=((h=r.trigger)==null?void 0:h.id)??null;(l||n)&&(o.activeTriggerId=l,o.activeTriggerElement=r.trigger??null),this.update(o)})}}function G7(e={}){return{...HG(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function B7(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:o,disablePointerDismissal:l=!1,modal:c=!0,actionsRef:E,handle:f,triggerId:h,defaultTriggerId:d=null}=e,p=Al(!0),S=!!p,R=Dr(()=>(f==null?void 0:f.store)??new w7({open:r,openProp:n,activeTriggerId:d,triggerIdProp:h,modal:c,disablePointerDismissal:l,nested:S})).current;i_(()=>{n===void 0&&R.state.open===!1&&r===!0&&R.update({open:!0,activeTriggerId:d})}),R.useControlledProp("openProp",n),R.useControlledProp("triggerIdProp",h),R.useSyncedValues({disablePointerDismissal:l,nested:S,modal:c}),R.useContextCallback("onOpenChange",s),R.useContextCallback("onOpenChangeComplete",o);const m=R.useState("payload");x7({store:R,actionsRef:E,parentContext:p==null?void 0:p.store.context});const g=D.useMemo(()=>({store:R}),[R]);return v.jsx(bB.Provider,{value:g,children:typeof t=="function"?t({payload:m}):t})}const F7=D.forwardRef(function(t,n){const{render:r,className:s,id:o,...l}=t,{store:c}=Al(),E=ul(o);return c.useSyncedValueWithCleanup("titleElementId",E),Xn("h2",t,{ref:n,props:[{id:E},l]})}),H7=D.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:l=!0,id:c,payload:E,handle:f,...h}=t,d=Al(!0),p=(f==null?void 0:f.store)??(d==null?void 0:d.store);if(!p)throw new Error(vr(79));const S=ul(c),R=p.useState("floatingRootContext"),m=p.useState("isOpenedByTrigger",S),g=D.useRef(null),{registerTrigger:I,isMountedByThisTrigger:C}=GG(S,g,p,{payload:E}),{getButtonProps:L,buttonRef:N}=dT({disabled:o,native:l}),y=LG(R,{enabled:R!=null}),_=BS([y]),M={disabled:o,open:m},w=p.useState("triggerProps",C);return Xn("button",t,{state:M,ref:[N,n,I,g],props:[_.getReferenceProps(),w,{[pG]:"",id:S},h,L],stateAttributesMapping:b_})});function V7(e){return v.jsx(B7,{...e})}function k7(e){return v.jsx(H7,{...e})}function Y7({children:e,...t}){return v.jsxs(M7,{children:[v.jsx(C7,{className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm"}),v.jsx(v7,{className:"fixed top-1/2 left-1/2 z-50 w-full max-w-sm -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-5",...t,children:e})]})}function W7(e){return v.jsx(F7,{className:"text-sm font-medium text-foreground",...e})}function j7(e){return v.jsx(L7,{className:"mt-1.5 text-xs text-muted-foreground",...e})}function X7({children:e}){return v.jsx("div",{className:"mt-4 flex justify-end gap-2",children:e})}function $7(e){return v.jsx(_7,{...e})}const DB="monocle_studio_sidebar_collapsed",hv=208,pv=64,Rv={duration:.34,ease:[.32,.72,0,1]},ZR={duration:.28,ease:[.22,1,.36,1]},vB={duration:.22,ease:[.32,.72,0,1]},K7={duration:.24,ease:[.23,1,.32,1]};function z7(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(DB)==="true"}catch{return!1}}const q7=[{to:"/requests",label:"Requests",icon:d6},{to:"/external-calls",label:"External calls",icon:A6},{to:"/jobs",label:"Jobs",icon:N6},{to:"/commands",label:"Commands",icon:p6},{to:"/queries",label:"Queries",icon:R6},{to:"/exceptions",label:"Exceptions",icon:f6},{to:"/logs",label:"Logs",icon:m6}];function YS({isCollapsed:e,className:t,children:n,maxWidth:r=160}){return v.jsx(vo.span,{initial:!1,animate:e?{opacity:0,maxWidth:0}:{opacity:1,maxWidth:r},transition:vB,className:["block min-w-0 overflow-hidden whitespace-nowrap will-change-[opacity,max-width]",t].filter(Boolean).join(" "),children:n})}function J7({isCollapsed:e,className:t,expandedHeight:n,children:r}){return v.jsx(vo.div,{initial:!1,animate:e?{opacity:0,maxHeight:0,marginTop:0}:{opacity:1,maxHeight:n,marginTop:8},transition:K7,className:["overflow-hidden will-change-[opacity,max-height,margin-top]",t].filter(Boolean).join(" "),children:r})}function Q7({isCollapsed:e}){return v.jsx("div",{className:["flex h-12 shrink-0 items-center border-b border-border/25 transition-[padding] duration-150 ease-out",e?"justify-center px-2":"px-5"].join(" "),children:v.jsxs("div",{className:["flex items-center select-none",e?"justify-center":"gap-2.5"].join(" "),children:[v.jsx(ZC,{className:"size-[18px] text-foreground"}),v.jsx(YS,{isCollapsed:e,className:"text-sm text-foreground font-heading",maxWidth:120,children:"Monocle Studio"})]})})}function Z7({item:e,isCollapsed:t}){const r=NC({select:o=>o.location.pathname}).startsWith(e.to),s=v.jsx(vo.div,{initial:!1,layout:!0,transition:ZR,children:v.jsx(AS,{to:e.to,search:o=>o,className:["group/link flex items-center overflow-hidden rounded-md text-[13px] transition-colors duration-150",t?"mx-auto size-9 justify-center px-0 py-0":"px-2.5 py-1.5",r?"bg-accent/30 text-accent-foreground font-medium shadow-card":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"].join(" "),children:v.jsxs(vo.div,{initial:!1,layout:!0,transition:ZR,className:["flex items-center",t?"justify-center":"gap-2.5"].join(" "),children:[v.jsx(Pr,{icon:e.icon,className:["size-[15px] shrink-0 transition-colors",r?"text-primary":"text-muted-foreground/70 group-hover/link:text-muted-foreground"].join(" ")}),v.jsx(YS,{isCollapsed:t,maxWidth:112,children:e.label})]})})});return t?v.jsx("li",{children:v.jsxs(_B,{children:[v.jsx(LB,{render:s}),v.jsx(yB,{side:"right",align:"center",children:e.label})]})}):v.jsx("li",{children:s})}function eq({isCollapsed:e}){const[t,n]=D.useState(!1),[r,s]=D.useState(!1),o=Ki(),l=async()=>{s(!0);try{await fetch("/api/data",{method:"DELETE"}),o.invalidateQueries(),n(!1)}finally{s(!1)}};return v.jsxs(V7,{open:t,onOpenChange:n,children:[v.jsx(k7,{title:"Reset data",className:["flex items-center overflow-hidden rounded-md text-[13px] text-muted-foreground transition-colors duration-150 hover:bg-accent/50 hover:text-foreground",e?"mx-auto size-9 justify-center px-0 py-0":"w-full px-2.5 py-1.5"].join(" "),children:v.jsxs(vo.div,{initial:!1,layout:!0,transition:ZR,className:["flex items-center",e?"justify-center":"gap-2.5"].join(" "),children:[v.jsx(Pr,{icon:S6,className:"size-[15px] shrink-0 text-muted-foreground/70"}),v.jsx(YS,{isCollapsed:e,maxWidth:88,children:"Reset data"})]})}),v.jsxs(Y7,{children:[v.jsx(W7,{children:"Reset all data?"}),v.jsx(j7,{children:"This will permanently delete all traces, logs, exceptions, and queries stored in Monocle Studio. This action cannot be undone."}),v.jsxs(X7,{children:[v.jsx($7,{render:v.jsx(cl,{variant:"ghost",children:"Cancel"})}),v.jsx(cl,{variant:"danger",onClick:l,disabled:r,children:r?"Resetting...":"Reset"})]})]})]})}function tq({children:e}){const[t,n]=D.useState(z7),r=()=>{n(s=>{const o=!s;try{window.localStorage.setItem(DB,String(o))}catch{}return o})};return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsxs("div",{className:"flex shrink-0 border-b border-border",children:[v.jsx(vo.div,{initial:!1,animate:{width:t?pv:hv},transition:Rv,className:"shrink-0 overflow-hidden border-r border-border bg-card",children:v.jsx(Q7,{isCollapsed:t})}),v.jsxs("div",{className:"flex min-w-0 flex-1 items-center bg-card",children:[v.jsx(cl,{variant:"ghost",size:"icon",className:"ml-2 shrink-0","aria-label":t?"Expand sidebar":"Collapse sidebar",onClick:r,children:v.jsx(vo.span,{initial:!1,animate:{rotate:t?180:0},transition:vB,className:"inline-flex",children:v.jsx(Pr,{icon:g6,className:"size-4"})})}),v.jsx("div",{className:"mx-3 h-4 w-px shrink-0 bg-border/80"}),v.jsx(a7,{className:"min-w-0 flex-1"})]})]}),v.jsxs("div",{className:"flex min-h-0 flex-1",children:[v.jsxs(vo.aside,{initial:!1,animate:{width:t?pv:hv},transition:Rv,className:"flex shrink-0 flex-col overflow-hidden border-r border-border bg-card",children:[v.jsx("nav",{className:t?"px-2 py-4":"px-3 py-4",children:v.jsx("ul",{className:"flex flex-col gap-0.5",children:q7.map(s=>v.jsx(Z7,{item:s,isCollapsed:t},s.to))})}),v.jsxs("div",{className:["mt-auto space-y-3 pb-4",t?"px-2":"px-3"].join(" "),children:[v.jsx(eq,{isCollapsed:t}),v.jsxs("a",{href:"https://monocle.sh",target:"_blank",rel:"noopener noreferrer",title:"Monocle Cloud",className:["group flex flex-col overflow-hidden rounded-lg border border-border/40 p-3 transition-colors duration-200 ease-out hover:border-border hover:bg-muted/20",t?"items-center justify-center":"items-start justify-start"].join(" "),children:[v.jsxs(vo.div,{initial:!1,layout:!0,transition:ZR,className:t?"flex items-center justify-center":"flex items-center gap-2",children:[v.jsx(ZC,{className:"size-4 text-white"}),v.jsx(YS,{isCollapsed:t,className:"text-xs font-medium text-foreground",maxWidth:112,children:"Monocle Cloud"})]}),v.jsxs(J7,{isCollapsed:t,expandedHeight:52,children:[v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"From localhost to production, we got you."}),v.jsxs("span",{className:"mt-2 inline-flex items-center gap-1 text-[11px] font-medium text-primary/70 transition-colors duration-300 group-hover:text-primary",children:["Try now ",v.jsx("span",{children:"→"})]})]})]})]})]}),v.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-hidden p-5",children:e})]})]})}const nq=["/requests","/queries","/exceptions","/logs","/jobs","/commands","/external-calls"];function v_(e){return nq.includes(e)}const Ji=t5({validateSearch:e=>({traceId:typeof e.traceId=="string"?e.traceId:void 0,service:typeof e.service=="string"?e.service:void 0,from:typeof e.from=="string"&&v_(e.from)?e.from:void 0}),component:()=>v.jsx(tq,{children:v.jsx(oU,{})})});function Bc(e){const[t,n]=D.useState(!1),r=D.useRef(e);return r.current=e,D.useEffect(()=>{const s=new EventSource("/api/events");return s.addEventListener("open",()=>n(!0)),s.addEventListener("ingested",o=>{const l=JSON.parse(o.data);r.current(l)}),s.addEventListener("error",()=>n(!1)),()=>s.close()},[]),{connected:t}}let Sv=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function MB(e){return D.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[Sv.checked]:""}:{[Sv.unchecked]:""}},...C_}),[e.indeterminate])}const rq=D.createContext({disabled:!1});function sq(){return D.useContext(rq)}function iq(e,t,n,r=!0,s){const[o,l]=D.useState(),c=ul(s?`${s}-label`:void 0),E=e??t??o;return Je(()=>{const f=e||t||!r?void 0:oq(n.current,c);o!==f&&l(f)}),E}function oq(e,t){const n=aq(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function aq(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const s=e.nextElementSibling;if(s&&s.htmlFor===n)return s}const r=e.labels;return r&&r[0]}const lq=D.createContext(void 0);function cq(e=!0){const t=D.useContext(lq);if(t===void 0&&!e)throw new Error(vr(3));return t}const xB=D.createContext(void 0);function uq(){const e=D.useContext(xB);if(e===void 0)throw new Error(vr(14));return e}const Eq="data-parent",fq=D.forwardRef(function(t,n){const{checked:r,className:s,defaultChecked:o=!1,"aria-labelledby":l,disabled:c=!1,id:E,indeterminate:f=!1,inputRef:h,name:d,onCheckedChange:p,parent:S=!1,readOnly:R=!1,render:m,required:g=!1,uncheckedValue:I,value:C,nativeButton:L=!1,...N}=t,{clearErrors:y}=L_(),{disabled:_,name:M,setDirty:w,setFilled:F,setFocused:Y,setTouched:$,state:W,validationMode:K,validityData:q,shouldValidateOnChange:j,validation:k}=HS(),z=sq(),{labelId:Z,controlId:ie,registerControlId:ne,getDescriptionProps:B}=__(),Q=cq(),ue=Q==null?void 0:Q.parent,le=ue&&Q.allValues,he=_||z.disabled||(Q==null?void 0:Q.disabled)||c,se=M??d,fe=C??se,ge=ul(),Le=ul();let We=ie;le?We=S?Le:`${ue.id}-${fe}`:E&&(We=E);let He={};le&&(S?He=Q.parent.getParentProps():fe&&(He=Q.parent.getChildProps(fe)));const ot=at(p),{checked:Me=r,indeterminate:Ue=f,onCheckedChange:Xe,...ct}=He,Be=Q==null?void 0:Q.value,ke=Q==null?void 0:Q.setValue,ve=Q==null?void 0:Q.defaultValue,Ce=D.useRef(null),oe=Dr(()=>Symbol("checkbox-control")),Ie=D.useRef(!1),{getButtonProps:Pe,buttonRef:xe}=dT({disabled:he,native:L}),Ze=(Q==null?void 0:Q.validation)??k,[Et,Xt]=pN({controlled:fe&&Be&&!S?Be.includes(fe):Me,default:fe&&ve&&!S?ve.includes(fe):o,name:"Checkbox",state:"checked"});Je(()=>{ne!==kr&&(Ie.current=!0,ne(oe.current,We))},[We,Q,ne,S,oe]),D.useEffect(()=>{const Yt=oe.current;return()=>{!Ie.current||ne===kr||(Ie.current=!1,ne(Yt,void 0))}},[ne,oe]),JG({enabled:!Q,id:ge,commit:Ze.commit,value:Et,controlRef:Ce,name:se,getValue:()=>Et});const Ut=D.useRef(null),ft=Pc(h,Ut,Ze.inputRef),Dt=iq(l,Z,Ut,!L,We??void 0);Je(()=>{Ut.current&&(Ut.current.indeterminate=Ue,Et&&F(!0))},[Et,Ue,F]),y_(Et,()=>{Q&&!S||(y(se),F(Et),w(Et!==q.initialValue),j()?Ze.commit(Et):Ze.commit(Et,!0))});const ht=ET({checked:Et,disabled:he,name:S?void 0:se,id:L?void 0:We??void 0,required:g,ref:ft,style:se?Bw:s_,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Yt){if(Yt.nativeEvent.defaultPrevented)return;const cn=Yt.target.checked,gt=Gt(LE,Yt.nativeEvent);if(Xe==null||Xe(cn,gt),ot(cn,gt),!gt.isCanceled&&(Xt(cn),fe&&Be&&ke&&!S)){const Jt=cn?[...Be,fe]:Be.filter(hn=>hn!==fe);ke(Jt,gt)}},onFocus(){var Yt;(Yt=Ce.current)==null||Yt.focus()}},C!==void 0?{value:(Q?Et&&C:C)||""}:Sr,B,Q?Ze.getValidationProps:Ze.getInputValidationProps),ln=le?!!Me:Et,zt=le&&Ue||f;D.useEffect(()=>{if(!ue||!fe)return;const Yt=ue.disabledStatesRef.current;return Yt.set(fe,he),()=>{Yt.delete(fe)}},[ue,he,fe]);const qt=D.useMemo(()=>({...W,checked:ln,disabled:he,readOnly:R,required:g,indeterminate:zt}),[W,ln,he,R,g,zt]),In=MB(qt),$t=Xn("span",t,{state:qt,ref:[xe,Ce,n,Q==null?void 0:Q.registerControlRef],props:[{id:L?We??void 0:ge,role:"checkbox","aria-checked":Ue?"mixed":Et,"aria-readonly":R||void 0,"aria-required":g||void 0,"aria-labelledby":Dt,[Eq]:S?"":void 0,onFocus(){Y(!0)},onBlur(){const Yt=Ut.current;Yt&&($(!0),Y(!1),K==="onBlur"&&Ze.commit(Q?Be:Yt.checked))},onClick(Yt){var cn;R||he||(Yt.preventDefault(),(cn=Ut.current)==null||cn.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Yt.shiftKey,ctrlKey:Yt.ctrlKey,altKey:Yt.altKey,metaKey:Yt.metaKey})))}},B,Ze.getValidationProps,N,ct,Pe],stateAttributesMapping:In});return v.jsxs(xB.Provider,{value:qt,children:[$t,!Et&&!Q&&se&&!S&&I!==void 0&&v.jsx("input",{type:"hidden",name:se,value:I}),v.jsx("input",{...ht})]})}),dq=D.forwardRef(function(t,n){const{render:r,className:s,keepMounted:o=!1,...l}=t,c=uq(),E=c.checked||c.indeterminate,{mounted:f,transitionStatus:h,setMounted:d}=wS(E),p=D.useRef(null),S={...c,transitionStatus:h};Gc({open:E,ref:p,onComplete(){E||d(!1)}});const R=MB(c),m=D.useMemo(()=>({...R,...bE,...C_}),[R]),g=o||f,I=Xn("span",t,{ref:[n,p],state:S,stateAttributesMapping:m,props:l});return g?I:null});function Tq({label:e,...t}){return v.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-muted-foreground",children:[v.jsx(fq,{className:"flex size-3.5 items-center justify-center rounded border border-border/50 bg-muted/30 transition-colors data-[checked]:border-primary data-[checked]:bg-primary",...t,children:v.jsx(dq,{className:"text-primary-foreground",children:v.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:v.jsx("path",{d:"M2 5L4 7L8 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}),e]})}function Fc({title:e,children:t}){return v.jsxs("div",{className:"mb-4 flex min-h-10 shrink-0 items-center gap-3 border-b border-border/30 pb-4",children:[v.jsx("h1",{className:"font-heading text-lg text-foreground",children:e}),t&&v.jsx("div",{className:"ml-auto flex items-center gap-2",children:t})]})}/**
81
+ * table-core
82
+ *
83
+ * Copyright (c) TanStack
84
+ *
85
+ * This source code is licensed under the MIT license found in the
86
+ * LICENSE.md file in the root directory of this source tree.
87
+ *
88
+ * @license MIT
89
+ */function Qa(e,t){return typeof e=="function"?e(t):e}function xs(e,t){return n=>{t.setState(r=>({...r,[e]:Qa(n,r[e])}))}}function WS(e){return e instanceof Function}function hq(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function pq(e,t){const n=[],r=s=>{s.forEach(o=>{n.push(o);const l=t(o);l!=null&&l.length&&r(l)})};return r(e),n}function Rt(e,t,n){let r=[],s;return o=>{let l;n.key&&n.debug&&(l=Date.now());const c=e(o);if(!(c.length!==r.length||c.some((h,d)=>r[d]!==h)))return s;r=c;let f;if(n.key&&n.debug&&(f=Date.now()),s=t(...c),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-l)*100)/100,d=Math.round((Date.now()-f)*100)/100,p=d/16,S=(R,m)=>{for(R=String(R);R.length<m;)R=" "+R;return R};console.info(`%c⏱ ${S(d,5)} /${S(h,5)} ms`,`
90
+ font-size: .6rem;
91
+ font-weight: bold;
92
+ color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function St(e,t,n,r){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:!1,onChange:r}}function Rq(e,t,n,r){const s=()=>{var l;return(l=o.getValue())!=null?l:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:s,getContext:Rt(()=>[e,n,t,o],(l,c,E,f)=>({table:l,column:c,row:E,cell:f,getValue:f.getValue,renderValue:f.renderValue}),St(e.options,"debugCells"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(o,n,t,e)},{}),o}function Sq(e,t,n,r){var s,o;const c={...e._getDefaultColumnDef(),...t},E=c.accessorKey;let f=(s=(o=c.id)!=null?o:E?typeof String.prototype.replaceAll=="function"?E.replaceAll(".","_"):E.replace(/\./g,"_"):void 0)!=null?s:typeof c.header=="string"?c.header:void 0,h;if(c.accessorFn?h=c.accessorFn:E&&(E.includes(".")?h=p=>{let S=p;for(const m of E.split(".")){var R;S=(R=S)==null?void 0:R[m]}return S}:h=p=>p[c.accessorKey]),!f)throw new Error;let d={id:`${String(f)}`,accessorFn:h,parent:r,depth:n,columnDef:c,columns:[],getFlatColumns:Rt(()=>[!0],()=>{var p;return[d,...(p=d.columns)==null?void 0:p.flatMap(S=>S.getFlatColumns())]},St(e.options,"debugColumns")),getLeafColumns:Rt(()=>[e._getOrderColumnsFn()],p=>{var S;if((S=d.columns)!=null&&S.length){let R=d.columns.flatMap(m=>m.getLeafColumns());return p(R)}return[d]},St(e.options,"debugColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(d,e);return d}const Gr="debugHeaders";function mv(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],c=E=>{E.subHeaders&&E.subHeaders.length&&E.subHeaders.map(c),l.push(E)};return c(o),l},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(o,e)}),o}const mq={createTable:e=>{e.getHeaderGroups=Rt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>{var o,l;const c=(o=r==null?void 0:r.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?o:[],E=(l=s==null?void 0:s.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?l:[],f=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(s!=null&&s.includes(d.id)));return Pp(t,[...c,...f,...E],e)},St(e.options,Gr)),e.getCenterHeaderGroups=Rt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(s!=null&&s.includes(o.id))),Pp(t,n,e,"center")),St(e.options,Gr)),e.getLeftHeaderGroups=Rt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var s;const o=(s=r==null?void 0:r.map(l=>n.find(c=>c.id===l)).filter(Boolean))!=null?s:[];return Pp(t,o,e,"left")},St(e.options,Gr)),e.getRightHeaderGroups=Rt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var s;const o=(s=r==null?void 0:r.map(l=>n.find(c=>c.id===l)).filter(Boolean))!=null?s:[];return Pp(t,o,e,"right")},St(e.options,Gr)),e.getFooterGroups=Rt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),St(e.options,Gr)),e.getLeftFooterGroups=Rt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),St(e.options,Gr)),e.getCenterFooterGroups=Rt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),St(e.options,Gr)),e.getRightFooterGroups=Rt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),St(e.options,Gr)),e.getFlatHeaders=Rt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),St(e.options,Gr)),e.getLeftFlatHeaders=Rt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),St(e.options,Gr)),e.getCenterFlatHeaders=Rt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),St(e.options,Gr)),e.getRightFlatHeaders=Rt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),St(e.options,Gr)),e.getCenterLeafHeaders=Rt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),St(e.options,Gr)),e.getLeftLeafHeaders=Rt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),St(e.options,Gr)),e.getRightLeafHeaders=Rt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),St(e.options,Gr)),e.getLeafHeaders=Rt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var s,o,l,c,E,f;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(l=(c=n[0])==null?void 0:c.headers)!=null?l:[],...(E=(f=r[0])==null?void 0:f.headers)!=null?E:[]].map(h=>h.getLeafHeaders()).flat()},St(e.options,Gr))}};function Pp(e,t,n,r){var s,o;let l=0;const c=function(p,S){S===void 0&&(S=1),l=Math.max(l,S),p.filter(R=>R.getIsVisible()).forEach(R=>{var m;(m=R.columns)!=null&&m.length&&c(R.columns,S+1)},0)};c(e);let E=[];const f=(p,S)=>{const R={depth:S,id:[r,`${S}`].filter(Boolean).join("_"),headers:[]},m=[];p.forEach(g=>{const I=[...m].reverse()[0],C=g.column.depth===R.depth;let L,N=!1;if(C&&g.column.parent?L=g.column.parent:(L=g.column,N=!0),I&&(I==null?void 0:I.column)===L)I.subHeaders.push(g);else{const y=mv(n,L,{id:[r,S,L.id,g==null?void 0:g.id].filter(Boolean).join("_"),isPlaceholder:N,placeholderId:N?`${m.filter(_=>_.column===L).length}`:void 0,depth:S,index:m.length});y.subHeaders.push(g),m.push(y)}R.headers.push(g),g.headerGroup=R}),E.push(R),S>0&&f(m,S-1)},h=t.map((p,S)=>mv(n,p,{depth:l,index:S}));f(h,l-1),E.reverse();const d=p=>p.filter(R=>R.column.getIsVisible()).map(R=>{let m=0,g=0,I=[0];R.subHeaders&&R.subHeaders.length?(I=[],d(R.subHeaders).forEach(L=>{let{colSpan:N,rowSpan:y}=L;m+=N,I.push(y)})):m=1;const C=Math.min(...I);return g=g+C,R.colSpan=m,R.rowSpan=g,{colSpan:m,rowSpan:g}});return d((s=(o=E[0])==null?void 0:o.headers)!=null?s:[]),E}const Aq=(e,t,n,r,s,o,l)=>{let c={id:t,index:r,original:n,depth:s,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:E=>{if(c._valuesCache.hasOwnProperty(E))return c._valuesCache[E];const f=e.getColumn(E);if(f!=null&&f.accessorFn)return c._valuesCache[E]=f.accessorFn(c.original,r),c._valuesCache[E]},getUniqueValues:E=>{if(c._uniqueValuesCache.hasOwnProperty(E))return c._uniqueValuesCache[E];const f=e.getColumn(E);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(c._uniqueValuesCache[E]=f.columnDef.getUniqueValues(c.original,r),c._uniqueValuesCache[E]):(c._uniqueValuesCache[E]=[c.getValue(E)],c._uniqueValuesCache[E])},renderValue:E=>{var f;return(f=c.getValue(E))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>pq(c.subRows,E=>E.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let E=[],f=c;for(;;){const h=f.getParentRow();if(!h)break;E.push(h),f=h}return E.reverse()},getAllCells:Rt(()=>[e.getAllLeafColumns()],E=>E.map(f=>Rq(e,c,f,f.id)),St(e.options,"debugRows")),_getAllCellsByColumnId:Rt(()=>[c.getAllCells()],E=>E.reduce((f,h)=>(f[h.column.id]=h,f),{}),St(e.options,"debugRows"))};for(let E=0;E<e._features.length;E++){const f=e._features[E];f==null||f.createRow==null||f.createRow(c,e)}return c},gq={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},UB=(e,t,n)=>{var r,s;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};UB.autoRemove=e=>Ni(e);const wB=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};wB.autoRemove=e=>Ni(e);const GB=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};GB.autoRemove=e=>Ni(e);const BB=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};BB.autoRemove=e=>Ni(e);const FB=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});FB.autoRemove=e=>Ni(e)||!(e!=null&&e.length);const HB=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});HB.autoRemove=e=>Ni(e)||!(e!=null&&e.length);const VB=(e,t,n)=>e.getValue(t)===n;VB.autoRemove=e=>Ni(e);const kB=(e,t,n)=>e.getValue(t)==n;kB.autoRemove=e=>Ni(e);const M_=(e,t,n)=>{let[r,s]=n;const o=e.getValue(t);return o>=r&&o<=s};M_.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,l=n===null||Number.isNaN(s)?1/0:s;if(o>l){const c=o;o=l,l=c}return[o,l]};M_.autoRemove=e=>Ni(e)||Ni(e[0])&&Ni(e[1]);const No={includesString:UB,includesStringSensitive:wB,equalsString:GB,arrIncludes:BB,arrIncludesAll:FB,arrIncludesSome:HB,equals:VB,weakEquals:kB,inNumberRange:M_};function Ni(e){return e==null||e===""}const Oq={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xs("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?No.includesString:typeof r=="number"?No.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?No.equals:Array.isArray(r)?No.arrIncludes:No.weakEquals},e.getFilterFn=()=>{var n,r;return WS(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:No[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const s=e.getFilterFn(),o=r==null?void 0:r.find(h=>h.id===e.id),l=Qa(n,o?o.value:void 0);if(Av(s,l,e)){var c;return(c=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?c:[]}const E={id:e.id,value:l};if(o){var f;return(f=r==null?void 0:r.map(h=>h.id===e.id?E:h))!=null?f:[]}return r!=null&&r.length?[...r,E]:[E]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=s=>{var o;return(o=Qa(t,s))==null?void 0:o.filter(l=>{const c=n.find(E=>E.id===l.id);if(c){const E=c.getFilterFn();if(Av(E,l.value,c))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Av(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Iq=(e,t,n)=>n.reduce((r,s)=>{const o=s.getValue(e);return r+(typeof o=="number"?o:0)},0),Nq=(e,t,n)=>{let r;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Cq=(e,t,n)=>{let r;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},_q=(e,t,n)=>{let r,s;return n.forEach(o=>{const l=o.getValue(e);l!=null&&(r===void 0?l>=l&&(r=s=l):(r>l&&(r=l),s<l&&(s=l)))}),[r,s]},Lq=(e,t)=>{let n=0,r=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},yq=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!hq(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),s=n.sort((o,l)=>o-l);return n.length%2!==0?s[r]:(s[r-1]+s[r])/2},bq=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Pq=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Dq=(e,t)=>t.length,hO={sum:Iq,min:Nq,max:Cq,extent:_q,mean:Lq,median:yq,unique:bq,uniqueCount:Pq,count:Dq},vq={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xs("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return hO.sum;if(Object.prototype.toString.call(r)==="[object Date]")return hO.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return WS(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:hO[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Mq(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(l=>l.id===o)).filter(Boolean),...r]}const xq={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xs("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Rt(n=>[Sd(t,n)],n=>n.findIndex(r=>r.id===e.id),St(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Sd(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const s=Sd(t,n);return((r=s[s.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Rt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const l=[...t],c=[...s];for(;c.length&&l.length;){const E=l.shift(),f=c.findIndex(h=>h.id===E);f>-1&&o.push(c.splice(f,1)[0])}o=[...o,...c]}return Mq(o,n,r)},St(e.options,"debugTable"))}},pO=()=>({left:[],right:[]}),Uq={getInitialState:e=>({columnPinning:pO(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xs("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,l;if(n==="right"){var c,E;return{left:((c=s==null?void 0:s.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((E=s==null?void 0:s.right)!=null?E:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var f,h;return{left:[...((f=s==null?void 0:s.left)!=null?f:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((h=s==null?void 0:s.right)!=null?h:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=s==null?void 0:s.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((l=s==null?void 0:s.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var s,o,l;return((s=r.columnDef.enablePinning)!=null?s:!0)&&((o=(l=t.options.enableColumnPinning)!=null?l:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(c=>c.id),{left:r,right:s}=t.getState().columnPinning,o=n.some(c=>r==null?void 0:r.includes(c)),l=n.some(c=>s==null?void 0:s.includes(c));return o?"left":l?"right":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();return s?(n=(r=t.getState().columnPinning)==null||(r=r[s])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Rt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,s)=>{const o=[...r??[],...s??[]];return n.filter(l=>!o.includes(l.column.id))},St(t.options,"debugRows")),e.getLeftVisibleCells=Rt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(l=>l.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),St(t.options,"debugRows")),e.getRightVisibleCells=Rt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(l=>l.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),St(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?pO():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:pO())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var s,o;return!!((s=r.left)!=null&&s.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Rt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),St(e.options,"debugColumns")),e.getRightLeafColumns=Rt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),St(e.options,"debugColumns")),e.getCenterLeafColumns=Rt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const s=[...n??[],...r??[]];return t.filter(o=>!s.includes(o.id))},St(e.options,"debugColumns"))}};function wq(e){return e||(typeof document<"u"?document:null)}const Dp={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},RO=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gq={getDefaultColumnDef:()=>Dp,getInitialState:e=>({columnSizing:{},columnSizingInfo:RO(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xs("columnSizing",e),onColumnSizingInfoChange:xs("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Dp.minSize,(r=o??e.columnDef.size)!=null?r:Dp.size),(s=e.columnDef.maxSize)!=null?s:Dp.maxSize)},e.getStart=Rt(n=>[n,Sd(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),St(t.options,"debugColumns")),e.getAfter=Rt(n=>[n,Sd(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),St(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...s}=n;return s})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=s=>{if(s.subHeaders.length)s.subHeaders.forEach(r);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),s=r==null?void 0:r.getCanResize();return o=>{if(!r||!s||(o.persist==null||o.persist(),SO(o)&&o.touches&&o.touches.length>1))return;const l=e.getSize(),c=e?e.getLeafHeaders().map(I=>[I.column.id,I.column.getSize()]):[[r.id,r.getSize()]],E=SO(o)?Math.round(o.touches[0].clientX):o.clientX,f={},h=(I,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(L=>{var N,y;const _=t.options.columnResizeDirection==="rtl"?-1:1,M=(C-((N=L==null?void 0:L.startOffset)!=null?N:0))*_,w=Math.max(M/((y=L==null?void 0:L.startSize)!=null?y:0),-.999999);return L.columnSizingStart.forEach(F=>{let[Y,$]=F;f[Y]=Math.round(Math.max($+$*w,0)*100)/100}),{...L,deltaOffset:M,deltaPercentage:w}}),(t.options.columnResizeMode==="onChange"||I==="end")&&t.setColumnSizing(L=>({...L,...f})))},d=I=>h("move",I),p=I=>{h("end",I),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},S=wq(n),R={moveHandler:I=>d(I.clientX),upHandler:I=>{S==null||S.removeEventListener("mousemove",R.moveHandler),S==null||S.removeEventListener("mouseup",R.upHandler),p(I.clientX)}},m={moveHandler:I=>(I.cancelable&&(I.preventDefault(),I.stopPropagation()),d(I.touches[0].clientX),!1),upHandler:I=>{var C;S==null||S.removeEventListener("touchmove",m.moveHandler),S==null||S.removeEventListener("touchend",m.upHandler),I.cancelable&&(I.preventDefault(),I.stopPropagation()),p((C=I.touches[0])==null?void 0:C.clientX)}},g=Bq()?{passive:!1}:!1;SO(o)?(S==null||S.addEventListener("touchmove",m.moveHandler,g),S==null||S.addEventListener("touchend",m.upHandler,g)):(S==null||S.addEventListener("mousemove",R.moveHandler,g),S==null||S.addEventListener("mouseup",R.upHandler,g)),t.setColumnSizingInfo(I=>({...I,startOffset:E,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?RO():(n=e.initialState.columnSizingInfo)!=null?n:RO())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0}}};let vp=null;function Bq(){if(typeof vp=="boolean")return vp;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return vp=e,vp}function SO(e){return e.type==="touchstart"}const Fq={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xs("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Rt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),St(t.options,"debugRows")),e.getVisibleCells=Rt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,s)=>[...n,...r,...s],St(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Rt(()=>[r(),r().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),St(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Sd(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Hq={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Vq={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xs("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>No.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return WS(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:No[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},kq={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xs("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var s,o;e.setExpanded(r?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const l=o.split(".");r=Math.max(r,l.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var s;const o=r===!0?!0:!!(r!=null&&r[e.id]);let l={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(c=>{l[c]=!0}):l=r,n=(s=n)!=null?s:!o,!o&&n)return{...l,[e.id]:!0};if(o&&!n){const{[e.id]:c,...E}=l;return E}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},MN=0,xN=10,mO=()=>({pageIndex:MN,pageSize:xN}),Yq={getInitialState:e=>({...e,pagination:{...mO(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xs("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const s=o=>Qa(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?mO():(s=e.initialState.pagination)!=null?s:mO())},e.setPageIndex=r=>{e.setPagination(s=>{let o=Qa(r,s.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,l)),{...s,pageIndex:o}})},e.resetPageIndex=r=>{var s,o;e.setPageIndex(r?MN:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:MN)},e.resetPageSize=r=>{var s,o;e.setPageSize(r?xN:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:xN)},e.setPageSize=r=>{e.setPagination(s=>{const o=Math.max(1,Qa(r,s.pageSize)),l=s.pageSize*s.pageIndex,c=Math.floor(l/o);return{...s,pageIndex:c,pageSize:o}})},e.setPageCount=r=>e.setPagination(s=>{var o;let l=Qa(r,(o=e.options.pageCount)!=null?o:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...s,pageCount:l}}),e.getPageOptions=Rt(()=>[e.getPageCount()],r=>{let s=[];return r&&r>0&&(s=[...new Array(r)].fill(null).map((o,l)=>l)),s},St(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:r<s-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},AO=()=>({top:[],bottom:[]}),Wq={getInitialState:e=>({rowPinning:AO(),...e}),getDefaultOptions:e=>({onRowPinningChange:xs("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,s)=>{const o=r?e.getLeafRows().map(E=>{let{id:f}=E;return f}):[],l=s?e.getParentRows().map(E=>{let{id:f}=E;return f}):[],c=new Set([...l,e.id,...o]);t.setRowPinning(E=>{var f,h;if(n==="bottom"){var d,p;return{top:((d=E==null?void 0:E.top)!=null?d:[]).filter(m=>!(c!=null&&c.has(m))),bottom:[...((p=E==null?void 0:E.bottom)!=null?p:[]).filter(m=>!(c!=null&&c.has(m))),...Array.from(c)]}}if(n==="top"){var S,R;return{top:[...((S=E==null?void 0:E.top)!=null?S:[]).filter(m=>!(c!=null&&c.has(m))),...Array.from(c)],bottom:((R=E==null?void 0:E.bottom)!=null?R:[]).filter(m=>!(c!=null&&c.has(m)))}}return{top:((f=E==null?void 0:E.top)!=null?f:[]).filter(m=>!(c!=null&&c.has(m))),bottom:((h=E==null?void 0:E.bottom)!=null?h:[]).filter(m=>!(c!=null&&c.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:s}=t.options;return typeof r=="function"?r(e):(n=r??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:s}=t.getState().rowPinning,o=n.some(c=>r==null?void 0:r.includes(c)),l=n.some(c=>s==null?void 0:s.includes(c));return o?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(l=>{let{id:c}=l;return c});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?AO():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:AO())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var s,o;return!!((s=r.top)!=null&&s.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(l=>{const c=e.getRow(l,!0);return c.getIsAllParentsExpanded()?c:null}):(n??[]).map(l=>t.find(c=>c.id===l))).filter(Boolean).map(l=>({...l,position:r}))},e.getTopRows=Rt(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),St(e.options,"debugRows")),e.getBottomRows=Rt(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),St(e.options,"debugRows")),e.getCenterRows=Rt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const s=new Set([...n??[],...r??[]]);return t.filter(o=>!s.has(o.id))},St(e.options,"debugRows"))}},jq={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xs("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):s.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{UN(s,o.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Rt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?gO(e,n):{rows:[],flatRows:[],rowsById:{}},St(e.options,"debugTable")),e.getFilteredSelectedRowModel=Rt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?gO(e,n):{rows:[],flatRows:[],rowsById:{}},St(e.options,"debugTable")),e.getGroupedSelectedRowModel=Rt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?gO(e,n):{rows:[],flatRows:[],rowsById:{}},St(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(s=>!n[s.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var l;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const c={...o};return UN(c,e.id,n,(l=r==null?void 0:r.selectChildren)!=null?l:!0,t),c})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return x_(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return wN(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return wN(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var s;n&&e.toggleSelected((s=r.target)==null?void 0:s.checked)}}}},UN=(e,t,n,r,s)=>{var o;const l=s.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach(c=>delete e[c]),l.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=l.subRows)!=null&&o.length&&l.getCanSelectSubRows()&&l.subRows.forEach(c=>UN(e,c.id,n,r,s))};function gO(e,t){const n=e.getState().rowSelection,r=[],s={},o=function(l,c){return l.map(E=>{var f;const h=x_(E,n);if(h&&(r.push(E),s[E.id]=E),(f=E.subRows)!=null&&f.length&&(E={...E,subRows:o(E.subRows)}),h)return E}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:s}}function x_(e,t){var n;return(n=t[e.id])!=null?n:!1}function wN(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let s=!0,o=!1;return e.subRows.forEach(l=>{if(!(o&&!s)&&(l.getCanSelect()&&(x_(l,t)?o=!0:s=!1),l.subRows&&l.subRows.length)){const c=wN(l,t);c==="all"?o=!0:(c==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const GN=/([0-9]+)/gm,Xq=(e,t,n)=>YB(El(e.getValue(n)).toLowerCase(),El(t.getValue(n)).toLowerCase()),$q=(e,t,n)=>YB(El(e.getValue(n)),El(t.getValue(n))),Kq=(e,t,n)=>U_(El(e.getValue(n)).toLowerCase(),El(t.getValue(n)).toLowerCase()),zq=(e,t,n)=>U_(El(e.getValue(n)),El(t.getValue(n))),qq=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},Jq=(e,t,n)=>U_(e.getValue(n),t.getValue(n));function U_(e,t){return e===t?0:e>t?1:-1}function El(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function YB(e,t){const n=e.split(GN).filter(Boolean),r=t.split(GN).filter(Boolean);for(;n.length&&r.length;){const s=n.shift(),o=r.shift(),l=parseInt(s,10),c=parseInt(o,10),E=[l,c].sort();if(isNaN(E[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(E[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}return n.length-r.length}const qf={alphanumeric:Xq,alphanumericCaseSensitive:$q,text:Kq,textCaseSensitive:zq,datetime:qq,basic:Jq},Qq={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xs("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const s of n){const o=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return qf.datetime;if(typeof o=="string"&&(r=!0,o.split(GN).length>1))return qf.alphanumeric}return r?qf.text:qf.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return WS(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:qf[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(l=>{const c=l==null?void 0:l.find(S=>S.id===e.id),E=l==null?void 0:l.findIndex(S=>S.id===e.id);let f=[],h,d=o?n:s==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&r?c?h="toggle":h="add":l!=null&&l.length&&E!==l.length-1?h="replace":c?h="toggle":h="replace",h==="toggle"&&(o||s||(h="remove")),h==="add"){var p;f=[...l,{id:e.id,desc:d}],f.splice(0,f.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=l.map(S=>S.id===e.id?{...S,desc:d}:S):h==="remove"?f=l.filter(S=>S.id!==e.id):f=[{id:e.id,desc:d}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,s;const o=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:l==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Zq=[mq,Fq,xq,Uq,gq,Oq,Hq,Vq,Qq,vq,kq,Yq,Wq,jq,Gq];function eJ(e){var t,n;const r=[...Zq,...(t=e._features)!=null?t:[]];let s={_features:r};const o=s._features.reduce((p,S)=>Object.assign(p,S.getDefaultOptions==null?void 0:S.getDefaultOptions(s)),{}),l=p=>s.options.mergeOptions?s.options.mergeOptions(o,p):{...o,...p};let E={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(p=>{var S;E=(S=p.getInitialState==null?void 0:p.getInitialState(E))!=null?S:E});const f=[];let h=!1;const d={_features:r,options:{...o,...e},initialState:E,_queue:p=>{f.push(p),h||(h=!0,Promise.resolve().then(()=>{for(;f.length;)f.shift()();h=!1}).catch(S=>setTimeout(()=>{throw S})))},reset:()=>{s.setState(s.initialState)},setOptions:p=>{const S=Qa(p,s.options);s.options=l(S)},getState:()=>s.options.state,setState:p=>{s.options.onStateChange==null||s.options.onStateChange(p)},_getRowId:(p,S,R)=>{var m;return(m=s.options.getRowId==null?void 0:s.options.getRowId(p,S,R))!=null?m:`${R?[R.id,S].join("."):S}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(p,S)=>{let R=(S?s.getPrePaginationRowModel():s.getRowModel()).rowsById[p];if(!R&&(R=s.getCoreRowModel().rowsById[p],!R))throw new Error;return R},_getDefaultColumnDef:Rt(()=>[s.options.defaultColumn],p=>{var S;return p=(S=p)!=null?S:{},{header:R=>{const m=R.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:R=>{var m,g;return(m=(g=R.renderValue())==null||g.toString==null?void 0:g.toString())!=null?m:null},...s._features.reduce((R,m)=>Object.assign(R,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...p}},St(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:Rt(()=>[s._getColumnDefs()],p=>{const S=function(R,m,g){return g===void 0&&(g=0),R.map(I=>{const C=Sq(s,I,g,m),L=I;return C.columns=L.columns?S(L.columns,C,g+1):[],C})};return S(p)},St(e,"debugColumns")),getAllFlatColumns:Rt(()=>[s.getAllColumns()],p=>p.flatMap(S=>S.getFlatColumns()),St(e,"debugColumns")),_getAllFlatColumnsById:Rt(()=>[s.getAllFlatColumns()],p=>p.reduce((S,R)=>(S[R.id]=R,S),{}),St(e,"debugColumns")),getAllLeafColumns:Rt(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(p,S)=>{let R=p.flatMap(m=>m.getLeafColumns());return S(R)},St(e,"debugColumns")),getColumn:p=>s._getAllFlatColumnsById()[p]};Object.assign(s,d);for(let p=0;p<s._features.length;p++){const S=s._features[p];S==null||S.createTable==null||S.createTable(s)}return s}function tJ(){return e=>Rt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(s,o,l){o===void 0&&(o=0);const c=[];for(let f=0;f<s.length;f++){const h=Aq(e,e._getRowId(s[f],f,l),s[f],f,o,void 0,l==null?void 0:l.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,c.push(h),e.options.getSubRows){var E;h.originalSubRows=e.options.getSubRows(s[f],f),(E=h.originalSubRows)!=null&&E.length&&(h.subRows=r(h.originalSubRows,o+1,h))}}return c};return n.rows=r(t),n},St(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function nJ(){return e=>Rt(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:rJ(n),St(e.options,"debugTable"))}function rJ(e){const t=[],n=r=>{var s;t.push(r),(s=r.subRows)!=null&&s.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}/**
93
+ * react-table
94
+ *
95
+ * Copyright (c) TanStack
96
+ *
97
+ * This source code is licensed under the MIT license found in the
98
+ * LICENSE.md file in the root directory of this source tree.
99
+ *
100
+ * @license MIT
101
+ */function gv(e,t){return e?sJ(e)?D.createElement(e,t):e:null}function sJ(e){return iJ(e)||typeof e=="function"||oJ(e)}function iJ(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function oJ(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function aJ(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=D.useState(()=>({current:eJ(t)})),[r,s]=D.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:l=>{s(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}function lJ({children:e,onLoadMore:t,isLoadingMore:n,emptyState:r,isEmpty:s,className:o=""}){const l=D.useRef(null),c=D.useRef(null);return D.useEffect(()=>{if(!t||!c.current)return;const E=new IntersectionObserver(f=>{f[0].isIntersecting&&t()},{root:l.current,rootMargin:"200px"});return E.observe(c.current),()=>E.disconnect()},[t]),s&&r?v.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:r}):v.jsxs("div",{ref:l,className:`h-full overflow-auto ${o}`,children:[e,v.jsx("div",{ref:c,children:n&&v.jsx("div",{className:"px-3 py-2 text-center text-xs text-muted-foreground",children:"Loading more..."})})]})}function cJ(e){const n=Date.now()-e.getTime();return n<1e3?"just now":n<6e4?`${Math.floor(n/1e3)}s ago`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`}function uJ(e){return e.toLocaleString("en-US",{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function WB({date:e}){const t=typeof e=="string"?new Date(e):e,[,n]=D.useState(0);return D.useEffect(()=>{const r=setInterval(()=>n(s=>s+1),1e4);return()=>clearInterval(r)},[]),v.jsxs(_B,{children:[v.jsx(LB,{className:"cursor-default font-mono text-xs text-muted-foreground",children:cJ(t)}),v.jsx(yB,{children:v.jsx("span",{className:"font-mono",children:uJ(t)})})]})}function w_({traceId:e}){const[t,n]=D.useState(!1),r=Us(),s=NC({select:c=>c.location.pathname}),o=c=>{c.stopPropagation(),r({to:"/traces/$traceId",params:{traceId:e},...v_(s)?{search:{from:s}}:{}})},l=c=>{c.stopPropagation(),navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)};return v.jsxs("span",{className:"inline-flex items-center",title:e,children:[v.jsxs("button",{onClick:o,className:"inline-flex items-center gap-1 rounded-l-md border border-border/50 px-2 py-1 font-mono text-xs text-muted-foreground transition-colors hover:border-primary/30 hover:text-primary",children:[e.substring(0,10),v.jsx(Pr,{icon:K1,size:10,className:"shrink-0 opacity-50"})]}),v.jsx("button",{onClick:l,className:"inline-flex items-center self-stretch rounded-r-md border border-l-transparent border-border/50 px-1.5 text-muted-foreground/40 transition-colors hover:border-l-primary/30 hover:border-primary/30 hover:text-foreground",children:v.jsx(Pr,{icon:t?_S:CS,size:12,className:t?"text-emerald-400":""})})]})}function EJ(){return{id:"traceId",header:()=>v.jsx("span",{className:"text-right",children:"Trace"}),cell:({row:e})=>v.jsx(w_,{traceId:e.original.traceId}),meta:{className:"w-28 py-2 pl-3 pr-1 text-right",headerClassName:"w-28 py-2 pl-3 pr-1 text-right"}}}function jB(e){return{id:"time",header:()=>v.jsx("span",{className:"text-right",children:"Time"}),cell:({row:t})=>v.jsx(WB,{date:e(t.original)}),meta:{className:"w-24 py-2 pl-1 pr-3 text-right",headerClassName:"w-24 py-2 pl-1 pr-3 text-right"}}}function XB(){return{id:"serviceName",header:()=>v.jsx("span",{className:"text-right",children:"Service"}),cell:({row:e})=>v.jsx("span",{className:"truncate text-muted-foreground/60",children:e.original.serviceName}),meta:{className:"w-24 px-3 py-2 text-right",headerClassName:"w-24 px-3 py-2 text-right"}}}function DE(e){return[XB(),EJ(),jB(e)]}function G_(){return{id:"expand",header:"",cell:({row:e})=>v.jsx("button",{type:"button",className:"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:t=>{t.stopPropagation(),e.toggleExpanded()},children:v.jsx(Pr,{icon:e.getIsExpanded()?QC:$1,className:"size-3.5"})}),meta:{className:"w-10 px-2 py-2",headerClassName:"w-10 px-2 py-2"}}}function Hc({columns:e,data:t,onRowClick:n,onLoadMore:r,isLoadingMore:s,emptyState:o="No data yet.",renderExpandedRow:l,rowClassName:c}){const[E,f]=D.useState({}),h=aJ({data:t,columns:e,getCoreRowModel:tJ(),getExpandedRowModel:l?nJ():void 0,getRowId:(S,R)=>String(R),state:{expanded:E},onExpandedChange:S=>{f(typeof S=="function"?R=>{const m=S(R);return typeof m=="boolean"?{}:m}:typeof S=="boolean"?{}:S)}}),d=S=>{l?f(R=>({...R,[S.id]:!R[S.id]})):n&&n(S.original)},p=e.length;return v.jsx(lJ,{onLoadMore:r,isLoadingMore:s,isEmpty:!t.length,emptyState:o,className:"rounded-lg bg-card ring-1 ring-border/50",children:v.jsxs("table",{className:"w-full text-[13px]",children:[v.jsx("thead",{className:"sticky top-0 z-10 bg-muted/20 backdrop-blur-xl",children:h.getHeaderGroups().map(S=>v.jsx("tr",{className:"text-left",children:S.headers.map(R=>{var m;return v.jsx("th",{className:((m=R.column.columnDef.meta)==null?void 0:m.headerClassName)??"px-3 py-2 text-xs font-medium text-muted-foreground",children:v.jsx("span",{className:"text-[11px] font-medium text-muted-foreground/60",children:R.isPlaceholder?null:gv(R.column.columnDef.header,R.getContext())})},R.id)})},S.id))}),v.jsx("tbody",{children:h.getRowModel().rows.map(S=>{const R=!!E[S.id],m=c?c(S.original,R):"";return v.jsxs(D.Fragment,{children:[v.jsx("tr",{onClick:()=>d(S),className:`cursor-pointer border-t border-border/30 transition-colors hover:bg-muted/20 ${R?"bg-muted/15 border-b-0":""} ${m}`,children:S.getVisibleCells().map(g=>{var I;return v.jsx("td",{className:((I=g.column.columnDef.meta)==null?void 0:I.className)??"px-3 py-2",children:gv(g.column.columnDef.cell,g.getContext())},g.id)})}),R&&l&&v.jsx("tr",{children:v.jsx("td",{colSpan:p,className:"border-t border-border/30 bg-card p-0",children:l(S.original)})})]},S.id)})})]})})}function Vc({label:e}){return v.jsxs("div",{className:"flex flex-col items-center gap-6 py-24",children:[v.jsx(ZC,{className:"size-10 text-white/15"}),v.jsxs("div",{className:"text-center",children:[v.jsx("p",{className:"text-base text-muted-foreground",children:e??"No data yet"}),v.jsxs("p",{className:"mt-2 text-sm text-muted-foreground/50",children:["Make sure your app is running with"," ",v.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground/60",children:"dev: true"})," ","in your Monocle config."]})]}),v.jsxs("a",{href:"https://docs.monocle.sh/studio/overview",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-primary/70 transition-colors hover:text-primary",children:["Read the docs ",v.jsx("span",{children:"→"})]})]})}function fJ(e){const t=e.indexOf("?");return t===-1?e:e.slice(0,t)}function dJ(e){return[{id:"method",header:"Method",cell:({row:t})=>v.jsx(ts,{color:"primary",children:t.original.method??"SPAN"}),meta:{className:"w-16 px-3 py-2",headerClassName:"w-16 px-3 py-2"}},{id:"path",header:"Path",cell:({row:t})=>{const n=t.original.path??t.original.rootSpanName,r=e?n:fJ(n);return v.jsx("span",{className:"text-foreground",children:r})}},{id:"status",header:"Status",cell:({row:t})=>v.jsx(aT,{statusCode:t.original.statusCode,httpStatus:t.original.httpStatus})},{id:"duration",header:()=>v.jsx("span",{className:"text-right",children:"Duration"}),cell:({row:t})=>v.jsx(wc,{ms:t.original.durationMs}),meta:{className:"px-3 py-2 text-right",headerClassName:"px-3 py-2 text-right"}},...DE(t=>t.startTime)]}function TJ({traces:e,onTraceClick:t,onLoadMore:n,isLoadingMore:r,showQueryParams:s}){const o=D.useMemo(()=>dJ(s),[s]);return v.jsx(Hc,{columns:o,data:e,onRowClick:l=>t(l.traceId),onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No requests yet"})})}const Ov=50;function hJ(){const e=Us(),t=Ki(),{service:n,traceId:r}=ai({from:"__root__"}),[s,o]=D.useState(!0),{data:l,fetchNextPage:c,hasNextPage:E,isFetchingNextPage:f}=xc(Wr.traces.index.infiniteQueryOptions({query:{limit:Ov,...n&&{service:n},...r&&{traceId:r}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(d,p)=>{var S;if(!((((S=d==null?void 0:d.data)==null?void 0:S.length)??0)<Ov))return p.reduce((R,m)=>{var g;return R+(((g=m==null?void 0:m.data)==null?void 0:g.length)??0)},0)}}));Bc(d=>{d.type==="traces"&&t.invalidateQueries({queryKey:Wr.traces.index.pathKey()})});const h=(l==null?void 0:l.pages.flatMap(d=>(d==null?void 0:d.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"Requests",children:v.jsx(Tq,{label:"Show query params",checked:s,onCheckedChange:o})}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(TJ,{traces:h,onTraceClick:d=>e({to:"/traces/$traceId",params:{traceId:d},search:{from:"/requests"}}),onLoadMore:E?()=>c():void 0,isLoadingMore:f,showQueryParams:s})})]})}const pJ=yi("/requests")({component:hJ});var BN=Object.defineProperty,RJ=Object.getOwnPropertyDescriptor,SJ=Object.getOwnPropertyNames,mJ=Object.prototype.hasOwnProperty,B_=(e,t)=>{let n={};for(var r in e)BN(n,r,{get:e[r],enumerable:!0});return BN(n,Symbol.toStringTag,{value:"Module"}),n},AJ=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=SJ(t),o=0,l=s.length,c;o<l;o++)c=s[o],!mJ.call(e,c)&&c!==n&&BN(e,c,{get:(E=>t[E]).bind(null,c),enumerable:!(r=RJ(t,c))||r.enumerable});return e},$B=(e,t,n)=>(AJ(e,t,"default"),n);const gJ="modulepreload",OJ=function(e){return"/"+e},Iv={},X=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),E=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=l(n.map(f=>{if(f=OJ(f),f in Iv)return;Iv[f]=!0;const h=f.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${d}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":gJ,h||(p.as="script"),p.crossOrigin="",p.href=f,E&&p.setAttribute("nonce",E),document.head.appendChild(p),h)return new Promise((S,R)=>{p.addEventListener("load",S),p.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return s.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},jS=[{id:"abap",name:"ABAP",import:(()=>X(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>X(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>X(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>X(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>X(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>X(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>X(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>X(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>X(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>X(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>X(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>X(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>X(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>X(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>X(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>X(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>X(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>X(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>X(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>X(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>X(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>X(()=>import("./blade-BjGOyj-B.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>X(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>X(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>X(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>X(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>X(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>X(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>X(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>X(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>X(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>X(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>X(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>X(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>X(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>X(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>X(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>X(()=>import("./crystal-DNxU26gB.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>X(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>X(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>X(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>X(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>X(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>X(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>X(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>X(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>X(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>X(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>X(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>X(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>X(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>X(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>X(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>X(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>X(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>X(()=>import("./erb-BYCe7drp.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>X(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>X(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>X(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>X(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>X(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>X(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>X(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>X(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>X(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>X(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>X(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>X(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>X(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>X(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>X(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>X(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>X(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>X(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>X(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>X(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>X(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>X(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>X(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>X(()=>import("./hack-i7_Ulhet.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>X(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>X(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>X(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>X(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>X(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>X(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>X(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>X(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>X(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>X(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>X(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>X(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>X(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>X(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>X(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>X(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>X(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>X(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>X(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>X(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>X(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>X(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>X(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>X(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>X(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>X(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>X(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>X(()=>import("./just-VxiPbLrw.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>X(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>X(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>X(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>X(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>X(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>X(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>X(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>X(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>X(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>X(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>X(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>X(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>X(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>X(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>X(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>X(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>X(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>X(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>X(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>X(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>X(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>X(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>X(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>X(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>X(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>X(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>X(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>X(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>X(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>X(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>X(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>X(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>X(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>X(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>X(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>X(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>X(()=>import("./perl-NvoQZIq0.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>X(()=>import("./php-R6g_5hLQ.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>X(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>X(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>X(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>X(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>X(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>X(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>X(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>X(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>X(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>X(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>X(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>X(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>X(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>X(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>X(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>X(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>X(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>X(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>X(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>X(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>X(()=>import("./razor-BDqjjVU7.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>X(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>X(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>X(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>X(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>X(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>X(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>X(()=>import("./rst-CRjBmOyv.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>X(()=>import("./ruby-Wjq7vjNf.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>X(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>X(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>X(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>X(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>X(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>X(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>X(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>X(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>X(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>X(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>X(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>X(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>X(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>X(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>X(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>X(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>X(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>X(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>X(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>X(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>X(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>X(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>X(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>X(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>X(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>X(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>X(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>X(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>X(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>X(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>X(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>X(()=>import("./ts-tags-DQrlYJgV.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>X(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>X(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>X(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>X(()=>import("./twig-xg9kU7Mw.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>X(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>X(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>X(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>X(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>X(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>X(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>X(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>X(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>X(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>X(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>X(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>X(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>X(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>X(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>X(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>X(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>X(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>X(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>X(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>X(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>X(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>X(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>X(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>X(()=>import("./zig-VOosw3JB.js"),[]))}],F_=Object.fromEntries(jS.map(e=>[e.id,e.import])),H_=Object.fromEntries(jS.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),V_={...F_,...H_},k_=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>X(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>X(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>X(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>X(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>X(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>X(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>X(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>X(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>X(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>X(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>X(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>X(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>X(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>X(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>X(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>X(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>X(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>X(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>X(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>X(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>X(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>X(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>X(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>X(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>X(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>X(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>X(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>X(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>X(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>X(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>X(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>X(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>X(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>X(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>X(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>X(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>X(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>X(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>X(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>X(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>X(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>X(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>X(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>X(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>X(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>X(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>X(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>X(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>X(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>X(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>X(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>X(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>X(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>X(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>X(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>X(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>X(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>X(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>X(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>X(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>X(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>X(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>X(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>X(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>X(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Y_=Object.fromEntries(k_.map(e=>[e.id,e.import]));var W_=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function IJ(){return 2147483648}function NJ(){return typeof performance<"u"?performance.now():Date.now()}const CJ=(e,t)=>e+(t-e%t)%t;async function _J(e){let t,n;const r={};function s(S){n=S,r.HEAPU8=new Uint8Array(S),r.HEAPU32=new Uint32Array(S)}function o(S,R,m){r.HEAPU8.copyWithin(S,R,R+m)}function l(S){try{return t.grow(S-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}function c(S){const R=r.HEAPU8.length;S=S>>>0;const m=IJ();if(S>m)return!1;for(let g=1;g<=4;g*=2){let I=R*(1+.2/g);I=Math.min(I,S+100663296);const C=Math.min(m,CJ(Math.max(S,I),65536));if(l(C))return!0}return!1}const E=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(S,R,m=1024){const g=R+m;let I=R;for(;S[I]&&!(I>=g);)++I;if(I-R>16&&S.buffer&&E)return E.decode(S.subarray(R,I));let C="";for(;R<I;){let L=S[R++];if(!(L&128)){C+=String.fromCharCode(L);continue}const N=S[R++]&63;if((L&224)===192){C+=String.fromCharCode((L&31)<<6|N);continue}const y=S[R++]&63;if((L&240)===224?L=(L&15)<<12|N<<6|y:L=(L&7)<<18|N<<12|y<<6|S[R++]&63,L<65536)C+=String.fromCharCode(L);else{const _=L-65536;C+=String.fromCharCode(55296|_>>10,56320|_&1023)}}return C}function h(S,R){return S?f(r.HEAPU8,S,R):""}const d={emscripten_get_now:NJ,emscripten_memcpy_big:o,emscripten_resize_heap:c,fd_write:()=>0};async function p(){const R=await e({env:d,wasi_snapshot_preview1:d});t=R.memory,s(t.buffer),Object.assign(r,R),r.UTF8ToString=h}return await p(),r}var LJ=Object.defineProperty,yJ=(e,t,n)=>t in e?LJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,or=(e,t,n)=>yJ(e,typeof t!="symbol"?t+"":t,n);let pr=null;function bJ(e){throw new W_(e.UTF8ToString(e.getLastOnigError()))}class XS{constructor(t){or(this,"utf16Length"),or(this,"utf8Length"),or(this,"utf16Value"),or(this,"utf8Value"),or(this,"utf16OffsetToUtf8"),or(this,"utf8OffsetToUtf16");const n=t.length,r=XS._utf8ByteLength(t),s=r!==n,o=s?new Uint32Array(n+1):null;s&&(o[n]=r);const l=s?new Uint32Array(r+1):null;s&&(l[r]=n);const c=new Uint8Array(r);let E=0;for(let f=0;f<n;f++){const h=t.charCodeAt(f);let d=h,p=!1;if(h>=55296&&h<=56319&&f+1<n){const S=t.charCodeAt(f+1);S>=56320&&S<=57343&&(d=(h-55296<<10)+65536|S-56320,p=!0)}s&&(o[f]=E,p&&(o[f+1]=E),d<=127?l[E+0]=f:d<=2047?(l[E+0]=f,l[E+1]=f):d<=65535?(l[E+0]=f,l[E+1]=f,l[E+2]=f):(l[E+0]=f,l[E+1]=f,l[E+2]=f,l[E+3]=f)),d<=127?c[E++]=d:d<=2047?(c[E++]=192|(d&1984)>>>6,c[E++]=128|(d&63)>>>0):d<=65535?(c[E++]=224|(d&61440)>>>12,c[E++]=128|(d&4032)>>>6,c[E++]=128|(d&63)>>>0):(c[E++]=240|(d&1835008)>>>18,c[E++]=128|(d&258048)>>>12,c[E++]=128|(d&4032)>>>6,c[E++]=128|(d&63)>>>0),p&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,s=t.length;r<s;r++){const o=t.charCodeAt(r);let l=o,c=!1;if(o>=55296&&o<=56319&&r+1<s){const E=t.charCodeAt(r+1);E>=56320&&E<=57343&&(l=(o-55296<<10)+65536|E-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const $S=class Ui{constructor(t){if(or(this,"id",++Ui.LAST_ID),or(this,"_onigBinding"),or(this,"content"),or(this,"utf16Length"),or(this,"utf8Length"),or(this,"utf16OffsetToUtf8"),or(this,"utf8OffsetToUtf16"),or(this,"ptr"),!pr)throw new W_("Must invoke loadWasm first.");this._onigBinding=pr,this.content=t;const n=new XS(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ui._sharedPtrInUse?(Ui._sharedPtr||(Ui._sharedPtr=pr.omalloc(1e4)),Ui._sharedPtrInUse=!0,pr.HEAPU8.set(n.utf8Value,Ui._sharedPtr),this.ptr=Ui._sharedPtr):this.ptr=n.createString(pr)}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===Ui._sharedPtr?Ui._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};or($S,"LAST_ID",0);or($S,"_sharedPtr",0);or($S,"_sharedPtrInUse",!1);let KB=$S;class PJ{constructor(t){if(or(this,"_onigBinding"),or(this,"_ptr"),!pr)throw new W_("Must invoke loadWasm first.");const n=[],r=[];for(let c=0,E=t.length;c<E;c++){const f=new XS(t[c]);n[c]=f.createString(pr),r[c]=f.utf8Length}const s=pr.omalloc(4*t.length);pr.HEAPU32.set(n,s/4);const o=pr.omalloc(4*t.length);pr.HEAPU32.set(r,o/4);const l=pr.createOnigScanner(s,o,t.length);for(let c=0,E=t.length;c<E;c++)pr.ofree(n[c]);pr.ofree(o),pr.ofree(s),l===0&&bJ(pr),this._onigBinding=pr,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let s=0;if(typeof r=="number"&&(s=r),typeof t=="string"){t=new KB(t);const o=this._findNextMatchSync(t,n,!1,s);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,s)}_findNextMatchSync(t,n,r,s){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),s);if(l===0)return null;const c=o.HEAPU32;let E=l/4;const f=c[E++],h=c[E++],d=[];for(let p=0;p<h;p++){const S=t.convertUtf8OffsetToUtf16(c[E++]),R=t.convertUtf8OffsetToUtf16(c[E++]);d[p]={start:S,end:R,length:R-S}}return{index:f,captureIndices:d}}}function DJ(e){return typeof e.instantiator=="function"}function vJ(e){return typeof e.default=="function"}function MJ(e){return typeof e.data<"u"}function xJ(e){return typeof Response<"u"&&e instanceof Response}function UJ(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 Mp;function j_(e){if(Mp)return Mp;async function t(){pr=await _J(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),DJ(r)?r=await r.instantiator(n):vJ(r)?r=await r.default(n):(MJ(r)&&(r=r.data),xJ(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await wJ(r)(n):r=await GJ(r)(n):UJ(r)?r=await OO(r)(n):r instanceof WebAssembly.Module?r=await OO(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await OO(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Mp=t(),Mp}function OO(e){return t=>WebAssembly.instantiate(e,t)}function wJ(e){return t=>WebAssembly.instantiateStreaming(e,t)}function GJ(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let zB;function BJ(e){zB=e}function FJ(){return zB}async function qB(e){return e&&await j_(e),{createScanner(t){return new PJ(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new KB(t)}}}const HJ=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:qB,getDefaultWasmLoader:FJ,loadWasm:j_,setDefaultWasmLoader:BJ},Symbol.toStringTag,{value:"Module"}));var JB=B_({});$B(JB,HJ);var On=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function VJ(e){return X_(e)}function X_(e){return Array.isArray(e)?kJ(e):e instanceof RegExp?e:typeof e=="object"?YJ(e):e}function kJ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=X_(e[n]);return t}function YJ(e){let t={};for(let n in e)t[n]=X_(e[n]);return t}function QB(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function ZB(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?ZB(e.substring(0,e.length-1)):e.substr(~t+1)}var IO=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,xp=class{static hasCaptures(e){return e===null?!1:(IO.lastIndex=0,IO.test(e))}static replaceCaptures(e,t,n){return e.replace(IO,(r,s,o,l)=>{let c=n[parseInt(s||o,10)];if(c){let E=t.substring(c.start,c.end);for(;E[0]===".";)E=E.substring(1);switch(l){case"downcase":return E.toLowerCase();case"upcase":return E.toUpperCase();default:return E}}else return r})}};function eF(e,t){return e<t?-1:e>t?1:0}function tF(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 s=0;s<n;s++){let o=eF(e[s],t[s]);if(o!==0)return o}return 0}return n-r}function Nv(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 nF(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var rF=class{constructor(e){Te(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}},eS=class{constructor(e,t,n){Te(this,"_cachedMatchRoot",new rF(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(XJ(e),t)}static createFromParsedTheme(e,t){return KJ(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(s=>WJ(e.parent,s.parentScopes));return r?new sF(r.fontStyle,r.foreground,r.background):null}},NO=class aR{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new aR(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new aR(n,t[r]);return n}push(t){return new aR(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 WJ(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],s=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],s=!0}for(;e&&!jJ(e.scopeName,r);){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function jJ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var sF=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function XJ(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let s=0,o=t.length;s<o;s++){let l=t[s];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let d=l.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let E=-1;if(typeof l.settings.fontStyle=="string"){E=0;let d=l.settings.fontStyle.split(" ");for(let p=0,S=d.length;p<S;p++)switch(d[p]){case"italic":E=E|1;break;case"bold":E=E|2;break;case"underline":E=E|4;break;case"strikethrough":E=E|8;break}}let f=null;typeof l.settings.foreground=="string"&&Nv(l.settings.foreground)&&(f=l.settings.foreground);let h=null;typeof l.settings.background=="string"&&Nv(l.settings.background)&&(h=l.settings.background);for(let d=0,p=c.length;d<p;d++){let R=c[d].trim().split(" "),m=R[R.length-1],g=null;R.length>1&&(g=R.slice(0,R.length-1),g.reverse()),n[r++]=new $J(m,g,s,E,f,h)}}return n}var $J=class{constructor(e,t,n,r,s,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},Yr=(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))(Yr||{});function KJ(e,t){e.sort((E,f)=>{let h=eF(E.scope,f.scope);return h!==0||(h=tF(E.parentScopes,f.parentScopes),h!==0)?h:E.index-f.index});let n=0,r="#000000",s="#ffffff";for(;e.length>=1&&e[0].scope==="";){let E=e.shift();E.fontStyle!==-1&&(n=E.fontStyle),E.foreground!==null&&(r=E.foreground),E.background!==null&&(s=E.background)}let o=new zJ(t),l=new sF(n,o.getId(r),o.getId(s)),c=new JJ(new FN(0,null,-1,0,0),[]);for(let E=0,f=e.length;E<f;E++){let h=e[E];c.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new eS(o,l,c)}var zJ=class{constructor(e){Te(this,"_isFrozen");Te(this,"_lastColorId");Te(this,"_id2color");Te(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)}},qJ=Object.freeze([]),FN=class iF{constructor(t,n,r,s,o){Te(this,"scopeDepth");Te(this,"parentScopes");Te(this,"fontStyle");Te(this,"foreground");Te(this,"background");this.scopeDepth=t,this.parentScopes=n||qJ,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new iF(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,s=t.length;r<s;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,s){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},JJ=class HN{constructor(t,n=[],r={}){Te(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,s=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=t.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-t.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),s,o;if(r===-1?(s=t,o=""):(s=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(HN._cmpBySpecificity),n}insert(t,n,r,s,o,l){if(n===""){this._doInsertHere(t,r,s,o,l);return}let c=n.indexOf("."),E,f;c===-1?(E=n,f=""):(E=n.substring(0,c),f=n.substring(c+1));let h;this._children.hasOwnProperty(E)?h=this._children[E]:(h=new HN(this._mainRule.clone(),FN.cloneArr(this._rulesWithParentScopes)),this._children[E]=h),h.insert(t+1,f,r,s,o,l)}_doInsertHere(t,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(t,r,s,o);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let E=this._rulesWithParentScopes[l];if(tF(E.parentScopes,n)===0){E.acceptOverwrite(t,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new FN(t,n,r,s,o))}},gE=class qs{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=qs.getLanguageId(t),r=qs.getTokenType(t),s=qs.getFontStyle(t),o=qs.getForeground(t),l=qs.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:s,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,s,o,l,c){let E=qs.getLanguageId(t),f=qs.getTokenType(t),h=qs.containsBalancedBrackets(t)?1:0,d=qs.getFontStyle(t),p=qs.getForeground(t),S=qs.getBackground(t);return n!==0&&(E=n),r!==8&&(f=r),s!==null&&(h=s?1:0),o!==-1&&(d=o),l!==0&&(p=l),c!==0&&(S=c),(E<<0|f<<8|h<<10|d<<11|p<<15|S<<24)>>>0}};function tS(e,t){const n=[],r=QJ(e);let s=r.next();for(;s!==null;){let E=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":E=1;break;case"L":E=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let f=l();if(n.push({matcher:f,priority:E}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const E=o();return f=>!!E&&!E(f)}if(s==="("){s=r.next();const E=c();return s===")"&&(s=r.next()),E}if(Cv(s)){const E=[];do E.push(s),s=r.next();while(Cv(s));return f=>t(E,f)}return null}function l(){const E=[];let f=o();for(;f;)E.push(f),f=o();return h=>E.every(d=>d(h))}function c(){const E=[];let f=l();for(;f&&(E.push(f),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");f=l()}return h=>E.some(d=>d(h))}}function Cv(e){return!!e&&!!e.match(/[\w\.:]+/)}function QJ(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 oF(e){typeof e.dispose=="function"&&e.dispose()}var Vd=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ZJ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},eQ=class{constructor(){Te(this,"_references",[]);Te(this,"_seenReferenceKeys",new Set);Te(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))}},tQ=class{constructor(e,t){Te(this,"seenFullScopeRequests",new Set);Te(this,"seenPartialScopeRequests",new Set);Te(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Vd(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new eQ;for(const n of e)nQ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Vd){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 nQ(e,t,n,r){const s=n.lookup(e.scopeName);if(!s){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Vd?lR({baseGrammar:o,selfGrammar:s},r):VN(e.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const l=n.injections(e.scopeName);if(l)for(const c of l)r.add(new Vd(c))}function VN(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];nS([r],t,n)}}function lR(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&nS(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&nS(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function nS(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?QB({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&nS(r.patterns,{...t,repository:s},n);const o=r.include;if(!o)continue;const l=aF(o);switch(l.kind){case 0:lR({...t,selfGrammar:t.baseGrammar},n);break;case 1:lR(t,n);break;case 2:VN(l.ruleName,{...t,repository:s},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const E={baseGrammar:t.baseGrammar,selfGrammar:c,repository:s};l.kind===4?VN(l.ruleName,E,n):lR(E,n)}else l.kind===4?n.add(new ZJ(l.scopeName,l.ruleName)):n.add(new Vd(l.scopeName));break}}}var rQ=class{constructor(){Te(this,"kind",0)}},sQ=class{constructor(){Te(this,"kind",1)}},iQ=class{constructor(e){Te(this,"kind",2);this.ruleName=e}},oQ=class{constructor(e){Te(this,"kind",3);this.scopeName=e}},aQ=class{constructor(e,t){Te(this,"kind",4);this.scopeName=e,this.ruleName=t}};function aF(e){if(e==="$base")return new rQ;if(e==="$self")return new sQ;const t=e.indexOf("#");if(t===-1)return new oQ(e);if(t===0)return new iQ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new aQ(n,r)}}var lQ=/\\(\d+)/,_v=/\\(\d+)/g,cQ=-1,lF=-2;var TT=class{constructor(e,t,n,r){Te(this,"$location");Te(this,"id");Te(this,"_nameIsCapturing");Te(this,"_name");Te(this,"_contentNameIsCapturing");Te(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=xp.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=xp.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${ZB(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:xp.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:xp.replaceCaptures(this._contentName,e,t)}},uQ=class extends TT{constructor(t,n,r,s,o){super(t,n,r,s);Te(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,s){throw new Error("Not supported!")}},EQ=class extends TT{constructor(t,n,r,s,o){super(t,n,r,null);Te(this,"_match");Te(this,"captures");Te(this,"_cachedCompiledPatterns");this._match=new kd(s,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,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yd,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Lv=class extends TT{constructor(t,n,r,s,o){super(t,n,r,s);Te(this,"hasMissingPatterns");Te(this,"patterns");Te(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,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yd,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},kN=class extends TT{constructor(t,n,r,s,o,l,c,E,f,h){super(t,n,r,s);Te(this,"_begin");Te(this,"beginCaptures");Te(this,"_end");Te(this,"endHasBackReferences");Te(this,"endCaptures");Te(this,"applyEndPatternLast");Te(this,"hasMissingPatterns");Te(this,"patterns");Te(this,"_cachedCompiledPatterns");this._begin=new kd(o,this.id),this.beginCaptures=l,this._end=new kd(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=E,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.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,s){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,s)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yd;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}},rS=class extends TT{constructor(t,n,r,s,o,l,c,E,f){super(t,n,r,s);Te(this,"_begin");Te(this,"beginCaptures");Te(this,"whileCaptures");Te(this,"_while");Te(this,"whileHasBackReferences");Te(this,"hasMissingPatterns");Te(this,"patterns");Te(this,"_cachedCompiledPatterns");Te(this,"_cachedCompiledWhilePatterns");this._begin=new kd(o,this.id),this.beginCaptures=l,this.whileCaptures=E,this._while=new kd(c,lF),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,s){return this._getCachedCompiledPatterns(t).compileAG(t,r,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yd;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,s){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,s)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Yd,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},cF=class Br{static createCaptureRule(t,n,r,s,o){return t.registerRule(l=>new uQ(n,l,r,s,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(s=>{if(t.id=s,t.match)return new EQ(t.$vscodeTextmateLocation,t.id,t.name,t.match,Br._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=QB({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Lv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Br._compilePatterns(o,n,r))}return t.while?new rS(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Br._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Br._compileCaptures(t.whileCaptures||t.captures,n,r),Br._compilePatterns(t.patterns,n,r)):new kN(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Br._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Br._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Br._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let s=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>o&&(o=c)}for(let l=0;l<=o;l++)s[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let E=0;t[l].patterns&&(E=Br.getCompiledRuleId(t[l],n,r)),s[c]=Br.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,E)}}return s}static _compilePatterns(t,n,r){let s=[];if(t)for(let o=0,l=t.length;o<l;o++){const c=t[o];let E=-1;if(c.include){const f=aF(c.include);switch(f.kind){case 0:case 1:E=Br.getCompiledRuleId(r[c.include],n,r);break;case 2:let h=r[f.ruleName];h&&(E=Br.getCompiledRuleId(h,n,r));break;case 3:case 4:const d=f.scopeName,p=f.kind===4?f.ruleName:null,S=n.getExternalGrammar(d,r);if(S)if(p){let R=S.repository[p];R&&(E=Br.getCompiledRuleId(R,n,S.repository))}else E=Br.getCompiledRuleId(S.repository.$self,n,S.repository);break}}else E=Br.getCompiledRuleId(c,n,r);if(E!==-1){const f=n.getRule(E);let h=!1;if((f instanceof Lv||f instanceof kN||f instanceof rS)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;s.push(E)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}},kd=class uF{constructor(t,n){Te(this,"source");Te(this,"ruleId");Te(this,"hasAnchor");Te(this,"hasBackReferences");Te(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let s=0,o=[],l=!1;for(let c=0;c<r;c++)if(t.charAt(c)==="\\"&&c+1<r){const f=t.charAt(c+1);f==="z"?(o.push(t.substring(s,c)),o.push("$(?!\\n)(?<!\\n)"),s=c+2):(f==="A"||f==="G")&&(l=!0),c++}this.hasAnchor=l,s===0?this.source=t:(o.push(t.substring(s,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=lQ.test(this.source):this.hasBackReferences=!1}clone(){return new uF(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(s=>t.substring(s.start,s.end));return _v.lastIndex=0,this.source.replace(_v,(s,o)=>nF(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=[],s=[],o,l,c,E;for(o=0,l=this.source.length;o<l;o++)c=this.source.charAt(o),t[o]=c,n[o]=c,r[o]=c,s[o]=c,c==="\\"&&o+1<l&&(E=this.source.charAt(o+1),E==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",s[o+1]="A"):E==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",s[o+1]="G"):(t[o+1]=E,n[o+1]=E,r[o+1]=E,s[o+1]=E),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.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}},Yd=class{constructor(){Te(this,"_items");Te(this,"_hasAnchors");Te(this,"_cached");Te(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 yv(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(s=>s.resolveAnchors(t,n));return new yv(e,r,this._items.map(s=>s.ruleId))}},yv=class{constructor(e,t,n){Te(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(`
102
+ `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},CO=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Do,fQ=(Do=class{constructor(t,n){Te(this,"_defaultAttributes");Te(this,"_embeddedLanguagesMatcher");Te(this,"_getBasicScopeAttributes",new rF(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new CO(n,r)}));this._defaultAttributes=new CO(t,8),this._embeddedLanguagesMatcher=new dQ(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Do._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Do.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!")}},Te(Do,"_NULL_SCOPE_METADATA",new CO(0,0)),Te(Do,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Do),dQ=class{constructor(e){Te(this,"values");Te(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>nF(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])}},bv=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function EF(e,t,n,r,s,o,l,c){const E=t.content.length;let f=!1,h=-1;if(l){const S=TQ(e,t,n,r,s,o);s=S.stack,r=S.linePos,n=S.isFirstLine,h=S.anchorPosition}const d=Date.now();for(;!f;){if(c!==0&&Date.now()-d>c)return new bv(s,!0);p()}return new bv(s,!1);function p(){const S=hQ(e,t,n,r,s,h);if(!S){o.produce(s,E),f=!0;return}const R=S.captureIndices,m=S.matchedRuleId,g=R&&R.length>0?R[0].end>r:!1;if(m===cQ){const I=s.getRule(e);o.produce(s,R[0].start),s=s.withContentNameScopesList(s.nameScopesList),id(e,t,n,s,o,I.endCaptures,R),o.produce(s,R[0].end);const C=s;if(s=s.parent,h=C.getAnchorPos(),!g&&C.getEnterPos()===r){s=C,o.produce(s,E),f=!0;return}}else{const I=e.getRule(m);o.produce(s,R[0].start);const C=s,L=I.getName(t.content,R),N=s.contentNameScopesList.pushAttributed(L,e);if(s=s.push(m,r,h,R[0].end===E,null,N,N),I instanceof kN){const y=I;id(e,t,n,s,o,y.beginCaptures,R),o.produce(s,R[0].end),h=R[0].end;const _=y.getContentName(t.content,R),M=N.pushAttributed(_,e);if(s=s.withContentNameScopesList(M),y.endHasBackReferences&&(s=s.withEndRule(y.getEndWithResolvedBackReferences(t.content,R))),!g&&C.hasSameRuleAs(s)){s=s.pop(),o.produce(s,E),f=!0;return}}else if(I instanceof rS){const y=I;id(e,t,n,s,o,y.beginCaptures,R),o.produce(s,R[0].end),h=R[0].end;const _=y.getContentName(t.content,R),M=N.pushAttributed(_,e);if(s=s.withContentNameScopesList(M),y.whileHasBackReferences&&(s=s.withEndRule(y.getWhileWithResolvedBackReferences(t.content,R))),!g&&C.hasSameRuleAs(s)){s=s.pop(),o.produce(s,E),f=!0;return}}else if(id(e,t,n,s,o,I.captures,R),o.produce(s,R[0].end),s=s.pop(),!g){s=s.safePop(),o.produce(s,E),f=!0;return}}R[0].end>r&&(r=R[0].end,n=!1)}}function TQ(e,t,n,r,s,o){let l=s.beginRuleCapturedEOL?0:-1;const c=[];for(let E=s;E;E=E.pop()){const f=E.getRule(e);f instanceof rS&&c.push({rule:f,stack:E})}for(let E=c.pop();E;E=c.pop()){const{ruleScanner:f,findOptions:h}=SQ(E.rule,e,E.stack.endRule,n,r===l),d=f.findNextMatchSync(t,r,h);if(d){if(d.ruleId!==lF){s=E.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(E.stack,d.captureIndices[0].start),id(e,t,n,E.stack,o,E.rule.whileCaptures,d.captureIndices),o.produce(E.stack,d.captureIndices[0].end),l=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{s=E.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:l,isFirstLine:n}}function hQ(e,t,n,r,s,o){const l=pQ(e,t,n,r,s,o),c=e.getInjections();if(c.length===0)return l;const E=RQ(c,e,t,n,r,s,o);if(!E)return l;if(!l)return E;const f=l.captureIndices[0].start,h=E.captureIndices[0].start;return h<f||E.priorityMatch&&h===f?E:l}function pQ(e,t,n,r,s,o){const l=s.getRule(e),{ruleScanner:c,findOptions:E}=fF(l,e,s.endRule,n,r===o),f=c.findNextMatchSync(t,r,E);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function RQ(e,t,n,r,s,o,l){let c=Number.MAX_VALUE,E=null,f,h=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,S=e.length;p<S;p++){const R=e[p];if(!R.matcher(d))continue;const m=t.getRule(R.ruleId),{ruleScanner:g,findOptions:I}=fF(m,t,null,r,s===l),C=g.findNextMatchSync(n,s,I);if(!C)continue;const L=C.captureIndices[0].start;if(!(L>=c)&&(c=L,E=C.captureIndices,f=C.ruleId,h=R.priority,c===s))break}return E?{priorityMatch:h===-1,captureIndices:E,matchedRuleId:f}:null}function fF(e,t,n,r,s){return{ruleScanner:e.compileAG(t,n,r,s),findOptions:0}}function SQ(e,t,n,r,s){return{ruleScanner:e.compileWhileAG(t,n,r,s),findOptions:0}}function id(e,t,n,r,s,o,l){if(o.length===0)return;const c=t.content,E=Math.min(o.length,l.length),f=[],h=l[0].end;for(let d=0;d<E;d++){const p=o[d];if(p===null)continue;const S=l[d];if(S.length===0)continue;if(S.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=S.start;)s.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?s.produceFromScopes(f[f.length-1].scopes,S.start):s.produce(r,S.start),p.retokenizeCapturedWithRuleId){const m=p.getName(c,l),g=r.contentNameScopesList.pushAttributed(m,e),I=p.getContentName(c,l),C=g.pushAttributed(I,e),L=r.push(p.retokenizeCapturedWithRuleId,S.start,-1,!1,null,g,C),N=e.createOnigString(c.substring(0,S.end));EF(e,N,n&&S.start===0,S.start,L,s,!1,0),oF(N);continue}const R=p.getName(c,l);if(R!==null){const g=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(R,e);f.push(new mQ(g,S.end))}}for(;f.length>0;)s.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var mQ=class{constructor(e,t){Te(this,"scopes");Te(this,"endPos");this.scopes=e,this.endPos=t}};function AQ(e,t,n,r,s,o,l,c){return new OQ(e,t,n,r,s,o,l,c)}function Pv(e,t,n,r,s){const o=tS(t,sS),l=cF.getCompiledRuleId(n,r,s.repository);for(const c of o)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:s,priority:c.priority})}function sS(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let s=n;s<t.length;s++)if(gQ(t[s],r))return n=s+1,!0;return!1})}function gQ(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 OQ=class{constructor(t,n,r,s,o,l,c,E){Te(this,"_rootId");Te(this,"_lastRuleId");Te(this,"_ruleId2desc");Te(this,"_includedGrammars");Te(this,"_grammarRepository");Te(this,"_grammar");Te(this,"_injections");Te(this,"_basicScopeAttributesProvider");Te(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=l,this._onigLib=E,this._basicScopeAttributesProvider=new fQ(r,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=Dv(n,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const f of Object.keys(o)){const h=tS(f,sS);for(const d of h)this._tokenTypeMatchers.push({matcher:d.matcher,type:o[f]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},n=[],r=this._rootScopeName,s=t.lookup(r);if(s){const o=s.injections;if(o)for(let c in o)Pv(n,c,o[c],this,s);const l=this._grammarRepository.injections(r);l&&l.forEach(c=>{const E=this.getExternalGrammar(c);if(E){const f=E.injectionSelector;f&&Pv(n,f,E,this,E)}})}return n.sort((o,l)=>o.priority-l.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const n=++this._lastRuleId,r=t(n);return this._ruleId2desc[n]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,n){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=Dv(r,n&&n.$base),this._includedGrammars[t]}}tokenizeLine(t,n,r=0){const s=this._tokenize(t,n,!1,r);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(t,n,r=0){const s=this._tokenize(t,n,!0,r);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(t,n,r,s){this._rootId===-1&&(this._rootId=cF.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!n||n===YN.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),p=gE.set(0,h.languageId,h.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),S=this.getRule(this._rootId).getName(null,null);let R;S?R=md.createRootAndLookUpScopeName(S,p,this):R=md.createRoot("unknown",p),n=new YN(null,this._rootId,-1,-1,!1,null,R,R)}else o=!1,n.reset();t=t+`
103
+ `;const l=this.createOnigString(t),c=l.content.length,E=new NQ(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),f=EF(this,l,o,0,n,E,!0,s);return oF(l),{lineLength:c,lineTokens:E,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function Dv(e,t){return e=VJ(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 md=class wi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,s=(t==null?void 0:t.scopePath)??null;for(const o of n)s=NO.push(s,o.scopeNames),r=new wi(r,s,o.encodedTokenAttributes);return r}static createRoot(t,n){return new wi(null,new NO(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const s=r.getMetadataForScope(t),o=new NO(null,t),l=r.themeProvider.themeMatch(o),c=wi.mergeAttributes(n,s,l);return new wi(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return wi.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 s=-1,o=0,l=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,l=r.backgroundId),gE.set(t,n.languageId,n.tokenType,null,s,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return wi._pushAttributed(this,t,n);const r=t.split(/ /g);let s=this;for(const o of r)s=wi._pushAttributed(s,o,n);return s}static _pushAttributed(t,n,r){const s=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),c=wi.mergeAttributes(t.tokenAttributes,s,l);return new wi(t,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var s;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((s=r.parent)==null?void 0:s.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},ti,YN=(ti=class{constructor(t,n,r,s,o,l,c,E){Te(this,"_stackElementBrand");Te(this,"_enterPos");Te(this,"_anchorPos");Te(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=E,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}equals(t){return t===null?!1:ti._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?md.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(){ti._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,s,o,l,c){return new ti(this,t,n,r,s,o,l,c)}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,s;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.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 ti(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=md.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ti(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,md.fromExtension(r,n.contentNameScopesList))}},Te(ti,"NULL",new ti(null,0,0,0,!1,null,null,null)),ti),IQ=class{constructor(e,t){Te(this,"balancedBracketScopes");Te(this,"unbalancedBracketScopes");Te(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):tS(n,sS).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>tS(n,sS).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}},NQ=class{constructor(e,t,n,r){Te(this,"_emitBinaryTokens");Te(this,"_lineText");Te(this,"_tokens");Te(this,"_binaryTokens");Te(this,"_lastTokenEndIndex");Te(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 s=(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 c of this._tokenTypeOverrides)c.matcher(l)&&(s=gE.set(s,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(s=gE.set(s,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),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,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},CQ=class{constructor(e,t){Te(this,"_grammars",new Map);Te(this,"_rawGrammars",new Map);Te(this,"_injectionGrammars",new Map);Te(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,s){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,AQ(e,o,t,n,r,s,this,this._onigLib))}return this._grammars.get(e)}},_Q=class{constructor(t){Te(this,"_options");Te(this,"_syncRegistry");Te(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new CQ(eS.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(eS.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 IQ(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,s,o){const l=new tQ(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,s,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,s=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,s)}_grammarForScopeName(t,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,s,o)}},WN=YN.NULL;function iS(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function sl(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function LQ(e){return Array.isArray(e)?e:[e]}async function dF(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function KS(e){return!e||["plaintext","txt","text","plain"].includes(e)}function TF(e){return e==="ansi"||KS(e)}function zS(e){return e==="none"}function hF(e){return zS(e)}function qS(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let l=0;l<n.length;l+=2){const c=t?n[l]+(n[l+1]||""):n[l];s.push([c,r]),r+=n[l].length,r+=((o=n[l+1])==null?void 0:o.length)||0}return s}const vv={light:"#333333",dark:"#bbbbbb"},Mv={light:"#fffffe",dark:"#1e1e1e"},xv="__shiki_resolved";function $_(e){var c,E,f,h,d;if(e!=null&&e[xv])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 p=t.settings?t.settings.find(S=>!S.name&&!S.scope):void 0;(c=p==null?void 0:p.settings)!=null&&c.foreground&&(r=p.settings.foreground),(E=p==null?void 0:p.settings)!=null&&E.background&&(n=p.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((h=t==null?void 0:t.colors)!=null&&h["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?vv.light:vv.dark),n||(n=t.type==="light"?Mv.light:Mv.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 s=0;const o=new Map;function l(p){var R;if(o.has(p))return o.get(p);s+=1;const S=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(R=t.colorReplacements)!=null&&R[`#${S}`]?l(p):(o.set(p,S),S)}t.settings=t.settings.map(p=>{var g,I;const S=((g=p.settings)==null?void 0:g.foreground)&&!p.settings.foreground.startsWith("#"),R=((I=p.settings)==null?void 0:I.background)&&!p.settings.background.startsWith("#");if(!S&&!R)return p;const m={...p,settings:{...p.settings}};if(S){const C=l(p.settings.foreground);t.colorReplacements[C]=p.settings.foreground,m.settings.foreground=C}if(R){const C=l(p.settings.background);t.colorReplacements[C]=p.settings.background,m.settings.background=C}return m});for(const p of Object.keys(t.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((d=t.colors[p])!=null&&d.startsWith("#"))){const S=l(t.colors[p]);t.colorReplacements[S]=t.colors[p],t.colors[p]=S}return Object.defineProperty(t,xv,{enumerable:!1,writable:!1,value:!0}),t}async function pF(e){return Array.from(new Set((await Promise.all(e.filter(t=>!TF(t)).map(async t=>await dF(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function RF(e){return(await Promise.all(e.map(async t=>hF(t)?null:$_(await dF(t))))).filter(t=>!!t)}function SF(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new On(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}var yQ=class extends _Q{constructor(t,n,r,s={}){super(t);Te(this,"_resolvedThemes",new Map);Te(this,"_resolvedGrammars",new Map);Te(this,"_langMap",new Map);Te(this,"_langGraph",new Map);Te(this,"_textmateThemeCache",new WeakMap);Te(this,"_loadedThemesCache",null);Te(this,"_loadedLanguagesCache",null);this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=$_(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=eS.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=SF(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){var o,l,c,E;if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(f=>{var h;return(h=f.embeddedLangsLazy)==null?void 0:h.includes(t.name)}));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(f=>{this._alias[f]=t.name}),this._loadedLanguagesCache=null,n.size)for(const f of n)this._resolvedGrammars.delete(f.name),this._loadedLanguagesCache=null,(l=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||l.delete(f.scopeName),(E=(c=this._syncRegistry)==null?void 0:c._grammars)==null||E.delete(f.scopeName),this.loadLanguage(this._langMap.get(f.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,o])=>!o);if(r.length){const s=n.filter(([o,l])=>{var c;return l?(c=l.embeddedLanguages||l.embeddedLangs)==null?void 0:c.some(E=>r.map(([f])=>f).includes(E)):!1}).filter(o=>!r.includes(o));throw new On(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of n)this._resolver.addLanguage(o);for(const[s,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},bQ=class{constructor(e,t){Te(this,"_langs",new Map);Te(this,"_scopeToLang",new Map);Te(this,"_injections",new Map);Te(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const s=t.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let Jf=0;function PQ(e){Jf+=1,e.warnings!==!1&&Jf>=10&&Jf%10===0&&console.warn(`[Shiki] ${Jf} 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 On("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map($_),s=new yQ(new bQ(e.engine,n),r,n,e.langAlias);let o;function l(C){return SF(C,e.langAlias)}function c(C){g();const L=s.getGrammar(typeof C=="string"?C:C.name);if(!L)throw new On(`Language \`${C}\` not found, you may need to load it first`);return L}function E(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const L=s.getTheme(C);if(!L)throw new On(`Theme \`${C}\` not found, you may need to load it first`);return L}function f(C){g();const L=E(C);return o!==C&&(s.setTheme(L),o=C),{theme:L,colorMap:s.getColorMap()}}function h(){return g(),s.getLoadedThemes()}function d(){return g(),s.getLoadedLanguages()}function p(...C){g(),s.loadLanguages(C.flat(1))}async function S(...C){return p(await pF(C))}function R(...C){g();for(const L of C.flat(1))s.loadTheme(L)}async function m(...C){return g(),R(await RF(C))}function g(){if(t)throw new On("Shiki instance has been disposed")}function I(){t||(t=!0,s.dispose(),Jf-=1)}return{setTheme:f,getTheme:E,getLanguage:c,getLoadedThemes:h,getLoadedLanguages:d,resolveLangAlias:l,loadLanguage:S,loadLanguageSync:p,loadTheme:m,loadThemeSync:R,dispose:I,[Symbol.dispose]:I}}async function DQ(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([RF(e.themes||[]),pF(e.langs||[]),e.engine]);return PQ({...e,themes:t,langs:n,engine:r})}const mF=new WeakMap;function JS(e,t){mF.set(e,t)}function Wd(e){return mF.get(e)}var QS=class AF{constructor(...t){Te(this,"_stacks",{});Te(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]: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 AF(Object.fromEntries(LQ(n).map(r=>[r,WN])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return vQ(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function vQ(e){const t=[],n=new Set;function r(s){var l;if(n.has(s))return;n.add(s);const o=(l=s==null?void 0:s.nameScopesList)==null?void 0:l.scopeName;o&&t.push(o),s.parent&&r(s.parent)}return r(e),t}function MQ(e,t){if(!(e instanceof QS))throw new On("Invalid grammar state");return e.getInternalStack(t)}function gF(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(KS(e.resolveLangAlias(n.lang||"text"))||zS(r))return qS(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:o}=e.setTheme(r),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new On(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new On(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return UQ(t,l,s,o,n)}function xQ(...e){if(e.length===2)return Wd(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:o=t.getLoadedThemes()[0]}=r;if(KS(s)||zS(o))throw new On("Plain language does not have grammar state");if(s==="ansi")throw new On("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(o),E=t.getLanguage(s);return new QS(K_(n,E,l,c,r).stateStack,E.name,l.name)}function UQ(e,t,n,r,s){const o=K_(e,t,n,r,s),l=new QS(o.stateStack,t.name,n.name);return JS(o.tokens,l),o.tokens}function K_(e,t,n,r,s){const o=iS(n,s),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500}=s,E=qS(e);let f=s.grammarState?MQ(s.grammarState,n.name)??WN:s.grammarContextCode!=null?K_(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:WN,h=[];const d=[];for(let p=0,S=E.length;p<S;p++){const[R,m]=E[p];if(R===""){h=[],d.push([]);continue}if(l>0&&R.length>=l){h=[],d.push([{content:R,offset:m,color:"",fontStyle:0}]);continue}let g,I,C;s.includeExplanation&&(g=t.tokenizeLine(R,f,c),I=g.tokens,C=0);const L=t.tokenizeLine2(R,f,c),N=L.tokens.length/2;for(let y=0;y<N;y++){const _=L.tokens[2*y],M=y+1<N?L.tokens[2*y+2]:R.length;if(_===M)continue;const w=L.tokens[2*y+1],F=sl(r[gE.getForeground(w)],o),Y=gE.getFontStyle(w),$={content:R.substring(_,M),offset:m+_,color:F,fontStyle:Y};if(s.includeExplanation){const W=[];if(s.includeExplanation!=="scopeName")for(const q of n.settings){let j;switch(typeof q.scope){case"string":j=q.scope.split(/,/).map(k=>k.trim());break;case"object":j=q.scope;break;default:continue}W.push({settings:q,selectors:j.map(k=>k.split(/ /))})}$.explanation=[];let K=0;for(;_+K<M;){const q=I[C],j=R.substring(q.startIndex,q.endIndex);K+=j.length,$.explanation.push({content:j,scopes:s.includeExplanation==="scopeName"?wQ(q.scopes):GQ(W,q.scopes)}),C+=1}}h.push($)}d.push(h),h=[],f=L.ruleStack}return{tokens:d,stateStack:f}}function wQ(e){return e.map(t=>({scopeName:t}))}function GQ(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const o=t[r];n[r]={scopeName:o,themeMatches:FQ(e,o,t.slice(0,r))}}return n}function Uv(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function BQ(e,t,n){if(!Uv(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)Uv(e[r],n[s])&&(r-=1),s-=1;return r===-1}function FQ(e,t,n){const r=[];for(const{selectors:s,settings:o}of e)for(const l of s)if(BQ(l,t,n)){r.push(o);break}return r}function OF(e,t,n,r=gF){const s=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=s.map(f=>{const h=r(e,t,{...n,theme:f.theme});return{tokens:h,state:Wd(h),theme:typeof f.theme=="string"?f.theme:f.theme.name}}),l=HQ(...o.map(f=>f.tokens)),c=l[0].map((f,h)=>f.map((d,p)=>{const S={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(S.explanation=d.explanation),l.forEach((R,m)=>{const{content:g,explanation:I,offset:C,...L}=R[h][p];S.variants[s[m].color]=L}),S})),E=o[0].state?new QS(Object.fromEntries(o.map(f=>{var h;return[f.theme,(h=f.state)==null?void 0:h.getInternalStack(f.theme)]})),o[0].state.lang):void 0;return E&&JS(c,E),c}function HQ(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(E=>E[r]),o=t.map(()=>[]);t.forEach((E,f)=>E.push(o[f]));const l=s.map(()=>0),c=s.map(E=>E[0]);for(;c.every(E=>E);){const E=Math.min(...c.map(f=>f.content.length));for(let f=0;f<n;f++){const h=c[f];h.content.length===E?(o[f].push(h),l[f]+=1,c[f]=s[f][l[f]]):(o[f].push({...h,content:h.content.slice(0,E)}),c[f]={...h,content:h.content.slice(E),offset:h.offset+E})}}}return t}const VQ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class hT{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}hT.prototype.normal={};hT.prototype.property={};hT.prototype.space=void 0;function IF(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new hT(n,r,t)}function jN(e){return e.toLowerCase()}class ms{constructor(t,n){this.attribute=n,this.property=t}}ms.prototype.attribute="";ms.prototype.booleanish=!1;ms.prototype.boolean=!1;ms.prototype.commaOrSpaceSeparated=!1;ms.prototype.commaSeparated=!1;ms.prototype.defined=!1;ms.prototype.mustUseProperty=!1;ms.prototype.number=!1;ms.prototype.overloadedBoolean=!1;ms.prototype.property="";ms.prototype.spaceSeparated=!1;ms.prototype.space=void 0;let kQ=0;const Pt=kc(),Qn=kc(),XN=kc(),Ve=kc(),gn=kc(),Ju=kc(),Ls=kc();function kc(){return 2**++kQ}const $N=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pt,booleanish:Qn,commaOrSpaceSeparated:Ls,commaSeparated:Ju,number:Ve,overloadedBoolean:XN,spaceSeparated:gn},Symbol.toStringTag,{value:"Module"})),_O=Object.keys($N);class z_ extends ms{constructor(t,n,r,s){let o=-1;if(super(t,n),wv(this,"space",s),typeof r=="number")for(;++o<_O.length;){const l=_O[o];wv(this,_O[o],(r&$N[l])===$N[l])}}}z_.prototype.defined=!0;function wv(e,t,n){n&&(e[t]=n)}function vE(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new z_(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[jN(r)]=r,n[jN(o.attribute)]=r}return new hT(t,n,e.space)}const NF=vE({properties:{ariaActiveDescendant:null,ariaAtomic:Qn,ariaAutoComplete:null,ariaBusy:Qn,ariaChecked:Qn,ariaColCount:Ve,ariaColIndex:Ve,ariaColSpan:Ve,ariaControls:gn,ariaCurrent:null,ariaDescribedBy:gn,ariaDetails:null,ariaDisabled:Qn,ariaDropEffect:gn,ariaErrorMessage:null,ariaExpanded:Qn,ariaFlowTo:gn,ariaGrabbed:Qn,ariaHasPopup:null,ariaHidden:Qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gn,ariaLevel:Ve,ariaLive:null,ariaModal:Qn,ariaMultiLine:Qn,ariaMultiSelectable:Qn,ariaOrientation:null,ariaOwns:gn,ariaPlaceholder:null,ariaPosInSet:Ve,ariaPressed:Qn,ariaReadOnly:Qn,ariaRelevant:null,ariaRequired:Qn,ariaRoleDescription:gn,ariaRowCount:Ve,ariaRowIndex:Ve,ariaRowSpan:Ve,ariaSelected:Qn,ariaSetSize:Ve,ariaSort:null,ariaValueMax:Ve,ariaValueMin:Ve,ariaValueNow:Ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function CF(e,t){return t in e?e[t]:t}function _F(e,t){return CF(e,t.toLowerCase())}const YQ=vE({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ju,acceptCharset:gn,accessKey:gn,action:null,allow:null,allowFullScreen:Pt,allowPaymentRequest:Pt,allowUserMedia:Pt,alt:null,as:null,async:Pt,autoCapitalize:null,autoComplete:gn,autoFocus:Pt,autoPlay:Pt,blocking:gn,capture:null,charSet:null,checked:Pt,cite:null,className:gn,cols:Ve,colSpan:null,content:null,contentEditable:Qn,controls:Pt,controlsList:gn,coords:Ve|Ju,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pt,defer:Pt,dir:null,dirName:null,disabled:Pt,download:XN,draggable:Qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pt,formTarget:null,headers:gn,height:Ve,hidden:XN,high:Ve,href:null,hrefLang:null,htmlFor:gn,httpEquiv:gn,id:null,imageSizes:null,imageSrcSet:null,inert:Pt,inputMode:null,integrity:null,is:null,isMap:Pt,itemId:null,itemProp:gn,itemRef:gn,itemScope:Pt,itemType:gn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pt,low:Ve,manifest:null,max:null,maxLength:Ve,media:null,method:null,min:null,minLength:Ve,multiple:Pt,muted:Pt,name:null,nonce:null,noModule:Pt,noValidate:Pt,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:Pt,optimum:Ve,pattern:null,ping:gn,placeholder:null,playsInline:Pt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pt,referrerPolicy:null,rel:gn,required:Pt,reversed:Pt,rows:Ve,rowSpan:Ve,sandbox:gn,scope:null,scoped:Pt,seamless:Pt,selected:Pt,shadowRootClonable:Pt,shadowRootDelegatesFocus:Pt,shadowRootMode:null,shape:null,size:Ve,sizes:null,slot:null,span:Ve,spellCheck:Qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ve,step:null,style:null,tabIndex:Ve,target:null,title:null,translate:null,type:null,typeMustMatch:Pt,useMap:null,value:Qn,width:Ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gn,axis:null,background:null,bgColor:null,border:Ve,borderColor:null,bottomMargin:Ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pt,declare:Pt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ve,leftMargin:Ve,link:null,longDesc:null,lowSrc:null,marginHeight:Ve,marginWidth:Ve,noResize:Pt,noHref:Pt,noShade:Pt,noWrap:Pt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ve,rules:null,scheme:null,scrolling:Qn,standby:null,summary:null,text:null,topMargin:Ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pt,disableRemotePlayback:Pt,prefix:null,property:null,results:Ve,security:null,unselectable:null},space:"html",transform:_F}),WQ=vE({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:Ls,accentHeight:Ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ve,amplitude:Ve,arabicForm:null,ascent:Ve,attributeName:null,attributeType:null,azimuth:Ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ve,by:null,calcMode:null,capHeight:Ve,className:gn,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:Ve,diffuseConstant:Ve,direction:null,display:null,dur:null,divisor:Ve,dominantBaseline:null,download:Pt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ve,enableBackground:null,end:null,event:null,exponent:Ve,externalResourcesRequired:null,fill:null,fillOpacity:Ve,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:Ju,g2:Ju,glyphName:Ju,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ve,horizOriginX:Ve,horizOriginY:Ve,id:null,ideographic:Ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ve,k:Ve,k1:Ve,k2:Ve,k3:Ve,k4:Ve,kernelMatrix:Ls,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ve,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:Ve,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:Ve,overlineThickness:Ve,paintOrder:null,panose1:null,path:null,pathLength:Ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ve,pointsAtY:Ve,pointsAtZ:Ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ls,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ls,rev:Ls,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ls,requiredFeatures:Ls,requiredFonts:Ls,requiredFormats:Ls,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:Ve,specularExponent:Ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ve,strikethroughThickness:Ve,string:null,stroke:null,strokeDashArray:Ls,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ve,strokeOpacity:Ve,strokeWidth:null,style:null,surfaceScale:Ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ls,tabIndex:Ve,tableValues:null,target:null,targetX:Ve,targetY:Ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ls,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ve,underlineThickness:Ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ve,values:null,vAlphabetic:Ve,vMathematical:Ve,vectorEffect:null,vHanging:Ve,vIdeographic:Ve,version:null,vertAdvY:Ve,vertOriginX:Ve,vertOriginY:Ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:CF}),LF=vE({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()}}),yF=vE({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_F}),bF=vE({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jQ=/[A-Z]/g,Gv=/-[a-z]/g,XQ=/^data[-\w.:]+$/i;function $Q(e,t){const n=jN(t);let r=t,s=ms;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XQ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Gv,zQ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Gv.test(o)){let l=o.replace(jQ,KQ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=z_}return new s(r,t)}function KQ(e){return"-"+e.toLowerCase()}function zQ(e){return e.charAt(1).toUpperCase()}const qQ=IF([NF,YQ,LF,yF,bF],"html"),PF=IF([NF,WQ,LF,yF,bF],"svg"),Bv={}.hasOwnProperty;function JQ(e,t){const n=t||{};function r(s,...o){let l=r.invalid;const c=r.handlers;if(s&&Bv.call(s,e)){const E=String(s[e]);l=Bv.call(c,E)?c[E]:r.unknown}if(l)return l.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const QQ=/["&'<>`]/g,ZQ=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eZ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tZ=/[|\\{}()[\]^$+*?.]/g,Fv=new WeakMap;function nZ(e,t){if(e=e.replace(t.subset?rZ(t.subset):QQ,r),t.subset||t.escapeOnly)return e;return e.replace(ZQ,n).replace(eZ,r);function n(s,o,l){return t.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(s,o,l){return t.format(s.charCodeAt(0),l.charCodeAt(o+1),t)}}function rZ(e){let t=Fv.get(e);return t||(t=sZ(e),Fv.set(e,t)),t}function sZ(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(tZ,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const iZ=/[\dA-Fa-f]/;function oZ(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!iZ.test(String.fromCharCode(t))?r:r+";"}const aZ=/\d/;function lZ(e,t,n){const r="&#"+String(e);return n&&t&&!aZ.test(String.fromCharCode(t))?r:r+";"}const cZ=["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"],LO={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:"€"},uZ=["cent","copy","divide","gt","lt","not","para","times"],DF={}.hasOwnProperty,KN={};let Up;for(Up in LO)DF.call(LO,Up)&&(KN[LO[Up]]=Up);const EZ=/[^\dA-Za-z]/;function fZ(e,t,n,r){const s=String.fromCharCode(e);if(DF.call(KN,s)){const o=KN[s],l="&"+o;return n&&cZ.includes(o)&&!uZ.includes(o)&&(!r||t&&t!==61&&EZ.test(String.fromCharCode(t)))?l:l+";"}return""}function dZ(e,t,n){let r=oZ(e,t,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=fZ(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=lZ(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Qu(e,t){return nZ(e,Object.assign({format:dZ},t))}const TZ=/^>|^->|<!--|-->|--!>|<!-$/g,hZ=[">"],pZ=["<",">"];function RZ(e,t,n,r){return r.settings.bogusComments?"<?"+Qu(e.value,Object.assign({},r.settings.characterReferences,{subset:hZ}))+">":"<!--"+e.value.replace(TZ,s)+"-->";function s(o){return Qu(o,Object.assign({},r.settings.characterReferences,{subset:pZ}))}}function SZ(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Hv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function mZ(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function AZ(e){return e.join(" ").trim()}const gZ=/[ \t\n\f\r]/g;function q_(e){return typeof e=="object"?e.type==="text"?Vv(e.value):!1:Vv(e)}function Vv(e){return e.replace(gZ,"")===""}const lr=MF(1),vF=MF(-1),OZ=[];function MF(e){return t;function t(n,r,s){const o=n?n.children:OZ;let l=(r||0)+e,c=o[l];if(!s)for(;c&&q_(c);)l+=e,c=o[l];return c}}const IZ={}.hasOwnProperty;function xF(e){return t;function t(n,r,s){return IZ.call(e,n.tagName)&&e[n.tagName](n,r,s)}}const J_=xF({body:CZ,caption:yO,colgroup:yO,dd:bZ,dt:yZ,head:yO,html:NZ,li:LZ,optgroup:PZ,option:DZ,p:_Z,rp:kv,rt:kv,tbody:MZ,td:Yv,tfoot:xZ,th:Yv,thead:vZ,tr:UZ});function yO(e,t,n){const r=lr(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&q_(r.value.charAt(0)))}function NZ(e,t,n){const r=lr(n,t);return!r||r.type!=="comment"}function CZ(e,t,n){const r=lr(n,t);return!r||r.type!=="comment"}function _Z(e,t,n){const r=lr(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 LZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&r.tagName==="li"}function yZ(e,t,n){const r=lr(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function bZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function kv(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function PZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function DZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function vZ(e,t,n){const r=lr(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function MZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function xZ(e,t,n){return!lr(n,t)}function UZ(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Yv(e,t,n){const r=lr(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const wZ=xF({body:FZ,colgroup:HZ,head:BZ,html:GZ,tbody:VZ});function GZ(e){const t=lr(e,-1);return!t||t.type!=="comment"}function BZ(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 FZ(e){const t=lr(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&q_(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function HZ(e,t,n){const r=vF(n,t),s=lr(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&J_(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function VZ(e,t,n){const r=vF(n,t),s=lr(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&J_(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const wp={name:[[`
104
+ \f\r &/=>`.split(""),`
105
+ \f\r "&'/=>\``.split("")],[`\0
106
+ \f\r "&'/<=>`.split(""),`\0
107
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
108
+ \f\r &>`.split(""),`\0
109
+ \f\r "&'<=>\``.split("")],[`\0
110
+ \f\r "&'<=>\``.split(""),`\0
111
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function kZ(e,t,n,r){const s=r.schema,o=s.space==="svg"?!1:r.settings.omitOptionalTags;let l=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const c=[];let E;s.space==="html"&&e.tagName==="svg"&&(r.schema=PF);const f=YZ(r,e.properties),h=r.all(s.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=s,h&&(l=!1),(f||!o||!wZ(e,t,n))&&(c.push("<",e.tagName,f?" "+f:""),l&&(s.space==="svg"||r.settings.closeSelfClosing)&&(E=f.charAt(f.length-1),(!r.settings.tightSelfClosing||E==="/"||E&&E!=='"'&&E!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(h),!l&&(!o||!J_(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function YZ(e,t){const n=[];let r=-1,s;if(t){for(s in t)if(t[s]!==null&&t[s]!==void 0){const o=WZ(e,s,t[s]);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 WZ(e,t,n){const r=$Q(e.schema,t),s=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;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 E=Qu(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wp.name[s][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?mZ:AZ)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?E:(e.settings.preferUnquoted&&(c=Qu(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wp.unquoted[s][o]}))),c!==n&&(e.settings.quoteSmart&&Hv(n,l)>Hv(n,e.alternative)&&(l=e.alternative),c=l+Qu(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?wp.single:wp.double)[s][o],attribute:!0}))+l),E+(c&&"="+c))}const jZ=["<","&"];function UF(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qu(e.value,Object.assign({},r.settings.characterReferences,{subset:jZ}))}function XZ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:UF(e,t,n,r)}function $Z(e,t,n,r){return r.all(e)}const KZ=JQ("type",{invalid:zZ,unknown:qZ,handlers:{comment:RZ,doctype:SZ,element:kZ,raw:XZ,root:$Z,text:UF}});function zZ(e){throw new Error("Expected node, not `"+e+"`")}function qZ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const JZ={},QZ={},ZZ=[];function eee(e,t){const n=t||JZ,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:tee,all:nee,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||VQ,characterReferences:n.characterReferences||QZ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?PF:qQ,quote:r,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function tee(e,t,n){return KZ(e,t,n,this)}function nee(e){const t=[],n=e&&e.children||ZZ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function wF(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 s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function ree(e){const t=qS(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=s,l=0;for(const c of t){if(o<c.length)break;o-=c.length,l++}return{line:l,character:o}}function r(s,o){let l=0;for(let c=0;c<s;c++)l+=t[c].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function see(e,t,n){const r=new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const l=o[1].toLowerCase().trim(),c=l.includes("/")?l.split("/").pop():l;c&&r.add(c)}if(!n)return Array.from(r);const s=n.getBundledLanguages();return Array.from(r).filter(o=>o&&s[o])}const Q_="light-dark()",iee=["color","background-color"];function oee(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function aee(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const o=n.filter(l=>s.offset<l&&l<s.offset+s.content.length).map(l=>l-s.offset).sort((l,c)=>l-c);return o.length?oee(s,o):s})):e}function lee(e,t,n,r,s="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(h=>oS(e.variants[h])),c=new Set(l.flatMap(h=>Object.keys(h))),E={},f=(h,d)=>{const p=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[h]+(d==="color"?"":p)};return l.forEach((h,d)=>{for(const p of c){const S=h[p]||"inherit";if(d===0&&r&&iee.includes(p))if(r===Q_&&l.length>1){const R=t.findIndex(g=>g==="light"),m=t.findIndex(g=>g==="dark");if(R===-1||m===-1)throw new On('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');E[p]=`light-dark(${l[R][p]||"inherit"}, ${l[m][p]||"inherit"})`,s==="css-vars"&&(E[f(d,p)]=S)}else E[p]=S;else s==="css-vars"&&(E[f(d,p)]=S)}}),o.htmlStyle=E,o}function oS(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Yr.Italic&&(t["font-style"]="italic"),e.fontStyle&Yr.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Yr.Underline&&n.push("underline"),e.fontStyle&Yr.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function zN(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function cee(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(c){if(typeof c=="number"){if(c<0||c>n.source.length)throw new On(`Invalid decoration offset: ${c}. Code length: ${n.source.length}`);return{...s.indexToPos(c),offset:c}}else{const E=s.lines[c.line];if(E===void 0)throw new On(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${s.lines.length}`);let f=c.character;if(f<0&&(f=E.length+f),f<0||f>E.length)throw new On(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${E.length}`);return{...c,character:f,offset:s.posToIndex(c.line,f)}}};var r=o;const s=ree(n.source),l=(n.options.decorations||[]).map(c=>({...c,start:o(c.start),end:o(c.end)}));uee(l),e.set(n.meta,{decorations:l,converter:s,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var r;if((r=this.options.decorations)!=null&&r.length)return aee(n,t(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]))},code(n){var h;if(!((h=this.options.decorations)!=null&&h.length))return;const r=t(this),s=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(s.length!==r.converter.lines.length)throw new On(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(d,p,S,R){const m=s[d];let g="",I=-1,C=-1;if(p===0&&(I=0),S===0&&(C=0),S===Number.POSITIVE_INFINITY&&(C=m.children.length),I===-1||C===-1)for(let N=0;N<m.children.length;N++)g+=GF(m.children[N]),I===-1&&g.length===p&&(I=N+1),C===-1&&g.length===S&&(C=N+1);if(I===-1)throw new On(`Failed to find start index for decoration ${JSON.stringify(R.start)}`);if(C===-1)throw new On(`Failed to find end index for decoration ${JSON.stringify(R.end)}`);const L=m.children.slice(I,C);if(!R.alwaysWrap&&L.length===m.children.length)c(m,R,"line");else if(!R.alwaysWrap&&L.length===1&&L[0].type==="element")c(L[0],R,"token");else{const N={type:"element",tagName:"span",properties:{},children:L};c(N,R,"wrapper"),m.children.splice(I,L.length,N)}}function l(d,p){s[d]=c(s[d],p,"line")}function c(d,p,S){var g;const R=p.properties||{},m=p.transform||(I=>I);return d.tagName=p.tagName||"span",d.properties={...d.properties,...R,class:d.properties.class},(g=p.properties)!=null&&g.class&&wF(d,p.properties.class),d=m(d,S)||d,d}const E=[],f=r.decorations.sort((d,p)=>p.start.offset-d.start.offset||d.end.offset-p.end.offset);for(const d of f){const{start:p,end:S}=d;if(p.line===S.line)o(p.line,p.character,S.character,d);else if(p.line<S.line){o(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let R=p.line+1;R<S.line;R++)E.unshift(()=>l(R,d));o(S.line,0,S.character,d)}}E.forEach(d=>d())}}}function uee(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new On(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],o=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,l=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,c=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,E=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(o||l||c||E){if(o&&l||c&&E||c&&n.start.offset===n.end.offset||l&&s.start.offset===s.end.offset)continue;throw new On(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function GF(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(GF).join(""):""}const Eee=[cee()];function aS(e){const t=fee(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Eee]}function fee(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var lc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],bO={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function dee(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 Wv(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 Tee(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)bO[r]&&t.push({type:"setDecoration",value:bO[r]});else if(r<=29){const s=bO[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:lc[r-30]}});else if(r===38){const s=Wv(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:lc[r-40]}});else if(r===48){const s=Wv(e);s&&t.push({type:"setBackgroundColor",value:s})}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:lc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:lc[r-100+8]}})}return t}function hee(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let o=0;do{const l=dee(r,o),c=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(c.length>0&&s.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const E=Tee(l.sequence);for(const f of E)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 E)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 s}}}var pee={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 Ree(e=pee){function t(c){return e[c]}function n(c){return`#${c.map(E=>Math.max(0,Math.min(E,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let f=0;f<lc.length;f++)r.push(t(lc[f]));let c=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let h=0;h<6;h++)for(let d=0;d<6;d++)r.push(n([c[f],c[h],c[d]]));let E=8;for(let f=0;f<24;f++,E+=10)r.push(n([E,E,E]));return r}function o(c){return s()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return o(c.index)}}return{value:l}}const See={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function mee(e,t,n){const r=iS(e,n),s=qS(t),o=Ree(Object.fromEntries(lc.map(c=>{var f;const E=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,((f=e.colors)==null?void 0:f[E])||See[c]]}))),l=hee();return s.map(c=>l.parse(c[0]).map(E=>{let f,h;E.decorations.has("reverse")?(f=E.background?o.value(E.background):e.bg,h=E.foreground?o.value(E.foreground):e.fg):(f=E.foreground?o.value(E.foreground):e.fg,h=E.background?o.value(E.background):void 0),f=sl(f,r),h=sl(h,r),E.decorations.has("dim")&&(f=Aee(f));let d=Yr.None;return E.decorations.has("bold")&&(d|=Yr.Bold),E.decorations.has("italic")&&(d|=Yr.Italic),E.decorations.has("underline")&&(d|=Yr.Underline),E.decorations.has("strikethrough")&&(d|=Yr.Strikethrough),{content:E.value,offset:c[1],color:f,bgColor:h,fontStyle:d}}))}function Aee(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],o=r[1],l=r[2],c=r[3];return`#${s}${s}${o}${o}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const s=r[0],o=r[1],l=r[2];return`#${s}${s}${o}${o}${l}${l}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function qN(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:s=e.getLoadedThemes()[0]}=n;if(!KS(r)&&!zS(s)&&r==="ansi"){const{theme:o}=e.setTheme(s);return mee(o,t,n)}return gF(e,t,n)}function lS(e,t,n){let r,s,o,l,c,E;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(I=>I[1]).map(I=>({color:I[0],theme:I[1]})).sort((I,C)=>I.color===f?-1:C.color===f?1:0);if(p.length===0)throw new On("`themes` option must not be empty");const S=OF(e,t,n,qN);if(E=Wd(S),f&&Q_!==f&&!p.find(I=>I.color===f))throw new On(`\`themes\` option must contain the defaultColor key \`${f}\``);const R=p.map(I=>e.getTheme(I.theme)),m=p.map(I=>I.color);o=S.map(I=>I.map(C=>lee(C,m,h,f,d))),E&&JS(o,E);const g=p.map(I=>iS(I.theme,n));s=jv(p,R,g,h,f,"fg",d),r=jv(p,R,g,h,f,"bg",d),l=`shiki-themes ${R.map(I=>I.name).join(" ")}`,c=f?void 0:[s,r].join(";")}else if("theme"in n){const f=iS(n.theme,n);o=qN(e,t,n);const h=e.getTheme(n.theme);r=sl(h.bg,f),s=sl(h.fg,f),l=h.name,E=Wd(o)}else throw new On("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:s,bg:r,themeName:l,rootStyle:c,grammarState:E}}function jv(e,t,n,r,s,o,l){return e.map((c,E)=>{const f=sl(t[E][o],n[E])||"inherit",h=`${r+c.color}${o==="bg"?"-bg":""}:${f}`;if(E===0&&s){if(s===Q_&&e.length>1){const d=e.findIndex(S=>S.color==="light"),p=e.findIndex(S=>S.color==="dark");if(d===-1||p===-1)throw new On('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${sl(t[d][o],n[d])||"inherit"}, ${sl(t[p][o],n[p])||"inherit"});${h}`}return f}return l==="css-vars"?h:null}).filter(c=>!!c).join(";")}function cS(e,t,n,r={meta:{},options:n,codeToHast:(s,o)=>cS(e,s,o),codeToTokens:(s,o)=>lS(e,s,o)}){var R,m;let s=t;for(const g of aS(n))s=((R=g.preprocess)==null?void 0:R.call(r,s,n))||s;let{tokens:o,fg:l,bg:c,themeName:E,rootStyle:f,grammarState:h}=lS(e,s,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;d===!0?o=Oee(o):d==="never"&&(o=Iee(o)),p&&(o=Nee(o));const S={...r,get source(){return s}};for(const g of aS(n))o=((m=g.tokens)==null?void 0:m.call(S,o))||o;return gee(o,{...n,fg:l,bg:c,themeName:E,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},S,h)}function gee(e,t,n,r=Wd(e)){var m,g,I,C;const s=aS(t),o=[],l={type:"root",children:[]},{structure:c="classic",tabindex:E="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),E!==!1&&E!=null&&(f.tabindex=E.toString());for(const[L,N]of Object.entries(t.meta||{}))L.startsWith("_")||(f[L]=N);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const p=[],S={...n,structure:c,addClassToHast:wF,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return h},get code(){return d},get lines(){return p}};if(e.forEach((L,N)=>{var M,w;N&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&o.push({type:"text",value:`
112
+ `}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const F of L){let Y={type:"element",tagName:"span",properties:{...F.htmlAttrs},children:[{type:"text",value:F.content}]};const $=zN(F.htmlStyle||oS(F));$&&(Y.properties.style=$);for(const W of s)Y=((M=W==null?void 0:W.span)==null?void 0:M.call(S,Y,N+1,_,y,F))||Y;c==="inline"?l.children.push(Y):c==="classic"&&y.children.push(Y),_+=F.content.length}if(c==="classic"){for(const F of s)y=((w=F==null?void 0:F.line)==null?void 0:w.call(S,y,N+1))||y;p.push(y),o.push(y)}else c==="inline"&&p.push(y)}),c==="classic"){for(const L of s)d=((m=L==null?void 0:L.code)==null?void 0:m.call(S,d))||d;h.children.push(d);for(const L of s)h=((g=L==null?void 0:L.pre)==null?void 0:g.call(S,h))||h;l.children.push(h)}else if(c==="inline"){const L=[];let N={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of l.children)_.type==="element"&&_.tagName==="br"?(L.push(N),N={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&N.children.push(_);L.push(N);let y={type:"element",tagName:"code",properties:{},children:L};for(const _ of s)y=((I=_==null?void 0:_.code)==null?void 0:I.call(S,y))||y;l.children=[];for(let _=0;_<y.children.length;_++){_>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const M=y.children[_];M.type==="element"&&l.children.push(...M.children)}}let R=l;for(const L of s)R=((C=L==null?void 0:L.root)==null?void 0:C.call(S,R))||R;return r&&JS(R,r),R}function Oee(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((o,l)=>{const c=!(o.fontStyle&&(o.fontStyle&Yr.Underline||o.fontStyle&Yr.Strikethrough));c&&o.content.match(/^\s+$/)&&t[l+1]?(s===void 0&&(s=o.offset),r+=o.content):r?(c?n.push({...o,offset:s,content:r+o.content}):n.push({content:r,offset:s},o),s=void 0,r=""):n.push(o)}),n})}function Iee(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[,s,o,l]=r;if(!s&&!l)return n;const c=[{...n,offset:n.offset+s.length,content:o}];return s&&c.unshift({content:s,offset:n.offset}),l&&c.push({content:l,offset:n.offset+s.length+o.length}),c}))}function Nee(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],o=zN(s.htmlStyle||oS(s)),l=zN(r.htmlStyle||oS(r)),c=s.fontStyle&&(s.fontStyle&Yr.Underline||s.fontStyle&Yr.Strikethrough),E=r.fontStyle&&(r.fontStyle&Yr.Underline||r.fontStyle&Yr.Strikethrough);!c&&!E&&o===l?s.content+=r.content:n.push({...r})}return n})}const Cee=eee;function _ee(e,t,n){var o;const r={meta:{},options:n,codeToHast:(l,c)=>cS(e,l,c),codeToTokens:(l,c)=>lS(e,l,c)};let s=Cee(cS(e,t,n,r));for(const l of aS(n))s=((o=l.postprocess)==null?void 0:o.call(r,s,n))||s;return s}async function Lee(e){const t=await DQ(e);return{getLastGrammarState:(...n)=>xQ(t,...n),codeToTokensBase:(n,r)=>qN(t,n,r),codeToTokensWithThemes:(n,r)=>OF(t,n,r),codeToTokens:(n,r)=>lS(t,n,r),codeToHast:(n,r)=>cS(t,n,r),codeToHtml:(n,r)=>_ee(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function yee(e){const t=e.langs,n=e.themes,r=e.engine;async function s(o){function l(d){var p;if(typeof d=="string"){if(d=((p=o.langAlias)==null?void 0:p[d])||d,TF(d))return[];const S=t[d];if(!S)throw new On(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return S}return d}function c(d){if(hF(d))return"none";if(typeof d=="string"){const p=n[d];if(!p)throw new On(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}const E=(o.themes??[]).map(d=>c(d)),f=(o.langs??[]).map(d=>l(d)),h=await Lee({engine:o.engine??r(),...o,themes:E,langs:f});return{...h,loadLanguage(...d){return h.loadLanguage(...d.map(l))},loadTheme(...d){return h.loadTheme(...d.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return s}function bee(e){let t;async function n(r={}){if(t){const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{t=e({...r,themes:[],langs:[]});const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return n}function Pee(e,t){const n=bee(e);async function r(s,o){var E;const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),c=await((E=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:E.call(t,s,o.lang,l));return c&&await l.loadLanguage(...c),l}return{getSingletonHighlighter(s){return n(s)},async codeToHtml(s,o){return(await r(s,o)).codeToHtml(s,o)},async codeToHast(s,o){return(await r(s,o)).codeToHast(s,o)},async codeToTokens(s,o){return(await r(s,o)).codeToTokens(s,o)},async codeToTokensBase(s,o){return(await r(s,o)).codeToTokensBase(s,o)},async codeToTokensWithThemes(s,o){return(await r(s,o)).codeToTokensWithThemes(s,o)},async getLastGrammarState(s,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(s,o)}}}var Dee=B_({bundledLanguages:()=>V_,bundledLanguagesAlias:()=>H_,bundledLanguagesBase:()=>F_,bundledLanguagesInfo:()=>jS,bundledThemes:()=>Y_,bundledThemesInfo:()=>k_,codeToHast:()=>BF,codeToHtml:()=>eL,codeToTokens:()=>FF,codeToTokensBase:()=>HF,codeToTokensWithThemes:()=>VF,createHighlighter:()=>Z_,getLastGrammarState:()=>YF,getSingletonHighlighter:()=>kF});const Z_=yee({langs:V_,themes:Y_,engine:()=>(0,JB.createOnigurumaEngine)(X(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:eL,codeToHast:BF,codeToTokens:FF,codeToTokensBase:HF,codeToTokensWithThemes:VF,getSingletonHighlighter:kF,getLastGrammarState:YF}=Pee(Z_,{guessEmbeddedLanguages:see}),Xv=4294967295;var vee=class{constructor(e,t={}){Te(this,"regexps");this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:s}=t;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const l=r==null?void 0:r.get(o);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=s(o);return r==null||r.set(o,c),c}catch(c){if(r==null||r.set(o,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,s=[];function o(l,c,E=0){return{index:l,captureIndices:c.indices.map(f=>f==null?{start:Xv,end:Xv,length:0}:{start:f[0]+E,end:f[1]+E,length:f[1]-f[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const E=c.exec(r);if(!E)continue;if(E.index===t)return o(l,E,0);s.push([l,E,0])}catch(E){if(this.options.forgiving)continue;throw E}}if(s.length){const l=Math.min(...s.map(c=>c[1].index));for(const[c,E,f]of s)if(E.index===l)return o(c,E,f)}return null}};function ME(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Mee(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const tL=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),mr=String.raw;function xE(e,t){if(e==null)throw new Error(t??"Value expected");return e}const WF=mr`\[\^?`,jF=`c.? | C(?:-.?)?|${mr`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${mr`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${mr`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${mr`o\{[^\}]*\}?`}|${mr`\d{1,3}`}`,nL=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Gp=new RegExp(mr`
113
+ \\ (?:
114
+ ${jF}
115
+ | [gk]<[^>]*>?
116
+ | [gk]'[^']*'?
117
+ | .
118
+ )
119
+ | \( (?:
120
+ \? (?:
121
+ [:=!>({]
122
+ | <[=!]
123
+ | <[^>]*>
124
+ | '[^']*'
125
+ | ~\|?
126
+ | #(?:[^)\\]|\\.?)*
127
+ | [^:)]*[:)]
128
+ )?
129
+ | \*[^\)]*\)?
130
+ )?
131
+ | (?:${nL.source})+
132
+ | ${WF}
133
+ | .
134
+ `.replace(/\s+/g,""),"gsu"),PO=new RegExp(mr`
135
+ \\ (?:
136
+ ${jF}
137
+ | .
138
+ )
139
+ | \[:(?:\^?\p{Alpha}+|\^):\]
140
+ | ${WF}
141
+ | &&
142
+ | .
143
+ `.replace(/\s+/g,""),"gsu");function xee(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=Zee(n.flags),s=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(d){s.push(d)},replaceCurrentModX(d){s[s.length-1]=d},singleline:n.rules.singleline};let l=[],c;for(Gp.lastIndex=0;c=Gp.exec(e);){const d=Uee(o,e,c[0],Gp.lastIndex);d.tokens?l.push(...d.tokens):d.token&&l.push(d.token),d.lastIndex!==void 0&&(Gp.lastIndex=d.lastIndex)}const E=[];let f=0;l.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++f:d.raw==="("&&E.push(d)}),f||E.forEach((d,p)=>{d.kind="capturing",d.number=p+1});const h=f||E.length;return{tokens:l.map(d=>d.type==="EscapedNumber"?tte(d,h):d).flat(),flags:r}}function Uee(e,t,n,r){const[s,o]=n;if(n==="["||n==="[^"){const l=wee(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(o))return{token:$v(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Xee(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:$F(n)}}if(o==="K")return{token:KF("keep",n)};if(o==="N"||o==="R")return{token:cc("newline",n,{negate:o==="N"})};if(o==="O")return{token:cc("any",n)};if(o==="X")return{token:cc("text_segment",n)};const l=XF(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(s==="("){if(o==="*")return{token:qee(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:zee(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Vu("group",n)};if(n==="(?>")return{token:Vu("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Vu(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Vu("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Vu("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Yee(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
144
+ `,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:cc("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":mr`\A`,$:mr`\Z`}[n]:n;return{token:$v(l,n)}}return n==="|"?{token:Bee(n)}:nL.test(n)?{tokens:nte(n)}:{token:Mo(ME(n),n)}}function wee(e,t,n){const r=[Kv(t[1]==="^",t)];let s=1,o;for(PO.lastIndex=n;o=PO.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")s++,r.push(Kv(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Mo(93,l));else if(s--,r.push(Fee(l)),!s)break}else{const c=Gee(l);Array.isArray(c)?r.push(...c):r.push(c)}}return{tokens:r,lastIndex:PO.lastIndex||e.length}}function Gee(e){if(e[0]==="\\")return XF(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!tL.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return cc("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Hee(e):e==="&&"?Vee(e):Mo(ME(e),e)}function XF(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Kee(e);if("dDhHsSwW".includes(n))return Jee(e);if(e.startsWith(mr`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Qee(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...s].map(l=>{const c=[...o.encode(l)].map(E=>`\\x${E.toString(16)}`).join("");return Mo(ME(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Mo(ete(e),e);if(zv.has(n))return Mo(zv.get(n),e);if(/\d/.test(n))return kee(t,e);if(e==="\\")throw new Error(mr`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Mo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Bee(e){return{type:"Alternator",raw:e}}function $v(e,t){return{type:"Assertion",kind:e,raw:t}}function $F(e){return{type:"Backreference",raw:e}}function Mo(e,t){return{type:"Character",value:e,raw:t}}function Fee(e){return{type:"CharacterClassClose",raw:e}}function Hee(e){return{type:"CharacterClassHyphen",raw:e}}function Vee(e){return{type:"CharacterClassIntersector",raw:e}}function Kv(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function cc(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function KF(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:xE(n.flags),raw:t}}function kee(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Yee(e){return{type:"GroupClose",raw:e}}function Vu(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Wee(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function jee(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Xee(e){return{type:"Subroutine",raw:e}}const $ee=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),zv=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Kee(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Mo(ME(t.toUpperCase())-64,e)}function zee(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const s=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=Jv(n),l=Jv(r),c={};if(o&&(c.enable=o),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(s),KF("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(s),t.numOpenGroups++,Vu("group",e,{...(o||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function qee(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:s}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=s?s.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[l,c,E]=o,f=$ee.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof E=="string"&&!/^[A-Za-z_]\w*$/.test(E))throw new Error(`Named callout argument three must be a tag or number "${E}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return Wee(f,r??null,(s==null?void 0:s.split(","))??null,e)}function qv(e){let t=null,n,r;if(e[0]==="{"){const{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+s>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=o===void 0?+s:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return jee(t,n,r,e)}function Jee(e){const t=e[1].toLowerCase();return cc({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Qee(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return cc("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Jv(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Zee(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function ete(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function tte(e,t){const{raw:n,inCharClass:r}=e,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=t))return[$F(n)];const o=[],l=s.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const E=l[c];let f;if(c===0&&E!=="8"&&E!=="9"){if(f=parseInt(E,8),f>127)throw new Error(mr`Octal encoded byte above 177 unsupported "${n}"`)}else f=ME(E);o.push(Mo(f,(c===0?"\\":"")+E))}return o}function nte(e){const t=[],n=new RegExp(nL,"gy");let r;for(;r=n.exec(e);){const s=r[0];if(s[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){const{min:l,max:c}=o.groups;if(+l>+c&&s.endsWith("?")){n.lastIndex--,t.push(qv(s.slice(0,-1)));continue}}}t.push(qv(s))}return t}function zF(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function rte(e){return ste.has(e.type)}const ste=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function qF(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=xee(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(p,S)=>{const R=r.tokens[o.nextIndex];switch(o.parent=p,o.nextIndex++,R.type){case"Alternator":return vc();case"Assertion":return ite(R);case"Backreference":return ote(R,o);case"Character":return ZS(R.value,{useLastValid:!!S.isCheckingRangeEnd});case"CharacterClassHyphen":return ate(R,o,S);case"CharacterClassOpen":return lte(R,o,S);case"CharacterSet":return cte(R,o);case"Directive":return hte(R.kind,{flags:R.flags});case"GroupOpen":return ute(R,o,S);case"NamedCallout":return Rte(R.kind,R.tag,R.arguments);case"Quantifier":return Ete(R,o);case"Subroutine":return fte(R,o);default:throw new Error(`Unexpected token type "${R.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},l=mte(pte(r.flags));let c=l.body[0];for(;o.nextIndex<r.tokens.length;){const p=s(c,{});p.type==="Alternative"?(l.body.push(p),c=p):c.body.push(p)}const{capturingGroups:E,hasNumberedRef:f,namedGroupsByName:h,subroutines:d}=o;if(f&&h.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:p}of d)if(typeof p=="number"){if(p>E.length)throw new Error("Subroutine uses a group number that's not defined");p&&(E[p-1].isSubroutined=!0)}else if(h.has(p)){if(h.get(p).length>1)throw new Error(mr`Subroutine uses a duplicate group name "\g<${p}>"`);h.get(p)[0].isSubroutined=!0}else throw new Error(mr`Subroutine uses a group name that's not defined "\g<${p}>"`);return l}function ite({kind:e}){return JN(xE({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===mr`\B`||e===mr`\Y`})}function ote({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),s=(o,l=!1)=>{const c=t.capturingGroups.length;let E=!1;if(o>c)if(t.skipBackrefValidation)E=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,QN(l?c+1-o:o,{orphan:E})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return QN(r)}return s(+r)}function ate(e,t,n){const{tokens:r,walk:s}=t,o=t.parent,l=o.body.at(-1),c=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const E=s(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&E.type==="Character")return o.body.pop(),Tte(l,E);throw new Error("Invalid character class range")}return ZS(ME("-"))}function lte({negate:e},t,n){const{tokens:r,walk:s}=t,o=r[t.nextIndex],l=[cR()];let c=eM(o);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")l.push(cR()),t.nextIndex++;else{const f=l.at(-1);f.body.push(s(f,n))}c=eM(r[t.nextIndex],o)}const E=cR({negate:e});return l.length===1?E.body=l[0].body:(E.kind="intersection",E.body=l.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,E}function cte({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:l}=r;if(e==="property"){const c=em(n);if(tL.has(c)&&!(l!=null&&l.has(c)))e="posix",n=c;else return ku(n,{negate:t,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?Ste(n,{negate:t}):ZN(e,{negate:t})}function ute(e,t,n){const{tokens:r,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,E=Ate(e),f=E.type==="AbsenceFunction",h=Zv(E),d=h&&E.negate;if(E.type==="CapturingGroup"&&(s.push(E),E.name&&Mee(o,E.name,[]).push(E)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=tM(r[t.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")E.body.push(vc()),t.nextIndex++;else{const S=E.body.at(-1),R=c(S,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||d});if(S.body.push(R),(h||n.isInLookbehind)&&!l){const m="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(Qv(R)||R.type==="CapturingGroup")throw new Error(m)}else if(Qv(R)||Zv(R)&&R.negate)throw new Error(m)}}p=tM(r[t.nextIndex])}return t.nextIndex++,E}function Ete({kind:e,min:t,max:n},r){const s=r.parent,o=s.body.at(-1);if(!o||!rte(o))throw new Error("Quantifier requires a repeatable token");const l=QF(e,t,n,o);return s.body.pop(),l}function fte({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let s=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){const c=+o.groups.num,E=n.length;if(t.hasNumberedRef=!0,s={"":c,"+":E+c,"-":E+1-c}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const l=ZF(s);return r.push(l),l}function dte(e,t){return{type:"AbsenceFunction",kind:e,body:pT(t==null?void 0:t.body)}}function vc(e){return{type:"Alternative",body:eH(e==null?void 0:e.body)}}function JN(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function QN(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function JF(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!gte(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:pT(t==null?void 0:t.body)}}function ZS(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function cR(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:eH(e==null?void 0:e.body)}}function Tte(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function ZN(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function hte(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:xE(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function pte(e){return{type:"Flags",...e}}function Oi(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:pT(e==null?void 0:e.body)}}function ec(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:pT(e==null?void 0:e.body)}}function Rte(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Ste(e,t){const n=!!(t!=null&&t.negate);if(!tL.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function QF(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function mte(e,t){return{type:"Regex",body:pT(t==null?void 0:t.body),flags:e}}function ZF(e){return{type:"Subroutine",ref:e}}function ku(e,t){var s;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(s=n.unicodePropertyMap)==null?void 0:s.get(em(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Ote(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(mr`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Ate({flags:e,kind:t,name:n,negate:r,number:s}){switch(t){case"absence_repeater":return dte("repeater");case"atomic":return Oi({atomic:!0});case"capturing":return JF(s,{name:n});case"group":return Oi({flags:e});case"lookahead":case"lookbehind":return ec({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function pT(e){if(e===void 0)e=[vc()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function eH(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Qv(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Zv(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function gte(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Ote(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function em(e){return e.replace(/[- _]+/g,"").toLowerCase()}function eM(e,t){return xE(e,`${(t==null?void 0:t.type)==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function tM(e){return xE(e,"Unclosed group")}function Ad(e,t,n=null){function r(o,l){for(let c=0;c<o.length;c++){const E=s(o[c],l,c,o);c=Math.max(-1,c+E)}}function s(o,l=null,c=null,E=null){var I,C;let f=0,h=!1;const d={node:o,parent:l,key:c,container:E,root:e,remove(){Bp(E).splice(Math.max(0,vu(c)+f),1),f--,h=!0},removeAllNextSiblings(){return Bp(E).splice(vu(c)+1)},removeAllPrevSiblings(){const L=vu(c)+f;return f-=L,Bp(E).splice(0,Math.max(0,L))},replaceWith(L,N={}){const y=!!N.traverse;E?E[Math.max(0,vu(c)+f)]=L:xE(l,"Can't replace root node")[c]=L,y&&s(L,l,c,E),h=!0},replaceWithMultiple(L,N={}){const y=!!N.traverse;if(Bp(E).splice(Math.max(0,vu(c)+f),1,...L),f+=L.length-1,y){let _=0;for(let M=0;M<L.length;M++)_+=s(L[M],l,vu(c)+M+_,E)}h=!0},skip(){h=!0}},{type:p}=o,S=t["*"],R=t[p],m=typeof S=="function"?S:S==null?void 0:S.enter,g=typeof R=="function"?R:R==null?void 0:R.enter;if(m==null||m(d,n),g==null||g(d,n),!h)switch(p){case"AbsenceFunction":case"CapturingGroup":case"Group":r(o.body,o);break;case"Alternative":case"CharacterClass":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"LookaroundAssertion":r(o.body,o);break;case"Quantifier":s(o.body,o,"body");break;case"Regex":r(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${p}"`)}return(I=R==null?void 0:R.exit)==null||I.call(R,d,n),(C=S==null?void 0:S.exit)==null||C.call(S,d,n),f}return s(e),e}function Bp(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function vu(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Ite=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Nte(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Cte(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const ii=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function rL(e,t,n,r){const s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,c="";for(const E of e.matchAll(s)){const{0:f,groups:{$skip:h}}=E;if(!h&&(!r||r===ii.DEFAULT==!l)){n instanceof Function?c+=n(E,{context:l?ii.CHAR_CLASS:ii.DEFAULT,negated:o[o.length-1]}):c+=n;continue}f[0]==="["?(l++,o.push(f[1]==="^")):f==="]"&&l&&(l--,o.pop()),c+=f}return c}function tH(e,t,n,r){rL(e,t,n,r)}function _te(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let o=0,l;for(;l=s.exec(e);){const{0:c,groups:{$skip:E}}=l;if(!E&&(!r||r===ii.DEFAULT==!o))return l;c==="["?o++:c==="]"&&o&&o--,s.lastIndex==l.index&&s.lastIndex++}return null}function Fp(e,t,n){return!!_te(e,t,0,n)}function Lte(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,o=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")s++;else if(s)c==="]"&&s--;else if(c==="(")o++;else if(c===")"&&(o--,!o)){r=l.index;break}}return e.slice(t,r)}const nM=new RegExp(String.raw`(?<noncapturingStart>${Ite})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function yte(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const s="(?>",o="(?:(?=(",l=[0],c=[];let E=0,f=0,h=NaN,d;do{d=!1;let p=0,S=0,R=!1,m;for(nM.lastIndex=Number.isNaN(h)?0:h+o.length;m=nM.exec(e);){const{0:g,index:I,groups:{capturingStart:C,noncapturingStart:L}}=m;if(g==="[")p++;else if(p)g==="]"&&p--;else if(g===s&&!R)h=I,R=!0;else if(R&&L)S++;else if(C)R?S++:(E++,l.push(E+f));else if(g===")"&&R){if(!S){f++;const N=E+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+s.length,I)}))<$$${N}>)${e.slice(I+1)}`,d=!0,c.push(N),Nte(n,N),r.size){const y=new Map;r.forEach((_,M)=>{y.set(M>=N?M+1:M,_.map(w=>w>=N?w+1:w))}),r=y}break}S--}}}while(d);return n.push(...c),e=rL(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:p,groups:{backrefNum:S,wrappedBackrefNum:R}})=>{if(S){const m=+S;if(m>l.length-1)throw new Error(`Backref "${p}" greater than number of captures`);return`\\${l[m]}`}return`\\${R}`},ii.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const nH=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,DO=new RegExp(String.raw`
145
+ \\(?: \d+
146
+ | c[A-Za-z]
147
+ | [gk]<[^>]+>
148
+ | [pPu]\{[^\}]+\}
149
+ | u[A-Fa-f\d]{4}
150
+ | x[A-Fa-f\d]{2}
151
+ )
152
+ | \((?: \? (?: [:=!>]
153
+ | <(?:[=!]|[^>]+>)
154
+ | [A-Za-z\-]+:
155
+ | \(DEFINE\)
156
+ ))?
157
+ | (?<qBase>${nH})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
158
+ | \\?.
159
+ `.replace(/\s+/g,""),"gsu");function bte(e){if(!new RegExp(`${nH}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,s="",o=0,l;for(DO.lastIndex=0;l=DO.exec(e);){const{0:c,index:E,groups:{qBase:f,qMod:h,invalidQ:d}}=l;if(c==="[")o||(r=E),o++;else if(c==="]")o?o--:r=null;else if(!o)if(h==="+"&&s&&!s.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${c}"`);let p=-1;if(/^\{\d+\}$/.test(f))e=Cte(e,E+f.length,h,"");else{if(s===")"||s==="]"){const S=s===")"?n:r;if(S===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,S)}(?>${e.slice(S,E)}${f})${e.slice(E+c.length)}`}else e=`${e.slice(0,E-s.length)}(?>${s}${f})${e.slice(E+c.length)}`;p+=4}DO.lastIndex+=p}else c[0]==="("?t.push(E):c===")"&&(n=t.length?t.pop():null);s=c}return{pattern:e}}const ni=String.raw,Pte=ni`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,eC=ni`\(\?R=(?<rDepth>[^\)]+)\)|${Pte}`,tm=ni`\(\?<(?![=!])(?<captureName>[^>]+)>`,rH=ni`${tm}|(?<unnamed>\()(?!\?)`,Kl=new RegExp(ni`${tm}|${eC}|\(\?|\\?.`,"gsu"),vO="Cannot use multiple overlapping recursions";function Dte(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let s=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(eC,"su").test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&Fp(e,ni`\(\?\(DEFINE\)`,ii.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=Fp(e,ni`\\[1-9]`,ii.DEFAULT),c=new Map,E=[];let f=!1,h=0,d=0,p;for(Kl.lastIndex=0;p=Kl.exec(e);){const{0:S,groups:{captureName:R,rDepth:m,gRNameOrNum:g,gRDepth:I}}=p;if(S==="[")h++;else if(h)S==="]"&&h--;else if(m){if(rM(m),f)throw new Error(vO);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=e.slice(0,p.index),L=e.slice(Kl.lastIndex);if(Fp(L,eC,ii.DEFAULT))throw new Error(vO);const N=+m-1;e=sM(C,L,N,!1,n,o,d),s=oM(s,C,N,o.length,0,d);break}else if(g){rM(I);let C=!1;for(const W of E)if(W.name===g||W.num===+g){if(C=!0,W.hasRecursedWithin)throw new Error(vO);break}if(!C)throw new Error(ni`Recursive \g cannot be used outside the referenced group "${r==="external"?g:ni`\g<${g}&R=${I}>`}"`);const L=c.get(g),N=Lte(e,L);if(l&&Fp(N,ni`${tm}|\((?!\?)`,ii.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const y=e.slice(L,p.index),_=N.slice(y.length+S.length),M=o.length,w=+I-1,F=sM(y,_,w,!0,n,o,d);s=oM(s,y,w,o.length-M,M,d);const Y=e.slice(0,L),$=e.slice(L+N.length);e=`${Y}${F}${$}`,Kl.lastIndex+=F.length-S.length-y.length-_.length,E.forEach(W=>W.hasRecursedWithin=!0),f=!0}else if(R)d++,c.set(String(d),Kl.lastIndex),c.set(R,Kl.lastIndex),E.push({num:d,name:R});else if(S[0]==="("){const C=S==="(";C&&(d++,c.set(String(d),Kl.lastIndex)),E.push(C?{num:d}:{})}else S===")"&&E.pop()}return n.push(...o),{pattern:e,captureTransfers:s,hiddenCaptures:n}}function rM(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function sM(e,t,n,r,s,o,l){const c=new Set;r&&tH(e+t,tm,({groups:{captureName:f}})=>{c.add(f)},ii.DEFAULT);const E=[n,r?c:null,s,o,l];return`${e}${iM(`(?:${e}`,"forward",...E)}(?:)${iM(`${t})`,"backward",...E)}${t}`}function iM(e,t,n,r,s,o,l){const E=h=>t==="forward"?h+2:n-h+2-1;let f="";for(let h=0;h<n;h++){const d=E(h);f+=rL(e,ni`${rH}|\\k<(?<backref>[^>]+)>`,({0:p,groups:{captureName:S,unnamed:R,backref:m}})=>{if(m&&r&&!r.has(m))return p;const g=`_$${d}`;if(R||S){const I=l+o.length+1;return o.push(I),vte(s,I),R?p:`(?<${S}${g}>`}return ni`\k<${m}${g}>`},ii.DEFAULT)}return f}function vte(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function oM(e,t,n,r,s,o){if(e.size&&r){let l=0;tH(t,rH,()=>l++,ii.DEFAULT);const c=o-l+s,E=new Map;return e.forEach((f,h)=>{const d=(r-l*n)/n,p=l*n,S=h>c+l?h+r:h,R=[];for(const m of f)if(m<=c)R.push(m);else if(m>c+l+d)R.push(m+r);else if(m<=c+l)for(let g=0;g<=n;g++)R.push(m+l*g);else for(let g=0;g<=n;g++)R.push(m+p+d*g);E.set(S,R)}),E}return e}var ar=String.fromCodePoint,Ct=String.raw,Ci={},nm=globalThis.RegExp;Ci.flagGroups=(()=>{try{new nm("(?i:)")}catch{return!1}return!0})();Ci.unicodeSets=(()=>{try{new nm("[[]]","v")}catch{return!1}return!0})();Ci.bugFlagVLiteralHyphenIsRange=Ci.unicodeSets?(()=>{try{new nm(Ct`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Ci.bugNestedClassIgnoresNegation=Ci.unicodeSets&&new nm("[[^a]]","v").test("a");function uS(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function jd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function tC(e,t){return aM[e]>=aM[t]}function Mte(e,t){if(e==null)throw new Error(t??"Value expected");return e}var aM={ES2025:2025,ES2024:2024,ES2018:2018},xte={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function sH(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!xte[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Ci.flagGroups?"ES2025":Ci.unicodeSets?"ES2024":"ES2018"),t}var Ute="[ -\r ]",wte=new Set([ar(304),ar(305)]),mo=Ct`[\p{L}\p{M}\p{N}\p{Pc}]`;function iH(e){if(wte.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),s=Fte.get(n),o=Gte.get(n),l=Bte.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),s&&t.add(s),t.add(n),o&&t.add(o),[...t]}var sL=new Map(`C Other
160
+ Cc Control cntrl
161
+ Cf Format
162
+ Cn Unassigned
163
+ Co Private_Use
164
+ Cs Surrogate
165
+ L Letter
166
+ LC Cased_Letter
167
+ Ll Lowercase_Letter
168
+ Lm Modifier_Letter
169
+ Lo Other_Letter
170
+ Lt Titlecase_Letter
171
+ Lu Uppercase_Letter
172
+ M Mark Combining_Mark
173
+ Mc Spacing_Mark
174
+ Me Enclosing_Mark
175
+ Mn Nonspacing_Mark
176
+ N Number
177
+ Nd Decimal_Number digit
178
+ Nl Letter_Number
179
+ No Other_Number
180
+ P Punctuation punct
181
+ Pc Connector_Punctuation
182
+ Pd Dash_Punctuation
183
+ Pe Close_Punctuation
184
+ Pf Final_Punctuation
185
+ Pi Initial_Punctuation
186
+ Po Other_Punctuation
187
+ Ps Open_Punctuation
188
+ S Symbol
189
+ Sc Currency_Symbol
190
+ Sk Modifier_Symbol
191
+ Sm Math_Symbol
192
+ So Other_Symbol
193
+ Z Separator
194
+ Zl Line_Separator
195
+ Zp Paragraph_Separator
196
+ Zs Space_Separator
197
+ ASCII
198
+ ASCII_Hex_Digit AHex
199
+ Alphabetic Alpha
200
+ Any
201
+ Assigned
202
+ Bidi_Control Bidi_C
203
+ Bidi_Mirrored Bidi_M
204
+ Case_Ignorable CI
205
+ Cased
206
+ Changes_When_Casefolded CWCF
207
+ Changes_When_Casemapped CWCM
208
+ Changes_When_Lowercased CWL
209
+ Changes_When_NFKC_Casefolded CWKCF
210
+ Changes_When_Titlecased CWT
211
+ Changes_When_Uppercased CWU
212
+ Dash
213
+ Default_Ignorable_Code_Point DI
214
+ Deprecated Dep
215
+ Diacritic Dia
216
+ Emoji
217
+ Emoji_Component EComp
218
+ Emoji_Modifier EMod
219
+ Emoji_Modifier_Base EBase
220
+ Emoji_Presentation EPres
221
+ Extended_Pictographic ExtPict
222
+ Extender Ext
223
+ Grapheme_Base Gr_Base
224
+ Grapheme_Extend Gr_Ext
225
+ Hex_Digit Hex
226
+ IDS_Binary_Operator IDSB
227
+ IDS_Trinary_Operator IDST
228
+ ID_Continue IDC
229
+ ID_Start IDS
230
+ Ideographic Ideo
231
+ Join_Control Join_C
232
+ Logical_Order_Exception LOE
233
+ Lowercase Lower
234
+ Math
235
+ Noncharacter_Code_Point NChar
236
+ Pattern_Syntax Pat_Syn
237
+ Pattern_White_Space Pat_WS
238
+ Quotation_Mark QMark
239
+ Radical
240
+ Regional_Indicator RI
241
+ Sentence_Terminal STerm
242
+ Soft_Dotted SD
243
+ Terminal_Punctuation Term
244
+ Unified_Ideograph UIdeo
245
+ Uppercase Upper
246
+ Variation_Selector VS
247
+ White_Space space
248
+ XID_Continue XIDC
249
+ XID_Start XIDS`.split(/\s/).map(e=>[em(e),e])),Gte=new Map([["s",ar(383)],[ar(383),"s"]]),Bte=new Map([[ar(223),ar(7838)],[ar(107),ar(8490)],[ar(229),ar(8491)],[ar(969),ar(8486)]]),Fte=new Map([Pa(453),Pa(456),Pa(459),Pa(498),...MO(8072,8079),...MO(8088,8095),...MO(8104,8111),Pa(8124),Pa(8140),Pa(8188)]),Hte=new Map([["alnum",Ct`[\p{Alpha}\p{Nd}]`],["alpha",Ct`\p{Alpha}`],["ascii",Ct`\p{ASCII}`],["blank",Ct`[\p{Zs}\t]`],["cntrl",Ct`\p{Cc}`],["digit",Ct`\p{Nd}`],["graph",Ct`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ct`\p{Lower}`],["print",Ct`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ct`[\p{P}\p{S}]`],["space",Ct`\p{space}`],["upper",Ct`\p{Upper}`],["word",Ct`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ct`\p{AHex}`]]);function Vte(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Pa(e){const t=ar(e);return[t.toLowerCase(),t]}function MO(e,t){return Vte(e,t).map(n=>Pa(n))}var oH=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function kte(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};aH(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:tC(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Ad(e,Yte,r);const s={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Ad(e,Wte,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Ad(e,jte,l),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var Yte={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:s}=e;if(s==="repeater"){const o=Oi();o.body[0].body.push(ec({negate:!0,body:r}),ku("Any"));const l=Oi();l.body[0].body.push(QF("greedy",0,1/0,o)),n(Wn(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const s=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];jd(r,l,[]).push(...s)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=cH(t.get(e));if(r){const s=Oi({flags:r});s.body[0].body=e.body,e.body=[Wn(s,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:s,remove:o,replaceWith:l},c){const{kind:E,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:d,supportedGNodes:p,wordIsAscii:S}=c;if(E==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(E==="line_end")l(Wn(ec({body:[vc({body:[JN("string_end")]}),vc({body:[ZS(10)]})]}),t));else if(E==="line_start")l(Wn(Ao(Ct`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(E==="search_start")if(p.has(e))s.flags.sticky=!0,o();else{const R=r[n-1];if(R&&Jte(R))l(Wn(ec({negate:!0}),t));else{if(d)throw new Error(Ct`Uses "\G" in a way that requires a subclass`);l(Da(JN("string_start"),t)),c.strategy="clip_search"}}else if(!(E==="string_end"||E==="string_start"))if(E==="string_end_newline")l(Wn(Ao(Ct`(?=\n?\z)`),t));else if(E==="word_boundary"){if(!S&&!h){const R=`(?:(?<=${mo})(?!${mo})|(?<!${mo})(?=${mo}))`,m=`(?:(?<=${mo})(?=${mo})|(?<!${mo})(?!${mo}))`;l(Wn(Ao(f?m:R),t))}}else throw new Error(`Unexpected assertion kind "${E}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!UO(n)&&(n=xO(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!UO(r)&&(r=xO(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=cR({body:[e]});n(Wn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:c}){const{kind:E,negate:f,value:h}=e;if(o&&(E==="digit"||h==="digit")){n(Da(ZN("digit",{negate:f}),t));return}if(l&&(E==="space"||h==="space")){n(Wn(wO(Ao(Ute),f),t));return}if(c&&(E==="word"||h==="word")){n(Da(ZN("word",{negate:f}),t));return}if(E==="any")n(Da(ku("Any"),t));else if(E==="digit")n(Da(ku("Nd",{negate:f}),t));else if(E!=="dot")if(E==="text_segment"){if(r==="strict")throw new Error(Ct`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",p=Ct`\p{RI}{2}|${d}(?:\u200D${d})*`;n(Wn(Ao(Ct`(?>\r\n|${s?Ct`\p{RGI_Emoji}`:p}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(E==="hex")n(Da(ku("AHex",{negate:f}),t));else if(E==="newline")n(Wn(Ao(f?`[^
250
+ ]`:`(?>\r
251
+ ?|[
252
+ \v\f…\u2028\u2029])`),t));else if(E==="posix")if(!s&&(h==="graph"||h==="print")){if(r==="strict")throw new Error(`POSIX class "${h}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[h];f&&(d=`\0-${ar(d.codePointAt(0)-1)}${ar(d.codePointAt(2)+1)}-􏿿`),n(Wn(Ao(`[${d}]`),t))}else n(Wn(wO(Ao(Hte.get(h)),f),t));else if(E==="property")sL.has(em(h))||(e.key="sc");else if(E==="space")n(Da(ku("space",{negate:f}),t));else if(E==="word")n(Wn(wO(Ao(mo),f),t));else throw new Error(`Unexpected character set kind "${E}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:c,flags:E}=e;if(c==="flags")if(!E.enable&&!E.disable)r();else{const f=Oi({flags:E});f.body[0].body=l(),s(Wn(f,t),{traverse:!0})}else if(c==="keep"){const f=n.body[0],d=n.body.length===1&&zF(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(Ct`Uses "\K" in a way that's unsupported`);const p=ec({behind:!0});p.body[0].body=o(),s(Wn(p,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(Wn(ec({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Oi();t.body[0].body.push(e.body),e.body=Wn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,s=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=EH(o.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):s=!0}r&&!s&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Ct`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!UO(n)&&(n=xO(n,t),e.ref=n)}},Wte={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:s}=e;r||n.set(e,[...t.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:E}){const f=s.get(e);if(f&&c.has(e.number)){const d=Da(lM(e.number),t);E.set(d,c.get(e.number)),n(d);return}c.set(e.number,e),l.set(e.number,[]),e.name&&jd(l,e.name,[]);const h=l.get(e.name??e.number);for(let d=0;d<h.length;d++){const p=h[d];if(f===p.node||f&&f===p.origin||e===p.origin){h.splice(d,1);break}}if(l.get(e.number).push({node:e,origin:f}),e.name&&l.get(e.name).push({node:e,origin:f}),e.name){const d=jd(o,e.name,new Map);let p=!1;if(f)p=!0;else for(const S of d.values())if(!S.hasDuplicateNameToRemove){p=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=uS(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:s,ref:o}=e;if(s){let h=t;for(;(h=h.parent)&&!(h.type==="CapturingGroup"&&(h.name===o||h.number===o)););r.reffedNodesByReferencer.set(e,h);return}const l=r.subroutineRefMap.get(o),c=o===0,E=c?lM(0):lH(l,r.groupOriginByCopy,null);let f=E;if(!c){const h=cH(Kte(l,p=>p.type==="Group"&&!!p.flags)),d=h?uS(r.globalFlags,h):r.globalFlags;Xte(d,r.currentFlags)||(f=Oi({flags:zte(d)}),f.body[0].body.push(E))}n(Wn(f,t),{traverse:!c})}},jte={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(l=>$te(l,e));if(!o.length)n(Wn(ec({negate:!0}),t));else if(o.length>1){const l=Oi({atomic:!0,body:o.reverse().map(c=>vc({body:[QN(c.number)]}))});n(Wn(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const s=JF();e.body.at(-1).body.push(s)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function aH(e){Ad(e,{"*"({node:t,parent:n}){t.parent=n}})}function Xte(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function $te(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=uH(n.parent);for(const s of r){if(s===n)break;if(s===e||fH(s,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function lH(e,t,n,r){const s=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?s.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?s[o]=lH(l,t,s,n):(o==="type"&&l==="CapturingGroup"&&t.set(s,t.get(e)??e),s[o]=l);return s}function lM(e){const t=ZF(e);return t.isRecursive=!0,t}function Kte(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function xO(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function cH(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(s=>{var o,l;(o=r.enable)!=null&&o[s]&&(delete n.disable[s],n.enable[s]=!0),(l=r.disable)!=null&&l[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function zte({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function uH(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function EH(e){const t=e.find(n=>n.kind==="search_start"||Qte(n,{negate:!1})||!qte(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const s=EH(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function fH(e,t){const n=uH(e)??[];for(const r of n)if(r===t||fH(r,t))return!0;return!1}function qte({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Jte(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Qte(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&zF(e.body[0],{type:"Assertion",kind:"search_start"})}function UO(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ao(e,t){const r=qF(e,{...t,unicodePropertyMap:sL}).body;return r.length>1||r[0].body.length>1?Oi({body:r}):r[0].body[0]}function wO(e,t){return e.negate=t,e}function Da(e,t){return e.parent=t,e}function Wn(e,t){return aH(e),e.parent=t,e}function Zte(e,t){const n=sH(t),r=tC(n.target,"ES2024"),s=tC(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!s){const S=[e.flags.ignoreCase];Ad(e,ene,{getCurrentModI:()=>S.at(-1),popModI(){S.pop()},pushModI(R){S.push(R)},setHasCasedChar(){S.at(-1)?l=!0:c=!0}})}const E={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let f=e;const h={accuracy:n.accuracy,appliedGlobalFlags:E,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!s&&l&&c),useFlagMods:s,useFlagV:r,verbose:n.verbose};function d(S){return h.lastNode=f,f=S,Mte(tne[S.type],`Unexpected node type "${S.type}"`)(S,h,d)}const p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],h.captureMap.forEach((S,R)=>{S.hidden&&p._hiddenCaptures.push(R),S.transferTo&&jd(p._captureTransfers,S.transferTo,[]).push(R)}),p}var ene={"*":{enter({node:e},t){if(uM(e)){const n=t.getCurrentModI();t.pushModI(e.flags?uS({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){uM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){iL(ar(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),dH(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&oH.has(e.value)&&t.setHasCasedChar()}},tne={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ct`\B`:Ct`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:s,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,o>c.number&&(l.transferTo=c.number)),t.captureMap.set(o,l),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=ar(e),r=Mu(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&iL(n)){const s=iH(n);return t.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:s,parent:o}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Ci.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(EM)&&(l=[ZS(45),...l.filter(f=>!EM(f))]);const c=()=>`[${s?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Ci.bugNestedClassIgnoresNegation)&&!s){const h=l.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(h.length){const d=Oi(),p=d.body[0];return d.parent=o,p.parent=d,l=l.filter(S=>!h.includes(S)),e.body=l,l.length?(e.parent=p,p.body.push(e)):d.body.pop(),h.forEach(S=>{const R=vc({body:[S]});S.parent=R,R.parent=d,d.body.push(R)}),n(d)}}t.inCharClass=!0;const f=c();return t.inCharClass=!1,f}const E=l[0];if(r==="union"&&!s&&E&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(Ci.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&E.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Mu(n,s),l=Mu(r,s),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const E=dH(e);one(E).forEach(h=>{c.add(Array.isArray(h)?`${Mu(h[0],s)}-${Mu(h[1],s)}`:Mu(h,s))})}return`${o}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},s){if(e==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":Ct`[^\n]`;if(e==="digit")return t?Ct`\D`:Ct`\d`;if(e==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&oH.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ct`\P`:Ct`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Ct`\W`:Ct`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},s,o){const l=s.currentFlags;n&&(s.currentFlags=uS(l,n));const c=t.map(o).join("|"),E=!s.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!s.useFlagMods||!n)?c:`(?${ane(e,n,s.useFlagMods)}${c})`;return s.currentFlags=l,E},LookaroundAssertion({body:e,kind:t,negate:n},r,s){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(s).join("|")})`},Quantifier(e,t,n){return n(e.body)+lne(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Ct`\g<${t}&R=${r}>`}},nne=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),rne=new Set(["-","\\","]","^","["]),sne=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cM=new Map([[9,Ct`\t`],[10,Ct`\n`],[11,Ct`\v`],[12,Ct`\f`],[13,Ct`\r`],[8232,Ct`\u2028`],[8233,Ct`\u2029`],[65279,Ct`\uFEFF`]]),ine=new RegExp("^\\p{Cased}$","u");function iL(e){return ine.test(e)}function dH(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,s=e.max.value,o=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return o;for(let l=r;l<=s;l++){const c=ar(l);if(!iL(c))continue;const E=iH(c).filter(f=>{const h=f.codePointAt(0);return h<r||h>s});if(E.length&&(o.push(...E),n))break}return o}function Mu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cM.has(e))return cM.get(e);if(e<32||e>126&&e<160||e>262143||t&&cne(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=n?r?sne:rne:nne,o=ar(e);return(s.has(o)?"\\":"")+o}function one(e){const t=e.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),n=[];let r=null;for(let s=0;s<t.length;s++)t[s+1]===t[s]+1?r??(r=t[s]):r===null?n.push(t[s]):(n.push([r,t[s]]),r=null);return n}function ane(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:s,disable:o}=t;r=(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function lne({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function uM({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function cne(e){return e>47&&e<58}function EM({type:e,value:t}){return e==="Character"&&t===45}var ja,yo,Oc,Xa,Ic,tT,nC,il,une=(il=class extends RegExp{constructor(n,r,s){var t=(...Due)=>(super(...Due),$e(this,tT),$e(this,ja,new Map),$e(this,yo,null),$e(this,Oc),$e(this,Xa,null),$e(this,Ic,null),Te(this,"rawOptions",{}),this);const o=!!(s!=null&&s.lazyCompile);if(n instanceof RegExp){if(s)throw new Error("Cannot provide options when copying a regexp");const l=n;t(l,r),Fe(this,Oc,l.source),l instanceof il&&(Fe(this,ja,V(l,ja)),Fe(this,Xa,V(l,Xa)),Fe(this,Ic,V(l,Ic)),this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...s};t(o?"":n,r),Fe(this,Oc,n),Fe(this,ja,fne(l.hiddenCaptures,l.transfers)),Fe(this,Ic,l.strategy),this.rawOptions=s??{}}o||Fe(this,yo,this)}get source(){return V(this,Oc)||"(?:)"}exec(n){if(!V(this,yo)){const{lazyCompile:o,...l}=this.rawOptions;Fe(this,yo,new il(V(this,Oc),this.flags,l))}const r=this.global||this.sticky,s=this.lastIndex;if(V(this,Ic)==="clip_search"&&r&&s){this.lastIndex=0;const o=we(this,tT,nC).call(this,n.slice(s));return o&&(Ene(o,s,n,this.hasIndices),this.lastIndex+=s),o}return we(this,tT,nC).call(this,n)}},ja=new WeakMap,yo=new WeakMap,Oc=new WeakMap,Xa=new WeakMap,Ic=new WeakMap,tT=new WeakSet,nC=function(n){V(this,yo).lastIndex=this.lastIndex;const r=ub(il.prototype,this,"exec").call(V(this,yo),n);if(this.lastIndex=V(this,yo).lastIndex,!r||!V(this,ja).size)return r;const s=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const l=[0];for(let c=1;c<s.length;c++){const{hidden:E,transferTo:f}=V(this,ja).get(c)??{};if(E?l.push(null):(l.push(r.length),r.push(s[c]),this.hasIndices&&r.indices.push(o[c])),f&&s[c]!==void 0){const h=l[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=s[c],this.hasIndices&&(r.indices[h]=o[c]),r.groups){V(this,Xa)||Fe(this,Xa,dne(this.source));const d=V(this,Xa).get(f);d&&(r.groups[d]=s[c],this.hasIndices&&(r.indices.groups[d]=o[c]))}}}return r},il);function Ene(e,t,n,r){if(e.index+=t,e.input=n,r){const s=e.indices;for(let l=0;l<s.length;l++){const c=s[l];c&&(s[l]=[c[0]+t,c[1]+t])}const o=s.groups;o&&Object.keys(o).forEach(l=>{const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])})}}function fne(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,s]of t)for(const o of s)jd(n,o,{}).transferTo=r;return n}function dne(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,s=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:c,name:E}}=o;l==="["?r++:r?l==="]"&&r--:c&&(s++,E&&n.set(s,E))}return n}function Tne(e,t){const n=hne(e,t);return n.options?new une(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function hne(e,t){const n=sH(t),r=qF(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:sL}),s=kte(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Zte(s,n),l=Dte(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),c=bte(l.pattern),E=yte(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),f={pattern:E.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const h=E.hiddenCaptures.sort((R,m)=>R-m),d=Array.from(E.captureTransfers),p=s._strategy,S=f.pattern.length>=n.lazyCompileLength;(h.length||d.length||p||S)&&(f.options={...h.length&&{hiddenCaptures:h},...d.length&&{transfers:d},...p&&{strategy:p},...S&&{lazyCompile:S}})}return f}function TH(e,t){return Tne(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function pne(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>TH(n,{target:t.target})),{createScanner(n){return new vee(n,t)},createString(n){return{content:n}}}}var Rne=B_({bundledLanguages:()=>V_,bundledLanguagesAlias:()=>H_,bundledLanguagesBase:()=>F_,bundledLanguagesInfo:()=>jS,bundledThemes:()=>Y_,bundledThemesInfo:()=>k_,codeToHast:()=>BF,codeToHtml:()=>eL,codeToTokens:()=>FF,codeToTokensBase:()=>HF,codeToTokensWithThemes:()=>VF,createHighlighter:()=>Z_,createJavaScriptRegexEngine:()=>pne,createOnigurumaEngine:()=>qB,defaultJavaScriptRegexConstructor:()=>TH,getLastGrammarState:()=>YF,getSingletonHighlighter:()=>kF,loadWasm:()=>j_});$B(Rne,Dee);const Se=e=>e.flatMap(Sne),Sne=e=>uR(Ane(e)).map(mne),mne=e=>e.replace(/ +/g," ").trim(),Ane=e=>({type:"mandatory_block",items:oL(e,0)[0]}),oL=(e,t,n)=>{const r=[];for(;e[t];){const[s,o]=gne(e,t);if(r.push(s),t=o,e[t]==="|")t++;else if(e[t]==="}"||e[t]==="]"){if(n!==e[t])throw new Error(`Unbalanced parenthesis in: ${e}`);return t++,[r,t]}else if(t===e.length){if(n)throw new Error(`Unbalanced parenthesis in: ${e}`);return[r,t]}else throw new Error(`Unexpected "${e[t]}"`)}return[r,t]},gne=(e,t)=>{const n=[];for(;;){const[r,s]=One(e,t);if(r)n.push(r),t=s;else break}return n.length===1?[n[0],t]:[{type:"concatenation",items:n},t]},One=(e,t)=>{if(e[t]==="{")return Ine(e,t+1);if(e[t]==="[")return Nne(e,t+1);{let n="";for(;e[t]&&/[A-Za-z0-9_ ]/.test(e[t]);)n+=e[t],t++;return[n,t]}},Ine=(e,t)=>{const[n,r]=oL(e,t,"}");return[{type:"mandatory_block",items:n},r]},Nne=(e,t)=>{const[n,r]=oL(e,t,"]");return[{type:"optional_block",items:n},r]},uR=e=>{if(typeof e=="string")return[e];if(e.type==="concatenation")return e.items.map(uR).reduce(Cne,[""]);if(e.type==="mandatory_block")return e.items.flatMap(uR);if(e.type==="optional_block")return["",...e.items.flatMap(uR)];throw new Error(`Unknown node type: ${e}`)},Cne=(e,t)=>{const n=[];for(const r of e)for(const s of t)n.push(r+s);return n};var be;(function(e){e.QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",e.IDENTIFIER="IDENTIFIER",e.STRING="STRING",e.VARIABLE="VARIABLE",e.RESERVED_DATA_TYPE="RESERVED_DATA_TYPE",e.RESERVED_PARAMETERIZED_DATA_TYPE="RESERVED_PARAMETERIZED_DATA_TYPE",e.RESERVED_KEYWORD="RESERVED_KEYWORD",e.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",e.RESERVED_KEYWORD_PHRASE="RESERVED_KEYWORD_PHRASE",e.RESERVED_DATA_TYPE_PHRASE="RESERVED_DATA_TYPE_PHRASE",e.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",e.RESERVED_CLAUSE="RESERVED_CLAUSE",e.RESERVED_SELECT="RESERVED_SELECT",e.RESERVED_JOIN="RESERVED_JOIN",e.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",e.ARRAY_KEYWORD="ARRAY_KEYWORD",e.CASE="CASE",e.END="END",e.WHEN="WHEN",e.ELSE="ELSE",e.THEN="THEN",e.LIMIT="LIMIT",e.BETWEEN="BETWEEN",e.AND="AND",e.OR="OR",e.XOR="XOR",e.OPERATOR="OPERATOR",e.COMMA="COMMA",e.ASTERISK="ASTERISK",e.PROPERTY_ACCESS_OPERATOR="PROPERTY_ACCESS_OPERATOR",e.OPEN_PAREN="OPEN_PAREN",e.CLOSE_PAREN="CLOSE_PAREN",e.LINE_COMMENT="LINE_COMMENT",e.BLOCK_COMMENT="BLOCK_COMMENT",e.DISABLE_COMMENT="DISABLE_COMMENT",e.NUMBER="NUMBER",e.NAMED_PARAMETER="NAMED_PARAMETER",e.QUOTED_PARAMETER="QUOTED_PARAMETER",e.NUMBERED_PARAMETER="NUMBERED_PARAMETER",e.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",e.CUSTOM_PARAMETER="CUSTOM_PARAMETER",e.DELIMITER="DELIMITER",e.EOF="EOF"})(be=be||(be={}));const hH=e=>({type:be.EOF,raw:"«EOF»",text:"«EOF»",start:e}),fl=hH(1/0),xu=e=>t=>t.type===e.type&&t.text===e.text,dl={ARRAY:xu({text:"ARRAY",type:be.RESERVED_DATA_TYPE}),BY:xu({text:"BY",type:be.RESERVED_KEYWORD}),SET:xu({text:"SET",type:be.RESERVED_CLAUSE}),STRUCT:xu({text:"STRUCT",type:be.RESERVED_DATA_TYPE}),WINDOW:xu({text:"WINDOW",type:be.RESERVED_CLAUSE}),VALUES:xu({text:"VALUES",type:be.RESERVED_CLAUSE})},pH=e=>e===be.RESERVED_DATA_TYPE||e===be.RESERVED_KEYWORD||e===be.RESERVED_FUNCTION_NAME||e===be.RESERVED_KEYWORD_PHRASE||e===be.RESERVED_DATA_TYPE_PHRASE||e===be.RESERVED_CLAUSE||e===be.RESERVED_SELECT||e===be.RESERVED_SET_OPERATION||e===be.RESERVED_JOIN||e===be.ARRAY_KEYWORD||e===be.CASE||e===be.END||e===be.WHEN||e===be.ELSE||e===be.THEN||e===be.LIMIT||e===be.BETWEEN||e===be.AND||e===be.OR||e===be.XOR,_ne=e=>e===be.AND||e===be.OR||e===be.XOR,Lne=["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH","ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP","ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM","APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM","ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL","BIT_COUNT","PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST","CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE","CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME","ERROR","EXTERNAL_QUERY","S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y","FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512","HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT","MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING","ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET","FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC","NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER","SESSION_USER","CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE","ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER","CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME","CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS","GENERATE_UUID","COALESCE","IF","IFNULL","NULLIF","AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP","BIT_COUNT","BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING","COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR","FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP","JSON_EXTRACT","JSON_EXTRACT_SCALAR","ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH","REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE","CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER","TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY","HOST","DOMAIN","TLD","AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64","BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW","OPTIONS","PIVOT","UNPIVOT"],yne=["ALL","AND","ANY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTO","IS","JOIN","LATERAL","LEFT","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN","SAFE","LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"],bne=["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],Pne=Se(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),Dne=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),fM=Se(["CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]"]),GO=Se(["CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),vne=Se(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),Mne=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),xne=Se(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),Une=Se([]),wne={name:"bigquery",tokenizerOptions:{reservedSelect:Pne,reservedClauses:[...Dne,...GO,...fM],reservedSetOperations:vne,reservedJoins:Mne,reservedKeywordPhrases:xne,reservedDataTypePhrases:Une,reservedKeywords:yne,reservedDataTypes:bne,reservedFunctionNames:Lne,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"'''..'''",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:Gne},formatOptions:{onelineClauses:[...fM,...GO],tabularOnelineClauses:GO}};function Gne(e){return Bne(Fne(e))}function Bne(e){let t=fl;return e.map(n=>n.text==="OFFSET"&&t.text==="["?(t=n,Object.assign(Object.assign({},n),{type:be.RESERVED_FUNCTION_NAME})):(t=n,n))}function Fne(e){var t;const n=[];for(let r=0;r<e.length;r++){const s=e[r];if((dl.ARRAY(s)||dl.STRUCT(s))&&((t=e[r+1])===null||t===void 0?void 0:t.text)==="<"){const o=Hne(e,r+1),l=e.slice(r,o+1);n.push({type:be.IDENTIFIER,raw:l.map(dM("raw")).join(""),text:l.map(dM("text")).join(""),start:s.start}),r=o}else n.push(s)}return n}const dM=e=>t=>t.type===be.IDENTIFIER||t.type===be.COMMA?t[e]+" ":t[e];function Hne(e,t){let n=0;for(let r=t;r<e.length;r++){const s=e[r];if(s.text==="<"?n++:s.text===">"?n--:s.text===">>"&&(n-=2),n===0)return r}return e.length-1}const Vne=["BIT_AND","BIT_OR","BIT_XOR","BLAKE3","CAST","CHARACTER_LENGTH","CHAR_LENGTH","COVAR_POP","COVAR_SAMP","CRC32","CRC32IEEE","CRC64","DATE","DATE_DIFF","DATE_FORMAT","DATE_TRUNC","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","FORMAT_BYTES","FQDN","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","HOUR","INET6_ATON","INET6_NTOA","INET_ATON","INET_NTOA","IPv4CIDRToRange","IPv4NumToString","IPv4NumToStringClassC","IPv4StringToNum","IPv4StringToNumOrDefault","IPv4StringToNumOrNull","IPv4ToIPv6","IPv6CIDRToRange","IPv6NumToString","IPv6StringToNum","IPv6StringToNumOrDefault","IPv6StringToNumOrNull","JSONAllPaths","JSONAllPathsWithTypes","JSONArrayLength","JSONDynamicPaths","JSONDynamicPathsWithTypes","JSONExtract","JSONExtractArrayRaw","JSONExtractArrayRawCaseInsensitive","JSONExtractBool","JSONExtractBoolCaseInsensitive","JSONExtractCaseInsensitive","JSONExtractFloat","JSONExtractFloatCaseInsensitive","JSONExtractInt","JSONExtractIntCaseInsensitive","JSONExtractKeys","JSONExtractKeysAndValues","JSONExtractKeysAndValuesCaseInsensitive","JSONExtractKeysAndValuesRaw","JSONExtractKeysAndValuesRawCaseInsensitive","JSONExtractKeysCaseInsensitive","JSONExtractRaw","JSONExtractRawCaseInsensitive","JSONExtractString","JSONExtractStringCaseInsensitive","JSONExtractUInt","JSONExtractUIntCaseInsensitive","JSONHas","JSONKey","JSONLength","JSONMergePatch","JSONSharedDataPaths","JSONSharedDataPathsWithTypes","JSONType","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_QUERY","JSON_VALUE","L1Distance","L1Norm","L1Normalize","L2Distance","L2Norm","L2Normalize","L2SquaredDistance","L2SquaredNorm","LAST_DAY","LinfDistance","LinfNorm","LinfNormalize","LpDistance","LpNorm","LpNormalize","MACNumToString","MACStringToNum","MACStringToOUI","MAP_FROM_ARRAYS","MD4","MD5","MILLISECOND","MINUTE","MONTH","OCTET_LENGTH","QUARTER","REGEXP_EXTRACT","REGEXP_MATCHES","REGEXP_REPLACE","RIPEMD160","SCHEMA","SECOND","SHA1","SHA224","SHA256","SHA384","SHA512","SHA512_256","STD","STDDEV_POP","STDDEV_SAMP","ST_LineFromWKB","ST_MLineFromWKB","ST_MPolyFromWKB","ST_PointFromWKB","ST_PolyFromWKB","SUBSTRING_INDEX","SVG","TIMESTAMP_DIFF","TO_BASE64","TO_DAYS","TO_UNIXTIME","ULIDStringToDateTime","URLHash","URLHierarchy","URLPathHierarchy","UTCTimestamp","UTC_timestamp","UUIDNumToString","UUIDStringToNum","UUIDToNum","UUIDv7ToDateTime","VAR_POP","VAR_SAMP","YEAR","YYYYMMDDToDate","YYYYMMDDToDate32","YYYYMMDDhhmmssToDateTime","YYYYMMDDhhmmssToDateTime64","_CAST","__actionName","__bitBoolMaskAnd","__bitBoolMaskOr","__bitSwapLastTwo","__bitWrapperFunc","__getScalar","__patchPartitionID","__scalarSubqueryResult","abs","accurateCast","accurateCastOrDefault","accurateCastOrNull","acos","acosh","addDate","addDays","addHours","addInterval","addMicroseconds","addMilliseconds","addMinutes","addMonths","addNanoseconds","addQuarters","addSeconds","addTupleOfIntervals","addWeeks","addYears","addressToLine","addressToLineWithInlines","addressToSymbol","aes_decrypt_mysql","aes_encrypt_mysql","age","aggThrow","alphaTokens","analysisOfVariance","anova","any","anyHeavy","anyLast","anyLastRespectNulls","anyLast_respect_nulls","anyRespectNulls","anyValueRespectNulls","any_respect_nulls","any_value","any_value_respect_nulls","appendTrailingCharIfAbsent","approx_top_count","approx_top_k","approx_top_sum","argMax","argMin","array","arrayAUC","arrayAUCPR","arrayAll","arrayAvg","arrayCompact","arrayConcat","arrayCount","arrayCumSum","arrayCumSumNonNegative","arrayDifference","arrayDistinct","arrayDotProduct","arrayElement","arrayElementOrNull","arrayEnumerate","arrayEnumerateDense","arrayEnumerateDenseRanked","arrayEnumerateUniq","arrayEnumerateUniqRanked","arrayExists","arrayFill","arrayFilter","arrayFirst","arrayFirstIndex","arrayFirstOrNull","arrayFlatten","arrayFold","arrayIntersect","arrayJaccardIndex","arrayJoin","arrayLast","arrayLastIndex","arrayLastOrNull","arrayLevenshteinDistance","arrayLevenshteinDistanceWeighted","arrayMap","arrayMax","arrayMin","arrayNormalizedGini","arrayPRAUC","arrayPartialReverseSort","arrayPartialShuffle","arrayPartialSort","arrayPopBack","arrayPopFront","arrayProduct","arrayPushBack","arrayPushFront","arrayROCAUC","arrayRandomSample","arrayReduce","arrayReduceInRanges","arrayResize","arrayReverse","arrayReverseFill","arrayReverseSort","arrayReverseSplit","arrayRotateLeft","arrayRotateRight","arrayShiftLeft","arrayShiftRight","arrayShingles","arrayShuffle","arraySimilarity","arraySlice","arraySort","arraySplit","arrayStringConcat","arraySum","arraySymmetricDifference","arrayUnion","arrayUniq","arrayWithConstant","arrayZip","arrayZipUnaligned","array_agg","array_concat_agg","ascii","asin","asinh","assumeNotNull","atan","atan2","atanh","authenticatedUser","avg","avgWeighted","bar","base32Decode","base32Encode","base58Decode","base58Encode","base64Decode","base64Encode","base64URLDecode","base64URLEncode","basename","bech32Decode","bech32Encode","bin","bitAnd","bitCount","bitHammingDistance","bitNot","bitOr","bitPositionsToArray","bitRotateLeft","bitRotateRight","bitShiftLeft","bitShiftRight","bitSlice","bitTest","bitTestAll","bitTestAny","bitXor","bitmapAnd","bitmapAndCardinality","bitmapAndnot","bitmapAndnotCardinality","bitmapBuild","bitmapCardinality","bitmapContains","bitmapHasAll","bitmapHasAny","bitmapMax","bitmapMin","bitmapOr","bitmapOrCardinality","bitmapSubsetInRange","bitmapSubsetLimit","bitmapToArray","bitmapTransform","bitmapXor","bitmapXorCardinality","bitmaskToArray","bitmaskToList","blockNumber","blockSerializedSize","blockSize","boundingRatio","buildId","byteHammingDistance","byteSize","byteSlice","byteSwap","caseWithExpr","caseWithExpression","caseWithoutExpr","caseWithoutExpression","catboostEvaluate","categoricalInformationValue","cbrt","ceil","ceiling","changeDay","changeHour","changeMinute","changeMonth","changeSecond","changeYear","char","cityHash64","clamp","coalesce","colorOKLCHToSRGB","colorSRGBToOKLCH","compareSubstrings","concat","concatAssumeInjective","concatWithSeparator","concatWithSeparatorAssumeInjective","concat_ws","connectionId","connection_id","contingency","convertCharset","corr","corrMatrix","corrStable","cos","cosh","cosineDistance","count","countDigits","countEqual","countMatches","countMatchesCaseInsensitive","countSubstrings","countSubstringsCaseInsensitive","countSubstringsCaseInsensitiveUTF8","covarPop","covarPopMatrix","covarPopStable","covarSamp","covarSampMatrix","covarSampStable","cramersV","cramersVBiasCorrected","curdate","currentDatabase","currentProfiles","currentQueryID","currentRoles","currentSchemas","currentUser","current_database","current_date","current_query_id","current_schemas","current_timestamp","current_user","cutFragment","cutIPv6","cutQueryString","cutQueryStringAndFragment","cutToFirstSignificantSubdomain","cutToFirstSignificantSubdomainCustom","cutToFirstSignificantSubdomainCustomRFC","cutToFirstSignificantSubdomainCustomWithWWW","cutToFirstSignificantSubdomainCustomWithWWWRFC","cutToFirstSignificantSubdomainRFC","cutToFirstSignificantSubdomainWithWWW","cutToFirstSignificantSubdomainWithWWWRFC","cutURLParameter","cutWWW","damerauLevenshteinDistance","dateDiff","dateName","dateTime64ToSnowflake","dateTime64ToSnowflakeID","dateTimeToSnowflake","dateTimeToSnowflakeID","dateTimeToUUIDv7","dateTrunc","date_bin","date_diff","decodeHTMLComponent","decodeURLComponent","decodeURLFormComponent","decodeXMLComponent","decrypt","defaultProfiles","defaultRoles","defaultValueOfArgumentType","defaultValueOfTypeName","degrees","deltaSum","deltaSumTimestamp","demangle","denseRank","dense_rank","detectCharset","detectLanguage","detectLanguageMixed","detectLanguageUnknown","detectProgrammingLanguage","detectTonality","dictGet","dictGetAll","dictGetChildren","dictGetDate","dictGetDateOrDefault","dictGetDateTime","dictGetDateTimeOrDefault","dictGetDescendants","dictGetFloat32","dictGetFloat32OrDefault","dictGetFloat64","dictGetFloat64OrDefault","dictGetHierarchy","dictGetIPv4","dictGetIPv4OrDefault","dictGetIPv6","dictGetIPv6OrDefault","dictGetInt16","dictGetInt16OrDefault","dictGetInt32","dictGetInt32OrDefault","dictGetInt64","dictGetInt64OrDefault","dictGetInt8","dictGetInt8OrDefault","dictGetOrDefault","dictGetOrNull","dictGetString","dictGetStringOrDefault","dictGetUInt16","dictGetUInt16OrDefault","dictGetUInt32","dictGetUInt32OrDefault","dictGetUInt64","dictGetUInt64OrDefault","dictGetUInt8","dictGetUInt8OrDefault","dictGetUUID","dictGetUUIDOrDefault","dictHas","dictIsIn","displayName","distanceL1","distanceL2","distanceL2Squared","distanceLinf","distanceLp","distinctDynamicTypes","distinctJSONPaths","distinctJSONPathsAndTypes","divide","divideDecimal","divideOrNull","domain","domainRFC","domainWithoutWWW","domainWithoutWWWRFC","dotProduct","dumpColumnStructure","dynamicElement","dynamicType","e","editDistance","editDistanceUTF8","empty","emptyArrayDate","emptyArrayDateTime","emptyArrayFloat32","emptyArrayFloat64","emptyArrayInt16","emptyArrayInt32","emptyArrayInt64","emptyArrayInt8","emptyArrayString","emptyArrayToSingle","emptyArrayUInt16","emptyArrayUInt32","emptyArrayUInt64","emptyArrayUInt8","enabledProfiles","enabledRoles","encodeURLComponent","encodeURLFormComponent","encodeXMLComponent","encrypt","endsWith","endsWithUTF8","entropy","equals","erf","erfc","errorCodeToName","estimateCompressionRatio","evalMLMethod","exp","exp10","exp2","exponentialMovingAverage","exponentialTimeDecayedAvg","exponentialTimeDecayedCount","exponentialTimeDecayedMax","exponentialTimeDecayedSum","extract","extractAll","extractAllGroups","extractAllGroupsHorizontal","extractAllGroupsVertical","extractGroups","extractKeyValuePairs","extractKeyValuePairsWithEscaping","extractTextFromHTML","extractURLParameter","extractURLParameterNames","extractURLParameters","factorial","farmFingerprint64","farmHash64","file","filesystemAvailable","filesystemCapacity","filesystemUnreserved","finalizeAggregation","financialInternalRateOfReturn","financialInternalRateOfReturnExtended","financialNetPresentValue","financialNetPresentValueExtended","firstLine","firstSignificantSubdomain","firstSignificantSubdomainCustom","firstSignificantSubdomainCustomRFC","firstSignificantSubdomainRFC","firstValueRespectNulls","first_value","first_value_respect_nulls","flameGraph","flatten","flattenTuple","floor","formatDateTime","formatDateTimeInJodaSyntax","formatQuery","formatQueryOrNull","formatQuerySingleLine","formatQuerySingleLineOrNull","formatReadableDecimalSize","formatReadableQuantity","formatReadableSize","formatReadableTimeDelta","formatRow","formatRowNoNewline","fragment","fromDaysSinceYearZero","fromDaysSinceYearZero32","fromModifiedJulianDay","fromModifiedJulianDayOrNull","fromUTCTimestamp","fromUnixTimestamp","fromUnixTimestamp64Micro","fromUnixTimestamp64Milli","fromUnixTimestamp64Nano","fromUnixTimestamp64Second","fromUnixTimestampInJodaSyntax","from_utc_timestamp","fullHostName","fuzzBits","gccMurmurHash","gcd","generateRandomStructure","generateSerialID","generateSnowflakeID","generateULID","generateUUIDv4","generateUUIDv7","geoDistance","geoToH3","geoToS2","geohashDecode","geohashEncode","geohashesInBox","getClientHTTPHeader","getMacro","getMaxTableNameLengthForDatabase","getMergeTreeSetting","getOSKernelVersion","getServerPort","getServerSetting","getSetting","getSettingOrDefault","getSizeOfEnumType","getSubcolumn","getTypeSerializationStreams","globalIn","globalInIgnoreSet","globalNotIn","globalNotInIgnoreSet","globalNotNullIn","globalNotNullInIgnoreSet","globalNullIn","globalNullInIgnoreSet","globalVariable","greatCircleAngle","greatCircleDistance","greater","greaterOrEquals","greatest","groupArray","groupArrayInsertAt","groupArrayIntersect","groupArrayLast","groupArrayMovingAvg","groupArrayMovingSum","groupArraySample","groupArraySorted","groupBitAnd","groupBitOr","groupBitXor","groupBitmap","groupBitmapAnd","groupBitmapOr","groupBitmapXor","groupConcat","groupNumericIndexedVector","groupUniqArray","group_concat","h3CellAreaM2","h3CellAreaRads2","h3Distance","h3EdgeAngle","h3EdgeLengthKm","h3EdgeLengthM","h3ExactEdgeLengthKm","h3ExactEdgeLengthM","h3ExactEdgeLengthRads","h3GetBaseCell","h3GetDestinationIndexFromUnidirectionalEdge","h3GetFaces","h3GetIndexesFromUnidirectionalEdge","h3GetOriginIndexFromUnidirectionalEdge","h3GetPentagonIndexes","h3GetRes0Indexes","h3GetResolution","h3GetUnidirectionalEdge","h3GetUnidirectionalEdgeBoundary","h3GetUnidirectionalEdgesFromHexagon","h3HexAreaKm2","h3HexAreaM2","h3HexRing","h3IndexesAreNeighbors","h3IsPentagon","h3IsResClassIII","h3IsValid","h3Line","h3NumHexagons","h3PointDistKm","h3PointDistM","h3PointDistRads","h3ToCenterChild","h3ToChildren","h3ToGeo","h3ToGeoBoundary","h3ToParent","h3ToString","h3UnidirectionalEdgeIsValid","h3kRing","halfMD5","has","hasAll","hasAny","hasColumnInTable","hasSubsequence","hasSubsequenceCaseInsensitive","hasSubsequenceCaseInsensitiveUTF8","hasSubsequenceUTF8","hasSubstr","hasThreadFuzzer","hasToken","hasTokenCaseInsensitive","hasTokenCaseInsensitiveOrNull","hasTokenOrNull","hex","hilbertDecode","hilbertEncode","histogram","hiveHash","hop","hopEnd","hopStart","hostName","hostname","hypot","icebergBucket","icebergHash","icebergTruncate","identity","idnaDecode","idnaEncode","if","ifNotFinite","ifNull","ignore","inIgnoreSet","indexHint","indexOf","indexOfAssumeSorted","initcap","initcapUTF8","initialQueryID","initialQueryStartTime","initial_query_id","initial_query_start_time","initializeAggregation","instr","intDiv","intDivOrNull","intDivOrZero","intExp10","intExp2","intHash32","intHash64","intervalLengthSum","isConstant","isDecimalOverflow","isDynamicElementInSharedData","isFinite","isIPAddressInRange","isIPv4String","isIPv6String","isInfinite","isMergeTreePartCoveredBy","isNaN","isNotDistinctFrom","isNotNull","isNull","isNullable","isValidJSON","isValidUTF8","isZeroOrNull","jaroSimilarity","jaroWinklerSimilarity","javaHash","javaHashUTF16LE","joinGet","joinGetOrNull","jsonMergePatch","jumpConsistentHash","kafkaMurmurHash","keccak256","kolmogorovSmirnovTest","kostikConsistentHash","kql_array_sort_asc","kql_array_sort_desc","kurtPop","kurtSamp","lag","lagInFrame","largestTriangleThreeBuckets","lastValueRespectNulls","last_value","last_value_respect_nulls","lcase","lcm","lead","leadInFrame","least","left","leftPad","leftPadUTF8","leftUTF8","lemmatize","length","lengthUTF8","less","lessOrEquals","levenshteinDistance","levenshteinDistanceUTF8","lgamma","ln","locate","log","log10","log1p","log2","logTrace","lowCardinalityIndices","lowCardinalityKeys","lower","lowerUTF8","lpad","ltrim","lttb","makeDate","makeDate32","makeDateTime","makeDateTime64","mannWhitneyUTest","map","mapAdd","mapAll","mapApply","mapConcat","mapContains","mapContainsKey","mapContainsKeyLike","mapContainsValue","mapContainsValueLike","mapExists","mapExtractKeyLike","mapExtractValueLike","mapFilter","mapFromArrays","mapFromString","mapKeys","mapPartialReverseSort","mapPartialSort","mapPopulateSeries","mapReverseSort","mapSort","mapSubtract","mapUpdate","mapValues","match","materialize","max","max2","maxIntersections","maxIntersectionsPosition","maxMappedArrays","meanZTest","median","medianBFloat16","medianBFloat16Weighted","medianDD","medianDeterministic","medianExact","medianExactHigh","medianExactLow","medianExactWeighted","medianExactWeightedInterpolated","medianGK","medianInterpolatedWeighted","medianTDigest","medianTDigestWeighted","medianTiming","medianTimingWeighted","mergeTreePartInfo","metroHash64","mid","min","min2","minMappedArrays","minSampleSizeContinous","minSampleSizeContinuous","minSampleSizeConversion","minus","mismatches","mod","modOrNull","modulo","moduloLegacy","moduloOrNull","moduloOrZero","monthName","mortonDecode","mortonEncode","multiFuzzyMatchAllIndices","multiFuzzyMatchAny","multiFuzzyMatchAnyIndex","multiIf","multiMatchAllIndices","multiMatchAny","multiMatchAnyIndex","multiSearchAllPositions","multiSearchAllPositionsCaseInsensitive","multiSearchAllPositionsCaseInsensitiveUTF8","multiSearchAllPositionsUTF8","multiSearchAny","multiSearchAnyCaseInsensitive","multiSearchAnyCaseInsensitiveUTF8","multiSearchAnyUTF8","multiSearchFirstIndex","multiSearchFirstIndexCaseInsensitive","multiSearchFirstIndexCaseInsensitiveUTF8","multiSearchFirstIndexUTF8","multiSearchFirstPosition","multiSearchFirstPositionCaseInsensitive","multiSearchFirstPositionCaseInsensitiveUTF8","multiSearchFirstPositionUTF8","multiply","multiplyDecimal","murmurHash2_32","murmurHash2_64","murmurHash3_128","murmurHash3_32","murmurHash3_64","negate","neighbor","nested","netloc","ngramDistance","ngramDistanceCaseInsensitive","ngramDistanceCaseInsensitiveUTF8","ngramDistanceUTF8","ngramMinHash","ngramMinHashArg","ngramMinHashArgCaseInsensitive","ngramMinHashArgCaseInsensitiveUTF8","ngramMinHashArgUTF8","ngramMinHashCaseInsensitive","ngramMinHashCaseInsensitiveUTF8","ngramMinHashUTF8","ngramSearch","ngramSearchCaseInsensitive","ngramSearchCaseInsensitiveUTF8","ngramSearchUTF8","ngramSimHash","ngramSimHashCaseInsensitive","ngramSimHashCaseInsensitiveUTF8","ngramSimHashUTF8","ngrams","nonNegativeDerivative","normL1","normL2","normL2Squared","normLinf","normLp","normalizeL1","normalizeL2","normalizeLinf","normalizeLp","normalizeQuery","normalizeQueryKeepNames","normalizeUTF8NFC","normalizeUTF8NFD","normalizeUTF8NFKC","normalizeUTF8NFKD","normalizedQueryHash","normalizedQueryHashKeepNames","notEmpty","notEquals","notILike","notIn","notInIgnoreSet","notLike","notNullIn","notNullInIgnoreSet","nothing","nothingNull","nothingUInt64","now","now64","nowInBlock","nowInBlock64","nth_value","ntile","nullIf","nullIn","nullInIgnoreSet","numbers","numericIndexedVectorAllValueSum","numericIndexedVectorBuild","numericIndexedVectorCardinality","numericIndexedVectorGetValue","numericIndexedVectorPointwiseAdd","numericIndexedVectorPointwiseDivide","numericIndexedVectorPointwiseEqual","numericIndexedVectorPointwiseGreater","numericIndexedVectorPointwiseGreaterEqual","numericIndexedVectorPointwiseLess","numericIndexedVectorPointwiseLessEqual","numericIndexedVectorPointwiseMultiply","numericIndexedVectorPointwiseNotEqual","numericIndexedVectorPointwiseSubtract","numericIndexedVectorShortDebugString","numericIndexedVectorToMap","overlay","overlayUTF8","parseDateTime","parseDateTime32BestEffort","parseDateTime32BestEffortOrNull","parseDateTime32BestEffortOrZero","parseDateTime64","parseDateTime64BestEffort","parseDateTime64BestEffortOrNull","parseDateTime64BestEffortOrZero","parseDateTime64BestEffortUS","parseDateTime64BestEffortUSOrNull","parseDateTime64BestEffortUSOrZero","parseDateTime64InJodaSyntax","parseDateTime64InJodaSyntaxOrNull","parseDateTime64InJodaSyntaxOrZero","parseDateTime64OrNull","parseDateTime64OrZero","parseDateTimeBestEffort","parseDateTimeBestEffortOrNull","parseDateTimeBestEffortOrZero","parseDateTimeBestEffortUS","parseDateTimeBestEffortUSOrNull","parseDateTimeBestEffortUSOrZero","parseDateTimeInJodaSyntax","parseDateTimeInJodaSyntaxOrNull","parseDateTimeInJodaSyntaxOrZero","parseDateTimeOrNull","parseDateTimeOrZero","parseReadableSize","parseReadableSizeOrNull","parseReadableSizeOrZero","parseTimeDelta","partitionID","partitionId","path","pathFull","percentRank","percent_rank","pi","plus","pmod","pmodOrNull","pointInEllipses","pointInPolygon","polygonAreaCartesian","polygonAreaSpherical","polygonConvexHullCartesian","polygonPerimeterCartesian","polygonPerimeterSpherical","polygonsDistanceCartesian","polygonsDistanceSpherical","polygonsEqualsCartesian","polygonsIntersectCartesian","polygonsIntersectSpherical","polygonsIntersectionCartesian","polygonsIntersectionSpherical","polygonsSymDifferenceCartesian","polygonsSymDifferenceSpherical","polygonsUnionCartesian","polygonsUnionSpherical","polygonsWithinCartesian","polygonsWithinSpherical","port","portRFC","position","positionCaseInsensitive","positionCaseInsensitiveUTF8","positionUTF8","positiveModulo","positiveModuloOrNull","positive_modulo","positive_modulo_or_null","pow","power","printf","proportionsZTest","protocol","punycodeDecode","punycodeEncode","quantile","quantileBFloat16","quantileBFloat16Weighted","quantileDD","quantileDeterministic","quantileExact","quantileExactExclusive","quantileExactHigh","quantileExactInclusive","quantileExactLow","quantileExactWeighted","quantileExactWeightedInterpolated","quantileGK","quantileInterpolatedWeighted","quantileTDigest","quantileTDigestWeighted","quantileTiming","quantileTimingWeighted","quantiles","quantilesBFloat16","quantilesBFloat16Weighted","quantilesDD","quantilesDeterministic","quantilesExact","quantilesExactExclusive","quantilesExactHigh","quantilesExactInclusive","quantilesExactLow","quantilesExactWeighted","quantilesExactWeightedInterpolated","quantilesGK","quantilesInterpolatedWeighted","quantilesTDigest","quantilesTDigestWeighted","quantilesTiming","quantilesTimingWeighted","queryID","queryString","queryStringAndFragment","query_id","radians","rand","rand32","rand64","randBernoulli","randBinomial","randCanonical","randChiSquared","randConstant","randExponential","randFisherF","randLogNormal","randNegativeBinomial","randNormal","randPoisson","randStudentT","randUniform","randomFixedString","randomPrintableASCII","randomString","randomStringUTF8","rank","rankCorr","readWKBLineString","readWKBMultiLineString","readWKBMultiPolygon","readWKBPoint","readWKBPolygon","readWKTLineString","readWKTMultiLineString","readWKTMultiPolygon","readWKTPoint","readWKTPolygon","readWKTRing","regexpExtract","regexpQuoteMeta","regionHierarchy","regionIn","regionToArea","regionToCity","regionToContinent","regionToCountry","regionToDistrict","regionToName","regionToPopulation","regionToTopContinent","reinterpret","reinterpretAsDate","reinterpretAsDateTime","reinterpretAsFixedString","reinterpretAsFloat32","reinterpretAsFloat64","reinterpretAsInt128","reinterpretAsInt16","reinterpretAsInt256","reinterpretAsInt32","reinterpretAsInt64","reinterpretAsInt8","reinterpretAsString","reinterpretAsUInt128","reinterpretAsUInt16","reinterpretAsUInt256","reinterpretAsUInt32","reinterpretAsUInt64","reinterpretAsUInt8","reinterpretAsUUID","repeat","replace","replaceAll","replaceOne","replaceRegexpAll","replaceRegexpOne","replicate","retention","reverse","reverseUTF8","revision","right","rightPad","rightPadUTF8","rightUTF8","round","roundAge","roundBankers","roundDown","roundDuration","roundToExp2","rowNumberInAllBlocks","rowNumberInBlock","row_number","rpad","rtrim","runningAccumulate","runningConcurrency","runningDifference","runningDifferenceStartingWithFirstValue","s2CapContains","s2CapUnion","s2CellsIntersect","s2GetNeighbors","s2RectAdd","s2RectContains","s2RectIntersection","s2RectUnion","s2ToGeo","scalarProduct","searchAll","searchAny","sequenceCount","sequenceMatch","sequenceMatchEvents","sequenceNextNode","seriesDecomposeSTL","seriesOutliersDetectTukey","seriesPeriodDetectFFT","serverTimeZone","serverTimezone","serverUUID","shardCount","shardNum","showCertificate","sigmoid","sign","simpleJSONExtractBool","simpleJSONExtractFloat","simpleJSONExtractInt","simpleJSONExtractRaw","simpleJSONExtractString","simpleJSONExtractUInt","simpleJSONHas","simpleLinearRegression","sin","singleValueOrNull","sinh","sipHash128","sipHash128Keyed","sipHash128Reference","sipHash128ReferenceKeyed","sipHash64","sipHash64Keyed","skewPop","skewSamp","sleep","sleepEachRow","snowflakeIDToDateTime","snowflakeIDToDateTime64","snowflakeToDateTime","snowflakeToDateTime64","soundex","space","sparkBar","sparkbar","sparseGrams","sparseGramsHashes","sparseGramsHashesUTF8","sparseGramsUTF8","splitByAlpha","splitByChar","splitByNonAlpha","splitByRegexp","splitByString","splitByWhitespace","sqid","sqidDecode","sqidEncode","sqrt","startsWith","startsWithUTF8","stddevPop","stddevPopStable","stddevSamp","stddevSampStable","stem","stochasticLinearRegression","stochasticLogisticRegression","str_to_date","str_to_map","stringBytesEntropy","stringBytesUniq","stringJaccardIndex","stringJaccardIndexUTF8","stringToH3","structureToCapnProtoSchema","structureToProtobufSchema","studentTTest","subBitmap","subDate","substr","substring","substringIndex","substringIndexUTF8","substringUTF8","subtractDays","subtractHours","subtractInterval","subtractMicroseconds","subtractMilliseconds","subtractMinutes","subtractMonths","subtractNanoseconds","subtractQuarters","subtractSeconds","subtractTupleOfIntervals","subtractWeeks","subtractYears","sum","sumCount","sumKahan","sumMapFiltered","sumMapFilteredWithOverflow","sumMapWithOverflow","sumMappedArrays","sumWithOverflow","svg","synonyms","tan","tanh","tcpPort","tgamma","theilsU","throwIf","tid","timeDiff","timeSeriesDeltaToGrid","timeSeriesDerivToGrid","timeSeriesFromGrid","timeSeriesGroupArray","timeSeriesIdToTags","timeSeriesIdToTagsGroup","timeSeriesIdeltaToGrid","timeSeriesInstantDeltaToGrid","timeSeriesInstantRateToGrid","timeSeriesIrateToGrid","timeSeriesLastToGrid","timeSeriesLastTwoSamples","timeSeriesPredictLinearToGrid","timeSeriesRange","timeSeriesRateToGrid","timeSeriesResampleToGridWithStaleness","timeSeriesStoreTags","timeSeriesTagsGroupToTags","timeSlot","timeSlots","timeZone","timeZoneOf","timeZoneOffset","time_bucket","timestamp","timestampDiff","timestamp_diff","timezone","timezoneOf","timezoneOffset","toBFloat16","toBFloat16OrNull","toBFloat16OrZero","toBool","toColumnTypeName","toDate","toDate32","toDate32OrDefault","toDate32OrNull","toDate32OrZero","toDateOrDefault","toDateOrNull","toDateOrZero","toDateTime","toDateTime32","toDateTime64","toDateTime64OrDefault","toDateTime64OrNull","toDateTime64OrZero","toDateTimeOrDefault","toDateTimeOrNull","toDateTimeOrZero","toDayOfMonth","toDayOfWeek","toDayOfYear","toDaysSinceYearZero","toDecimal128","toDecimal128OrDefault","toDecimal128OrNull","toDecimal128OrZero","toDecimal256","toDecimal256OrDefault","toDecimal256OrNull","toDecimal256OrZero","toDecimal32","toDecimal32OrDefault","toDecimal32OrNull","toDecimal32OrZero","toDecimal64","toDecimal64OrDefault","toDecimal64OrNull","toDecimal64OrZero","toDecimalString","toFixedString","toFloat32","toFloat32OrDefault","toFloat32OrNull","toFloat32OrZero","toFloat64","toFloat64OrDefault","toFloat64OrNull","toFloat64OrZero","toHour","toIPv4","toIPv4OrDefault","toIPv4OrNull","toIPv4OrZero","toIPv6","toIPv6OrDefault","toIPv6OrNull","toIPv6OrZero","toISOWeek","toISOYear","toInt128","toInt128OrDefault","toInt128OrNull","toInt128OrZero","toInt16","toInt16OrDefault","toInt16OrNull","toInt16OrZero","toInt256","toInt256OrDefault","toInt256OrNull","toInt256OrZero","toInt32","toInt32OrDefault","toInt32OrNull","toInt32OrZero","toInt64","toInt64OrDefault","toInt64OrNull","toInt64OrZero","toInt8","toInt8OrDefault","toInt8OrNull","toInt8OrZero","toInterval","toIntervalDay","toIntervalHour","toIntervalMicrosecond","toIntervalMillisecond","toIntervalMinute","toIntervalMonth","toIntervalNanosecond","toIntervalQuarter","toIntervalSecond","toIntervalWeek","toIntervalYear","toJSONString","toLastDayOfMonth","toLastDayOfWeek","toLowCardinality","toMillisecond","toMinute","toModifiedJulianDay","toModifiedJulianDayOrNull","toMonday","toMonth","toMonthNumSinceEpoch","toNullable","toQuarter","toRelativeDayNum","toRelativeHourNum","toRelativeMinuteNum","toRelativeMonthNum","toRelativeQuarterNum","toRelativeSecondNum","toRelativeWeekNum","toRelativeYearNum","toSecond","toStartOfDay","toStartOfFifteenMinutes","toStartOfFiveMinute","toStartOfFiveMinutes","toStartOfHour","toStartOfISOYear","toStartOfInterval","toStartOfMicrosecond","toStartOfMillisecond","toStartOfMinute","toStartOfMonth","toStartOfNanosecond","toStartOfQuarter","toStartOfSecond","toStartOfTenMinutes","toStartOfWeek","toStartOfYear","toString","toStringCutToZero","toTime","toTime64","toTime64OrNull","toTime64OrZero","toTimeOrNull","toTimeOrZero","toTimeWithFixedDate","toTimeZone","toTimezone","toTypeName","toUInt128","toUInt128OrDefault","toUInt128OrNull","toUInt128OrZero","toUInt16","toUInt16OrDefault","toUInt16OrNull","toUInt16OrZero","toUInt256","toUInt256OrDefault","toUInt256OrNull","toUInt256OrZero","toUInt32","toUInt32OrDefault","toUInt32OrNull","toUInt32OrZero","toUInt64","toUInt64OrDefault","toUInt64OrNull","toUInt64OrZero","toUInt8","toUInt8OrDefault","toUInt8OrNull","toUInt8OrZero","toUTCTimestamp","toUUID","toUUIDOrDefault","toUUIDOrNull","toUUIDOrZero","toUnixTimestamp","toUnixTimestamp64Micro","toUnixTimestamp64Milli","toUnixTimestamp64Nano","toUnixTimestamp64Second","toValidUTF8","toWeek","toYYYYMM","toYYYYMMDD","toYYYYMMDDhhmmss","toYear","toYearNumSinceEpoch","toYearWeek","to_utc_timestamp","today","tokens","topK","topKWeighted","topLevelDomain","topLevelDomainRFC","transactionID","transactionLatestSnapshot","transactionOldestSnapshot","transform","translate","translateUTF8","trim","trimBoth","trimLeft","trimRight","trunc","tryBase32Decode","tryBase58Decode","tryBase64Decode","tryBase64URLDecode","tryDecrypt","tryIdnaEncode","tryPunycodeDecode","tumble","tumbleEnd","tumbleStart","tuple","tupleConcat","tupleDivide","tupleDivideByNumber","tupleElement","tupleHammingDistance","tupleIntDiv","tupleIntDivByNumber","tupleIntDivOrZero","tupleIntDivOrZeroByNumber","tupleMinus","tupleModulo","tupleModuloByNumber","tupleMultiply","tupleMultiplyByNumber","tupleNames","tupleNegate","tuplePlus","tupleToNameValuePairs","ucase","unbin","unhex","uniq","uniqCombined","uniqCombined64","uniqExact","uniqHLL12","uniqTheta","uniqThetaIntersect","uniqThetaNot","uniqThetaUnion","uniqUpTo","upper","upperUTF8","uptime","user","validateNestedArraySizes","varPop","varPopStable","varSamp","varSampStable","variantElement","variantType","vectorDifference","vectorSum","version","visibleWidth","visitParamExtractBool","visitParamExtractFloat","visitParamExtractInt","visitParamExtractRaw","visitParamExtractString","visitParamExtractUInt","visitParamHas","week","welchTTest","widthBucket","width_bucket","windowFunnel","windowID","wkb","wkt","wordShingleMinHash","wordShingleMinHashArg","wordShingleMinHashArgCaseInsensitive","wordShingleMinHashArgCaseInsensitiveUTF8","wordShingleMinHashArgUTF8","wordShingleMinHashCaseInsensitive","wordShingleMinHashCaseInsensitiveUTF8","wordShingleMinHashUTF8","wordShingleSimHash","wordShingleSimHashCaseInsensitive","wordShingleSimHashCaseInsensitiveUTF8","wordShingleSimHashUTF8","wyHash64","xor","xxHash32","xxHash64","xxh3","yandexConsistentHash","yearweek","yesterday","zookeeperSessionUptime","MergeTree","ReplacingMergeTree","SummingMergeTree","AggregatingMergeTree","CollapsingMergeTree","VersionedCollapsingMergeTree","GraphiteMergeTree","CoalescingMergeTree","Atomic","Shared","Lazy","Replicated","PostgreSQL","MySQL","SQLite","MaterializedPostgreSQL","DataLakeCatalog"],kne=["ACCESS","ACTION","ADD","ADMIN","AFTER","ALGORITHM","ALIAS","ALL","ALLOWED_LATENESS","ALTER","AND","ANTI","APPEND","APPLY","AS","ASC","ASCENDING","ASOF","ASSUME","AST","ASYNC","ATTACH","AUTO_INCREMENT","AZURE","BACKUP","BAGEXPANSION","BASE_BACKUP","BCRYPT_HASH","BCRYPT_PASSWORD","BEGIN","BETWEEN","BIDIRECTIONAL","BOTH","BY","CACHE","CACHES","CASCADE","CASE","CHANGE","CHANGEABLE_IN_READONLY","CHANGED","CHARACTER","CHECK","CLEANUP","CLEAR","CLUSTER","CLUSTERS","CLUSTER_HOST_IDS","CN","CODEC","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPRESSION","CONST","CONSTRAINT","CREATE","CROSS","CUBE","CURRENT","D","DATA","DATABASE","DATABASES","DAYS","DD","DDL","DEDUPLICATE","DEFAULT","DEFINER","DELAY","DELETE","DELETED","DEPENDS","DESC","DESCENDING","DESCRIBE","DETACH","DETACHED","DICTIONARIES","DICTIONARY","DISK","DISTINCT","DIV","DOUBLE_SHA1_HASH","DOUBLE_SHA1_PASSWORD","DROP","ELSE","ENABLED","END","ENFORCED","ENGINE","ENGINES","EPHEMERAL","ESTIMATE","EVENT","EVENTS","EVERY","EXCEPT","EXCHANGE","EXISTS","EXPLAIN","EXPRESSION","EXTENDED","EXTERNAL","FAKE","FALSE","FETCH","FIELDS","FILESYSTEM","FILL","FILTER","FINAL","FIRST","FOLLOWING","FOR","FOREIGN","FORMAT","FREEZE","FROM","FULL","FULLTEXT","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GRANTEES","GRANTS","GRANULARITY","GROUP","GROUPING","GROUPS","H","HASH","HAVING","HDFS","HH","HIERARCHICAL","HOST","HOURS","HTTP","IDENTIFIED","ILIKE","IN","INDEX","INDEXES","INDICES","INFILE","INHERIT","INJECTIVE","INNER","INSERT","INTERPOLATE","INTERSECT","INTERVAL","INTO","INVISIBLE","INVOKER","IP","IS","IS_OBJECT_ID","JOIN","JWT","KERBEROS","KEY","KEYED","KEYS","KILL","KIND","LARGE","LAST","LAYOUT","LDAP","LEADING","LEVEL","LIFETIME","LIGHTWEIGHT","LIKE","LIMIT","LIMITS","LINEAR","LIST","LIVE","LOCAL","M","MASK","MATERIALIZED","MCS","MEMORY","MERGES","METRICS","MI","MICROSECOND","MICROSECONDS","MILLISECONDS","MINUTES","MM","MODIFY","MONTHS","MOVE","MS","MUTATION","N","NAME","NAMED","NANOSECOND","NANOSECONDS","NEXT","NO","NONE","NOT","NO_PASSWORD","NS","NULL","NULLS","OBJECT","OFFSET","ON","ONLY","OPTIMIZE","OPTION","OR","ORDER","OUTER","OUTFILE","OVER","OVERRIDABLE","OVERRIDE","PART","PARTIAL","PARTITION","PARTITIONS","PART_MOVE_TO_SHARD","PASTE","PERIODIC","PERMANENTLY","PERMISSIVE","PERSISTENT","PIPELINE","PLAINTEXT_PASSWORD","PLAN","POLICY","POPULATE","PRECEDING","PRECISION","PREWHERE","PRIMARY","PRIVILEGES","PROCESSLIST","PROFILE","PROJECTION","PROTOBUF","PULL","Q","QQ","QUALIFY","QUARTERS","QUERY","QUOTA","RANDOMIZE","RANDOMIZED","RANGE","READONLY","REALM","RECOMPRESS","RECURSIVE","REFERENCES","REFRESH","REGEXP","REMOVE","RENAME","RESET","RESPECT","RESTORE","RESTRICT","RESTRICTIVE","RESUME","REVOKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","S","S3","SALT","SAMPLE","SAN","SCHEME","SECONDS","SECURITY","SELECT","SEMI","SEQUENTIAL","SERVER","SET","SETS","SETTING","SETTINGS","SHA256_HASH","SHA256_PASSWORD","SHARD","SHOW","SIGNED","SIMPLE","SNAPSHOT","SOURCE","SPATIAL","SQL","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MICROSECOND","SQL_TSI_MILLISECOND","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_NANOSECOND","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SS","SSH_KEY","SSL_CERTIFICATE","STALENESS","START","STATISTICS","STDOUT","STEP","STORAGE","STRICT","STRICTLY_ASCENDING","SUBPARTITION","SUBPARTITIONS","SUSPEND","SYNC","SYNTAX","SYSTEM","TABLE","TABLES","TAGS","TEMPORARY","TEST","THAN","THEN","TIES","TIME","TO","TOP","TOTALS","TRACKING","TRAILING","TRANSACTION","TREE","TRIGGER","TRUE","TRUNCATE","TTL","TYPE","TYPEOF","UNBOUNDED","UNDROP","UNFREEZE","UNION","UNIQUE","UNSET","UNSIGNED","UNTIL","UPDATE","URL","USE","USING","UUID","VALID","VALUES","VARYING","VIEW","VISIBLE","VOLUME","WATCH","WATERMARK","WEEKS","WHEN","WHERE","WINDOW","WITH","WITH_ITEMINDEX","WK","WRITABLE","WW","YEARS","YY","YYYY","ZKPATH"],Yne=["AGGREGATEFUNCTION","ARRAY","BFLOAT16","BIGINT","BIGINT SIGNED","BIGINT UNSIGNED","BINARY","BINARY LARGE OBJECT","BINARY VARYING","BIT","BLOB","BYTE","BYTEA","BOOL","CHAR","CHAR LARGE OBJECT","CHAR VARYING","CHARACTER","CHARACTER LARGE OBJECT","CHARACTER VARYING","CLOB","DEC","DOUBLE","DOUBLE PRECISION","DATE","DATE32","DATETIME","DATETIME32","DATETIME64","DECIMAL","DECIMAL128","DECIMAL256","DECIMAL32","DECIMAL64","DYNAMIC","ENUM","ENUM","ENUM16","ENUM8","FIXED","FLOAT","FIXEDSTRING","FLOAT32","FLOAT64","GEOMETRY","INET4","INET6","INT","INT SIGNED","INT UNSIGNED","INT1","INT1 SIGNED","INT1 UNSIGNED","INTEGER","INTEGER SIGNED","INTEGER UNSIGNED","IPV4","IPV6","INT128","INT16","INT256","INT32","INT64","INT8","INTERVALDAY","INTERVALHOUR","INTERVALMICROSECOND","INTERVALMILLISECOND","INTERVALMINUTE","INTERVALMONTH","INTERVALNANOSECOND","INTERVALQUARTER","INTERVALSECOND","INTERVALWEEK","INTERVALYEAR","JSON","LONGBLOB","LONGTEXT","LINESTRING","LOWCARDINALITY","MEDIUMBLOB","MEDIUMINT","MEDIUMINT SIGNED","MEDIUMINT UNSIGNED","MEDIUMTEXT","MAP","MULTILINESTRING","MULTIPOLYGON","NATIONAL CHAR","NATIONAL CHAR VARYING","NATIONAL CHARACTER","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NCHAR","NCHAR LARGE OBJECT","NCHAR VARYING","NUMERIC","NVARCHAR","NESTED","NOTHING","NULLABLE","OBJECT","POINT","POLYGON","REAL","RING","SET","SIGNED","SINGLE","SMALLINT","SMALLINT SIGNED","SMALLINT UNSIGNED","SIMPLEAGGREGATEFUNCTION","STRING","TEXT","TIMESTAMP","TINYBLOB","TINYINT","TINYINT SIGNED","TINYINT UNSIGNED","TINYTEXT","TIME","TIME64","TUPLE","UINT128","UINT16","UINT256","UINT32","UINT64","UINT8","UNSIGNED","UUID","VARBINARY","VARCHAR","VARCHAR2","VARIANT","YEAR","BOOL","BOOLEAN"],Wne=Se(["SELECT [DISTINCT]","MODIFY QUERY SELECT [DISTINCT]"]),jne=Se(["SET","WITH","FROM","SAMPLE","PREWHERE","WHERE","GROUP BY","HAVING","QUALIFY","ORDER BY","LIMIT","SETTINGS","INTO OUTFILE","FORMAT","WINDOW","PARTITION BY","INSERT INTO","VALUES","DEPENDS ON","MOVE {USER | ROLE | QUOTA | SETTINGS PROFILE | ROW POLICY}","GRANT","REVOKE","CHECK GRANT","SET [DEFAULT] ROLE [NONE | ALL | ALL EXCEPT]","DEDUPLICATE BY","MODIFY STATISTICS","TYPE","ALTER USER [IF EXISTS]","ALTER [ROW] POLICY [IF EXISTS]","DROP {USER | ROLE | QUOTA | PROFILE | SETTINGS PROFILE | ROW POLICY | POLICY} [IF EXISTS]"]),TM=Se(["CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]"]),BO=Se(["ALL EXCEPT","ON CLUSTER","UPDATE","SYSTEM RELOAD {DICTIONARIES | DICTIONARY | FUNCTIONS | FUNCTION | ASYNCHRONOUS METRICS}","SYSTEM DROP {DNS CACHE | MARK CACHE | ICEBERG METADATA CACHE | TEXT INDEX DICTIONARY CACHE | TEXT INDEX HEADER CACHE | TEXT INDEX POSTINGS CACHE | REPLICA | DATABASE REPLICA | UNCOMPRESSED CACHE | COMPILED EXPRESSION CACHE | QUERY CONDITION CACHE | QUERY CACHE | FORMAT SCHEMA CACHE | FILESYSTEM CACHE}","SYSTEM FLUSH LOGS","SYSTEM RELOAD {CONFIG | USERS}","SYSTEM SHUTDOWN","SYSTEM KILL","SYSTEM FLUSH DISTRIBUTED","SYSTEM START DISTRIBUTED SENDS","SYSTEM {STOP | START} {LISTEN | MERGES | TTL MERGES | MOVES | FETCHES | REPLICATED SENDS | REPLICATION QUEUES | PULLING REPLICATION LOG}","SYSTEM {SYNC | RESTART | RESTORE} REPLICA","SYSTEM {SYNC | RESTORE} DATABASE REPLICA","SYSTEM RESTART REPLICAS","SYSTEM UNFREEZE","SYSTEM WAIT LOADING PARTS","SYSTEM {LOAD | UNLOAD} PRIMARY KEY","SYSTEM {STOP | START} [REPLICATED] VIEW","SYSTEM {STOP | START} VIEWS","SYSTEM {REFRESH | CANCEL | WAIT} VIEW","WITH NAME","SHOW [CREATE] {TABLE | TEMPORARY TABLE | DICTIONARY | VIEW | DATABASE}","SHOW DATABASES [[NOT] {LIKE | ILIKE}]","SHOW [FULL] [TEMPORARY] TABLES [FROM | IN]","SHOW [EXTENDED] [FULL] COLUMNS {FROM | IN}","ATTACH {TABLE | DICTIONARY | DATABASE} [IF NOT EXISTS]","DETACH {TABLE | DICTIONARY | DATABASE} [IF EXISTS]","PERMANENTLY","SYNC","DROP {DICTIONARY | DATABASE | PROFILE | VIEW | FUNCTION | NAMED COLLECTION} [IF EXISTS]","DROP [TEMPORARY] TABLE [IF EXISTS] [IF EMPTY]","RENAME TO","EXISTS [TEMPORARY] {TABLE | DICTIONARY | DATABASE}","KILL QUERY","OPTIMIZE TABLE","RENAME {TABLE | DICTIONARY | DATABASE}","EXCHANGE {TABLES | DICTIONARIES}","TRUNCATE TABLE [IF EXISTS]","EXECUTE AS","USE","TO","UNDROP TABLE","CREATE {DATABASE | NAMED COLLECTION} [IF NOT EXISTS]","CREATE [OR REPLACE] {VIEW | DICTIONARY} [IF NOT EXISTS]","CREATE MATERIALIZED VIEW [IF NOT EXISTS]","CREATE FUNCTION","CREATE {USER | ROLE | QUOTA | SETTINGS PROFILE} [IF NOT EXISTS | OR REPLACE]","CREATE [ROW] POLICY [IF NOT EXISTS | OR REPLACE]","REPLACE [TEMPORARY] TABLE [IF NOT EXISTS]","ALTER {ROLE | QUOTA | SETTINGS PROFILE} [IF EXISTS]","ALTER [TEMPORARY] TABLE","ALTER NAMED COLLECTION [IF EXISTS]","GRANTEES","NOT IDENTIFIED","RESET AUTHENTICATION METHODS TO NEW","{IDENTIFIED | ADD IDENTIFIED} [WITH | BY]","[ADD | DROP] HOST {LOCAL | NAME | REGEXP | IP | LIKE}","VALID UNTIL","DROP [ALL] {PROFILES | SETTINGS}","{ADD | MODIFY} SETTINGS","ADD PROFILES","APPLY DELETED MASK","IN PARTITION","{ADD | DROP | RENAME | CLEAR | COMMENT | MODIFY | ALTER | MATERIALIZE} COLUMN","{DETACH | DROP | ATTACH | FETCH | MOVE} {PART | PARTITION}","DROP DETACHED {PART | PARTITION}","{FORGET | REPLACE} PARTITION","CLEAR COLUMN","{FREEZE | UNFREEZE} [PARTITION]","CLEAR INDEX","TO {DISK | VOLUME}","[DELETE | REWRITE PARTS] IN PARTITION","{MODIFY | RESET} SETTING","DELETE WHERE","MODIFY ORDER BY","{MODIFY | REMOVE} SAMPLE BY","{ADD | MATERIALIZE | CLEAR} INDEX [IF NOT EXISTS]","DROP INDEX [IF EXISTS]","GRANULARITY","AFTER","FIRST","ADD CONSTRAINT [IF NOT EXISTS]","DROP CONSTRAINT [IF EXISTS]","MODIFY TTL","REMOVE TTL","ADD STATISTICS [IF NOT EXISTS]","{DROP | CLEAR} STATISTICS [IF EXISTS]","MATERIALIZE STATISTICS [ALL | IF EXISTS]","KEYED BY","NOT KEYED","FOR [RANDOMIZED] INTERVAL","AS {PERMISSIVE | RESTRICTIVE}","FOR SELECT","ADD PROJECTION [IF NOT EXISTS]","{DROP | MATERIALIZE | CLEAR} PROJECTION [IF EXISTS]","REFRESH {EVERY | AFTER}","RANDOMIZE FOR","APPEND","APPEND TO","DELETE FROM","EXPLAIN [AST | SYNTAX | QUERY TREE | PLAN | PIPELINE | ESTIMATE | TABLE OVERRIDE]","GRANT ON CLUSTER","GRANT CURRENT GRANTS","WITH GRANT OPTION","REVOKE ON CLUSTER","ADMIN OPTION FOR","CHECK TABLE","PARTITION ID","{DESC | DESCRIBE} TABLE"]),Xne=Se(["UNION [ALL | DISTINCT]","PARALLEL WITH"]),$ne=Se(["[GLOBAL] [INNER|LEFT|RIGHT|FULL|CROSS] [OUTER|SEMI|ANTI|ANY|ALL|ASOF] JOIN","[LEFT] ARRAY JOIN"]),Kne=Se(["{ROWS | RANGE} BETWEEN","ALTER MATERIALIZE STATISTICS"]),zne={name:"clickhouse",tokenizerOptions:{reservedSelect:Wne,reservedClauses:[...jne,...TM,...BO],reservedSetOperations:Xne,reservedJoins:$ne,reservedKeywordPhrases:Kne,reservedKeywords:kne,reservedDataTypes:Yne,reservedFunctionNames:Vne,extraParens:["[]","{}"],lineCommentTypes:["#","--"],nestedBlockComments:!1,underscoresInNumbers:!0,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq-bs',"``"],paramTypes:{custom:[{regex:String.raw`\{[^:']+:[^}]+\}`,key:e=>{const t=/\{([^:]+):/.exec(e);return t?t[1].trim():e}}]},operators:["%","||","?",":","==","<=>","->"],postProcess:qne},formatOptions:{onelineClauses:[...TM,...BO],tabularOnelineClauses:BO}};function qne(e){return e.map((t,n)=>{const r=e[n+1]||fl,s=e[n-1]||fl;return t.type===be.RESERVED_SELECT&&(r.type===be.COMMA||s.type===be.RESERVED_CLAUSE||s.type===be.COMMA)?Object.assign(Object.assign({},t),{type:be.RESERVED_KEYWORD}):dl.SET(t)&&r.type===be.OPEN_PAREN?Object.assign(Object.assign({},t),{type:be.RESERVED_FUNCTION_NAME}):t})}const Jne=["ARRAY_AGG","AVG","CORRELATION","COUNT","COUNT_BIG","COVARIANCE","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_SAMP","SUM","VARIANCE","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","AGE","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ASCII","ASCII_STR","ASIN","ATAN","ATAN2","ATANH","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BPCHAR","BSON_TO_JSON","BTRIM","CARDINALITY","CEILING","CEIL","CHARACTER_LENGTH","CHR","COALESCE","COLLATION_KEY","COLLATION_KEY_BIT","COMPARE_DECFLOAT","CONCAT","COS","COSH","COT","CURSOR_ROWCOUNT","DATAPARTITIONNUM","DATE_PART","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DAYS_TO_END_OF_MONTH","DBPARTITIONNUM","DECFLOAT","DECFLOAT_FORMAT","DECODE","DECRYPT_BIN","DECRYPT_CHAR","DEGREES","DEREF","DIFFERENCE","DIGITS","DOUBLE_PRECISION","EMPTY_BLOB","EMPTY_CLOB","EMPTY_DBCLOB","EMPTY_NCLOB","ENCRYPT","EVENT_MON_STATE","EXP","EXTRACT","FIRST_DAY","FLOOR","FROM_UTC_TIMESTAMP","GENERATE_UNIQUE","GETHINT","GREATEST","HASH","HASH4","HASH8","HASHEDVALUE","HEX","HEXTORAW","HOUR","HOURS_BETWEEN","IDENTITY_VAL_LOCAL","IFNULL","INITCAP","INSERT","INSTR","INSTR2","INSTR4","INSTRB","INTNAND","INTNOR","INTNXOR","INTNNOT","ISNULL","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_VALUE","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LENGTH2","LENGTH4","LENGTHB","LN","LOCATE","LOCATE_IN_STRING","LOG10","LONG_VARCHAR","LONG_VARGRAPHIC","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MINUTES_BETWEEN","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NEXT_QUARTER","NEXT_WEEK","NEXT_YEAR","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARAMETER","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","QUOTE_IDENT","QUOTE_LITERAL","RADIANS","RAISE_ERROR","RAND","RANDOM","RAWTOHEX","REC2XML","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_MATCH_COUNT","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RID_BIT","RIGHT","ROUND","ROUND_TIMESTAMP","RPAD","RTRIM","SECLABEL","SECLABEL_BY_NAME","SECLABEL_TO_CHAR","SECOND","SECONDS_BETWEEN","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTR2","SUBSTR4","SUBSTRB","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","THIS_MONTH","THIS_QUARTER","THIS_WEEK","THIS_YEAR","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF","TIMEZONE","TO_CHAR","TO_CLOB","TO_DATE","TO_HEX","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_UTC_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM","TRIM_ARRAY","TRUNC_TIMESTAMP","TRUNCATE","TRUNC","TYPE_ID","TYPE_NAME","TYPE_SCHEMA","UCASE","UNICODE_STR","UPPER","VALUE","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARCHAR_FORMAT_BIT","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WEEKS_BETWEEN","WIDTH_BUCKET","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XMLXSROBJECTID","XSLTRANSFORM","YEAR","YEARS_BETWEEN","YMD_BETWEEN","BASE_TABLE","JSON_TABLE","UNNEST","XMLTABLE","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT","CAST"],Qne=["ACTIVATE","ADD","AFTER","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","AS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BINARY","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CHECK","CLONE","CLOSE","CLUSTER","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","COUNT","COUNT_BIG","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST1","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GRAPHIC","GROUP","HANDLER","HASH","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IMPORT","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INTEGRITY","INTERSECT","INTO","IS","ISNULL","ISOBID","ISOLATION","ITERATE","JAR","JAVA","JOIN","KEEP","KEY","LABEL","LANGUAGE","LAST3","LATERAL","LC_CTYPE","LEAVE","LEFT","LIKE","LIMIT","LINKTYPE","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LOOP","MAINTAINED","MATERIALIZED","MAXVALUE","MICROSECOND","MICROSECONDS","MINUTE","MINUTES","MINVALUE","MODE","MODIFIES","MONTH","MONTHS","NAN","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT2","NOTNULL","NULL","NULLS","NUMPARTS","OBID","OF","OFF","OFFSET","OLD","OLD_TABLE","ON","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","OR","ORDER","OUT","OUTER","OVER","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENT","PIECESIZE","PLAN","POSITION","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STOGROUP","STORES","STYLE","SUBSTRING","SUMMARY","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESPACE","THEN","TO","TRANSACTION","TRIGGER","TRIM","TRUNCATE","TYPE","UNDO","UNION","UNIQUE","UNTIL","UPDATE","USAGE","USER","USING","VALIDPROC","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],Zne=["ARRAY","BIGINT","BINARY","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATE","DATETIME","DBCLOB","DEC","DECIMAL","DOUBLE","DOUBLE PRECISION","FLOAT","FLOAT4","FLOAT8","GRAPHIC","INT","INT2","INT4","INT8","INTEGER","INTERVAL","LONG VARCHAR","LONG VARGRAPHIC","NCHAR","NCHR","NCLOB","NVARCHAR","NUMERIC","SMALLINT","REAL","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC"],ere=Se(["SELECT [ALL | DISTINCT]"]),tre=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH NEXT","FOR UPDATE [OF]","FOR {READ | FETCH} ONLY","FOR {RR | CS | UR | RS} [USE AND KEEP {SHARE | UPDATE | EXCLUSIVE} LOCKS]","WAIT FOR OUTCOME","SKIP LOCKED DATA","INTO","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT"]),hM=Se(["CREATE [GLOBAL TEMPORARY | EXTERNAL] TABLE [IF NOT EXISTS]"]),FO=Se(["CREATE [OR REPLACE] VIEW","UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME COLUMN","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {DEFAULT | GENERATED | NOT NULL}","TRUNCATE [TABLE]","ALLOCATE","ALTER AUDIT POLICY","ALTER BUFFERPOOL","ALTER DATABASE PARTITION GROUP","ALTER DATABASE","ALTER EVENT MONITOR","ALTER FUNCTION","ALTER HISTOGRAM TEMPLATE","ALTER INDEX","ALTER MASK","ALTER METHOD","ALTER MODULE","ALTER NICKNAME","ALTER PACKAGE","ALTER PERMISSION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SECURITY LABEL COMPONENT","ALTER SECURITY POLICY","ALTER SEQUENCE","ALTER SERVER","ALTER SERVICE CLASS","ALTER STOGROUP","ALTER TABLESPACE","ALTER THRESHOLD","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER TYPE","ALTER USAGE LIST","ALTER USER MAPPING","ALTER VIEW","ALTER WORK ACTION SET","ALTER WORK CLASS SET","ALTER WORKLOAD","ALTER WRAPPER","ALTER XSROBJECT","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","AUDIT","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON","COMMIT [WORK]","CONNECT","CREATE [OR REPLACE] [PUBLIC] ALIAS","CREATE AUDIT POLICY","CREATE BUFFERPOOL","CREATE DATABASE PARTITION GROUP","CREATE EVENT MONITOR","CREATE [OR REPLACE] FUNCTION","CREATE FUNCTION MAPPING","CREATE HISTOGRAM TEMPLATE","CREATE [UNIQUE] INDEX","CREATE INDEX EXTENSION","CREATE [OR REPLACE] MASK","CREATE [SPECIFIC] METHOD","CREATE [OR REPLACE] MODULE","CREATE [OR REPLACE] NICKNAME","CREATE [OR REPLACE] PERMISSION","CREATE [OR REPLACE] PROCEDURE","CREATE ROLE","CREATE SCHEMA","CREATE SECURITY LABEL [COMPONENT]","CREATE SECURITY POLICY","CREATE [OR REPLACE] SEQUENCE","CREATE SERVICE CLASS","CREATE SERVER","CREATE STOGROUP","CREATE SYNONYM","CREATE [LARGE | REGULAR | {SYSTEM | USER} TEMPORARY] TABLESPACE","CREATE THRESHOLD","CREATE {TRANSFORM | TRANSFORMS} FOR","CREATE [OR REPLACE] TRIGGER","CREATE TRUSTED CONTEXT","CREATE [OR REPLACE] TYPE","CREATE TYPE MAPPING","CREATE USAGE LIST","CREATE USER MAPPING FOR","CREATE [OR REPLACE] VARIABLE","CREATE WORK ACTION SET","CREATE WORK CLASS SET","CREATE WORKLOAD","CREATE WRAPPER","DECLARE","DECLARE GLOBAL TEMPORARY TABLE","DESCRIBE [INPUT | OUTPUT]","DISCONNECT","DROP [PUBLIC] ALIAS","DROP AUDIT POLICY","DROP BUFFERPOOL","DROP DATABASE PARTITION GROUP","DROP EVENT MONITOR","DROP [SPECIFIC] FUNCTION","DROP FUNCTION MAPPING","DROP HISTOGRAM TEMPLATE","DROP INDEX [EXTENSION]","DROP MASK","DROP [SPECIFIC] METHOD","DROP MODULE","DROP NICKNAME","DROP PACKAGE","DROP PERMISSION","DROP [SPECIFIC] PROCEDURE","DROP ROLE","DROP SCHEMA","DROP SECURITY LABEL [COMPONENT]","DROP SECURITY POLICY","DROP SEQUENCE","DROP SERVER","DROP SERVICE CLASS","DROP STOGROUP","DROP TABLE HIERARCHY","DROP {TABLESPACE | TABLESPACES}","DROP {TRANSFORM | TRANSFORMS}","DROP THRESHOLD","DROP TRIGGER","DROP TRUSTED CONTEXT","DROP TYPE [MAPPING]","DROP USAGE LIST","DROP USER MAPPING FOR","DROP VARIABLE","DROP VIEW [HIERARCHY]","DROP WORK {ACTION | CLASS} SET","DROP WORKLOAD","DROP WRAPPER","DROP XSROBJECT","END DECLARE SECTION","EXECUTE [IMMEDIATE]","EXPLAIN {PLAN [SECTION] | ALL}","FETCH [FROM]","FLUSH {BUFFERPOOL | BUFFERPOOLS} ALL","FLUSH EVENT MONITOR","FLUSH FEDERATED CACHE","FLUSH OPTIMIZATION PROFILE CACHE","FLUSH PACKAGE CACHE [DYNAMIC]","FLUSH AUTHENTICATION CACHE [FOR ALL]","FREE LOCATOR","GET DIAGNOSTICS","GOTO","GRANT","INCLUDE","ITERATE","LEAVE","LOCK TABLE","LOOP","OPEN","PIPE","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX | STOGROUP | TABLESPACE]","REPEAT","RESIGNAL","RETURN","REVOKE","ROLLBACK [WORK] [TO SAVEPOINT]","SAVEPOINT","SET COMPILATION ENVIRONMENT","SET CONNECTION","SET CURRENT","SET ENCRYPTION PASSWORD","SET EVENT MONITOR STATE","SET INTEGRITY","SET PASSTHRU","SET PATH","SET ROLE","SET SCHEMA","SET SERVER OPTION","SET {SESSION AUTHORIZATION | SESSION_USER}","SET USAGE LIST","SIGNAL","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}","WHILE"]),nre=Se(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),rre=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),sre=Se(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),ire=Se([]),ore={name:"db2",tokenizerOptions:{reservedSelect:ere,reservedClauses:[...tre,...hM,...FO],reservedSetOperations:nre,reservedJoins:rre,reservedKeywordPhrases:sre,reservedDataTypePhrases:ire,reservedKeywords:Qne,reservedDataTypes:Zne,reservedFunctionNames:Jne,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","%","|","&","^","~","¬=","¬>","¬<","!>","!<","^=","^>","^<","||","->","=>"]},formatOptions:{onelineClauses:[...hM,...FO],tabularOnelineClauses:FO}},are=["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","EVERY","GROUPING","JSON_ARRAYAGG","JSON_OBJECTAGG","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","SOME","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","ANTILOG","ARRAY_MAX_CARDINALITY","ARRAY_TRIM","ASCII","ASIN","ATAN","ATAN2","ATANH","BASE64_DECODE","BASE64_ENCODE","BIT_LENGTH","BITAND","BITANDNOT","BITNOT","BITOR","BITXOR","BSON_TO_JSON","CARDINALITY","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","COALESCE","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","COT","CURDATE","CURTIME","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK_ISO","DAYOFWEEK","DAYOFYEAR","DAYS","DBPARTITIONNAME","DBPARTITIONNUM","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DEGREES","DIFFERENCE","DIGITS","DLCOMMENT","DLLINKTYPE","DLURLCOMPLETE","DLURLPATH","DLURLPATHONLY","DLURLSCHEME","DLURLSERVER","DLVALUE","DOUBLE_PRECISION","DOUBLE","ENCRPYT","ENCRYPT_AES","ENCRYPT_AES256","ENCRYPT_RC2","ENCRYPT_TDES","EXP","EXTRACT","FIRST_DAY","FLOOR","GENERATE_UNIQUE","GET_BLOB_FROM_FILE","GET_CLOB_FROM_FILE","GET_DBCLOB_FROM_FILE","GET_XML_FILE","GETHINT","GREATEST","HASH_MD5","HASH_ROW","HASH_SHA1","HASH_SHA256","HASH_SHA512","HASH_VALUES","HASHED_VALUE","HEX","HEXTORAW","HOUR","HTML_ENTITY_DECODE","HTML_ENTITY_ENCODE","HTTP_DELETE_BLOB","HTTP_DELETE","HTTP_GET_BLOB","HTTP_GET","HTTP_PATCH_BLOB","HTTP_PATCH","HTTP_POST_BLOB","HTTP_POST","HTTP_PUT_BLOB","HTTP_PUT","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTERPRET","ISFALSE","ISNOTFALSE","ISNOTTRUE","ISTRUE","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_UPDATE","JSON_VALUE","JULIAN_DAY","LAND","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LNOT","LOCATE_IN_STRING","LOCATE","LOG10","LOR","LOWER","LPAD","LTRIM","MAX_CARDINALITY","MAX","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","OCTET_LENGTH","OVERLAY","PI","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND_TIMESTAMP","ROUND","RPAD","RRN","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF_BIG","TIMESTAMPDIFF","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TO_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM_ARRAY","TRIM","TRUNC_TIMESTAMP","TRUNC","TRUNCATE","UCASE","UPPER","URL_DECODE","URL_ENCODE","VALUE","VARBINARY_FORMAT","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT_BINARY","VARCHAR_FORMAT","VERIFY_GROUP_FOR_USER","WEEK_ISO","WEEK","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XOR","XSLTRANSFORM","YEAR","ZONED","BASE_TABLE","HTTP_DELETE_BLOB_VERBOSE","HTTP_DELETE_VERBOSE","HTTP_GET_BLOB_VERBOSE","HTTP_GET_VERBOSE","HTTP_PATCH_BLOB_VERBOSE","HTTP_PATCH_VERBOSE","HTTP_POST_BLOB_VERBOSE","HTTP_POST_VERBOSE","HTTP_PUT_BLOB_VERBOSE","HTTP_PUT_VERBOSE","JSON_TABLE","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE","UNPACK","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","RATIO_TO_REPORT","ROW_NUMBER","CAST"],lre=["ABSENT","ACCORDING","ACCTNG","ACTION","ACTIVATE","ADD","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","APPEND","APPLNAME","ARRAY","ARRAY_AGG","ARRAY_TRIM","AS","ASC","ASENSITIVE","ASSOCIATE","ATOMIC","ATTACH","ATTRIBUTES","AUTHORIZATION","AUTONOMOUS","BEFORE","BEGIN","BETWEEN","BIND","BSON","BUFFERPOOL","BY","CACHE","CALL","CALLED","CARDINALITY","CASE","CAST","CHECK","CL","CLOSE","CLUSTER","COLLECT","COLLECTION","COLUMN","COMMENT","COMMIT","COMPACT","COMPARISONS","COMPRESS","CONCAT","CONCURRENT","CONDITION","CONNECT","CONNECT_BY_ROOT","CONNECTION","CONSTANT","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","COPY","COUNT","COUNT_BIG","CREATE","CREATEIN","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEACTIVATE","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFER","DEFINE","DEFINITION","DELETE","DELETING","DENSE_RANK","DENSERANK","DESC","DESCRIBE","DESCRIPTOR","DETACH","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ENFORCED","ERROR","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTEND","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST_VALUE","FOR","FOREIGN","FORMAT","FREE","FREEPAGE","FROM","FULL","FUNCTION","GBPCACHE","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HANDLER","HASH","HASH_ROW","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IGNORE","IMMEDIATE","IMPLICITLY","IN","INCLUDE","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDEXBP","INDICATOR","INF","INFINITY","INHERIT","INLINE","INNER","INOUT","INSENSITIVE","INSERT","INSERTING","INTEGRITY","INTERPRET","INTERSECT","INTO","IS","ISNULL","ISOLATION","ITERATE","JAVA","JOIN","JSON","JSON_ARRAY","JSON_ARRAYAGG","JSON_EXISTS","JSON_OBJECT","JSON_OBJECTAGG","JSON_QUERY","JSON_TABLE","JSON_VALUE","KEEP","KEY","KEYS","LABEL","LAG","LANGUAGE","LAST_VALUE","LATERAL","LEAD","LEAVE","LEFT","LEVEL2","LIKE","LIMIT","LINKTYPE","LISTAGG","LOCAL","LOCALDATE","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCATOR","LOCK","LOCKSIZE","LOG","LOGGED","LOOP","MAINTAINED","MASK","MATCHED","MATERIALIZED","MAXVALUE","MERGE","MICROSECOND","MICROSECONDS","MINPCTUSED","MINUTE","MINUTES","MINVALUE","MIRROR","MIXED","MODE","MODIFIES","MONTH","MONTHS","NAMESPACE","NAN","NATIONAL","NCHAR","NCLOB","NESTED","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT","NOTNULL","NTH_VALUE","NTILE","NULL","NULLS","NVARCHAR","OBID","OBJECT","OF","OFF","OFFSET","OLD","OLD_TABLE","OMIT","ON","ONLY","OPEN","OPTIMIZE","OPTION","OR","ORDER","ORDINALITY","ORGANIZE","OUT","OUTER","OVER","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGE","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PATH","PCTFREE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PERIOD","PERMISSION","PIECESIZE","PIPE","PLAN","POSITION","PREPARE","PREVVAL","PRIMARY","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PROGRAMID","QUERY","RANGE","RANK","RATIO_TO_REPORT","RCDFMT","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","REGEXP_LIKE","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNING","RETURNS","REVOKE","RID","RIGHT","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_NUMBER","ROWNUMBER","ROWS","RRN","RUN","SAVEPOINT","SBCS","SCALAR","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURED","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SKIP","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","SQLIND_DEFAULT","SQLIND_UNASSIGNED","STACKED","START","STARTING","STATEMENT","STATIC","STOGROUP","SUBSTRING","SUMMARY","SYNONYM","SYSTEM_TIME","SYSTEM_USER","TABLE","TABLESPACE","TABLESPACES","TAG","THEN","THREADSAFE","TO","TRANSACTION","TRANSFER","TRIGGER","TRIM","TRIM_ARRAY","TRUE","TRUNCATE","TRY_CAST","TYPE","UNDO","UNION","UNIQUE","UNIT","UNKNOWN","UNNEST","UNTIL","UPDATE","UPDATING","URI","USAGE","USE","USER","USERID","USING","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VERSIONING","VIEW","VOLATILE","WAIT","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHIN","WITHOUT","WRAPPED","WRAPPER","WRITE","WRKSTNNAME","XMLAGG","XMLATTRIBUTES","XMLCAST","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLGROUP","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTABLE","XMLTEXT","XMLVALIDATE","XSLTRANSFORM","XSROBJECT","YEAR","YEARS","YES","ZONE"],cre=["ARRAY","BIGINT","BINARY","BIT","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATA","DATALINK","DATE","DBCLOB","DECFLOAT","DECIMAL","DEC","DOUBLE","DOUBLE PRECISION","FLOAT","GRAPHIC","INT","INTEGER","LONG","NUMERIC","REAL","ROWID","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC","XML"],ure=Se(["SELECT [ALL | DISTINCT]"]),Ere=Se(["WITH [RECURSIVE]","INTO","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","FOR READ ONLY","OPTIMIZE FOR","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","DELETE","INSERT","FOR SYSTEM NAME"]),pM=Se(["CREATE [OR REPLACE] TABLE"]),HO=Se(["CREATE [OR REPLACE] [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","WITH {NC | RR | RS | CS | UR}","DELETE FROM","DROP TABLE","ALTER TABLE","ADD [COLUMN]","ALTER [COLUMN]","DROP [COLUMN]","SET DATA TYPE","SET {GENERATED ALWAYS | GENERATED BY DEFAULT}","SET NOT NULL","SET {NOT HIDDEN | IMPLICITLY HIDDEN}","SET FIELDPROC","DROP {DEFAULT | NOT NULL | GENERATED | IDENTITY | ROW CHANGE TIMESTAMP | FIELDPROC}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","SET CURRENT_SCHEMA","ALLOCATE CURSOR","ALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL] SQL","ALTER [SPECIFIC] {FUNCTION | PROCEDURE}","ALTER {MASK | PERMISSION | SEQUENCE | TRIGGER}","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PARAMETER | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","COMMENT ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON PARAMETER SPECIFIC {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON [TABLE FUNCTION] RETURN COLUMN","COMMENT ON [TABLE FUNCTION] RETURN COLUMN SPECIFIC [PROCEDURE | ROUTINE]","COMMIT [WORK] [HOLD]","CONNECT [TO | RESET] USER","CREATE [OR REPLACE] {ALIAS | FUNCTION | MASK | PERMISSION | PROCEDURE | SEQUENCE | TRIGGER | VARIABLE}","CREATE [ENCODED VECTOR] INDEX","CREATE UNIQUE [WHERE NOT NULL] INDEX","CREATE SCHEMA","CREATE TYPE","DEALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL]","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE [OUTPUT]","DESCRIBE {PROCEDURE | ROUTINE}","DESCRIBE TABLE","DISCONNECT ALL [SQL]","DISCONNECT [CURRENT]","DROP {ALIAS | INDEX | MASK | PACKAGE | PERMISSION | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT} [IF EXISTS]","DROP [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE} [IF EXISTS]","END DECLARE SECTION","EXECUTE [IMMEDIATE]","FREE LOCATOR","GET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","GET [CURRENT | STACKED] DIAGNOSTICS","GRANT {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","HOLD LOCATOR","INCLUDE","LABEL ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","LABEL ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","LOCK TABLE","OPEN","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX] TO","REVOKE {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","ROLLBACK [WORK] [HOLD | TO SAVEPOINT]","SAVEPOINT","SET CONNECTION","SET CURRENT {DEBUG MODE | DECFLOAT ROUNDING MODE | DEGREE | IMPLICIT XMLPARSE OPTION | TEMPORAL SYSTEM_TIME}","SET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","SET ENCRYPTION PASSWORD","SET OPTION","SET {[CURRENT [FUNCTION]] PATH | CURRENT_PATH}","SET RESULT SETS [WITH RETURN [TO CALLER | TO CLIENT]]","SET SESSION AUTHORIZATION","SET SESSION_USER","SET TRANSACTION","SIGNAL SQLSTATE [VALUE]","TAG","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}"]),fre=Se(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),dre=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT | RIGHT] EXCEPTION JOIN","{INNER | CROSS} JOIN"]),Tre=Se(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),hre=Se([]),pre={name:"db2i",tokenizerOptions:{reservedSelect:ure,reservedClauses:[...Ere,...pM,...HO],reservedSetOperations:fre,reservedJoins:dre,reservedKeywordPhrases:Tre,reservedDataTypePhrases:hre,reservedKeywords:lre,reservedDataTypes:cre,reservedFunctionNames:are,nestedBlockComments:!0,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","¬=","¬>","¬<","!>","!<","||","=>"]},formatOptions:{onelineClauses:[...pM,...HO],tabularOnelineClauses:HO}},Rre=["ABS","ACOS","ADD","ADD_PARQUET_KEY","AGE","AGGREGATE","ALIAS","ALL_PROFILING_OUTPUT","ANY_VALUE","APPLY","APPROX_COUNT_DISTINCT","APPROX_QUANTILE","ARBITRARY","ARGMAX","ARGMIN","ARG_MAX","ARG_MAX_NULL","ARG_MIN","ARG_MIN_NULL","ARRAY_AGG","ARRAY_AGGR","ARRAY_AGGREGATE","ARRAY_APPEND","ARRAY_APPLY","ARRAY_CAT","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COSINE_SIMILARITY","ARRAY_CROSS_PRODUCT","ARRAY_DISTANCE","ARRAY_DISTINCT","ARRAY_DOT_PRODUCT","ARRAY_EXTRACT","ARRAY_FILTER","ARRAY_GRADE_UP","ARRAY_HAS","ARRAY_HAS_ALL","ARRAY_HAS_ANY","ARRAY_INDEXOF","ARRAY_INNER_PRODUCT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_POP_BACK","ARRAY_POP_FRONT","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUSH_BACK","ARRAY_PUSH_FRONT","ARRAY_REDUCE","ARRAY_RESIZE","ARRAY_REVERSE","ARRAY_REVERSE_SORT","ARRAY_SELECT","ARRAY_SLICE","ARRAY_SORT","ARRAY_TO_JSON","ARRAY_TO_STRING","ARRAY_TRANSFORM","ARRAY_UNIQUE","ARRAY_VALUE","ARRAY_WHERE","ARRAY_ZIP","ARROW_SCAN","ARROW_SCAN_DUMB","ASCII","ASIN","ATAN","ATAN2","AVG","BASE64","BIN","BITSTRING","BITSTRING_AGG","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_POSITION","BIT_XOR","BOOL_AND","BOOL_OR","CARDINALITY","CBRT","CEIL","CEILING","CENTURY","CHECKPOINT","CHR","COLLATIONS","COL_DESCRIPTION","COMBINE","CONCAT","CONCAT_WS","CONSTANT_OR_NULL","CONTAINS","COPY_DATABASE","CORR","COS","COT","COUNT","COUNT_IF","COUNT_STAR","COVAR_POP","COVAR_SAMP","CREATE_SORT_KEY","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_DATE","CURRENT_LOCALTIME","CURRENT_LOCALTIMESTAMP","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SETTING","CURRENT_USER","CURRVAL","DAMERAU_LEVENSHTEIN","DATABASE_LIST","DATABASE_SIZE","DATEDIFF","DATEPART","DATESUB","DATETRUNC","DATE_ADD","DATE_DIFF","DATE_PART","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECADE","DECODE","DEGREES","DISABLE_CHECKPOINT_ON_SHUTDOWN","DISABLE_OBJECT_CACHE","DISABLE_OPTIMIZER","DISABLE_PRINT_PROGRESS_BAR","DISABLE_PROFILE","DISABLE_PROFILING","DISABLE_PROGRESS_BAR","DISABLE_VERIFICATION","DISABLE_VERIFY_EXTERNAL","DISABLE_VERIFY_FETCH_ROW","DISABLE_VERIFY_PARALLELISM","DISABLE_VERIFY_SERIALIZER","DIVIDE","DUCKDB_COLUMNS","DUCKDB_CONSTRAINTS","DUCKDB_DATABASES","DUCKDB_DEPENDENCIES","DUCKDB_EXTENSIONS","DUCKDB_FUNCTIONS","DUCKDB_INDEXES","DUCKDB_KEYWORDS","DUCKDB_MEMORY","DUCKDB_OPTIMIZERS","DUCKDB_SCHEMAS","DUCKDB_SECRETS","DUCKDB_SEQUENCES","DUCKDB_SETTINGS","DUCKDB_TABLES","DUCKDB_TEMPORARY_FILES","DUCKDB_TYPES","DUCKDB_VIEWS","EDIT","EDITDIST3","ELEMENT_AT","ENABLE_CHECKPOINT_ON_SHUTDOWN","ENABLE_OBJECT_CACHE","ENABLE_OPTIMIZER","ENABLE_PRINT_PROGRESS_BAR","ENABLE_PROFILE","ENABLE_PROFILING","ENABLE_PROGRESS_BAR","ENABLE_VERIFICATION","ENCODE","ENDS_WITH","ENTROPY","ENUM_CODE","ENUM_FIRST","ENUM_LAST","ENUM_RANGE","ENUM_RANGE_BOUNDARY","EPOCH","EPOCH_MS","EPOCH_NS","EPOCH_US","ERA","ERROR","EVEN","EXP","FACTORIAL","FAVG","FDIV","FILTER","FINALIZE","FIRST","FLATTEN","FLOOR","FMOD","FORCE_CHECKPOINT","FORMAT","FORMATREADABLEDECIMALSIZE","FORMATREADABLESIZE","FORMAT_BYTES","FORMAT_PG_TYPE","FORMAT_TYPE","FROM_BASE64","FROM_BINARY","FROM_HEX","FROM_JSON","FROM_JSON_STRICT","FSUM","FUNCTIONS","GAMMA","GCD","GENERATE_SERIES","GENERATE_SUBSCRIPTS","GEN_RANDOM_UUID","GEOMEAN","GEOMETRIC_MEAN","GETENV","GET_BIT","GET_BLOCK_SIZE","GET_CURRENT_TIME","GET_CURRENT_TIMESTAMP","GLOB","GRADE_UP","GREATEST","GREATEST_COMMON_DIVISOR","GROUP_CONCAT","HAMMING","HASH","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HEX","HISTOGRAM","HOUR","ICU_CALENDAR_NAMES","ICU_SORT_KEY","ILIKE_ESCAPE","IMPORT_DATABASE","INDEX_SCAN","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","INSTR","IN_SEARCH_PATH","ISFINITE","ISINF","ISNAN","ISODOW","ISOYEAR","JACCARD","JARO_SIMILARITY","JARO_WINKLER_SIMILARITY","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_CONTAINS","JSON_DESERIALIZE_SQL","JSON_EXECUTE_SERIALIZED_SQL","JSON_EXTRACT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_EXTRACT_STRING","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_GROUP_STRUCTURE","JSON_KEYS","JSON_MERGE_PATCH","JSON_OBJECT","JSON_QUOTE","JSON_SERIALIZE_PLAN","JSON_SERIALIZE_SQL","JSON_STRUCTURE","JSON_TRANSFORM","JSON_TRANSFORM_STRICT","JSON_TYPE","JSON_VALID","JULIAN","KAHAN_SUM","KURTOSIS","KURTOSIS_POP","LAST","LAST_DAY","LCASE","LCM","LEAST","LEAST_COMMON_MULTIPLE","LEFT","LEFT_GRAPHEME","LEN","LENGTH","LENGTH_GRAPHEME","LEVENSHTEIN","LGAMMA","LIKE_ESCAPE","LIST","LISTAGG","LIST_AGGR","LIST_AGGREGATE","LIST_ANY_VALUE","LIST_APPEND","LIST_APPLY","LIST_APPROX_COUNT_DISTINCT","LIST_AVG","LIST_BIT_AND","LIST_BIT_OR","LIST_BIT_XOR","LIST_BOOL_AND","LIST_BOOL_OR","LIST_CAT","LIST_CONCAT","LIST_CONTAINS","LIST_COSINE_SIMILARITY","LIST_COUNT","LIST_DISTANCE","LIST_DISTINCT","LIST_DOT_PRODUCT","LIST_ELEMENT","LIST_ENTROPY","LIST_EXTRACT","LIST_FILTER","LIST_FIRST","LIST_GRADE_UP","LIST_HAS","LIST_HAS_ALL","LIST_HAS_ANY","LIST_HISTOGRAM","LIST_INDEXOF","LIST_INNER_PRODUCT","LIST_INTERSECT","LIST_KURTOSIS","LIST_KURTOSIS_POP","LIST_LAST","LIST_MAD","LIST_MAX","LIST_MEDIAN","LIST_MIN","LIST_MODE","LIST_PACK","LIST_POSITION","LIST_PREPEND","LIST_PRODUCT","LIST_REDUCE","LIST_RESIZE","LIST_REVERSE","LIST_REVERSE_SORT","LIST_SELECT","LIST_SEM","LIST_SKEWNESS","LIST_SLICE","LIST_SORT","LIST_STDDEV_POP","LIST_STDDEV_SAMP","LIST_STRING_AGG","LIST_SUM","LIST_TRANSFORM","LIST_UNIQUE","LIST_VALUE","LIST_VAR_POP","LIST_VAR_SAMP","LIST_WHERE","LIST_ZIP","LN","LOG","LOG10","LOG2","LOWER","LPAD","LSMODE","LTRIM","MAD","MAKE_DATE","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","MAP","MAP_CONCAT","MAP_ENTRIES","MAP_EXTRACT","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","MAX","MAX_BY","MD5","MD5_NUMBER","MD5_NUMBER_LOWER","MD5_NUMBER_UPPER","MEAN","MEDIAN","METADATA_INFO","MICROSECOND","MILLENNIUM","MILLISECOND","MIN","MINUTE","MIN_BY","MISMATCHES","MOD","MODE","MONTH","MONTHNAME","MULTIPLY","NEXTAFTER","NEXTVAL","NFC_NORMALIZE","NOT_ILIKE_ESCAPE","NOT_LIKE_ESCAPE","NOW","NULLIF","OBJ_DESCRIPTION","OCTET_LENGTH","ORD","PARQUET_FILE_METADATA","PARQUET_KV_METADATA","PARQUET_METADATA","PARQUET_SCAN","PARQUET_SCHEMA","PARSE_DIRNAME","PARSE_DIRPATH","PARSE_FILENAME","PARSE_PATH","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONVERSION_IS_VISIBLE","PG_FUNCTION_IS_VISIBLE","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IS_OTHER_TEMP_SCHEMA","PG_MY_TEMP_SCHEMA","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_POSTMASTER_START_TIME","PG_SIZE_PRETTY","PG_TABLE_IS_VISIBLE","PG_TIMEZONE_NAMES","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PI","PLATFORM","POSITION","POW","POWER","PRAGMA_COLLATIONS","PRAGMA_DATABASE_SIZE","PRAGMA_METADATA_INFO","PRAGMA_PLATFORM","PRAGMA_SHOW","PRAGMA_STORAGE_INFO","PRAGMA_TABLE_INFO","PRAGMA_USER_AGENT","PRAGMA_VERSION","PREFIX","PRINTF","PRODUCT","QUANTILE","QUANTILE_CONT","QUANTILE_DISC","QUARTER","RADIANS","RANDOM","RANGE","READFILE","READ_BLOB","READ_CSV","READ_CSV_AUTO","READ_JSON","READ_JSON_AUTO","READ_JSON_OBJECTS","READ_JSON_OBJECTS_AUTO","READ_NDJSON","READ_NDJSON_AUTO","READ_NDJSON_OBJECTS","READ_PARQUET","READ_TEXT","REDUCE","REGEXP_ESCAPE","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_FULL_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REPEAT","REPEAT_ROW","REPLACE","RESERVOIR_QUANTILE","REVERSE","RIGHT","RIGHT_GRAPHEME","ROUND","ROUNDBANKERS","ROUND_EVEN","ROW","ROW_TO_JSON","RPAD","RTRIM","SECOND","SEM","SEQ_SCAN","SESSION_USER","SETSEED","SET_BIT","SHA256","SHA3","SHELL_ADD_SCHEMA","SHELL_ESCAPE_CRNL","SHELL_IDQUOTE","SHELL_MODULE_SCHEMA","SHELL_PUTSNL","SHOBJ_DESCRIPTION","SHOW","SHOW_DATABASES","SHOW_TABLES","SHOW_TABLES_EXPANDED","SIGN","SIGNBIT","SIN","SKEWNESS","SNIFF_CSV","SPLIT","SPLIT_PART","SQL_AUTO_COMPLETE","SQRT","STARTS_WITH","STATS","STDDEV","STDDEV_POP","STDDEV_SAMP","STORAGE_INFO","STRFTIME","STRING_AGG","STRING_SPLIT","STRING_SPLIT_REGEX","STRING_TO_ARRAY","STRIP_ACCENTS","STRLEN","STRPOS","STRPTIME","STRUCT_EXTRACT","STRUCT_INSERT","STRUCT_PACK","STR_SPLIT","STR_SPLIT_REGEX","SUBSTR","SUBSTRING","SUBSTRING_GRAPHEME","SUBTRACT","SUFFIX","SUM","SUMKAHAN","SUMMARY","SUM_NO_OVERFLOW","TABLE_INFO","TAN","TEST_ALL_TYPES","TEST_VECTOR_TYPES","TIMEZONE","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIME_BUCKET","TODAY","TO_BASE","TO_BASE64","TO_BINARY","TO_CENTURIES","TO_DAYS","TO_DECADES","TO_HEX","TO_HOURS","TO_JSON","TO_MICROSECONDS","TO_MILLENNIA","TO_MILLISECONDS","TO_MINUTES","TO_MONTHS","TO_SECONDS","TO_TIMESTAMP","TO_WEEKS","TO_YEARS","TRANSACTION_TIMESTAMP","TRANSLATE","TRIM","TRUNC","TRY_STRPTIME","TXID_CURRENT","TYPEOF","UCASE","UNBIN","UNHEX","UNICODE","UNION_EXTRACT","UNION_TAG","UNION_VALUE","UNNEST","UNPIVOT_LIST","UPPER","USER","USER_AGENT","UUID","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_TYPE","VERIFY_EXTERNAL","VERIFY_FETCH_ROW","VERIFY_PARALLELISM","VERIFY_SERIALIZER","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","WHICH_SECRET","WRITEFILE","XOR","YEAR","YEARWEEK","CAST","COALESCE","RANK","ROW_NUMBER"],Sre=["ALL","ANALYSE","ANALYZE","AND","ANY","AS","ASC","ATTACH","ASYMMETRIC","BOTH","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","DEFAULT","DEFERRABLE","DESC","DESCRIBE","DETACH","DISTINCT","DO","ELSE","END","EXCEPT","FALSE","FETCH","FOR","FOREIGN","FROM","GRANT","GROUP","HAVING","IN","INITIALLY","INTERSECT","INTO","IS","LATERAL","LEADING","LIMIT","NOT","NULL","OFFSET","ON","ONLY","OR","ORDER","PIVOT","PIVOT_LONGER","PIVOT_WIDER","PLACING","PRIMARY","REFERENCES","RETURNING","SELECT","SHOW","SOME","SUMMARIZE","SYMMETRIC","TABLE","THEN","TO","TRAILING","TRUE","UNION","UNIQUE","UNPIVOT","USING","VARIADIC","WHEN","WHERE","WINDOW","WITH"],mre=["ARRAY","BIGINT","BINARY","BIT","BITSTRING","BLOB","BOOL","BOOLEAN","BPCHAR","BYTEA","CHAR","DATE","DATETIME","DEC","DECIMAL","DOUBLE","ENUM","FLOAT","FLOAT4","FLOAT8","GUID","HUGEINT","INET","INT","INT1","INT128","INT16","INT2","INT32","INT4","INT64","INT8","INTEGER","INTEGRAL","INTERVAL","JSON","LIST","LOGICAL","LONG","MAP","NUMERIC","NVARCHAR","OID","REAL","ROW","SHORT","SIGNED","SMALLINT","STRING","STRUCT","TEXT","TIME","TIMESTAMP_MS","TIMESTAMP_NS","TIMESTAMP_S","TIMESTAMP_US","TIMESTAMP","TIMESTAMPTZ","TIMETZ","TINYINT","UBIGINT","UHUGEINT","UINT128","UINT16","UINT32","UINT64","UINT8","UINTEGER","UNION","USMALLINT","UTINYINT","UUID","VARBINARY","VARCHAR"],Are=Se(["SELECT [ALL | DISTINCT]"]),gre=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL]","HAVING","WINDOW","PARTITION BY","ORDER BY [ALL]","LIMIT","OFFSET","USING SAMPLE","QUALIFY","INSERT [OR REPLACE] INTO","VALUES","DEFAULT VALUES","SET","RETURNING"]),RM=Se(["CREATE [OR REPLACE] [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),VO=Se(["UPDATE","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","TRUNCATE","ALTER TABLE","ADD [COLUMN] [IF NOT EXISTS]","ADD PRIMARY KEY","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","RENAME [COLUMN]","RENAME TO","SET [DATA] TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","CREATE [OR REPLACE] [TEMPORARY | TEMP] {MACRO | FUNCTION}","DROP MACRO [TABLE] [IF EXISTS]","DROP FUNCTION [IF EXISTS]","CREATE [UNIQUE] INDEX [IF NOT EXISTS]","DROP INDEX [IF EXISTS]","CREATE [OR REPLACE] SCHEMA [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","CREATE [OR REPLACE] [PERSISTENT | TEMPORARY] SECRET [IF NOT EXISTS]","DROP [PERSISTENT | TEMPORARY] SECRET [IF EXISTS]","CREATE [OR REPLACE] [TEMPORARY | TEMP] SEQUENCE","DROP SEQUENCE [IF EXISTS]","CREATE [OR REPLACE] [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","DROP VIEW [IF EXISTS]","ALTER VIEW","CREATE TYPE","DROP TYPE [IF EXISTS]","ANALYZE","ATTACH [DATABASE] [IF NOT EXISTS]","DETACH [DATABASE] [IF EXISTS]","CALL","[FORCE] CHECKPOINT","COMMENT ON [TABLE | COLUMN | VIEW | INDEX | SEQUENCE | TYPE | MACRO | MACRO TABLE]","COPY [FROM DATABASE]","DESCRIBE","EXPORT DATABASE","IMPORT DATABASE","INSTALL","LOAD","PIVOT","PIVOT_WIDER","UNPIVOT","EXPLAIN [ANALYZE]","SET {LOCAL | SESSION | GLOBAL}","RESET [LOCAL | SESSION | GLOBAL]","{SET | RESET} VARIABLE","SUMMARIZE","BEGIN TRANSACTION","ROLLBACK","COMMIT","ABORT","USE","VACUUM [ANALYZE]","PREPARE","EXECUTE","DEALLOCATE [PREPARE]"]),Ore=Se(["UNION [ALL | BY NAME]","EXCEPT [ALL]","INTERSECT [ALL]"]),Ire=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{NATURAL | ASOF} [INNER] JOIN","{NATURAL | ASOF} {LEFT | RIGHT | FULL} [OUTER] JOIN","POSITIONAL JOIN","ANTI JOIN","SEMI JOIN"]),Nre=Se(["{ROWS | RANGE | GROUPS} BETWEEN","SIMILAR TO","IS [NOT] DISTINCT FROM"]),Cre=Se(["TIMESTAMP WITH TIME ZONE"]),_re={name:"duckdb",tokenizerOptions:{reservedSelect:Are,reservedClauses:[...gre,...RM,...VO],reservedSetOperations:Ore,reservedJoins:Ire,reservedKeywordPhrases:Nre,reservedDataTypePhrases:Cre,supportsXor:!0,reservedKeywords:Sre,reservedDataTypes:mre,reservedFunctionNames:Rre,nestedBlockComments:!0,extraParens:["[]","{}"],underscoresInNumbers:!0,stringTypes:["$$","''-qq",{quote:"''-qq-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{rest:"$"},paramTypes:{positional:!0,numbered:["$"],quoted:["$"]},operators:["//","%","**","^","!","&","|","~","<<",">>","::","==","->","->>",":",":=","=>","~~","!~~","~~*","!~~*","~~~","~","!~","~*","!~*","^@","||",">>=","<<="]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...RM,...VO],tabularOnelineClauses:VO}},Lre=["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET","ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY","BINARY","CAST","ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR","ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL","ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER","MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N","AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION","AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK","LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],yre=["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE","ALL","ALTER","AND","AS","AUTHORIZATION","BETWEEN","BOTH","BY","CASE","CAST","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DELETE","DESCRIBE","DISTINCT","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INTERSECT","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","TABLE","TABLESAMPLE","THEN","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","VIEWS","TIME","SYNC","TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"],bre=["ARRAY","BIGINT","BINARY","BOOLEAN","CHAR","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MAP","NUMERIC","PRECISION","SMALLINT","STRUCT","TIMESTAMP","VARCHAR"],Pre=Se(["SELECT [ALL | DISTINCT]"]),Dre=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE"]),SM=Se(["CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),kO=Se(["CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),vre=Se(["UNION [ALL | DISTINCT]"]),Mre=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),xre=Se(["{ROWS | RANGE} BETWEEN"]),Ure=Se([]),wre={name:"hive",tokenizerOptions:{reservedSelect:Pre,reservedClauses:[...Dre,...SM,...kO],reservedSetOperations:vre,reservedJoins:Mre,reservedKeywordPhrases:xre,reservedDataTypePhrases:Ure,reservedKeywords:yre,reservedDataTypes:bre,reservedFunctionNames:Lre,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:[...SM,...kO],tabularOnelineClauses:kO}};function rm(e){return e.map((t,n)=>{const r=e[n+1]||fl;if(dl.SET(t)&&r.text==="(")return Object.assign(Object.assign({},t),{type:be.RESERVED_FUNCTION_NAME});const s=e[n-1]||fl;return dl.VALUES(t)&&s.text==="="?Object.assign(Object.assign({},t),{type:be.RESERVED_FUNCTION_NAME}):t})}const Gre=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OFFSET","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROW_NUMBER","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],Bre=["BIGINT","BINARY","BIT","BLOB","CHAR BYTE","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],Fre=["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF"],Hre=Se(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),Vre=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET","RETURNING"]),mM=Se(["CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]"]),YO=Se(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),kre=Se(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),Yre=Se(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),Wre=Se(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),jre=Se([]),Xre={name:"mariadb",tokenizerOptions:{reservedSelect:Hre,reservedClauses:[...Vre,...mM,...YO],reservedSetOperations:kre,reservedJoins:Yre,reservedKeywordPhrases:Wre,reservedDataTypePhrases:jre,supportsXor:!0,reservedKeywords:Gre,reservedDataTypes:Bre,reservedFunctionNames:Fre,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!","*.*"],postProcess:rm},formatOptions:{onelineClauses:[...mM,...YO],tabularOnelineClauses:YO}},$re=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CUBE","CUME_DIST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DENSE_RANK","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","EMPTY","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FIRST_VALUE","FOR","FORCE","FOREIGN","FROM","FULLTEXT","FUNCTION","GENERATED","GET","GRANT","GROUP","GROUPING","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","INTERSECT","INTERVAL","INTO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IS","ITERATE","JOIN","JSON_TABLE","KEY","KEYS","KILL","LAG","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOOP","LOW_PRIORITY","MASTER_BIND","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","OF","ON","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PERCENT_RANK","PRIMARY","PROCEDURE","PURGE","RANGE","RANK","READ","READS","READ_WRITE","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","REVOKE","RIGHT","RLIKE","ROW","ROWS","ROW_NUMBER","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STORED","STRAIGHT_JOIN","SYSTEM","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],Kre=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],zre=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK"],qre=Se(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),Jre=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET"]),AM=Se(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),WO=Se(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),Qre=Se(["UNION [ALL | DISTINCT]"]),Zre=Se(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),ese=Se(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),tse=Se([]),nse={name:"mysql",tokenizerOptions:{reservedSelect:qre,reservedClauses:[...Jre,...AM,...WO],reservedSetOperations:Qre,reservedJoins:Zre,reservedKeywordPhrases:ese,reservedDataTypePhrases:tse,supportsXor:!0,reservedKeywords:$re,reservedDataTypes:Kre,reservedFunctionNames:zre,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!","*.*"],postProcess:rm},formatOptions:{onelineClauses:[...AM,...WO],tabularOnelineClauses:WO}},rse=["ADD","ALL","ALTER","ANALYZE","AND","ARRAY","AS","ASC","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DOUBLE","DROP","DUAL","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERATED","GRANT","GROUP","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","ILIKE","IN","INDEX","INFILE","INNER","INOUT","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOW_PRIORITY","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OF","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PRIMARY","PROCEDURE","RANGE","READ","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","REVOKE","RIGHT","RLIKE","ROW","ROWS","SECOND_MICROSECOND","SELECT","SET","SHOW","SPATIAL","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_EXTENDED","STORED","STRAIGHT_JOIN","TABLE","TABLESAMPLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","TiDB_CURRENT_TSO","UNION","UNIQUE","UNLOCK","UNSIGNED","UNTIL","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],sse=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],ise=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","BITAND","BITNEG","BITOR","BITXOR","CASE","CAST","CEIL","CEILING","CHAR_FUNC","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_RESOURCE_GROUP","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT_FUNC","DEGREES","DENSE_RANK","DES_DECRYPT","DES_ENCRYPT","DIV","ELT","ENCODE","ENCRYPT","EQ","EXP","EXPORT_SET","EXTRACT","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_NANO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GE","GET_FORMAT","GET_LOCK","GETPARAM","GREATEST","GROUP_CONCAT","GROUPING","GT","HEX","HOUR","IF","IFNULL","ILIKE","INET6_ATON","INET6_NTOA","INET_ATON","INET_NTOA","INSERT_FUNC","INSTR","INTDIV","INTERVAL","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS_USED_LOCK","IS_UUID","ISFALSE","ISNULL","ISTRUE","JSON_ARRAY","JSON_ARRAYAGG","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MEMBEROF","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LASTVAL","LCASE","LE","LEAD","LEAST","LEFT","LEFTSHIFT","LENGTH","LIKE","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LT","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MAX","MD5","MICROSECOND","MID","MIN","MINUS","MINUTE","MOD","MONTH","MONTHNAME","MUL","NAME_CONST","NE","NEXTVAL","NOT","NOW","NTH_VALUE","NTILE","NULLEQ","OCT","OCTET_LENGTH","OLD_PASSWORD","ORD","PASSWORD_FUNC","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","PLUS","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RIGHTSHIFT","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SETVAL","SETVAR","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SM3","SPACE","SQRT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIDB_BOUNDED_STALENESS","TIDB_CURRENT_TSO","TIDB_DECODE_BINARY_PLAN","TIDB_DECODE_KEY","TIDB_DECODE_PLAN","TIDB_DECODE_SQL_DIGESTS","TIDB_ENCODE_SQL_DIGEST","TIDB_IS_DDL_OWNER","TIDB_PARSE_TSO","TIDB_PARSE_TSO_LOGICAL","TIDB_ROW_CHECKSUM","TIDB_SHARD","TIDB_VERSION","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRANSLATE","TRIM","TRUNCATE","UCASE","UNARYMINUS","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VAR_POP","VAR_SAMP","VARIANCE","VERSION","VITESS_HASH","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK"],ose=Se(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),ase=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","ON DUPLICATE KEY UPDATE","SET"]),gM=Se(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),jO=Se(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER INSTANCE","ALTER RESOURCE GROUP","ALTER SEQUENCE","ALTER USER","ALTER VIEW","ANALYZE TABLE","CHECK TABLE","CHECKSUM TABLE","COMMIT","CREATE DATABASE","CREATE INDEX","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SEQUENCE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP INDEX","DROP RESOURCE GROUP","DROP ROLE","DROP TABLESPACE","DROP USER","DROP VIEW","EXPLAIN","FLUSH","GRANT","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOCK INSTANCE FOR BACKUP","LOCK TABLES","OPTIMIZE TABLE","PREPARE","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE"]),lse=Se(["UNION [ALL | DISTINCT]"]),cse=Se(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),use=Se(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),Ese=Se([]),fse={name:"tidb",tokenizerOptions:{reservedSelect:ose,reservedClauses:[...ase,...gM,...jO],reservedSetOperations:lse,reservedJoins:cse,reservedKeywordPhrases:use,reservedDataTypePhrases:Ese,supportsXor:!0,reservedKeywords:rse,reservedDataTypes:sse,reservedFunctionNames:ise,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!","*.*"],postProcess:rm},formatOptions:{onelineClauses:[...gM,...jO],tabularOnelineClauses:jO}},dse=["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"],Tse=["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","ISOLATION","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"],hse=[],pse=Se(["SELECT [ALL | DISTINCT]"]),Rse=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),OM=Se(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),Sse=Se(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),mse=Se(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),Ase=Se(["{ROWS | RANGE | GROUPS} BETWEEN"]),gse=Se([]),Ose={name:"n1ql",tokenizerOptions:{reservedSelect:pse,reservedClauses:[...Rse,...OM],reservedSetOperations:Sse,reservedJoins:mse,reservedKeywordPhrases:Ase,reservedDataTypePhrases:gse,supportsXor:!0,reservedKeywords:Tse,reservedDataTypes:hse,reservedFunctionNames:dse,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:OM}},Ise=["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DAY","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],Nse=["ARRAY","BFILE_BASE","BINARY","BLOB_BASE","CHAR VARYING","CHAR_BASE","CHAR","CHARACTER VARYING","CHARACTER","CLOB_BASE","DATE_BASE","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTERVAL DAY","INTERVAL YEAR","LONG","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR VARYING","NCHAR","NCHAR","NUMBER_BASE","NUMBER","NUMBERIC","NVARCHAR","PRECISION","RAW","TIMESTAMP","UROWID","VARCHAR","VARCHAR2"],Cse=["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET","CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR","ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET","GREATEST","LEAST","ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR","BFILENAME","EMPTY_BLOB,","EMPTY_CLOB","CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET","SYS_CONNECT_BY_PATH","CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET","APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM","DECODE","DUMP","ORA_HASH","VSIZE","COALESCE","LNNVL","NULLIF","NVL","NVL2","SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV","AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER","DEREF","MAKE_REF","REF","REFTOHEX","VALUE","CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],_se=Se(["SELECT [ALL | DISTINCT | UNIQUE]"]),Lse=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","RETURNING"]),IM=Se(["CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE"]),XO=Se(["CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),yse=Se(["UNION [ALL]","MINUS","INTERSECT"]),bse=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),Pse=Se(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),Dse=Se([]),vse={name:"plsql",tokenizerOptions:{reservedSelect:_se,reservedClauses:[...Lse,...IM,...XO],reservedSetOperations:yse,reservedJoins:bse,reservedKeywordPhrases:Pse,reservedDataTypePhrases:Dse,supportsXor:!0,reservedKeywords:Ise,reservedDataTypes:Nse,reservedFunctionNames:Cse,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:Mse},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:[...IM,...XO],tabularOnelineClauses:XO}};function Mse(e){let t=fl;return e.map(n=>dl.SET(n)&&dl.BY(t)?Object.assign(Object.assign({},n),{type:be.RESERVED_KEYWORD}):(pH(n.type)&&(t=n),n))}const xse=["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET","ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER","BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM","BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP","CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP","ENUM_FIRST","ENUM_LAST","ENUM_RANGE","AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH","ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TRUNC","ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY","GEN_RANDOM_UUID","UUIDV4","UUIDV7","UUID_EXTRACT_TIMESTAMP","UUID_EXTRACT_VERSION","CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS","ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP","CURRVAL","LASTVAL","NEXTVAL","SETVAL","COALESCE","GREATEST","LEAST","NULLIF","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST","ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF","ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","GENERATE_SERIES","GENERATE_SUBSCRIPTS","ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION","BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG","SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN","PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS","PG_MCV_LIST_ITEMS","CAST"],Use=["ALL","ANALYSE","ANALYZE","AND","ANY","AS","ASC","ASYMMETRIC","AUTHORIZATION","BETWEEN","BINARY","BOTH","CASE","CAST","CHECK","COLLATE","COLLATION","COLUMN","CONCURRENTLY","CONSTRAINT","CREATE","CROSS","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DAY","DEFAULT","DEFERRABLE","DESC","DISTINCT","DO","ELSE","END","EXCEPT","EXISTS","FALSE","FETCH","FILTER","FOR","FOREIGN","FREEZE","FROM","FULL","GRANT","GROUP","HAVING","HOUR","ILIKE","IN","INITIALLY","INNER","INOUT","INTERSECT","INTO","IS","ISNULL","JOIN","LATERAL","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","MINUTE","MONTH","NATURAL","NOT","NOTNULL","NULL","NULLIF","OFFSET","ON","ONLY","OR","ORDER","OUT","OUTER","OVER","OVERLAPS","PLACING","PRIMARY","REFERENCES","RETURNING","RIGHT","ROW","SECOND","SELECT","SESSION_USER","SIMILAR","SOME","SYMMETRIC","TABLE","TABLESAMPLE","THEN","TO","TRAILING","TRUE","UNION","UNIQUE","USER","USING","VALUES","VARIADIC","VERBOSE","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","YEAR"],wse=["ARRAY","BIGINT","BIT","BIT VARYING","BOOL","BOOLEAN","CHAR","CHARACTER","CHARACTER VARYING","DECIMAL","DEC","DOUBLE","ENUM","FLOAT","INT","INTEGER","INTERVAL","NCHAR","NUMERIC","JSON","JSONB","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TIMESTAMPTZ","UUID","VARCHAR","XML","ZONE"],Gse=Se(["SELECT [ALL | DISTINCT]"]),Bse=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","DEFAULT VALUES","SET","RETURNING"]),NM=Se(["CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]"]),$O=Se(["CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","SET DATA TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMENT ON","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE [OR REPLACE] AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE [DEFAULT] CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE [OR REPLACE] FUNCTION","CREATE GROUP","CREATE [UNIQUE] INDEX","CREATE [OR REPLACE] [TRUSTED] [PROCEDURAL] LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE [OR REPLACE] PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE [OR REPLACE] RULE","CREATE SCHEMA [AUTHORIZATION]","CREATE [TEMPORARY | TEMP | UNLOGGED] SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE [OR REPLACE] TRANSFORM","CREATE [OR REPLACE] [CONSTRAINT] TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP IDENTITY","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW [IF EXISTS]","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","OVERRIDING SYSTEM VALUE","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET [ALL|ROLE|SESSION AUTHORIZATION]","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),Fse=Se(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Hse=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Vse=Se(["PRIMARY KEY","GENERATED {ALWAYS | BY DEFAULT} AS IDENTITY","ON {UPDATE | DELETE} [NO ACTION | RESTRICT | CASCADE | SET NULL | SET DEFAULT]","DO {NOTHING | UPDATE}","AS MATERIALIZED","{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM","NULLS {FIRST | LAST}","WITH ORDINALITY"]),kse=Se(["[TIMESTAMP | TIME] {WITH | WITHOUT} TIME ZONE"]),Yse={name:"postgresql",tokenizerOptions:{reservedSelect:Gse,reservedClauses:[...Bse,...NM,...$O],reservedSetOperations:Fse,reservedJoins:Hse,reservedKeywordPhrases:Vse,reservedDataTypePhrases:kse,reservedKeywords:Use,reservedDataTypes:wse,reservedFunctionNames:xse,nestedBlockComments:!0,extraParens:["[]"],underscoresInNumbers:!0,stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-qq-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^",">^","?#","?-","?|","?-|","?||","@>","<@","<@>","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","^@","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","~>","#=","::",":","<#>","<=>","<+>","<~>","<%>","&&&","|=|"],operatorKeyword:!0},formatOptions:{alwaysDenseOperators:["::",":"],onelineClauses:[...NM,...$O],tabularOnelineClauses:$O}},Wse=["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP","array_concat","array_flatten","get_array_length","split_to_array","subarray","BIT_AND","BIT_OR","BOOL_AND","BOOL_OR","COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF","ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC","AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox","CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2","HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE","IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE","ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC","EXPLAIN_MODEL","ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER","decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof","AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP","CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT","CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG","CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],jse=["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC","ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN","BZIP2","GZIP","LZOP","ZSTD","MANIFEST","READRATIO","REGION","SSH","RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K","CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],Xse=["ARRAY","BIGINT","BPCHAR","CHAR","CHARACTER VARYING","CHARACTER","DECIMAL","INT","INT2","INT4","INT8","INTEGER","NCHAR","NUMERIC","NVARCHAR","SMALLINT","TEXT","VARBYTE","VARCHAR"],$se=Se(["SELECT [ALL | DISTINCT]"]),Kse=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET"]),CM=Se(["CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),KO=Se(["CREATE [OR REPLACE | MATERIALIZED] VIEW","UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),zse=Se(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),qse=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Jse=Se(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),Qse=Se([]),Zse={name:"redshift",tokenizerOptions:{reservedSelect:$se,reservedClauses:[...Kse,...CM,...KO],reservedSetOperations:zse,reservedJoins:qse,reservedKeywordPhrases:Jse,reservedDataTypePhrases:Qse,reservedKeywords:jse,reservedDataTypes:Xse,reservedFunctionNames:Wse,extraParens:["[]"],stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...CM,...KO],tabularOnelineClauses:KO}},eie=["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"],tie=["ARRAY","BIGINT","BINARY","BOOLEAN","BYTE","CHAR","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","LONG","MAP","NUMERIC","REAL","SHORT","SMALLINT","STRING","STRUCT","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TINYINT","VARCHAR"],nie=["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE","CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY","ELEMENT_AT","ELEMENT_AT","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP","ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR","FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON","ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIN","BIT_COUNT","BIT_GET","BIT_LENGTH","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DEGREES","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH","CAST","COALESCE","NULLIF"],rie=Se(["SELECT [ALL | DISTINCT]"]),sie=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE"]),_M=Se(["CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),zO=Se(["CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),iie=Se(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),oie=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),aie=Se(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),lie=Se([]),cie={name:"spark",tokenizerOptions:{reservedSelect:rie,reservedClauses:[...sie,..._M,...zO],reservedSetOperations:iie,reservedJoins:oie,reservedKeywordPhrases:aie,reservedDataTypePhrases:lie,supportsXor:!0,reservedKeywords:eie,reservedDataTypes:tie,reservedFunctionNames:nie,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],identChars:{allowFirstCharNumber:!0},variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:uie},formatOptions:{onelineClauses:[..._M,...zO],tabularOnelineClauses:zO}};function uie(e){return e.map((t,n)=>{const r=e[n-1]||fl,s=e[n+1]||fl;return dl.WINDOW(t)&&s.type===be.OPEN_PAREN?Object.assign(Object.assign({},t),{type:be.RESERVED_FUNCTION_NAME}):t.text==="ITEMS"&&t.type===be.RESERVED_KEYWORD&&!(r.text==="COLLECTION"&&s.text==="TERMINATED")?Object.assign(Object.assign({},t),{type:be.IDENTIFIER,text:t.raw}):t})}const Eie=["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB","AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL","DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME","row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value","ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC","JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE","CAST"],fie=["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ARE","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"],die=["ANY","ARRAY","BLOB","CHARACTER","DECIMAL","INT","INTEGER","NATIVE CHARACTER","NCHAR","NUMERIC","NVARCHAR","REAL","TEXT","VARCHAR","VARYING CHARACTER"],Tie=Se(["SELECT [ALL | DISTINCT]"]),hie=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET","RETURNING"]),LM=Se(["CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),qO=Se(["CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),pie=Se(["UNION [ALL]","EXCEPT","INTERSECT"]),Rie=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Sie=Se(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","DO UPDATE"]),mie=Se([]),Aie={name:"sqlite",tokenizerOptions:{reservedSelect:Tie,reservedClauses:[...hie,...LM,...qO],reservedSetOperations:pie,reservedJoins:Rie,reservedKeywordPhrases:Sie,reservedDataTypePhrases:mie,reservedKeywords:fie,reservedDataTypes:die,reservedFunctionNames:Eie,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:[...LM,...qO],tabularOnelineClauses:qO}},gie=["GROUPING","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER","POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET","SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE","CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP","COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC","CAST","COALESCE","NULLIF","ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],Oie=["ALL","ALLOCATE","ALTER","ANY","ARE","AS","ASC","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHECK","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DEALLOCATE","DAY","DECLARE","DEFAULT","DELETE","DEREF","DESC","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","NATURAL","NEW","NO","NONE","NOT","NULL","NULLIF","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"],Iie=["ARRAY","BIGINT","BINARY LARGE OBJECT","BINARY VARYING","BINARY","BLOB","BOOLEAN","CHAR LARGE OBJECT","CHAR VARYING","CHAR","CHARACTER LARGE OBJECT","CHARACTER VARYING","CHARACTER","CLOB","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MULTISET","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR LARGE OBJECT","NCHAR VARYING","NCHAR","NCLOB","NUMERIC","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],Nie=Se(["SELECT [ALL | DISTINCT]"]),Cie=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET"]),yM=Se(["CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),JO=Se(["CREATE [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),_ie=Se(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Lie=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),yie=Se(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),bie=Se([]),Pie={name:"sql",tokenizerOptions:{reservedSelect:Nie,reservedClauses:[...Cie,...yM,...JO],reservedSetOperations:_ie,reservedJoins:Lie,reservedKeywordPhrases:yie,reservedDataTypePhrases:bie,reservedKeywords:Oie,reservedDataTypes:Iie,reservedFunctionNames:gie,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:[...yM,...JO],tabularOnelineClauses:JO}},Die=["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH","CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"],vie=["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],Mie=["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"],xie=Se(["SELECT [ALL | DISTINCT]"]),Uie=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),bM=Se(["CREATE TABLE [IF NOT EXISTS]"]),QO=Se(["CREATE [OR REPLACE] [MATERIALIZED] VIEW","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),wie=Se(["UNION [ALL | DISTINCT] [CORRESPONDING]","EXCEPT [ALL | DISTINCT] [CORRESPONDING]","INTERSECT [ALL | DISTINCT] [CORRESPONDING]"]),Gie=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Bie=Se(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM","[TIMESTAMP | TIME] {WITH | WITHOUT} TIME ZONE"]),Fie=Se([]),Hie={name:"trino",tokenizerOptions:{reservedSelect:xie,reservedClauses:[...Uie,...bM,...QO],reservedSetOperations:wie,reservedJoins:Gie,reservedKeywordPhrases:Bie,reservedDataTypePhrases:Fie,reservedKeywords:vie,reservedDataTypes:Mie,reservedFunctionNames:Die,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:[...bM,...QO],tabularOnelineClauses:QO}},Vie=["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","OPENJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST","@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER","$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","COALESCE","NULLIF"],kie=["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT","$ACTION"],Yie=["BINARY","BIT","CHAR","CHAR","CHARACTER","DATE","DATETIME2","DATETIMEOFFSET","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","NATIONAL","NCHAR","NUMERIC","NVARCHAR","PRECISION","REAL","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],Wie=Se(["SELECT [ALL | DISTINCT]"]),jie=Se(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","FOR {BROWSE | XML | JSON}","OPTION","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET"]),PM=Se(["CREATE TABLE"]),ZO=Se(["CREATE [OR ALTER] [MATERIALIZED] VIEW","UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","CREATE [UNIQUE] [CLUSTERED] INDEX","CREATE DATABASE","ALTER DATABASE","DROP DATABASE [IF EXISTS]","CREATE [OR ALTER] [PARTITION] {FUNCTION | PROCEDURE | PROC}","ALTER [PARTITION] {FUNCTION | PROCEDURE | PROC}","DROP [PARTITION] {FUNCTION | PROCEDURE | PROC} [IF EXISTS]","GO","USE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION SCHEME","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),Xie=Se(["UNION [ALL]","EXCEPT","INTERSECT"]),$ie=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),Kie=Se(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),zie=Se([]),qie={name:"transactsql",tokenizerOptions:{reservedSelect:Wie,reservedClauses:[...jie,...PM,...ZO],reservedSetOperations:Xie,reservedJoins:$ie,reservedKeywordPhrases:Kie,reservedDataTypePhrases:zie,reservedKeywords:kie,reservedDataTypes:Yie,reservedFunctionNames:Vie,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]},"{}"],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::",":"],propertyAccessOperators:[".."]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...PM,...ZO],tabularOnelineClauses:ZO}},Jie=["ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","_BINARY","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","EXTRA_JOIN","FALSE","FETCH","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREIGN","FROM","FULL","FULLTEXT","GRANT","GROUP","HAVING","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","_INTERNAL_DYNAMIC_TYPECAST","INTERSECT","INTERVAL","INTO","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MATCH","MAXVALUE","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NO_QUERY_REWRITE","NOT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NULL","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","RETURN","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SEMI_JOIN","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNBOUNDED","UNDO","UNION","UNIQUE","UNLOCK","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WRITE","XOR","YEAR_MONTH","ZEROFILL"],Qie=["BIGINT","BINARY","BIT","BLOB","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","UNSIGNED","VARBINARY","VARCHAR","VARCHARACTER","YEAR"],Zie=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR"],eoe=Se(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),toe=Se(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","ON DUPLICATE KEY UPDATE","SET","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),DM=Se(["CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]"]),eI=Se(["CREATE VIEW","UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),noe=Se(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),roe=Se(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),soe=Se(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),ioe=Se([]),ooe={name:"singlestoredb",tokenizerOptions:{reservedSelect:eoe,reservedClauses:[...toe,...DM,...eI],reservedSetOperations:noe,reservedJoins:roe,reservedKeywordPhrases:soe,reservedDataTypePhrases:ioe,reservedKeywords:Jie,reservedDataTypes:Qie,reservedFunctionNames:Zie,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>","*.*"],postProcess:rm},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:[...DM,...eI],tabularOnelineClauses:eI}},aoe=["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FILTER","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GREATEST_IGNORE_NULLS","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IDENTIFIER","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"],loe=["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH","COMMENT"],coe=["NUMBER","DECIMAL","NUMERIC","INT","INTEGER","BIGINT","SMALLINT","TINYINT","BYTEINT","FLOAT","FLOAT4","FLOAT8","DOUBLE","DOUBLE PRECISION","REAL","VARCHAR","CHAR","CHARACTER","STRING","TEXT","BINARY","VARBINARY","BOOLEAN","DATE","DATETIME","TIME","TIMESTAMP","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TIMESTAMP_TZ","VARIANT","OBJECT","ARRAY","GEOGRAPHY","GEOMETRY"],uoe=Se(["SELECT [ALL | DISTINCT]"]),Eoe=Se(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),vM=Se(["CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]"]),tI=Se(["CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","SET DATA TYPE","UNSET COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),foe=Se(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),doe=Se(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),Toe=Se(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),hoe=Se([]),poe={name:"snowflake",tokenizerOptions:{reservedSelect:uoe,reservedClauses:[...Eoe,...vM,...tI],reservedSetOperations:foe,reservedJoins:doe,reservedKeywordPhrases:Toe,reservedDataTypePhrases:hoe,reservedKeywords:loe,reservedDataTypes:coe,reservedFunctionNames:aoe,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||","=>",":=","->"],propertyAccessOperators:[":"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...vM,...tI],tabularOnelineClauses:tI}},Roe=Object.freeze(Object.defineProperty({__proto__:null,bigquery:wne,clickhouse:zne,db2:ore,db2i:pre,duckdb:_re,hive:wre,mariadb:Xre,mysql:nse,n1ql:Ose,plsql:vse,postgresql:Yse,redshift:Zse,singlestoredb:ooe,snowflake:poe,spark:cie,sql:Pie,sqlite:Aie,tidb:fse,transactsql:qie,trino:Hie},Symbol.toStringTag,{value:"Module"})),gd=e=>e[e.length-1],RH=e=>e.sort((t,n)=>n.length-t.length||t.localeCompare(n)),ER=e=>e.replace(/\s+/gu," "),nI=e=>/\n/.test(e),_i=e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),MM=/\s+/uy,Yc=e=>new RegExp(`(?:${e})`,"uy"),Soe=e=>e.split("").map(t=>/ /gu.test(t)?"\\s+":`[${t.toUpperCase()}${t.toLowerCase()}]`).join(""),moe=e=>e+"(?:-"+e+")*",Aoe=({prefixes:e,requirePrefix:t})=>`(?:${e.map(Soe).join("|")}${t?"":"|"})`,goe=e=>new RegExp(`(?:${e.map(_i).join("|")}).*?(?=\r
253
+ |\r|
254
+ |$)`,"uy"),xM=(e,t=[])=>{const n=e==="open"?0:1,r=["()",...t].map(s=>s[n]);return Yc(r.map(_i).join("|"))},UM=e=>Yc(`${RH(e).map(_i).join("|")}`),Ooe=({rest:e,dashes:t})=>e||t?`(?![${e||""}${t?"-":""}])`:"",go=(e,t={})=>{if(e.length===0)return/^\b$/u;const n=Ooe(t),r=RH(e).map(_i).join("|").replace(/ /gu,"\\s+");return new RegExp(`(?:${r})${n}\\b`,"iuy")},rI=(e,t)=>{if(!e.length)return;const n=e.map(_i).join("|");return Yc(`(?:${n})(?:${t})`)},Ioe=()=>{const e={"<":">","[":"]","(":")","{":"}"},t="{left}(?:(?!{right}').)*?{right}",n=Object.entries(e).map(([l,c])=>t.replace(/{left}/g,_i(l)).replace(/{right}/g,_i(c))),r=_i(Object.keys(e).join(""));return`[Qq]'(?:${String.raw`(?<tag>[^\s${r}])(?:(?!\k<tag>').)*?\k<tag>`}|${n.join("|")})'`},wM={"``":"(?:`[^`]*`)+","[]":String.raw`(?:\[[^\]]*\])(?:\][^\]]*\])*`,'""-qq':String.raw`(?:"[^"]*")+`,'""-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")`,'""-qq-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")+`,'""-raw':String.raw`(?:"[^"]*")`,"''-qq":String.raw`(?:'[^']*')+`,"''-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')`,"''-qq-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')+`,"''-raw":String.raw`(?:'[^']*')`,$$:String.raw`(?<tag>\$\w*\$)[\s\S]*?\k<tag>`,"'''..'''":String.raw`'''[^\\]*?(?:\\.[^\\]*?)*?'''`,'""".."""':String.raw`"""[^\\]*?(?:\\.[^\\]*?)*?"""`,"{}":String.raw`(?:\{[^\}]*\})`,"q''":Ioe()},SH=e=>typeof e=="string"?wM[e]:"regex"in e?e.regex:Aoe(e)+wM[e.quote],Noe=e=>Yc(e.map(t=>"regex"in t?t.regex:SH(t)).join("|")),mH=e=>e.map(SH).join("|"),GM=e=>Yc(mH(e)),Coe=(e={})=>Yc(AH(e)),AH=({first:e,rest:t,dashes:n,allowFirstCharNumber:r}={})=>{const s="\\p{Alphabetic}\\p{Mark}_",o="\\p{Decimal_Number}",l=_i(e??""),c=_i(t??""),E=r?`[${s}${o}${l}][${s}${o}${c}]*`:`[${s}${l}][${s}${o}${c}]*`;return n?moe(E):E};function gH(e,t){const n=e.slice(0,t).split(/\n/);return{line:n.length,col:n[n.length-1].length+1}}class _oe{constructor(t,n){this.rules=t,this.dialectName=n,this.input="",this.index=0}tokenize(t){this.input=t,this.index=0;const n=[];let r;for(;this.index<this.input.length;){const s=this.getWhitespace();if(this.index<this.input.length){if(r=this.getNextToken(),!r)throw this.createParseError();n.push(Object.assign(Object.assign({},r),{precedingWhitespace:s}))}}return n}createParseError(){const t=this.input.slice(this.index,this.index+10),{line:n,col:r}=gH(this.input,this.index);return new Error(`Parse error: Unexpected "${t}" at line ${n} column ${r}.
255
+ ${this.dialectInfo()}`)}dialectInfo(){return this.dialectName==="sql"?`This likely happens because you're using the default "sql" dialect.
256
+ If possible, please select a more specific dialect (like sqlite, postgresql, etc).`:`SQL dialect used: "${this.dialectName}".`}getWhitespace(){MM.lastIndex=this.index;const t=MM.exec(this.input);if(t)return this.index+=t[0].length,t[0]}getNextToken(){for(const t of this.rules){const n=this.match(t);if(n)return n}}match(t){t.regex.lastIndex=this.index;const n=t.regex.exec(this.input);if(n){const r=n[0],s={type:t.type,raw:r,text:t.text?t.text(r):r,start:this.index};return t.key&&(s.key=t.key(r)),this.index+=r.length,s}}}const BM=/\/\*/uy,Loe=/[\s\S]/uy,yoe=/\*\//uy;class boe{constructor(){this.lastIndex=0}exec(t){let n="",r,s=0;if(r=this.matchSection(BM,t))n+=r,s++;else return null;for(;s>0;)if(r=this.matchSection(BM,t))n+=r,s++;else if(r=this.matchSection(yoe,t))n+=r,s--;else if(r=this.matchSection(Loe,t))n+=r;else return null;return[n]}matchSection(t,n){t.lastIndex=this.lastIndex;const r=t.exec(n);return r&&(this.lastIndex+=r[0].length),r?r[0]:null}}class Poe{constructor(t,n){this.cfg=t,this.dialectName=n,this.rulesBeforeParams=this.buildRulesBeforeParams(t),this.rulesAfterParams=this.buildRulesAfterParams(t)}tokenize(t,n){const r=[...this.rulesBeforeParams,...this.buildParamRules(this.cfg,n),...this.rulesAfterParams],s=new _oe(r,this.dialectName).tokenize(t);return this.cfg.postProcess?this.cfg.postProcess(s):s}buildRulesBeforeParams(t){var n,r,s;return this.validRules([{type:be.DISABLE_COMMENT,regex:/(\/\* *sql-formatter-disable *\*\/[\s\S]*?(?:\/\* *sql-formatter-enable *\*\/|$))/uy},{type:be.BLOCK_COMMENT,regex:t.nestedBlockComments?new boe:/(\/\*[^]*?\*\/)/uy},{type:be.LINE_COMMENT,regex:goe((n=t.lineCommentTypes)!==null&&n!==void 0?n:["--"])},{type:be.QUOTED_IDENTIFIER,regex:GM(t.identTypes)},{type:be.NUMBER,regex:t.underscoresInNumbers?/(?:0x[0-9a-fA-F_]+|0b[01_]+|(?:-\s*)?(?:[0-9_]*\.[0-9_]+|[0-9_]+(?:\.[0-9_]*)?)(?:[eE][-+]?[0-9_]+(?:\.[0-9_]+)?)?)(?![\w\p{Alphabetic}])/uy:/(?:0x[0-9a-fA-F]+|0b[01]+|(?:-\s*)?(?:[0-9]*\.[0-9]+|[0-9]+(?:\.[0-9]*)?)(?:[eE][-+]?[0-9]+(?:\.[0-9]+)?)?)(?![\w\p{Alphabetic}])/uy},{type:be.RESERVED_KEYWORD_PHRASE,regex:go((r=t.reservedKeywordPhrases)!==null&&r!==void 0?r:[],t.identChars),text:sr},{type:be.RESERVED_DATA_TYPE_PHRASE,regex:go((s=t.reservedDataTypePhrases)!==null&&s!==void 0?s:[],t.identChars),text:sr},{type:be.CASE,regex:/CASE\b/iuy,text:sr},{type:be.END,regex:/END\b/iuy,text:sr},{type:be.BETWEEN,regex:/BETWEEN\b/iuy,text:sr},{type:be.LIMIT,regex:t.reservedClauses.includes("LIMIT")?/LIMIT\b/iuy:void 0,text:sr},{type:be.RESERVED_CLAUSE,regex:go(t.reservedClauses,t.identChars),text:sr},{type:be.RESERVED_SELECT,regex:go(t.reservedSelect,t.identChars),text:sr},{type:be.RESERVED_SET_OPERATION,regex:go(t.reservedSetOperations,t.identChars),text:sr},{type:be.WHEN,regex:/WHEN\b/iuy,text:sr},{type:be.ELSE,regex:/ELSE\b/iuy,text:sr},{type:be.THEN,regex:/THEN\b/iuy,text:sr},{type:be.RESERVED_JOIN,regex:go(t.reservedJoins,t.identChars),text:sr},{type:be.AND,regex:/AND\b/iuy,text:sr},{type:be.OR,regex:/OR\b/iuy,text:sr},{type:be.XOR,regex:t.supportsXor?/XOR\b/iuy:void 0,text:sr},...t.operatorKeyword?[{type:be.OPERATOR,regex:/OPERATOR *\([^)]+\)/iuy}]:[],{type:be.RESERVED_FUNCTION_NAME,regex:go(t.reservedFunctionNames,t.identChars),text:sr},{type:be.RESERVED_DATA_TYPE,regex:go(t.reservedDataTypes,t.identChars),text:sr},{type:be.RESERVED_KEYWORD,regex:go(t.reservedKeywords,t.identChars),text:sr}])}buildRulesAfterParams(t){var n,r;return this.validRules([{type:be.VARIABLE,regex:t.variableTypes?Noe(t.variableTypes):void 0},{type:be.STRING,regex:GM(t.stringTypes)},{type:be.IDENTIFIER,regex:Coe(t.identChars)},{type:be.DELIMITER,regex:/[;]/uy},{type:be.COMMA,regex:/[,]/y},{type:be.OPEN_PAREN,regex:xM("open",t.extraParens)},{type:be.CLOSE_PAREN,regex:xM("close",t.extraParens)},{type:be.OPERATOR,regex:UM(["+","-","/",">","<","=","<>","<=",">=","!=",...(n=t.operators)!==null&&n!==void 0?n:[]])},{type:be.ASTERISK,regex:/[*]/uy},{type:be.PROPERTY_ACCESS_OPERATOR,regex:UM([".",...(r=t.propertyAccessOperators)!==null&&r!==void 0?r:[]])}])}buildParamRules(t,n){var r,s,o,l,c;const E={named:(n==null?void 0:n.named)||((r=t.paramTypes)===null||r===void 0?void 0:r.named)||[],quoted:(n==null?void 0:n.quoted)||((s=t.paramTypes)===null||s===void 0?void 0:s.quoted)||[],numbered:(n==null?void 0:n.numbered)||((o=t.paramTypes)===null||o===void 0?void 0:o.numbered)||[],positional:typeof(n==null?void 0:n.positional)=="boolean"?n.positional:(l=t.paramTypes)===null||l===void 0?void 0:l.positional,custom:(n==null?void 0:n.custom)||((c=t.paramTypes)===null||c===void 0?void 0:c.custom)||[]};return this.validRules([{type:be.NAMED_PARAMETER,regex:rI(E.named,AH(t.paramChars||t.identChars)),key:f=>f.slice(1)},{type:be.QUOTED_PARAMETER,regex:rI(E.quoted,mH(t.identTypes)),key:f=>(({tokenKey:h,quoteChar:d})=>h.replace(new RegExp(_i("\\"+d),"gu"),d))({tokenKey:f.slice(2,-1),quoteChar:f.slice(-1)})},{type:be.NUMBERED_PARAMETER,regex:rI(E.numbered,"[0-9]+"),key:f=>f.slice(1)},{type:be.POSITIONAL_PARAMETER,regex:E.positional?/[?]/y:void 0},...E.custom.map(f=>{var h;return{type:be.CUSTOM_PARAMETER,regex:Yc(f.regex),key:(h=f.key)!==null&&h!==void 0?h:(d=>d)}})])}validRules(t){return t.filter(n=>!!n.regex)}}const sr=e=>ER(e.toUpperCase()),FM=new Map,Doe=e=>{let t=FM.get(e);return t||(t=voe(e),FM.set(e,t)),t},voe=e=>({tokenizer:new Poe(e.tokenizerOptions,e.name),formatOptions:Moe(e.formatOptions)}),Moe=e=>{var t;return{alwaysDenseOperators:e.alwaysDenseOperators||[],onelineClauses:Object.fromEntries(e.onelineClauses.map(n=>[n,!0])),tabularOnelineClauses:Object.fromEntries(((t=e.tabularOnelineClauses)!==null&&t!==void 0?t:e.onelineClauses).map(n=>[n,!0]))}};function xoe(e){return e.indentStyle==="tabularLeft"||e.indentStyle==="tabularRight"?" ".repeat(10):e.useTabs?" ":" ".repeat(e.tabWidth)}function Uu(e){return e.indentStyle==="tabularLeft"||e.indentStyle==="tabularRight"}class Uoe{constructor(t){this.params=t,this.index=0}get({key:t,text:n}){return this.params?t?this.params[t]:this.params[this.index++]:n}getPositionalParameterIndex(){return this.index}setPositionalParameterIndex(t){this.index=t}}var fR={exports:{}},woe=fR.exports,HM;function Goe(){return HM||(HM=1,(function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(woe,function(){function t(f,h,d){return this.id=++t.highestId,this.name=f,this.symbols=h,this.postprocess=d,this}t.highestId=0,t.prototype.toString=function(f){var h=typeof f>"u"?this.symbols.map(E).join(" "):this.symbols.slice(0,f).map(E).join(" ")+" ● "+this.symbols.slice(f).map(E).join(" ");return this.name+" → "+h};function n(f,h,d,p){this.rule=f,this.dot=h,this.reference=d,this.data=[],this.wantedBy=p,this.isComplete=this.dot===f.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(f){var h=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return h.left=this,h.right=f,h.isComplete&&(h.data=h.build(),h.right=void 0),h},n.prototype.build=function(){var f=[],h=this;do f.push(h.right.data),h=h.left;while(h.left);return f.reverse(),f},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,l.fail))};function r(f,h){this.grammar=f,this.index=h,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(f){for(var h=this.states,d=this.wants,p=this.completed,S=0;S<h.length;S++){var R=h[S];if(R.isComplete){if(R.finish(),R.data!==l.fail){for(var m=R.wantedBy,g=m.length;g--;){var I=m[g];this.complete(I,R)}if(R.reference===this.index){var C=R.rule.name;(this.completed[C]=this.completed[C]||[]).push(R)}}}else{var C=R.rule.symbols[R.dot];if(typeof C!="string"){this.scannable.push(R);continue}if(d[C]){if(d[C].push(R),p.hasOwnProperty(C))for(var L=p[C],g=0;g<L.length;g++){var N=L[g];this.complete(R,N)}}else d[C]=[R],this.predict(C)}}},r.prototype.predict=function(f){for(var h=this.grammar.byName[f]||[],d=0;d<h.length;d++){var p=h[d],S=this.wants[f],R=new n(p,0,this.index,S);this.states.push(R)}},r.prototype.complete=function(f,h){var d=f.nextState(h);this.states.push(d)};function s(f,h){this.rules=f,this.start=h||this.rules[0].name;var d=this.byName={};this.rules.forEach(function(p){d.hasOwnProperty(p.name)||(d[p.name]=[]),d[p.name].push(p)})}s.fromCompiled=function(p,h){var d=p.Lexer;p.ParserStart&&(h=p.ParserStart,p=p.ParserRules);var p=p.map(function(R){return new t(R.name,R.symbols,R.postprocess)}),S=new s(p,h);return S.lexer=d,S};function o(){this.reset("")}o.prototype.reset=function(f,h){this.buffer=f,this.index=0,this.line=h?h.line:1,this.lastLineBreak=h?-h.col:0},o.prototype.next=function(){if(this.index<this.buffer.length){var f=this.buffer[this.index++];return f===`
257
+ `&&(this.line+=1,this.lastLineBreak=this.index),{value:f}}},o.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},o.prototype.formatError=function(f,h){var d=this.buffer;if(typeof d=="string"){var p=d.split(`
258
+ `).slice(Math.max(0,this.line-5),this.line),S=d.indexOf(`
259
+ `,this.index);S===-1&&(S=d.length);var R=this.index-this.lastLineBreak,m=String(this.line).length;return h+=" at line "+this.line+" col "+R+`:
260
+
261
+ `,h+=p.map(function(I,C){return g(this.line-p.length+C+1,m)+" "+I},this).join(`
262
+ `),h+=`
263
+ `+g("",m+R)+`^
264
+ `,h}else return h+" at index "+(this.index-1);function g(I,C){var L=String(I);return Array(C-L.length+1).join(" ")+L}};function l(f,h,d){if(f instanceof s)var p=f,d=h;else var p=s.fromCompiled(f,h);this.grammar=p,this.options={keepHistory:!1,lexer:p.lexer||new o};for(var S in d||{})this.options[S]=d[S];this.lexer=this.options.lexer,this.lexerState=void 0;var R=new r(p,0);this.table=[R],R.wants[p.start]=[],R.predict(p.start),R.process(),this.current=0}l.fail={},l.prototype.feed=function(f){var h=this.lexer;h.reset(f,this.lexerState);for(var d;;){try{if(d=h.next(),!d)break}catch(M){var m=new r(this.grammar,this.current+1);this.table.push(m);var p=new Error(this.reportLexerError(M));throw p.offset=this.current,p.token=M.token,p}var S=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var R=this.current+1,m=new r(this.grammar,R);this.table.push(m);for(var g=d.text!==void 0?d.text:d.value,I=h.constructor===o?d.value:d,C=S.scannable,L=C.length;L--;){var N=C[L],y=N.rule.symbols[N.dot];if(y.test?y.test(I):y.type?y.type===d.type:y.literal===g){var _=N.nextState({data:I,token:d,isToken:!0,reference:R-1});m.states.push(_)}}if(m.process(),m.states.length===0){var p=new Error(this.reportError(d));throw p.offset=this.current,p.token=d,p}this.options.keepHistory&&(S.lexerState=h.save()),this.current++}return S&&(this.lexerState=h.save()),this.results=this.finish(),this},l.prototype.reportLexerError=function(f){var h,d,p=f.token;return p?(h="input "+JSON.stringify(p.text[0])+" (lexer error)",d=this.lexer.formatError(p,"Syntax error")):(h="input (lexer error)",d=f.message),this.reportErrorCommon(d,h)},l.prototype.reportError=function(f){var h=(f.type?f.type+" token: ":"")+JSON.stringify(f.value!==void 0?f.value:f),d=this.lexer.formatError(f,"Syntax error");return this.reportErrorCommon(d,h)},l.prototype.reportErrorCommon=function(f,h){var d=[];d.push(f);var p=this.table.length-2,S=this.table[p],R=S.states.filter(function(g){var I=g.rule.symbols[g.dot];return I&&typeof I!="string"});if(R.length===0)d.push("Unexpected "+h+`. I did not expect any more input. Here is the state of my parse table:
265
+ `),this.displayStateStack(S.states,d);else{d.push("Unexpected "+h+`. Instead, I was expecting to see one of the following:
266
+ `);var m=R.map(function(g){return this.buildFirstStateStack(g,[])||[g]},this);m.forEach(function(g){var I=g[0],C=I.rule.symbols[I.dot],L=this.getSymbolDisplay(C);d.push("A "+L+" based on:"),this.displayStateStack(g,d)},this)}return d.push(""),d.join(`
267
+ `)},l.prototype.displayStateStack=function(f,h){for(var d,p=0,S=0;S<f.length;S++){var R=f[S],m=R.rule.toString(R.dot);m===d?p++:(p>0&&h.push(" ^ "+p+" more lines identical to this"),p=0,h.push(" "+m)),d=m}},l.prototype.getSymbolDisplay=function(f){return c(f)},l.prototype.buildFirstStateStack=function(f,h){if(h.indexOf(f)!==-1)return null;if(f.wantedBy.length===0)return[f];var d=f.wantedBy[0],p=[f].concat(h),S=this.buildFirstStateStack(d,p);return S===null?null:[f].concat(S)},l.prototype.save=function(){var f=this.table[this.current];return f.lexerState=this.lexerState,f},l.prototype.restore=function(f){var h=f.index;this.current=h,this.table[h]=f,this.table.splice(h+1),this.lexerState=f.lexerState,this.results=this.finish()},l.prototype.rewind=function(f){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[f])},l.prototype.finish=function(){var f=[],h=this.grammar.start,d=this.table[this.table.length-1];return d.states.forEach(function(p){p.rule.name===h&&p.dot===p.rule.symbols.length&&p.reference===0&&p.data!==l.fail&&f.push(p)}),f.map(function(p){return p.data})};function c(f){var h=typeof f;if(h==="string")return f;if(h==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return"character matching "+f;if(f.type)return f.type+" token";if(f.test)return"token matching "+String(f.test);throw new Error("Unknown symbol type: "+f)}}function E(f){var h=typeof f;if(h==="string")return f;if(h==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return f.toString();if(f.type)return"%"+f.type;if(f.test)return"<"+String(f.test)+">";throw new Error("Unknown symbol type: "+f)}}return{Parser:l,Grammar:s,Rule:t}})})(fR)),fR.exports}var Boe=Goe();const Foe=aC(Boe);function Hoe(e){return e.map(Voe).map(koe).map(Yoe).map(Woe).map(joe)}const Voe=(e,t,n)=>{if(pH(e.type)){const r=Xoe(n,t);if(r&&r.type===be.PROPERTY_ACCESS_OPERATOR)return Object.assign(Object.assign({},e),{type:be.IDENTIFIER,text:e.raw});const s=UE(n,t);if(s&&s.type===be.PROPERTY_ACCESS_OPERATOR)return Object.assign(Object.assign({},e),{type:be.IDENTIFIER,text:e.raw})}return e},koe=(e,t,n)=>{if(e.type===be.RESERVED_FUNCTION_NAME){const r=UE(n,t);if(!r||!OH(r))return Object.assign(Object.assign({},e),{type:be.IDENTIFIER,text:e.raw})}return e},Yoe=(e,t,n)=>{if(e.type===be.RESERVED_DATA_TYPE){const r=UE(n,t);if(r&&OH(r))return Object.assign(Object.assign({},e),{type:be.RESERVED_PARAMETERIZED_DATA_TYPE})}return e},Woe=(e,t,n)=>{if(e.type===be.IDENTIFIER){const r=UE(n,t);if(r&&IH(r))return Object.assign(Object.assign({},e),{type:be.ARRAY_IDENTIFIER})}return e},joe=(e,t,n)=>{if(e.type===be.RESERVED_DATA_TYPE){const r=UE(n,t);if(r&&IH(r))return Object.assign(Object.assign({},e),{type:be.ARRAY_KEYWORD})}return e},Xoe=(e,t)=>UE(e,t,-1),UE=(e,t,n=1)=>{let r=1;for(;e[t+r*n]&&$oe(e[t+r*n]);)r++;return e[t+r*n]},OH=e=>e.type===be.OPEN_PAREN&&e.text==="(",IH=e=>e.type===be.OPEN_PAREN&&e.text==="[",$oe=e=>e.type===be.BLOCK_COMMENT||e.type===be.LINE_COMMENT;class NH{constructor(t){this.tokenize=t,this.index=0,this.tokens=[],this.input=""}reset(t,n){this.input=t,this.index=0,this.tokens=this.tokenize(t)}next(){return this.tokens[this.index++]}save(){}formatError(t){const{line:n,col:r}=gH(this.input,t.start);return`Parse error at token: ${t.text} at line ${n} column ${r}`}has(t){return t in be}}var st;(function(e){e.statement="statement",e.clause="clause",e.set_operation="set_operation",e.function_call="function_call",e.parameterized_data_type="parameterized_data_type",e.array_subscript="array_subscript",e.property_access="property_access",e.parenthesis="parenthesis",e.between_predicate="between_predicate",e.case_expression="case_expression",e.case_when="case_when",e.case_else="case_else",e.limit_clause="limit_clause",e.all_columns_asterisk="all_columns_asterisk",e.literal="literal",e.identifier="identifier",e.keyword="keyword",e.data_type="data_type",e.parameter="parameter",e.operator="operator",e.comma="comma",e.line_comment="line_comment",e.block_comment="block_comment",e.disable_comment="disable_comment"})(st=st||(st={}));function sI(e){return e[0]}const Tt=new NH(e=>[]),zl=([[e]])=>e,dr=e=>({type:st.keyword,tokenType:e.type,text:e.text,raw:e.raw}),VM=e=>({type:st.data_type,text:e.text,raw:e.raw}),Tr=(e,{leading:t,trailing:n})=>(t!=null&&t.length&&(e=Object.assign(Object.assign({},e),{leadingComments:t})),n!=null&&n.length&&(e=Object.assign(Object.assign({},e),{trailingComments:n})),e),Koe=(e,{leading:t,trailing:n})=>{if(t!=null&&t.length){const[r,...s]=e;e=[Tr(r,{leading:t}),...s]}if(n!=null&&n.length){const r=e.slice(0,-1),s=e[e.length-1];e=[...r,Tr(s,{trailing:n})]}return e},zoe={Lexer:Tt,ParserRules:[{name:"main$ebnf$1",symbols:[]},{name:"main$ebnf$1",symbols:["main$ebnf$1","statement"],postprocess:e=>e[0].concat([e[1]])},{name:"main",symbols:["main$ebnf$1"],postprocess:([e])=>{const t=e[e.length-1];return t&&!t.hasSemicolon?t.children.length>0?e:e.slice(0,-1):e}},{name:"statement$subexpression$1",symbols:[Tt.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[Tt.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([e,[t]])=>({type:st.statement,children:e,hasSemicolon:t.type===be.DELIMITER})},{name:"expressions_or_clauses$ebnf$1",symbols:[]},{name:"expressions_or_clauses$ebnf$1",symbols:["expressions_or_clauses$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses$ebnf$2",symbols:[]},{name:"expressions_or_clauses$ebnf$2",symbols:["expressions_or_clauses$ebnf$2","clause"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses",symbols:["expressions_or_clauses$ebnf$1","expressions_or_clauses$ebnf$2"],postprocess:([e,t])=>[...e,...t]},{name:"clause$subexpression$1",symbols:["limit_clause"]},{name:"clause$subexpression$1",symbols:["select_clause"]},{name:"clause$subexpression$1",symbols:["other_clause"]},{name:"clause$subexpression$1",symbols:["set_operation"]},{name:"clause",symbols:["clause$subexpression$1"],postprocess:zl},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["free_form_sql"]},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"limit_clause$ebnf$1$subexpression$1",symbols:[Tt.has("COMMA")?{type:"COMMA"}:COMMA,"limit_clause$ebnf$1$subexpression$1$ebnf$1"]},{name:"limit_clause$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1"],postprocess:sI},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[Tt.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([e,t,n,r])=>{if(r){const[s,o]=r;return{type:st.limit_clause,limitKw:Tr(dr(e),{trailing:t}),offset:n,count:o}}else return{type:st.limit_clause,limitKw:Tr(dr(e),{trailing:t}),count:n}}},{name:"select_clause$subexpression$1$ebnf$1",symbols:[]},{name:"select_clause$subexpression$1$ebnf$1",symbols:["select_clause$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["all_columns_asterisk","select_clause$subexpression$1$ebnf$1"]},{name:"select_clause$subexpression$1$ebnf$2",symbols:[]},{name:"select_clause$subexpression$1$ebnf$2",symbols:["select_clause$subexpression$1$ebnf$2","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["asteriskless_free_form_sql","select_clause$subexpression$1$ebnf$2"]},{name:"select_clause",symbols:[Tt.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([e,[t,n]])=>({type:st.clause,nameKw:dr(e),children:[t,...n]})},{name:"select_clause",symbols:[Tt.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([e])=>({type:st.clause,nameKw:dr(e),children:[]})},{name:"all_columns_asterisk",symbols:[Tt.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:st.all_columns_asterisk})},{name:"other_clause$ebnf$1",symbols:[]},{name:"other_clause$ebnf$1",symbols:["other_clause$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"other_clause",symbols:[Tt.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([e,t])=>({type:st.clause,nameKw:dr(e),children:t})},{name:"set_operation$ebnf$1",symbols:[]},{name:"set_operation$ebnf$1",symbols:["set_operation$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"set_operation",symbols:[Tt.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([e,t])=>({type:st.set_operation,nameKw:dr(e),children:t})},{name:"expression_chain_$ebnf$1",symbols:["expression_with_comments_"]},{name:"expression_chain_$ebnf$1",symbols:["expression_chain_$ebnf$1","expression_with_comments_"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain_",symbols:["expression_chain_$ebnf$1"],postprocess:sI},{name:"expression_chain$ebnf$1",symbols:[]},{name:"expression_chain$ebnf$1",symbols:["expression_chain$ebnf$1","_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain",symbols:["expression","expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"andless_expression_chain$ebnf$1",symbols:[]},{name:"andless_expression_chain$ebnf$1",symbols:["andless_expression_chain$ebnf$1","_andless_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"andless_expression_chain",symbols:["andless_expression","andless_expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([e,t])=>Tr(e,{trailing:t})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([e,t])=>Tr(t,{leading:e})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([e,t])=>Tr(t,{leading:e})},{name:"free_form_sql$subexpression$1",symbols:["asteriskless_free_form_sql"]},{name:"free_form_sql$subexpression$1",symbols:["asterisk"]},{name:"free_form_sql",symbols:["free_form_sql$subexpression$1"],postprocess:zl},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["logic_operator"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comma"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comment"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["other_keyword"]},{name:"asteriskless_free_form_sql",symbols:["asteriskless_free_form_sql$subexpression$1"],postprocess:zl},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:zl},{name:"andless_expression$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"andless_expression$subexpression$1",symbols:["asterisk"]},{name:"andless_expression",symbols:["andless_expression$subexpression$1"],postprocess:zl},{name:"asteriskless_andless_expression$subexpression$1",symbols:["atomic_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:zl},{name:"atomic_expression$subexpression$1",symbols:["array_subscript"]},{name:"atomic_expression$subexpression$1",symbols:["function_call"]},{name:"atomic_expression$subexpression$1",symbols:["property_access"]},{name:"atomic_expression$subexpression$1",symbols:["parenthesis"]},{name:"atomic_expression$subexpression$1",symbols:["curly_braces"]},{name:"atomic_expression$subexpression$1",symbols:["square_brackets"]},{name:"atomic_expression$subexpression$1",symbols:["operator"]},{name:"atomic_expression$subexpression$1",symbols:["identifier"]},{name:"atomic_expression$subexpression$1",symbols:["parameter"]},{name:"atomic_expression$subexpression$1",symbols:["literal"]},{name:"atomic_expression$subexpression$1",symbols:["data_type"]},{name:"atomic_expression$subexpression$1",symbols:["keyword"]},{name:"atomic_expression",symbols:["atomic_expression$subexpression$1"],postprocess:zl},{name:"array_subscript",symbols:[Tt.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([e,t,n])=>({type:st.array_subscript,array:Tr({type:st.identifier,quoted:!1,text:e.text},{trailing:t}),parenthesis:n})},{name:"array_subscript",symbols:[Tt.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([e,t,n])=>({type:st.array_subscript,array:Tr(dr(e),{trailing:t}),parenthesis:n})},{name:"function_call",symbols:[Tt.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([e,t,n])=>({type:st.function_call,nameKw:Tr(dr(e),{trailing:t}),parenthesis:n})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([e,t,n])=>({type:st.parenthesis,children:t,openParen:"(",closeParen:")"})},{name:"curly_braces$ebnf$1",symbols:[]},{name:"curly_braces$ebnf$1",symbols:["curly_braces$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"curly_braces",symbols:[{literal:"{"},"curly_braces$ebnf$1",{literal:"}"}],postprocess:([e,t,n])=>({type:st.parenthesis,children:t,openParen:"{",closeParen:"}"})},{name:"square_brackets$ebnf$1",symbols:[]},{name:"square_brackets$ebnf$1",symbols:["square_brackets$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"square_brackets",symbols:[{literal:"["},"square_brackets$ebnf$1",{literal:"]"}],postprocess:([e,t,n])=>({type:st.parenthesis,children:t,openParen:"[",closeParen:"]"})},{name:"property_access$subexpression$1",symbols:["identifier"]},{name:"property_access$subexpression$1",symbols:["array_subscript"]},{name:"property_access$subexpression$1",symbols:["all_columns_asterisk"]},{name:"property_access$subexpression$1",symbols:["parameter"]},{name:"property_access",symbols:["atomic_expression","_",Tt.has("PROPERTY_ACCESS_OPERATOR")?{type:"PROPERTY_ACCESS_OPERATOR"}:PROPERTY_ACCESS_OPERATOR,"_","property_access$subexpression$1"],postprocess:([e,t,n,r,[s]])=>({type:st.property_access,object:Tr(e,{trailing:t}),operator:n.text,property:Tr(s,{leading:r})})},{name:"between_predicate",symbols:[Tt.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",Tt.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([e,t,n,r,s,o,l])=>({type:st.between_predicate,betweenKw:dr(e),expr1:Koe(n,{leading:t,trailing:r}),andKw:dr(s),expr2:[Tr(l,{leading:o})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:sI},{name:"case_expression$ebnf$1",symbols:[],postprocess:()=>null},{name:"case_expression$ebnf$2",symbols:[]},{name:"case_expression$ebnf$2",symbols:["case_expression$ebnf$2","case_clause"],postprocess:e=>e[0].concat([e[1]])},{name:"case_expression",symbols:[Tt.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",Tt.has("END")?{type:"END"}:END],postprocess:([e,t,n,r,s])=>({type:st.case_expression,caseKw:Tr(dr(e),{trailing:t}),endKw:dr(s),expr:n||[],clauses:r})},{name:"case_clause",symbols:[Tt.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",Tt.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([e,t,n,r,s,o])=>({type:st.case_when,whenKw:Tr(dr(e),{trailing:t}),thenKw:Tr(dr(r),{trailing:s}),condition:n,result:o})},{name:"case_clause",symbols:[Tt.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([e,t,n])=>({type:st.case_else,elseKw:Tr(dr(e),{trailing:t}),result:n})},{name:"comma$subexpression$1",symbols:[Tt.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[e]])=>({type:st.comma})},{name:"asterisk$subexpression$1",symbols:[Tt.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[e]])=>({type:st.operator,text:e.text})},{name:"operator$subexpression$1",symbols:[Tt.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[e]])=>({type:st.operator,text:e.text})},{name:"identifier$subexpression$1",symbols:[Tt.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Tt.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Tt.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[e]])=>({type:st.identifier,quoted:e.type!=="IDENTIFIER",text:e.text})},{name:"parameter$subexpression$1",symbols:[Tt.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Tt.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Tt.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Tt.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Tt.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[e]])=>({type:st.parameter,key:e.key,text:e.text})},{name:"literal$subexpression$1",symbols:[Tt.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[Tt.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[e]])=>({type:st.literal,text:e.text})},{name:"keyword$subexpression$1",symbols:[Tt.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[Tt.has("RESERVED_KEYWORD_PHRASE")?{type:"RESERVED_KEYWORD_PHRASE"}:RESERVED_KEYWORD_PHRASE]},{name:"keyword$subexpression$1",symbols:[Tt.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[e]])=>dr(e)},{name:"data_type$subexpression$1",symbols:[Tt.has("RESERVED_DATA_TYPE")?{type:"RESERVED_DATA_TYPE"}:RESERVED_DATA_TYPE]},{name:"data_type$subexpression$1",symbols:[Tt.has("RESERVED_DATA_TYPE_PHRASE")?{type:"RESERVED_DATA_TYPE_PHRASE"}:RESERVED_DATA_TYPE_PHRASE]},{name:"data_type",symbols:["data_type$subexpression$1"],postprocess:([[e]])=>VM(e)},{name:"data_type",symbols:[Tt.has("RESERVED_PARAMETERIZED_DATA_TYPE")?{type:"RESERVED_PARAMETERIZED_DATA_TYPE"}:RESERVED_PARAMETERIZED_DATA_TYPE,"_","parenthesis"],postprocess:([e,t,n])=>({type:st.parameterized_data_type,dataType:Tr(VM(e),{trailing:t}),parenthesis:n})},{name:"logic_operator$subexpression$1",symbols:[Tt.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[Tt.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[Tt.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[e]])=>dr(e)},{name:"other_keyword$subexpression$1",symbols:[Tt.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[Tt.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[Tt.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[Tt.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[e]])=>dr(e)},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","comment"],postprocess:e=>e[0].concat([e[1]])},{name:"_",symbols:["_$ebnf$1"],postprocess:([e])=>e},{name:"comment",symbols:[Tt.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([e])=>({type:st.line_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[Tt.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([e])=>({type:st.block_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[Tt.has("DISABLE_COMMENT")?{type:"DISABLE_COMMENT"}:DISABLE_COMMENT],postprocess:([e])=>({type:st.disable_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})}],ParserStart:"main"},{Parser:qoe,Grammar:Joe}=Foe;function Qoe(e){let t={};const n=new NH(s=>[...Hoe(e.tokenize(s,t)),hH(s.length)]),r=new qoe(Joe.fromCompiled(zoe),{lexer:n});return{parse:(s,o)=>{t=o;const{results:l}=r.feed(s);if(l.length===1)return l[0];throw l.length===0?new Error("Parse error: Invalid SQL"):new Error(`Parse error: Ambiguous grammar
268
+ ${JSON.stringify(l,void 0,2)}`)}}}var _e;(function(e){e[e.SPACE=0]="SPACE",e[e.NO_SPACE=1]="NO_SPACE",e[e.NO_NEWLINE=2]="NO_NEWLINE",e[e.NEWLINE=3]="NEWLINE",e[e.MANDATORY_NEWLINE=4]="MANDATORY_NEWLINE",e[e.INDENT=5]="INDENT",e[e.SINGLE_INDENT=6]="SINGLE_INDENT"})(_e=_e||(_e={}));class CH{constructor(t){this.indentation=t,this.items=[]}add(...t){for(const n of t)switch(n){case _e.SPACE:this.items.push(_e.SPACE);break;case _e.NO_SPACE:this.trimHorizontalWhitespace();break;case _e.NO_NEWLINE:this.trimWhitespace();break;case _e.NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(_e.NEWLINE);break;case _e.MANDATORY_NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(_e.MANDATORY_NEWLINE);break;case _e.INDENT:this.addIndentation();break;case _e.SINGLE_INDENT:this.items.push(_e.SINGLE_INDENT);break;default:this.items.push(n)}}trimHorizontalWhitespace(){for(;Zoe(gd(this.items));)this.items.pop()}trimWhitespace(){for(;eae(gd(this.items));)this.items.pop()}addNewline(t){if(this.items.length>0)switch(gd(this.items)){case _e.NEWLINE:this.items.pop(),this.items.push(t);break;case _e.MANDATORY_NEWLINE:break;default:this.items.push(t);break}}addIndentation(){for(let t=0;t<this.indentation.getLevel();t++)this.items.push(_e.SINGLE_INDENT)}toString(){return this.items.map(t=>this.itemToString(t)).join("")}getLayoutItems(){return this.items}itemToString(t){switch(t){case _e.SPACE:return" ";case _e.NEWLINE:case _e.MANDATORY_NEWLINE:return`
269
+ `;case _e.SINGLE_INDENT:return this.indentation.getSingleIndent();default:return t}}}const Zoe=e=>e===_e.SPACE||e===_e.SINGLE_INDENT,eae=e=>e===_e.SPACE||e===_e.SINGLE_INDENT||e===_e.NEWLINE;function kM(e,t){if(t==="standard")return e;let n=[];return e.length>=10&&e.includes(" ")&&([e,...n]=e.split(" ")),t==="tabularLeft"?e=e.padEnd(9," "):e=e.padStart(9," "),e+["",...n].join(" ")}function YM(e){return _ne(e)||e===be.RESERVED_CLAUSE||e===be.RESERVED_SELECT||e===be.RESERVED_SET_OPERATION||e===be.RESERVED_JOIN||e===be.LIMIT}const iI="top-level",tae="block-level";class _H{constructor(t){this.indent=t,this.indentTypes=[]}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(iI)}increaseBlockLevel(){this.indentTypes.push(tae)}decreaseTopLevel(){this.indentTypes.length>0&&gd(this.indentTypes)===iI&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===iI;);}}class nae extends CH{constructor(t){super(new _H("")),this.expressionWidth=t,this.length=0,this.trailingSpace=!1}add(...t){if(t.forEach(n=>this.addToLength(n)),this.length>this.expressionWidth)throw new rC;super.add(...t)}addToLength(t){if(typeof t=="string")this.length+=t.length,this.trailingSpace=!1;else{if(t===_e.MANDATORY_NEWLINE||t===_e.NEWLINE)throw new rC;t===_e.INDENT||t===_e.SINGLE_INDENT||t===_e.SPACE?this.trailingSpace||(this.length++,this.trailingSpace=!0):(t===_e.NO_NEWLINE||t===_e.NO_SPACE)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}}class rC extends Error{}class ES{constructor({cfg:t,dialectCfg:n,params:r,layout:s,inline:o=!1}){this.inline=!1,this.nodes=[],this.index=-1,this.cfg=t,this.dialectCfg=n,this.inline=o,this.params=r,this.layout=s}format(t){for(this.nodes=t,this.index=0;this.index<this.nodes.length;this.index++)this.formatNode(this.nodes[this.index]);return this.layout}formatNode(t){this.formatComments(t.leadingComments),this.formatNodeWithoutComments(t),this.formatComments(t.trailingComments)}formatNodeWithoutComments(t){switch(t.type){case st.function_call:return this.formatFunctionCall(t);case st.parameterized_data_type:return this.formatParameterizedDataType(t);case st.array_subscript:return this.formatArraySubscript(t);case st.property_access:return this.formatPropertyAccess(t);case st.parenthesis:return this.formatParenthesis(t);case st.between_predicate:return this.formatBetweenPredicate(t);case st.case_expression:return this.formatCaseExpression(t);case st.case_when:return this.formatCaseWhen(t);case st.case_else:return this.formatCaseElse(t);case st.clause:return this.formatClause(t);case st.set_operation:return this.formatSetOperation(t);case st.limit_clause:return this.formatLimitClause(t);case st.all_columns_asterisk:return this.formatAllColumnsAsterisk(t);case st.literal:return this.formatLiteral(t);case st.identifier:return this.formatIdentifier(t);case st.parameter:return this.formatParameter(t);case st.operator:return this.formatOperator(t);case st.comma:return this.formatComma(t);case st.line_comment:return this.formatLineComment(t);case st.block_comment:return this.formatBlockComment(t);case st.disable_comment:return this.formatBlockComment(t);case st.data_type:return this.formatDataType(t);case st.keyword:return this.formatKeywordNode(t)}}formatFunctionCall(t){this.withComments(t.nameKw,()=>{this.layout.add(this.showFunctionKw(t.nameKw))}),this.formatNode(t.parenthesis)}formatParameterizedDataType(t){this.withComments(t.dataType,()=>{this.layout.add(this.showDataType(t.dataType))}),this.formatNode(t.parenthesis)}formatArraySubscript(t){let n;switch(t.array.type){case st.data_type:n=this.showDataType(t.array);break;case st.keyword:n=this.showKw(t.array);break;default:n=this.showIdentifier(t.array);break}this.withComments(t.array,()=>{this.layout.add(n)}),this.formatNode(t.parenthesis)}formatPropertyAccess(t){this.formatNode(t.object),this.layout.add(_e.NO_SPACE,t.operator),this.formatNode(t.property)}formatParenthesis(t){const n=this.formatInlineExpression(t.children);n?(this.layout.add(t.openParen),this.layout.add(...n.getLayoutItems()),this.layout.add(_e.NO_SPACE,t.closeParen,_e.SPACE)):(this.layout.add(t.openParen,_e.NEWLINE),Uu(this.cfg)?(this.layout.add(_e.INDENT),this.layout=this.formatSubExpression(t.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(_e.INDENT),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(_e.NEWLINE,_e.INDENT,t.closeParen,_e.SPACE))}formatBetweenPredicate(t){this.layout.add(this.showKw(t.betweenKw),_e.SPACE),this.layout=this.formatSubExpression(t.expr1),this.layout.add(_e.NO_SPACE,_e.SPACE,this.showNonTabularKw(t.andKw),_e.SPACE),this.layout=this.formatSubExpression(t.expr2),this.layout.add(_e.SPACE)}formatCaseExpression(t){this.formatNode(t.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(t.expr),this.layout=this.formatSubExpression(t.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(_e.NEWLINE,_e.INDENT),this.formatNode(t.endKw)}formatCaseWhen(t){this.layout.add(_e.NEWLINE,_e.INDENT),this.formatNode(t.whenKw),this.layout=this.formatSubExpression(t.condition),this.formatNode(t.thenKw),this.layout=this.formatSubExpression(t.result)}formatCaseElse(t){this.layout.add(_e.NEWLINE,_e.INDENT),this.formatNode(t.elseKw),this.layout=this.formatSubExpression(t.result)}formatClause(t){this.isOnelineClause(t)?this.formatClauseInOnelineStyle(t):Uu(this.cfg)?this.formatClauseInTabularStyle(t):this.formatClauseInIndentedStyle(t)}isOnelineClause(t){return Uu(this.cfg)?this.dialectCfg.tabularOnelineClauses[t.nameKw.text]:this.dialectCfg.onelineClauses[t.nameKw.text]}formatClauseInIndentedStyle(t){this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t.nameKw),_e.NEWLINE),this.layout.indentation.increaseTopLevel(),this.layout.add(_e.INDENT),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(t){this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t.nameKw),_e.SPACE),this.layout=this.formatSubExpression(t.children)}formatClauseInTabularStyle(t){this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t.nameKw),_e.SPACE),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(t.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(t){this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t.nameKw),_e.NEWLINE),this.layout.add(_e.INDENT),this.layout=this.formatSubExpression(t.children)}formatLimitClause(t){this.withComments(t.limitKw,()=>{this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t.limitKw))}),this.layout.indentation.increaseTopLevel(),Uu(this.cfg)?this.layout.add(_e.SPACE):this.layout.add(_e.NEWLINE,_e.INDENT),t.offset?(this.layout=this.formatSubExpression(t.offset),this.layout.add(_e.NO_SPACE,",",_e.SPACE),this.layout=this.formatSubExpression(t.count)):this.layout=this.formatSubExpression(t.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(t){this.layout.add("*",_e.SPACE)}formatLiteral(t){this.layout.add(t.text,_e.SPACE)}formatIdentifier(t){this.layout.add(this.showIdentifier(t),_e.SPACE)}formatParameter(t){this.layout.add(this.params.get(t),_e.SPACE)}formatOperator({text:t}){this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(t)?this.layout.add(_e.NO_SPACE,t):t===":"?this.layout.add(_e.NO_SPACE,t,_e.SPACE):this.layout.add(t,_e.SPACE)}formatComma(t){this.inline?this.layout.add(_e.NO_SPACE,",",_e.SPACE):this.layout.add(_e.NO_SPACE,",",_e.NEWLINE,_e.INDENT)}withComments(t,n){this.formatComments(t.leadingComments),n(),this.formatComments(t.trailingComments)}formatComments(t){t&&t.forEach(n=>{n.type===st.line_comment?this.formatLineComment(n):this.formatBlockComment(n)})}formatLineComment(t){nI(t.precedingWhitespace||"")?this.layout.add(_e.NEWLINE,_e.INDENT,t.text,_e.MANDATORY_NEWLINE,_e.INDENT):this.layout.getLayoutItems().length>0?this.layout.add(_e.NO_NEWLINE,_e.SPACE,t.text,_e.MANDATORY_NEWLINE,_e.INDENT):this.layout.add(t.text,_e.MANDATORY_NEWLINE,_e.INDENT)}formatBlockComment(t){t.type===st.block_comment&&this.isMultilineBlockComment(t)?(this.splitBlockComment(t.text).forEach(n=>{this.layout.add(_e.NEWLINE,_e.INDENT,n)}),this.layout.add(_e.NEWLINE,_e.INDENT)):this.layout.add(t.text,_e.SPACE)}isMultilineBlockComment(t){return nI(t.text)||nI(t.precedingWhitespace||"")}isDocComment(t){const n=t.split(/\n/);return/^\/\*\*?$/.test(n[0])&&n.slice(1,n.length-1).every(r=>/^\s*\*/.test(r))&&/^\s*\*\/$/.test(gd(n))}splitBlockComment(t){return this.isDocComment(t)?t.split(/\n/).map(n=>/^\s*\*/.test(n)?" "+n.replace(/^\s*/,""):n):t.split(/\n/).map(n=>n.replace(/^\s*/,""))}formatSubExpression(t){return new ES({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(t)}formatInlineExpression(t){const n=this.params.getPositionalParameterIndex();try{return new ES({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new nae(this.cfg.expressionWidth),inline:!0}).format(t)}catch(r){if(r instanceof rC){this.params.setPositionalParameterIndex(n);return}else throw r}}formatKeywordNode(t){switch(t.tokenType){case be.RESERVED_JOIN:return this.formatJoin(t);case be.AND:case be.OR:case be.XOR:return this.formatLogicalOperator(t);default:return this.formatKeyword(t)}}formatJoin(t){Uu(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t),_e.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t),_e.SPACE)}formatKeyword(t){this.layout.add(this.showKw(t),_e.SPACE)}formatLogicalOperator(t){this.cfg.logicalOperatorNewline==="before"?Uu(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t),_e.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(_e.NEWLINE,_e.INDENT,this.showKw(t),_e.SPACE):this.layout.add(this.showKw(t),_e.NEWLINE,_e.INDENT)}formatDataType(t){this.layout.add(this.showDataType(t),_e.SPACE)}showKw(t){return YM(t.tokenType)?kM(this.showNonTabularKw(t),this.cfg.indentStyle):this.showNonTabularKw(t)}showNonTabularKw(t){switch(this.cfg.keywordCase){case"preserve":return ER(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}showFunctionKw(t){return YM(t.tokenType)?kM(this.showNonTabularFunctionKw(t),this.cfg.indentStyle):this.showNonTabularFunctionKw(t)}showNonTabularFunctionKw(t){switch(this.cfg.functionCase){case"preserve":return ER(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}showIdentifier(t){if(t.quoted)return t.text;switch(this.cfg.identifierCase){case"preserve":return t.text;case"upper":return t.text.toUpperCase();case"lower":return t.text.toLowerCase()}}showDataType(t){switch(this.cfg.dataTypeCase){case"preserve":return ER(t.raw);case"upper":return t.text;case"lower":return t.text.toLowerCase()}}}class rae{constructor(t,n){this.dialect=t,this.cfg=n,this.params=new Uoe(this.cfg.params)}format(t){const n=this.parse(t);return this.formatAst(n).trimEnd()}parse(t){return Qoe(this.dialect.tokenizer).parse(t,this.cfg.paramTypes||{})}formatAst(t){return t.map(n=>this.formatStatement(n)).join(`
270
+ `.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(t){const n=new ES({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new CH(new _H(xoe(this.cfg)))}).format(t.children);return t.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?n.add(_e.NEWLINE,";"):n.add(_e.NO_NEWLINE,";")),n.toString()}}class dR extends Error{}function sae(e){const t=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const n of t)if(n in e)throw new dR(`${n} config is no more supported.`);if(e.expressionWidth<=0)throw new dR(`expressionWidth config must be positive number. Received ${e.expressionWidth} instead.`);if(e.params&&!iae(e.params)&&console.warn('WARNING: All "params" option values should be strings.'),e.paramTypes&&!oae(e.paramTypes))throw new dR("Empty regex given in custom paramTypes. That would result in matching infinite amount of parameters.");return e}function iae(e){return(e instanceof Array?e:Object.values(e)).every(n=>typeof n=="string")}function oae(e){return e.custom&&Array.isArray(e.custom)?e.custom.every(t=>t.regex!==""):!0}var aae=function(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const LH={bigquery:"bigquery",clickhouse:"clickhouse",db2:"db2",db2i:"db2i",duckdb:"duckdb",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",tidb:"tidb",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},lae=Object.keys(LH),cae={tabWidth:2,useTabs:!1,keywordCase:"preserve",identifierCase:"preserve",dataTypeCase:"preserve",functionCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},uae=(e,t={})=>{if(typeof t.language=="string"&&!lae.includes(t.language))throw new dR(`Unsupported SQL dialect: ${t.language}`);const n=LH[t.language||"sql"];return Eae(e,Object.assign(Object.assign({},t),{dialect:Roe[n]}))},Eae=(e,t)=>{var{dialect:n}=t,r=aae(t,["dialect"]);if(typeof e!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof e);const s=sae(Object.assign(Object.assign({},cae),r));return new rae(Doe(n),s).format(e)};function fae({code:e,dbSystem:t,className:n}){const[r,s]=D.useState(""),[o,l]=D.useState(!0),c=dae({code:e,dbSystem:t}),E=pae(t);return D.useEffect(()=>{let f=!1;async function h(){try{const d=await eL(c,{lang:E,theme:"github-dark-default"});if(f)return;s(d),l(!1)}catch{if(f)return;s(`<pre><code>${Rae(c)}</code></pre>`),l(!1)}}return l(!0),h(),()=>{f=!0}},[c,E]),o?v.jsx("pre",{className:n,children:v.jsx("code",{className:"text-muted-foreground",children:c})}):v.jsx("div",{className:n,dangerouslySetInnerHTML:{__html:r},style:{"--shiki-color-background":"transparent"}})}function dae(e){return yH(e.dbSystem)?e.code.replace(/\s+/g," ").trim()||"# empty command":Tae(e)}function Tae(e){const t=e.code.trim();if(!t)return"-- empty query";try{return uae(t,{language:hae(e.dbSystem),tabWidth:2,keywordCase:"upper",linesBetweenQueries:1})}catch{return t}}function hae(e){const t=e==null?void 0:e.toLowerCase();return t==="postgresql"||t==="postgres"?"postgresql":t==="mysql"?"mysql":t==="sqlite"?"sqlite":t==="mariadb"?"mariadb":t==="redshift"?"redshift":t==="mssql"||t==="sqlserver"?"transactsql":"sql"}function pae(e){return yH(e)?"bash":"sql"}function yH(e){return(e==null?void 0:e.toLowerCase())==="redis"}function Rae(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Sae({query:e,onViewTrace:t}){const[n,r]=D.useState(!1),s=e.dbStatement??e.spanName;D.useEffect(()=>{if(!n)return;const l=window.setTimeout(()=>r(!1),1500);return()=>window.clearTimeout(l)},[n]);const o=async()=>{await navigator.clipboard.writeText(s),r(!0)};return v.jsxs("div",{className:"space-y-3 px-4 py-3",children:[v.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[v.jsx(ts,{color:"purple",children:e.dbOperation??e.spanName}),e.dbSystem&&v.jsx(ts,{color:"muted",bordered:!0,children:e.dbSystem}),e.statusCode==="ERROR"?v.jsx(ts,{color:"danger",children:"ERROR"}):v.jsx(ts,{color:"success",children:"OK"}),v.jsx(wc,{ms:e.durationMs})]}),v.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[v.jsxs(cl,{variant:"outline",size:"sm",onClick:o,children:[v.jsx(Pr,{icon:n?_S:CS,className:"size-3.5"}),n?"Copied":"Copy query"]}),v.jsxs(cl,{variant:"outline",size:"sm",onClick:()=>t(e.traceId),children:[v.jsx(Pr,{icon:K1,className:"size-3.5"}),"View trace"]})]})]}),v.jsxs("div",{className:"overflow-hidden rounded-md border border-border/40 bg-muted/20",children:[v.jsx("div",{className:"border-b border-border/30 px-3 py-2",children:v.jsxs("div",{className:"min-w-0",children:[v.jsx("p",{className:"truncate font-mono text-xs text-foreground/80",children:e.spanName}),v.jsx("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:"SQL statement"})]})}),v.jsx("div",{className:"overflow-x-auto p-3",children:v.jsx(fae,{code:s,dbSystem:e.dbSystem,className:"[&_.shiki]:!bg-transparent [&_.shiki]:!m-0 [&_.shiki]:!p-0 [&_.shiki]:overflow-visible [&_.shiki_pre]:!bg-transparent [&_.shiki_code]:text-xs [&_code]:font-mono [&_pre]:whitespace-pre-wrap [&_pre]:break-words"})})]})]})}const mae=[G_(),{id:"operation",header:"Operation",cell:({row:e})=>v.jsx(ts,{color:"purple",children:e.original.dbOperation??e.original.spanName}),meta:{className:"w-24 px-3 py-2",headerClassName:"w-24 px-3 py-2"}},{id:"statement",header:"Statement",cell:({row:e})=>v.jsx("span",{className:"truncate font-mono text-foreground/80",children:(e.original.dbStatement??e.original.spanName).replace(/\s+/g," ").trim()}),meta:{className:"max-w-0 truncate px-3 py-2"}},{id:"system",header:"System",cell:({row:e})=>v.jsx("span",{className:"text-xs text-muted-foreground",children:e.original.dbSystem}),meta:{className:"w-32 px-3 py-2",headerClassName:"w-32 px-3 py-2"}},{id:"duration",header:()=>v.jsx("span",{className:"text-right",children:"Duration"}),cell:({row:e})=>v.jsx(wc,{ms:e.original.durationMs}),meta:{className:"w-20 px-3 py-2 text-right",headerClassName:"w-20 px-3 py-2 text-right"}},...DE(e=>e.startTime)];function Aae({queries:e,onQueryClick:t,onLoadMore:n,isLoadingMore:r}){return v.jsx(Hc,{columns:mae,data:e,onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No queries yet"}),renderExpandedRow:s=>v.jsx(Sae,{query:s,onViewTrace:t})})}const WM=50;function gae(){const e=Us(),t=Ki(),{traceId:n}=ai({from:"__root__"}),[r,s]=D.useState(null),{data:o,fetchNextPage:l,hasNextPage:c,isFetchingNextPage:E}=xc(Wr.queries.index.infiniteQueryOptions({query:{limit:WM,...n&&{traceId:n},...r&&{dbSystem:r}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(d,p)=>{var S;if(!((((S=d==null?void 0:d.data)==null?void 0:S.length)??0)<WM))return p.reduce((R,m)=>{var g;return R+(((g=m==null?void 0:m.data)==null?void 0:g.length)??0)},0)}}));Bc(d=>{d.type==="traces"&&t.invalidateQueries({queryKey:Wr.queries.index.pathKey()})});const f=(o==null?void 0:o.pages.flatMap(d=>(d==null?void 0:d.data)??[]))??[],h=D.useMemo(()=>[...new Set(f.map(p=>p.dbSystem).filter(Boolean))].sort(),[f]);return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"Queries",children:h.length>0&&v.jsxs(SB,{value:r??"",onValueChange:d=>s(d||null),children:[v.jsx(mB,{children:v.jsx(AB,{placeholder:"All systems"})}),v.jsxs(gB,{children:[v.jsx(QR,{value:"",children:"All systems"}),h.map(d=>v.jsx(QR,{value:d,children:d},d))]})]})}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(Aae,{queries:f,onQueryClick:d=>e({to:"/traces/$traceId",params:{traceId:d},search:{from:"/queries"}}),onLoadMore:c?()=>l():void 0,isLoadingMore:E})})]})}const Oae=yi("/queries")({component:gae}),Iae=D.forwardRef(({className:e="",...t},n)=>v.jsx("input",{ref:n,className:`h-7 rounded-md border border-border bg-muted/30 px-2.5 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-ring focus:outline-none ${e}`,...t}));var TR={exports:{}},Nae=TR.exports,jM;function Cae(){return jM||(jM=1,(function(e,t){(function(n,r){e.exports=r(OE())})(Nae,n=>(()=>{var r={165(c,E,f){const h=f(877),d={};for(const R of Object.keys(h))d[h[R]]=R;const p={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};c.exports=p;for(const R of Object.keys(p)){if(!("channels"in p[R]))throw new Error("missing channels property: "+R);if(!("labels"in p[R]))throw new Error("missing channel labels property: "+R);if(p[R].labels.length!==p[R].channels)throw new Error("channel and label counts mismatch: "+R);const{channels:m,labels:g}=p[R];delete p[R].channels,delete p[R].labels,Object.defineProperty(p[R],"channels",{value:m}),Object.defineProperty(p[R],"labels",{value:g})}function S(R,m){return(R[0]-m[0])**2+(R[1]-m[1])**2+(R[2]-m[2])**2}p.rgb.hsl=function(R){const m=R[0]/255,g=R[1]/255,I=R[2]/255,C=Math.min(m,g,I),L=Math.max(m,g,I),N=L-C;let y,_;L===C?y=0:m===L?y=(g-I)/N:g===L?y=2+(I-m)/N:I===L&&(y=4+(m-g)/N),y=Math.min(60*y,360),y<0&&(y+=360);const M=(C+L)/2;return _=L===C?0:M<=.5?N/(L+C):N/(2-L-C),[y,100*_,100*M]},p.rgb.hsv=function(R){let m,g,I,C,L;const N=R[0]/255,y=R[1]/255,_=R[2]/255,M=Math.max(N,y,_),w=M-Math.min(N,y,_),F=function(Y){return(M-Y)/6/w+.5};return w===0?(C=0,L=0):(L=w/M,m=F(N),g=F(y),I=F(_),N===M?C=I-g:y===M?C=.3333333333333333+m-I:_===M&&(C=.6666666666666666+g-m),C<0?C+=1:C>1&&(C-=1)),[360*C,100*L,100*M]},p.rgb.hwb=function(R){const m=R[0],g=R[1];let I=R[2];const C=p.rgb.hsl(R)[0],L=1/255*Math.min(m,Math.min(g,I));return I=1-.00392156862745098*Math.max(m,Math.max(g,I)),[C,100*L,100*I]},p.rgb.cmyk=function(R){const m=R[0]/255,g=R[1]/255,I=R[2]/255,C=Math.min(1-m,1-g,1-I);return[100*((1-m-C)/(1-C)||0),100*((1-g-C)/(1-C)||0),100*((1-I-C)/(1-C)||0),100*C]},p.rgb.keyword=function(R){const m=d[R];if(m)return m;let g,I=1/0;for(const C of Object.keys(h)){const L=S(R,h[C]);L<I&&(I=L,g=C)}return g},p.keyword.rgb=function(R){return h[R]},p.rgb.xyz=function(R){let m=R[0]/255,g=R[1]/255,I=R[2]/255;return m=m>.04045?((m+.055)/1.055)**2.4:m/12.92,g=g>.04045?((g+.055)/1.055)**2.4:g/12.92,I=I>.04045?((I+.055)/1.055)**2.4:I/12.92,[100*(.4124*m+.3576*g+.1805*I),100*(.2126*m+.7152*g+.0722*I),100*(.0193*m+.1192*g+.9505*I)]},p.rgb.lab=function(R){const m=p.rgb.xyz(R);let g=m[0],I=m[1],C=m[2];return g/=95.047,I/=100,C/=108.883,g=g>.008856?g**.3333333333333333:7.787*g+.13793103448275862,I=I>.008856?I**.3333333333333333:7.787*I+.13793103448275862,C=C>.008856?C**.3333333333333333:7.787*C+.13793103448275862,[116*I-16,500*(g-I),200*(I-C)]},p.hsl.rgb=function(R){const m=R[0]/360,g=R[1]/100,I=R[2]/100;let C,L,N;if(g===0)return N=255*I,[N,N,N];C=I<.5?I*(1+g):I+g-I*g;const y=2*I-C,_=[0,0,0];for(let M=0;M<3;M++)L=m+.3333333333333333*-(M-1),L<0&&L++,L>1&&L--,N=6*L<1?y+6*(C-y)*L:2*L<1?C:3*L<2?y+(C-y)*(.6666666666666666-L)*6:y,_[M]=255*N;return _},p.hsl.hsv=function(R){const m=R[0];let g=R[1]/100,I=R[2]/100,C=g;const L=Math.max(I,.01);return I*=2,g*=I<=1?I:2-I,C*=L<=1?L:2-L,[m,100*(I===0?2*C/(L+C):2*g/(I+g)),100*((I+g)/2)]},p.hsv.rgb=function(R){const m=R[0]/60,g=R[1]/100;let I=R[2]/100;const C=Math.floor(m)%6,L=m-Math.floor(m),N=255*I*(1-g),y=255*I*(1-g*L),_=255*I*(1-g*(1-L));switch(I*=255,C){case 0:return[I,_,N];case 1:return[y,I,N];case 2:return[N,I,_];case 3:return[N,y,I];case 4:return[_,N,I];case 5:return[I,N,y]}},p.hsv.hsl=function(R){const m=R[0],g=R[1]/100,I=R[2]/100,C=Math.max(I,.01);let L,N;N=(2-g)*I;const y=(2-g)*C;return L=g*C,L/=y<=1?y:2-y,L=L||0,N/=2,[m,100*L,100*N]},p.hwb.rgb=function(R){const m=R[0]/360;let g=R[1]/100,I=R[2]/100;const C=g+I;let L;C>1&&(g/=C,I/=C);const N=Math.floor(6*m),y=1-I;L=6*m-N,1&N&&(L=1-L);const _=g+L*(y-g);let M,w,F;switch(N){default:case 6:case 0:M=y,w=_,F=g;break;case 1:M=_,w=y,F=g;break;case 2:M=g,w=y,F=_;break;case 3:M=g,w=_,F=y;break;case 4:M=_,w=g,F=y;break;case 5:M=y,w=g,F=_}return[255*M,255*w,255*F]},p.cmyk.rgb=function(R){const m=R[0]/100,g=R[1]/100,I=R[2]/100,C=R[3]/100;return[255*(1-Math.min(1,m*(1-C)+C)),255*(1-Math.min(1,g*(1-C)+C)),255*(1-Math.min(1,I*(1-C)+C))]},p.xyz.rgb=function(R){const m=R[0]/100,g=R[1]/100,I=R[2]/100;let C,L,N;return C=3.2406*m+-1.5372*g+-.4986*I,L=-.9689*m+1.8758*g+.0415*I,N=.0557*m+-.204*g+1.057*I,C=C>.0031308?1.055*C**.4166666666666667-.055:12.92*C,L=L>.0031308?1.055*L**.4166666666666667-.055:12.92*L,N=N>.0031308?1.055*N**.4166666666666667-.055:12.92*N,C=Math.min(Math.max(0,C),1),L=Math.min(Math.max(0,L),1),N=Math.min(Math.max(0,N),1),[255*C,255*L,255*N]},p.xyz.lab=function(R){let m=R[0],g=R[1],I=R[2];return m/=95.047,g/=100,I/=108.883,m=m>.008856?m**.3333333333333333:7.787*m+.13793103448275862,g=g>.008856?g**.3333333333333333:7.787*g+.13793103448275862,I=I>.008856?I**.3333333333333333:7.787*I+.13793103448275862,[116*g-16,500*(m-g),200*(g-I)]},p.lab.xyz=function(R){let m,g,I;g=(R[0]+16)/116,m=R[1]/500+g,I=g-R[2]/200;const C=g**3,L=m**3,N=I**3;return g=C>.008856?C:(g-.13793103448275862)/7.787,m=L>.008856?L:(m-.13793103448275862)/7.787,I=N>.008856?N:(I-.13793103448275862)/7.787,m*=95.047,g*=100,I*=108.883,[m,g,I]},p.lab.lch=function(R){const m=R[0],g=R[1],I=R[2];let C;return C=360*Math.atan2(I,g)/2/Math.PI,C<0&&(C+=360),[m,Math.sqrt(g*g+I*I),C]},p.lch.lab=function(R){const m=R[0],g=R[1],I=R[2]/360*2*Math.PI;return[m,g*Math.cos(I),g*Math.sin(I)]},p.rgb.ansi16=function(R,m=null){const[g,I,C]=R;let L=m===null?p.rgb.hsv(R)[2]:m;if(L=Math.round(L/50),L===0)return 30;let N=30+(Math.round(C/255)<<2|Math.round(I/255)<<1|Math.round(g/255));return L===2&&(N+=60),N},p.hsv.ansi16=function(R){return p.rgb.ansi16(p.hsv.rgb(R),R[2])},p.rgb.ansi256=function(R){const m=R[0],g=R[1],I=R[2];return m===g&&g===I?m<8?16:m>248?231:Math.round((m-8)/247*24)+232:16+36*Math.round(m/255*5)+6*Math.round(g/255*5)+Math.round(I/255*5)},p.ansi16.rgb=function(R){let m=R%10;if(m===0||m===7)return R>50&&(m+=3.5),m=m/10.5*255,[m,m,m];const g=.5*(1+~~(R>50));return[(1&m)*g*255,(m>>1&1)*g*255,(m>>2&1)*g*255]},p.ansi256.rgb=function(R){if(R>=232){const g=10*(R-232)+8;return[g,g,g]}let m;return R-=16,[Math.floor(R/36)/5*255,Math.floor((m=R%36)/6)/5*255,m%6/5*255]},p.rgb.hex=function(R){const m=(((255&Math.round(R[0]))<<16)+((255&Math.round(R[1]))<<8)+(255&Math.round(R[2]))).toString(16).toUpperCase();return"000000".substring(m.length)+m},p.hex.rgb=function(R){const m=R.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!m)return[0,0,0];let g=m[0];m[0].length===3&&(g=g.split("").map(C=>C+C).join(""));const I=parseInt(g,16);return[I>>16&255,I>>8&255,255&I]},p.rgb.hcg=function(R){const m=R[0]/255,g=R[1]/255,I=R[2]/255,C=Math.max(Math.max(m,g),I),L=Math.min(Math.min(m,g),I),N=C-L;let y,_;return y=N<1?L/(1-N):0,_=N<=0?0:C===m?(g-I)/N%6:C===g?2+(I-m)/N:4+(m-g)/N,_/=6,_%=1,[360*_,100*N,100*y]},p.hsl.hcg=function(R){const m=R[1]/100,g=R[2]/100,I=g<.5?2*m*g:2*m*(1-g);let C=0;return I<1&&(C=(g-.5*I)/(1-I)),[R[0],100*I,100*C]},p.hsv.hcg=function(R){const m=R[1]/100,g=R[2]/100,I=m*g;let C=0;return I<1&&(C=(g-I)/(1-I)),[R[0],100*I,100*C]},p.hcg.rgb=function(R){const m=R[0]/360,g=R[1]/100,I=R[2]/100;if(g===0)return[255*I,255*I,255*I];const C=[0,0,0],L=m%1*6,N=L%1,y=1-N;let _=0;switch(Math.floor(L)){case 0:C[0]=1,C[1]=N,C[2]=0;break;case 1:C[0]=y,C[1]=1,C[2]=0;break;case 2:C[0]=0,C[1]=1,C[2]=N;break;case 3:C[0]=0,C[1]=y,C[2]=1;break;case 4:C[0]=N,C[1]=0,C[2]=1;break;default:C[0]=1,C[1]=0,C[2]=y}return _=(1-g)*I,[255*(g*C[0]+_),255*(g*C[1]+_),255*(g*C[2]+_)]},p.hcg.hsv=function(R){const m=R[1]/100,g=m+R[2]/100*(1-m);let I=0;return g>0&&(I=m/g),[R[0],100*I,100*g]},p.hcg.hsl=function(R){const m=R[1]/100,g=R[2]/100*(1-m)+.5*m;let I=0;return g>0&&g<.5?I=m/(2*g):g>=.5&&g<1&&(I=m/(2*(1-g))),[R[0],100*I,100*g]},p.hcg.hwb=function(R){const m=R[1]/100,g=m+R[2]/100*(1-m);return[R[0],100*(g-m),100*(1-g)]},p.hwb.hcg=function(R){const m=R[1]/100,g=1-R[2]/100,I=g-m;let C=0;return I<1&&(C=(g-I)/(1-I)),[R[0],100*I,100*C]},p.apple.rgb=function(R){return[R[0]/65535*255,R[1]/65535*255,R[2]/65535*255]},p.rgb.apple=function(R){return[R[0]/255*65535,R[1]/255*65535,R[2]/255*65535]},p.gray.rgb=function(R){return[R[0]/100*255,R[0]/100*255,R[0]/100*255]},p.gray.hsl=function(R){return[0,0,R[0]]},p.gray.hsv=p.gray.hsl,p.gray.hwb=function(R){return[0,100,R[0]]},p.gray.cmyk=function(R){return[0,0,0,R[0]]},p.gray.lab=function(R){return[R[0],0,0]},p.gray.hex=function(R){const m=255&Math.round(R[0]/100*255),g=((m<<16)+(m<<8)+m).toString(16).toUpperCase();return"000000".substring(g.length)+g},p.rgb.gray=function(R){return[(R[0]+R[1]+R[2])/3/255*100]}},880(c,E,f){const h=f(165),d=f(985),p={};Object.keys(h).forEach(S=>{p[S]={},Object.defineProperty(p[S],"channels",{value:h[S].channels}),Object.defineProperty(p[S],"labels",{value:h[S].labels});const R=d(S);Object.keys(R).forEach(m=>{const g=R[m];p[S][m]=(function(I){const C=function(...L){const N=L[0];if(N==null)return N;N.length>1&&(L=N);const y=I(L);if(typeof y=="object")for(let _=y.length,M=0;M<_;M++)y[M]=Math.round(y[M]);return y};return"conversion"in I&&(C.conversion=I.conversion),C})(g),p[S][m].raw=(function(I){const C=function(...L){const N=L[0];return N==null?N:(N.length>1&&(L=N),I(L))};return"conversion"in I&&(C.conversion=I.conversion),C})(g)})}),c.exports=p},985(c,E,f){const h=f(165);function d(R){const m=(function(){const I={},C=Object.keys(h);for(let L=C.length,N=0;N<L;N++)I[C[N]]={distance:-1,parent:null};return I})(),g=[R];for(m[R].distance=0;g.length;){const I=g.pop(),C=Object.keys(h[I]);for(let L=C.length,N=0;N<L;N++){const y=C[N],_=m[y];_.distance===-1&&(_.distance=m[I].distance+1,_.parent=I,g.unshift(y))}}return m}function p(R,m){return function(g){return m(R(g))}}function S(R,m){const g=[m[R].parent,R];let I=h[m[R].parent][R],C=m[R].parent;for(;m[C].parent;)g.unshift(m[C].parent),I=p(h[m[C].parent][C],I),C=m[C].parent;return I.conversion=g,I}c.exports=function(R){const m=d(R),g={},I=Object.keys(m);for(let C=I.length,L=0;L<C;L++){const N=I[L];m[N].parent!==null&&(g[N]=S(N,m))}return g}},877(c){c.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(c,E,f){var h=f(877),d=f(403),p=Object.hasOwnProperty,S=Object.create(null);for(var R in h)p.call(h,R)&&(S[h[R]]=R);var m=c.exports={to:{},get:{}};function g(C,L,N){return Math.min(Math.max(L,C),N)}function I(C){var L=Math.round(C).toString(16).toUpperCase();return L.length<2?"0"+L:L}m.get=function(C){var L,N;switch(C.substring(0,3).toLowerCase()){case"hsl":L=m.get.hsl(C),N="hsl";break;case"hwb":L=m.get.hwb(C),N="hwb";break;default:L=m.get.rgb(C),N="rgb"}return L?{model:N,value:L}:null},m.get.rgb=function(C){if(!C)return null;var L,N,y,_=[0,0,0,1];if(L=C.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(y=L[2],L=L[1],N=0;N<3;N++){var M=2*N;_[N]=parseInt(L.slice(M,M+2),16)}y&&(_[3]=parseInt(y,16)/255)}else if(L=C.match(/^#([a-f0-9]{3,4})$/i)){for(y=(L=L[1])[3],N=0;N<3;N++)_[N]=parseInt(L[N]+L[N],16);y&&(_[3]=parseInt(y+y,16)/255)}else if(L=C.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(N=0;N<3;N++)_[N]=parseInt(L[N+1],0);L[4]&&(L[5]?_[3]=.01*parseFloat(L[4]):_[3]=parseFloat(L[4]))}else{if(!(L=C.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(L=C.match(/^(\w+)$/))?L[1]==="transparent"?[0,0,0,0]:p.call(h,L[1])?((_=h[L[1]])[3]=1,_):null:null;for(N=0;N<3;N++)_[N]=Math.round(2.55*parseFloat(L[N+1]));L[4]&&(L[5]?_[3]=.01*parseFloat(L[4]):_[3]=parseFloat(L[4]))}for(N=0;N<3;N++)_[N]=g(_[N],0,255);return _[3]=g(_[3],0,1),_},m.get.hsl=function(C){if(!C)return null;var L=C.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(L){var N=parseFloat(L[4]);return[(parseFloat(L[1])%360+360)%360,g(parseFloat(L[2]),0,100),g(parseFloat(L[3]),0,100),g(isNaN(N)?1:N,0,1)]}return null},m.get.hwb=function(C){if(!C)return null;var L=C.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(L){var N=parseFloat(L[4]);return[(parseFloat(L[1])%360+360)%360,g(parseFloat(L[2]),0,100),g(parseFloat(L[3]),0,100),g(isNaN(N)?1:N,0,1)]}return null},m.to.hex=function(){var C=d(arguments);return"#"+I(C[0])+I(C[1])+I(C[2])+(C[3]<1?I(Math.round(255*C[3])):"")},m.to.rgb=function(){var C=d(arguments);return C.length<4||C[3]===1?"rgb("+Math.round(C[0])+", "+Math.round(C[1])+", "+Math.round(C[2])+")":"rgba("+Math.round(C[0])+", "+Math.round(C[1])+", "+Math.round(C[2])+", "+C[3]+")"},m.to.rgb.percent=function(){var C=d(arguments),L=Math.round(C[0]/255*100),N=Math.round(C[1]/255*100),y=Math.round(C[2]/255*100);return C.length<4||C[3]===1?"rgb("+L+"%, "+N+"%, "+y+"%)":"rgba("+L+"%, "+N+"%, "+y+"%, "+C[3]+")"},m.to.hsl=function(){var C=d(arguments);return C.length<4||C[3]===1?"hsl("+C[0]+", "+C[1]+"%, "+C[2]+"%)":"hsla("+C[0]+", "+C[1]+"%, "+C[2]+"%, "+C[3]+")"},m.to.hwb=function(){var C=d(arguments),L="";return C.length>=4&&C[3]!==1&&(L=", "+C[3]),"hwb("+C[0]+", "+C[1]+"%, "+C[2]+"%"+L+")"},m.to.keyword=function(C){return S[C.slice(0,3)]}},742(c,E,f){const h=f(138),d=f(880),p=["keyword","gray","hex"],S={};for(const N of Object.keys(d))S[[...d[N].labels].sort().join("")]=N;const R={};function m(N,y){if(!(this instanceof m))return new m(N,y);if(y&&y in p&&(y=null),y&&!(y in d))throw new Error("Unknown model: "+y);let _,M;if(N==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(N instanceof m)this.model=N.model,this.color=[...N.color],this.valpha=N.valpha;else if(typeof N=="string"){const w=h.get(N);if(w===null)throw new Error("Unable to parse color from string: "+N);this.model=w.model,M=d[this.model].channels,this.color=w.value.slice(0,M),this.valpha=typeof w.value[M]=="number"?w.value[M]:1}else if(N.length>0){this.model=y||"rgb",M=d[this.model].channels;const w=Array.prototype.slice.call(N,0,M);this.color=L(w,M),this.valpha=typeof N[M]=="number"?N[M]:1}else if(typeof N=="number")this.model="rgb",this.color=[N>>16&255,N>>8&255,255&N],this.valpha=1;else{this.valpha=1;const w=Object.keys(N);"alpha"in N&&(w.splice(w.indexOf("alpha"),1),this.valpha=typeof N.alpha=="number"?N.alpha:0);const F=w.sort().join("");if(!(F in S))throw new Error("Unable to parse color from object: "+JSON.stringify(N));this.model=S[F];const{labels:Y}=d[this.model],$=[];for(_=0;_<Y.length;_++)$.push(N[Y[_]]);this.color=L($)}if(R[this.model])for(M=d[this.model].channels,_=0;_<M;_++){const w=R[this.model][_];w&&(this.color[_]=w(this.color[_]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}m.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(N){let y=this.model in h.to?this:this.rgb();y=y.round(typeof N=="number"?N:1);const _=y.valpha===1?y.color:[...y.color,this.valpha];return h.to[y.model](_)},percentString(N){const y=this.rgb().round(typeof N=="number"?N:1),_=y.valpha===1?y.color:[...y.color,this.valpha];return h.to.rgb.percent(_)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const N={},{channels:y}=d[this.model],{labels:_}=d[this.model];for(let M=0;M<y;M++)N[_[M]]=this.color[M];return this.valpha!==1&&(N.alpha=this.valpha),N},unitArray(){const N=this.rgb().color;return N[0]/=255,N[1]/=255,N[2]/=255,this.valpha!==1&&N.push(this.valpha),N},unitObject(){const N=this.rgb().object();return N.r/=255,N.g/=255,N.b/=255,this.valpha!==1&&(N.alpha=this.valpha),N},round(N){return N=Math.max(N||0,0),new m([...this.color.map(g(N)),this.valpha],this.model)},alpha(N){return N!==void 0?new m([...this.color,Math.max(0,Math.min(1,N))],this.model):this.valpha},red:I("rgb",0,C(255)),green:I("rgb",1,C(255)),blue:I("rgb",2,C(255)),hue:I(["hsl","hsv","hsl","hwb","hcg"],0,N=>(N%360+360)%360),saturationl:I("hsl",1,C(100)),lightness:I("hsl",2,C(100)),saturationv:I("hsv",1,C(100)),value:I("hsv",2,C(100)),chroma:I("hcg",1,C(100)),gray:I("hcg",2,C(100)),white:I("hwb",1,C(100)),wblack:I("hwb",2,C(100)),cyan:I("cmyk",0,C(100)),magenta:I("cmyk",1,C(100)),yellow:I("cmyk",2,C(100)),black:I("cmyk",3,C(100)),x:I("xyz",0,C(95.047)),y:I("xyz",1,C(100)),z:I("xyz",2,C(108.833)),l:I("lab",0,C(100)),a:I("lab",1),b:I("lab",2),keyword(N){return N!==void 0?new m(N):d[this.model].keyword(this.color)},hex(N){return N!==void 0?new m(N):h.to.hex(this.rgb().round().color)},hexa(N){if(N!==void 0)return new m(N);const y=this.rgb().round().color;let _=Math.round(255*this.valpha).toString(16).toUpperCase();return _.length===1&&(_="0"+_),h.to.hex(y)+_},rgbNumber(){const N=this.rgb().color;return(255&N[0])<<16|(255&N[1])<<8|255&N[2]},luminosity(){const N=this.rgb().color,y=[];for(const[_,M]of N.entries()){const w=M/255;y[_]=w<=.04045?w/12.92:((w+.055)/1.055)**2.4}return .2126*y[0]+.7152*y[1]+.0722*y[2]},contrast(N){const y=this.luminosity(),_=N.luminosity();return y>_?(y+.05)/(_+.05):(_+.05)/(y+.05)},level(N){const y=this.contrast(N);return y>=7?"AAA":y>=4.5?"AA":""},isDark(){const N=this.rgb().color;return(2126*N[0]+7152*N[1]+722*N[2])/1e4<128},isLight(){return!this.isDark()},negate(){const N=this.rgb();for(let y=0;y<3;y++)N.color[y]=255-N.color[y];return N},lighten(N){const y=this.hsl();return y.color[2]+=y.color[2]*N,y},darken(N){const y=this.hsl();return y.color[2]-=y.color[2]*N,y},saturate(N){const y=this.hsl();return y.color[1]+=y.color[1]*N,y},desaturate(N){const y=this.hsl();return y.color[1]-=y.color[1]*N,y},whiten(N){const y=this.hwb();return y.color[1]+=y.color[1]*N,y},blacken(N){const y=this.hwb();return y.color[2]+=y.color[2]*N,y},grayscale(){const N=this.rgb().color,y=.3*N[0]+.59*N[1]+.11*N[2];return m.rgb(y,y,y)},fade(N){return this.alpha(this.valpha-this.valpha*N)},opaquer(N){return this.alpha(this.valpha+this.valpha*N)},rotate(N){const y=this.hsl();let _=y.color[0];return _=(_+N)%360,_=_<0?360+_:_,y.color[0]=_,y},mix(N,y){if(!N||!N.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof N);const _=N.rgb(),M=this.rgb(),w=y===void 0?.5:y,F=2*w-1,Y=_.alpha()-M.alpha(),$=((F*Y===-1?F:(F+Y)/(1+F*Y))+1)/2,W=1-$;return m.rgb($*_.red()+W*M.red(),$*_.green()+W*M.green(),$*_.blue()+W*M.blue(),_.alpha()*w+M.alpha()*(1-w))}};for(const N of Object.keys(d)){if(p.includes(N))continue;const{channels:y}=d[N];m.prototype[N]=function(..._){return this.model===N?new m(this):_.length>0?new m(_,N):new m([...(M=d[this.model][N].raw(this.color),Array.isArray(M)?M:[M]),this.valpha],N);var M},m[N]=function(..._){let M=_[0];return typeof M=="number"&&(M=L(_,y)),new m(M,N)}}function g(N){return function(y){return(function(_,M){return Number(_.toFixed(M))})(y,N)}}function I(N,y,_){N=Array.isArray(N)?N:[N];for(const M of N)(R[M]||(R[M]=[]))[y]=_;return N=N[0],function(M){let w;return M!==void 0?(_&&(M=_(M)),w=this[N](),w.color[y]=M,w):(w=this[N]().color[y],_&&(w=_(w)),w)}}function C(N){return function(y){return Math.max(0,Math.min(N,y))}}function L(N,y){for(let _=0;_<y;_++)typeof N[_]!="number"&&(N[_]=0);return N}c.exports=m},784(c){var E,f=typeof Reflect=="object"?Reflect:null,h=f&&typeof f.apply=="function"?f.apply:function(M,w,F){return Function.prototype.apply.call(M,w,F)};E=f&&typeof f.ownKeys=="function"?f.ownKeys:Object.getOwnPropertySymbols?function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:function(M){return Object.getOwnPropertyNames(M)};var d=Number.isNaN||function(M){return M!=M};function p(){p.init.call(this)}c.exports=p,c.exports.once=function(M,w){return new Promise(function(F,Y){function $(K){M.removeListener(w,W),Y(K)}function W(){typeof M.removeListener=="function"&&M.removeListener("error",$),F([].slice.call(arguments))}_(M,w,W,{once:!0}),w!=="error"&&(function(K,q,j){typeof K.on=="function"&&_(K,"error",q,j)})(M,$,{once:!0})})},p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var S=10;function R(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}function m(M){return M._maxListeners===void 0?p.defaultMaxListeners:M._maxListeners}function g(M,w,F,Y){var $,W,K,q;if(R(F),(W=M._events)===void 0?(W=M._events=Object.create(null),M._eventsCount=0):(W.newListener!==void 0&&(M.emit("newListener",w,F.listener?F.listener:F),W=M._events),K=W[w]),K===void 0)K=W[w]=F,++M._eventsCount;else if(typeof K=="function"?K=W[w]=Y?[F,K]:[K,F]:Y?K.unshift(F):K.push(F),($=m(M))>0&&K.length>$&&!K.warned){K.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+K.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=M,j.type=w,j.count=K.length,q=j,console&&console.warn&&console.warn(q)}return M}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(M,w,F){var Y={fired:!1,wrapFn:void 0,target:M,type:w,listener:F},$=I.bind(Y);return $.listener=F,Y.wrapFn=$,$}function L(M,w,F){var Y=M._events;if(Y===void 0)return[];var $=Y[w];return $===void 0?[]:typeof $=="function"?F?[$.listener||$]:[$]:F?(function(W){for(var K=new Array(W.length),q=0;q<K.length;++q)K[q]=W[q].listener||W[q];return K})($):y($,$.length)}function N(M){var w=this._events;if(w!==void 0){var F=w[M];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function y(M,w){for(var F=new Array(w),Y=0;Y<w;++Y)F[Y]=M[Y];return F}function _(M,w,F,Y){if(typeof M.on=="function")Y.once?M.once(w,F):M.on(w,F);else{if(typeof M.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M);M.addEventListener(w,function $(W){Y.once&&M.removeEventListener(w,$),F(W)})}}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return S},set:function(M){if(typeof M!="number"||M<0||d(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");S=M}}),p.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},p.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||d(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this},p.prototype.getMaxListeners=function(){return m(this)},p.prototype.emit=function(M){for(var w=[],F=1;F<arguments.length;F++)w.push(arguments[F]);var Y=M==="error",$=this._events;if($!==void 0)Y=Y&&$.error===void 0;else if(!Y)return!1;if(Y){var W;if(w.length>0&&(W=w[0]),W instanceof Error)throw W;var K=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw K.context=W,K}var q=$[M];if(q===void 0)return!1;if(typeof q=="function")h(q,this,w);else{var j=q.length,k=y(q,j);for(F=0;F<j;++F)h(k[F],this,w)}return!0},p.prototype.addListener=function(M,w){return g(this,M,w,!1)},p.prototype.on=p.prototype.addListener,p.prototype.prependListener=function(M,w){return g(this,M,w,!0)},p.prototype.once=function(M,w){return R(w),this.on(M,C(this,M,w)),this},p.prototype.prependOnceListener=function(M,w){return R(w),this.prependListener(M,C(this,M,w)),this},p.prototype.removeListener=function(M,w){var F,Y,$,W,K;if(R(w),(Y=this._events)===void 0)return this;if((F=Y[M])===void 0)return this;if(F===w||F.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete Y[M],Y.removeListener&&this.emit("removeListener",M,F.listener||w));else if(typeof F!="function"){for($=-1,W=F.length-1;W>=0;W--)if(F[W]===w||F[W].listener===w){K=F[W].listener,$=W;break}if($<0)return this;$===0?F.shift():(function(q,j){for(;j+1<q.length;j++)q[j]=q[j+1];q.pop()})(F,$),F.length===1&&(Y[M]=F[0]),Y.removeListener!==void 0&&this.emit("removeListener",M,K||w)}return this},p.prototype.off=p.prototype.removeListener,p.prototype.removeAllListeners=function(M){var w,F,Y;if((F=this._events)===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[M]),this;if(arguments.length===0){var $,W=Object.keys(F);for(Y=0;Y<W.length;++Y)($=W[Y])!=="removeListener"&&this.removeAllListeners($);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(w=F[M])=="function")this.removeListener(M,w);else if(w!==void 0)for(Y=w.length-1;Y>=0;Y--)this.removeListener(M,w[Y]);return this},p.prototype.listeners=function(M){return L(this,M,!0)},p.prototype.rawListeners=function(M){return L(this,M,!1)},p.listenerCount=function(M,w){return typeof M.listenerCount=="function"?M.listenerCount(w):N.call(M,w)},p.prototype.listenerCount=N,p.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]}},94(c){c.exports=function(E){return!(!E||typeof E=="string")&&(E instanceof Array||Array.isArray(E)||E.length>=0&&(E.splice instanceof Function||Object.getOwnPropertyDescriptor(E,E.length-1)&&E.constructor.name!=="String"))}},403(c,E,f){var h=f(94),d=Array.prototype.concat,p=Array.prototype.slice,S=c.exports=function(R){for(var m=[],g=0,I=R.length;g<I;g++){var C=R[g];h(C)?m=d.call(m,p.call(C)):m.push(C)}return m};S.wrap=function(R){return function(){return R(S(arguments))}}},119(c){c.exports=n}},s={};function o(c){var E=s[c];if(E!==void 0)return E.exports;var f=s[c]={exports:{}};return r[c](f,f.exports,o),f.exports}o.n=c=>{var E=c&&c.__esModule?()=>c.default:()=>c;return o.d(E,{a:E}),E},o.d=(c,E)=>{for(var f in E)o.o(E,f)&&!o.o(c,f)&&Object.defineProperty(c,f,{enumerable:!0,get:E[f]})},o.o=(c,E)=>Object.prototype.hasOwnProperty.call(c,E),o.r=c=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var l={};return(()=>{function c(P){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},c(P)}function E(P){var b=(function(x,G){if(c(x)!="object"||!x)return x;var J=x[Symbol.toPrimitive];if(J!==void 0){var re=J.call(x,G);if(c(re)!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(x)})(P,"string");return c(b)=="symbol"?b:b+""}function f(P,b,x){return(b=E(b))in P?Object.defineProperty(P,b,{value:x,enumerable:!0,configurable:!0,writable:!0}):P[b]=x,P}function h(P,b){var x=Object.keys(P);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(P);b&&(G=G.filter(function(J){return Object.getOwnPropertyDescriptor(P,J).enumerable})),x.push.apply(x,G)}return x}function d(P){for(var b=1;b<arguments.length;b++){var x=arguments[b]!=null?arguments[b]:{};b%2?h(Object(x),!0).forEach(function(G){f(P,G,x[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(x)):h(Object(x)).forEach(function(G){Object.defineProperty(P,G,Object.getOwnPropertyDescriptor(x,G))})}return P}function p(P,b){if(!(P instanceof b))throw new TypeError("Cannot call a class as a function")}function S(P,b){for(var x=0;x<b.length;x++){var G=b[x];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(P,E(G.key),G)}}function R(P,b,x){return b&&S(P.prototype,b),x&&S(P,x),Object.defineProperty(P,"prototype",{writable:!1}),P}function m(P){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},m(P)}function g(){try{var P=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g=function(){return!!P})()}function I(P,b){if(b&&(c(b)=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x})(P)}function C(P,b,x){return b=m(b),I(P,g()?Reflect.construct(b,x||[],m(P).constructor):b.apply(P,x))}function L(P,b){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,G){return x.__proto__=G,x},L(P,b)}function N(P,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(b&&b.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),b&&L(P,b)}o.r(l),o.d(l,{default:()=>ea});var y=o(119),_=o.n(y);function M(){var P=this.constructor.getDerivedStateFromProps(this.props,this.state);P!=null&&this.setState(P)}function w(P){this.setState((function(b){var x=this.constructor.getDerivedStateFromProps(P,b);return x??null}).bind(this))}function F(P,b){try{var x=this.props,G=this.state;this.props=P,this.state=b,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(x,G)}finally{this.props=x,this.state=G}}function Y(P){var b=P.prototype;if(!b||!b.isReactComponent)throw new Error("Can only polyfill class components");if(typeof P.getDerivedStateFromProps!="function"&&typeof b.getSnapshotBeforeUpdate!="function")return P;var x=null,G=null,J=null;if(typeof b.componentWillMount=="function"?x="componentWillMount":typeof b.UNSAFE_componentWillMount=="function"&&(x="UNSAFE_componentWillMount"),typeof b.componentWillReceiveProps=="function"?G="componentWillReceiveProps":typeof b.UNSAFE_componentWillReceiveProps=="function"&&(G="UNSAFE_componentWillReceiveProps"),typeof b.componentWillUpdate=="function"?J="componentWillUpdate":typeof b.UNSAFE_componentWillUpdate=="function"&&(J="UNSAFE_componentWillUpdate"),x!==null||G!==null||J!==null){var re=P.displayName||P.name,ce=typeof P.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
271
+
272
+ `+re+" uses "+ce+" but also contains the following legacy lifecycles:"+(x!==null?`
273
+ `+x:"")+(G!==null?`
274
+ `+G:"")+(J!==null?`
275
+ `+J:"")+`
276
+
277
+ The above lifecycles should be removed. Learn more about this warning here:
278
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof P.getDerivedStateFromProps=="function"&&(b.componentWillMount=M,b.componentWillReceiveProps=w),typeof b.getSnapshotBeforeUpdate=="function"){if(typeof b.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");b.componentWillUpdate=F;var ee=b.componentDidUpdate;b.componentDidUpdate=function(de,Ae,Ge){var je=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ge;ee.call(this,de,Ae,je)}}return P}function $(P,b){if(P==null)return{};var x={};for(var G in P)if({}.hasOwnProperty.call(P,G)){if(b.indexOf(G)!==-1)continue;x[G]=P[G]}return x}function W(P,b){if(P==null)return{};var x,G,J=$(P,b);if(Object.getOwnPropertySymbols){var re=Object.getOwnPropertySymbols(P);for(G=0;G<re.length;G++)x=re[G],b.indexOf(x)===-1&&{}.propertyIsEnumerable.call(P,x)&&(J[x]=P[x])}return J}function K(P,b){(b==null||b>P.length)&&(b=P.length);for(var x=0,G=Array(b);x<b;x++)G[x]=P[x];return G}function q(P,b){if(P){if(typeof P=="string")return K(P,b);var x={}.toString.call(P).slice(8,-1);return x==="Object"&&P.constructor&&(x=P.constructor.name),x==="Map"||x==="Set"?Array.from(P):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?K(P,b):void 0}}function j(P){return(function(b){if(Array.isArray(b))return K(b)})(P)||(function(b){if(typeof Symbol<"u"&&b[Symbol.iterator]!=null||b["@@iterator"]!=null)return Array.from(b)})(P)||q(P)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
279
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(P,b){if(b&&(P==null?void 0:P.constructor)===b)return"bigNumber";var x=(function(G){return{}.toString.call(G).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(P);return x==="number"&&(x=isNaN(P)?"nan":(0|P)!==P?"float":"integer"),x}function z(P){return P.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}M.__suppressDeprecationWarning=!0,w.__suppressDeprecationWarning=!0,F.__suppressDeprecationWarning=!0;var Z=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=(x.parent_type,x.namespace),J=x.quotesOnKeys,re=x.indentWidth,ce=x.theme,ee=x.singleIndent,de=x.showComma,Ae=x.isLast,Ge=x.jsvRoot,je=x.name?x.name:"";return _().createElement("div",{className:"variable-row"},_().createElement("span",Object.assign({},Ye(ce,"object-name"),{key:G},Ye(ce,"objectKeyVal",{paddingLeft:re*ee})),_().createElement("span",{className:"object-key"},J&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",null,je),J&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",Ye(ce,"colon"),":")),_().createElement("span",Ye(ce,"circularReference"),"[CIRCULAR REFERENCE]"),de&&!Ae&&!Ge&&_().createElement("span",Ye(ce,"comma"),","))}}])})(_().PureComponent),ie={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},ne={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"};const B={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};var Q=o(742);const ue=function(P){return P},le=typeof np=="object"&&np&&np.Object===Object&&np;var he=typeof self=="object"&&self&&self.Object===Object&&self;const se=le||he||Function("return this")(),fe=se.Symbol;var ge=Object.prototype,Le=ge.hasOwnProperty,We=ge.toString,He=fe?fe.toStringTag:void 0;const ot=function(P){var b=Le.call(P,He),x=P[He];try{P[He]=void 0;var G=!0}catch{}var J=We.call(P);return G&&(b?P[He]=x:delete P[He]),J};var Me=Object.prototype.toString;const Ue=function(P){return Me.call(P)};var Xe=fe?fe.toStringTag:void 0;const ct=function(P){return P==null?P===void 0?"[object Undefined]":"[object Null]":Xe&&Xe in Object(P)?ot(P):Ue(P)},Be=function(P){var b=typeof P;return P!=null&&(b=="object"||b=="function")},ke=function(P){if(!Be(P))return!1;var b=ct(P);return b=="[object Function]"||b=="[object GeneratorFunction]"||b=="[object AsyncFunction]"||b=="[object Proxy]"},ve=se["__core-js_shared__"];var Ce,oe=(Ce=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||""))?"Symbol(src)_1."+Ce:"";const Ie=function(P){return!!oe&&oe in P};var Pe=Function.prototype.toString;const xe=function(P){if(P!=null){try{return Pe.call(P)}catch{}try{return P+""}catch{}}return""};var Ze=/^\[object .+?Constructor\]$/,Et=Function.prototype,Xt=Object.prototype,Ut=Et.toString,ft=Xt.hasOwnProperty,Dt=RegExp("^"+Ut.call(ft).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ht=function(P){return!(!Be(P)||Ie(P))&&(ke(P)?Dt:Ze).test(xe(P))},ln=function(P,b){return P==null?void 0:P[b]},zt=function(P,b){var x=ln(P,b);return ht(x)?x:void 0};var qt=zt(se,"WeakMap");const In=qt&&new qt,$t=In?function(P,b){return In.set(P,b),P}:ue;var Yt=Object.create;const cn=(function(){function P(){}return function(b){if(!Be(b))return{};if(Yt)return Yt(b);P.prototype=b;var x=new P;return P.prototype=void 0,x}})(),gt=function(P){return function(){var b=arguments;switch(b.length){case 0:return new P;case 1:return new P(b[0]);case 2:return new P(b[0],b[1]);case 3:return new P(b[0],b[1],b[2]);case 4:return new P(b[0],b[1],b[2],b[3]);case 5:return new P(b[0],b[1],b[2],b[3],b[4]);case 6:return new P(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new P(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var x=cn(P.prototype),G=P.apply(x,b);return Be(G)?G:x}},Jt=function(P,b,x){var G=1&b,J=gt(P);return function re(){return(this&&this!==se&&this instanceof re?J:P).apply(G?x:this,arguments)}},hn=function(P,b,x){switch(x.length){case 0:return P.call(b);case 1:return P.call(b,x[0]);case 2:return P.call(b,x[0],x[1]);case 3:return P.call(b,x[0],x[1],x[2])}return P.apply(b,x)};var Qt=Math.max;const Nn=function(P,b,x,G){for(var J=-1,re=P.length,ce=x.length,ee=-1,de=b.length,Ae=Qt(re-ce,0),Ge=Array(de+Ae),je=!G;++ee<de;)Ge[ee]=b[ee];for(;++J<ce;)(je||J<re)&&(Ge[x[J]]=P[J]);for(;Ae--;)Ge[ee++]=P[J++];return Ge};var An=Math.max;const Gn=function(P,b,x,G){for(var J=-1,re=P.length,ce=-1,ee=x.length,de=-1,Ae=b.length,Ge=An(re-ee,0),je=Array(Ge+Ae),Ke=!G;++J<Ge;)je[J]=P[J];for(var ze=J;++de<Ae;)je[ze+de]=b[de];for(;++ce<ee;)(Ke||J<re)&&(je[ze+x[ce]]=P[J++]);return je},is=function(P,b){for(var x=P.length,G=0;x--;)P[x]===b&&++G;return G},er=function(){};function cr(P){this.__wrapped__=P,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}cr.prototype=cn(er.prototype),cr.prototype.constructor=cr;const ur=cr,Ot=In?function(P){return In.get(P)}:function(){},pn={};var Rn=Object.prototype.hasOwnProperty;const Bn=function(P){for(var b=P.name+"",x=pn[b],G=Rn.call(pn,b)?x.length:0;G--;){var J=x[G],re=J.func;if(re==null||re==P)return J.name}return b};function yn(P,b){this.__wrapped__=P,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=void 0}yn.prototype=cn(er.prototype),yn.prototype.constructor=yn;const Er=yn,Xr=Array.isArray,gl=function(P){return P!=null&&typeof P=="object"},As=function(P,b){var x=-1,G=P.length;for(b||(b=Array(G));++x<G;)b[x]=P[x];return b},Fn=function(P){if(P instanceof ur)return P.clone();var b=new Er(P.__wrapped__,P.__chain__);return b.__actions__=As(P.__actions__),b.__index__=P.__index__,b.__values__=P.__values__,b};var tr=Object.prototype.hasOwnProperty;function os(P){if(gl(P)&&!Xr(P)&&!(P instanceof ur)){if(P instanceof Er)return P;if(tr.call(P,"__wrapped__"))return Fn(P)}return new Er(P)}os.prototype=er.prototype,os.prototype.constructor=os;const Vo=os,cm=function(P){var b=Bn(P),x=Vo[b];if(typeof x!="function"||!(b in ur.prototype))return!1;if(P===x)return!0;var G=Ot(x);return!!G&&P===G[0]};var um=Date.now;const wE=function(P){var b=0,x=0;return function(){var G=um(),J=16-(G-x);if(x=G,J>0){if(++b>=800)return arguments[0]}else b=0;return P.apply(void 0,arguments)}},ko=wE($t);var GE=/\{\n\/\* \[wrapped with (.+)\] \*/,Yo=/,? & /;const Wo=function(P){var b=P.match(GE);return b?b[1].split(Yo):[]};var Ol=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;const jo=function(P,b){var x=b.length;if(!x)return P;var G=x-1;return b[G]=(x>1?"& ":"")+b[G],b=b.join(x>2?", ":" "),P.replace(Ol,`{
280
+ /* [wrapped with `+b+`] */
281
+ `)},$n=function(P){return function(){return P}},BE=(function(){try{var P=zt(Object,"defineProperty");return P({},"",{}),P}catch{}})(),RT=wE(BE?function(P,b){return BE(P,"toString",{configurable:!0,enumerable:!1,value:$n(b),writable:!0})}:ue),Qi=function(P,b){for(var x=-1,G=P==null?0:P.length;++x<G&&b(P[x],x,P)!==!1;);return P},Xo=function(P,b,x,G){for(var J=P.length,re=x+-1;++re<J;)if(b(P[re],re,P))return re;return-1},Em=function(P){return P!=P},ST=function(P,b,x){for(var G=x-1,J=P.length;++G<J;)if(P[G]===b)return G;return-1},mT=function(P,b,x){return b==b?ST(P,b,x):Xo(P,Em,x)},fm=function(P,b){return!!(P!=null&&P.length)&&mT(P,b,0)>-1};var Wc=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];const jc=function(P,b){return Qi(Wc,function(x){var G="_."+x[0];b&x[1]&&!fm(P,G)&&P.push(G)}),P.sort()},ws=function(P,b,x){var G=b+"";return RT(P,jo(G,jc(Wo(G),x)))},$r=function(P,b,x,G,J,re,ce,ee,de,Ae){var Ge=8&b;b|=Ge?32:64,4&(b&=~(Ge?64:32))||(b&=-4);var je=[P,b,J,Ge?re:void 0,Ge?ce:void 0,Ge?void 0:re,Ge?void 0:ce,ee,de,Ae],Ke=x.apply(void 0,je);return cm(P)&&ko(Ke,je),Ke.placeholder=G,ws(Ke,P,b)},FE=function(P){return P.placeholder};var dm=/^(?:0|[1-9]\d*)$/;const HE=function(P,b){var x=typeof P;return!!(b=b??9007199254740991)&&(x=="number"||x!="symbol"&&dm.test(P))&&P>-1&&P%1==0&&P<b};var AT=Math.min;const Xc=function(P,b){for(var x=P.length,G=AT(b.length,x),J=As(P);G--;){var re=b[G];P[G]=HE(re,x)?J[re]:void 0}return P};var gT="__lodash_placeholder__";const Ar=function(P,b){for(var x=-1,G=P.length,J=0,re=[];++x<G;){var ce=P[x];ce!==b&&ce!==gT||(P[x]=gT,re[J++]=x)}return re},$c=function P(b,x,G,J,re,ce,ee,de,Ae,Ge){var je=128&x,Ke=1&x,ze=2&x,pt=24&x,Ht=512&x,lt=ze?void 0:gt(b);return function _t(){for(var Kt=arguments.length,yt=Array(Kt),Vn=Kt;Vn--;)yt[Vn]=arguments[Vn];if(pt)var Or=FE(_t),Vs=is(yt,Or);if(J&&(yt=Nn(yt,J,re,pt)),ce&&(yt=Gn(yt,ce,ee,pt)),Kt-=Vs,pt&&Kt<Ge){var Kr=Ar(yt,Or);return $r(b,x,P,_t.placeholder,G,yt,Kr,de,Ae,Ge-Kt)}var fi=Ke?G:this,un=ze?fi[b]:b;return Kt=yt.length,de?yt=Xc(yt,de):Ht&&Kt>1&&yt.reverse(),je&&Ae<Kt&&(yt.length=Ae),this&&this!==se&&this instanceof _t&&(un=lt||gt(un)),un.apply(fi,yt)}},OT=function(P,b,x){var G=gt(P);return function J(){for(var re=arguments.length,ce=Array(re),ee=re,de=FE(J);ee--;)ce[ee]=arguments[ee];var Ae=re<3&&ce[0]!==de&&ce[re-1]!==de?[]:Ar(ce,de);return(re-=Ae.length)<x?$r(P,b,$c,J.placeholder,void 0,ce,Ae,void 0,void 0,x-re):hn(this&&this!==se&&this instanceof J?G:P,this,ce)}},VE=function(P,b,x,G){var J=1&b,re=gt(P);return function ce(){for(var ee=-1,de=arguments.length,Ae=-1,Ge=G.length,je=Array(Ge+de),Ke=this&&this!==se&&this instanceof ce?re:P;++Ae<Ge;)je[Ae]=G[Ae];for(;de--;)je[Ae++]=arguments[++ee];return hn(Ke,J?x:this,je)}};var Zi="__lodash_placeholder__",Kc=128,IT=Math.min;const $o=function(P,b){var x=P[1],G=b[1],J=x|G,re=J<131,ce=G==Kc&&x==8||G==Kc&&x==256&&P[7].length<=b[8]||G==384&&b[7].length<=b[8]&&x==8;if(!re&&!ce)return P;1&G&&(P[2]=b[2],J|=1&x?0:4);var ee=b[3];if(ee){var de=P[3];P[3]=de?Nn(de,ee,b[4]):ee,P[4]=de?Ar(P[3],Zi):b[4]}return(ee=b[5])&&(de=P[5],P[5]=de?Gn(de,ee,b[6]):ee,P[6]=de?Ar(P[5],Zi):b[6]),(ee=b[7])&&(P[7]=ee),G&Kc&&(P[8]=P[8]==null?b[8]:IT(P[8],b[8])),P[9]==null&&(P[9]=b[9]),P[0]=b[0],P[1]=J,P};var Tm=/\s/;const NT=function(P){for(var b=P.length;b--&&Tm.test(P.charAt(b)););return b};var CT=/^\s+/;const kE=function(P){return P&&P.slice(0,NT(P)+1).replace(CT,"")},hm=function(P){return typeof P=="symbol"||gl(P)&&ct(P)=="[object Symbol]"};var pm=/^[-+]0x[0-9a-f]+$/i,zc=/^0b[01]+$/i,li=/^0o[0-7]+$/i,YE=parseInt;const WE=function(P){if(typeof P=="number")return P;if(hm(P))return NaN;if(Be(P)){var b=typeof P.valueOf=="function"?P.valueOf():P;P=Be(b)?b+"":b}if(typeof P!="string")return P===0?P:+P;P=kE(P);var x=zc.test(P);return x||li.test(P)?YE(P.slice(2),x?2:8):pm.test(P)?NaN:+P};var Ko=1/0;const zo=function(P){return P?(P=WE(P))===Ko||P===-1/0?17976931348623157e292*(P<0?-1:1):P==P?P:0:P===0?P:0},jE=function(P){var b=zo(P),x=b%1;return b==b?x?b-x:b:0};var qc=Math.max;const _T=function(P,b,x,G,J,re,ce,ee){var de=2&b;if(!de&&typeof P!="function")throw new TypeError("Expected a function");var Ae=G?G.length:0;if(Ae||(b&=-97,G=J=void 0),ce=ce===void 0?ce:qc(jE(ce),0),ee=ee===void 0?ee:jE(ee),Ae-=J?J.length:0,64&b){var Ge=G,je=J;G=J=void 0}var Ke=de?void 0:Ot(P),ze=[P,b,x,G,J,Ge,je,re,ce,ee];if(Ke&&$o(ze,Ke),P=ze[0],b=ze[1],x=ze[2],G=ze[3],J=ze[4],!(ee=ze[9]=ze[9]===void 0?de?0:P.length:qc(ze[9]-Ae,0))&&24&b&&(b&=-25),b&&b!=1)pt=b==8||b==16?OT(P,b,ee):b!=32&&b!=33||J.length?$c.apply(void 0,ze):VE(P,b,x,G);else var pt=Jt(P,b,x);return ws((Ke?$t:ko)(pt,ze),P,b)};function eo(P,b,x){var G=_T(P,8,void 0,void 0,void 0,void 0,void 0,b=x?void 0:b);return G.placeholder=eo.placeholder,G}eo.placeholder={};const Gs=eo,Jc={threezerotwofour:{scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},apathy:{scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},ashes:{scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},atelierDune:{scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},atelierForest:{scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},atelierHeath:{scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},atelierLakeside:{scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},atelierSeaside:{scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},bespin:{scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},brewer:{scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},bright:{scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},chalk:{scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},codeschool:{scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},colors:{scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},default:{scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},eighties:{scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},embers:{scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},flat:{scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},google:{scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},grayscale:{scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},greenscreen:{scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},harmonic:{scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},hopscotch:{scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},isotope:{scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},marrakesh:{scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},mocha:{scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},monokai:{scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},nicinabox:{scheme:"nicinabox",author:"nicinabox (http://github.com/nicinabox)",base00:"#2A2F3A",base01:"#3C444F",base02:"#4F5A65",base03:"#BEBEBE",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#FFFFFF",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#FC6D24",base0A:"#ddb26f",base0B:"#A1C659",base0C:"#12cfc0",base0D:"#6FB3D2",base0E:"#D381C3",base0F:"#deaf8f"},ocean:{scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},paraiso:{scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},pop:{scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},railscasts:{scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},shapeshifter:{scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},solarized:{scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},summerfruit:{scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},tomorrow:{scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},tube:{scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},twilight:{scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"}},qo=Jc.default,ci=Object.keys(qo),XE=P=>{const b=Q(P),[x,G,J]=(function(ee){const de=ee[0]/255,Ae=ee[1]/255,Ge=ee[2]/255;return[.299*de+.587*Ae+.114*Ge,-.14713*de+-.28886*Ae+.436*Ge,.615*de+-.51499*Ae+-.10001*Ge]})(b.array());var re;const ce=(function(ee){const de=ee[0],Ae=ee[1],Ge=ee[2];let je,Ke,ze;return je=1*de+0*Ae+1.13983*Ge,Ke=1*de+-.39465*Ae+-.5806*Ge,ze=1*de+2.02311*Ae+0*Ge,je=Math.min(Math.max(0,je),1),Ke=Math.min(Math.max(0,Ke),1),ze=Math.min(Math.max(0,ze),1),[255*je,255*Ke,255*ze]})([(re=x,re<.25?1:re<.5?.9-re:1.1-re),G,J]);return Q.rgb(ce).hex()},ui=P=>b=>({className:[b.className,P.className].filter(Boolean).join(" "),style:{...b.style||{},...P.style||{}}}),LT=(P,b)=>{const x=Object.keys(b);for(const G in P)x.indexOf(G)===-1&&x.push(G);return x.reduce((G,J)=>(G[J]=((re,ce)=>{if(re===void 0)return ce;if(ce===void 0)return re;const ee=typeof ce;switch(typeof re){case"string":switch(ee){case"string":return[ce,re].filter(Boolean).join(" ");case"object":return ui({className:re,style:ce});case"function":return(de,...Ae)=>ui({className:re})(ce(de,...Ae))}break;case"object":switch(ee){case"string":return ui({className:ce,style:re});case"object":return{...ce,...re};case"function":return(de,...Ae)=>ui({style:re})(ce(de,...Ae))}break;case"function":switch(ee){case"string":return(de,...Ae)=>re(ui(de)({className:ce}),...Ae);case"object":return(de,...Ae)=>re(ui(de)({style:ce}),...Ae);case"function":return(de,...Ae)=>re(ce(de,...Ae),...Ae)}}})(P[J],b[J]),G),{})},Qc=(P,b,...x)=>{if(b===null)return P;Array.isArray(b)||(b=[b]);const G=b.map(J=>P[J]).filter(Boolean).reduce((J,re)=>(typeof re=="string"?J.className=[J.className,re].filter(Boolean).join(" "):typeof re=="object"?J.style={...J.style,...re}:typeof re=="function"&&(J={...J,...re(J,...x)}),J),{className:"",style:{}});return G.className||delete G.className,Object.keys(G.style).length===0&&delete G.style,G},Zc=P=>Object.keys(P).reduce((b,x)=>(b[x]=/^base/.test(x)?XE(P[x]):x==="scheme"?P[x]+":inverted":P[x],b),{}),yT=Gs((P,b={},x={},...G)=>{const{defaultBase16:J=qo,base16Themes:re=null}=b,ce=to(x,re);ce&&(x={...ce,...x});const ee=ci.reduce((je,Ke)=>(je[Ke]=x[Ke]||J[Ke],je),{}),de=Object.keys(x).reduce((je,Ke)=>(ci.indexOf(Ke)===-1&&(je[Ke]=x[Ke]),je),{}),Ae=P(ee),Ge=LT(de,Ae);return Gs(Qc,2)(Ge,...G)},3),Mr=P=>!!P.extend,to=(P,b)=>{if(P&&Mr(P)&&P.extend&&(P=P.extend),typeof P=="string"){const[x,G]=P.split(":");P=b?b[x]:Jc[x],G==="inverted"&&(P=Zc(P))}return P&&Object.prototype.hasOwnProperty.call(P,"base00")?P:void 0};var eu=function(P){var b=(function(x){return{backgroundColor:x.base00,ellipsisColor:x.base09,braceColor:x.base07,expandedIcon:x.base0D,collapsedIcon:x.base0E,keyColor:x.base07,arrayKeyColor:x.base0C,objectSize:x.base04,copyToClipboard:x.base0F,copyToClipboardCheck:x.base0D,objectBorder:x.base02,dataTypes:{boolean:x.base0E,date:x.base0D,float:x.base0B,function:x.base0D,integer:x.base0F,string:x.base09,nan:x.base08,null:x.base0A,undefined:x.base05,regexp:x.base0A,background:x.base02,bigNumber:x.base09},editVariable:{editIcon:x.base0E,cancelIcon:x.base09,removeIcon:x.base09,addIcon:x.base0E,checkIcon:x.base0E,background:x.base01,color:x.base0A,border:x.base07},addKeyModal:{background:x.base05,border:x.base04,color:x.base0A,labelColor:x.base01},validationFailure:{background:x.base09,iconColor:x.base01,fontColor:x.base01}}})(P);return{"app-container":{fontFamily:B.globalFontFamily,cursor:B.globalCursor,backgroundColor:b.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:b.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:B.braceCursor,fontWeight:B.braceFontWeight,color:b.braceColor},"expanded-icon":{color:b.expandedIcon},"collapsed-icon":{color:b.collapsedIcon},colon:{display:"inline-block",margin:B.keyMargin,color:b.keyColor,verticalAlign:"top"},objectKeyVal:function(x,G){return{style:d({paddingTop:B.keyValPaddingTop,paddingRight:B.keyValPaddingRight,paddingBottom:B.keyValPaddingBottom,borderLeft:B.keyValBorderLeft+" "+b.objectBorder,":hover":{paddingLeft:G.paddingLeft-1+"px",borderLeft:B.keyValBorderHover+" "+b.objectBorder}},G)}},"object-key-val-no-border":{padding:B.keyValPadding},"pushed-content":{marginLeft:B.pushedContentMarginLeft},variableValue:function(x,G){return{style:d({display:"inline-block",paddingRight:B.variableValuePaddingRight,position:"relative"},G)}},"object-name":{display:"inline-block",color:b.keyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"array-key":{display:"inline-block",color:b.arrayKeyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"object-size":{color:b.objectSize,borderRadius:B.objectSizeBorderRadius,fontStyle:B.objectSizeFontStyle,margin:B.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:B.dataTypeFontSize,marginRight:B.dataTypeMarginRight,opacity:B.datatypeOpacity},boolean:{display:"inline-block",color:b.dataTypes.boolean},date:{display:"inline-block",color:b.dataTypes.date},"date-value":{marginLeft:B.dateValueMarginLeft},float:{display:"inline-block",color:b.dataTypes.float},function:{display:"inline-block",color:b.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:b.dataTypes.integer},bigNumber:{display:"inline-block",color:b.dataTypes.bigNumber},string:{display:"inline-block",color:b.dataTypes.string},nan:{display:"inline-block",color:b.dataTypes.nan,fontSize:B.nanFontSize,fontWeight:B.nanFontWeight,backgroundColor:b.dataTypes.background,padding:B.nanPadding,borderRadius:B.nanBorderRadius},null:{display:"inline-block",color:b.dataTypes.null,fontSize:B.nullFontSize,fontWeight:B.nullFontWeight,backgroundColor:b.dataTypes.background,padding:B.nullPadding,borderRadius:B.nullBorderRadius},undefined:{display:"inline-block",color:b.dataTypes.undefined,fontSize:B.undefinedFontSize,padding:B.undefinedPadding,borderRadius:B.undefinedBorderRadius,backgroundColor:b.dataTypes.background},circularReference:{display:"inline-block",color:b.dataTypes.null,fontSize:B.nullFontSize,fontWeight:B.nullFontWeight,backgroundColor:b.dataTypes.background,padding:B.nullPadding,borderRadius:B.nullBorderRadius},regexp:{display:"inline-block",color:b.dataTypes.regexp},"copy-to-clipboard":{cursor:B.clipboardCursor},"copy-icon":{color:b.copyToClipboard,fontSize:B.iconFontSize,marginRight:B.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:b.copyToClipboardCheck,marginLeft:B.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:B.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:B.metaDataPadding},"icon-container":{display:"inline-block",width:B.iconContainerWidth},tooltip:{padding:B.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:b.editVariable.removeIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:b.editVariable.addIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:b.editVariable.editIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:B.iconCursor,color:b.editVariable.checkIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:B.iconCursor,color:b.editVariable.cancelIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:B.editInputMinWidth,borderRadius:B.editInputBorderRadius,backgroundColor:b.editVariable.background,color:b.editVariable.color,padding:B.editInputPadding,marginRight:B.editInputMarginRight,fontFamily:B.editInputFontFamily},"detected-row":{paddingTop:B.detectedRowPaddingTop},"key-modal-request":{position:B.addKeyCoverPosition,top:B.addKeyCoverPositionPx,left:B.addKeyCoverPositionPx,right:B.addKeyCoverPositionPx,bottom:B.addKeyCoverPositionPx,backgroundColor:B.addKeyCoverBackground},"key-modal":{width:B.addKeyModalWidth,backgroundColor:b.addKeyModal.background,marginLeft:B.addKeyModalMargin,marginRight:B.addKeyModalMargin,padding:B.addKeyModalPadding,borderRadius:B.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:b.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:b.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:b.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:b.addKeyModal.labelColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:b.editVariable.addIcon,fontSize:B.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:b.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:b.validationFailure.fontColor,backgroundColor:b.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:b.validationFailure.iconColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:B.commaColor,fontSize:B.commaFontSize,marginRight:B.commaMarginRight,cursor:"default"}}},Il=function(P){var b=ie;return P!==!1&&P!=="none"||(b=ne),yT(eu,{defaultBase16:b})(P)};function Ye(P,b,x){return P||console.error("theme has not been set"),Il(P)(b,x)}var Bs=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.typeName,J=x.displayDataTypes,re=x.theme;return J?_().createElement("span",Object.assign({className:"data-type-label"},Ye(re,"data-type-label")),G):null}}])})(_().PureComponent),tu=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"boolean"),_().createElement(Bs,Object.assign({typeName:"bool"},x)),x.value?"true":"false")}}])})(_().PureComponent),Jo=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"date"),_().createElement(Bs,Object.assign({typeName:"date"},x)),_().createElement("span",Object.assign({className:"date-value"},Ye(x.theme,"date-value")),x.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(_().PureComponent),Nl=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"float"),_().createElement(Bs,Object.assign({typeName:"float"},x)),this.props.value)}}])})(_().PureComponent),bT=o(784),Rm=(function(){return R(function P(){p(this,P),this.handler=function(){}},[{key:"register",value:function(P){this.handler=P}},{key:"dispatch",value:function(P){var b;(b=this.handler)===null||b===void 0||b.call(this,P)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new Rm);const Fs=globalThis.__globalDispatcherInstance;var $E="updated_src",Cl=new((function(P){function b(){var x;p(this,b);for(var G=arguments.length,J=new Array(G),re=0;re<G;re++)J[re]=arguments[re];return(x=C(this,b,[].concat(J))).objects={},x.set=function(ce,ee,de,Ae){x.objects[ce]===void 0&&(x.objects[ce]={}),x.objects[ce][ee]===void 0&&(x.objects[ce][ee]={}),x.objects[ce][ee][de]=Ae},x.get=function(ce,ee,de,Ae){return x.objects[ce]===void 0||x.objects[ce][ee]===void 0||x.objects[ce][ee][de]===void 0?Ae:x.objects[ce][ee][de]},x.handleAction=function(ce){var ee=ce.rjvId,de=ce.data;switch(ce.name){case"RESET":x.emit("reset-"+ee);break;case"VARIABLE_UPDATED":ce.data[$E]=x.updateSrc(ee,de),x.set(ee,"action","variable-update",d(d({},de),{},{type:"variable-edited"})),x.emit("variable-update-"+ee);break;case"VARIABLE_REMOVED":ce.data[$E]=x.updateSrc(ee,de),x.set(ee,"action","variable-update",d(d({},de),{},{type:"variable-removed"})),x.emit("variable-update-"+ee);break;case"VARIABLE_ADDED":ce.data[$E]=x.updateSrc(ee,de),x.set(ee,"action","variable-update",d(d({},de),{},{type:"variable-added"})),x.emit("variable-update-"+ee);break;case"ADD_VARIABLE_KEY_REQUEST":x.set(ee,"action","new-key-request",de),x.emit("add-key-request-"+ee)}},x.updateSrc=function(ce,ee){var de=ee.name,Ae=ee.namespace,Ge=ee.new_value,je=ee.variable_removed;Ae.shift();var Ke,ze=x.get(ce,"global","src"),pt=x.deepCopy(ze,j(Ae)),Ht=pt,lt=(function(_t,Kt){var yt=typeof Symbol<"u"&&_t[Symbol.iterator]||_t["@@iterator"];if(!yt){if(Array.isArray(_t)||(yt=q(_t))||Kt){yt&&(_t=yt);var Vn=0,Or=function(){};return{s:Or,n:function(){return Vn>=_t.length?{done:!0}:{done:!1,value:_t[Vn++]}},e:function(un){throw un},f:Or}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
282
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vs,Kr=!0,fi=!1;return{s:function(){yt=yt.call(_t)},n:function(){var un=yt.next();return Kr=un.done,un},e:function(un){fi=!0,Vs=un},f:function(){try{Kr||yt.return==null||yt.return()}finally{if(fi)throw Vs}}}})(Ae);try{for(lt.s();!(Ke=lt.n()).done;)Ht=Ht[Ke.value]}catch(_t){lt.e(_t)}finally{lt.f()}return je?k(Ht)==="array"?Ht.splice(de,1):delete Ht[de]:de!==null?Ht[de]=Ge:pt=Ge,x.set(ce,"global","src",pt),pt},x.deepCopy=function(ce,ee){var de,Ae=k(ce),Ge=ee.shift();return Ae==="array"?de=j(ce):Ae==="object"&&(de=d({},ce)),Ge!==void 0&&(de[Ge]=x.deepCopy(ce[Ge],ee)),de},x}return N(b,P),R(b)})(bT.EventEmitter));Fs.register(Cl.handleAction.bind(Cl));const xr=Cl;var PT=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).handleToggleCollapsed=function(){G.setState({collapsed:!G.state.collapsed},function(){xr.set(G.props.rjvId,G.props.namespace,"collapsed",G.state.collapsed)})},G.getFunctionDisplay=function(J){var re=G.props;return J?_().createElement("span",null,G.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),_().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},_().createElement("span",null,"{"),_().createElement("span",Ye(re.theme,"ellipsis"),"..."),_().createElement("span",null,"}"))):G.props.value.toString().slice(9,-1)},G.state={collapsed:xr.get(x.rjvId,x.namespace,"collapsed",!0)},G}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=this.state.collapsed;return _().createElement("div",Ye(x.theme,"function"),_().createElement(Bs,Object.assign({typeName:"function"},x)),_().createElement("span",Object.assign({},Ye(x.theme,"function-value"),{className:"rjv-function-container",onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(G)))}}])})(_().PureComponent),DT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){return _().createElement("div",Ye(this.props.theme,"nan"),"NaN")}}])})(_().PureComponent),vT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){return _().createElement("div",Ye(this.props.theme,"null"),"NULL")}}])})(_().PureComponent),MT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"integer"),_().createElement(Bs,Object.assign({typeName:"int"},x)),this.props.value)}}])})(_().PureComponent),xT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"regexp"),_().createElement(Bs,Object.assign({typeName:"regexp"},x)),this.props.value.toString())}}])})(_().PureComponent),UT=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).handleToggleCollapsed=function(){G.setState({collapsed:!G.state.collapsed},function(){xr.set(G.props.rjvId,G.props.namespace,"collapsed",G.state.collapsed)})},G.state={collapsed:xr.get(x.rjvId,x.namespace,"collapsed",!0)},G}return N(b,P),R(b,[{key:"render",value:function(){var x=this.state.collapsed,G=this.props,J=G.collapseStringsAfterLength,re=G.theme,ce=G.escapeStrings,ee=G.value,de=k(J)==="integer",Ae={style:{cursor:"default",wordBreak:"break-all"}};return ce&&(ee=z(ee)),de&&ee.length>J&&(Ae.style.cursor="pointer",x&&(ee=_().createElement("span",null,ee.substring(0,J),_().createElement("span",Ye(re,"ellipsis")," ...")))),_().createElement("div",Ye(re,"string"),_().createElement(Bs,Object.assign({typeName:"string"},G)),_().createElement("span",Object.assign({className:"string-value"},Ae,{onClick:this.handleToggleCollapsed}),'"',ee,'"'))}}])})(_().PureComponent),wT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){return _().createElement("div",Ye(this.props.theme,"undefined"),"undefined")}}])})(_().PureComponent),GT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props;return _().createElement("div",Ye(x.theme,"bigNumber"),_().createElement(Bs,Object.assign({typeName:"bigNumber"},x)),this.props.value.toString())}}])})(_().PureComponent);function KE(){return KE=Object.assign?Object.assign.bind():function(P){for(var b=1;b<arguments.length;b++){var x=arguments[b];for(var G in x)({}).hasOwnProperty.call(x,G)&&(P[G]=x[G])}return P},KE.apply(null,arguments)}var zE=y.useLayoutEffect,BT=function(P,b){typeof P!="function"?P.current=b:P(b)},FT={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},HT=function(P){Object.keys(FT).forEach(function(b){P.style.setProperty(b,FT[b],"important")})},gr=null,VT=function(P,b){var x=P.scrollHeight;return b.sizingStyle.boxSizing==="border-box"?x+b.borderSize:x-b.paddingSize},kT=function(){},Sm=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],mm=!!document.documentElement.currentStyle,Am=function(P){var b=window.getComputedStyle(P);if(b===null)return null;var x,G=(x=b,Sm.reduce(function(re,ce){return re[ce]=x[ce],re},{})),J=G.boxSizing;return J===""?null:(mm&&J==="border-box"&&(G.width=parseFloat(G.width)+parseFloat(G.borderRightWidth)+parseFloat(G.borderLeftWidth)+parseFloat(G.paddingRight)+parseFloat(G.paddingLeft)+"px"),{sizingStyle:G,paddingSize:parseFloat(G.paddingBottom)+parseFloat(G.paddingTop),borderSize:parseFloat(G.borderBottomWidth)+parseFloat(G.borderTopWidth)})};function qE(P,b,x){var G,J,re=(G=x,J=_().useRef(G),zE(function(){J.current=G}),J);y.useLayoutEffect(function(){var ce=function(ee){return re.current(ee)};if(P)return P.addEventListener(b,ce),function(){return P.removeEventListener(b,ce)}},[])}var gm=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Om=function(P,b){var x=P.cacheMeasurements,G=P.maxRows,J=P.minRows,re=P.onChange,ce=re===void 0?kT:re,ee=P.onHeightChange,de=ee===void 0?kT:ee,Ae=$(P,gm),Ge=Ae.value!==void 0,je=y.useRef(null),Ke=(function(lt,_t){var Kt=_().useRef();return _().useCallback(function(yt){lt.current=yt,Kt.current&&BT(Kt.current,null),Kt.current=_t,_t&&BT(_t,yt)},[_t])})(je,b),ze=y.useRef(0),pt=y.useRef(),Ht=function(){var lt=je.current,_t=x&&pt.current?pt.current:Am(lt);if(_t){pt.current=_t;var Kt=(function(Or,Vs,Kr,fi){Kr===void 0&&(Kr=1),fi===void 0&&(fi=1/0),gr||((gr=document.createElement("textarea")).setAttribute("tabindex","-1"),gr.setAttribute("aria-hidden","true"),HT(gr)),gr.parentNode===null&&document.body.appendChild(gr);var un=Or.paddingSize,iu=Or.borderSize,gs=Or.sizingStyle,rf=gs.boxSizing;Object.keys(gs).forEach(function(sf){var of=sf;gr.style[of]=gs[of]}),HT(gr),gr.value=Vs;var Pi=VT(gr,Or);gr.value=Vs,Pi=VT(gr,Or),gr.value="x";var di=gr.scrollHeight-un,Dl=di*Kr;rf==="border-box"&&(Dl=Dl+un+iu),Pi=Math.max(Dl,Pi);var ou=di*fi;return rf==="border-box"&&(ou=ou+un+iu),[Pi=Math.min(ou,Pi),di]})(_t,lt.value||lt.placeholder||"x",J,G),yt=Kt[0],Vn=Kt[1];ze.current!==yt&&(ze.current=yt,lt.style.setProperty("height",yt+"px","important"),de(yt,{rowHeight:Vn}))}};return y.useLayoutEffect(Ht),(function(lt,_t){qE(document.body,"reset",function(Kt){lt.current.form===Kt.target&&_t(Kt)})})(je,function(){if(!Ge){var lt=je.current.value;requestAnimationFrame(function(){var _t=je.current;_t&&lt!==_t.value&&Ht()})}}),qE(window,"resize",Ht),(function(lt){qE(document.fonts,"loadingdone",lt)})(Ht),y.createElement("textarea",KE({},Ae,{onChange:function(lt){Ge||Ht(),ce(lt)},ref:Ke}))},Im=y.forwardRef(Om);function nu(P,b){P=P.trim();try{if((P=structuredClone(P))[0]==="[")return Hn("array",JSON.parse(P));if(P[0]==="{")return Hn("object",JSON.parse(P));if(P.match(/-?\d+\.\d+/)&&P.match(/-?\d+\.\d+/)[0]===P)return b&&parseFloat(P).toString()!==P?Hn("bigNumber",P):Hn("float",parseFloat(P));if(P.match(/-?\d+e-\d+/)&&P.match(/-?\d+e-\d+/)[0]===P)return Hn("float",Number(P));if(P.match(/-?\d+/)&&P.match(/-?\d+/)[0]===P)return b&&parseInt(P).toString()!==P?Hn("bigNumber",P):Hn("integer",parseInt(P));if(P.match(/-?\d+e\+\d+/)&&P.match(/-?\d+e\+\d+/)[0]===P)return Hn("integer",Number(P))}catch{}switch(P=P.toLowerCase()){case"undefined":return Hn("undefined",void 0);case"nan":return Hn("nan",NaN);case"null":return Hn("null",null);case"true":return Hn("boolean",!0);case"false":return Hn("boolean",!1);default:if(P=Date.parse(P))return Hn("date",new Date(P))}return Hn(!1,null)}function Hn(P,b){return{type:P,value:b}}var Nm=["style"],YT=["style"],WT=["style"],jT=["style"],XT=["style"],$T=["style"],Qo=["style"],Cm=["style"],_m=["style"],Lm=["style"],KT=["style"],zT=["style"],_l=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,Nm);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}])})(_().PureComponent),Ll=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,YT);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}])})(_().PureComponent),ym=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,WT),re=as(G).style;return _().createElement("span",J,_().createElement("svg",{fill:re.color,width:re.height,height:re.width,style:re,viewBox:"0 0 1792 1792"},_().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(_().PureComponent),ru=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,jT),re=as(G).style;return _().createElement("span",J,_().createElement("svg",{fill:re.color,width:re.height,height:re.width,style:re,viewBox:"0 0 1792 1792"},_().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(_().PureComponent),qT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,XT);return _().createElement("span",J,_().createElement("svg",{style:d(d({},as(G).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(_().PureComponent),JT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,$T);return _().createElement("span",J,_().createElement("svg",{style:d(d({},as(G).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(_().PureComponent),su=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,Qo);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}])})(_().PureComponent),yl=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,Cm);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent),QT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,_m);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent),JE=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,Lm);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(_().PureComponent),ZT=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,KT);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}])})(_().PureComponent),QE=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.style,J=W(x,zT);return _().createElement("span",J,_().createElement("svg",Object.assign({},as(G),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(_().PureComponent);function as(P){return P||(P={}),{style:d(d({verticalAlign:"middle"},P),{},{color:P.color?P.color:"#000000",height:"1em",width:"1em"})}}var eh=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).copiedTimer=null,G.copyToClipboardFallback=function(J){var re=document.createElement("textarea");re.value=J,document.body.appendChild(re),re.select(),document.execCommand("copy"),document.body.removeChild(re)},G.handleCopy=function(){var J=G.props,re=J.clickCallback,ce=J.src,ee=J.namespace,de=JSON.stringify(G.clipboardValue(ce),null," ");navigator.clipboard?navigator.clipboard.writeText(de).catch(function(){G.copyToClipboardFallback(de)}):G.copyToClipboardFallback(de),G.copiedTimer=setTimeout(function(){G.setState({copied:!1})},5500),G.setState({copied:!0},function(){typeof re=="function"&&re({src:ce,namespace:ee,name:ee[ee.length-1]})})},G.getClippyIcon=function(){var J=G.props.theme;return G.state.copied?_().createElement("span",null,_().createElement(su,Object.assign({className:"copy-icon"},Ye(J,"copy-icon"))),_().createElement("span",Ye(J,"copy-icon-copied"),"✔")):_().createElement(su,Object.assign({className:"copy-icon"},Ye(J,"copy-icon")))},G.clipboardValue=function(J){switch(k(J)){case"function":case"regexp":return J.toString();default:return J}},G.state={copied:!1},G}return N(b,P),R(b,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var x=this.props,G=x.theme,J=x.hidden,re=x.rowHovered,ce=Ye(G,"copy-to-clipboard").style,ee="inline";return J&&(ee="none"),_().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:re?"inline-block":"none"}},_().createElement("span",{style:d(d({},ce),{},{display:ee}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(_().PureComponent);const bm=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).handleSelect=function(J){var re=G.props,ce=re.variable,ee=re.namespace,de=re.onEdit,Ae=re.onSelect,Ge=re.keyModifier,je=j(ee);Ge(J,"edit")&&de!==!1?G.prepopInput(ce):Ae!==!1&&(je.shift(),Ae(d(d({},ce),{},{namespace:je})))},G.getEditIcon=function(){var J=G.props,re=J.variable,ce=J.theme;return _().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:G.state.hovered?"inline-block":"none"}},_().createElement(ZT,Object.assign({className:"click-to-edit-icon"},Ye(ce,"editVarIcon"),{onClick:function(){G.prepopInput(re)}})))},G.prepopInput=function(J){if(G.props.onEdit!==!1){var re=(function(ee,de){var Ae;switch(k(ee,de)){case"undefined":Ae="undefined";break;case"nan":Ae="NaN";break;case"string":Ae=ee;break;case"bigNumber":case"date":case"function":case"regexp":Ae=ee.toString();break;default:try{Ae=JSON.stringify(ee,null," ")}catch{Ae=""}}return Ae})(J.value,G.props.bigNumber),ce=nu(re,G.props.bigNumber);G.setState({editMode:!0,editValue:re,parsedInput:{type:ce.type,value:ce.value}})}},G.getRemoveIcon=function(){var J=G.props,re=J.variable,ce=J.namespace,ee=J.theme,de=J.rjvId;return _().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:G.state.hovered?"inline-block":"none"}},_().createElement(yl,Object.assign({className:"click-to-remove-icon"},Ye(ee,"removeVarIcon"),{onClick:function(){Fs.dispatch({name:"VARIABLE_REMOVED",rjvId:de,data:{name:re.name,namespace:ce,existing_value:re.value,variable_removed:!0}})}})))},G.getValue=function(J,re){var ce=!re&&J.type,ee=G.props;switch(ce){case!1:return G.getEditInput();case"string":return _().createElement(UT,Object.assign({value:J.value},ee));case"integer":return _().createElement(MT,Object.assign({value:J.value},ee));case"float":return _().createElement(Nl,Object.assign({value:J.value},ee));case"boolean":return _().createElement(tu,Object.assign({value:J.value},ee));case"function":return _().createElement(PT,Object.assign({value:J.value},ee));case"null":return _().createElement(vT,ee);case"nan":return _().createElement(DT,ee);case"undefined":return _().createElement(wT,ee);case"date":return _().createElement(Jo,Object.assign({value:J.value},ee));case"regexp":return _().createElement(xT,Object.assign({value:J.value},ee));case"bigNumber":return _().createElement(GT,Object.assign({value:J.value},ee));case"circularReference":return _().createElement(JsonCircularReference,Object.assign({value:J.value},ee));default:var de="";try{de=JSON.stringify(J.value)}catch{de=""}return _().createElement("div",{className:"object-value"},de)}},G.getEditInput=function(){var J=G.props,re=J.keyModifier,ce=J.selectOnFocus,ee=J.theme,de=G.state.editValue;return _().createElement("div",null,_().createElement(Im,Object.assign({type:"text",ref:function(Ae){Ae&&Ae[ce?"select":"focus"]()},value:de,className:"variable-editor",onChange:function(Ae){var Ge=Ae.target.value,je=nu(Ge,G.props.bigNumber);G.setState({editValue:Ge,parsedInput:{type:je.type,value:je.value}})},onKeyDown:function(Ae){switch(Ae.key){case"Escape":G.setState({editMode:!1,editValue:""});break;case"Enter":re(Ae,"submit")&&G.submitEdit(!0)}Ae.stopPropagation()},placeholder:"update this value",minRows:2},Ye(ee,"edit-input"))),_().createElement("div",Ye(ee,"edit-icon-container"),_().createElement(yl,Object.assign({className:"edit-cancel"},Ye(ee,"cancel-icon"),{onClick:function(Ae){Ae&&Ae.stopPropagation(),G.setState({editMode:!1,editValue:""})}})),_().createElement(QE,Object.assign({className:"edit-check string-value"},Ye(ee,"check-icon"),{onClick:function(Ae){Ae&&Ae.stopPropagation(),G.submitEdit()}})),_().createElement("div",null,G.showDetected())))},G.submitEdit=function(J){var re=G.props,ce=re.variable,ee=re.namespace,de=re.rjvId,Ae=re.bigNumber,Ge=G.state,je=Ge.editValue,Ke=Ge.parsedInput,ze=je;J&&Ke.type&&(ze=Ke.value,Ae&&Ke.type==="bigNumber"&&(ze=new Ae(ze))),G.setState({editMode:!1}),Fs.dispatch({name:"VARIABLE_UPDATED",rjvId:de,data:{name:ce.name,namespace:ee,existing_value:ce.value,new_value:ze,variable_removed:!1}})},G.showDetected=function(){var J=G.props.theme,re=G.getDetectedInput();if(re)return _().createElement("div",null,_().createElement("div",Ye(J,"detected-row"),re,_().createElement(QE,{className:"edit-check detected",style:d({verticalAlign:"top",paddingLeft:"3px"},Ye(J,"check-icon").style),onClick:function(ce){ce&&ce.stopPropagation(),G.submitEdit(!0)}})))},G.getDetectedInput=function(){var J=G.state.parsedInput,re=J.type,ce=J.value,ee=G.props,de=ee.theme;if(re!==!1)switch(re.toLowerCase()){case"object":return _().createElement("span",null,_().createElement("span",{style:d(d({},Ye(de,"brace").style),{},{cursor:"default"})},"{"),_().createElement("span",{style:d(d({},Ye(de,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:d(d({},Ye(de,"brace").style),{},{cursor:"default"})},"}"));case"array":return _().createElement("span",null,_().createElement("span",{style:d(d({},Ye(de,"brace").style),{},{cursor:"default"})},"["),_().createElement("span",{style:d(d({},Ye(de,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:d(d({},Ye(de,"brace").style),{},{cursor:"default"})},"]"));case"string":return _().createElement(UT,Object.assign({value:ce},ee));case"integer":return _().createElement(MT,Object.assign({value:ce},ee));case"float":return _().createElement(Nl,Object.assign({value:ce},ee));case"boolean":return _().createElement(tu,Object.assign({value:ce},ee));case"function":return _().createElement(PT,Object.assign({value:ce},ee));case"null":return _().createElement(vT,ee);case"nan":return _().createElement(DT,ee);case"undefined":return _().createElement(wT,ee);case"date":return _().createElement(Jo,Object.assign({value:new Date(ce)},ee));case"bignumber":return _().createElement(GT,Object.assign({value:ce},ee));case"circularreference":return _().createElement(JsonCircularReference,Object.assign({value:variable.value},ee))}},G.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},G}return N(b,P),R(b,[{key:"render",value:function(){var x=this,G=this.props,J=G.variable,re=G.singleIndent,ce=G.type,ee=G.theme,de=G.namespace,Ae=G.indentWidth,Ge=G.enableClipboard,je=G.onEdit,Ke=G.onDelete,ze=G.onSelect,pt=G.displayArrayKey,Ht=G.quotesOnKeys,lt=G.showComma,_t=G.isLast,Kt=this.state.editMode,yt=ze!==!1||je!==!1;return _().createElement("div",Object.assign({},Ye(ee,"objectKeyVal",{paddingLeft:Ae*re}),{onMouseEnter:function(){return x.setState(d(d({},x.state),{},{hovered:!0}))},onMouseLeave:function(){return x.setState(d(d({},x.state),{},{hovered:!1}))},className:"variable-row",key:J.name}),ce==="array"?pt?_().createElement("span",Object.assign({},Ye(ee,"array-key"),{key:J.name+"_"+de}),J.name,_().createElement("div",Ye(ee,"colon"),":")):null:_().createElement("span",null,_().createElement("span",Object.assign({},Ye(ee,"object-name"),{className:"object-key",key:J.name+"_"+de,onClick:yt?this.handleSelect:null}),!!Ht&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",{style:{display:"inline-block"}},z(J.name)),!!Ht&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",Ye(ee,"colon"),":")),_().createElement("div",Object.assign({className:"variable-value",onClick:yt?this.handleSelect:null},Ye(ee,"variableValue",{cursor:ze===!1?"default":"pointer"})),this.getValue(J,Kt)),lt&&!_t&&_().createElement("span",Ye(ee,"comma"),","),Ge?_().createElement(eh,{rowHovered:this.state.hovered,hidden:Kt,src:J.value,clickCallback:Ge,theme:ee,namespace:[].concat(j(de),[J.name])}):null,je!==!1&&Kt===!1?this.getEditIcon():null,Ke!==!1&&Kt===!1?this.getRemoveIcon():null)}}])})(_().PureComponent);var th=(function(P){function b(){var x;p(this,b);for(var G=arguments.length,J=new Array(G),re=0;re<G;re++)J[re]=arguments[re];return(x=C(this,b,[].concat(J))).getObjectSize=function(){var ce=x.props,ee=ce.size,de=ce.theme;if(ce.displayObjectSize)return _().createElement("span",Object.assign({className:"object-size"},Ye(de,"object-size")),ee," item",ee===1?"":"s")},x.getAddAttribute=function(ce){var ee=x.props,de=ee.theme,Ae=ee.namespace,Ge=ee.name,je=ee.src,Ke=ee.rjvId,ze=ee.depth;return _().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:ce?"inline-block":"none"}},_().createElement(QT,Object.assign({className:"click-to-add-icon"},Ye(de,"addVarIcon"),{onClick:function(){var pt={name:ze>0?Ge:null,namespace:Ae.splice(0,Ae.length-1),existing_value:je,variable_removed:!1,key_name:null};k(je)==="object"?Fs.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:Ke,data:pt}):Fs.dispatch({name:"VARIABLE_ADDED",rjvId:Ke,data:d(d({},pt),{},{new_value:[].concat(j(je),[null])})})}})))},x.getRemoveObject=function(ce){var ee=x.props,de=ee.theme,Ae=ee.namespace,Ge=ee.name,je=ee.src,Ke=ee.rjvId;if(Ae.length!==1)return _().createElement("span",{className:"click-to-remove",style:{display:ce?"inline-block":"none"}},_().createElement(yl,Object.assign({className:"click-to-remove-icon"},Ye(de,"removeVarIcon"),{onClick:function(){Fs.dispatch({name:"VARIABLE_REMOVED",rjvId:Ke,data:{name:Ge,namespace:Ae.splice(0,Ae.length-1),existing_value:je,variable_removed:!0}})}})))},x.render=function(){var ce=x.props,ee=ce.theme,de=ce.onDelete,Ae=ce.onAdd,Ge=ce.enableClipboard,je=ce.src,Ke=ce.namespace,ze=ce.rowHovered;return _().createElement("div",Object.assign({},Ye(ee,"object-meta-data"),{className:"object-meta-data",onClick:function(pt){pt.stopPropagation()}}),x.getObjectSize(),Ge?_().createElement(eh,{rowHovered:ze,clickCallback:Ge,src:je,theme:ee,namespace:Ke}):null,Ae!==!1?x.getAddAttribute(ze):null,de!==!1?x.getRemoveObject(ze):null)},x}return N(b,P),R(b)})(_().PureComponent);function Ur(P){var b=P.parent_type,x=P.namespace,G=P.quotesOnKeys,J=P.theme,re=P.jsvRoot,ce=P.name,ee=P.displayArrayKey,de=P.onKeyClick,Ae=P.name?P.name:"",Ge=typeof de=="function"?de:null;return!re||ce!==!1&&ce!==null?b==="array"?ee?_().createElement("span",Object.assign({},Ye(J,"array-key"),{key:x,onClick:Ge}),_().createElement("span",{className:"array-key"},Ae),_().createElement("span",Ye(J,"colon"),":")):_().createElement("span",null):_().createElement("span",Object.assign({},Ye(J,"object-name"),{key:x,onClick:Ge}),_().createElement("span",{className:"object-key"},G&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",null,Ae),G&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",Ye(J,"colon"),":")):_().createElement("span",null)}function Zo(P){var b=P.theme;switch(P.iconStyle){case"triangle":return _().createElement(JT,Object.assign({},Ye(b,"expanded-icon"),{className:"expanded-icon"}));case"square":return _().createElement(ym,Object.assign({},Ye(b,"expanded-icon"),{className:"expanded-icon"}));default:return _().createElement(_l,Object.assign({},Ye(b,"expanded-icon"),{className:"expanded-icon"}))}}function ZE(P){var b=P.theme;switch(P.iconStyle){case"triangle":return _().createElement(qT,Object.assign({},Ye(b,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return _().createElement(ru,Object.assign({},Ye(b,"collapsed-icon"),{className:"collapsed-icon"}));default:return _().createElement(Ll,Object.assign({},Ye(b,"collapsed-icon"),{className:"collapsed-icon"}))}}var nh=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace"],ef=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).toggleCollapsed=function(J){for(var re=G.state.expanded,ce=[],ee=Math.max(re.length||0,J+1),de=0;de<ee;de++)ce[de]=re[de]===!0;ce[J]=!ce[J],G.setState({expanded:ce})},G.handleKeySelect=function(){var J=G.props,re=J.name,ce=J.namespace,ee=J.onSelect,de=J.src;if(typeof ee=="function"){var Ae=j(ce);Ae.shift(),Ae.length>0&&Ae.pop(),ee({name:re,value:de,type:"array",namespace:Ae})}},G.state={expanded:[]},G}return N(b,P),R(b,[{key:"getExpandedIcon",value:function(x){var G=this.props,J=G.theme,re=G.iconStyle;return this.state.expanded[x]?_().createElement(Zo,{theme:J,iconStyle:re}):_().createElement(ZE,{theme:J,iconStyle:re})}},{key:"render",value:function(){var x=this,G=this.props,J=G.src,re=G.groupArraysAfterLength,ce=(G.depth,G.name),ee=G.theme,de=G.jsvRoot,Ae=G.namespace,Ge=W(G,nh),je=0,Ke=5*this.props.indentWidth;de||(je=5*this.props.indentWidth);var ze=re,pt=Math.ceil(J.length/ze);return _().createElement("div",Object.assign({className:"object-key-val"},Ye(ee,de?"jsv-root":"objectKeyVal",{paddingLeft:je})),_().createElement(Ur,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement("span",null,_().createElement(th,Object.assign({size:J.length},this.props))),j(Array(pt)).map(function(Ht,lt){return _().createElement("div",Object.assign({key:lt,className:"object-key-val array-group"},Ye(ee,"objectKeyVal",{marginLeft:6,paddingLeft:Ke})),_().createElement("span",Ye(ee,"brace-row"),_().createElement("div",Object.assign({className:"icon-container"},Ye(ee,"icon-container"),{onClick:function(_t){x.toggleCollapsed(lt)}}),x.getExpandedIcon(lt)),x.state.expanded[lt]?_().createElement(Ei,Object.assign({key:ce+lt,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:ze,index_offset:lt*ze,src:J.slice(lt*ze,lt*ze+ze),namespace:Ae,type:"array",parent_type:"array_group",theme:ee,showComma:x.props.showComma,isLast:lt===pt-1},Ge)):_().createElement("span",Object.assign({},Ye(ee,"brace"),{onClick:function(_t){x.toggleCollapsed(lt)},className:"array-group-brace"}),"[",_().createElement("div",Object.assign({},Ye(ee,"array-group-meta-data"),{className:"array-group-meta-data"}),_().createElement("span",Object.assign({className:"object-size"},Ye(ee,"object-size")),lt*ze," - ",lt*ze+ze-1>J.length?J.length-1:lt*ze+ze-1)),"]")))}))}}])})(_().PureComponent),rh=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],bl=(function(P){function b(x){var G;p(this,b),(G=C(this,b,[x])).handleToggleCollapsed=function(){G.setState({expanded:!G.state.expanded},function(){xr.set(G.props.rjvId,G.props.namespace,"expanded",G.state.expanded)})},G.handleKeySelect=function(){var re=G.props,ce=re.name,ee=re.namespace,de=re.onSelect,Ae=re.src,Ge=G.state.object_type;if(typeof de=="function"){var je=j(ee);je.shift(),je.length>0&&je.pop(),de({name:ce,value:Ae,type:Ge,namespace:je})}},G.getObjectContent=function(re,ce,ee){return _().createElement("div",{className:"pushed-content object-container"},_().createElement("div",Object.assign({className:"object-content"},Ye(G.props.theme,"pushed-content")),G.renderObjectContents(ce,ee)))},G.getEllipsis=function(){return G.state.size===0?null:_().createElement("div",Object.assign({},Ye(G.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:G.handleToggleCollapsed}),"...")},G.getObjectMetaData=function(re){var ce=G.state,ee=ce.size,de=ce.hovered;return _().createElement(th,Object.assign({rowHovered:de,size:ee},G.props))},G.renderObjectContents=function(re,ce){var ee,de=G.props,Ae=de.depth,Ge=de.parent_type,je=de.index_offset,Ke=de.groupArraysAfterLength,ze=de.namespace,pt=de.showComma,Ht=G.state.object_type,lt=[],_t=Object.keys(re||{});return G.props.sortKeys&&Ht!=="array"&&(_t=_t.sort()),_t.forEach(function(Kt,yt){ee=new Pm(Kt,re[Kt],ce.bigNumber);var Vn=yt===_t.length-1;if(Ge==="array_group"&&je&&(ee.name=parseInt(ee.name,10)+je),Object.prototype.hasOwnProperty.call(re,Kt)&&ee.type.toLowerCase()!=="window")if(G.isCircularReference(ee))lt.push(_().createElement(Z,Object.assign({key:ee.name,depth:Ae+1,name:ee.name,src:ee.value,namespace:ze.concat(ee.name),type:"array",parent_type:Ht,isLast:Vn,showComma:pt,singleIndent:5,indentWidth:G.props.indentWidth},ce)));else if(ee.type==="object")lt.push(_().createElement(Ei,Object.assign({key:ee.name,depth:Ae+1,name:ee.name,src:ee.value,namespace:ze.concat(ee.name),parent_type:Ht,isLast:Vn,showComma:pt,listOfAncestors:G.listOfAncestors.concat([G.props.src])},ce)));else if(ee.type==="array"){var Or=Ei;Ke&&ee.value.length>Ke&&(Or=ef),lt.push(_().createElement(Or,Object.assign({key:ee.name,depth:Ae+1,name:ee.name,src:ee.value,namespace:ze.concat(ee.name),type:"array",parent_type:Ht,isLast:Vn,showComma:pt,listOfAncestors:G.listOfAncestors.concat([G.props.src])},ce)))}else lt.push(_().createElement(bm,Object.assign({key:ee.name+"_"+ze,variable:ee,singleIndent:5,namespace:ze,type:G.props.type,isLast:Vn,showComma:pt},ce)))}),lt};var J=b.getState(x);return G.state=d(d({},J),{},{prevProps:{}}),G.listOfAncestors=Array.from(G.props.listOfAncestors||[]),G.listOfAncestors.push(x.src),G}return N(b,P),R(b,[{key:"getBraceStart",value:function(x,G){var J=this.props,re=J.theme,ce=J.iconStyle;if(J.parent_type==="array_group")return _().createElement("span",null,_().createElement("span",Ye(re,"brace"),x==="array"?"[":"{"));var ee=G?Zo:ZE;return _().createElement("span",null,_().createElement("span",Object.assign({onClick:this.handleToggleCollapsed},Ye(re,"brace-row")),_().createElement("div",Object.assign({className:"icon-container"},Ye(re,"icon-container")),_().createElement(ee,{theme:re,iconStyle:ce})),_().createElement(Ur,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement("span",Ye(re,"brace"),x==="array"?"[":"{")))}},{key:"isCircularReference",value:function(x){return this.listOfAncestors.indexOf(x.value)>-1||x.value===this.props.src}},{key:"render",value:function(){var x=this,G=this.props,J=G.depth,re=G.src,ce=(G.namespace,G.name,G.type,G.parent_type),ee=G.theme,de=G.jsvRoot,Ae=G.iconStyle,Ge=G.showComma,je=G.isLast,Ke=W(G,rh),ze=this.state,pt=ze.object_type,Ht=ze.expanded,lt={};return de||ce==="array_group"?ce==="array_group"&&(lt.borderLeft=0,lt.display="inline"):lt.paddingLeft=5*this.props.indentWidth,_().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return x.setState(d(d({},x.state),{},{hovered:!0}))},onMouseLeave:function(){return x.setState(d(d({},x.state),{},{hovered:!1}))}},Ye(ee,de?"jsv-root":"objectKeyVal",lt)),this.getBraceStart(pt,Ht),Ht?this.getObjectContent(J,re,d({theme:ee,iconStyle:Ae},Ke)):this.getEllipsis(),_().createElement("span",{className:"brace-row"},_().createElement("span",{style:d(d({},Ye(ee,"brace").style),{},{paddingLeft:Ht?"3px":"0px"})},pt==="array"?"]":"}")),Ge&&!je&&!de&&_().createElement("span",Ye(ee,"comma"),","),this.getObjectMetaData(re))}}],[{key:"getDerivedStateFromProps",value:function(x,G){var J=G.prevProps;return x.src!==J.src||x.collapsed!==J.collapsed||x.name!==J.name||x.namespace!==J.namespace||x.rjvId!==J.rjvId?d(d({},b.getState(x)),{},{prevProps:x}):null}}])})(_().PureComponent);bl.getState=function(P){var b=Object.keys(P.src).length,x=(P.collapsed===!1||P.collapsed!==!0&&P.collapsed>P.depth)&&(!P.shouldCollapse||P.shouldCollapse({name:P.name,src:P.src,type:k(P.src),namespace:P.namespace})===!1)&&b!==0;return{expanded:xr.get(P.rjvId,P.namespace,"expanded",x),object_type:P.type==="array"?"array":"object",parent_type:P.type==="array"?"array":"object",size:b,hovered:!1}};var Pm=R(function P(b,x,G){p(this,P),this.name=b,this.value=x,this.type=k(x,G)});Y(bl);const Ei=bl;var tf=(function(P){function b(){var x;p(this,b);for(var G=arguments.length,J=new Array(G),re=0;re<G;re++)J[re]=arguments[re];return(x=C(this,b,[].concat(J))).render=function(){var ce,ee,de,Ae,Ge=x.props,je=[Ge.name],Ke=Ei;return typeof Ge.name!="object"||Array.isArray(Ge.name)||(je=[((ce=Ge.name)===null||ce===void 0?void 0:ce.displayName)||((ee=Ge.name)===null||ee===void 0?void 0:ee.name)||((de=Ge.name)===null||de===void 0||(Ae=de.type)===null||Ae===void 0?void 0:Ae.name)||"Anonymous"]),Array.isArray(Ge.src)&&Ge.groupArraysAfterLength&&Ge.src.length>Ge.groupArraysAfterLength&&(Ke=ef),_().createElement("div",{className:"pretty-json-container object-container"},_().createElement("div",{className:"object-content"},_().createElement(Ke,Object.assign({namespace:je,depth:0,jsvRoot:!0},Ge))))},x}return N(b,P),R(b)})(_().PureComponent),Pl=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).handleCloseModal=function(){Fs.dispatch({rjvId:G.props.rjvId,name:"RESET"})},G.handleSubmit=function(){G.props.submit(G.state.input)},G.state={input:x.input?x.input:""},G}return N(b,P),R(b,[{key:"render",value:function(){var x=this,G=this.props,J=G.theme,re=G.rjvId,ce=G.isValid,ee=this.state.input,de=ce(ee);return _().createElement("div",Object.assign({className:"key-modal-request"},Ye(J,"key-modal-request"),{onClick:this.handleCloseModal}),_().createElement("div",Object.assign({},Ye(J,"key-modal"),{onClick:function(Ae){Ae.stopPropagation()}}),_().createElement("div",Ye(J,"key-modal-label"),"Key Name:"),_().createElement("div",{style:{position:"relative"}},_().createElement("input",Object.assign({},Ye(J,"key-modal-input"),{className:"key-modal-input",ref:function(Ae){return Ae&&Ae.focus()},spellCheck:!1,value:ee,placeholder:"...",onChange:function(Ae){x.setState({input:Ae.target.value})},onKeyPress:function(Ae){de&&Ae.key==="Enter"?x.handleSubmit():Ae.key==="Escape"&&x.handleCloseModal()}})),de?_().createElement(QE,Object.assign({},Ye(J,"key-modal-submit"),{className:"key-modal-submit",onClick:this.handleSubmit})):null),_().createElement("span",Ye(J,"key-modal-cancel"),_().createElement(JE,Object.assign({},Ye(J,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Fs.dispatch({rjvId:re,name:"RESET"})}})))))}}])})(_().PureComponent),nf=(function(P){function b(){var x;p(this,b);for(var G=arguments.length,J=new Array(G),re=0;re<G;re++)J[re]=arguments[re];return(x=C(this,b,[].concat(J))).isValid=function(ce){var ee=x.props.rjvId,de=xr.get(ee,"action","new-key-request");return ce!==""&&Object.keys(de.existing_value).indexOf(ce)===-1},x.submit=function(ce){var ee=x.props.rjvId,de=xr.get(ee,"action","new-key-request");de.new_value=d({},de.existing_value),de.new_value[ce]=x.props.defaultValue,Fs.dispatch({name:"VARIABLE_ADDED",rjvId:ee,data:de})},x}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.active,J=x.theme,re=x.rjvId;return G?_().createElement(Pl,{rjvId:re,theme:J,isValid:this.isValid,submit:this.submit}):null}}])})(_().PureComponent),sh=(function(P){function b(){return p(this,b),C(this,b,arguments)}return N(b,P),R(b,[{key:"render",value:function(){var x=this.props,G=x.message,J=x.active,re=x.theme,ce=x.rjvId;return J?_().createElement("div",Object.assign({className:"validation-failure"},Ye(re,"validation-failure"),{onClick:function(){Fs.dispatch({rjvId:ce,name:"RESET"})}}),_().createElement("span",Ye(re,"validation-failure-label"),G),_().createElement(JE,Ye(re,"validation-failure-clear"))):null}}])})(_().PureComponent),Hs=(function(P){function b(x){var G;return p(this,b),(G=C(this,b,[x])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),G.getListeners=function(){return{reset:G.resetState,"variable-update":G.updateSrc,"add-key-request":G.addKeyRequest}},G.updateSrc=function(){var J,re=xr.get(G.rjvId,"action","variable-update"),ce=re.name,ee=re.namespace,de=re.new_value,Ae=re.existing_value,Ge=re.updated_src,je=re.type,Ke=G.props,ze=Ke.onEdit,pt=Ke.onDelete,Ht=Ke.onAdd,lt={existing_src:G.state.src,new_value:de,updated_src:Ge,name:ce,namespace:ee,existing_value:Ae};switch(je){case"variable-added":J=Ht(lt);break;case"variable-edited":J=ze(lt);break;case"variable-removed":J=pt(lt)}J!==!1?(xr.set(G.rjvId,"global","src",Ge),G.setState({src:Ge})):G.setState({validationFailure:!0})},G.addKeyRequest=function(){G.setState({addKeyRequest:!0})},G.resetState=function(){G.setState({validationFailure:!1,addKeyRequest:!1})},G.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:b.defaultProps.src,name:b.defaultProps.name,theme:b.defaultProps.theme,validationMessage:b.defaultProps.validationMessage,prevSrc:b.defaultProps.src,prevName:b.defaultProps.name,prevTheme:b.defaultProps.theme},G}return N(b,P),R(b,[{key:"componentDidMount",value:function(){xr.set(this.rjvId,"global","src",this.state.src);var x=this.getListeners();for(var G in x)xr.on(G+"-"+this.rjvId,x[G]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(x,G){G.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),G.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),x.src!==this.state.src&&xr.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var x=this.getListeners();for(var G in x)xr.removeListener(G+"-"+this.rjvId,x[G])}},{key:"render",value:function(){var x=this.state,G=x.validationFailure,J=x.validationMessage,re=x.addKeyRequest,ce=x.theme,ee=x.src,de=x.name,Ae=this.props,Ge=Ae.style,je=Ae.defaultValue;return _().createElement("div",{className:"react-json-view",style:d(d({},Ye(ce,"app-container").style),Ge)},_().createElement(sh,{message:J,active:G,theme:ce,rjvId:this.rjvId}),_().createElement(tf,Object.assign({},this.props,{src:ee,name:de,theme:ce,type:k(ee),rjvId:this.rjvId})),_().createElement(nf,{active:re,theme:ce,rjvId:this.rjvId,defaultValue:je}))}}],[{key:"getDerivedStateFromProps",value:function(x,G){if(x.src!==G.prevSrc||x.name!==G.prevName||x.theme!==G.prevTheme){var J={src:x.src,name:x.name,theme:x.theme,validationMessage:x.validationMessage,prevSrc:x.src,prevName:x.name,prevTheme:x.theme};return b.validateState(J)}return null}}])})(_().PureComponent);Hs.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(P){return P.metaKey||P.ctrlKey},bigNumber:null,showComma:!0},Hs.validateState=function(P){var b={};return k(P.theme)!=="object"||(function(x){var G=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(k(x)==="object"){for(var J=0;J<G.length;J++)if(!(G[J]in x))return!1;return!0}return!1})(P.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),b.theme="rjv-default"),k(P.src)!=="object"&&k(P.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),b.name="ERROR",b.src={message:"src property must be a valid json object"}),d(d({},P),b)},Y(Hs);const ea=Hs})(),l})())})(TR)),TR.exports}var _ae=Cae();const XM=aC(_ae),Lae=XM.default||XM,bH=/^\s*at .*(\S+:\d+|\(native\))/m,yae=/^(eval@)?(\[native code\])?$/;function bae(e,t){return e.match(bH)?Pae(e):Dae(e)}function PH(e){if(!e.includes(":"))return[e,void 0,void 0];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]}function DH(e,t){return e}function Pae(e,t){return DH(e.split(`
283
+ `).filter(r=>!!r.match(bH))).map(r=>{r.includes("(eval ")&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=r.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const o=s.match(/ (\(.+\)$)/);s=o?s.replace(o[0],""):s;const l=PH(o?o[1]:s),c=o&&s||void 0,E=["eval","<anonymous>"].includes(l[0])?void 0:l[0];return{function:c,file:E,line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:r}})}function Dae(e,t){return DH(e.split(`
284
+ `).filter(r=>!r.match(yae))).map(r=>{if(r.includes(" > eval")&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!r.includes("@")&&!r.includes(":"))return{function:r};{const s=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,o=r.match(s),l=o&&o[1]?o[1]:void 0,c=PH(r.replace(s,""));return{function:l,file:c[0],line:c[1]?+c[1]:void 0,col:c[2]?+c[2]:void 0,raw:r}}})}function vae(e){if(!e)return e;const t=e.match(/node_modules\/\.pnpm\/[^/]+\/node_modules\/(.+)/);if(t)return t[1];const n=e.match(/node_modules\/(.+)/);if(n)return n[1];const r=e.match(/\/(app|src|commands|start|config|providers|tests|bin)\/.+/);return r?r[0].slice(1):e}function Mae(e){return!e||e.startsWith("node:")||e.includes("node:internal")?"native":e.includes("node_modules")?"module":"app"}function xae(e){const t=[],n=e.split(`
285
+ `);for(const r of n){const s=r.trim();if(s){if(s.startsWith("caused by:")||s.startsWith("Caused by:")){t.push({raw:s,type:"app",isCauseSeparator:!0});continue}if(!s.startsWith("at ")){t.some(o=>o.isErrorMessage&&!o.isCauseSeparator)?t.push({raw:s,type:"app",isCauseSeparator:!0,isErrorMessage:!0}):t.push({raw:s,type:"app",isErrorMessage:!0});continue}}}try{for(const r of bae(e)){const s=r.file||void 0,o=Mae(s);t.push({raw:r.raw||"",functionName:r.function||void 0,file:s,shortFile:s?vae(s):void 0,line:r.line||void 0,column:r.col||void 0,type:o})}}catch{for(const r of n)r.trim().startsWith("at ")&&t.push({raw:r,type:"module"})}return t}function Uae({message:e}){return v.jsx("div",{className:"bg-destructive/5 px-4 py-2",children:v.jsx("span",{className:"font-mono text-xs font-medium text-destructive",children:e})})}function wae({message:e}){return v.jsx("div",{className:"border-t border-border/30 bg-destructive/5 px-4 py-2",children:v.jsx("span",{className:"font-mono text-xs font-semibold text-destructive/80",children:e})})}function Gae({frame:e}){if(e.isCauseSeparator)return v.jsx(wae,{message:e.raw});if(e.isErrorMessage)return v.jsx(Uae,{message:e.raw});const t=e.type==="app",n=e.type==="native";return v.jsxs("div",{className:`flex items-baseline gap-1.5 px-4 py-[3px] font-mono text-[11px] leading-relaxed ${t?"text-foreground":n?"text-muted-foreground/30":"text-muted-foreground/40"}`,children:[v.jsx("span",{className:"shrink-0 text-muted-foreground/25",children:"at"}),e.functionName&&v.jsx("span",{className:`shrink-0 ${t?"text-primary/80 font-medium":""}`,children:e.functionName}),e.shortFile&&v.jsxs("span",{className:"truncate",title:e.file,children:["(",v.jsx("span",{className:t?"text-foreground/60":"",children:e.shortFile}),e.line&&v.jsxs(v.Fragment,{children:[":",v.jsx("span",{className:t?"text-primary/70":"",children:e.line})]}),e.column&&v.jsxs(v.Fragment,{children:[":",e.column]}),")"]}),!e.functionName&&!e.shortFile&&v.jsx("span",{className:"truncate",children:e.raw.replace(/^\s*at\s+/,"")})]})}function aL({stack:e}){const[t,n]=D.useState(!1),[r,s]=D.useState(!1),o=D.useMemo(()=>xae(e),[e]),{appFrameCount:l,displayFrames:c,hiddenCount:E}=D.useMemo(()=>{const h=o.filter(g=>g.isErrorMessage||g.isCauseSeparator),d=o.filter(g=>!g.isErrorMessage&&!g.isCauseSeparator),p=d.filter(g=>g.type==="app"),S=t?d:p.length>0?p:d,R=[...h,...S],m=new Map(o.map((g,I)=>[g,I]));return R.sort((g,I)=>(m.get(g)??0)-(m.get(I)??0)),{appFrameCount:p.length,displayFrames:R,hiddenCount:d.length-S.length}},[o,t]),f=h=>{h.stopPropagation(),navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)};return v.jsxs("div",{className:"overflow-hidden rounded-md border border-border bg-card",children:[v.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 bg-muted/20 px-3 py-1.5",children:[v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Stack Trace"}),v.jsxs("div",{className:"flex items-center gap-1",children:[E>0&&v.jsxs("button",{onClick:h=>{h.stopPropagation(),n(!t)},className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[v.jsx(Pr,{icon:t?QC:$1,size:10}),t?`App only (${l})`:`+${E} framework`]}),v.jsx("button",{onClick:f,className:"flex size-6 items-center justify-center rounded text-muted-foreground/50 transition-colors hover:bg-muted hover:text-foreground",children:v.jsx(Pr,{icon:r?_S:CS,size:12,className:r?"text-emerald-400":""})})]})]}),v.jsx("div",{className:"max-h-[400px] overflow-auto py-1",children:c.map((h,d)=>v.jsx(Gae,{frame:h},d))})]})}function Bae(e){const t={};for(const[n,r]of Object.entries(e)){if(typeof r!="string"){t[n]=r;continue}try{t[n]=JSON.parse(r)}catch{t[n]=r}}return t}function Fae(e){return new Date(e).toLocaleString("en-US",{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function Hae({log:e}){const t=Object.keys(e.attributes).length>0,n=e.attributes.err,r=n&&typeof n=="object",s=NC({select:o=>o.location.pathname});return v.jsxs("div",{className:"space-y-3 px-4 py-3",children:[v.jsx("div",{className:"rounded-md bg-muted/30 p-3",children:v.jsx("p",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed text-foreground",children:e.body||"No message"})}),v.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-1 text-xs",children:[v.jsxs("div",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Time "}),v.jsx("span",{className:"font-mono text-foreground/70",children:Fae(e.timestamp)})]}),v.jsxs("div",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Severity "}),v.jsx("span",{className:"font-mono text-foreground/70",children:e.severityText??"INFO"})]}),e.serviceName&&v.jsxs("div",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Service "}),v.jsx("span",{className:"font-mono text-foreground/70",children:e.serviceName})]}),e.traceId&&v.jsxs("div",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Trace "}),v.jsx(AS,{to:"/traces/$traceId",params:{traceId:e.traceId},...v_(s)?{search:{from:s}}:{},className:"font-mono text-primary hover:underline",onClick:o=>o.stopPropagation(),children:e.traceId.substring(0,12)})]}),e.spanId&&v.jsxs("div",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Span "}),v.jsx("span",{className:"font-mono text-foreground/70",children:e.spanId.substring(0,12)})]})]}),r&&(n==null?void 0:n.stack)&&v.jsx(aL,{stack:n.stack}),t&&v.jsx("div",{className:"rounded-md bg-muted/30 p-3",children:v.jsx(Lae,{collapsed:2,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:o=>{const l=typeof o.src=="string"?o.src:JSON.stringify(o.src,null,2);navigator.clipboard.writeText(l)},iconStyle:"square",name:!1,src:Bae(e.attributes),style:{fontFamily:"var(--font-mono)",fontSize:"12px",backgroundColor:"transparent"},theme:"grayscale"})})]})}const Vae=[G_(),{id:"level",header:"Level",cell:({row:e})=>v.jsx(CX,{severity:e.original.severityText}),meta:{className:"w-16 px-3 py-2",headerClassName:"w-16 px-3 py-2"}},{id:"message",header:"Message",cell:({row:e})=>{const t=e.original.severityText==="ERROR"||e.original.severityText==="FATAL";return v.jsx("span",{className:`truncate font-mono ${t?"text-red-500/90":"text-foreground/80"}`,children:e.original.body})},meta:{className:"max-w-0 truncate px-3 py-2"}},XB(),{id:"traceId",header:()=>v.jsx("span",{className:"text-right",children:"Trace"}),cell:({row:e})=>e.original.traceId?v.jsx(w_,{traceId:e.original.traceId}):v.jsx("span",{className:"text-xs text-muted-foreground/30",children:"—"}),meta:{className:"w-28 py-2 pl-3 pr-1 text-right",headerClassName:"w-28 py-2 pl-3 pr-1 text-right"}},jB(e=>e.timestamp)];function kae({logs:e,onLoadMore:t,isLoadingMore:n}){return v.jsx(Hc,{columns:Vae,data:e,onLoadMore:t,isLoadingMore:n,emptyState:v.jsx(Vc,{label:"No logs yet"}),renderExpandedRow:r=>v.jsx(Hae,{log:r})})}const Yae=["ALL","DEBUG","INFO","WARN","ERROR","FATAL"],$M=50;function Wae(){const[e,t]=D.useState("ALL"),[n,r]=D.useState(""),[s,o]=D.useState(""),l=Ki(),c=D.useRef(void 0),{traceId:E}=ai({from:"__root__"}),f=D.useCallback(m=>{r(m),clearTimeout(c.current),c.current=setTimeout(()=>o(m),300)},[]);D.useEffect(()=>()=>clearTimeout(c.current),[]);const{data:h,fetchNextPage:d,hasNextPage:p,isFetchingNextPage:S}=xc(Wr.logs.index.infiniteQueryOptions({query:{limit:$M,...e!=="ALL"&&{severity:e},...s&&{search:s},...E&&{traceId:E}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(m,g)=>{var I;if(!((((I=m==null?void 0:m.data)==null?void 0:I.length)??0)<$M))return g.reduce((C,L)=>{var N;return C+(((N=L==null?void 0:L.data)==null?void 0:N.length)??0)},0)}}));Bc(m=>{m.type==="logs"&&l.invalidateQueries({queryKey:Wr.logs.index.pathKey()})});const R=(h==null?void 0:h.pages.flatMap(m=>(m==null?void 0:m.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsxs(Fc,{title:"Logs",children:[v.jsx("div",{className:"flex h-7 items-center gap-0.5 rounded-md border border-border px-0.5",children:Yae.map(m=>v.jsx("button",{onClick:()=>t(m),className:`rounded px-2 py-0.5 text-xs transition-colors ${e===m?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"}`,children:m},m))}),v.jsx(Iae,{value:n,onChange:m=>f(m.target.value),placeholder:"Search logs..."})]}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(kae,{logs:R,onLoadMore:p?()=>d():void 0,isLoadingMore:S})})]})}const jae=yi("/logs")({component:Wae}),Xae=[{id:"jobName",header:"Job",cell:({row:e})=>v.jsx("span",{className:"text-foreground",children:e.original.jobName??e.original.rootSpanName})},{id:"queue",header:"Queue",cell:({row:e})=>v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:e.original.queueName??"—"})},{id:"status",header:"Status",cell:({row:e})=>v.jsx(aT,{statusCode:e.original.statusCode,httpStatus:null})},{id:"duration",header:()=>v.jsx("span",{className:"text-right",children:"Duration"}),cell:({row:e})=>v.jsx(wc,{ms:e.original.durationMs}),meta:{className:"px-3 py-2 text-right",headerClassName:"px-3 py-2 text-right"}},...DE(e=>e.startTime)];function $ae({jobs:e,onTraceClick:t,onLoadMore:n,isLoadingMore:r}){return v.jsx(Hc,{columns:Xae,data:e,onRowClick:s=>t(s.traceId),onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No jobs yet"})})}const KM=50;function Kae(){const e=Us(),t=Ki(),{traceId:n}=ai({from:"__root__"}),{data:r,fetchNextPage:s,hasNextPage:o,isFetchingNextPage:l}=xc(Wr.jobs.index.infiniteQueryOptions({query:{limit:KM,...n&&{traceId:n}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(E,f)=>{var h;if(!((((h=E==null?void 0:E.data)==null?void 0:h.length)??0)<KM))return f.reduce((d,p)=>{var S;return d+(((S=p==null?void 0:p.data)==null?void 0:S.length)??0)},0)}}));Bc(E=>{E.type==="traces"&&t.invalidateQueries({queryKey:Wr.jobs.index.pathKey()})});const c=(r==null?void 0:r.pages.flatMap(E=>(E==null?void 0:E.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"Jobs"}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx($ae,{jobs:c,onTraceClick:E=>e({to:"/traces/$traceId",params:{traceId:E},search:{from:"/jobs"}}),onLoadMore:o?()=>s():void 0,isLoadingMore:l})})]})}const zae=yi("/jobs")({component:Kae});function qae(e){if(!e)return"";try{return new URL(e).pathname}catch{return e}}const Jae=[{id:"method",header:"Method",cell:({row:e})=>v.jsx(ts,{color:"purple",children:e.original.method??"GET"}),meta:{className:"w-16 px-3 py-2",headerClassName:"w-16 px-3 py-2"}},{id:"domain",header:"Domain",cell:({row:e})=>v.jsx("span",{className:"font-mono text-xs text-foreground",children:e.original.domain??"—"}),meta:{className:"w-40 px-3 py-2",headerClassName:"w-40 px-3 py-2"}},{id:"path",header:"Path",cell:({row:e})=>{const t=qae(e.original.url)||e.original.spanName;return v.jsx("span",{className:"text-foreground",children:t})}},{id:"status",header:"Status",cell:({row:e})=>v.jsx(aT,{statusCode:e.original.statusText,httpStatus:e.original.statusCode})},{id:"duration",header:()=>v.jsx("span",{className:"text-right",children:"Duration"}),cell:({row:e})=>v.jsx(wc,{ms:e.original.durationMs}),meta:{className:"px-3 py-2 text-right",headerClassName:"px-3 py-2 text-right"}},...DE(e=>e.startTime)];function Qae({calls:e,onRowClick:t,onLoadMore:n,isLoadingMore:r}){return v.jsx(Hc,{columns:Jae,data:e,onRowClick:s=>t(s.traceId),onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No external calls yet"})})}const zM=100;function Zae(){const e=Us(),t=Ki(),{traceId:n}=ai({from:"__root__"}),{data:r,fetchNextPage:s,hasNextPage:o,isFetchingNextPage:l}=xc(Wr.external_calls.index.infiniteQueryOptions({query:{limit:zM,...n&&{traceId:n}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(E,f)=>{var h;if(!((((h=E==null?void 0:E.data)==null?void 0:h.length)??0)<zM))return f.reduce((d,p)=>{var S;return d+(((S=p==null?void 0:p.data)==null?void 0:S.length)??0)},0)}}));Bc(E=>{E.type==="traces"&&t.invalidateQueries({queryKey:Wr.external_calls.index.pathKey()})});const c=(r==null?void 0:r.pages.flatMap(E=>(E==null?void 0:E.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"External calls"}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(Qae,{calls:c,onRowClick:E=>e({to:"/traces/$traceId",params:{traceId:E},search:{from:"/external-calls"}}),onLoadMore:o?()=>s():void 0,isLoadingMore:l})})]})}const ele=yi("/external-calls")({component:Zae}),tle=[G_(),{id:"type",header:"Type",cell:({row:e})=>v.jsx(ts,{color:"danger",className:"max-w-[130px]",children:e.original.exceptionType??"Error"}),meta:{className:"w-[150px] max-w-[150px] px-3 py-2",headerClassName:"w-[150px] max-w-[150px] px-3 py-2"}},{id:"message",header:"Message",cell:({row:e})=>v.jsx("span",{className:"truncate font-mono text-foreground/80",children:e.original.exceptionMessage??"—"}),meta:{className:"max-w-0 truncate px-3 py-2"}},...DE(e=>e.timestamp)];function nle({exception:e,onViewTrace:t}){return v.jsxs("div",{className:"space-y-3 px-4 py-3",children:[v.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[v.jsx(ts,{color:"danger",children:e.exceptionType??"Error"}),v.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:e.exceptionMessage??"—"})]}),v.jsx(cl,{variant:"outline",size:"sm",onClick:()=>t(e.traceId),children:"View trace"})]}),e.exceptionStacktrace&&v.jsx("div",{className:"overflow-hidden rounded-md border border-border/40 bg-muted/20 p-3",children:v.jsx(aL,{stack:e.exceptionStacktrace})})]})}function rle({exceptions:e,onExceptionClick:t,onLoadMore:n,isLoadingMore:r}){return v.jsx(Hc,{columns:tle,data:e,onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No exceptions yet"}),renderExpandedRow:s=>v.jsx(nle,{exception:s,onViewTrace:t})})}const qM=50;function sle(){const e=Us(),t=Ki(),{traceId:n}=ai({from:"__root__"}),{data:r,fetchNextPage:s,hasNextPage:o,isFetchingNextPage:l}=xc(Wr.exceptions.index.infiniteQueryOptions({query:{limit:qM,...n&&{traceId:n}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(E,f)=>{var h;if(!((((h=E==null?void 0:E.data)==null?void 0:h.length)??0)<qM))return f.reduce((d,p)=>{var S;return d+(((S=p==null?void 0:p.data)==null?void 0:S.length)??0)},0)}}));Bc(E=>{E.type==="traces"&&t.invalidateQueries({queryKey:Wr.exceptions.index.pathKey()})});const c=(r==null?void 0:r.pages.flatMap(E=>(E==null?void 0:E.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"Exceptions"}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(rle,{exceptions:c,onExceptionClick:E=>e({to:"/traces/$traceId",params:{traceId:E},search:{from:"/exceptions"}}),onLoadMore:o?()=>s():void 0,isLoadingMore:l})})]})}const ile=yi("/exceptions")({component:sle}),ole=[{id:"commandName",header:"Command",cell:({row:e})=>v.jsx("span",{className:"inline-flex rounded bg-primary/10 px-1.5 py-0.5 font-mono text-xs font-medium text-primary",children:e.original.commandName??e.original.rootSpanName}),meta:{className:"px-3 py-2",headerClassName:"px-3 py-2"}},{id:"description",header:"Description",cell:({row:e})=>v.jsx("span",{className:"text-muted-foreground",children:e.original.commandDescription??"—"})},{id:"status",header:"Status",cell:({row:e})=>v.jsx(aT,{statusCode:e.original.statusCode,httpStatus:null})},{id:"duration",header:()=>v.jsx("span",{className:"text-right",children:"Duration"}),cell:({row:e})=>v.jsx(wc,{ms:e.original.durationMs}),meta:{className:"px-3 py-2 text-right",headerClassName:"px-3 py-2 text-right"}},...DE(e=>e.startTime)];function ale({commands:e,onTraceClick:t,onLoadMore:n,isLoadingMore:r}){return v.jsx(Hc,{columns:ole,data:e,onRowClick:s=>t(s.traceId),onLoadMore:n,isLoadingMore:r,emptyState:v.jsx(Vc,{label:"No commands yet"})})}const JM=50;function lle(){const e=Us(),t=Ki(),{traceId:n}=ai({from:"__root__"}),{data:r,fetchNextPage:s,hasNextPage:o,isFetchingNextPage:l}=xc(Wr.commands.index.infiniteQueryOptions({query:{limit:JM,...n&&{traceId:n}}},{pageParamKey:"offset",initialPageParam:0,getNextPageParam:(E,f)=>{var h;if(!((((h=E==null?void 0:E.data)==null?void 0:h.length)??0)<JM))return f.reduce((d,p)=>{var S;return d+(((S=p==null?void 0:p.data)==null?void 0:S.length)??0)},0)}}));Bc(E=>{E.type==="traces"&&t.invalidateQueries({queryKey:Wr.commands.index.pathKey()})});const c=(r==null?void 0:r.pages.flatMap(E=>(E==null?void 0:E.data)??[]))??[];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsx(Fc,{title:"Commands"}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(ale,{commands:c,onTraceClick:E=>e({to:"/traces/$traceId",params:{traceId:E},search:{from:"/commands"}}),onLoadMore:o?()=>s():void 0,isLoadingMore:l})})]})}const cle=yi("/commands")({component:lle}),ule=yi("/")({component:()=>v.jsx(kY,{to:"/requests"})});function Ele(){return v.jsx("div",{className:"flex flex-1 items-center justify-center",children:v.jsxs("svg",{className:"size-5 animate-spin text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[v.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),v.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})}const sm=D.createContext(null);sm.displayName="PanelGroupContext";const Un={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},lL=10,bc=D.useLayoutEffect,QM=lC.useId,fle=typeof QM=="function"?QM:()=>null;let dle=0;function cL(e=null){const t=fle(),n=D.useRef(e||t||null);return n.current===null&&(n.current=""+dle++),e??n.current}function vH({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:l,maxSize:c,minSize:E,onCollapse:f,onExpand:h,onResize:d,order:p,style:S,tagName:R="div",...m}){const g=D.useContext(sm);if(g===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:I,expandPanel:C,getPanelSize:L,getPanelStyle:N,groupId:y,isPanelCollapsed:_,reevaluatePanelConstraints:M,registerPanel:w,resizePanel:F,unregisterPanel:Y}=g,$=cL(l),W=D.useRef({callbacks:{onCollapse:f,onExpand:h,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:c,minSize:E},id:$,idIsFromProps:l!==void 0,order:p});D.useRef({didLogMissingDefaultSizeWarning:!1}),bc(()=>{const{callbacks:q,constraints:j}=W.current,k={...j};W.current.id=$,W.current.idIsFromProps=l!==void 0,W.current.order=p,q.onCollapse=f,q.onExpand=h,q.onResize=d,j.collapsedSize=n,j.collapsible=r,j.defaultSize=s,j.maxSize=c,j.minSize=E,(k.collapsedSize!==j.collapsedSize||k.collapsible!==j.collapsible||k.maxSize!==j.maxSize||k.minSize!==j.minSize)&&M(W.current,k)}),bc(()=>{const q=W.current;return w(q),()=>{Y(q)}},[p,$,w,Y]),D.useImperativeHandle(o,()=>({collapse:()=>{I(W.current)},expand:q=>{C(W.current,q)},getId(){return $},getSize(){return L(W.current)},isCollapsed(){return _(W.current)},isExpanded(){return!_(W.current)},resize:q=>{F(W.current,q)}}),[I,C,L,_,$,F]);const K=N(W.current,s);return D.createElement(R,{...m,children:e,className:t,id:$,style:{...K,...S},[Un.groupId]:y,[Un.panel]:"",[Un.panelCollapsible]:r||void 0,[Un.panelId]:$,[Un.panelSize]:parseFloat(""+K.flexGrow).toFixed(1)})}const MH=D.forwardRef((e,t)=>D.createElement(vH,{...e,forwardedRef:t}));vH.displayName="Panel";MH.displayName="forwardRef(Panel)";let sC=null,hR=-1,Ma=null;function Tle(e,t,n){const r=(t&BH)!==0,s=(t&FH)!==0,o=(t&HH)!==0,l=(t&VH)!==0;if(t){if(r)return o?"se-resize":l?"ne-resize":"e-resize";if(s)return o?"sw-resize":l?"nw-resize":"w-resize";if(o)return"s-resize";if(l)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function hle(){Ma!==null&&(document.head.removeChild(Ma),sC=null,Ma=null,hR=-1)}function oI(e,t,n){var r,s;const o=Tle(e,t);if(sC!==o){if(sC=o,Ma===null&&(Ma=document.createElement("style"),document.head.appendChild(Ma)),hR>=0){var l;(l=Ma.sheet)===null||l===void 0||l.removeRule(hR)}hR=(r=(s=Ma.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${o} !important;}`))!==null&&r!==void 0?r:-1}}function xH(e){return e.type==="keydown"}function UH(e){return e.type.startsWith("pointer")}function wH(e){return e.type.startsWith("mouse")}function im(e){if(UH(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(wH(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function ple(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Rle(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Sle(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:tx(e),b:tx(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;vt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:ex(ZM(n.a)),b:ex(ZM(n.b))};if(s.a===s.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=o.length;for(;c--;){const E=o[c];if(E===l.a)return 1;if(E===l.b)return-1}}return Math.sign(s.a-s.b)}const mle=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ale(e){var t;const n=getComputedStyle((t=GH(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function gle(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Ale(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||mle.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function ZM(e){let t=e.length;for(;t--;){const n=e[t];if(vt(n,"Missing node"),gle(n))return n}return null}function ex(e){return e&&Number(getComputedStyle(e).zIndex)||0}function tx(e){const t=[];for(;e;)t.push(e),e=GH(e);return t}function GH(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const BH=1,FH=2,HH=4,VH=8,Ole=ple()==="coarse";let Li=[],Zu=!1,xa=new Map,om=new Map;const Xd=new Set;function Ile(e,t,n,r,s){var o;const{ownerDocument:l}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:s},E=(o=xa.get(l))!==null&&o!==void 0?o:0;return xa.set(l,E+1),Xd.add(c),fS(),function(){var h;om.delete(e),Xd.delete(c);const d=(h=xa.get(l))!==null&&h!==void 0?h:1;if(xa.set(l,d-1),fS(),d===1&&xa.delete(l),Li.includes(c)){const p=Li.indexOf(c);p>=0&&Li.splice(p,1),am(),s("up",!0,null)}}}function Nle(e){const{target:t}=e,{x:n,y:r}=im(e);Zu=!0,uL({target:t,x:n,y:r}),fS(),Li.length>0&&(dS("down",e),am(),e.preventDefault(),kH(t)||e.stopImmediatePropagation())}function aI(e){const{x:t,y:n}=im(e);if(Zu&&e.type!=="pointerleave"&&e.buttons===0&&(Zu=!1,dS("up",e)),!Zu){const{target:r}=e;uL({target:r,x:t,y:n})}dS("move",e),am(),Li.length>0&&e.preventDefault()}function lI(e){const{target:t}=e,{x:n,y:r}=im(e);om.clear(),Zu=!1,Li.length>0&&(e.preventDefault(),kH(t)||e.stopImmediatePropagation()),dS("up",e),uL({target:t,x:n,y:r}),am(),fS()}function kH(e){let t=e;for(;t;){if(t.hasAttribute(Un.resizeHandle))return!0;t=t.parentElement}return!1}function uL({target:e,x:t,y:n}){Li.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Xd.forEach(s=>{const{element:o,hitAreaMargins:l}=s,c=o.getBoundingClientRect(),{bottom:E,left:f,right:h,top:d}=c,p=Ole?l.coarse:l.fine;if(t>=f-p&&t<=h+p&&n>=d-p&&n<=E+p){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Sle(r,o)>0){let R=r,m=!1;for(;R&&!R.contains(o);){if(Rle(R.getBoundingClientRect(),c)){m=!0;break}R=R.parentElement}if(m)return}Li.push(s)}})}function cI(e,t){om.set(e,t)}function am(){let e=!1,t=!1;Li.forEach(r=>{const{direction:s}=r;s==="horizontal"?e=!0:t=!0});let n=0;om.forEach(r=>{n|=r}),e&&t?oI("intersection",n):e?oI("horizontal",n):t?oI("vertical",n):hle()}let uI;function fS(){var e;(e=uI)===null||e===void 0||e.abort(),uI=new AbortController;const t={capture:!0,signal:uI.signal};Xd.size&&(Zu?(Li.length>0&&xa.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("contextmenu",lI,t),s.addEventListener("pointerleave",aI,t),s.addEventListener("pointermove",aI,t))}),xa.forEach((n,r)=>{const{body:s}=r;s.addEventListener("pointerup",lI,t),s.addEventListener("pointercancel",lI,t)})):xa.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("pointerdown",Nle,t),s.addEventListener("pointermove",aI,t))}))}function dS(e,t){Xd.forEach(n=>{const{setResizeHandlerState:r}=n,s=Li.includes(n);r(e,s,t)})}function Cle(){const[e,t]=D.useState(0);return D.useCallback(()=>t(n=>n+1),[])}function vt(e,t){if(!e)throw console.error(t),Error(t)}function Mc(e,t,n=lL){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Po(e,t,n=lL){return Mc(e,t,n)===0}function ys(e,t,n){return Mc(e,t,n)===0}function _le(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const s=e[r],o=t[r];if(!ys(s,o,n))return!1}return!0}function $u({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];vt(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:o,maxSize:l=100,minSize:c=0}=r;if(Mc(n,c)<0)if(o){const E=(s+c)/2;Mc(n,E)<0?n=s:n=c}else n=c;return n=Math.min(l,n),n=parseFloat(n.toFixed(lL)),n}function od({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(ys(e,0))return t;const l=[...t],[c,E]=r;vt(c!=null,"Invalid first pivot index"),vt(E!=null,"Invalid second pivot index");let f=0;if(o==="keyboard"){{const d=e<0?E:c,p=n[d];vt(p,`Panel constraints not found for index ${d}`);const{collapsedSize:S=0,collapsible:R,minSize:m=0}=p;if(R){const g=t[d];if(vt(g!=null,`Previous layout not found for panel index ${d}`),ys(g,S)){const I=m-g;Mc(I,Math.abs(e))>0&&(e=e<0?0-I:I)}}}{const d=e<0?c:E,p=n[d];vt(p,`No panel constraints found for index ${d}`);const{collapsedSize:S=0,collapsible:R,minSize:m=0}=p;if(R){const g=t[d];if(vt(g!=null,`Previous layout not found for panel index ${d}`),ys(g,m)){const I=g-S;Mc(I,Math.abs(e))>0&&(e=e<0?0-I:I)}}}}{const d=e<0?1:-1;let p=e<0?E:c,S=0;for(;;){const m=t[p];vt(m!=null,`Previous layout not found for panel index ${p}`);const I=$u({panelConstraints:n,panelIndex:p,size:100})-m;if(S+=I,p+=d,p<0||p>=n.length)break}const R=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-R:R}{let p=e<0?c:E;for(;p>=0&&p<n.length;){const S=Math.abs(e)-Math.abs(f),R=t[p];vt(R!=null,`Previous layout not found for panel index ${p}`);const m=R-S,g=$u({panelConstraints:n,panelIndex:p,size:m});if(!ys(R,g)&&(f+=R-g,l[p]=g,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?p--:p++}}if(_le(s,l))return s;{const d=e<0?E:c,p=t[d];vt(p!=null,`Previous layout not found for panel index ${d}`);const S=p+f,R=$u({panelConstraints:n,panelIndex:d,size:S});if(l[d]=R,!ys(R,S)){let m=S-R,I=e<0?E:c;for(;I>=0&&I<n.length;){const C=l[I];vt(C!=null,`Previous layout not found for panel index ${I}`);const L=C+m,N=$u({panelConstraints:n,panelIndex:I,size:L});if(ys(C,N)||(m-=N-C,l[I]=N),ys(m,0))break;e>0?I--:I++}}}const h=l.reduce((d,p)=>p+d,0);return ys(h,100)?l:s}function Lle({layout:e,panelsArray:t,pivotIndices:n}){let r=0,s=100,o=0,l=0;const c=n[0];vt(c!=null,"No pivot index found"),t.forEach((d,p)=>{const{constraints:S}=d,{maxSize:R=100,minSize:m=0}=S;p===c?(r=m,s=R):(o+=m,l+=R)});const E=Math.min(s,100-o),f=Math.max(r,100-l),h=e[c];return{valueMax:E,valueMin:f,valueNow:h}}function $d(e,t=document){return Array.from(t.querySelectorAll(`[${Un.resizeHandleId}][data-panel-group-id="${e}"]`))}function YH(e,t,n=document){const s=$d(e,n).findIndex(o=>o.getAttribute(Un.resizeHandleId)===t);return s??null}function WH(e,t,n){const r=YH(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function yle(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function jH(e,t=document){if(yle(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function lm(e,t=document){const n=t.querySelector(`[${Un.resizeHandleId}="${e}"]`);return n||null}function ble(e,t,n,r=document){var s,o,l,c;const E=lm(t,r),f=$d(e,r),h=E?f.indexOf(E):-1,d=(s=(o=n[h])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,p=(l=(c=n[h+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[d,p]}function Ple({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:l}){D.useRef({didWarnAboutMissingResizeHandle:!1}),bc(()=>{if(!o)return;const c=$d(n,o);for(let E=0;E<s.length-1;E++){const{valueMax:f,valueMin:h,valueNow:d}=Lle({layout:r,panelsArray:s,pivotIndices:[E,E+1]}),p=c[E];if(p!=null){const S=s[E];vt(S,`No panel data found for index "${E}"`),p.setAttribute("aria-controls",S.id),p.setAttribute("aria-valuemax",""+Math.round(f)),p.setAttribute("aria-valuemin",""+Math.round(h)),p.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{c.forEach((E,f)=>{E.removeAttribute("aria-controls"),E.removeAttribute("aria-valuemax"),E.removeAttribute("aria-valuemin"),E.removeAttribute("aria-valuenow")})}},[n,r,s,o]),D.useEffect(()=>{if(!o)return;const c=t.current;vt(c,"Eager values not found");const{panelDataArray:E}=c,f=jH(n,o);vt(f!=null,`No group found for id "${n}"`);const h=$d(n,o);vt(h,`No resize handles found for group id "${n}"`);const d=h.map(p=>{const S=p.getAttribute(Un.resizeHandleId);vt(S,"Resize handle element has no handle id attribute");const[R,m]=ble(n,S,E,o);if(R==null||m==null)return()=>{};const g=I=>{if(!I.defaultPrevented)switch(I.key){case"Enter":{I.preventDefault();const C=E.findIndex(L=>L.id===R);if(C>=0){const L=E[C];vt(L,`No panel data found for index ${C}`);const N=r[C],{collapsedSize:y=0,collapsible:_,minSize:M=0}=L.constraints;if(N!=null&&_){const w=od({delta:ys(N,y)?M-y:y-N,initialLayout:r,panelConstraints:E.map(F=>F.constraints),pivotIndices:WH(n,S,o),prevLayout:r,trigger:"keyboard"});r!==w&&l(w)}}break}}};return p.addEventListener("keydown",g),()=>{p.removeEventListener("keydown",g)}});return()=>{d.forEach(p=>p())}},[o,e,t,n,r,s,l])}function nx(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function XH(e,t){const n=e==="horizontal",{x:r,y:s}=im(t);return n?r:s}function Dle(e,t,n,r,s){const o=n==="horizontal",l=lm(t,s);vt(l,`No resize handle element found for id "${t}"`);const c=l.getAttribute(Un.groupId);vt(c,"Resize handle element has no group id attribute");let{initialCursorPosition:E}=r;const f=XH(n,e),h=jH(c,s);vt(h,`No group element found for id "${c}"`);const d=h.getBoundingClientRect(),p=o?d.width:d.height;return(f-E)/p*100}function vle(e,t,n,r,s,o){if(xH(e)){const l=n==="horizontal";let c=0;e.shiftKey?c=100:s!=null?c=s:c=10;let E=0;switch(e.key){case"ArrowDown":E=l?0:c;break;case"ArrowLeft":E=l?-c:0;break;case"ArrowRight":E=l?c:0;break;case"ArrowUp":E=l?0:-c;break;case"End":E=100;break;case"Home":E=-100;break}return E}else return r==null?0:Dle(e,t,n,r,o)}function Mle({panelDataArray:e}){const t=Array(e.length),n=e.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<e.length;o++){const l=n[o];vt(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;c!=null&&(r++,t[o]=c,s-=c)}for(let o=0;o<e.length;o++){const l=n[o];vt(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;if(c!=null)continue;const E=e.length-r,f=s/E;r++,t[o]=f,s-=f}return t}function wu(e,t,n){t.forEach((r,s)=>{const o=e[s];vt(o,`Panel data not found for index ${s}`);const{callbacks:l,constraints:c,id:E}=o,{collapsedSize:f=0,collapsible:h}=c,d=n[E];if(d==null||r!==d){n[E]=r;const{onCollapse:p,onExpand:S,onResize:R}=l;R&&R(r,d),h&&(p||S)&&(S&&(d==null||Po(d,f))&&!Po(r,f)&&S(),p&&(d==null||!Po(d,f))&&Po(r,f)&&p())}})}function Hp(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function xle({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:s,precision:o=3}){const l=n[s];let c;return l==null?c=e!=null?e.toFixed(o):"1":r.length===1?c="1":c=l.toFixed(o),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Ule(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function rx(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function $H(e){return`react-resizable-panels:${e}`}function KH(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=t;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function zH(e,t){try{const n=$H(e),r=t.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function wle(e,t,n){var r,s;const o=(r=zH(e,n))!==null&&r!==void 0?r:{},l=KH(t);return(s=o[l])!==null&&s!==void 0?s:null}function Gle(e,t,n,r,s){var o;const l=$H(e),c=KH(t),E=(o=zH(e,s))!==null&&o!==void 0?o:{};E[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(l,JSON.stringify(E))}catch(f){console.error(f)}}function sx({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((o,l)=>o+l,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!ys(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const l=n[o];vt(l!=null,`No layout data found for index ${o}`);const c=100/r*l;n[o]=c}let s=0;for(let o=0;o<t.length;o++){const l=n[o];vt(l!=null,`No layout data found for index ${o}`);const c=$u({panelConstraints:t,panelIndex:o,size:l});l!=c&&(s+=l-c,n[o]=c)}if(!ys(s,0))for(let o=0;o<t.length;o++){const l=n[o];vt(l!=null,`No layout data found for index ${o}`);const c=l+s,E=$u({panelConstraints:t,panelIndex:o,size:c});if(l!==E&&(s-=E-l,n[o]=E,ys(s,0)))break}return n}const Ble=100,ad={getItem:e=>(rx(ad),ad.getItem(e)),setItem:(e,t)=>{rx(ad),ad.setItem(e,t)}},ix={};function qH({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:l=null,keyboardResizeBy:c=null,storage:E=ad,style:f,tagName:h="div",...d}){const p=cL(o),S=D.useRef(null),[R,m]=D.useState(null),[g,I]=D.useState([]),C=Cle(),L=D.useRef({}),N=D.useRef(new Map),y=D.useRef(0),_=D.useRef({autoSaveId:e,direction:r,dragState:R,id:p,keyboardResizeBy:c,onLayout:l,storage:E}),M=D.useRef({layout:g,panelDataArray:[],panelDataArrayChanged:!1});D.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),D.useImperativeHandle(s,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:ue}=M.current;return ue},setLayout:ue=>{const{onLayout:le}=_.current,{layout:he,panelDataArray:se}=M.current,fe=sx({layout:ue,panelConstraints:se.map(ge=>ge.constraints)});nx(he,fe)||(I(fe),M.current.layout=fe,le&&le(fe),wu(se,fe,L.current))}}),[]),bc(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=R,_.current.id=p,_.current.onLayout=l,_.current.storage=E}),Ple({committedValuesRef:_,eagerValuesRef:M,groupId:p,layout:g,panelDataArray:M.current.panelDataArray,setLayout:I,panelGroupElement:S.current}),D.useEffect(()=>{const{panelDataArray:ue}=M.current;if(e){if(g.length===0||g.length!==ue.length)return;let le=ix[e];le==null&&(le=Ule(Gle,Ble),ix[e]=le);const he=[...ue],se=new Map(N.current);le(e,he,se,g,E)}},[e,g,E]),D.useEffect(()=>{});const w=D.useCallback(ue=>{const{onLayout:le}=_.current,{layout:he,panelDataArray:se}=M.current;if(ue.constraints.collapsible){const fe=se.map(He=>He.constraints),{collapsedSize:ge=0,panelSize:Le,pivotIndices:We}=ql(se,ue,he);if(vt(Le!=null,`Panel size not found for panel "${ue.id}"`),!Po(Le,ge)){N.current.set(ue.id,Le);const ot=Yu(se,ue)===se.length-1?Le-ge:ge-Le,Me=od({delta:ot,initialLayout:he,panelConstraints:fe,pivotIndices:We,prevLayout:he,trigger:"imperative-api"});Hp(he,Me)||(I(Me),M.current.layout=Me,le&&le(Me),wu(se,Me,L.current))}}},[]),F=D.useCallback((ue,le)=>{const{onLayout:he}=_.current,{layout:se,panelDataArray:fe}=M.current;if(ue.constraints.collapsible){const ge=fe.map(Ue=>Ue.constraints),{collapsedSize:Le=0,panelSize:We=0,minSize:He=0,pivotIndices:ot}=ql(fe,ue,se),Me=le??He;if(Po(We,Le)){const Ue=N.current.get(ue.id),Xe=Ue!=null&&Ue>=Me?Ue:Me,Be=Yu(fe,ue)===fe.length-1?We-Xe:Xe-We,ke=od({delta:Be,initialLayout:se,panelConstraints:ge,pivotIndices:ot,prevLayout:se,trigger:"imperative-api"});Hp(se,ke)||(I(ke),M.current.layout=ke,he&&he(ke),wu(fe,ke,L.current))}}},[]),Y=D.useCallback(ue=>{const{layout:le,panelDataArray:he}=M.current,{panelSize:se}=ql(he,ue,le);return vt(se!=null,`Panel size not found for panel "${ue.id}"`),se},[]),$=D.useCallback((ue,le)=>{const{panelDataArray:he}=M.current,se=Yu(he,ue);return xle({defaultSize:le,dragState:R,layout:g,panelData:he,panelIndex:se})},[R,g]),W=D.useCallback(ue=>{const{layout:le,panelDataArray:he}=M.current,{collapsedSize:se=0,collapsible:fe,panelSize:ge}=ql(he,ue,le);return vt(ge!=null,`Panel size not found for panel "${ue.id}"`),fe===!0&&Po(ge,se)},[]),K=D.useCallback(ue=>{const{layout:le,panelDataArray:he}=M.current,{collapsedSize:se=0,collapsible:fe,panelSize:ge}=ql(he,ue,le);return vt(ge!=null,`Panel size not found for panel "${ue.id}"`),!fe||Mc(ge,se)>0},[]),q=D.useCallback(ue=>{const{panelDataArray:le}=M.current;le.push(ue),le.sort((he,se)=>{const fe=he.order,ge=se.order;return fe==null&&ge==null?0:fe==null?-1:ge==null?1:fe-ge}),M.current.panelDataArrayChanged=!0,C()},[C]);bc(()=>{if(M.current.panelDataArrayChanged){M.current.panelDataArrayChanged=!1;const{autoSaveId:ue,onLayout:le,storage:he}=_.current,{layout:se,panelDataArray:fe}=M.current;let ge=null;if(ue){const We=wle(ue,fe,he);We&&(N.current=new Map(Object.entries(We.expandToSizes)),ge=We.layout)}ge==null&&(ge=Mle({panelDataArray:fe}));const Le=sx({layout:ge,panelConstraints:fe.map(We=>We.constraints)});nx(se,Le)||(I(Le),M.current.layout=Le,le&&le(Le),wu(fe,Le,L.current))}}),bc(()=>{const ue=M.current;return()=>{ue.layout=[]}},[]);const j=D.useCallback(ue=>{let le=!1;const he=S.current;return he&&window.getComputedStyle(he,null).getPropertyValue("direction")==="rtl"&&(le=!0),function(fe){fe.preventDefault();const ge=S.current;if(!ge)return()=>null;const{direction:Le,dragState:We,id:He,keyboardResizeBy:ot,onLayout:Me}=_.current,{layout:Ue,panelDataArray:Xe}=M.current,{initialLayout:ct}=We??{},Be=WH(He,ue,ge);let ke=vle(fe,ue,Le,We,ot,ge);const ve=Le==="horizontal";ve&&le&&(ke=-ke);const Ce=Xe.map(Pe=>Pe.constraints),oe=od({delta:ke,initialLayout:ct??Ue,panelConstraints:Ce,pivotIndices:Be,prevLayout:Ue,trigger:xH(fe)?"keyboard":"mouse-or-touch"}),Ie=!Hp(Ue,oe);(UH(fe)||wH(fe))&&y.current!=ke&&(y.current=ke,!Ie&&ke!==0?ve?cI(ue,ke<0?BH:FH):cI(ue,ke<0?HH:VH):cI(ue,0)),Ie&&(I(oe),M.current.layout=oe,Me&&Me(oe),wu(Xe,oe,L.current))}},[]),k=D.useCallback((ue,le)=>{const{onLayout:he}=_.current,{layout:se,panelDataArray:fe}=M.current,ge=fe.map(Ue=>Ue.constraints),{panelSize:Le,pivotIndices:We}=ql(fe,ue,se);vt(Le!=null,`Panel size not found for panel "${ue.id}"`);const ot=Yu(fe,ue)===fe.length-1?Le-le:le-Le,Me=od({delta:ot,initialLayout:se,panelConstraints:ge,pivotIndices:We,prevLayout:se,trigger:"imperative-api"});Hp(se,Me)||(I(Me),M.current.layout=Me,he&&he(Me),wu(fe,Me,L.current))},[]),z=D.useCallback((ue,le)=>{const{layout:he,panelDataArray:se}=M.current,{collapsedSize:fe=0,collapsible:ge}=le,{collapsedSize:Le=0,collapsible:We,maxSize:He=100,minSize:ot=0}=ue.constraints,{panelSize:Me}=ql(se,ue,he);Me!=null&&(ge&&We&&Po(Me,fe)?Po(fe,Le)||k(ue,Le):Me<ot?k(ue,ot):Me>He&&k(ue,He))},[k]),Z=D.useCallback((ue,le)=>{const{direction:he}=_.current,{layout:se}=M.current;if(!S.current)return;const fe=lm(ue,S.current);vt(fe,`Drag handle element not found for id "${ue}"`);const ge=XH(he,le);m({dragHandleId:ue,dragHandleRect:fe.getBoundingClientRect(),initialCursorPosition:ge,initialLayout:se})},[]),ie=D.useCallback(()=>{m(null)},[]),ne=D.useCallback(ue=>{const{panelDataArray:le}=M.current,he=Yu(le,ue);he>=0&&(le.splice(he,1),delete L.current[ue.id],M.current.panelDataArrayChanged=!0,C())},[C]),B=D.useMemo(()=>({collapsePanel:w,direction:r,dragState:R,expandPanel:F,getPanelSize:Y,getPanelStyle:$,groupId:p,isPanelCollapsed:W,isPanelExpanded:K,reevaluatePanelConstraints:z,registerPanel:q,registerResizeHandle:j,resizePanel:k,startDragging:Z,stopDragging:ie,unregisterPanel:ne,panelGroupElement:S.current}),[w,R,r,F,Y,$,p,W,K,z,q,j,k,Z,ie,ne]),Q={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return D.createElement(sm.Provider,{value:B},D.createElement(h,{...d,children:t,className:n,id:o,ref:S,style:{...Q,...f},[Un.group]:"",[Un.groupDirection]:r,[Un.groupId]:p}))}const JH=D.forwardRef((e,t)=>D.createElement(qH,{...e,forwardedRef:t}));qH.displayName="PanelGroup";JH.displayName="forwardRef(PanelGroup)";function Yu(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ql(e,t,n){const r=Yu(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],l=n[r];return{...t.constraints,panelSize:l,pivotIndices:o}}function Fle({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){D.useEffect(()=>{if(e||n==null||r==null)return;const s=lm(t,r);if(s==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const c=s.getAttribute(Un.groupId);vt(c,`No group element found for id "${c}"`);const E=$d(c,r),f=YH(c,t,r);vt(f!==null,`No resize element found for id "${t}"`);const h=l.shiftKey?f>0?f-1:E.length-1:f+1<E.length?f+1:0;E[h].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,e,t,n])}function QH({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:l,onDragging:c,onFocus:E,onPointerDown:f,onPointerUp:h,style:d={},tabIndex:p=0,tagName:S="div",...R}){var m,g;const I=D.useRef(null),C=D.useRef({onClick:l,onDragging:c,onPointerDown:f,onPointerUp:h});D.useEffect(()=>{C.current.onClick=l,C.current.onDragging=c,C.current.onPointerDown=f,C.current.onPointerUp=h});const L=D.useContext(sm);if(L===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:y,registerResizeHandle:_,startDragging:M,stopDragging:w,panelGroupElement:F}=L,Y=cL(s),[$,W]=D.useState("inactive"),[K,q]=D.useState(!1),[j,k]=D.useState(null),z=D.useRef({state:$});bc(()=>{z.current.state=$}),D.useEffect(()=>{if(n)k(null);else{const B=_(Y);k(()=>B)}},[n,Y,_]);const Z=(m=r==null?void 0:r.coarse)!==null&&m!==void 0?m:15,ie=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;D.useEffect(()=>{if(n||j==null)return;const B=I.current;vt(B,"Element ref not attached");let Q=!1;return Ile(Y,B,N,{coarse:Z,fine:ie},(le,he,se)=>{if(!he){W("inactive");return}switch(le){case"down":{W("drag"),Q=!1,vt(se,'Expected event to be defined for "down" action'),M(Y,se);const{onDragging:fe,onPointerDown:ge}=C.current;fe==null||fe(!0),ge==null||ge();break}case"move":{const{state:fe}=z.current;Q=!0,fe!=="drag"&&W("hover"),vt(se,'Expected event to be defined for "move" action'),j(se);break}case"up":{W("hover"),w();const{onClick:fe,onDragging:ge,onPointerUp:Le}=C.current;ge==null||ge(!1),Le==null||Le(),Q||fe==null||fe();break}}})},[Z,N,n,ie,_,Y,j,M,w]),Fle({disabled:n,handleId:Y,resizeHandler:j,panelGroupElement:F});const ne={touchAction:"none",userSelect:"none"};return D.createElement(S,{...R,children:e,className:t,id:s,onBlur:()=>{q(!1),o==null||o()},onFocus:()=>{q(!0),E==null||E()},ref:I,role:"separator",style:{...ne,...d},tabIndex:p,[Un.groupDirection]:N,[Un.groupId]:y,[Un.resizeHandle]:"",[Un.resizeHandleActive]:$==="drag"?"pointer":K?"keyboard":void 0,[Un.resizeHandleEnabled]:!n,[Un.resizeHandleId]:Y,[Un.resizeHandleState]:$})}QH.displayName="PanelResizeHandle";function Hle(e){return v.jsx(JH,{...e})}function ox(e){return v.jsx(MH,{...e})}function Vle(e){return v.jsx(QH,{className:"group relative flex w-px items-center justify-center bg-border/50 transition-colors hover:bg-primary/50 data-[resize-handle-active]:bg-primary/50 after:absolute after:inset-y-0 after:left-1/2 after:w-2 after:-translate-x-1/2",...e,children:v.jsx("div",{className:"z-10 flex h-8 w-5 items-center justify-center rounded-sm border border-border/50 bg-card transition-colors group-hover:border-primary/30",children:v.jsxs("div",{className:"flex flex-col gap-[3px]",children:[v.jsx("div",{className:"h-px w-1.5 rounded-full bg-muted-foreground/40 group-hover:bg-primary/60"}),v.jsx("div",{className:"h-px w-1.5 rounded-full bg-muted-foreground/40 group-hover:bg-primary/60"}),v.jsx("div",{className:"h-px w-1.5 rounded-full bg-muted-foreground/40 group-hover:bg-primary/60"})]})})})}function kle(e){const t=new Map,n=[];for(const s of e)t.set(s.spanId,{span:s,depth:0,children:[]});for(const s of t.values()){if(!s.span.parentSpanId||!t.has(s.span.parentSpanId)){n.push(s);continue}t.get(s.span.parentSpanId).children.push(s)}function r(s,o){for(const l of s)l.depth=o,r(l.children,o+1)}return r(n,0),n}function Yle(e,t){const n=[];function r(s){for(const o of s)n.push(o),t.has(o.span.spanId)||r(o.children)}return r(e),n}function TS(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e<1?`${(e*1e3).toFixed(0)}µs`:`${e.toFixed(e<10?1:0)}ms`}const Wle={Server:"SVR",Client:"CLI",Producer:"PUB",Consumer:"SUB",Internal:"INT"},ax={ERROR:"bg-red-500/70",OK:"bg-primary/50",UNSET:"bg-primary/40"};function jle({node:e,traceStart:t,traceDuration:n,isSelected:r,isCollapsed:s,onSelect:o,onToggleCollapse:l}){const c=Number(BigInt(e.span.startTimeUnix)-BigInt(t)),E=Number(BigInt(e.span.endTimeUnix)-BigInt(e.span.startTimeUnix)),f=n>0?c/n*100:0,h=n>0?Math.max(E/n*100,.3):100,d=e.span.statusCode==="ERROR",p=ax[e.span.statusCode]??ax.UNSET,S=e.children.length>0,R=e.span.kind?Wle[e.span.kind]??e.span.kind:null;return v.jsxs("div",{onClick:o,className:["group flex cursor-pointer items-center border-b border-border/50 transition-colors",r?"bg-primary/8":"hover:bg-muted/20"].join(" "),children:[v.jsxs("div",{className:"flex w-72 shrink-0 items-center gap-1 border-r border-border/50 px-2 py-1.5",children:[v.jsx("div",{style:{width:`${e.depth*16}px`},className:"shrink-0"}),S?v.jsx("button",{onClick:m=>{m.stopPropagation(),l()},className:"flex size-4 shrink-0 items-center justify-center rounded text-muted-foreground/50 transition-colors hover:bg-muted hover:text-foreground",children:v.jsx(Pr,{icon:QC,size:10,className:`transition-transform ${s?"-rotate-90":""}`})}):v.jsx("div",{className:"size-4 shrink-0"}),v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[R&&v.jsx("span",{className:"shrink-0 rounded bg-muted px-1 py-px font-mono text-[9px] font-medium text-muted-foreground/70",children:R}),v.jsx("span",{className:`truncate text-xs ${d?"text-red-400":"text-foreground/80"} ${r?"font-medium":""}`,title:e.span.name,children:e.span.name})]})]}),v.jsxs("div",{className:"flex flex-1 items-center gap-2 px-3 py-1.5",children:[v.jsx("div",{className:"relative h-5 flex-1",children:v.jsx("div",{className:`absolute top-1 bottom-1 rounded-sm ${p} ${r?"ring-1 ring-primary/50":""}`,style:{left:`${f}%`,width:`${h}%`,minWidth:"2px"}})}),v.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[11px] text-muted-foreground",children:TS(e.span.durationMs)})]})]})}const ZH=80;function iC({value:e}){const[t,n]=D.useState(!1);return v.jsx("button",{onClick:r=>{r.stopPropagation(),navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},className:"shrink-0 rounded p-0.5 transition-colors hover:bg-muted",children:v.jsx(Pr,{icon:t?_S:CS,size:10,className:t?"text-emerald-400":"text-muted-foreground/40"})})}function Xle({value:e}){const[t,n]=D.useState(!1);return e.length>ZH?v.jsxs("div",{className:"mt-1",children:[v.jsx("button",{onClick:()=>n(!t),className:"w-full rounded-md bg-muted/30 px-2.5 py-2 text-left font-mono text-[11px] transition-colors hover:bg-muted/50",children:v.jsx("pre",{className:`whitespace-pre-wrap text-foreground/80 ${t?"":"line-clamp-3"}`,children:e})}),v.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[v.jsx("button",{onClick:()=>n(!t),className:"text-[10px] text-primary hover:underline",children:t?"Collapse":"Expand"}),v.jsx(iC,{value:e})]})]}):v.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-[11px]",children:[v.jsx("span",{className:"break-all text-foreground/80",children:e}),v.jsx(iC,{value:e})]})}function $le(e){const t=new Map;for(const n of e){const r=n[0].indexOf("."),s=r!==-1?n[0].slice(0,r):"other";t.has(s)||t.set(s,[]),t.get(s).push(n)}return Array.from(t,([n,r])=>({group:n,items:r}))}function Kle({span:e,traceStart:t}){const[n,r]=D.useState("attributes"),s=Object.entries(e.attributes).filter(([,f])=>f!=null),o=e.events.filter(f=>f.name==="exception"),l=e.events.filter(f=>f.name!=="exception"),c=Number(BigInt(e.startTimeUnix)-BigInt(t))/1e6,E=[{id:"attributes",label:"Attributes",count:s.length},{id:"events",label:"Events",count:e.events.length}];return v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsxs("div",{className:"border-b border-border/50 px-4 py-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("h3",{className:"truncate text-sm font-medium text-foreground",title:e.name,children:e.name}),e.statusCode==="ERROR"&&v.jsx("span",{className:"shrink-0 rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-medium text-red-400",children:"ERROR"})]}),v.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground",children:[e.kind&&v.jsxs("span",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Kind"})," ",e.kind]}),v.jsxs("span",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Duration"})," ",TS(e.durationMs)]}),v.jsxs("span",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Start"})," +",TS(c)]}),e.serviceName&&v.jsxs("span",{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"Service"})," ",e.serviceName]})]})]}),v.jsx("div",{className:"flex border-b border-border/50",children:E.map(f=>v.jsxs("button",{onClick:()=>r(f.id),className:["px-4 py-2 text-xs font-medium transition-colors",n===f.id?"border-b-2 border-primary text-foreground":"text-muted-foreground hover:text-foreground"].join(" "),children:[f.label,f.count>0&&v.jsx("span",{className:"ml-1.5 rounded-full bg-muted px-1.5 py-px text-[10px] text-muted-foreground",children:f.count})]},f.id))}),v.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[n==="attributes"&&v.jsxs("div",{className:"space-y-4",children:[s.length===0&&v.jsx("p",{className:"text-xs text-muted-foreground/50",children:"No attributes."}),$le(s).map(({group:f,items:h})=>v.jsxs("div",{children:[v.jsx("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:f}),v.jsx("div",{className:"space-y-1.5",children:h.map(([d,p])=>{const S=typeof p=="object"?JSON.stringify(p,null,2):String(p);return v.jsxs("div",{className:"group/attr",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:d}),S.length<=ZH&&v.jsx("span",{className:"opacity-0 transition-opacity group-hover/attr:opacity-100",children:v.jsx(iC,{value:S})})]}),v.jsx(Xle,{value:S})]},d)})})]},f))]}),n==="events"&&v.jsxs("div",{className:"space-y-4",children:[e.events.length===0&&v.jsx("p",{className:"text-xs text-muted-foreground/50",children:"No events."}),o.map((f,h)=>{const d=f.attributes??{},p=d["exception.stacktrace"];return v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-medium text-red-400",children:"exception"}),d["exception.type"]?v.jsx("span",{className:"font-mono text-xs text-red-400",children:String(d["exception.type"])}):null]}),d["exception.message"]?v.jsx("p",{className:"text-xs text-foreground/80",children:String(d["exception.message"])}):null,p&&v.jsx(aL,{stack:p})]},h)}),l.map((f,h)=>v.jsxs("div",{className:"rounded-md border border-border/50 px-3 py-2",children:[v.jsx("span",{className:"font-mono text-xs text-primary",children:f.name}),Object.keys(f.attributes).length>0&&v.jsx("div",{className:"mt-1.5 space-y-0.5",children:Object.entries(f.attributes).map(([d,p])=>v.jsxs("div",{className:"flex gap-2 font-mono text-[11px]",children:[v.jsx("span",{className:"shrink-0 text-muted-foreground/70",children:d}),v.jsx("span",{className:"break-all text-foreground/70",children:typeof p=="object"?JSON.stringify(p):String(p)})]},d))})]},h))]})]})]})}function zle({traceDuration:e}){const n=[];for(let r=0;r<=5;r++){const s=e/1e6*(r/5);n.push(TS(s))}return v.jsxs("div",{className:"flex items-end border-b border-border/50",children:[v.jsx("div",{className:"w-72 shrink-0 border-r border-border/50 px-3 py-1.5",children:v.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground/50",children:"Span"})}),v.jsxs("div",{className:"flex flex-1 items-end px-3 py-1.5",children:[v.jsx("div",{className:"relative flex-1",children:v.jsx("div",{className:"flex justify-between",children:n.map((r,s)=>v.jsx("span",{className:"font-mono text-[9px] text-muted-foreground/40",children:r},s))})}),v.jsx("div",{className:"w-14 shrink-0"})]})]})}function qle({spans:e}){const[t,n]=D.useState(null),[r,s]=D.useState(new Set),o=D.useMemo(()=>kle(e),[e]),l=D.useMemo(()=>Yle(o,r),[o,r]),c=D.useMemo(()=>Math.min(...e.map(p=>Number(p.startTimeUnix))),[e]),f=D.useMemo(()=>Math.max(...e.map(p=>Number(p.endTimeUnix))),[e])-c,h=e.find(p=>p.spanId===t);if(!e.length)return v.jsx("p",{className:"text-sm text-muted-foreground",children:"No spans found."});const d=p=>{s(S=>{const R=new Set(S);return R.has(p)?R.delete(p):R.add(p),R})};return v.jsx("div",{className:"h-full overflow-hidden rounded-lg border border-border bg-card",children:v.jsxs(Hle,{direction:"horizontal",children:[v.jsx(ox,{defaultSize:h?65:100,minSize:30,children:v.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[v.jsx(zle,{traceDuration:f}),v.jsx("div",{className:"flex-1 overflow-auto",children:l.map(p=>v.jsx(jle,{node:p,traceStart:c,traceDuration:f,isSelected:p.span.spanId===t,isCollapsed:r.has(p.span.spanId),onSelect:()=>n(p.span.spanId===t?null:p.span.spanId),onToggleCollapse:()=>d(p.span.spanId)},p.span.spanId))})]})}),h&&v.jsxs(v.Fragment,{children:[v.jsx(Vle,{}),v.jsx(ox,{defaultSize:35,minSize:20,maxSize:60,children:v.jsx("div",{className:"h-full overflow-hidden",children:v.jsx(Kle,{span:h,traceStart:c})})})]})]})})}const e2=yi("/traces/$traceId")({component:Jle});function Jle(){const{traceId:e}=e2.useParams(),t=Us(),{from:n}=ai({from:"__root__"}),{data:r,isLoading:s}=Gx(Wr.traces.show.queryOptions({params:{traceId:e}}));if(s)return v.jsx(Ele,{});const o=(r==null?void 0:r.data)??[],l=o.find(E=>!E.parentSpanId),c=l?new Date(Number(l.startTimeUnix)/1e6).toISOString():null;return v.jsxs("div",{className:"flex h-full flex-col gap-4",children:[v.jsxs("div",{className:"flex shrink-0 items-start gap-3",children:[v.jsx(cl,{variant:"outline",size:"icon",onClick:()=>t({to:n??"/requests"}),className:"mt-0.5",children:v.jsx(Pr,{icon:T6,size:14})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("h1",{className:"truncate text-sm font-medium text-foreground",children:(l==null?void 0:l.name)??"Trace"}),l&&v.jsx(aT,{statusCode:l.statusCode,httpStatus:null})]}),v.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[l&&v.jsx(wc,{ms:l.durationMs}),v.jsx("span",{className:"text-muted-foreground/30",children:"·"}),v.jsxs("span",{className:"font-mono text-muted-foreground/70",children:[o.length," spans"]}),(l==null?void 0:l.serviceName)&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground/30",children:"·"}),v.jsx("span",{className:"text-muted-foreground/70",children:l.serviceName})]}),v.jsx("span",{className:"text-muted-foreground/30",children:"·"}),v.jsx(w_,{traceId:e}),c&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground/30",children:"·"}),v.jsx(WB,{date:c})]})]})]})]}),v.jsx("div",{className:"min-h-0 flex-1",children:v.jsx(qle,{spans:o})})]})}const Qle=pJ.update({id:"/requests",path:"/requests",getParentRoute:()=>Ji}),Zle=Oae.update({id:"/queries",path:"/queries",getParentRoute:()=>Ji}),ece=jae.update({id:"/logs",path:"/logs",getParentRoute:()=>Ji}),tce=zae.update({id:"/jobs",path:"/jobs",getParentRoute:()=>Ji}),nce=ele.update({id:"/external-calls",path:"/external-calls",getParentRoute:()=>Ji}),rce=ile.update({id:"/exceptions",path:"/exceptions",getParentRoute:()=>Ji}),sce=cle.update({id:"/commands",path:"/commands",getParentRoute:()=>Ji}),ice=ule.update({id:"/",path:"/",getParentRoute:()=>Ji}),oce=e2.update({id:"/traces/$traceId",path:"/traces/$traceId",getParentRoute:()=>Ji}),ace={IndexRoute:ice,CommandsRoute:sce,ExceptionsRoute:rce,ExternalCallsRoute:nce,JobsRoute:tce,LogsRoute:ece,QueriesRoute:Zle,RequestsRoute:Qle,TracesTraceIdRoute:oce},lce=Ji._addFileChildren(ace)._addFileTypes(),cce=new nk({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),uce=E5({routeTree:lce});function Ece(){return v.jsx(rk,{client:cce,children:v.jsx(T5,{router:uce})})}PV.createRoot(document.getElementById("root")).render(v.jsx(D.StrictMode,{children:v.jsx(Ece,{})}));