@hermannbjorgvin/kirby-desktop 1.0.0-beta.5
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.
- package/README.md +57 -0
- package/launcher.mjs +42 -0
- package/main/main.js +13193 -0
- package/package.json +40 -0
- package/preload/preload.cjs +143 -0
- package/renderer/assets/abap-Dg923wIy.js +1 -0
- package/renderer/assets/actionscript-3-CqOcUQ0w.js +1 -0
- package/renderer/assets/ada-CTi7YQtL.js +1 -0
- package/renderer/assets/ahk-BJYYIeOs.js +1 -0
- package/renderer/assets/ahk2-BLfzmBxo.js +1 -0
- package/renderer/assets/andromeeda-CT0vplkN.js +1 -0
- package/renderer/assets/angular-html-DX9ZP5JV.js +1 -0
- package/renderer/assets/angular-ts-1O2hJJmY.js +1 -0
- package/renderer/assets/apache-PcO-DBxQ.js +1 -0
- package/renderer/assets/apex-B4ts4Pdn.js +1 -0
- package/renderer/assets/apl-Dz5ncP8G.js +1 -0
- package/renderer/assets/applescript-Ds_W2jPS.js +1 -0
- package/renderer/assets/ara-C1--7J61.js +1 -0
- package/renderer/assets/asciidoc-DaaWi4fn.js +1 -0
- package/renderer/assets/asm-CTFRnVOM.js +1 -0
- package/renderer/assets/astro-BWgTGUF8.js +1 -0
- package/renderer/assets/aurora-x-C0VKFdlO.js +1 -0
- package/renderer/assets/awk-CrWgQKhV.js +1 -0
- package/renderer/assets/ayu-dark-wZ6ORhBL.js +1 -0
- package/renderer/assets/ayu-light-xXLJ_Ch1.js +1 -0
- package/renderer/assets/ayu-mirage-CQckA_sP.js +1 -0
- package/renderer/assets/ballerina-a0yOSyc5.js +1 -0
- package/renderer/assets/bat-C1qk1Jq1.js +1 -0
- package/renderer/assets/beancount-dPJi_gci.js +1 -0
- package/renderer/assets/berry-CVKoklHx.js +1 -0
- package/renderer/assets/bibtex-DRcCXNgM.js +1 -0
- package/renderer/assets/bicep-jWz-hQ8I.js +1 -0
- package/renderer/assets/bird2-wc5D5_X9.js +1 -0
- package/renderer/assets/blade-DFktsHST.js +1 -0
- package/renderer/assets/bsl-BtUDvyR4.js +1 -0
- package/renderer/assets/c-BG-tZi7o.js +1 -0
- package/renderer/assets/c3-R-USHpyF.js +1 -0
- package/renderer/assets/cadence-BuaeHeSu.js +1 -0
- package/renderer/assets/cairo-BYiDgOF2.js +1 -0
- package/renderer/assets/catppuccin-frappe-CquLvoVK.js +1 -0
- package/renderer/assets/catppuccin-latte-G5tdnGFo.js +1 -0
- package/renderer/assets/catppuccin-macchiato-BZRq1pKO.js +1 -0
- package/renderer/assets/catppuccin-mocha-Bbf5uIw6.js +1 -0
- package/renderer/assets/chapel-D6IdCptL.js +1 -0
- package/renderer/assets/clarity-BJ-KISir.js +1 -0
- package/renderer/assets/clojure-KnfDkB_V.js +1 -0
- package/renderer/assets/cmake-bh2MLnkv.js +1 -0
- package/renderer/assets/cobol-DbURsbuN.js +1 -0
- package/renderer/assets/codeowners-CtwIM3TN.js +1 -0
- package/renderer/assets/codeql-D164juXQ.js +1 -0
- package/renderer/assets/coffee-Bk-z6oI_.js +1 -0
- package/renderer/assets/common-lisp-DXc9XcIM.js +1 -0
- package/renderer/assets/coq-BIZj6HM_.js +1 -0
- package/renderer/assets/cpp-C-tF_bWl.js +1 -0
- package/renderer/assets/crystal-Dvqzbpz8.js +1 -0
- package/renderer/assets/csharp-CFxe5pRo.js +1 -0
- package/renderer/assets/css-Br67jR8j.js +1 -0
- package/renderer/assets/csv-D5aBhKLr.js +1 -0
- package/renderer/assets/cue-WCin6O4e.js +1 -0
- package/renderer/assets/cypher-DYQk2G82.js +1 -0
- package/renderer/assets/d-DVc-yF-l.js +1 -0
- package/renderer/assets/dark-plus-DLU5INA3.js +1 -0
- package/renderer/assets/dart-ByalkS20.js +1 -0
- package/renderer/assets/dax-oldcCaJg.js +1 -0
- package/renderer/assets/desktop-DZfyBMgF.js +1 -0
- package/renderer/assets/diff-jW5kmiru.js +1 -0
- package/renderer/assets/diff-worker-cT02HnWg.js +154 -0
- package/renderer/assets/docker-DG9neUKd.js +1 -0
- package/renderer/assets/dotenv-Bea-FkXq.js +1 -0
- package/renderer/assets/dracula-XcYHBZy6.js +1 -0
- package/renderer/assets/dracula-soft-BPeX9gxW.js +1 -0
- package/renderer/assets/dream-maker-DAHQwpwp.js +1 -0
- package/renderer/assets/edge-DTiORMU5.js +1 -0
- package/renderer/assets/elixir-DnIH90qd.js +1 -0
- package/renderer/assets/elm-BjIDgKzz.js +1 -0
- package/renderer/assets/emacs-lisp-Ckw2FTkV.js +1 -0
- package/renderer/assets/erb-CazEJMPD.js +1 -0
- package/renderer/assets/erlang-DNeY46SW.js +1 -0
- package/renderer/assets/everforest-dark-WOub3wle.js +1 -0
- package/renderer/assets/everforest-light-DCUg8VH8.js +1 -0
- package/renderer/assets/fennel-DBMsxtrh.js +1 -0
- package/renderer/assets/fish-BxskpYPN.js +1 -0
- package/renderer/assets/fluent-Bwo2XpEt.js +1 -0
- package/renderer/assets/fortran-fixed-form-DFFnVrrY.js +1 -0
- package/renderer/assets/fortran-free-form-DB5N_DgY.js +1 -0
- package/renderer/assets/fsharp-DRAF1jsN.js +1 -0
- package/renderer/assets/gdresource-B0Kp4-ms.js +1 -0
- package/renderer/assets/gdscript-DKyjuXKv.js +1 -0
- package/renderer/assets/gdshader-G7X6ysY3.js +1 -0
- package/renderer/assets/genie-DSsjfZMX.js +1 -0
- package/renderer/assets/gherkin-Cl2Fw-_0.js +1 -0
- package/renderer/assets/git-commit-CJPsQObV.js +1 -0
- package/renderer/assets/git-rebase-DeZqv4fp.js +1 -0
- package/renderer/assets/github-dark-BQV5ugrc.js +1 -0
- package/renderer/assets/github-dark-default-DLWDM7FH.js +1 -0
- package/renderer/assets/github-dark-dimmed-D1FmiR_p.js +1 -0
- package/renderer/assets/github-dark-high-contrast-BilLoi0o.js +1 -0
- package/renderer/assets/github-light-Rcb2q3L5.js +1 -0
- package/renderer/assets/github-light-default-CQ75esMw.js +1 -0
- package/renderer/assets/github-light-high-contrast-CRF1wyLy.js +1 -0
- package/renderer/assets/gleam-BeBqoPwE.js +1 -0
- package/renderer/assets/glimmer-js-F_qk9EQT.js +1 -0
- package/renderer/assets/glimmer-ts-Dhzi-GJU.js +1 -0
- package/renderer/assets/glsl-BOG9l2nV.js +1 -0
- package/renderer/assets/gn-Dxr0sSUf.js +1 -0
- package/renderer/assets/gnuplot-CtW3R_Hz.js +1 -0
- package/renderer/assets/go-B7VTfpnm.js +1 -0
- package/renderer/assets/graphql-B6XHM4uj.js +1 -0
- package/renderer/assets/groovy-DFxE31Qs.js +1 -0
- package/renderer/assets/gruvbox-dark-hard-C37G1gbc.js +1 -0
- package/renderer/assets/gruvbox-dark-medium-C3G9m3TV.js +1 -0
- package/renderer/assets/gruvbox-dark-soft-eZmcmZ9I.js +1 -0
- package/renderer/assets/gruvbox-light-hard-BYj-vz_3.js +1 -0
- package/renderer/assets/gruvbox-light-medium-BdQlDiiF.js +1 -0
- package/renderer/assets/gruvbox-light-soft-BGNwjiRh.js +1 -0
- package/renderer/assets/hack-jRhjsWHJ.js +1 -0
- package/renderer/assets/haml-C4vGXCDX.js +1 -0
- package/renderer/assets/handlebars-BsldGL5W.js +1 -0
- package/renderer/assets/haskell-BfdhR_WN.js +1 -0
- package/renderer/assets/haxe-wmAaY_mP.js +1 -0
- package/renderer/assets/hcl-B6OePqme.js +1 -0
- package/renderer/assets/hjson-D2jn7IRw.js +1 -0
- package/renderer/assets/hlsl-MKeth5V9.js +1 -0
- package/renderer/assets/horizon-bright-BVMyA0so.js +1 -0
- package/renderer/assets/horizon-cslQss18.js +1 -0
- package/renderer/assets/houston-RHIKkNfR.js +1 -0
- package/renderer/assets/html-BW_6VhB7.js +1 -0
- package/renderer/assets/html-derivative-BxANmYVz.js +1 -0
- package/renderer/assets/http-CG3jvXcS.js +1 -0
- package/renderer/assets/hurl-CxQrh4RI.js +1 -0
- package/renderer/assets/hxml-In6F2XHE.js +1 -0
- package/renderer/assets/hy-DI6mCUnw.js +1 -0
- package/renderer/assets/imba-D-Pk5S0X.js +1 -0
- package/renderer/assets/index-BtxbtBAs.css +1 -0
- package/renderer/assets/index-vGfeijvJ.js +86 -0
- package/renderer/assets/ini-Dix3pTmg.js +1 -0
- package/renderer/assets/java-BTDmaRNO.js +1 -0
- package/renderer/assets/javascript-WyGyM1wV.js +1 -0
- package/renderer/assets/jinja-CGKoJZuT.js +1 -0
- package/renderer/assets/jison-B9XHrcYJ.js +1 -0
- package/renderer/assets/json-B8JryHcM.js +1 -0
- package/renderer/assets/json5-Cdatmj9n.js +1 -0
- package/renderer/assets/jsonc-CvUCa1o5.js +1 -0
- package/renderer/assets/jsonl-9I_GBd5L.js +1 -0
- package/renderer/assets/jsonnet-XoenQ2oc.js +1 -0
- package/renderer/assets/jssm-CWE2S0Z5.js +1 -0
- package/renderer/assets/jsx-8cLv2Six.js +1 -0
- package/renderer/assets/julia-CHsXSRRi.js +1 -0
- package/renderer/assets/just-BhMjiL1x.js +1 -0
- package/renderer/assets/kanagawa-dragon-elpLL9d7.js +1 -0
- package/renderer/assets/kanagawa-lotus-qwxsXd6N.js +1 -0
- package/renderer/assets/kanagawa-wave-CmHwPSUq.js +1 -0
- package/renderer/assets/kdl-CMbyIXjQ.js +1 -0
- package/renderer/assets/kotlin-BQy537ds.js +1 -0
- package/renderer/assets/kusto-Bh6esMjd.js +1 -0
- package/renderer/assets/laserwave-si7wuSrt.js +1 -0
- package/renderer/assets/latex-l4EWm08Q.js +1 -0
- package/renderer/assets/lean-C4RHkN41.js +1 -0
- package/renderer/assets/less-XNfgnZC7.js +1 -0
- package/renderer/assets/light-plus-g_Fi9vkG.js +1 -0
- package/renderer/assets/liquid-VEiCTF4k.js +1 -0
- package/renderer/assets/llvm-CQZjIlnZ.js +1 -0
- package/renderer/assets/log-CcaF_xNv.js +1 -0
- package/renderer/assets/logo-D9WQLoKQ.js +1 -0
- package/renderer/assets/lua-8Av-h-ns.js +1 -0
- package/renderer/assets/luau-CmQFRJk_.js +1 -0
- package/renderer/assets/make-DXVx14cr.js +1 -0
- package/renderer/assets/markdown-DX-TNHnc.js +1 -0
- package/renderer/assets/marko-6XzqJfhW.js +1 -0
- package/renderer/assets/material-theme-CIJ3cGaW.js +1 -0
- package/renderer/assets/material-theme-darker-BWg3m1GB.js +1 -0
- package/renderer/assets/material-theme-lighter-DR8HWMN7.js +1 -0
- package/renderer/assets/material-theme-ocean-CZf9pk28.js +1 -0
- package/renderer/assets/material-theme-palenight-BF01YeZy.js +1 -0
- package/renderer/assets/matlab-DzreyMvm.js +1 -0
- package/renderer/assets/mdc-DRPSCe6f.js +1 -0
- package/renderer/assets/mdx-C2fqO2XY.js +1 -0
- package/renderer/assets/mermaid-B3PwCbv_.js +1 -0
- package/renderer/assets/min-dark-DhfaepVE.js +1 -0
- package/renderer/assets/min-light-6xx0uMgm.js +1 -0
- package/renderer/assets/mipsasm-yE_Aqo9y.js +1 -0
- package/renderer/assets/mojo-CrzByxs8.js +1 -0
- package/renderer/assets/monokai-CfflZzqd.js +1 -0
- package/renderer/assets/moonbit-GUn1DCOq.js +1 -0
- package/renderer/assets/move-DgW29s8x.js +1 -0
- package/renderer/assets/narrat-DXUZ_ZkW.js +1 -0
- package/renderer/assets/nextflow-D9i3Mg89.js +1 -0
- package/renderer/assets/nextflow-groovy-BtKenbWl.js +1 -0
- package/renderer/assets/nginx-DSXkacNc.js +1 -0
- package/renderer/assets/night-owl-EdP2Hztp.js +1 -0
- package/renderer/assets/night-owl-light-Bk-lYVyk.js +1 -0
- package/renderer/assets/nim-D9lokC5T.js +1 -0
- package/renderer/assets/nix-Ckjrpg0r.js +1 -0
- package/renderer/assets/nord-BAu0wM6c.js +1 -0
- package/renderer/assets/nsis-C1FUr9r5.js +1 -0
- package/renderer/assets/nushell-D7aJuCS6.js +1 -0
- package/renderer/assets/objective-c-BoaBTdtz.js +1 -0
- package/renderer/assets/objective-cpp-DstR8hNy.js +1 -0
- package/renderer/assets/ocaml-DTbn2Hv7.js +1 -0
- package/renderer/assets/odin-Bxc4S6Xn.js +1 -0
- package/renderer/assets/one-dark-pro-utPxbBbJ.js +1 -0
- package/renderer/assets/one-light-BuCQ22aO.js +1 -0
- package/renderer/assets/openscad-CXHpNBsb.js +1 -0
- package/renderer/assets/org-DcqggXXW.js +1 -0
- package/renderer/assets/pascal-Sr-XLSE6.js +1 -0
- package/renderer/assets/perl-CP_GSK0L.js +1 -0
- package/renderer/assets/php-CNeTOyEV.js +1 -0
- package/renderer/assets/pkl-CRusufhw.js +1 -0
- package/renderer/assets/plastic-CXnNNlFZ.js +1 -0
- package/renderer/assets/plsql-Dbm3tV2N.js +1 -0
- package/renderer/assets/po-LG0lFwH4.js +1 -0
- package/renderer/assets/poimandres-BrOVMvuE.js +1 -0
- package/renderer/assets/polar-DjOs3GWb.js +1 -0
- package/renderer/assets/postcss-GRRkWn2F.js +1 -0
- package/renderer/assets/powerquery-DHf-dtTS.js +1 -0
- package/renderer/assets/powershell-CUnxWBRw.js +1 -0
- package/renderer/assets/prisma-HKDfktb8.js +1 -0
- package/renderer/assets/prolog-9JcfiY6I.js +1 -0
- package/renderer/assets/proto-dqx_Sj2i.js +1 -0
- package/renderer/assets/pug-kUpeg2wB.js +1 -0
- package/renderer/assets/puppet-Di57VbSS.js +1 -0
- package/renderer/assets/purescript-BgpM7rDH.js +1 -0
- package/renderer/assets/python-B6Ihcp-E.js +1 -0
- package/renderer/assets/qml-DmGQGbca.js +1 -0
- package/renderer/assets/qmldir-DXd9s5XC.js +1 -0
- package/renderer/assets/qss-B7NnhfIi.js +1 -0
- package/renderer/assets/r-C2sK8mqY.js +1 -0
- package/renderer/assets/racket-CeDx7KO2.js +1 -0
- package/renderer/assets/raku-BMJwmrCS.js +1 -0
- package/renderer/assets/razor-C2a5o_rD.js +1 -0
- package/renderer/assets/rbs-BNdQsBCU.js +1 -0
- package/renderer/assets/red-D0qvOrrt.js +1 -0
- package/renderer/assets/reg-Cvyu2Gnx.js +1 -0
- package/renderer/assets/regexp-DK-WlHNu.js +1 -0
- package/renderer/assets/rel-BlqNHz8k.js +1 -0
- package/renderer/assets/riscv-C5dpdlr7.js +1 -0
- package/renderer/assets/ron-j5NfrB3z.js +1 -0
- package/renderer/assets/rose-pine-B13eftVv.js +1 -0
- package/renderer/assets/rose-pine-dawn-BcSoidev.js +1 -0
- package/renderer/assets/rose-pine-moon-QhZovmiB.js +1 -0
- package/renderer/assets/rosmsg-ZkSIzPhc.js +1 -0
- package/renderer/assets/rst-CgFL6KOR.js +1 -0
- package/renderer/assets/ruby-CoSFdlpl.js +1 -0
- package/renderer/assets/rust-CxuBE0J8.js +1 -0
- package/renderer/assets/sas-DPMpzP9X.js +1 -0
- package/renderer/assets/sass-bfEVHPJ8.js +1 -0
- package/renderer/assets/scala-DT3kbCHL.js +1 -0
- package/renderer/assets/scheme-OJppFQF3.js +1 -0
- package/renderer/assets/scss-n48HZsmL.js +1 -0
- package/renderer/assets/sdbl-CvZs3G9c.js +1 -0
- package/renderer/assets/shaderlab-CEJedz68.js +1 -0
- package/renderer/assets/shellscript-DgJyDXW6.js +1 -0
- package/renderer/assets/shellsession-DSlzxnCM.js +1 -0
- package/renderer/assets/slack-dark-CWRQmTmo.js +1 -0
- package/renderer/assets/slack-ochin-DO_ok7XK.js +1 -0
- package/renderer/assets/smalltalk-De6KzMWc.js +1 -0
- package/renderer/assets/smithy-BVTkKWO9.js +1 -0
- package/renderer/assets/snazzy-light-B5llO_gK.js +1 -0
- package/renderer/assets/solarized-dark-BWFpDpV1.js +1 -0
- package/renderer/assets/solarized-light-eZCMDrWD.js +1 -0
- package/renderer/assets/solidity-SYSxO-p1.js +1 -0
- package/renderer/assets/soy-DEV4yxgM.js +1 -0
- package/renderer/assets/sparql-BJh4JEw-.js +1 -0
- package/renderer/assets/splunk-h-bNAnbk.js +1 -0
- package/renderer/assets/sql-Dq2MiB0T.js +1 -0
- package/renderer/assets/ssh-config-CywOjoXH.js +1 -0
- package/renderer/assets/stata-BcICKvEt.js +1 -0
- package/renderer/assets/stylus-CIg617SB.js +1 -0
- package/renderer/assets/surrealql-CWlK9SzL.js +1 -0
- package/renderer/assets/svelte-B-Z8GLL9.js +1 -0
- package/renderer/assets/swift-CGD9CJBj.js +1 -0
- package/renderer/assets/synthwave-84-DRVv-_m_.js +1 -0
- package/renderer/assets/system-verilog-CG_VWOG3.js +1 -0
- package/renderer/assets/systemd-DKMPPZjB.js +1 -0
- package/renderer/assets/talonscript-eRuyeYHl.js +1 -0
- package/renderer/assets/tasl-B9CVvjfG.js +1 -0
- package/renderer/assets/tcl-Bq9dbVAF.js +1 -0
- package/renderer/assets/templ-W185oS4p.js +1 -0
- package/renderer/assets/terraform-CAp711iT.js +1 -0
- package/renderer/assets/tex-DNkCctwf.js +1 -0
- package/renderer/assets/tokyo-night-BvwC8l2v.js +1 -0
- package/renderer/assets/toml-Ms459DBw.js +1 -0
- package/renderer/assets/ts-tags-xUT7JH_c.js +1 -0
- package/renderer/assets/tsv-BFtm7NXx.js +1 -0
- package/renderer/assets/tsx-D6116Ycy.js +1 -0
- package/renderer/assets/turtle-DpRhbQZY.js +1 -0
- package/renderer/assets/twig-k5g5DPXm.js +1 -0
- package/renderer/assets/typescript-BqvgUolh.js +1 -0
- package/renderer/assets/typespec-B09nCZui.js +1 -0
- package/renderer/assets/typst-BBBqdJEp.js +1 -0
- package/renderer/assets/v-DUsAht2M.js +1 -0
- package/renderer/assets/vala-z59IxkFd.js +1 -0
- package/renderer/assets/vb-A7jYO8Gn.js +1 -0
- package/renderer/assets/verilog-jqltjd44.js +1 -0
- package/renderer/assets/vesper-DxfWgk_t.js +1 -0
- package/renderer/assets/vhdl-DJCsFYgn.js +1 -0
- package/renderer/assets/viml-pbKHW3Ia.js +1 -0
- package/renderer/assets/vitesse-black-B_BYPdvp.js +1 -0
- package/renderer/assets/vitesse-dark-DOSOf2Sz.js +1 -0
- package/renderer/assets/vitesse-light-gUX51GpB.js +1 -0
- package/renderer/assets/vue-D2T8AFdP.js +1 -0
- package/renderer/assets/vue-html-zEfNEgpj.js +1 -0
- package/renderer/assets/vue-vine-DQRWX4iy.js +1 -0
- package/renderer/assets/vyper-DpazWNpx.js +1 -0
- package/renderer/assets/wasm-CFi-k9--.js +1 -0
- package/renderer/assets/wenyan-CYFFG9DK.js +1 -0
- package/renderer/assets/wgsl-CxjTZs-b.js +1 -0
- package/renderer/assets/wikitext-Bx2qct8O.js +1 -0
- package/renderer/assets/wit-DDW3hD69.js +1 -0
- package/renderer/assets/wolfram-pu21K997.js +1 -0
- package/renderer/assets/wterm-Coe9fLBZ.wasm +0 -0
- package/renderer/assets/xml-BkAJuBCc.js +1 -0
- package/renderer/assets/xsl-C6UUWSil.js +1 -0
- package/renderer/assets/yaml-Bopit2L3.js +1 -0
- package/renderer/assets/zenscript-BIAKq-aR.js +1 -0
- package/renderer/assets/zig-bSFrHQ7n.js +1 -0
- package/renderer/index.html +14 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var C0=e=>{throw TypeError(e)};var E0=(e,t,n)=>t.has(e)||C0("Cannot "+n);var an=(e,t,n)=>(E0(e,t,"read from private field"),n?n.call(e):t.get(e)),S0=(e,t,n)=>t.has(e)?C0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Mp=(e,t,n,i)=>(E0(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);function ZR(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(i,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>i[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function Ld(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},Ql={};var k0;function eQ(){if(k0)return Ql;k0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,a){var c=null;if(a!==void 0&&(c=""+a),o.key!==void 0&&(c=""+o.key),"key"in o){a={};for(var u in o)u!=="key"&&(a[u]=o[u])}else a=o;return o=a.ref,{$$typeof:e,type:i,key:c,ref:o!==void 0?o:null,props:a}}return Ql.Fragment=t,Ql.jsx=n,Ql.jsxs=n,Ql}var B0;function tQ(){return B0||(B0=1,Np.exports=eQ()),Np.exports}var p=tQ(),_p={exports:{}},De={};var I0;function nQ(){if(I0)return De;I0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function S(z,L,M){this.props=z,this.context=L,this.refs=E,this.updater=M||w}S.prototype.isReactComponent={},S.prototype.setState=function(z,L){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,L,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function R(){}R.prototype=S.prototype;function k(z,L,M){this.props=z,this.context=L,this.refs=E,this.updater=M||w}var I=k.prototype=new R;I.constructor=k,C(I,S.prototype),I.isPureReactComponent=!0;var T=Array.isArray;function Q(){}var j={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function F(z,L,M){var X=M.ref;return{$$typeof:e,type:z,key:L,ref:X!==void 0?X:null,props:M}}function O(z,L){return F(z.type,L,z.props)}function H(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function U(z){var L={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(M){return L[M]})}var J=/\/+/g;function Y(z,L){return typeof z=="object"&&z!==null&&z.key!=null?U(""+z.key):L.toString(36)}function $(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(Q,Q):(z.status="pending",z.then(function(L){z.status==="pending"&&(z.status="fulfilled",z.value=L)},function(L){z.status==="pending"&&(z.status="rejected",z.reason=L)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function P(z,L,M,X,ee){var ne=typeof z;(ne==="undefined"||ne==="boolean")&&(z=null);var fe=!1;if(z===null)fe=!0;else switch(ne){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(z.$$typeof){case e:case t:fe=!0;break;case g:return fe=z._init,P(fe(z._payload),L,M,X,ee)}}if(fe)return ee=ee(z),fe=X===""?"."+Y(z,0):X,T(ee)?(M="",fe!=null&&(M=fe.replace(J,"$&/")+"/"),P(ee,L,M,"",function(Me){return Me})):ee!=null&&(H(ee)&&(ee=O(ee,M+(ee.key==null||z&&z.key===ee.key?"":(""+ee.key).replace(J,"$&/")+"/")+fe)),L.push(ee)),1;fe=0;var ae=X===""?".":X+":";if(T(z))for(var ce=0;ce<z.length;ce++)X=z[ce],ne=ae+Y(X,ce),fe+=P(X,L,M,ne,ee);else if(ce=b(z),typeof ce=="function")for(z=ce.call(z),ce=0;!(X=z.next()).done;)X=X.value,ne=ae+Y(X,ce++),fe+=P(X,L,M,ne,ee);else if(ne==="object"){if(typeof z.then=="function")return P($(z),L,M,X,ee);throw L=String(z),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return fe}function V(z,L,M){if(z==null)return z;var X=[],ee=0;return P(z,X,"","",function(ne){return L.call(M,ne,ee++)}),X}function ie(z){if(z._status===-1){var L=z._result;L=L(),L.then(function(M){(z._status===0||z._status===-1)&&(z._status=1,z._result=M)},function(M){(z._status===0||z._status===-1)&&(z._status=2,z._result=M)}),z._status===-1&&(z._status=0,z._result=L)}if(z._status===1)return z._result.default;throw z._result}var de=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},D={map:V,forEach:function(z,L,M){V(z,function(){L.apply(this,arguments)},M)},count:function(z){var L=0;return V(z,function(){L++}),L},toArray:function(z){return V(z,function(L){return L})||[]},only:function(z){if(!H(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return De.Activity=m,De.Children=D,De.Component=S,De.Fragment=n,De.Profiler=o,De.PureComponent=k,De.StrictMode=i,De.Suspense=h,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,De.__COMPILER_RUNTIME={__proto__:null,c:function(z){return j.H.useMemoCache(z)}},De.cache=function(z){return function(){return z.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(z,L,M){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var X=C({},z.props),ee=z.key;if(L!=null)for(ne in L.key!==void 0&&(ee=""+L.key),L)!_.call(L,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&L.ref===void 0||(X[ne]=L[ne]);var ne=arguments.length-2;if(ne===1)X.children=M;else if(1<ne){for(var fe=Array(ne),ae=0;ae<ne;ae++)fe[ae]=arguments[ae+2];X.children=fe}return F(z.type,ee,X)},De.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:a,_context:z},z},De.createElement=function(z,L,M){var X,ee={},ne=null;if(L!=null)for(X in L.key!==void 0&&(ne=""+L.key),L)_.call(L,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(ee[X]=L[X]);var fe=arguments.length-2;if(fe===1)ee.children=M;else if(1<fe){for(var ae=Array(fe),ce=0;ce<fe;ce++)ae[ce]=arguments[ce+2];ee.children=ae}if(z&&z.defaultProps)for(X in fe=z.defaultProps,fe)ee[X]===void 0&&(ee[X]=fe[X]);return F(z,ne,ee)},De.createRef=function(){return{current:null}},De.forwardRef=function(z){return{$$typeof:u,render:z}},De.isValidElement=H,De.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:ie}},De.memo=function(z,L){return{$$typeof:f,type:z,compare:L===void 0?null:L}},De.startTransition=function(z){var L=j.T,M={};j.T=M;try{var X=z(),ee=j.S;ee!==null&&ee(M,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(Q,de)}catch(ne){de(ne)}finally{L!==null&&M.types!==null&&(L.types=M.types),j.T=L}},De.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},De.use=function(z){return j.H.use(z)},De.useActionState=function(z,L,M){return j.H.useActionState(z,L,M)},De.useCallback=function(z,L){return j.H.useCallback(z,L)},De.useContext=function(z){return j.H.useContext(z)},De.useDebugValue=function(){},De.useDeferredValue=function(z,L){return j.H.useDeferredValue(z,L)},De.useEffect=function(z,L){return j.H.useEffect(z,L)},De.useEffectEvent=function(z){return j.H.useEffectEvent(z)},De.useId=function(){return j.H.useId()},De.useImperativeHandle=function(z,L,M){return j.H.useImperativeHandle(z,L,M)},De.useInsertionEffect=function(z,L){return j.H.useInsertionEffect(z,L)},De.useLayoutEffect=function(z,L){return j.H.useLayoutEffect(z,L)},De.useMemo=function(z,L){return j.H.useMemo(z,L)},De.useOptimistic=function(z,L){return j.H.useOptimistic(z,L)},De.useReducer=function(z,L,M){return j.H.useReducer(z,L,M)},De.useRef=function(z){return j.H.useRef(z)},De.useState=function(z){return j.H.useState(z)},De.useSyncExternalStore=function(z,L,M){return j.H.useSyncExternalStore(z,L,M)},De.useTransition=function(){return j.H.useTransition()},De.version="19.2.8",De}var R0;function jg(){return R0||(R0=1,_p.exports=nQ()),_p.exports}var x=jg();const ge=Ld(x),Ia=ZR({__proto__:null,default:ge},[x]);var Op={exports:{}},Tl={},zp={exports:{}},Lp={};var Q0;function rQ(){return Q0||(Q0=1,(function(e){function t(P,V){var ie=P.length;P.push(V);e:for(;0<ie;){var de=ie-1>>>1,D=P[de];if(0<o(D,V))P[de]=V,P[ie]=D,ie=de;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var V=P[0],ie=P.pop();if(ie!==V){P[0]=ie;e:for(var de=0,D=P.length,z=D>>>1;de<z;){var L=2*(de+1)-1,M=P[L],X=L+1,ee=P[X];if(0>o(M,ie))X<D&&0>o(ee,M)?(P[de]=ee,P[X]=ie,de=X):(P[de]=M,P[L]=ie,de=L);else if(X<D&&0>o(ee,ie))P[de]=ee,P[X]=ie,de=X;else break e}}return V}function o(P,V){var ie=P.sortIndex-V.sortIndex;return ie!==0?ie:P.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var h=[],f=[],g=1,m=null,y=3,b=!1,w=!1,C=!1,E=!1,S=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function I(P){for(var V=n(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=P)i(f),V.sortIndex=V.expirationTime,t(h,V);else break;V=n(f)}}function T(P){if(C=!1,I(P),!w)if(n(h)!==null)w=!0,Q||(Q=!0,U());else{var V=n(f);V!==null&&$(T,V.startTime-P)}}var Q=!1,j=-1,_=5,F=-1;function O(){return E?!0:!(e.unstable_now()-F<_)}function H(){if(E=!1,Q){var P=e.unstable_now();F=P;var V=!0;try{e:{w=!1,C&&(C=!1,R(j),j=-1),b=!0;var ie=y;try{t:{for(I(P),m=n(h);m!==null&&!(m.expirationTime>P&&O());){var de=m.callback;if(typeof de=="function"){m.callback=null,y=m.priorityLevel;var D=de(m.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){m.callback=D,I(P),V=!0;break t}m===n(h)&&i(h),I(P)}else i(h);m=n(h)}if(m!==null)V=!0;else{var z=n(f);z!==null&&$(T,z.startTime-P),V=!1}}break e}finally{m=null,y=ie,b=!1}V=void 0}}finally{V?U():Q=!1}}}var U;if(typeof k=="function")U=function(){k(H)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,Y=J.port2;J.port1.onmessage=H,U=function(){Y.postMessage(null)}}else U=function(){S(H,0)};function $(P,V){j=S(function(){P(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var V=3;break;default:V=y}var ie=y;y=V;try{return P()}finally{y=ie}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(P,V){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ie=y;y=P;try{return V()}finally{y=ie}},e.unstable_scheduleCallback=function(P,V,ie){var de=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?de+ie:de):ie=de,P){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=ie+D,P={id:g++,callback:V,priorityLevel:P,startTime:ie,expirationTime:D,sortIndex:-1},ie>de?(P.sortIndex=ie,t(f,P),n(h)===null&&P===n(f)&&(C?(R(j),j=-1):C=!0,$(T,ie-de))):(P.sortIndex=D,t(h,P),w||b||(w=!0,Q||(Q=!0,U()))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var V=y;return function(){var ie=y;y=V;try{return P.apply(this,arguments)}finally{y=ie}}}})(Lp)),Lp}var T0;function iQ(){return T0||(T0=1,zp.exports=rQ()),zp.exports}var Pp={exports:{}},ln={};var j0;function sQ(){if(j0)return ln;j0=1;var e=jg();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={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},o=Symbol.for("react.portal");function a(h,f,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:h,containerInfo:f,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,ln.createPortal=function(h,f){var g=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 a(h,f,null,g)},ln.flushSync=function(h){var f=c.T,g=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=f,i.p=g,i.d.f()}},ln.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(h,f))},ln.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},ln.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var g=f.as,m=u(g,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?i.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:b}):g==="script"&&i.d.X(h,{crossOrigin:m,integrity:y,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ln.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var g=u(f.as,f.crossOrigin);i.d.M(h,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(h)},ln.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var g=f.as,m=u(g,f.crossOrigin);i.d.L(h,g,{crossOrigin:m,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})}},ln.preloadModule=function(h,f){if(typeof h=="string")if(f){var g=u(f.as,f.crossOrigin);i.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(h)},ln.requestFormReset=function(h){i.d.r(h)},ln.unstable_batchedUpdates=function(h,f){return h(f)},ln.useFormState=function(h,f,g){return c.H.useFormState(h,f,g)},ln.useFormStatus=function(){return c.H.useHostTransitionStatus()},ln.version="19.2.8",ln}var D0;function p1(){if(D0)return Pp.exports;D0=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(),Pp.exports=sQ(),Pp.exports}var M0;function oQ(){if(M0)return Tl;M0=1;var e=iQ(),t=jg(),n=p1();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function a(r){var s=r,l=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(l=s.return),r=s.return;while(r)}return s.tag===3?l:null}function c(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function u(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function h(r){if(a(r)!==r)throw Error(i(188))}function f(r){var s=r.alternate;if(!s){if(s=a(r),s===null)throw Error(i(188));return s!==r?null:r}for(var l=r,d=s;;){var A=l.return;if(A===null)break;var v=A.alternate;if(v===null){if(d=A.return,d!==null){l=d;continue}break}if(A.child===v.child){for(v=A.child;v;){if(v===l)return h(A),r;if(v===d)return h(A),s;v=v.sibling}throw Error(i(188))}if(l.return!==d.return)l=A,d=v;else{for(var B=!1,N=A.child;N;){if(N===l){B=!0,l=A,d=v;break}if(N===d){B=!0,d=A,l=v;break}N=N.sibling}if(!B){for(N=v.child;N;){if(N===l){B=!0,l=v,d=A;break}if(N===d){B=!0,d=v,l=A;break}N=N.sibling}if(!B)throw Error(i(189))}}if(l.alternate!==d)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?r:s}function g(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=g(r),s!==null)return s;r=r.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),k=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var J=Symbol.for("react.client.reference");function Y(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===J?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case C:return"Fragment";case S:return"Profiler";case E:return"StrictMode";case T:return"Suspense";case Q:return"SuspenseList";case F:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case k:return r.displayName||"Context";case R:return(r._context.displayName||"Context")+".Consumer";case I:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case j:return s=r.displayName||null,s!==null?s:Y(r.type)||"Memo";case _:s=r._payload,r=r._init;try{return Y(r(s))}catch{}}return null}var $=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},de=[],D=-1;function z(r){return{current:r}}function L(r){0>D||(r.current=de[D],de[D]=null,D--)}function M(r,s){D++,de[D]=r.current,r.current=s}var X=z(null),ee=z(null),ne=z(null),fe=z(null);function ae(r,s){switch(M(ne,s),M(ee,r),M(X,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?Yx(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=Yx(s),r=Kx(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}L(X),M(X,r)}function ce(){L(X),L(ee),L(ne)}function Me(r){r.memoizedState!==null&&M(fe,r);var s=X.current,l=Kx(s,r.type);s!==l&&(M(ee,r),M(X,l))}function Te(r){ee.current===r&&(L(X),L(ee)),fe.current===r&&(L(fe),kl._currentValue=ie)}var _e,$e;function lt(r){if(_e===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);_e=s&&s[1]||"",$e=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+_e+r+$e}var kt=!1;function On(r,s){if(!r||kt)return"";kt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(re){var te=re}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(re){te=re}r.call(ue.prototype)}}else{try{throw Error()}catch(re){te=re}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),B=v[0],N=v[1];if(B&&N){var q=B.split(`
|
|
4
|
+
`),Z=N.split(`
|
|
5
|
+
`);for(A=d=0;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;for(;A<Z.length&&!Z[A].includes("DetermineComponentFrameRoot");)A++;if(d===q.length||A===Z.length)for(d=q.length-1,A=Z.length-1;1<=d&&0<=A&&q[d]!==Z[A];)A--;for(;1<=d&&0<=A;d--,A--)if(q[d]!==Z[A]){if(d!==1||A!==1)do if(d--,A--,0>A||q[d]!==Z[A]){var se=`
|
|
6
|
+
`+q[d].replace(" at new "," at ");return r.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",r.displayName)),se}while(1<=d&&0<=A);break}}}finally{kt=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?lt(l):""}function xn(r,s){switch(r.tag){case 26:case 27:case 5:return lt(r.type);case 16:return lt("Lazy");case 13:return r.child!==s&&s!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return On(r.type,!1);case 11:return On(r.type.render,!1);case 1:return On(r.type,!0);case 31:return lt("Activity");default:return""}}function gr(r){try{var s="",l=null;do s+=xn(r,l),l=r,r=r.return;while(r);return s}catch(d){return`
|
|
7
|
+
Error generating stack: `+d.message+`
|
|
8
|
+
`+d.stack}}var sn=Object.prototype.hasOwnProperty,Si=e.unstable_scheduleCallback,gs=e.unstable_cancelCallback,Ft=e.unstable_shouldYield,vo=e.unstable_requestPaint,xt=e.unstable_now,Pa=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Ie=e.unstable_NormalPriority,ze=e.unstable_LowPriority,We=e.unstable_IdlePriority,Tt=e.log,Wn=e.unstable_setDisableYieldValue,wt=null,Bt=null;function on(r){if(typeof Tt=="function"&&Wn(r),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(wt,r)}catch{}}var it=Math.clz32?Math.clz32:Ef,Ar=Math.log,Ct=Math.LN2;function Ef(r){return r>>>=0,r===0?32:31-(Ar(r)/Ct|0)|0}var ki=256,zn=262144,As=4194304;function Hr(r){var s=r&42;if(s!==0)return s;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function ys(r,s,l){var d=r.pendingLanes;if(d===0)return 0;var A=0,v=r.suspendedLanes,B=r.pingedLanes;r=r.warmLanes;var N=d&134217727;return N!==0?(d=N&~v,d!==0?A=Hr(d):(B&=N,B!==0?A=Hr(B):l||(l=N&~r,l!==0&&(A=Hr(l))))):(N=d&~v,N!==0?A=Hr(N):B!==0?A=Hr(B):l||(l=d&~r,l!==0&&(A=Hr(l)))),A===0?0:s!==0&&s!==A&&(s&v)===0&&(v=A&-A,l=s&-s,v>=l||v===32&&(l&4194048)!==0)?s:A}function Bi(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Qe(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function It(){var r=As;return As<<=1,(As&62914560)===0&&(As=4194304),r}function jt(r){for(var s=[],l=0;31>l;l++)s.push(r);return s}function Dt(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function vs(r,s,l,d,A,v){var B=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var N=r.entanglements,q=r.expirationTimes,Z=r.hiddenUpdates;for(l=B&~l;0<l;){var se=31-it(l),ue=1<<se;N[se]=0,q[se]=-1;var te=Z[se];if(te!==null)for(Z[se]=null,se=0;se<te.length;se++){var re=te[se];re!==null&&(re.lane&=-536870913)}l&=~ue}d!==0&&Mt(r,d,0),v!==0&&A===0&&r.tag!==0&&(r.suspendedLanes|=v&~(B&~s))}function Mt(r,s,l){r.pendingLanes|=s,r.suspendedLanes&=~s;var d=31-it(s);r.entangledLanes|=s,r.entanglements[d]=r.entanglements[d]|1073741824|l&261930}function mn(r,s){var l=r.entangledLanes|=s;for(r=r.entanglements;l;){var d=31-it(l),A=1<<d;A&s|r[d]&s&&(r[d]|=s),l&=~A}}function Ln(r,s){var l=s&-s;return l=(l&42)!==0?1:bs(l),(l&(r.suspendedLanes|s))!==0?0:l}function bs(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function wn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function bo(){var r=V.p;return r!==0?r:(r=window.event,r===void 0?32:g0(r.type))}function jy(r,s){var l=V.p;try{return V.p=r,s()}finally{V.p=l}}var Ii=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Ii,Cn="__reactProps$"+Ii,xo="__reactContainer$"+Ii,Sf="__reactEvents$"+Ii,H2="__reactListeners$"+Ii,U2="__reactHandles$"+Ii,Dy="__reactResources$"+Ii,Fa="__reactMarker$"+Ii;function kf(r){delete r[Wt],delete r[Cn],delete r[Sf],delete r[H2],delete r[U2]}function wo(r){var s=r[Wt];if(s)return s;for(var l=r.parentNode;l;){if(s=l[xo]||l[Wt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(r=e0(r);r!==null;){if(l=r[Wt])return l;r=e0(r)}return s}r=l,l=r.parentNode}return null}function Co(r){if(r=r[Wt]||r[xo]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function Ha(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function Eo(r){var s=r[Dy];return s||(s=r[Dy]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Yt(r){r[Fa]=!0}var My=new Set,Ny={};function xs(r,s){So(r,s),So(r+"Capture",s)}function So(r,s){for(Ny[r]=s,r=0;r<s.length;r++)My.add(s[r])}var q2=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]*$"),_y={},Oy={};function G2(r){return sn.call(Oy,r)?!0:sn.call(_y,r)?!1:q2.test(r)?Oy[r]=!0:(_y[r]=!0,!1)}function Bc(r,s,l){if(G2(s))if(l===null)r.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+l)}}function Ic(r,s,l){if(l===null)r.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+l)}}function Ur(r,s,l,d){if(d===null)r.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(s,l,""+d)}}function Zn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function zy(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Y2(r,s,l){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var A=d.get,v=d.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return A.call(this)},set:function(B){l=""+B,v.call(this,B)}}),Object.defineProperty(r,s,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(B){l=""+B},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Bf(r){if(!r._valueTracker){var s=zy(r)?"checked":"value";r._valueTracker=Y2(r,s,""+r[s])}}function Ly(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var l=s.getValue(),d="";return r&&(d=zy(r)?r.checked?"true":"false":r.value),r=d,r!==l?(s.setValue(r),!0):!1}function Rc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var K2=/[\n"\\]/g;function er(r){return r.replace(K2,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function If(r,s,l,d,A,v,B,N){r.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?r.type=B:r.removeAttribute("type"),s!=null?B==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+Zn(s)):r.value!==""+Zn(s)&&(r.value=""+Zn(s)):B!=="submit"&&B!=="reset"||r.removeAttribute("value"),s!=null?Rf(r,B,Zn(s)):l!=null?Rf(r,B,Zn(l)):d!=null&&r.removeAttribute("value"),A==null&&v!=null&&(r.defaultChecked=!!v),A!=null&&(r.checked=A&&typeof A!="function"&&typeof A!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?r.name=""+Zn(N):r.removeAttribute("name")}function Py(r,s,l,d,A,v,B,N){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),s!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||s!=null)){Bf(r);return}l=l!=null?""+Zn(l):"",s=s!=null?""+Zn(s):l,N||s===r.value||(r.value=s),r.defaultValue=s}d=d??A,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=N?r.checked:!!d,r.defaultChecked=!!d,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(r.name=B),Bf(r)}function Rf(r,s,l){s==="number"&&Rc(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function ko(r,s,l,d){if(r=r.options,s){s={};for(var A=0;A<l.length;A++)s["$"+l[A]]=!0;for(l=0;l<r.length;l++)A=s.hasOwnProperty("$"+r[l].value),r[l].selected!==A&&(r[l].selected=A),A&&d&&(r[l].defaultSelected=!0)}else{for(l=""+Zn(l),s=null,A=0;A<r.length;A++){if(r[A].value===l){r[A].selected=!0,d&&(r[A].defaultSelected=!0);return}s!==null||r[A].disabled||(s=r[A])}s!==null&&(s.selected=!0)}}function Fy(r,s,l){if(s!=null&&(s=""+Zn(s),s!==r.value&&(r.value=s),l==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=l!=null?""+Zn(l):""}function Hy(r,s,l,d){if(s==null){if(d!=null){if(l!=null)throw Error(i(92));if($(d)){if(1<d.length)throw Error(i(93));d=d[0]}l=d}l==null&&(l=""),s=l}l=Zn(s),r.defaultValue=l,d=r.textContent,d===l&&d!==""&&d!==null&&(r.value=d),Bf(r)}function Bo(r,s){if(s){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=s;return}}r.textContent=s}var $2=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 Uy(r,s,l){var d=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":d?r.setProperty(s,l):typeof l!="number"||l===0||$2.has(s)?s==="float"?r.cssFloat=l:r[s]=(""+l).trim():r[s]=l+"px"}function qy(r,s,l){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var A in s)d=s[A],s.hasOwnProperty(A)&&l[A]!==d&&Uy(r,A,d)}else for(var v in s)s.hasOwnProperty(v)&&Uy(r,v,s[v])}function Qf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 V2=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"]]),J2=/^[\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 Qc(r){return J2.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function qr(){}var Tf=null;function jf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Io=null,Ro=null;function Gy(r){var s=Co(r);if(s&&(r=s.stateNode)){var l=r[Cn]||null;e:switch(r=s.stateNode,s.type){case"input":if(If(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+er(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var d=l[s];if(d!==r&&d.form===r.form){var A=d[Cn]||null;if(!A)throw Error(i(90));If(d,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(s=0;s<l.length;s++)d=l[s],d.form===r.form&&Ly(d)}break e;case"textarea":Fy(r,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&ko(r,!!l.multiple,s,!1)}}}var Df=!1;function Yy(r,s,l){if(Df)return r(s,l);Df=!0;try{var d=r(s);return d}finally{if(Df=!1,(Io!==null||Ro!==null)&&(Au(),Io&&(s=Io,r=Ro,Ro=Io=null,Gy(s),r)))for(s=0;s<r.length;s++)Gy(r[s])}}function Ua(r,s){var l=r.stateNode;if(l===null)return null;var d=l[Cn]||null;if(d===null)return null;l=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(i(231,s,typeof l));return l}var Gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mf=!1;if(Gr)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){Mf=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{Mf=!1}var Ri=null,Nf=null,Tc=null;function Ky(){if(Tc)return Tc;var r,s=Nf,l=s.length,d,A="value"in Ri?Ri.value:Ri.textContent,v=A.length;for(r=0;r<l&&s[r]===A[r];r++);var B=l-r;for(d=1;d<=B&&s[l-d]===A[v-d];d++);return Tc=A.slice(r,1<d?1-d:void 0)}function jc(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Dc(){return!0}function $y(){return!1}function En(r){function s(l,d,A,v,B){this._reactName=l,this._targetInst=A,this.type=d,this.nativeEvent=v,this.target=B,this.currentTarget=null;for(var N in r)r.hasOwnProperty(N)&&(l=r[N],this[N]=l?l(v):v[N]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Dc:$y,this.isPropagationStopped=$y,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),s}var ws={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mc=En(ws),Ga=m({},ws,{view:0,detail:0}),X2=En(Ga),_f,Of,Ya,Nc=m({},Ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ya&&(Ya&&r.type==="mousemove"?(_f=r.screenX-Ya.screenX,Of=r.screenY-Ya.screenY):Of=_f=0,Ya=r),_f)},movementY:function(r){return"movementY"in r?r.movementY:Of}}),Vy=En(Nc),W2=m({},Nc,{dataTransfer:0}),Z2=En(W2),eI=m({},Ga,{relatedTarget:0}),zf=En(eI),tI=m({},ws,{animationName:0,elapsedTime:0,pseudoElement:0}),nI=En(tI),rI=m({},ws,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),iI=En(rI),sI=m({},ws,{data:0}),Jy=En(sI),oI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aI={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"},lI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cI(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=lI[r])?!!s[r]:!1}function Lf(){return cI}var uI=m({},Ga,{key:function(r){if(r.key){var s=oI[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=jc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?aI[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lf,charCode:function(r){return r.type==="keypress"?jc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?jc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),dI=En(uI),fI=m({},Nc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xy=En(fI),hI=m({},Ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lf}),pI=En(hI),mI=m({},ws,{propertyName:0,elapsedTime:0,pseudoElement:0}),gI=En(mI),AI=m({},Nc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),yI=En(AI),vI=m({},ws,{newState:0,oldState:0}),bI=En(vI),xI=[9,13,27,32],Pf=Gr&&"CompositionEvent"in window,Ka=null;Gr&&"documentMode"in document&&(Ka=document.documentMode);var wI=Gr&&"TextEvent"in window&&!Ka,Wy=Gr&&(!Pf||Ka&&8<Ka&&11>=Ka),Zy=" ",ev=!1;function tv(r,s){switch(r){case"keyup":return xI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Qo=!1;function CI(r,s){switch(r){case"compositionend":return nv(s);case"keypress":return s.which!==32?null:(ev=!0,Zy);case"textInput":return r=s.data,r===Zy&&ev?null:r;default:return null}}function EI(r,s){if(Qo)return r==="compositionend"||!Pf&&tv(r,s)?(r=Ky(),Tc=Nf=Ri=null,Qo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Wy&&s.locale!=="ko"?null:s.data;default:return null}}var SI={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 rv(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!SI[r.type]:s==="textarea"}function iv(r,s,l,d){Io?Ro?Ro.push(d):Ro=[d]:Io=d,s=Eu(s,"onChange"),0<s.length&&(l=new Mc("onChange","change",null,l,d),r.push({event:l,listeners:s}))}var $a=null,Va=null;function kI(r){Px(r,0)}function _c(r){var s=Ha(r);if(Ly(s))return r}function sv(r,s){if(r==="change")return s}var ov=!1;if(Gr){var Ff;if(Gr){var Hf="oninput"in document;if(!Hf){var av=document.createElement("div");av.setAttribute("oninput","return;"),Hf=typeof av.oninput=="function"}Ff=Hf}else Ff=!1;ov=Ff&&(!document.documentMode||9<document.documentMode)}function lv(){$a&&($a.detachEvent("onpropertychange",cv),Va=$a=null)}function cv(r){if(r.propertyName==="value"&&_c(Va)){var s=[];iv(s,Va,r,jf(r)),Yy(kI,s)}}function BI(r,s,l){r==="focusin"?(lv(),$a=s,Va=l,$a.attachEvent("onpropertychange",cv)):r==="focusout"&&lv()}function II(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return _c(Va)}function RI(r,s){if(r==="click")return _c(s)}function QI(r,s){if(r==="input"||r==="change")return _c(s)}function TI(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var Pn=typeof Object.is=="function"?Object.is:TI;function Ja(r,s){if(Pn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var l=Object.keys(r),d=Object.keys(s);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var A=l[d];if(!sn.call(s,A)||!Pn(r[A],s[A]))return!1}return!0}function uv(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function dv(r,s){var l=uv(r);r=0;for(var d;l;){if(l.nodeType===3){if(d=r+l.textContent.length,r<=s&&d>=s)return{node:l,offset:s-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=uv(l)}}function fv(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?fv(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function hv(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Rc(r.document);s instanceof r.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)r=s.contentWindow;else break;s=Rc(r.document)}return s}function Uf(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var jI=Gr&&"documentMode"in document&&11>=document.documentMode,To=null,qf=null,Xa=null,Gf=!1;function pv(r,s,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Gf||To==null||To!==Rc(d)||(d=To,"selectionStart"in d&&Uf(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Xa&&Ja(Xa,d)||(Xa=d,d=Eu(qf,"onSelect"),0<d.length&&(s=new Mc("onSelect","select",null,s,l),r.push({event:s,listeners:d}),s.target=To)))}function Cs(r,s){var l={};return l[r.toLowerCase()]=s.toLowerCase(),l["Webkit"+r]="webkit"+s,l["Moz"+r]="moz"+s,l}var jo={animationend:Cs("Animation","AnimationEnd"),animationiteration:Cs("Animation","AnimationIteration"),animationstart:Cs("Animation","AnimationStart"),transitionrun:Cs("Transition","TransitionRun"),transitionstart:Cs("Transition","TransitionStart"),transitioncancel:Cs("Transition","TransitionCancel"),transitionend:Cs("Transition","TransitionEnd")},Yf={},mv={};Gr&&(mv=document.createElement("div").style,"AnimationEvent"in window||(delete jo.animationend.animation,delete jo.animationiteration.animation,delete jo.animationstart.animation),"TransitionEvent"in window||delete jo.transitionend.transition);function Es(r){if(Yf[r])return Yf[r];if(!jo[r])return r;var s=jo[r],l;for(l in s)if(s.hasOwnProperty(l)&&l in mv)return Yf[r]=s[l];return r}var gv=Es("animationend"),Av=Es("animationiteration"),yv=Es("animationstart"),DI=Es("transitionrun"),MI=Es("transitionstart"),NI=Es("transitioncancel"),vv=Es("transitionend"),bv=new Map,Kf="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(" ");Kf.push("scrollEnd");function yr(r,s){bv.set(r,s),xs(s,[r])}var Oc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},tr=[],Do=0,$f=0;function zc(){for(var r=Do,s=$f=Do=0;s<r;){var l=tr[s];tr[s++]=null;var d=tr[s];tr[s++]=null;var A=tr[s];tr[s++]=null;var v=tr[s];if(tr[s++]=null,d!==null&&A!==null){var B=d.pending;B===null?A.next=A:(A.next=B.next,B.next=A),d.pending=A}v!==0&&xv(l,A,v)}}function Lc(r,s,l,d){tr[Do++]=r,tr[Do++]=s,tr[Do++]=l,tr[Do++]=d,$f|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Vf(r,s,l,d){return Lc(r,s,l,d),Pc(r)}function Ss(r,s){return Lc(r,null,null,s),Pc(r)}function xv(r,s,l){r.lanes|=l;var d=r.alternate;d!==null&&(d.lanes|=l);for(var A=!1,v=r.return;v!==null;)v.childLanes|=l,d=v.alternate,d!==null&&(d.childLanes|=l),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(A=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,A&&s!==null&&(A=31-it(l),r=v.hiddenUpdates,d=r[A],d===null?r[A]=[s]:d.push(s),s.lane=l|536870912),v):null}function Pc(r){if(50<vl)throw vl=0,ip=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var Mo={};function _I(r,s,l,d){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fn(r,s,l,d){return new _I(r,s,l,d)}function Jf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Yr(r,s){var l=r.alternate;return l===null?(l=Fn(r.tag,s,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=s,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,s=r.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function wv(r,s){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,s=l.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function Fc(r,s,l,d,A,v){var B=0;if(d=r,typeof r=="function")Jf(r)&&(B=1);else if(typeof r=="string")B=FR(r,l,X.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case F:return r=Fn(31,l,s,A),r.elementType=F,r.lanes=v,r;case C:return ks(l.children,A,v,s);case E:B=8,A|=24;break;case S:return r=Fn(12,l,s,A|2),r.elementType=S,r.lanes=v,r;case T:return r=Fn(13,l,s,A),r.elementType=T,r.lanes=v,r;case Q:return r=Fn(19,l,s,A),r.elementType=Q,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:B=10;break e;case R:B=9;break e;case I:B=11;break e;case j:B=14;break e;case _:B=16,d=null;break e}B=29,l=Error(i(130,r===null?"null":typeof r,"")),d=null}return s=Fn(B,l,s,A),s.elementType=r,s.type=d,s.lanes=v,s}function ks(r,s,l,d){return r=Fn(7,r,d,s),r.lanes=l,r}function Xf(r,s,l){return r=Fn(6,r,null,s),r.lanes=l,r}function Cv(r){var s=Fn(18,null,null,0);return s.stateNode=r,s}function Wf(r,s,l){return s=Fn(4,r.children!==null?r.children:[],r.key,s),s.lanes=l,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var Ev=new WeakMap;function nr(r,s){if(typeof r=="object"&&r!==null){var l=Ev.get(r);return l!==void 0?l:(s={value:r,source:s,stack:gr(s)},Ev.set(r,s),s)}return{value:r,source:s,stack:gr(s)}}var No=[],_o=0,Hc=null,Wa=0,rr=[],ir=0,Qi=null,Sr=1,kr="";function Kr(r,s){No[_o++]=Wa,No[_o++]=Hc,Hc=r,Wa=s}function Sv(r,s,l){rr[ir++]=Sr,rr[ir++]=kr,rr[ir++]=Qi,Qi=r;var d=Sr;r=kr;var A=32-it(d)-1;d&=~(1<<A),l+=1;var v=32-it(s)+A;if(30<v){var B=A-A%5;v=(d&(1<<B)-1).toString(32),d>>=B,A-=B,Sr=1<<32-it(s)+A|l<<A|d,kr=v+r}else Sr=1<<v|l<<A|d,kr=r}function Zf(r){r.return!==null&&(Kr(r,1),Sv(r,1,0))}function eh(r){for(;r===Hc;)Hc=No[--_o],No[_o]=null,Wa=No[--_o],No[_o]=null;for(;r===Qi;)Qi=rr[--ir],rr[ir]=null,kr=rr[--ir],rr[ir]=null,Sr=rr[--ir],rr[ir]=null}function kv(r,s){rr[ir++]=Sr,rr[ir++]=kr,rr[ir++]=Qi,Sr=s.id,kr=s.overflow,Qi=r}var Zt=null,gt=null,Ve=!1,Ti=null,sr=!1,th=Error(i(519));function ji(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Za(nr(s,r)),th}function Bv(r){var s=r.stateNode,l=r.type,d=r.memoizedProps;switch(s[Wt]=r,s[Cn]=d,l){case"dialog":Ue("cancel",s),Ue("close",s);break;case"iframe":case"object":case"embed":Ue("load",s);break;case"video":case"audio":for(l=0;l<xl.length;l++)Ue(xl[l],s);break;case"source":Ue("error",s);break;case"img":case"image":case"link":Ue("error",s),Ue("load",s);break;case"details":Ue("toggle",s);break;case"input":Ue("invalid",s),Py(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Ue("invalid",s);break;case"textarea":Ue("invalid",s),Hy(s,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||d.suppressHydrationWarning===!0||qx(s.textContent,l)?(d.popover!=null&&(Ue("beforetoggle",s),Ue("toggle",s)),d.onScroll!=null&&Ue("scroll",s),d.onScrollEnd!=null&&Ue("scrollend",s),d.onClick!=null&&(s.onclick=qr),s=!0):s=!1,s||ji(r,!0)}function Iv(r){for(Zt=r.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:Zt=Zt.return}}function Oo(r){if(r!==Zt)return!1;if(!Ve)return Iv(r),Ve=!0,!1;var s=r.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||vp(r.type,r.memoizedProps)),l=!l),l&>&&ji(r),Iv(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));gt=Zx(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));gt=Zx(r)}else s===27?(s=gt,Yi(r.type)?(r=Ep,Ep=null,gt=r):gt=s):gt=Zt?ar(r.stateNode.nextSibling):null;return!0}function Bs(){gt=Zt=null,Ve=!1}function nh(){var r=Ti;return r!==null&&(In===null?In=r:In.push.apply(In,r),Ti=null),r}function Za(r){Ti===null?Ti=[r]:Ti.push(r)}var rh=z(null),Is=null,$r=null;function Di(r,s,l){M(rh,s._currentValue),s._currentValue=l}function Vr(r){r._currentValue=rh.current,L(rh)}function ih(r,s,l){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===l)break;r=r.return}}function sh(r,s,l,d){var A=r.child;for(A!==null&&(A.return=r);A!==null;){var v=A.dependencies;if(v!==null){var B=A.child;v=v.firstContext;e:for(;v!==null;){var N=v;v=A;for(var q=0;q<s.length;q++)if(N.context===s[q]){v.lanes|=l,N=v.alternate,N!==null&&(N.lanes|=l),ih(v.return,l,r),d||(B=null);break e}v=N.next}}else if(A.tag===18){if(B=A.return,B===null)throw Error(i(341));B.lanes|=l,v=B.alternate,v!==null&&(v.lanes|=l),ih(B,l,r),B=null}else B=A.child;if(B!==null)B.return=A;else for(B=A;B!==null;){if(B===r){B=null;break}if(A=B.sibling,A!==null){A.return=B.return,B=A;break}B=B.return}A=B}}function zo(r,s,l,d){r=null;for(var A=s,v=!1;A!==null;){if(!v){if((A.flags&524288)!==0)v=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var B=A.alternate;if(B===null)throw Error(i(387));if(B=B.memoizedProps,B!==null){var N=A.type;Pn(A.pendingProps.value,B.value)||(r!==null?r.push(N):r=[N])}}else if(A===fe.current){if(B=A.alternate,B===null)throw Error(i(387));B.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(r!==null?r.push(kl):r=[kl])}A=A.return}r!==null&&sh(s,r,l,d),s.flags|=262144}function Uc(r){for(r=r.firstContext;r!==null;){if(!Pn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Rs(r){Is=r,$r=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function en(r){return Rv(Is,r)}function qc(r,s){return Is===null&&Rs(r),Rv(r,s)}function Rv(r,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},$r===null){if(r===null)throw Error(i(308));$r=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else $r=$r.next=s;return l}var OI=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(l,d){r.push(d)}};this.abort=function(){s.aborted=!0,r.forEach(function(l){return l()})}},zI=e.unstable_scheduleCallback,LI=e.unstable_NormalPriority,Nt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oh(){return{controller:new OI,data:new Map,refCount:0}}function el(r){r.refCount--,r.refCount===0&&zI(LI,function(){r.controller.abort()})}var tl=null,ah=0,Lo=0,Po=null;function PI(r,s){if(tl===null){var l=tl=[];ah=0,Lo=up(),Po={status:"pending",value:void 0,then:function(d){l.push(d)}}}return ah++,s.then(Qv,Qv),s}function Qv(){if(--ah===0&&tl!==null){Po!==null&&(Po.status="fulfilled");var r=tl;tl=null,Lo=0,Po=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function FI(r,s){var l=[],d={status:"pending",value:null,reason:null,then:function(A){l.push(A)}};return r.then(function(){d.status="fulfilled",d.value=s;for(var A=0;A<l.length;A++)(0,l[A])(s)},function(A){for(d.status="rejected",d.reason=A,A=0;A<l.length;A++)(0,l[A])(void 0)}),d}var Tv=P.S;P.S=function(r,s){px=xt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&PI(r,s),Tv!==null&&Tv(r,s)};var Qs=z(null);function lh(){var r=Qs.current;return r!==null?r:ht.pooledCache}function Gc(r,s){s===null?M(Qs,Qs.current):M(Qs,s.pool)}function jv(){var r=lh();return r===null?null:{parent:Nt._currentValue,pool:r}}var Fo=Error(i(460)),ch=Error(i(474)),Yc=Error(i(542)),Kc={then:function(){}};function Dv(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Mv(r,s,l){switch(l=r[l],l===void 0?r.push(s):l!==s&&(s.then(qr,qr),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,_v(r),r;default:if(typeof s.status=="string")s.then(qr,qr);else{if(r=ht,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(d){if(s.status==="pending"){var A=s;A.status="fulfilled",A.value=d}},function(d){if(s.status==="pending"){var A=s;A.status="rejected",A.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,_v(r),r}throw js=s,Fo}}function Ts(r){try{var s=r._init;return s(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(js=l,Fo):l}}var js=null;function Nv(){if(js===null)throw Error(i(459));var r=js;return js=null,r}function _v(r){if(r===Fo||r===Yc)throw Error(i(483))}var Ho=null,nl=0;function $c(r){var s=nl;return nl+=1,Ho===null&&(Ho=[]),Mv(Ho,r,s)}function rl(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function Vc(r,s){throw s.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Ov(r){function s(K,G){if(r){var W=K.deletions;W===null?(K.deletions=[G],K.flags|=16):W.push(G)}}function l(K,G){if(!r)return null;for(;G!==null;)s(K,G),G=G.sibling;return null}function d(K){for(var G=new Map;K!==null;)K.key!==null?G.set(K.key,K):G.set(K.index,K),K=K.sibling;return G}function A(K,G){return K=Yr(K,G),K.index=0,K.sibling=null,K}function v(K,G,W){return K.index=W,r?(W=K.alternate,W!==null?(W=W.index,W<G?(K.flags|=67108866,G):W):(K.flags|=67108866,G)):(K.flags|=1048576,G)}function B(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function N(K,G,W,le){return G===null||G.tag!==6?(G=Xf(W,K.mode,le),G.return=K,G):(G=A(G,W),G.return=K,G)}function q(K,G,W,le){var Se=W.type;return Se===C?se(K,G,W.props.children,le,W.key):G!==null&&(G.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===_&&Ts(Se)===G.type)?(G=A(G,W.props),rl(G,W),G.return=K,G):(G=Fc(W.type,W.key,W.props,null,K.mode,le),rl(G,W),G.return=K,G)}function Z(K,G,W,le){return G===null||G.tag!==4||G.stateNode.containerInfo!==W.containerInfo||G.stateNode.implementation!==W.implementation?(G=Wf(W,K.mode,le),G.return=K,G):(G=A(G,W.children||[]),G.return=K,G)}function se(K,G,W,le,Se){return G===null||G.tag!==7?(G=ks(W,K.mode,le,Se),G.return=K,G):(G=A(G,W),G.return=K,G)}function ue(K,G,W){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Xf(""+G,K.mode,W),G.return=K,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case b:return W=Fc(G.type,G.key,G.props,null,K.mode,W),rl(W,G),W.return=K,W;case w:return G=Wf(G,K.mode,W),G.return=K,G;case _:return G=Ts(G),ue(K,G,W)}if($(G)||U(G))return G=ks(G,K.mode,W,null),G.return=K,G;if(typeof G.then=="function")return ue(K,$c(G),W);if(G.$$typeof===k)return ue(K,qc(K,G),W);Vc(K,G)}return null}function te(K,G,W,le){var Se=G!==null?G.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Se!==null?null:N(K,G,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return W.key===Se?q(K,G,W,le):null;case w:return W.key===Se?Z(K,G,W,le):null;case _:return W=Ts(W),te(K,G,W,le)}if($(W)||U(W))return Se!==null?null:se(K,G,W,le,null);if(typeof W.then=="function")return te(K,G,$c(W),le);if(W.$$typeof===k)return te(K,G,qc(K,W),le);Vc(K,W)}return null}function re(K,G,W,le,Se){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return K=K.get(W)||null,N(G,K,""+le,Se);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case b:return K=K.get(le.key===null?W:le.key)||null,q(G,K,le,Se);case w:return K=K.get(le.key===null?W:le.key)||null,Z(G,K,le,Se);case _:return le=Ts(le),re(K,G,W,le,Se)}if($(le)||U(le))return K=K.get(W)||null,se(G,K,le,Se,null);if(typeof le.then=="function")return re(K,G,W,$c(le),Se);if(le.$$typeof===k)return re(K,G,W,qc(G,le),Se);Vc(G,le)}return null}function xe(K,G,W,le){for(var Se=null,tt=null,Ce=G,Oe=G=0,Ke=null;Ce!==null&&Oe<W.length;Oe++){Ce.index>Oe?(Ke=Ce,Ce=null):Ke=Ce.sibling;var nt=te(K,Ce,W[Oe],le);if(nt===null){Ce===null&&(Ce=Ke);break}r&&Ce&&nt.alternate===null&&s(K,Ce),G=v(nt,G,Oe),tt===null?Se=nt:tt.sibling=nt,tt=nt,Ce=Ke}if(Oe===W.length)return l(K,Ce),Ve&&Kr(K,Oe),Se;if(Ce===null){for(;Oe<W.length;Oe++)Ce=ue(K,W[Oe],le),Ce!==null&&(G=v(Ce,G,Oe),tt===null?Se=Ce:tt.sibling=Ce,tt=Ce);return Ve&&Kr(K,Oe),Se}for(Ce=d(Ce);Oe<W.length;Oe++)Ke=re(Ce,K,Oe,W[Oe],le),Ke!==null&&(r&&Ke.alternate!==null&&Ce.delete(Ke.key===null?Oe:Ke.key),G=v(Ke,G,Oe),tt===null?Se=Ke:tt.sibling=Ke,tt=Ke);return r&&Ce.forEach(function(Xi){return s(K,Xi)}),Ve&&Kr(K,Oe),Se}function Be(K,G,W,le){if(W==null)throw Error(i(151));for(var Se=null,tt=null,Ce=G,Oe=G=0,Ke=null,nt=W.next();Ce!==null&&!nt.done;Oe++,nt=W.next()){Ce.index>Oe?(Ke=Ce,Ce=null):Ke=Ce.sibling;var Xi=te(K,Ce,nt.value,le);if(Xi===null){Ce===null&&(Ce=Ke);break}r&&Ce&&Xi.alternate===null&&s(K,Ce),G=v(Xi,G,Oe),tt===null?Se=Xi:tt.sibling=Xi,tt=Xi,Ce=Ke}if(nt.done)return l(K,Ce),Ve&&Kr(K,Oe),Se;if(Ce===null){for(;!nt.done;Oe++,nt=W.next())nt=ue(K,nt.value,le),nt!==null&&(G=v(nt,G,Oe),tt===null?Se=nt:tt.sibling=nt,tt=nt);return Ve&&Kr(K,Oe),Se}for(Ce=d(Ce);!nt.done;Oe++,nt=W.next())nt=re(Ce,K,Oe,nt.value,le),nt!==null&&(r&&nt.alternate!==null&&Ce.delete(nt.key===null?Oe:nt.key),G=v(nt,G,Oe),tt===null?Se=nt:tt.sibling=nt,tt=nt);return r&&Ce.forEach(function(WR){return s(K,WR)}),Ve&&Kr(K,Oe),Se}function dt(K,G,W,le){if(typeof W=="object"&&W!==null&&W.type===C&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case b:e:{for(var Se=W.key;G!==null;){if(G.key===Se){if(Se=W.type,Se===C){if(G.tag===7){l(K,G.sibling),le=A(G,W.props.children),le.return=K,K=le;break e}}else if(G.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===_&&Ts(Se)===G.type){l(K,G.sibling),le=A(G,W.props),rl(le,W),le.return=K,K=le;break e}l(K,G);break}else s(K,G);G=G.sibling}W.type===C?(le=ks(W.props.children,K.mode,le,W.key),le.return=K,K=le):(le=Fc(W.type,W.key,W.props,null,K.mode,le),rl(le,W),le.return=K,K=le)}return B(K);case w:e:{for(Se=W.key;G!==null;){if(G.key===Se)if(G.tag===4&&G.stateNode.containerInfo===W.containerInfo&&G.stateNode.implementation===W.implementation){l(K,G.sibling),le=A(G,W.children||[]),le.return=K,K=le;break e}else{l(K,G);break}else s(K,G);G=G.sibling}le=Wf(W,K.mode,le),le.return=K,K=le}return B(K);case _:return W=Ts(W),dt(K,G,W,le)}if($(W))return xe(K,G,W,le);if(U(W)){if(Se=U(W),typeof Se!="function")throw Error(i(150));return W=Se.call(W),Be(K,G,W,le)}if(typeof W.then=="function")return dt(K,G,$c(W),le);if(W.$$typeof===k)return dt(K,G,qc(K,W),le);Vc(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,G!==null&&G.tag===6?(l(K,G.sibling),le=A(G,W),le.return=K,K=le):(l(K,G),le=Xf(W,K.mode,le),le.return=K,K=le),B(K)):l(K,G)}return function(K,G,W,le){try{nl=0;var Se=dt(K,G,W,le);return Ho=null,Se}catch(Ce){if(Ce===Fo||Ce===Yc)throw Ce;var tt=Fn(29,Ce,null,K.mode);return tt.lanes=le,tt.return=K,tt}}}var Ds=Ov(!0),zv=Ov(!1),Mi=!1;function uh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ni(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function _i(r,s,l){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(rt&2)!==0){var A=d.pending;return A===null?s.next=s:(s.next=A.next,A.next=s),d.pending=s,s=Pc(r),xv(r,null,l),s}return Lc(r,d,s,l),Pc(r)}function il(r,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var d=s.lanes;d&=r.pendingLanes,l|=d,s.lanes=l,mn(r,l)}}function fh(r,s){var l=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var A=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var B={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?A=v=B:v=v.next=B,l=l.next}while(l!==null);v===null?A=v=s:v=v.next=s}else A=v=s;l={baseState:d.baseState,firstBaseUpdate:A,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=s:r.next=s,l.lastBaseUpdate=s}var hh=!1;function sl(){if(hh){var r=Po;if(r!==null)throw r}}function ol(r,s,l,d){hh=!1;var A=r.updateQueue;Mi=!1;var v=A.firstBaseUpdate,B=A.lastBaseUpdate,N=A.shared.pending;if(N!==null){A.shared.pending=null;var q=N,Z=q.next;q.next=null,B===null?v=Z:B.next=Z,B=q;var se=r.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==B&&(N===null?se.firstBaseUpdate=Z:N.next=Z,se.lastBaseUpdate=q))}if(v!==null){var ue=A.baseState;B=0,se=Z=q=null,N=v;do{var te=N.lane&-536870913,re=te!==N.lane;if(re?(Ye&te)===te:(d&te)===te){te!==0&&te===Lo&&(hh=!0),se!==null&&(se=se.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var xe=r,Be=N;te=s;var dt=l;switch(Be.tag){case 1:if(xe=Be.payload,typeof xe=="function"){ue=xe.call(dt,ue,te);break e}ue=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Be.payload,te=typeof xe=="function"?xe.call(dt,ue,te):xe,te==null)break e;ue=m({},ue,te);break e;case 2:Mi=!0}}te=N.callback,te!==null&&(r.flags|=64,re&&(r.flags|=8192),re=A.callbacks,re===null?A.callbacks=[te]:re.push(te))}else re={lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Z=se=re,q=ue):se=se.next=re,B|=te;if(N=N.next,N===null){if(N=A.shared.pending,N===null)break;re=N,N=re.next,re.next=null,A.lastBaseUpdate=re,A.shared.pending=null}}while(!0);se===null&&(q=ue),A.baseState=q,A.firstBaseUpdate=Z,A.lastBaseUpdate=se,v===null&&(A.shared.lanes=0),Fi|=B,r.lanes=B,r.memoizedState=ue}}function Lv(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function Pv(r,s){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)Lv(l[r],s)}var Uo=z(null),Jc=z(0);function Fv(r,s){r=ii,M(Jc,r),M(Uo,s),ii=r|s.baseLanes}function ph(){M(Jc,ii),M(Uo,Uo.current)}function mh(){ii=Jc.current,L(Uo),L(Jc)}var Hn=z(null),or=null;function Oi(r){var s=r.alternate;M(Rt,Rt.current&1),M(Hn,r),or===null&&(s===null||Uo.current!==null||s.memoizedState!==null)&&(or=r)}function gh(r){M(Rt,Rt.current),M(Hn,r),or===null&&(or=r)}function Hv(r){r.tag===22?(M(Rt,Rt.current),M(Hn,r),or===null&&(or=r)):zi()}function zi(){M(Rt,Rt.current),M(Hn,Hn.current)}function Un(r){L(Hn),or===r&&(or=null),L(Rt)}var Rt=z(0);function Xc(r){for(var s=r;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||wp(l)||Cp(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Jr=0,Ne=null,ct=null,_t=null,Wc=!1,qo=!1,Ms=!1,Zc=0,al=0,Go=null,HI=0;function Et(){throw Error(i(321))}function Ah(r,s){if(s===null)return!1;for(var l=0;l<s.length&&l<r.length;l++)if(!Pn(r[l],s[l]))return!1;return!0}function yh(r,s,l,d,A,v){return Jr=v,Ne=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,P.H=r===null||r.memoizedState===null?Sb:Dh,Ms=!1,v=l(d,A),Ms=!1,qo&&(v=qv(s,l,d,A)),Uv(r),v}function Uv(r){P.H=ul;var s=ct!==null&&ct.next!==null;if(Jr=0,_t=ct=Ne=null,Wc=!1,al=0,Go=null,s)throw Error(i(300));r===null||Ot||(r=r.dependencies,r!==null&&Uc(r)&&(Ot=!0))}function qv(r,s,l,d){Ne=r;var A=0;do{if(qo&&(Go=null),al=0,qo=!1,25<=A)throw Error(i(301));if(A+=1,_t=ct=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}P.H=kb,v=s(l,d)}while(qo);return v}function UI(){var r=P.H,s=r.useState()[0];return s=typeof s.then=="function"?ll(s):s,r=r.useState()[0],(ct!==null?ct.memoizedState:null)!==r&&(Ne.flags|=1024),s}function vh(){var r=Zc!==0;return Zc=0,r}function bh(r,s,l){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~l}function xh(r){if(Wc){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Wc=!1}Jr=0,_t=ct=Ne=null,qo=!1,al=Zc=0,Go=null}function gn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Ne.memoizedState=_t=r:_t=_t.next=r,_t}function Qt(){if(ct===null){var r=Ne.alternate;r=r!==null?r.memoizedState:null}else r=ct.next;var s=_t===null?Ne.memoizedState:_t.next;if(s!==null)_t=s,ct=r;else{if(r===null)throw Ne.alternate===null?Error(i(467)):Error(i(310));ct=r,r={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},_t===null?Ne.memoizedState=_t=r:_t=_t.next=r}return _t}function eu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ll(r){var s=al;return al+=1,Go===null&&(Go=[]),r=Mv(Go,r,s),s=Ne,(_t===null?s.memoizedState:_t.next)===null&&(s=s.alternate,P.H=s===null||s.memoizedState===null?Sb:Dh),r}function tu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ll(r);if(r.$$typeof===k)return en(r)}throw Error(i(438,String(r)))}function wh(r){var s=null,l=Ne.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var d=Ne.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(A){return A.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=eu(),Ne.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(r),d=0;d<r;d++)l[d]=O;return s.index++,l}function Xr(r,s){return typeof s=="function"?s(r):s}function nu(r){var s=Qt();return Ch(s,ct,r)}function Ch(r,s,l){var d=r.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=l;var A=r.baseQueue,v=d.pending;if(v!==null){if(A!==null){var B=A.next;A.next=v.next,v.next=B}s.baseQueue=A=v,d.pending=null}if(v=r.baseState,A===null)r.memoizedState=v;else{s=A.next;var N=B=null,q=null,Z=s,se=!1;do{var ue=Z.lane&-536870913;if(ue!==Z.lane?(Ye&ue)===ue:(Jr&ue)===ue){var te=Z.revertLane;if(te===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ue===Lo&&(se=!0);else if((Jr&te)===te){Z=Z.next,te===Lo&&(se=!0);continue}else ue={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},q===null?(N=q=ue,B=v):q=q.next=ue,Ne.lanes|=te,Fi|=te;ue=Z.action,Ms&&l(v,ue),v=Z.hasEagerState?Z.eagerState:l(v,ue)}else te={lane:ue,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},q===null?(N=q=te,B=v):q=q.next=te,Ne.lanes|=ue,Fi|=ue;Z=Z.next}while(Z!==null&&Z!==s);if(q===null?B=v:q.next=N,!Pn(v,r.memoizedState)&&(Ot=!0,se&&(l=Po,l!==null)))throw l;r.memoizedState=v,r.baseState=B,r.baseQueue=q,d.lastRenderedState=v}return A===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Eh(r){var s=Qt(),l=s.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=r;var d=l.dispatch,A=l.pending,v=s.memoizedState;if(A!==null){l.pending=null;var B=A=A.next;do v=r(v,B.action),B=B.next;while(B!==A);Pn(v,s.memoizedState)||(Ot=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),l.lastRenderedState=v}return[v,d]}function Gv(r,s,l){var d=Ne,A=Qt(),v=Ve;if(v){if(l===void 0)throw Error(i(407));l=l()}else l=s();var B=!Pn((ct||A).memoizedState,l);if(B&&(A.memoizedState=l,Ot=!0),A=A.queue,Bh($v.bind(null,d,A,r),[r]),A.getSnapshot!==s||B||_t!==null&&_t.memoizedState.tag&1){if(d.flags|=2048,Yo(9,{destroy:void 0},Kv.bind(null,d,A,l,s),null),ht===null)throw Error(i(349));v||(Jr&127)!==0||Yv(d,s,l)}return l}function Yv(r,s,l){r.flags|=16384,r={getSnapshot:s,value:l},s=Ne.updateQueue,s===null?(s=eu(),Ne.updateQueue=s,s.stores=[r]):(l=s.stores,l===null?s.stores=[r]:l.push(r))}function Kv(r,s,l,d){s.value=l,s.getSnapshot=d,Vv(s)&&Jv(r)}function $v(r,s,l){return l(function(){Vv(s)&&Jv(r)})}function Vv(r){var s=r.getSnapshot;r=r.value;try{var l=s();return!Pn(r,l)}catch{return!0}}function Jv(r){var s=Ss(r,2);s!==null&&Rn(s,r,2)}function Sh(r){var s=gn();if(typeof r=="function"){var l=r;if(r=l(),Ms){on(!0);try{l()}finally{on(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:r},s}function Xv(r,s,l,d){return r.baseState=l,Ch(r,ct,typeof d=="function"?d:Xr)}function qI(r,s,l,d,A){if(su(r))throw Error(i(485));if(r=s.action,r!==null){var v={payload:A,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){v.listeners.push(B)}};P.T!==null?l(!0):v.isTransition=!1,d(v),l=s.pending,l===null?(v.next=s.pending=v,Wv(s,v)):(v.next=l.next,s.pending=l.next=v)}}function Wv(r,s){var l=s.action,d=s.payload,A=r.state;if(s.isTransition){var v=P.T,B={};P.T=B;try{var N=l(A,d),q=P.S;q!==null&&q(B,N),Zv(r,s,N)}catch(Z){kh(r,s,Z)}finally{v!==null&&B.types!==null&&(v.types=B.types),P.T=v}}else try{v=l(A,d),Zv(r,s,v)}catch(Z){kh(r,s,Z)}}function Zv(r,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){eb(r,s,d)},function(d){return kh(r,s,d)}):eb(r,s,l)}function eb(r,s,l){s.status="fulfilled",s.value=l,tb(s),r.state=l,s=r.pending,s!==null&&(l=s.next,l===s?r.pending=null:(l=l.next,s.next=l,Wv(r,l)))}function kh(r,s,l){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=l,tb(s),s=s.next;while(s!==d)}r.action=null}function tb(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function nb(r,s){return s}function rb(r,s){if(Ve){var l=ht.formState;if(l!==null){e:{var d=Ne;if(Ve){if(gt){t:{for(var A=gt,v=sr;A.nodeType!==8;){if(!v){A=null;break t}if(A=ar(A.nextSibling),A===null){A=null;break t}}v=A.data,A=v==="F!"||v==="F"?A:null}if(A){gt=ar(A.nextSibling),d=A.data==="F!";break e}}ji(d)}d=!1}d&&(s=l[0])}}return l=gn(),l.memoizedState=l.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nb,lastRenderedState:s},l.queue=d,l=wb.bind(null,Ne,d),d.dispatch=l,d=Sh(!1),v=jh.bind(null,Ne,!1,d.queue),d=gn(),A={state:s,dispatch:null,action:r,pending:null},d.queue=A,l=qI.bind(null,Ne,A,v,l),A.dispatch=l,d.memoizedState=r,[s,l,!1]}function ib(r){var s=Qt();return sb(s,ct,r)}function sb(r,s,l){if(s=Ch(r,s,nb)[0],r=nu(Xr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=ll(s)}catch(B){throw B===Fo?Yc:B}else d=s;s=Qt();var A=s.queue,v=A.dispatch;return l!==s.memoizedState&&(Ne.flags|=2048,Yo(9,{destroy:void 0},GI.bind(null,A,l),null)),[d,v,r]}function GI(r,s){r.action=s}function ob(r){var s=Qt(),l=ct;if(l!==null)return sb(s,l,r);Qt(),s=s.memoizedState,l=Qt();var d=l.queue.dispatch;return l.memoizedState=r,[s,d,!1]}function Yo(r,s,l,d){return r={tag:r,create:l,deps:d,inst:s,next:null},s=Ne.updateQueue,s===null&&(s=eu(),Ne.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=r.next=r:(d=l.next,l.next=r,r.next=d,s.lastEffect=r),r}function ab(){return Qt().memoizedState}function ru(r,s,l,d){var A=gn();Ne.flags|=r,A.memoizedState=Yo(1|s,{destroy:void 0},l,d===void 0?null:d)}function iu(r,s,l,d){var A=Qt();d=d===void 0?null:d;var v=A.memoizedState.inst;ct!==null&&d!==null&&Ah(d,ct.memoizedState.deps)?A.memoizedState=Yo(s,v,l,d):(Ne.flags|=r,A.memoizedState=Yo(1|s,v,l,d))}function lb(r,s){ru(8390656,8,r,s)}function Bh(r,s){iu(2048,8,r,s)}function YI(r){Ne.flags|=4;var s=Ne.updateQueue;if(s===null)s=eu(),Ne.updateQueue=s,s.events=[r];else{var l=s.events;l===null?s.events=[r]:l.push(r)}}function cb(r){var s=Qt().memoizedState;return YI({ref:s,nextImpl:r}),function(){if((rt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function ub(r,s){return iu(4,2,r,s)}function db(r,s){return iu(4,4,r,s)}function fb(r,s){if(typeof s=="function"){r=r();var l=s(r);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function hb(r,s,l){l=l!=null?l.concat([r]):null,iu(4,4,fb.bind(null,s,r),l)}function Ih(){}function pb(r,s){var l=Qt();s=s===void 0?null:s;var d=l.memoizedState;return s!==null&&Ah(s,d[1])?d[0]:(l.memoizedState=[r,s],r)}function mb(r,s){var l=Qt();s=s===void 0?null:s;var d=l.memoizedState;if(s!==null&&Ah(s,d[1]))return d[0];if(d=r(),Ms){on(!0);try{r()}finally{on(!1)}}return l.memoizedState=[d,s],d}function Rh(r,s,l){return l===void 0||(Jr&1073741824)!==0&&(Ye&261930)===0?r.memoizedState=s:(r.memoizedState=l,r=gx(),Ne.lanes|=r,Fi|=r,l)}function gb(r,s,l,d){return Pn(l,s)?l:Uo.current!==null?(r=Rh(r,l,d),Pn(r,s)||(Ot=!0),r):(Jr&42)===0||(Jr&1073741824)!==0&&(Ye&261930)===0?(Ot=!0,r.memoizedState=l):(r=gx(),Ne.lanes|=r,Fi|=r,s)}function Ab(r,s,l,d,A){var v=V.p;V.p=v!==0&&8>v?v:8;var B=P.T,N={};P.T=N,jh(r,!1,s,l);try{var q=A(),Z=P.S;if(Z!==null&&Z(N,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var se=FI(q,d);cl(r,s,se,Yn(r))}else cl(r,s,d,Yn(r))}catch(ue){cl(r,s,{then:function(){},status:"rejected",reason:ue},Yn())}finally{V.p=v,B!==null&&N.types!==null&&(B.types=N.types),P.T=B}}function KI(){}function Qh(r,s,l,d){if(r.tag!==5)throw Error(i(476));var A=yb(r).queue;Ab(r,A,s,ie,l===null?KI:function(){return vb(r),l(d)})}function yb(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:ie},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:l},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function vb(r){var s=yb(r);s.next===null&&(s=r.alternate.memoizedState),cl(r,s.next.queue,{},Yn())}function Th(){return en(kl)}function bb(){return Qt().memoizedState}function xb(){return Qt().memoizedState}function $I(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var l=Yn();r=Ni(l);var d=_i(s,r,l);d!==null&&(Rn(d,s,l),il(d,s,l)),s={cache:oh()},r.payload=s;return}s=s.return}}function VI(r,s,l){var d=Yn();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},su(r)?Cb(s,l):(l=Vf(r,s,l,d),l!==null&&(Rn(l,r,d),Eb(l,s,d)))}function wb(r,s,l){var d=Yn();cl(r,s,l,d)}function cl(r,s,l,d){var A={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(su(r))Cb(s,A);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var B=s.lastRenderedState,N=v(B,l);if(A.hasEagerState=!0,A.eagerState=N,Pn(N,B))return Lc(r,s,A,0),ht===null&&zc(),!1}catch{}if(l=Vf(r,s,A,d),l!==null)return Rn(l,r,d),Eb(l,s,d),!0}return!1}function jh(r,s,l,d){if(d={lane:2,revertLane:up(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},su(r)){if(s)throw Error(i(479))}else s=Vf(r,l,d,2),s!==null&&Rn(s,r,2)}function su(r){var s=r.alternate;return r===Ne||s!==null&&s===Ne}function Cb(r,s){qo=Wc=!0;var l=r.pending;l===null?s.next=s:(s.next=l.next,l.next=s),r.pending=s}function Eb(r,s,l){if((l&4194048)!==0){var d=s.lanes;d&=r.pendingLanes,l|=d,s.lanes=l,mn(r,l)}}var ul={readContext:en,use:tu,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};ul.useEffectEvent=Et;var Sb={readContext:en,use:tu,useCallback:function(r,s){return gn().memoizedState=[r,s===void 0?null:s],r},useContext:en,useEffect:lb,useImperativeHandle:function(r,s,l){l=l!=null?l.concat([r]):null,ru(4194308,4,fb.bind(null,s,r),l)},useLayoutEffect:function(r,s){return ru(4194308,4,r,s)},useInsertionEffect:function(r,s){ru(4,2,r,s)},useMemo:function(r,s){var l=gn();s=s===void 0?null:s;var d=r();if(Ms){on(!0);try{r()}finally{on(!1)}}return l.memoizedState=[d,s],d},useReducer:function(r,s,l){var d=gn();if(l!==void 0){var A=l(s);if(Ms){on(!0);try{l(s)}finally{on(!1)}}}else A=s;return d.memoizedState=d.baseState=A,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:A},d.queue=r,r=r.dispatch=VI.bind(null,Ne,r),[d.memoizedState,r]},useRef:function(r){var s=gn();return r={current:r},s.memoizedState=r},useState:function(r){r=Sh(r);var s=r.queue,l=wb.bind(null,Ne,s);return s.dispatch=l,[r.memoizedState,l]},useDebugValue:Ih,useDeferredValue:function(r,s){var l=gn();return Rh(l,r,s)},useTransition:function(){var r=Sh(!1);return r=Ab.bind(null,Ne,r.queue,!0,!1),gn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,l){var d=Ne,A=gn();if(Ve){if(l===void 0)throw Error(i(407));l=l()}else{if(l=s(),ht===null)throw Error(i(349));(Ye&127)!==0||Yv(d,s,l)}A.memoizedState=l;var v={value:l,getSnapshot:s};return A.queue=v,lb($v.bind(null,d,v,r),[r]),d.flags|=2048,Yo(9,{destroy:void 0},Kv.bind(null,d,v,l,s),null),l},useId:function(){var r=gn(),s=ht.identifierPrefix;if(Ve){var l=kr,d=Sr;l=(d&~(1<<32-it(d)-1)).toString(32)+l,s="_"+s+"R_"+l,l=Zc++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=HI++,s="_"+s+"r_"+l.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Th,useFormState:rb,useActionState:rb,useOptimistic:function(r){var s=gn();s.memoizedState=s.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=jh.bind(null,Ne,!0,l),l.dispatch=s,[r,s]},useMemoCache:wh,useCacheRefresh:function(){return gn().memoizedState=$I.bind(null,Ne)},useEffectEvent:function(r){var s=gn(),l={impl:r};return s.memoizedState=l,function(){if((rt&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},Dh={readContext:en,use:tu,useCallback:pb,useContext:en,useEffect:Bh,useImperativeHandle:hb,useInsertionEffect:ub,useLayoutEffect:db,useMemo:mb,useReducer:nu,useRef:ab,useState:function(){return nu(Xr)},useDebugValue:Ih,useDeferredValue:function(r,s){var l=Qt();return gb(l,ct.memoizedState,r,s)},useTransition:function(){var r=nu(Xr)[0],s=Qt().memoizedState;return[typeof r=="boolean"?r:ll(r),s]},useSyncExternalStore:Gv,useId:bb,useHostTransitionStatus:Th,useFormState:ib,useActionState:ib,useOptimistic:function(r,s){var l=Qt();return Xv(l,ct,r,s)},useMemoCache:wh,useCacheRefresh:xb};Dh.useEffectEvent=cb;var kb={readContext:en,use:tu,useCallback:pb,useContext:en,useEffect:Bh,useImperativeHandle:hb,useInsertionEffect:ub,useLayoutEffect:db,useMemo:mb,useReducer:Eh,useRef:ab,useState:function(){return Eh(Xr)},useDebugValue:Ih,useDeferredValue:function(r,s){var l=Qt();return ct===null?Rh(l,r,s):gb(l,ct.memoizedState,r,s)},useTransition:function(){var r=Eh(Xr)[0],s=Qt().memoizedState;return[typeof r=="boolean"?r:ll(r),s]},useSyncExternalStore:Gv,useId:bb,useHostTransitionStatus:Th,useFormState:ob,useActionState:ob,useOptimistic:function(r,s){var l=Qt();return ct!==null?Xv(l,ct,r,s):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:wh,useCacheRefresh:xb};kb.useEffectEvent=cb;function Mh(r,s,l,d){s=r.memoizedState,l=l(d,s),l=l==null?s:m({},s,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var Nh={enqueueSetState:function(r,s,l){r=r._reactInternals;var d=Yn(),A=Ni(d);A.payload=s,l!=null&&(A.callback=l),s=_i(r,A,d),s!==null&&(Rn(s,r,d),il(s,r,d))},enqueueReplaceState:function(r,s,l){r=r._reactInternals;var d=Yn(),A=Ni(d);A.tag=1,A.payload=s,l!=null&&(A.callback=l),s=_i(r,A,d),s!==null&&(Rn(s,r,d),il(s,r,d))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var l=Yn(),d=Ni(l);d.tag=2,s!=null&&(d.callback=s),s=_i(r,d,l),s!==null&&(Rn(s,r,l),il(s,r,l))}};function Bb(r,s,l,d,A,v,B){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,B):s.prototype&&s.prototype.isPureReactComponent?!Ja(l,d)||!Ja(A,v):!0}function Ib(r,s,l,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,d),s.state!==r&&Nh.enqueueReplaceState(s,s.state,null)}function Ns(r,s){var l=s;if("ref"in s){l={};for(var d in s)d!=="ref"&&(l[d]=s[d])}if(r=r.defaultProps){l===s&&(l=m({},l));for(var A in r)l[A]===void 0&&(l[A]=r[A])}return l}function Rb(r){Oc(r)}function Qb(r){console.error(r)}function Tb(r){Oc(r)}function ou(r,s){try{var l=r.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function jb(r,s,l){try{var d=r.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function _h(r,s,l){return l=Ni(l),l.tag=3,l.payload={element:null},l.callback=function(){ou(r,s)},l}function Db(r){return r=Ni(r),r.tag=3,r}function Mb(r,s,l,d){var A=l.type.getDerivedStateFromError;if(typeof A=="function"){var v=d.value;r.payload=function(){return A(v)},r.callback=function(){jb(s,l,d)}}var B=l.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(r.callback=function(){jb(s,l,d),typeof A!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var N=d.stack;this.componentDidCatch(d.value,{componentStack:N!==null?N:""})})}function JI(r,s,l,d,A){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=l.alternate,s!==null&&zo(s,l,A,!0),l=Hn.current,l!==null){switch(l.tag){case 31:case 13:return or===null?yu():l.alternate===null&&St===0&&(St=3),l.flags&=-257,l.flags|=65536,l.lanes=A,d===Kc?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([d]):s.add(d),ap(r,d,A)),!1;case 22:return l.flags|=65536,d===Kc?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([d]):l.add(d)),ap(r,d,A)),!1}throw Error(i(435,l.tag))}return ap(r,d,A),yu(),!1}if(Ve)return s=Hn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=A,d!==th&&(r=Error(i(422),{cause:d}),Za(nr(r,l)))):(d!==th&&(s=Error(i(423),{cause:d}),Za(nr(s,l))),r=r.current.alternate,r.flags|=65536,A&=-A,r.lanes|=A,d=nr(d,l),A=_h(r.stateNode,d,A),fh(r,A),St!==4&&(St=2)),!1;var v=Error(i(520),{cause:d});if(v=nr(v,l),yl===null?yl=[v]:yl.push(v),St!==4&&(St=2),s===null)return!0;d=nr(d,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,r=A&-A,l.lanes|=r,r=_h(l.stateNode,d,r),fh(l,r),!1;case 1:if(s=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Hi===null||!Hi.has(v))))return l.flags|=65536,A&=-A,l.lanes|=A,A=Db(A),Mb(A,r,l,d),fh(l,A),!1}l=l.return}while(l!==null);return!1}var Oh=Error(i(461)),Ot=!1;function tn(r,s,l,d){s.child=r===null?zv(s,null,l,d):Ds(s,r.child,l,d)}function Nb(r,s,l,d,A){l=l.render;var v=s.ref;if("ref"in d){var B={};for(var N in d)N!=="ref"&&(B[N]=d[N])}else B=d;return Rs(s),d=yh(r,s,l,B,v,A),N=vh(),r!==null&&!Ot?(bh(r,s,A),Wr(r,s,A)):(Ve&&N&&Zf(s),s.flags|=1,tn(r,s,d,A),s.child)}function _b(r,s,l,d,A){if(r===null){var v=l.type;return typeof v=="function"&&!Jf(v)&&v.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=v,Ob(r,s,v,d,A)):(r=Fc(l.type,null,d,s,s.mode,A),r.ref=s.ref,r.return=s,s.child=r)}if(v=r.child,!Gh(r,A)){var B=v.memoizedProps;if(l=l.compare,l=l!==null?l:Ja,l(B,d)&&r.ref===s.ref)return Wr(r,s,A)}return s.flags|=1,r=Yr(v,d),r.ref=s.ref,r.return=s,s.child=r}function Ob(r,s,l,d,A){if(r!==null){var v=r.memoizedProps;if(Ja(v,d)&&r.ref===s.ref)if(Ot=!1,s.pendingProps=d=v,Gh(r,A))(r.flags&131072)!==0&&(Ot=!0);else return s.lanes=r.lanes,Wr(r,s,A)}return zh(r,s,l,d,A)}function zb(r,s,l,d){var A=d.children,v=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(v=v!==null?v.baseLanes|l:l,r!==null){for(d=s.child=r.child,A=0;d!==null;)A=A|d.lanes|d.childLanes,d=d.sibling;d=A&~v}else d=0,s.child=null;return Lb(r,s,v,l,d)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&Gc(s,v!==null?v.cachePool:null),v!==null?Fv(s,v):ph(),Hv(s);else return d=s.lanes=536870912,Lb(r,s,v!==null?v.baseLanes|l:l,l,d)}else v!==null?(Gc(s,v.cachePool),Fv(s,v),zi(),s.memoizedState=null):(r!==null&&Gc(s,null),ph(),zi());return tn(r,s,A,l),s.child}function dl(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Lb(r,s,l,d,A){var v=lh();return v=v===null?null:{parent:Nt._currentValue,pool:v},s.memoizedState={baseLanes:l,cachePool:v},r!==null&&Gc(s,null),ph(),Hv(s),r!==null&&zo(r,s,d,!0),s.childLanes=A,null}function au(r,s){return s=cu({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function Pb(r,s,l){return Ds(s,r.child,null,l),r=au(s,s.pendingProps),r.flags|=2,Un(s),s.memoizedState=null,r}function XI(r,s,l){var d=s.pendingProps,A=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(Ve){if(d.mode==="hidden")return r=au(s,d),s.lanes=536870912,dl(null,r);if(gh(s),(r=gt)?(r=Wx(r,sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Qi!==null?{id:Sr,overflow:kr}:null,retryLane:536870912,hydrationErrors:null},l=Cv(r),l.return=s,s.child=l,Zt=s,gt=null)):r=null,r===null)throw ji(s);return s.lanes=536870912,null}return au(s,d)}var v=r.memoizedState;if(v!==null){var B=v.dehydrated;if(gh(s),A)if(s.flags&256)s.flags&=-257,s=Pb(r,s,l);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(Ot||zo(r,s,l,!1),A=(l&r.childLanes)!==0,Ot||A){if(d=ht,d!==null&&(B=Ln(d,l),B!==0&&B!==v.retryLane))throw v.retryLane=B,Ss(r,B),Rn(d,r,B),Oh;yu(),s=Pb(r,s,l)}else r=v.treeContext,gt=ar(B.nextSibling),Zt=s,Ve=!0,Ti=null,sr=!1,r!==null&&kv(s,r),s=au(s,d),s.flags|=4096;return s}return r=Yr(r.child,{mode:d.mode,children:d.children}),r.ref=s.ref,s.child=r,r.return=s,r}function lu(r,s){var l=s.ref;if(l===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(r===null||r.ref!==l)&&(s.flags|=4194816)}}function zh(r,s,l,d,A){return Rs(s),l=yh(r,s,l,d,void 0,A),d=vh(),r!==null&&!Ot?(bh(r,s,A),Wr(r,s,A)):(Ve&&d&&Zf(s),s.flags|=1,tn(r,s,l,A),s.child)}function Fb(r,s,l,d,A,v){return Rs(s),s.updateQueue=null,l=qv(s,d,l,A),Uv(r),d=vh(),r!==null&&!Ot?(bh(r,s,v),Wr(r,s,v)):(Ve&&d&&Zf(s),s.flags|=1,tn(r,s,l,v),s.child)}function Hb(r,s,l,d,A){if(Rs(s),s.stateNode===null){var v=Mo,B=l.contextType;typeof B=="object"&&B!==null&&(v=en(B)),v=new l(d,v),s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Nh,s.stateNode=v,v._reactInternals=s,v=s.stateNode,v.props=d,v.state=s.memoizedState,v.refs={},uh(s),B=l.contextType,v.context=typeof B=="object"&&B!==null?en(B):Mo,v.state=s.memoizedState,B=l.getDerivedStateFromProps,typeof B=="function"&&(Mh(s,l,B,d),v.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(B=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),B!==v.state&&Nh.enqueueReplaceState(v,v.state,null),ol(s,d,v,A),sl(),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(r===null){v=s.stateNode;var N=s.memoizedProps,q=Ns(l,N);v.props=q;var Z=v.context,se=l.contextType;B=Mo,typeof se=="object"&&se!==null&&(B=en(se));var ue=l.getDerivedStateFromProps;se=typeof ue=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=s.pendingProps!==N,se||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||Z!==B)&&Ib(s,v,d,B),Mi=!1;var te=s.memoizedState;v.state=te,ol(s,d,v,A),sl(),Z=s.memoizedState,N||te!==Z||Mi?(typeof ue=="function"&&(Mh(s,l,ue,d),Z=s.memoizedState),(q=Mi||Bb(s,l,q,d,te,Z,B))?(se||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(s.flags|=4194308)):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=Z),v.props=d,v.state=Z,v.context=B,d=q):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{v=s.stateNode,dh(r,s),B=s.memoizedProps,se=Ns(l,B),v.props=se,ue=s.pendingProps,te=v.context,Z=l.contextType,q=Mo,typeof Z=="object"&&Z!==null&&(q=en(Z)),N=l.getDerivedStateFromProps,(Z=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==ue||te!==q)&&Ib(s,v,d,q),Mi=!1,te=s.memoizedState,v.state=te,ol(s,d,v,A),sl();var re=s.memoizedState;B!==ue||te!==re||Mi||r!==null&&r.dependencies!==null&&Uc(r.dependencies)?(typeof N=="function"&&(Mh(s,l,N,d),re=s.memoizedState),(se=Mi||Bb(s,l,se,d,te,re,q)||r!==null&&r.dependencies!==null&&Uc(r.dependencies))?(Z||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,re,q),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,re,q)),typeof v.componentDidUpdate=="function"&&(s.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof v.componentDidUpdate!="function"||B===r.memoizedProps&&te===r.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&te===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=re),v.props=d,v.state=re,v.context=q,d=se):(typeof v.componentDidUpdate!="function"||B===r.memoizedProps&&te===r.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&te===r.memoizedState||(s.flags|=1024),d=!1)}return v=d,lu(r,s),d=(s.flags&128)!==0,v||d?(v=s.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:v.render(),s.flags|=1,r!==null&&d?(s.child=Ds(s,r.child,null,A),s.child=Ds(s,null,l,A)):tn(r,s,l,A),s.memoizedState=v.state,r=s.child):r=Wr(r,s,A),r}function Ub(r,s,l,d){return Bs(),s.flags|=256,tn(r,s,l,d),s.child}var Lh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ph(r){return{baseLanes:r,cachePool:jv()}}function Fh(r,s,l){return r=r!==null?r.childLanes&~l:0,s&&(r|=Gn),r}function qb(r,s,l){var d=s.pendingProps,A=!1,v=(s.flags&128)!==0,B;if((B=v)||(B=r!==null&&r.memoizedState===null?!1:(Rt.current&2)!==0),B&&(A=!0,s.flags&=-129),B=(s.flags&32)!==0,s.flags&=-33,r===null){if(Ve){if(A?Oi(s):zi(),(r=gt)?(r=Wx(r,sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Qi!==null?{id:Sr,overflow:kr}:null,retryLane:536870912,hydrationErrors:null},l=Cv(r),l.return=s,s.child=l,Zt=s,gt=null)):r=null,r===null)throw ji(s);return Cp(r)?s.lanes=32:s.lanes=536870912,null}var N=d.children;return d=d.fallback,A?(zi(),A=s.mode,N=cu({mode:"hidden",children:N},A),d=ks(d,A,l,null),N.return=s,d.return=s,N.sibling=d,s.child=N,d=s.child,d.memoizedState=Ph(l),d.childLanes=Fh(r,B,l),s.memoizedState=Lh,dl(null,d)):(Oi(s),Hh(s,N))}var q=r.memoizedState;if(q!==null&&(N=q.dehydrated,N!==null)){if(v)s.flags&256?(Oi(s),s.flags&=-257,s=Uh(r,s,l)):s.memoizedState!==null?(zi(),s.child=r.child,s.flags|=128,s=null):(zi(),N=d.fallback,A=s.mode,d=cu({mode:"visible",children:d.children},A),N=ks(N,A,l,null),N.flags|=2,d.return=s,N.return=s,d.sibling=N,s.child=d,Ds(s,r.child,null,l),d=s.child,d.memoizedState=Ph(l),d.childLanes=Fh(r,B,l),s.memoizedState=Lh,s=dl(null,d));else if(Oi(s),Cp(N)){if(B=N.nextSibling&&N.nextSibling.dataset,B)var Z=B.dgst;B=Z,d=Error(i(419)),d.stack="",d.digest=B,Za({value:d,source:null,stack:null}),s=Uh(r,s,l)}else if(Ot||zo(r,s,l,!1),B=(l&r.childLanes)!==0,Ot||B){if(B=ht,B!==null&&(d=Ln(B,l),d!==0&&d!==q.retryLane))throw q.retryLane=d,Ss(r,d),Rn(B,r,d),Oh;wp(N)||yu(),s=Uh(r,s,l)}else wp(N)?(s.flags|=192,s.child=r.child,s=null):(r=q.treeContext,gt=ar(N.nextSibling),Zt=s,Ve=!0,Ti=null,sr=!1,r!==null&&kv(s,r),s=Hh(s,d.children),s.flags|=4096);return s}return A?(zi(),N=d.fallback,A=s.mode,q=r.child,Z=q.sibling,d=Yr(q,{mode:"hidden",children:d.children}),d.subtreeFlags=q.subtreeFlags&65011712,Z!==null?N=Yr(Z,N):(N=ks(N,A,l,null),N.flags|=2),N.return=s,d.return=s,d.sibling=N,s.child=d,dl(null,d),d=s.child,N=r.child.memoizedState,N===null?N=Ph(l):(A=N.cachePool,A!==null?(q=Nt._currentValue,A=A.parent!==q?{parent:q,pool:q}:A):A=jv(),N={baseLanes:N.baseLanes|l,cachePool:A}),d.memoizedState=N,d.childLanes=Fh(r,B,l),s.memoizedState=Lh,dl(r.child,d)):(Oi(s),l=r.child,r=l.sibling,l=Yr(l,{mode:"visible",children:d.children}),l.return=s,l.sibling=null,r!==null&&(B=s.deletions,B===null?(s.deletions=[r],s.flags|=16):B.push(r)),s.child=l,s.memoizedState=null,l)}function Hh(r,s){return s=cu({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function cu(r,s){return r=Fn(22,r,null,s),r.lanes=0,r}function Uh(r,s,l){return Ds(s,r.child,null,l),r=Hh(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Gb(r,s,l){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),ih(r.return,s,l)}function qh(r,s,l,d,A,v){var B=r.memoizedState;B===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:A,treeForkCount:v}:(B.isBackwards=s,B.rendering=null,B.renderingStartTime=0,B.last=d,B.tail=l,B.tailMode=A,B.treeForkCount=v)}function Yb(r,s,l){var d=s.pendingProps,A=d.revealOrder,v=d.tail;d=d.children;var B=Rt.current,N=(B&2)!==0;if(N?(B=B&1|2,s.flags|=128):B&=1,M(Rt,B),tn(r,s,d,l),d=Ve?Wa:0,!N&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Gb(r,l,s);else if(r.tag===19)Gb(r,l,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(A){case"forwards":for(l=s.child,A=null;l!==null;)r=l.alternate,r!==null&&Xc(r)===null&&(A=l),l=l.sibling;l=A,l===null?(A=s.child,s.child=null):(A=l.sibling,l.sibling=null),qh(s,!1,A,l,v,d);break;case"backwards":case"unstable_legacy-backwards":for(l=null,A=s.child,s.child=null;A!==null;){if(r=A.alternate,r!==null&&Xc(r)===null){s.child=A;break}r=A.sibling,A.sibling=l,l=A,A=r}qh(s,!0,l,null,v,d);break;case"together":qh(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function Wr(r,s,l){if(r!==null&&(s.dependencies=r.dependencies),Fi|=s.lanes,(l&s.childLanes)===0)if(r!==null){if(zo(r,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,l=Yr(r,r.pendingProps),s.child=l,l.return=s;r.sibling!==null;)r=r.sibling,l=l.sibling=Yr(r,r.pendingProps),l.return=s;l.sibling=null}return s.child}function Gh(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&Uc(r)))}function WI(r,s,l){switch(s.tag){case 3:ae(s,s.stateNode.containerInfo),Di(s,Nt,r.memoizedState.cache),Bs();break;case 27:case 5:Me(s);break;case 4:ae(s,s.stateNode.containerInfo);break;case 10:Di(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,gh(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(Oi(s),s.flags|=128,null):(l&s.child.childLanes)!==0?qb(r,s,l):(Oi(s),r=Wr(r,s,l),r!==null?r.sibling:null);Oi(s);break;case 19:var A=(r.flags&128)!==0;if(d=(l&s.childLanes)!==0,d||(zo(r,s,l,!1),d=(l&s.childLanes)!==0),A){if(d)return Yb(r,s,l);s.flags|=128}if(A=s.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),M(Rt,Rt.current),d)break;return null;case 22:return s.lanes=0,zb(r,s,l,s.pendingProps);case 24:Di(s,Nt,r.memoizedState.cache)}return Wr(r,s,l)}function Kb(r,s,l){if(r!==null)if(r.memoizedProps!==s.pendingProps)Ot=!0;else{if(!Gh(r,l)&&(s.flags&128)===0)return Ot=!1,WI(r,s,l);Ot=(r.flags&131072)!==0}else Ot=!1,Ve&&(s.flags&1048576)!==0&&Sv(s,Wa,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(r=Ts(s.elementType),s.type=r,typeof r=="function")Jf(r)?(d=Ns(r,d),s.tag=1,s=Hb(null,s,r,d,l)):(s.tag=0,s=zh(null,s,r,d,l));else{if(r!=null){var A=r.$$typeof;if(A===I){s.tag=11,s=Nb(null,s,r,d,l);break e}else if(A===j){s.tag=14,s=_b(null,s,r,d,l);break e}}throw s=Y(r)||r,Error(i(306,s,""))}}return s;case 0:return zh(r,s,s.type,s.pendingProps,l);case 1:return d=s.type,A=Ns(d,s.pendingProps),Hb(r,s,d,A,l);case 3:e:{if(ae(s,s.stateNode.containerInfo),r===null)throw Error(i(387));d=s.pendingProps;var v=s.memoizedState;A=v.element,dh(r,s),ol(s,d,null,l);var B=s.memoizedState;if(d=B.cache,Di(s,Nt,d),d!==v.cache&&sh(s,[Nt],l,!0),sl(),d=B.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:B.cache},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){s=Ub(r,s,d,l);break e}else if(d!==A){A=nr(Error(i(424)),s),Za(A),s=Ub(r,s,d,l);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,gt=ar(r.firstChild),Zt=s,Ve=!0,Ti=null,sr=!0,l=zv(s,null,d,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Bs(),d===A){s=Wr(r,s,l);break e}tn(r,s,d,l)}s=s.child}return s;case 26:return lu(r,s),r===null?(l=i0(s.type,null,s.pendingProps,null))?s.memoizedState=l:Ve||(l=s.type,r=s.pendingProps,d=Su(ne.current).createElement(l),d[Wt]=s,d[Cn]=r,nn(d,l,r),Yt(d),s.stateNode=d):s.memoizedState=i0(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return Me(s),r===null&&Ve&&(d=s.stateNode=t0(s.type,s.pendingProps,ne.current),Zt=s,sr=!0,A=gt,Yi(s.type)?(Ep=A,gt=ar(d.firstChild)):gt=A),tn(r,s,s.pendingProps.children,l),lu(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&Ve&&((A=d=gt)&&(d=IR(d,s.type,s.pendingProps,sr),d!==null?(s.stateNode=d,Zt=s,gt=ar(d.firstChild),sr=!1,A=!0):A=!1),A||ji(s)),Me(s),A=s.type,v=s.pendingProps,B=r!==null?r.memoizedProps:null,d=v.children,vp(A,v)?d=null:B!==null&&vp(A,B)&&(s.flags|=32),s.memoizedState!==null&&(A=yh(r,s,UI,null,null,l),kl._currentValue=A),lu(r,s),tn(r,s,d,l),s.child;case 6:return r===null&&Ve&&((r=l=gt)&&(l=RR(l,s.pendingProps,sr),l!==null?(s.stateNode=l,Zt=s,gt=null,r=!0):r=!1),r||ji(s)),null;case 13:return qb(r,s,l);case 4:return ae(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=Ds(s,null,d,l):tn(r,s,d,l),s.child;case 11:return Nb(r,s,s.type,s.pendingProps,l);case 7:return tn(r,s,s.pendingProps,l),s.child;case 8:return tn(r,s,s.pendingProps.children,l),s.child;case 12:return tn(r,s,s.pendingProps.children,l),s.child;case 10:return d=s.pendingProps,Di(s,s.type,d.value),tn(r,s,d.children,l),s.child;case 9:return A=s.type._context,d=s.pendingProps.children,Rs(s),A=en(A),d=d(A),s.flags|=1,tn(r,s,d,l),s.child;case 14:return _b(r,s,s.type,s.pendingProps,l);case 15:return Ob(r,s,s.type,s.pendingProps,l);case 19:return Yb(r,s,l);case 31:return XI(r,s,l);case 22:return zb(r,s,l,s.pendingProps);case 24:return Rs(s),d=en(Nt),r===null?(A=lh(),A===null&&(A=ht,v=oh(),A.pooledCache=v,v.refCount++,v!==null&&(A.pooledCacheLanes|=l),A=v),s.memoizedState={parent:d,cache:A},uh(s),Di(s,Nt,A)):((r.lanes&l)!==0&&(dh(r,s),ol(s,null,null,l),sl()),A=r.memoizedState,v=s.memoizedState,A.parent!==d?(A={parent:d,cache:d},s.memoizedState=A,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=A),Di(s,Nt,d)):(d=v.cache,Di(s,Nt,d),d!==A.cache&&sh(s,[Nt],l,!0))),tn(r,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function Zr(r){r.flags|=4}function Yh(r,s,l,d,A){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(A&335544128)===A)if(r.stateNode.complete)r.flags|=8192;else if(bx())r.flags|=8192;else throw js=Kc,ch}else r.flags&=-16777217}function $b(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!c0(s))if(bx())r.flags|=8192;else throw js=Kc,ch}function uu(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?It():536870912,r.lanes|=s,Jo|=s)}function fl(r,s){if(!Ve)switch(r.tailMode){case"hidden":s=r.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function At(r){var s=r.alternate!==null&&r.alternate.child===r.child,l=0,d=0;if(s)for(var A=r.child;A!==null;)l|=A.lanes|A.childLanes,d|=A.subtreeFlags&65011712,d|=A.flags&65011712,A.return=r,A=A.sibling;else for(A=r.child;A!==null;)l|=A.lanes|A.childLanes,d|=A.subtreeFlags,d|=A.flags,A.return=r,A=A.sibling;return r.subtreeFlags|=d,r.childLanes=l,s}function ZI(r,s,l){var d=s.pendingProps;switch(eh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return l=s.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Vr(Nt),ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Oo(s)?Zr(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,nh())),At(s),null;case 26:var A=s.type,v=s.memoizedState;return r===null?(Zr(s),v!==null?(At(s),$b(s,v)):(At(s),Yh(s,A,null,d,l))):v?v!==r.memoizedState?(Zr(s),At(s),$b(s,v)):(At(s),s.flags&=-16777217):(r=r.memoizedProps,r!==d&&Zr(s),At(s),Yh(s,A,r,d,l)),null;case 27:if(Te(s),l=ne.current,A=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(i(166));return At(s),null}r=X.current,Oo(s)?Bv(s):(r=t0(A,d,l),s.stateNode=r,Zr(s))}return At(s),null;case 5:if(Te(s),A=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(i(166));return At(s),null}if(v=X.current,Oo(s))Bv(s);else{var B=Su(ne.current);switch(v){case 1:v=B.createElementNS("http://www.w3.org/2000/svg",A);break;case 2:v=B.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;default:switch(A){case"svg":v=B.createElementNS("http://www.w3.org/2000/svg",A);break;case"math":v=B.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;case"script":v=B.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?B.createElement("select",{is:d.is}):B.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?B.createElement(A,{is:d.is}):B.createElement(A)}}v[Wt]=s,v[Cn]=d;e:for(B=s.child;B!==null;){if(B.tag===5||B.tag===6)v.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===s)break e;for(;B.sibling===null;){if(B.return===null||B.return===s)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}s.stateNode=v;e:switch(nn(v,A,d),A){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Zr(s)}}return At(s),Yh(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,l),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==d&&Zr(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(i(166));if(r=ne.current,Oo(s)){if(r=s.stateNode,l=s.memoizedProps,d=null,A=Zt,A!==null)switch(A.tag){case 27:case 5:d=A.memoizedProps}r[Wt]=s,r=!!(r.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||qx(r.nodeValue,l)),r||ji(s,!0)}else r=Su(r).createTextNode(d),r[Wt]=s,s.stateNode=r}return At(s),null;case 31:if(l=s.memoizedState,r===null||r.memoizedState!==null){if(d=Oo(s),l!==null){if(r===null){if(!d)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Wt]=s}else Bs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),r=!1}else l=nh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return s.flags&256?(Un(s),s):(Un(s),null);if((s.flags&128)!==0)throw Error(i(558))}return At(s),null;case 13:if(d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(A=Oo(s),d!==null&&d.dehydrated!==null){if(r===null){if(!A)throw Error(i(318));if(A=s.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(i(317));A[Wt]=s}else Bs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),A=!1}else A=nh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=A),A=!0;if(!A)return s.flags&256?(Un(s),s):(Un(s),null)}return Un(s),(s.flags&128)!==0?(s.lanes=l,s):(l=d!==null,r=r!==null&&r.memoizedState!==null,l&&(d=s.child,A=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(A=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==A&&(d.flags|=2048)),l!==r&&l&&(s.child.flags|=8192),uu(s,s.updateQueue),At(s),null);case 4:return ce(),r===null&&pp(s.stateNode.containerInfo),At(s),null;case 10:return Vr(s.type),At(s),null;case 19:if(L(Rt),d=s.memoizedState,d===null)return At(s),null;if(A=(s.flags&128)!==0,v=d.rendering,v===null)if(A)fl(d,!1);else{if(St!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(v=Xc(r),v!==null){for(s.flags|=128,fl(d,!1),r=v.updateQueue,s.updateQueue=r,uu(s,r),s.subtreeFlags=0,r=l,l=s.child;l!==null;)wv(l,r),l=l.sibling;return M(Rt,Rt.current&1|2),Ve&&Kr(s,d.treeForkCount),s.child}r=r.sibling}d.tail!==null&&xt()>mu&&(s.flags|=128,A=!0,fl(d,!1),s.lanes=4194304)}else{if(!A)if(r=Xc(v),r!==null){if(s.flags|=128,A=!0,r=r.updateQueue,s.updateQueue=r,uu(s,r),fl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!Ve)return At(s),null}else 2*xt()-d.renderingStartTime>mu&&l!==536870912&&(s.flags|=128,A=!0,fl(d,!1),s.lanes=4194304);d.isBackwards?(v.sibling=s.child,s.child=v):(r=d.last,r!==null?r.sibling=v:s.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=xt(),r.sibling=null,l=Rt.current,M(Rt,A?l&1|2:l&1),Ve&&Kr(s,d.treeForkCount),r):(At(s),null);case 22:case 23:return Un(s),mh(),d=s.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(l&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),l=s.updateQueue,l!==null&&uu(s,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==l&&(s.flags|=2048),r!==null&&L(Qs),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Vr(Nt),At(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function eR(r,s){switch(eh(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Vr(Nt),ce(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return Te(s),null;case 31:if(s.memoizedState!==null){if(Un(s),s.alternate===null)throw Error(i(340));Bs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(Un(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));Bs()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return L(Rt),null;case 4:return ce(),null;case 10:return Vr(s.type),null;case 22:case 23:return Un(s),mh(),r!==null&&L(Qs),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return Vr(Nt),null;case 25:return null;default:return null}}function Vb(r,s){switch(eh(s),s.tag){case 3:Vr(Nt),ce();break;case 26:case 27:case 5:Te(s);break;case 4:ce();break;case 31:s.memoizedState!==null&&Un(s);break;case 13:Un(s);break;case 19:L(Rt);break;case 10:Vr(s.type);break;case 22:case 23:Un(s),mh(),r!==null&&L(Qs);break;case 24:Vr(Nt)}}function hl(r,s){try{var l=s.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var A=d.next;l=A;do{if((l.tag&r)===r){d=void 0;var v=l.create,B=l.inst;d=v(),B.destroy=d}l=l.next}while(l!==A)}}catch(N){ot(s,s.return,N)}}function Li(r,s,l){try{var d=s.updateQueue,A=d!==null?d.lastEffect:null;if(A!==null){var v=A.next;d=v;do{if((d.tag&r)===r){var B=d.inst,N=B.destroy;if(N!==void 0){B.destroy=void 0,A=s;var q=l,Z=N;try{Z()}catch(se){ot(A,q,se)}}}d=d.next}while(d!==v)}}catch(se){ot(s,s.return,se)}}function Jb(r){var s=r.updateQueue;if(s!==null){var l=r.stateNode;try{Pv(s,l)}catch(d){ot(r,r.return,d)}}}function Xb(r,s,l){l.props=Ns(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(d){ot(r,s,d)}}function pl(r,s){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof l=="function"?r.refCleanup=l(d):l.current=d}}catch(A){ot(r,s,A)}}function Br(r,s){var l=r.ref,d=r.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(A){ot(r,s,A)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(A){ot(r,s,A)}else l.current=null}function Wb(r){var s=r.type,l=r.memoizedProps,d=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(A){ot(r,r.return,A)}}function Kh(r,s,l){try{var d=r.stateNode;wR(d,r.type,l,s),d[Cn]=s}catch(A){ot(r,r.return,A)}}function Zb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Yi(r.type)||r.tag===4}function $h(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Zb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Yi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Vh(r,s,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(r),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=qr));else if(d!==4&&(d===27&&Yi(r.type)&&(l=r.stateNode,s=null),r=r.child,r!==null))for(Vh(r,s,l),r=r.sibling;r!==null;)Vh(r,s,l),r=r.sibling}function du(r,s,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?l.insertBefore(r,s):l.appendChild(r);else if(d!==4&&(d===27&&Yi(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(du(r,s,l),r=r.sibling;r!==null;)du(r,s,l),r=r.sibling}function ex(r){var s=r.stateNode,l=r.memoizedProps;try{for(var d=r.type,A=s.attributes;A.length;)s.removeAttributeNode(A[0]);nn(s,d,l),s[Wt]=r,s[Cn]=l}catch(v){ot(r,r.return,v)}}var ei=!1,zt=!1,Jh=!1,tx=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function tR(r,s){if(r=r.containerInfo,Ap=ju,r=hv(r),Uf(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var A=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var B=0,N=-1,q=-1,Z=0,se=0,ue=r,te=null;t:for(;;){for(var re;ue!==l||A!==0&&ue.nodeType!==3||(N=B+A),ue!==v||d!==0&&ue.nodeType!==3||(q=B+d),ue.nodeType===3&&(B+=ue.nodeValue.length),(re=ue.firstChild)!==null;)te=ue,ue=re;for(;;){if(ue===r)break t;if(te===l&&++Z===A&&(N=B),te===v&&++se===d&&(q=B),(re=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=re}l=N===-1||q===-1?null:{start:N,end:q}}else l=null}l=l||{start:0,end:0}}else l=null;for(yp={focusedElem:r,selectionRange:l},ju=!1,Kt=s;Kt!==null;)if(s=Kt,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Kt=r;else for(;Kt!==null;){switch(s=Kt,v=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)A=r[l],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,l=s,A=v.memoizedProps,v=v.memoizedState,d=l.stateNode;try{var xe=Ns(l.type,A);r=d.getSnapshotBeforeUpdate(xe,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(Be){ot(l,l.return,Be)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,l=r.nodeType,l===9)xp(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":xp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,Kt=r;break}Kt=s.return}}function nx(r,s,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:ni(r,l),d&4&&hl(5,l);break;case 1:if(ni(r,l),d&4)if(r=l.stateNode,s===null)try{r.componentDidMount()}catch(B){ot(l,l.return,B)}else{var A=Ns(l.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(A,s,r.__reactInternalSnapshotBeforeUpdate)}catch(B){ot(l,l.return,B)}}d&64&&Jb(l),d&512&&pl(l,l.return);break;case 3:if(ni(r,l),d&64&&(r=l.updateQueue,r!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{Pv(r,s)}catch(B){ot(l,l.return,B)}}break;case 27:s===null&&d&4&&ex(l);case 26:case 5:ni(r,l),s===null&&d&4&&Wb(l),d&512&&pl(l,l.return);break;case 12:ni(r,l);break;case 31:ni(r,l),d&4&&sx(r,l);break;case 13:ni(r,l),d&4&&ox(r,l),d&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=uR.bind(null,l),QR(r,l))));break;case 22:if(d=l.memoizedState!==null||ei,!d){s=s!==null&&s.memoizedState!==null||zt,A=ei;var v=zt;ei=d,(zt=s)&&!v?ri(r,l,(l.subtreeFlags&8772)!==0):ni(r,l),ei=A,zt=v}break;case 30:break;default:ni(r,l)}}function rx(r){var s=r.alternate;s!==null&&(r.alternate=null,rx(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&kf(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var yt=null,Sn=!1;function ti(r,s,l){for(l=l.child;l!==null;)ix(r,s,l),l=l.sibling}function ix(r,s,l){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(wt,l)}catch{}switch(l.tag){case 26:zt||Br(l,s),ti(r,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:zt||Br(l,s);var d=yt,A=Sn;Yi(l.type)&&(yt=l.stateNode,Sn=!1),ti(r,s,l),Cl(l.stateNode),yt=d,Sn=A;break;case 5:zt||Br(l,s);case 6:if(d=yt,A=Sn,yt=null,ti(r,s,l),yt=d,Sn=A,yt!==null)if(Sn)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(l.stateNode)}catch(v){ot(l,s,v)}else try{yt.removeChild(l.stateNode)}catch(v){ot(l,s,v)}break;case 18:yt!==null&&(Sn?(r=yt,Jx(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),ia(r)):Jx(yt,l.stateNode));break;case 4:d=yt,A=Sn,yt=l.stateNode.containerInfo,Sn=!0,ti(r,s,l),yt=d,Sn=A;break;case 0:case 11:case 14:case 15:Li(2,l,s),zt||Li(4,l,s),ti(r,s,l);break;case 1:zt||(Br(l,s),d=l.stateNode,typeof d.componentWillUnmount=="function"&&Xb(l,s,d)),ti(r,s,l);break;case 21:ti(r,s,l);break;case 22:zt=(d=zt)||l.memoizedState!==null,ti(r,s,l),zt=d;break;default:ti(r,s,l)}}function sx(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ia(r)}catch(l){ot(s,s.return,l)}}}function ox(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ia(r)}catch(l){ot(s,s.return,l)}}function nR(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new tx),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new tx),s;default:throw Error(i(435,r.tag))}}function fu(r,s){var l=nR(r);s.forEach(function(d){if(!l.has(d)){l.add(d);var A=dR.bind(null,r,d);d.then(A,A)}})}function kn(r,s){var l=s.deletions;if(l!==null)for(var d=0;d<l.length;d++){var A=l[d],v=r,B=s,N=B;e:for(;N!==null;){switch(N.tag){case 27:if(Yi(N.type)){yt=N.stateNode,Sn=!1;break e}break;case 5:yt=N.stateNode,Sn=!1;break e;case 3:case 4:yt=N.stateNode.containerInfo,Sn=!0;break e}N=N.return}if(yt===null)throw Error(i(160));ix(v,B,A),yt=null,Sn=!1,v=A.alternate,v!==null&&(v.return=null),A.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)ax(s,r),s=s.sibling}var vr=null;function ax(r,s){var l=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:kn(s,r),Bn(r),d&4&&(Li(3,r,r.return),hl(3,r),Li(5,r,r.return));break;case 1:kn(s,r),Bn(r),d&512&&(zt||l===null||Br(l,l.return)),d&64&&ei&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var A=vr;if(kn(s,r),Bn(r),d&512&&(zt||l===null||Br(l,l.return)),d&4){var v=l!==null?l.memoizedState:null;if(d=r.memoizedState,l===null)if(d===null)if(r.stateNode===null){e:{d=r.type,l=r.memoizedProps,A=A.ownerDocument||A;t:switch(d){case"title":v=A.getElementsByTagName("title")[0],(!v||v[Fa]||v[Wt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=A.createElement(d),A.head.insertBefore(v,A.querySelector("head > title"))),nn(v,d,l),v[Wt]=r,Yt(v),d=v;break e;case"link":var B=a0("link","href",A).get(d+(l.href||""));if(B){for(var N=0;N<B.length;N++)if(v=B[N],v.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&v.getAttribute("rel")===(l.rel==null?null:l.rel)&&v.getAttribute("title")===(l.title==null?null:l.title)&&v.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){B.splice(N,1);break t}}v=A.createElement(d),nn(v,d,l),A.head.appendChild(v);break;case"meta":if(B=a0("meta","content",A).get(d+(l.content||""))){for(N=0;N<B.length;N++)if(v=B[N],v.getAttribute("content")===(l.content==null?null:""+l.content)&&v.getAttribute("name")===(l.name==null?null:l.name)&&v.getAttribute("property")===(l.property==null?null:l.property)&&v.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&v.getAttribute("charset")===(l.charSet==null?null:l.charSet)){B.splice(N,1);break t}}v=A.createElement(d),nn(v,d,l),A.head.appendChild(v);break;default:throw Error(i(468,d))}v[Wt]=r,Yt(v),d=v}r.stateNode=d}else l0(A,r.type,r.stateNode);else r.stateNode=o0(A,d,r.memoizedProps);else v!==d?(v===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):v.count--,d===null?l0(A,r.type,r.stateNode):o0(A,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Kh(r,r.memoizedProps,l.memoizedProps)}break;case 27:kn(s,r),Bn(r),d&512&&(zt||l===null||Br(l,l.return)),l!==null&&d&4&&Kh(r,r.memoizedProps,l.memoizedProps);break;case 5:if(kn(s,r),Bn(r),d&512&&(zt||l===null||Br(l,l.return)),r.flags&32){A=r.stateNode;try{Bo(A,"")}catch(xe){ot(r,r.return,xe)}}d&4&&r.stateNode!=null&&(A=r.memoizedProps,Kh(r,A,l!==null?l.memoizedProps:A)),d&1024&&(Jh=!0);break;case 6:if(kn(s,r),Bn(r),d&4){if(r.stateNode===null)throw Error(i(162));d=r.memoizedProps,l=r.stateNode;try{l.nodeValue=d}catch(xe){ot(r,r.return,xe)}}break;case 3:if(Iu=null,A=vr,vr=ku(s.containerInfo),kn(s,r),vr=A,Bn(r),d&4&&l!==null&&l.memoizedState.isDehydrated)try{ia(s.containerInfo)}catch(xe){ot(r,r.return,xe)}Jh&&(Jh=!1,lx(r));break;case 4:d=vr,vr=ku(r.stateNode.containerInfo),kn(s,r),Bn(r),vr=d;break;case 12:kn(s,r),Bn(r);break;case 31:kn(s,r),Bn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fu(r,d)));break;case 13:kn(s,r),Bn(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(pu=xt()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fu(r,d)));break;case 22:A=r.memoizedState!==null;var q=l!==null&&l.memoizedState!==null,Z=ei,se=zt;if(ei=Z||A,zt=se||q,kn(s,r),zt=se,ei=Z,Bn(r),d&8192)e:for(s=r.stateNode,s._visibility=A?s._visibility&-2:s._visibility|1,A&&(l===null||q||ei||zt||_s(r)),l=null,s=r;;){if(s.tag===5||s.tag===26){if(l===null){q=l=s;try{if(v=q.stateNode,A)B=v.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{N=q.stateNode;var ue=q.memoizedProps.style,te=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;N.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(xe){ot(q,q.return,xe)}}}else if(s.tag===6){if(l===null){q=s;try{q.stateNode.nodeValue=A?"":q.memoizedProps}catch(xe){ot(q,q.return,xe)}}}else if(s.tag===18){if(l===null){q=s;try{var re=q.stateNode;A?Xx(re,!0):Xx(q.stateNode,!1)}catch(xe){ot(q,q.return,xe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=r.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,fu(r,l))));break;case 19:kn(s,r),Bn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fu(r,d)));break;case 30:break;case 21:break;default:kn(s,r),Bn(r)}}function Bn(r){var s=r.flags;if(s&2){try{for(var l,d=r.return;d!==null;){if(Zb(d)){l=d;break}d=d.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var A=l.stateNode,v=$h(r);du(r,v,A);break;case 5:var B=l.stateNode;l.flags&32&&(Bo(B,""),l.flags&=-33);var N=$h(r);du(r,N,B);break;case 3:case 4:var q=l.stateNode.containerInfo,Z=$h(r);Vh(r,Z,q);break;default:throw Error(i(161))}}catch(se){ot(r,r.return,se)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function lx(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;lx(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function ni(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)nx(r,s.alternate,s),s=s.sibling}function _s(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:Li(4,s,s.return),_s(s);break;case 1:Br(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&Xb(s,s.return,l),_s(s);break;case 27:Cl(s.stateNode);case 26:case 5:Br(s,s.return),_s(s);break;case 22:s.memoizedState===null&&_s(s);break;case 30:_s(s);break;default:_s(s)}r=r.sibling}}function ri(r,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,A=r,v=s,B=v.flags;switch(v.tag){case 0:case 11:case 15:ri(A,v,l),hl(4,v);break;case 1:if(ri(A,v,l),d=v,A=d.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(Z){ot(d,d.return,Z)}if(d=v,A=d.updateQueue,A!==null){var N=d.stateNode;try{var q=A.shared.hiddenCallbacks;if(q!==null)for(A.shared.hiddenCallbacks=null,A=0;A<q.length;A++)Lv(q[A],N)}catch(Z){ot(d,d.return,Z)}}l&&B&64&&Jb(v),pl(v,v.return);break;case 27:ex(v);case 26:case 5:ri(A,v,l),l&&d===null&&B&4&&Wb(v),pl(v,v.return);break;case 12:ri(A,v,l);break;case 31:ri(A,v,l),l&&B&4&&sx(A,v);break;case 13:ri(A,v,l),l&&B&4&&ox(A,v);break;case 22:v.memoizedState===null&&ri(A,v,l),pl(v,v.return);break;case 30:break;default:ri(A,v,l)}s=s.sibling}}function Xh(r,s){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&el(l))}function Wh(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&el(r))}function br(r,s,l,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)cx(r,s,l,d),s=s.sibling}function cx(r,s,l,d){var A=s.flags;switch(s.tag){case 0:case 11:case 15:br(r,s,l,d),A&2048&&hl(9,s);break;case 1:br(r,s,l,d);break;case 3:br(r,s,l,d),A&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&el(r)));break;case 12:if(A&2048){br(r,s,l,d),r=s.stateNode;try{var v=s.memoizedProps,B=v.id,N=v.onPostCommit;typeof N=="function"&&N(B,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(q){ot(s,s.return,q)}}else br(r,s,l,d);break;case 31:br(r,s,l,d);break;case 13:br(r,s,l,d);break;case 23:break;case 22:v=s.stateNode,B=s.alternate,s.memoizedState!==null?v._visibility&2?br(r,s,l,d):ml(r,s):v._visibility&2?br(r,s,l,d):(v._visibility|=2,Ko(r,s,l,d,(s.subtreeFlags&10256)!==0||!1)),A&2048&&Xh(B,s);break;case 24:br(r,s,l,d),A&2048&&Wh(s.alternate,s);break;default:br(r,s,l,d)}}function Ko(r,s,l,d,A){for(A=A&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var v=r,B=s,N=l,q=d,Z=B.flags;switch(B.tag){case 0:case 11:case 15:Ko(v,B,N,q,A),hl(8,B);break;case 23:break;case 22:var se=B.stateNode;B.memoizedState!==null?se._visibility&2?Ko(v,B,N,q,A):ml(v,B):(se._visibility|=2,Ko(v,B,N,q,A)),A&&Z&2048&&Xh(B.alternate,B);break;case 24:Ko(v,B,N,q,A),A&&Z&2048&&Wh(B.alternate,B);break;default:Ko(v,B,N,q,A)}s=s.sibling}}function ml(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=r,d=s,A=d.flags;switch(d.tag){case 22:ml(l,d),A&2048&&Xh(d.alternate,d);break;case 24:ml(l,d),A&2048&&Wh(d.alternate,d);break;default:ml(l,d)}s=s.sibling}}var gl=8192;function $o(r,s,l){if(r.subtreeFlags&gl)for(r=r.child;r!==null;)ux(r,s,l),r=r.sibling}function ux(r,s,l){switch(r.tag){case 26:$o(r,s,l),r.flags&gl&&r.memoizedState!==null&&HR(l,vr,r.memoizedState,r.memoizedProps);break;case 5:$o(r,s,l);break;case 3:case 4:var d=vr;vr=ku(r.stateNode.containerInfo),$o(r,s,l),vr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=gl,gl=16777216,$o(r,s,l),gl=d):$o(r,s,l));break;default:$o(r,s,l)}}function dx(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function Al(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var d=s[l];Kt=d,hx(d,r)}dx(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)fx(r),r=r.sibling}function fx(r){switch(r.tag){case 0:case 11:case 15:Al(r),r.flags&2048&&Li(9,r,r.return);break;case 3:Al(r);break;case 12:Al(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,hu(r)):Al(r);break;default:Al(r)}}function hu(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var d=s[l];Kt=d,hx(d,r)}dx(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:Li(8,s,s.return),hu(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,hu(s));break;default:hu(s)}r=r.sibling}}function hx(r,s){for(;Kt!==null;){var l=Kt;switch(l.tag){case 0:case 11:case 15:Li(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:el(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,Kt=d;else e:for(l=r;Kt!==null;){d=Kt;var A=d.sibling,v=d.return;if(rx(d),d===l){Kt=null;break e}if(A!==null){A.return=v,Kt=A;break e}Kt=v}}}var rR={getCacheForType:function(r){var s=en(Nt),l=s.data.get(r);return l===void 0&&(l=r(),s.data.set(r,l)),l},cacheSignal:function(){return en(Nt).controller.signal}},iR=typeof WeakMap=="function"?WeakMap:Map,rt=0,ht=null,He=null,Ye=0,st=0,qn=null,Pi=!1,Vo=!1,Zh=!1,ii=0,St=0,Fi=0,Os=0,ep=0,Gn=0,Jo=0,yl=null,In=null,tp=!1,pu=0,px=0,mu=1/0,gu=null,Hi=null,Ht=0,Ui=null,Xo=null,si=0,np=0,rp=null,mx=null,vl=0,ip=null;function Yn(){return(rt&2)!==0&&Ye!==0?Ye&-Ye:P.T!==null?up():bo()}function gx(){if(Gn===0)if((Ye&536870912)===0||Ve){var r=zn;zn<<=1,(zn&3932160)===0&&(zn=262144),Gn=r}else Gn=536870912;return r=Hn.current,r!==null&&(r.flags|=32),Gn}function Rn(r,s,l){(r===ht&&(st===2||st===9)||r.cancelPendingCommit!==null)&&(Wo(r,0),qi(r,Ye,Gn,!1)),Dt(r,l),((rt&2)===0||r!==ht)&&(r===ht&&((rt&2)===0&&(Os|=l),St===4&&qi(r,Ye,Gn,!1)),Ir(r))}function Ax(r,s,l){if((rt&6)!==0)throw Error(i(327));var d=!l&&(s&127)===0&&(s&r.expiredLanes)===0||Bi(r,s),A=d?aR(r,s):op(r,s,!0),v=d;do{if(A===0){Vo&&!d&&qi(r,s,0,!1);break}else{if(l=r.current.alternate,v&&!sR(l)){A=op(r,s,!1),v=!1;continue}if(A===2){if(v=s,r.errorRecoveryDisabledLanes&v)var B=0;else B=r.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){s=B;e:{var N=r;A=yl;var q=N.current.memoizedState.isDehydrated;if(q&&(Wo(N,B).flags|=256),B=op(N,B,!1),B!==2){if(Zh&&!q){N.errorRecoveryDisabledLanes|=v,Os|=v,A=4;break e}v=In,In=A,v!==null&&(In===null?In=v:In.push.apply(In,v))}A=B}if(v=!1,A!==2)continue}}if(A===1){Wo(r,0),qi(r,s,0,!0);break}e:{switch(d=r,v=A,v){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:qi(d,s,Gn,!Pi);break e;case 2:In=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(A=pu+300-xt(),10<A)){if(qi(d,s,Gn,!Pi),ys(d,0,!0)!==0)break e;si=s,d.timeoutHandle=$x(yx.bind(null,d,l,In,gu,tp,s,Gn,Os,Jo,Pi,v,"Throttled",-0,0),A);break e}yx(d,l,In,gu,tp,s,Gn,Os,Jo,Pi,v,null,-0,0)}}break}while(!0);Ir(r)}function yx(r,s,l,d,A,v,B,N,q,Z,se,ue,te,re){if(r.timeoutHandle=-1,ue=s.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qr},ux(s,v,ue);var xe=(v&62914560)===v?pu-xt():(v&4194048)===v?px-xt():0;if(xe=UR(ue,xe),xe!==null){si=v,r.cancelPendingCommit=xe(kx.bind(null,r,s,v,l,d,A,B,N,q,se,ue,null,te,re)),qi(r,v,B,!Z);return}}kx(r,s,v,l,d,A,B,N,q)}function sR(r){for(var s=r;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var A=l[d],v=A.getSnapshot;A=A.value;try{if(!Pn(v(),A))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function qi(r,s,l,d){s&=~ep,s&=~Os,r.suspendedLanes|=s,r.pingedLanes&=~s,d&&(r.warmLanes|=s),d=r.expirationTimes;for(var A=s;0<A;){var v=31-it(A),B=1<<v;d[v]=-1,A&=~B}l!==0&&Mt(r,l,s)}function Au(){return(rt&6)===0?(bl(0),!1):!0}function sp(){if(He!==null){if(st===0)var r=He.return;else r=He,$r=Is=null,xh(r),Ho=null,nl=0,r=He;for(;r!==null;)Vb(r.alternate,r),r=r.return;He=null}}function Wo(r,s){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,SR(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),si=0,sp(),ht=r,He=l=Yr(r.current,null),Ye=s,st=0,qn=null,Pi=!1,Vo=Bi(r,s),Zh=!1,Jo=Gn=ep=Os=Fi=St=0,In=yl=null,tp=!1,(s&8)!==0&&(s|=s&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=s;0<d;){var A=31-it(d),v=1<<A;s|=r[A],d&=~v}return ii=s,zc(),l}function vx(r,s){Ne=null,P.H=ul,s===Fo||s===Yc?(s=Nv(),st=3):s===ch?(s=Nv(),st=4):st=s===Oh?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qn=s,He===null&&(St=1,ou(r,nr(s,r.current)))}function bx(){var r=Hn.current;return r===null?!0:(Ye&4194048)===Ye?or===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?r===or:!1}function xx(){var r=P.H;return P.H=ul,r===null?ul:r}function wx(){var r=P.A;return P.A=rR,r}function yu(){St=4,Pi||(Ye&4194048)!==Ye&&Hn.current!==null||(Vo=!0),(Fi&134217727)===0&&(Os&134217727)===0||ht===null||qi(ht,Ye,Gn,!1)}function op(r,s,l){var d=rt;rt|=2;var A=xx(),v=wx();(ht!==r||Ye!==s)&&(gu=null,Wo(r,s)),s=!1;var B=St;e:do try{if(st!==0&&He!==null){var N=He,q=qn;switch(st){case 8:sp(),B=6;break e;case 3:case 2:case 9:case 6:Hn.current===null&&(s=!0);var Z=st;if(st=0,qn=null,Zo(r,N,q,Z),l&&Vo){B=0;break e}break;default:Z=st,st=0,qn=null,Zo(r,N,q,Z)}}oR(),B=St;break}catch(se){vx(r,se)}while(!0);return s&&r.shellSuspendCounter++,$r=Is=null,rt=d,P.H=A,P.A=v,He===null&&(ht=null,Ye=0,zc()),B}function oR(){for(;He!==null;)Cx(He)}function aR(r,s){var l=rt;rt|=2;var d=xx(),A=wx();ht!==r||Ye!==s?(gu=null,mu=xt()+500,Wo(r,s)):Vo=Bi(r,s);e:do try{if(st!==0&&He!==null){s=He;var v=qn;t:switch(st){case 1:st=0,qn=null,Zo(r,s,v,1);break;case 2:case 9:if(Dv(v)){st=0,qn=null,Ex(s);break}s=function(){st!==2&&st!==9||ht!==r||(st=7),Ir(r)},v.then(s,s);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Dv(v)?(st=0,qn=null,Ex(s)):(st=0,qn=null,Zo(r,s,v,7));break;case 5:var B=null;switch(He.tag){case 26:B=He.memoizedState;case 5:case 27:var N=He;if(B?c0(B):N.stateNode.complete){st=0,qn=null;var q=N.sibling;if(q!==null)He=q;else{var Z=N.return;Z!==null?(He=Z,vu(Z)):He=null}break t}}st=0,qn=null,Zo(r,s,v,5);break;case 6:st=0,qn=null,Zo(r,s,v,6);break;case 8:sp(),St=6;break e;default:throw Error(i(462))}}lR();break}catch(se){vx(r,se)}while(!0);return $r=Is=null,P.H=d,P.A=A,rt=l,He!==null?0:(ht=null,Ye=0,zc(),St)}function lR(){for(;He!==null&&!Ft();)Cx(He)}function Cx(r){var s=Kb(r.alternate,r,ii);r.memoizedProps=r.pendingProps,s===null?vu(r):He=s}function Ex(r){var s=r,l=s.alternate;switch(s.tag){case 15:case 0:s=Fb(l,s,s.pendingProps,s.type,void 0,Ye);break;case 11:s=Fb(l,s,s.pendingProps,s.type.render,s.ref,Ye);break;case 5:xh(s);default:Vb(l,s),s=He=wv(s,ii),s=Kb(l,s,ii)}r.memoizedProps=r.pendingProps,s===null?vu(r):He=s}function Zo(r,s,l,d){$r=Is=null,xh(s),Ho=null,nl=0;var A=s.return;try{if(JI(r,A,s,l,Ye)){St=1,ou(r,nr(l,r.current)),He=null;return}}catch(v){if(A!==null)throw He=A,v;St=1,ou(r,nr(l,r.current)),He=null;return}s.flags&32768?(Ve||d===1?r=!0:Vo||(Ye&536870912)!==0?r=!1:(Pi=r=!0,(d===2||d===9||d===3||d===6)&&(d=Hn.current,d!==null&&d.tag===13&&(d.flags|=16384))),Sx(s,r)):vu(s)}function vu(r){var s=r;do{if((s.flags&32768)!==0){Sx(s,Pi);return}r=s.return;var l=ZI(s.alternate,s,ii);if(l!==null){He=l;return}if(s=s.sibling,s!==null){He=s;return}He=s=r}while(s!==null);St===0&&(St=5)}function Sx(r,s){do{var l=eR(r.alternate,r);if(l!==null){l.flags&=32767,He=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(r=r.sibling,r!==null)){He=r;return}He=r=l}while(r!==null);St=6,He=null}function kx(r,s,l,d,A,v,B,N,q){r.cancelPendingCommit=null;do bu();while(Ht!==0);if((rt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(v=s.lanes|s.childLanes,v|=$f,vs(r,l,v,B,N,q),r===ht&&(He=ht=null,Ye=0),Xo=s,Ui=r,si=l,np=v,rp=A,mx=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,fR(Ie,function(){return Tx(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=P.T,P.T=null,A=V.p,V.p=2,B=rt,rt|=4;try{tR(r,s,l)}finally{rt=B,V.p=A,P.T=d}}Ht=1,Bx(),Ix(),Rx()}}function Bx(){if(Ht===1){Ht=0;var r=Ui,s=Xo,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=P.T,P.T=null;var d=V.p;V.p=2;var A=rt;rt|=4;try{ax(s,r);var v=yp,B=hv(r.containerInfo),N=v.focusedElem,q=v.selectionRange;if(B!==N&&N&&N.ownerDocument&&fv(N.ownerDocument.documentElement,N)){if(q!==null&&Uf(N)){var Z=q.start,se=q.end;if(se===void 0&&(se=Z),"selectionStart"in N)N.selectionStart=Z,N.selectionEnd=Math.min(se,N.value.length);else{var ue=N.ownerDocument||document,te=ue&&ue.defaultView||window;if(te.getSelection){var re=te.getSelection(),xe=N.textContent.length,Be=Math.min(q.start,xe),dt=q.end===void 0?Be:Math.min(q.end,xe);!re.extend&&Be>dt&&(B=dt,dt=Be,Be=B);var K=dv(N,Be),G=dv(N,dt);if(K&&G&&(re.rangeCount!==1||re.anchorNode!==K.node||re.anchorOffset!==K.offset||re.focusNode!==G.node||re.focusOffset!==G.offset)){var W=ue.createRange();W.setStart(K.node,K.offset),re.removeAllRanges(),Be>dt?(re.addRange(W),re.extend(G.node,G.offset)):(W.setEnd(G.node,G.offset),re.addRange(W))}}}}for(ue=[],re=N;re=re.parentNode;)re.nodeType===1&&ue.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ue.length;N++){var le=ue[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ju=!!Ap,yp=Ap=null}finally{rt=A,V.p=d,P.T=l}}r.current=s,Ht=2}}function Ix(){if(Ht===2){Ht=0;var r=Ui,s=Xo,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=P.T,P.T=null;var d=V.p;V.p=2;var A=rt;rt|=4;try{nx(r,s.alternate,s)}finally{rt=A,V.p=d,P.T=l}}Ht=3}}function Rx(){if(Ht===4||Ht===3){Ht=0,vo();var r=Ui,s=Xo,l=si,d=mx;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ht=5:(Ht=0,Xo=Ui=null,Qx(r,r.pendingLanes));var A=r.pendingLanes;if(A===0&&(Hi=null),wn(l),s=s.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(wt,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=P.T,A=V.p,V.p=2,P.T=null;try{for(var v=r.onRecoverableError,B=0;B<d.length;B++){var N=d[B];v(N.value,{componentStack:N.stack})}}finally{P.T=s,V.p=A}}(si&3)!==0&&bu(),Ir(r),A=r.pendingLanes,(l&261930)!==0&&(A&42)!==0?r===ip?vl++:(vl=0,ip=r):vl=0,bl(0)}}function Qx(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,el(s)))}function bu(){return Bx(),Ix(),Rx(),Tx()}function Tx(){if(Ht!==5)return!1;var r=Ui,s=np;np=0;var l=wn(si),d=P.T,A=V.p;try{V.p=32>l?32:l,P.T=null,l=rp,rp=null;var v=Ui,B=si;if(Ht=0,Xo=Ui=null,si=0,(rt&6)!==0)throw Error(i(331));var N=rt;if(rt|=4,fx(v.current),cx(v,v.current,B,l),rt=N,bl(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(wt,v)}catch{}return!0}finally{V.p=A,P.T=d,Qx(r,s)}}function jx(r,s,l){s=nr(l,s),s=_h(r.stateNode,s,2),r=_i(r,s,2),r!==null&&(Dt(r,2),Ir(r))}function ot(r,s,l){if(r.tag===3)jx(r,r,l);else for(;s!==null;){if(s.tag===3){jx(s,r,l);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Hi===null||!Hi.has(d))){r=nr(l,r),l=Db(2),d=_i(s,l,2),d!==null&&(Mb(l,d,s,r),Dt(d,2),Ir(d));break}}s=s.return}}function ap(r,s,l){var d=r.pingCache;if(d===null){d=r.pingCache=new iR;var A=new Set;d.set(s,A)}else A=d.get(s),A===void 0&&(A=new Set,d.set(s,A));A.has(l)||(Zh=!0,A.add(l),r=cR.bind(null,r,s,l),s.then(r,r))}function cR(r,s,l){var d=r.pingCache;d!==null&&d.delete(s),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,ht===r&&(Ye&l)===l&&(St===4||St===3&&(Ye&62914560)===Ye&&300>xt()-pu?(rt&2)===0&&Wo(r,0):ep|=l,Jo===Ye&&(Jo=0)),Ir(r)}function Dx(r,s){s===0&&(s=It()),r=Ss(r,s),r!==null&&(Dt(r,s),Ir(r))}function uR(r){var s=r.memoizedState,l=0;s!==null&&(l=s.retryLane),Dx(r,l)}function dR(r,s){var l=0;switch(r.tag){case 31:case 13:var d=r.stateNode,A=r.memoizedState;A!==null&&(l=A.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(s),Dx(r,l)}function fR(r,s){return Si(r,s)}var xu=null,ea=null,lp=!1,wu=!1,cp=!1,Gi=0;function Ir(r){r!==ea&&r.next===null&&(ea===null?xu=ea=r:ea=ea.next=r),wu=!0,lp||(lp=!0,pR())}function bl(r,s){if(!cp&&wu){cp=!0;do for(var l=!1,d=xu;d!==null;){if(r!==0){var A=d.pendingLanes;if(A===0)var v=0;else{var B=d.suspendedLanes,N=d.pingedLanes;v=(1<<31-it(42|r)+1)-1,v&=A&~(B&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,Ox(d,v))}else v=Ye,v=ys(d,d===ht?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||Bi(d,v)||(l=!0,Ox(d,v));d=d.next}while(l);cp=!1}}function hR(){Mx()}function Mx(){wu=lp=!1;var r=0;Gi!==0&&ER()&&(r=Gi);for(var s=xt(),l=null,d=xu;d!==null;){var A=d.next,v=Nx(d,s);v===0?(d.next=null,l===null?xu=A:l.next=A,A===null&&(ea=l)):(l=d,(r!==0||(v&3)!==0)&&(wu=!0)),d=A}Ht!==0&&Ht!==5||bl(r),Gi!==0&&(Gi=0)}function Nx(r,s){for(var l=r.suspendedLanes,d=r.pingedLanes,A=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var B=31-it(v),N=1<<B,q=A[B];q===-1?((N&l)===0||(N&d)!==0)&&(A[B]=Qe(N,s)):q<=s&&(r.expiredLanes|=N),v&=~N}if(s=ht,l=Ye,l=ys(r,r===s?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,l===0||r===s&&(st===2||st===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&gs(d),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Bi(r,l)){if(s=l&-l,s===r.callbackPriority)return s;switch(d!==null&&gs(d),wn(l)){case 2:case 8:l=me;break;case 32:l=Ie;break;case 268435456:l=We;break;default:l=Ie}return d=_x.bind(null,r),l=Si(l,d),r.callbackPriority=s,r.callbackNode=l,s}return d!==null&&d!==null&&gs(d),r.callbackPriority=2,r.callbackNode=null,2}function _x(r,s){if(Ht!==0&&Ht!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(bu()&&r.callbackNode!==l)return null;var d=Ye;return d=ys(r,r===ht?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(Ax(r,d,s),Nx(r,xt()),r.callbackNode!=null&&r.callbackNode===l?_x.bind(null,r):null)}function Ox(r,s){if(bu())return null;Ax(r,s,!0)}function pR(){kR(function(){(rt&6)!==0?Si(oe,hR):Mx()})}function up(){if(Gi===0){var r=Lo;r===0&&(r=ki,ki<<=1,(ki&261888)===0&&(ki=256)),Gi=r}return Gi}function zx(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Qc(""+r)}function Lx(r,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,r.id&&l.setAttribute("form",r.id),s.parentNode.insertBefore(l,s),r=new FormData(r),l.parentNode.removeChild(l),r}function mR(r,s,l,d,A){if(s==="submit"&&l&&l.stateNode===A){var v=zx((A[Cn]||null).action),B=d.submitter;B&&(s=(s=B[Cn]||null)?zx(s.formAction):B.getAttribute("formAction"),s!==null&&(v=s,B=null));var N=new Mc("action","action",null,d,A);r.push({event:N,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Gi!==0){var q=B?Lx(A,B):new FormData(A);Qh(l,{pending:!0,data:q,method:A.method,action:v},null,q)}}else typeof v=="function"&&(N.preventDefault(),q=B?Lx(A,B):new FormData(A),Qh(l,{pending:!0,data:q,method:A.method,action:v},v,q))},currentTarget:A}]})}}for(var dp=0;dp<Kf.length;dp++){var fp=Kf[dp],gR=fp.toLowerCase(),AR=fp[0].toUpperCase()+fp.slice(1);yr(gR,"on"+AR)}yr(gv,"onAnimationEnd"),yr(Av,"onAnimationIteration"),yr(yv,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(DI,"onTransitionRun"),yr(MI,"onTransitionStart"),yr(NI,"onTransitionCancel"),yr(vv,"onTransitionEnd"),So("onMouseEnter",["mouseout","mouseover"]),So("onMouseLeave",["mouseout","mouseover"]),So("onPointerEnter",["pointerout","pointerover"]),So("onPointerLeave",["pointerout","pointerover"]),xs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xs("onBeforeInput",["compositionend","keypress","textInput","paste"]),xs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xl="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(" "),yR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xl));function Px(r,s){s=(s&4)!==0;for(var l=0;l<r.length;l++){var d=r[l],A=d.event;d=d.listeners;e:{var v=void 0;if(s)for(var B=d.length-1;0<=B;B--){var N=d[B],q=N.instance,Z=N.currentTarget;if(N=N.listener,q!==v&&A.isPropagationStopped())break e;v=N,A.currentTarget=Z;try{v(A)}catch(se){Oc(se)}A.currentTarget=null,v=q}else for(B=0;B<d.length;B++){if(N=d[B],q=N.instance,Z=N.currentTarget,N=N.listener,q!==v&&A.isPropagationStopped())break e;v=N,A.currentTarget=Z;try{v(A)}catch(se){Oc(se)}A.currentTarget=null,v=q}}}}function Ue(r,s){var l=s[Sf];l===void 0&&(l=s[Sf]=new Set);var d=r+"__bubble";l.has(d)||(Fx(s,r,2,!1),l.add(d))}function hp(r,s,l){var d=0;s&&(d|=4),Fx(l,r,d,s)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function pp(r){if(!r[Cu]){r[Cu]=!0,My.forEach(function(l){l!=="selectionchange"&&(yR.has(l)||hp(l,!1,r),hp(l,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Cu]||(s[Cu]=!0,hp("selectionchange",!1,s))}}function Fx(r,s,l,d){switch(g0(s)){case 2:var A=YR;break;case 8:A=KR;break;default:A=Rp}l=A.bind(null,s,l,r),A=void 0,!Mf||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(A=!0),d?A!==void 0?r.addEventListener(s,l,{capture:!0,passive:A}):r.addEventListener(s,l,!0):A!==void 0?r.addEventListener(s,l,{passive:A}):r.addEventListener(s,l,!1)}function mp(r,s,l,d,A){var v=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var B=d.tag;if(B===3||B===4){var N=d.stateNode.containerInfo;if(N===A)break;if(B===4)for(B=d.return;B!==null;){var q=B.tag;if((q===3||q===4)&&B.stateNode.containerInfo===A)return;B=B.return}for(;N!==null;){if(B=wo(N),B===null)return;if(q=B.tag,q===5||q===6||q===26||q===27){d=v=B;continue e}N=N.parentNode}}d=d.return}Yy(function(){var Z=v,se=jf(l),ue=[];e:{var te=bv.get(r);if(te!==void 0){var re=Mc,xe=r;switch(r){case"keypress":if(jc(l)===0)break e;case"keydown":case"keyup":re=dI;break;case"focusin":xe="focus",re=zf;break;case"focusout":xe="blur",re=zf;break;case"beforeblur":case"afterblur":re=zf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=Z2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=pI;break;case gv:case Av:case yv:re=nI;break;case vv:re=gI;break;case"scroll":case"scrollend":re=X2;break;case"wheel":re=yI;break;case"copy":case"cut":case"paste":re=iI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Xy;break;case"toggle":case"beforetoggle":re=bI}var Be=(s&4)!==0,dt=!Be&&(r==="scroll"||r==="scrollend"),K=Be?te!==null?te+"Capture":null:te;Be=[];for(var G=Z,W;G!==null;){var le=G;if(W=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||W===null||K===null||(le=Ua(G,K),le!=null&&Be.push(wl(G,le,W))),dt)break;G=G.return}0<Be.length&&(te=new re(te,xe,null,l,se),ue.push({event:te,listeners:Be}))}}if((s&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",re=r==="mouseout"||r==="pointerout",te&&l!==Tf&&(xe=l.relatedTarget||l.fromElement)&&(wo(xe)||xe[xo]))break e;if((re||te)&&(te=se.window===se?se:(te=se.ownerDocument)?te.defaultView||te.parentWindow:window,re?(xe=l.relatedTarget||l.toElement,re=Z,xe=xe?wo(xe):null,xe!==null&&(dt=a(xe),Be=xe.tag,xe!==dt||Be!==5&&Be!==27&&Be!==6)&&(xe=null)):(re=null,xe=Z),re!==xe)){if(Be=Vy,le="onMouseLeave",K="onMouseEnter",G="mouse",(r==="pointerout"||r==="pointerover")&&(Be=Xy,le="onPointerLeave",K="onPointerEnter",G="pointer"),dt=re==null?te:Ha(re),W=xe==null?te:Ha(xe),te=new Be(le,G+"leave",re,l,se),te.target=dt,te.relatedTarget=W,le=null,wo(se)===Z&&(Be=new Be(K,G+"enter",xe,l,se),Be.target=W,Be.relatedTarget=dt,le=Be),dt=le,re&&xe)t:{for(Be=vR,K=re,G=xe,W=0,le=K;le;le=Be(le))W++;le=0;for(var Se=G;Se;Se=Be(Se))le++;for(;0<W-le;)K=Be(K),W--;for(;0<le-W;)G=Be(G),le--;for(;W--;){if(K===G||G!==null&&K===G.alternate){Be=K;break t}K=Be(K),G=Be(G)}Be=null}else Be=null;re!==null&&Hx(ue,te,re,Be,!1),xe!==null&&dt!==null&&Hx(ue,dt,xe,Be,!0)}}e:{if(te=Z?Ha(Z):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var tt=sv;else if(rv(te))if(ov)tt=QI;else{tt=II;var Ce=BI}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?Z&&Qf(Z.elementType)&&(tt=sv):tt=RI;if(tt&&(tt=tt(r,Z))){iv(ue,tt,l,se);break e}Ce&&Ce(r,te,Z),r==="focusout"&&Z&&te.type==="number"&&Z.memoizedProps.value!=null&&Rf(te,"number",te.value)}switch(Ce=Z?Ha(Z):window,r){case"focusin":(rv(Ce)||Ce.contentEditable==="true")&&(To=Ce,qf=Z,Xa=null);break;case"focusout":Xa=qf=To=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,pv(ue,l,se);break;case"selectionchange":if(jI)break;case"keydown":case"keyup":pv(ue,l,se)}var Oe;if(Pf)e:{switch(r){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Qo?tv(r,l)&&(Ke="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Ke="onCompositionStart");Ke&&(Wy&&l.locale!=="ko"&&(Qo||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Qo&&(Oe=Ky()):(Ri=se,Nf="value"in Ri?Ri.value:Ri.textContent,Qo=!0)),Ce=Eu(Z,Ke),0<Ce.length&&(Ke=new Jy(Ke,r,null,l,se),ue.push({event:Ke,listeners:Ce}),Oe?Ke.data=Oe:(Oe=nv(l),Oe!==null&&(Ke.data=Oe)))),(Oe=wI?CI(r,l):EI(r,l))&&(Ke=Eu(Z,"onBeforeInput"),0<Ke.length&&(Ce=new Jy("onBeforeInput","beforeinput",null,l,se),ue.push({event:Ce,listeners:Ke}),Ce.data=Oe)),mR(ue,r,Z,l,se)}Px(ue,s)})}function wl(r,s,l){return{instance:r,listener:s,currentTarget:l}}function Eu(r,s){for(var l=s+"Capture",d=[];r!==null;){var A=r,v=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||v===null||(A=Ua(r,l),A!=null&&d.unshift(wl(r,A,v)),A=Ua(r,s),A!=null&&d.push(wl(r,A,v))),r.tag===3)return d;r=r.return}return[]}function vR(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Hx(r,s,l,d,A){for(var v=s._reactName,B=[];l!==null&&l!==d;){var N=l,q=N.alternate,Z=N.stateNode;if(N=N.tag,q!==null&&q===d)break;N!==5&&N!==26&&N!==27||Z===null||(q=Z,A?(Z=Ua(l,v),Z!=null&&B.unshift(wl(l,Z,q))):A||(Z=Ua(l,v),Z!=null&&B.push(wl(l,Z,q)))),l=l.return}B.length!==0&&r.push({event:s,listeners:B})}var bR=/\r\n?/g,xR=/\u0000|\uFFFD/g;function Ux(r){return(typeof r=="string"?r:""+r).replace(bR,`
|
|
9
|
+
`).replace(xR,"")}function qx(r,s){return s=Ux(s),Ux(r)===s}function ut(r,s,l,d,A,v){switch(l){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||Bo(r,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&Bo(r,""+d);break;case"className":Ic(r,"class",d);break;case"tabIndex":Ic(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ic(r,l,d);break;case"style":qy(r,d,v);break;case"data":if(s!=="object"){Ic(r,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||l!=="href")){r.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Qc(""+d),r.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(l,"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 v=="function"&&(l==="formAction"?(s!=="input"&&ut(r,s,"name",A.name,A,null),ut(r,s,"formEncType",A.formEncType,A,null),ut(r,s,"formMethod",A.formMethod,A,null),ut(r,s,"formTarget",A.formTarget,A,null)):(ut(r,s,"encType",A.encType,A,null),ut(r,s,"method",A.method,A,null),ut(r,s,"target",A.target,A,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Qc(""+d),r.setAttribute(l,d);break;case"onClick":d!=null&&(r.onclick=qr);break;case"onScroll":d!=null&&Ue("scroll",r);break;case"onScrollEnd":d!=null&&Ue("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(l=d.__html,l!=null){if(A.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}l=Qc(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""+d):r.removeAttribute(l);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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":d===!0?r.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,d):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(l,d):r.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(l):r.setAttribute(l,d);break;case"popover":Ue("beforetoggle",r),Ue("toggle",r),Bc(r,"popover",d);break;case"xlinkActuate":Ur(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Ur(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Ur(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Ur(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Ur(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Ur(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Bc(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=V2.get(l)||l,Bc(r,l,d))}}function gp(r,s,l,d,A,v){switch(l){case"style":qy(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(l=d.__html,l!=null){if(A.children!=null)throw Error(i(60));r.innerHTML=l}}break;case"children":typeof d=="string"?Bo(r,d):(typeof d=="number"||typeof d=="bigint")&&Bo(r,""+d);break;case"onScroll":d!=null&&Ue("scroll",r);break;case"onScrollEnd":d!=null&&Ue("scrollend",r);break;case"onClick":d!=null&&(r.onclick=qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ny.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(A=l.endsWith("Capture"),s=l.slice(2,A?l.length-7:void 0),v=r[Cn]||null,v=v!=null?v[l]:null,typeof v=="function"&&r.removeEventListener(s,v,A),typeof d=="function")){typeof v!="function"&&v!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(s,d,A);break e}l in r?r[l]=d:d===!0?r.setAttribute(l,""):Bc(r,l,d)}}}function nn(r,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",r),Ue("load",r);var d=!1,A=!1,v;for(v in l)if(l.hasOwnProperty(v)){var B=l[v];if(B!=null)switch(v){case"src":d=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:ut(r,s,v,B,l,null)}}A&&ut(r,s,"srcSet",l.srcSet,l,null),d&&ut(r,s,"src",l.src,l,null);return;case"input":Ue("invalid",r);var N=v=B=A=null,q=null,Z=null;for(d in l)if(l.hasOwnProperty(d)){var se=l[d];if(se!=null)switch(d){case"name":A=se;break;case"type":B=se;break;case"checked":q=se;break;case"defaultChecked":Z=se;break;case"value":v=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,s));break;default:ut(r,s,d,se,l,null)}}Py(r,v,N,q,Z,B,A,!1);return;case"select":Ue("invalid",r),d=B=v=null;for(A in l)if(l.hasOwnProperty(A)&&(N=l[A],N!=null))switch(A){case"value":v=N;break;case"defaultValue":B=N;break;case"multiple":d=N;default:ut(r,s,A,N,l,null)}s=v,l=B,r.multiple=!!d,s!=null?ko(r,!!d,s,!1):l!=null&&ko(r,!!d,l,!0);return;case"textarea":Ue("invalid",r),v=A=d=null;for(B in l)if(l.hasOwnProperty(B)&&(N=l[B],N!=null))switch(B){case"value":d=N;break;case"defaultValue":A=N;break;case"children":v=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:ut(r,s,B,N,l,null)}Hy(r,d,A,v);return;case"option":for(q in l)l.hasOwnProperty(q)&&(d=l[q],d!=null)&&(q==="selected"?r.selected=d&&typeof d!="function"&&typeof d!="symbol":ut(r,s,q,d,l,null));return;case"dialog":Ue("beforetoggle",r),Ue("toggle",r),Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":Ue("load",r);break;case"video":case"audio":for(d=0;d<xl.length;d++)Ue(xl[d],r);break;case"image":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"embed":case"source":case"link":Ue("error",r),Ue("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in l)if(l.hasOwnProperty(Z)&&(d=l[Z],d!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:ut(r,s,Z,d,l,null)}return;default:if(Qf(s)){for(se in l)l.hasOwnProperty(se)&&(d=l[se],d!==void 0&&gp(r,s,se,d,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(d=l[N],d!=null&&ut(r,s,N,d,l,null))}function wR(r,s,l,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,v=null,B=null,N=null,q=null,Z=null,se=null;for(re in l){var ue=l[re];if(l.hasOwnProperty(re)&&ue!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":q=ue;default:d.hasOwnProperty(re)||ut(r,s,re,null,d,ue)}}for(var te in d){var re=d[te];if(ue=l[te],d.hasOwnProperty(te)&&(re!=null||ue!=null))switch(te){case"type":v=re;break;case"name":A=re;break;case"checked":Z=re;break;case"defaultChecked":se=re;break;case"value":B=re;break;case"defaultValue":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,s));break;default:re!==ue&&ut(r,s,te,re,d,ue)}}If(r,B,N,q,Z,se,v,A);return;case"select":re=B=N=te=null;for(v in l)if(q=l[v],l.hasOwnProperty(v)&&q!=null)switch(v){case"value":break;case"multiple":re=q;default:d.hasOwnProperty(v)||ut(r,s,v,null,d,q)}for(A in d)if(v=d[A],q=l[A],d.hasOwnProperty(A)&&(v!=null||q!=null))switch(A){case"value":te=v;break;case"defaultValue":N=v;break;case"multiple":B=v;default:v!==q&&ut(r,s,A,v,d,q)}s=N,l=B,d=re,te!=null?ko(r,!!l,te,!1):!!d!=!!l&&(s!=null?ko(r,!!l,s,!0):ko(r,!!l,l?[]:"",!1));return;case"textarea":re=te=null;for(N in l)if(A=l[N],l.hasOwnProperty(N)&&A!=null&&!d.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:ut(r,s,N,null,d,A)}for(B in d)if(A=d[B],v=l[B],d.hasOwnProperty(B)&&(A!=null||v!=null))switch(B){case"value":te=A;break;case"defaultValue":re=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:A!==v&&ut(r,s,B,A,d,v)}Fy(r,te,re);return;case"option":for(var xe in l)te=l[xe],l.hasOwnProperty(xe)&&te!=null&&!d.hasOwnProperty(xe)&&(xe==="selected"?r.selected=!1:ut(r,s,xe,null,d,te));for(q in d)te=d[q],re=l[q],d.hasOwnProperty(q)&&te!==re&&(te!=null||re!=null)&&(q==="selected"?r.selected=te&&typeof te!="function"&&typeof te!="symbol":ut(r,s,q,te,d,re));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 Be in l)te=l[Be],l.hasOwnProperty(Be)&&te!=null&&!d.hasOwnProperty(Be)&&ut(r,s,Be,null,d,te);for(Z in d)if(te=d[Z],re=l[Z],d.hasOwnProperty(Z)&&te!==re&&(te!=null||re!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,s));break;default:ut(r,s,Z,te,d,re)}return;default:if(Qf(s)){for(var dt in l)te=l[dt],l.hasOwnProperty(dt)&&te!==void 0&&!d.hasOwnProperty(dt)&&gp(r,s,dt,void 0,d,te);for(se in d)te=d[se],re=l[se],!d.hasOwnProperty(se)||te===re||te===void 0&&re===void 0||gp(r,s,se,te,d,re);return}}for(var K in l)te=l[K],l.hasOwnProperty(K)&&te!=null&&!d.hasOwnProperty(K)&&ut(r,s,K,null,d,te);for(ue in d)te=d[ue],re=l[ue],!d.hasOwnProperty(ue)||te===re||te==null&&re==null||ut(r,s,ue,te,d,re)}function Gx(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function CR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var A=l[d],v=A.transferSize,B=A.initiatorType,N=A.duration;if(v&&N&&Gx(B)){for(B=0,N=A.responseEnd,d+=1;d<l.length;d++){var q=l[d],Z=q.startTime;if(Z>N)break;var se=q.transferSize,ue=q.initiatorType;se&&Gx(ue)&&(q=q.responseEnd,B+=se*(q<N?1:(N-Z)/(q-Z)))}if(--d,s+=8*(v+B)/(A.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Ap=null,yp=null;function Su(r){return r.nodeType===9?r:r.ownerDocument}function Yx(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kx(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function vp(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var bp=null;function ER(){var r=window.event;return r&&r.type==="popstate"?r===bp?!1:(bp=r,!0):(bp=null,!1)}var $x=typeof setTimeout=="function"?setTimeout:void 0,SR=typeof clearTimeout=="function"?clearTimeout:void 0,Vx=typeof Promise=="function"?Promise:void 0,kR=typeof queueMicrotask=="function"?queueMicrotask:typeof Vx<"u"?function(r){return Vx.resolve(null).then(r).catch(BR)}:$x;function BR(r){setTimeout(function(){throw r})}function Yi(r){return r==="head"}function Jx(r,s){var l=s,d=0;do{var A=l.nextSibling;if(r.removeChild(l),A&&A.nodeType===8)if(l=A.data,l==="/$"||l==="/&"){if(d===0){r.removeChild(A),ia(s);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")Cl(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,Cl(l);for(var v=l.firstChild;v;){var B=v.nextSibling,N=v.nodeName;v[Fa]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=B}}else l==="body"&&Cl(r.ownerDocument.body);l=A}while(l);ia(s)}function Xx(r,s){var l=r;r=0;do{var d=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=d}while(l)}function xp(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":xp(l),kf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function IR(r,s,l,d){for(;r.nodeType===1;){var A=l;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Fa])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==A.rel||r.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||r.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||r.getAttribute("title")!==(A.title==null?null:A.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(A.src==null?null:A.src)||r.getAttribute("type")!==(A.type==null?null:A.type)||r.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var v=A.name==null?null:""+A.name;if(A.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=ar(r.nextSibling),r===null)break}return null}function RR(r,s,l){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=ar(r.nextSibling),r===null))return null;return r}function Wx(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=ar(r.nextSibling),r===null))return null;return r}function wp(r){return r.data==="$?"||r.data==="$~"}function Cp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function QR(r,s){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||l.readyState!=="loading")s();else{var d=function(){s(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function ar(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var Ep=null;function Zx(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(s===0)return ar(r.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}r=r.nextSibling}return null}function e0(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return r;s--}else l!=="/$"&&l!=="/&"||s++}r=r.previousSibling}return null}function t0(r,s,l){switch(s=Su(l),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Cl(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);kf(r)}var lr=new Map,n0=new Set;function ku(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var oi=V.d;V.d={f:TR,r:jR,D:DR,C:MR,L:NR,m:_R,X:zR,S:OR,M:LR};function TR(){var r=oi.f(),s=Au();return r||s}function jR(r){var s=Co(r);s!==null&&s.tag===5&&s.type==="form"?vb(s):oi.r(r)}var ta=typeof document>"u"?null:document;function r0(r,s,l){var d=ta;if(d&&typeof s=="string"&&s){var A=er(s);A='link[rel="'+r+'"][href="'+A+'"]',typeof l=="string"&&(A+='[crossorigin="'+l+'"]'),n0.has(A)||(n0.add(A),r={rel:r,crossOrigin:l,href:s},d.querySelector(A)===null&&(s=d.createElement("link"),nn(s,"link",r),Yt(s),d.head.appendChild(s)))}}function DR(r){oi.D(r),r0("dns-prefetch",r,null)}function MR(r,s){oi.C(r,s),r0("preconnect",r,s)}function NR(r,s,l){oi.L(r,s,l);var d=ta;if(d&&r&&s){var A='link[rel="preload"][as="'+er(s)+'"]';s==="image"&&l&&l.imageSrcSet?(A+='[imagesrcset="'+er(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(A+='[imagesizes="'+er(l.imageSizes)+'"]')):A+='[href="'+er(r)+'"]';var v=A;switch(s){case"style":v=na(r);break;case"script":v=ra(r)}lr.has(v)||(r=m({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:r,as:s},l),lr.set(v,r),d.querySelector(A)!==null||s==="style"&&d.querySelector(El(v))||s==="script"&&d.querySelector(Sl(v))||(s=d.createElement("link"),nn(s,"link",r),Yt(s),d.head.appendChild(s)))}}function _R(r,s){oi.m(r,s);var l=ta;if(l&&r){var d=s&&typeof s.as=="string"?s.as:"script",A='link[rel="modulepreload"][as="'+er(d)+'"][href="'+er(r)+'"]',v=A;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ra(r)}if(!lr.has(v)&&(r=m({rel:"modulepreload",href:r},s),lr.set(v,r),l.querySelector(A)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Sl(v)))return}d=l.createElement("link"),nn(d,"link",r),Yt(d),l.head.appendChild(d)}}}function OR(r,s,l){oi.S(r,s,l);var d=ta;if(d&&r){var A=Eo(d).hoistableStyles,v=na(r);s=s||"default";var B=A.get(v);if(!B){var N={loading:0,preload:null};if(B=d.querySelector(El(v)))N.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":s},l),(l=lr.get(v))&&Sp(r,l);var q=B=d.createElement("link");Yt(q),nn(q,"link",r),q._p=new Promise(function(Z,se){q.onload=Z,q.onerror=se}),q.addEventListener("load",function(){N.loading|=1}),q.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Bu(B,s,d)}B={type:"stylesheet",instance:B,count:1,state:N},A.set(v,B)}}}function zR(r,s){oi.X(r,s);var l=ta;if(l&&r){var d=Eo(l).hoistableScripts,A=ra(r),v=d.get(A);v||(v=l.querySelector(Sl(A)),v||(r=m({src:r,async:!0},s),(s=lr.get(A))&&kp(r,s),v=l.createElement("script"),Yt(v),nn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(A,v))}}function LR(r,s){oi.M(r,s);var l=ta;if(l&&r){var d=Eo(l).hoistableScripts,A=ra(r),v=d.get(A);v||(v=l.querySelector(Sl(A)),v||(r=m({src:r,async:!0,type:"module"},s),(s=lr.get(A))&&kp(r,s),v=l.createElement("script"),Yt(v),nn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(A,v))}}function i0(r,s,l,d){var A=(A=ne.current)?ku(A):null;if(!A)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=na(l.href),l=Eo(A).hoistableStyles,d=l.get(s),d||(d={type:"style",instance:null,count:0,state:null},l.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=na(l.href);var v=Eo(A).hoistableStyles,B=v.get(r);if(B||(A=A.ownerDocument||A,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,B),(v=A.querySelector(El(r)))&&!v._p&&(B.instance=v,B.state.loading=5),lr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},lr.set(r,l),v||PR(A,r,l,B.state))),s&&d===null)throw Error(i(528,""));return B}if(s&&d!==null)throw Error(i(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ra(l),l=Eo(A).hoistableScripts,d=l.get(s),d||(d={type:"script",instance:null,count:0,state:null},l.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function na(r){return'href="'+er(r)+'"'}function El(r){return'link[rel="stylesheet"]['+r+"]"}function s0(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function PR(r,s,l,d){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=r.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),nn(s,"link",l),Yt(s),r.head.appendChild(s))}function ra(r){return'[src="'+er(r)+'"]'}function Sl(r){return"script[async]"+r}function o0(r,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var d=r.querySelector('style[data-href~="'+er(l.href)+'"]');if(d)return s.instance=d,Yt(d),d;var A=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Yt(d),nn(d,"style",A),Bu(d,l.precedence,r),s.instance=d;case"stylesheet":A=na(l.href);var v=r.querySelector(El(A));if(v)return s.state.loading|=4,s.instance=v,Yt(v),v;d=s0(l),(A=lr.get(A))&&Sp(d,A),v=(r.ownerDocument||r).createElement("link"),Yt(v);var B=v;return B._p=new Promise(function(N,q){B.onload=N,B.onerror=q}),nn(v,"link",d),s.state.loading|=4,Bu(v,l.precedence,r),s.instance=v;case"script":return v=ra(l.src),(A=r.querySelector(Sl(v)))?(s.instance=A,Yt(A),A):(d=l,(A=lr.get(v))&&(d=m({},l),kp(d,A)),r=r.ownerDocument||r,A=r.createElement("script"),Yt(A),nn(A,"link",d),r.head.appendChild(A),s.instance=A);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Bu(d,l.precedence,r));return s.instance}function Bu(r,s,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=d.length?d[d.length-1]:null,v=A,B=0;B<d.length;B++){var N=d[B];if(N.dataset.precedence===s)v=N;else if(v!==A)break}v?v.parentNode.insertBefore(r,v.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(r,s.firstChild))}function Sp(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function kp(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var Iu=null;function a0(r,s,l){if(Iu===null){var d=new Map,A=Iu=new Map;A.set(l,d)}else A=Iu,d=A.get(l),d||(d=new Map,A.set(l,d));if(d.has(r))return d;for(d.set(r,null),l=l.getElementsByTagName(r),A=0;A<l.length;A++){var v=l[A];if(!(v[Fa]||v[Wt]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var B=v.getAttribute(s)||"";B=r+B;var N=d.get(B);N?N.push(v):d.set(B,[v])}}return d}function l0(r,s,l){r=r.ownerDocument||r,r.head.insertBefore(l,s==="title"?r.querySelector("head > title"):null)}function FR(r,s,l){if(l===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function c0(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function HR(r,s,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var A=na(d.href),v=s.querySelector(El(A));if(v){s=v._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=Ru.bind(r),s.then(r,r)),l.state.loading|=4,l.instance=v,Yt(v);return}v=s.ownerDocument||s,d=s0(d),(A=lr.get(A))&&Sp(d,A),v=v.createElement("link"),Yt(v);var B=v;B._p=new Promise(function(N,q){B.onload=N,B.onerror=q}),nn(v,"link",d),l.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Ru.bind(r),s.addEventListener("load",l),s.addEventListener("error",l))}}var Bp=0;function UR(r,s){return r.stylesheets&&r.count===0&&Tu(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var d=setTimeout(function(){if(r.stylesheets&&Tu(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+s);0<r.imgBytes&&Bp===0&&(Bp=62500*CR());var A=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Tu(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Bp?50:800)+s);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(A)}}:null}function Ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Qu=null;function Tu(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Qu=new Map,s.forEach(qR,r),Qu=null,Ru.call(r))}function qR(r,s){if(!(s.state.loading&4)){var l=Qu.get(r);if(l)var d=l.get(null);else{l=new Map,Qu.set(r,l);for(var A=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<A.length;v++){var B=A[v];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(l.set(B.dataset.precedence,B),d=B)}d&&l.set(null,d)}A=s.instance,B=A.getAttribute("data-precedence"),v=l.get(B)||d,v===d&&l.set(null,A),l.set(B,A),this.count++,d=Ru.bind(this),A.addEventListener("load",d),A.addEventListener("error",d),v?v.parentNode.insertBefore(A,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(A,r.firstChild)),s.state.loading|=4}}var kl={$$typeof:k,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function GR(r,s,l,d,A,v,B,N,q){this.tag=1,this.containerInfo=r,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=jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jt(0),this.hiddenUpdates=jt(null),this.identifierPrefix=d,this.onUncaughtError=A,this.onCaughtError=v,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function u0(r,s,l,d,A,v,B,N,q,Z,se,ue){return r=new GR(r,s,l,B,q,Z,se,ue,N),s=1,v===!0&&(s|=24),v=Fn(3,null,null,s),r.current=v,v.stateNode=r,s=oh(),s.refCount++,r.pooledCache=s,s.refCount++,v.memoizedState={element:d,isDehydrated:l,cache:s},uh(v),r}function d0(r){return r?(r=Mo,r):Mo}function f0(r,s,l,d,A,v){A=d0(A),d.context===null?d.context=A:d.pendingContext=A,d=Ni(s),d.payload={element:l},v=v===void 0?null:v,v!==null&&(d.callback=v),l=_i(r,d,s),l!==null&&(Rn(l,r,s),il(l,r,s))}function h0(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<s?l:s}}function Ip(r,s){h0(r,s),(r=r.alternate)&&h0(r,s)}function p0(r){if(r.tag===13||r.tag===31){var s=Ss(r,67108864);s!==null&&Rn(s,r,67108864),Ip(r,67108864)}}function m0(r){if(r.tag===13||r.tag===31){var s=Yn();s=bs(s);var l=Ss(r,s);l!==null&&Rn(l,r,s),Ip(r,s)}}var ju=!0;function YR(r,s,l,d){var A=P.T;P.T=null;var v=V.p;try{V.p=2,Rp(r,s,l,d)}finally{V.p=v,P.T=A}}function KR(r,s,l,d){var A=P.T;P.T=null;var v=V.p;try{V.p=8,Rp(r,s,l,d)}finally{V.p=v,P.T=A}}function Rp(r,s,l,d){if(ju){var A=Qp(d);if(A===null)mp(r,s,d,Du,l),A0(r,d);else if(VR(A,r,s,l,d))d.stopPropagation();else if(A0(r,d),s&4&&-1<$R.indexOf(r)){for(;A!==null;){var v=Co(A);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var B=Hr(v.pendingLanes);if(B!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;B;){var q=1<<31-it(B);N.entanglements[1]|=q,B&=~q}Ir(v),(rt&6)===0&&(mu=xt()+500,bl(0))}}break;case 31:case 13:N=Ss(v,2),N!==null&&Rn(N,v,2),Au(),Ip(v,2)}if(v=Qp(d),v===null&&mp(r,s,d,Du,l),v===A)break;A=v}A!==null&&d.stopPropagation()}else mp(r,s,d,null,l)}}function Qp(r){return r=jf(r),Tp(r)}var Du=null;function Tp(r){if(Du=null,r=wo(r),r!==null){var s=a(r);if(s===null)r=null;else{var l=s.tag;if(l===13){if(r=c(s),r!==null)return r;r=null}else if(l===31){if(r=u(s),r!==null)return r;r=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return Du=r,null}function g0(r){switch(r){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(Pa()){case oe:return 2;case me:return 8;case Ie:case ze:return 32;case We:return 268435456;default:return 32}default:return 32}}var jp=!1,Ki=null,$i=null,Vi=null,Bl=new Map,Il=new Map,Ji=[],$R="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 A0(r,s){switch(r){case"focusin":case"focusout":Ki=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":Vi=null;break;case"pointerover":case"pointerout":Bl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(s.pointerId)}}function Rl(r,s,l,d,A,v){return r===null||r.nativeEvent!==v?(r={blockedOn:s,domEventName:l,eventSystemFlags:d,nativeEvent:v,targetContainers:[A]},s!==null&&(s=Co(s),s!==null&&p0(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,A!==null&&s.indexOf(A)===-1&&s.push(A),r)}function VR(r,s,l,d,A){switch(s){case"focusin":return Ki=Rl(Ki,r,s,l,d,A),!0;case"dragenter":return $i=Rl($i,r,s,l,d,A),!0;case"mouseover":return Vi=Rl(Vi,r,s,l,d,A),!0;case"pointerover":var v=A.pointerId;return Bl.set(v,Rl(Bl.get(v)||null,r,s,l,d,A)),!0;case"gotpointercapture":return v=A.pointerId,Il.set(v,Rl(Il.get(v)||null,r,s,l,d,A)),!0}return!1}function y0(r){var s=wo(r.target);if(s!==null){var l=a(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){r.blockedOn=s,jy(r.priority,function(){m0(l)});return}}else if(s===31){if(s=u(l),s!==null){r.blockedOn=s,jy(r.priority,function(){m0(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Mu(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var l=Qp(r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);Tf=d,l.target.dispatchEvent(d),Tf=null}else return s=Co(l),s!==null&&p0(s),r.blockedOn=l,!1;s.shift()}return!0}function v0(r,s,l){Mu(r)&&l.delete(s)}function JR(){jp=!1,Ki!==null&&Mu(Ki)&&(Ki=null),$i!==null&&Mu($i)&&($i=null),Vi!==null&&Mu(Vi)&&(Vi=null),Bl.forEach(v0),Il.forEach(v0)}function Nu(r,s){r.blockedOn===s&&(r.blockedOn=null,jp||(jp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,JR)))}var _u=null;function b0(r){_u!==r&&(_u=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){_u===r&&(_u=null);for(var s=0;s<r.length;s+=3){var l=r[s],d=r[s+1],A=r[s+2];if(typeof d!="function"){if(Tp(d||l)===null)continue;break}var v=Co(l);v!==null&&(r.splice(s,3),s-=3,Qh(v,{pending:!0,data:A,method:l.method,action:d},d,A))}}))}function ia(r){function s(q){return Nu(q,r)}Ki!==null&&Nu(Ki,r),$i!==null&&Nu($i,r),Vi!==null&&Nu(Vi,r),Bl.forEach(s),Il.forEach(s);for(var l=0;l<Ji.length;l++){var d=Ji[l];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Ji.length&&(l=Ji[0],l.blockedOn===null);)y0(l),l.blockedOn===null&&Ji.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var A=l[d],v=l[d+1],B=A[Cn]||null;if(typeof v=="function")B||b0(l);else if(B){var N=null;if(v&&v.hasAttribute("formAction")){if(A=v,B=v[Cn]||null)N=B.formAction;else if(Tp(A)!==null)continue}else N=B.action;typeof N=="function"?l[d+1]=N:(l.splice(d,3),d-=3),b0(l)}}}function x0(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(B){return A=B})},focusReset:"manual",scroll:"manual"})}function s(){A!==null&&(A(),A=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,A=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),A!==null&&(A(),A=null)}}}function Dp(r){this._internalRoot=r}Ou.prototype.render=Dp.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var l=s.current,d=Yn();f0(l,d,r,s,null,null)},Ou.prototype.unmount=Dp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;f0(r.current,2,null,r,null,null),Au(),s[xo]=null}};function Ou(r){this._internalRoot=r}Ou.prototype.unstable_scheduleHydration=function(r){if(r){var s=bo();r={blockedOn:null,target:r,priority:s};for(var l=0;l<Ji.length&&s!==0&&s<Ji[l].priority;l++);Ji.splice(l,0,r),l===0&&y0(r)}};var w0=t.version;if(w0!=="19.2.8")throw Error(i(527,w0,"19.2.8"));V.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var XR={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zu.isDisabled&&zu.supportsFiber)try{wt=zu.inject(XR),Bt=zu}catch{}}return Tl.createRoot=function(r,s){if(!o(r))throw Error(i(299));var l=!1,d="",A=Rb,v=Qb,B=Tb;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(A=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(B=s.onRecoverableError)),s=u0(r,1,!1,null,null,l,d,null,A,v,B,x0),r[xo]=s.current,pp(r),new Dp(s)},Tl.hydrateRoot=function(r,s,l){if(!o(r))throw Error(i(299));var d=!1,A="",v=Rb,B=Qb,N=Tb,q=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(A=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(B=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(q=l.formState)),s=u0(r,1,!0,s,l??null,d,A,q,v,B,N,x0),s.context=d0(null),l=s.current,d=Yn(),d=bs(d),A=Ni(d),A.callback=null,_i(l,A,d),l=d,s.current.lanes=l,Dt(s,l),Ir(s),r[xo]=s.current,pp(r),new Ou(s)},Tl.version="19.2.8",Tl}var N0;function aQ(){if(N0)return Op.exports;N0=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(),Op.exports=oQ(),Op.exports}var lQ=aQ(),so=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(){}},cQ=class extends so{#t;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Dg=new cQ,uQ={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dQ=class{#t=uQ;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},qs=new dQ;function fQ(e){setTimeout(e,0)}var hQ=typeof window>"u"||"Deno"in globalThis;function un(){}function pQ(e,t){return typeof e=="function"?e(t):e}function Qm(e){return typeof e=="number"&&e>=0&&e!==1/0}function m1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ts(e,t){return typeof e=="function"?e(t):e}function Vn(e,t){return typeof e=="function"?e(t):e}function _0(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:a,queryKey:c,stale:u}=e;if(c){if(i){if(t.queryHash!==Mg(c,t.options))return!1}else if(!Ca(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||a&&!a(t))}function O0(e,t){const{exact:n,status:i,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ys(t.options.mutationKey)!==Ys(a))return!1}else if(!Ca(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function Mg(e,t){return(t?.queryKeyHashFn||Ys)(e)}function Ys(e){return JSON.stringify(e,(t,n)=>Tm(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function Ca(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let i=0;i<t.length;i++)if(!Ca(e[i],t[i]))return!1;return!0}const n=Object.keys(t);for(const i of n)if(!Ca(e[i],t[i]))return!1;return!0}return!1}var mQ=Object.prototype.hasOwnProperty;function Pd(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=z0(e)&&z0(t);if(!i&&!(Tm(e)&&Tm(t)))return t;const a=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),u=c.length,h=i?new Array(u):{};let f=0;for(let g=0;g<u;g++){const m=i?g:c[g],y=e[m],b=t[m];if(y===b){h[m]=y,(i?g<a:mQ.call(e,m))&&f++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){h[m]=b;continue}const w=Pd(y,b,n+1);h[m]=w,w===y&&f++}return a===u&&f===a?e:h}function Kl(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 z0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tm(e){if(!L0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!L0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}function gQ(e){return new Promise(t=>{qs.setTimeout(t,e)})}function jm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Pd(e,t):t}function AQ(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function yQ(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Ng=Symbol();function g1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ng?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _g(e,t){return typeof e=="function"?e(...t):!!e}function vQ(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var $l=(()=>{let e=()=>hQ;return{isServer(){return e()},setIsServer(t){e=t}}})();function Dm(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var bQ=fQ;function xQ(){let e=[],t=0,n=u=>{u()},i=u=>{u()},o=bQ;const a=u=>{t?e.push(u):o(()=>{n(u)})},c=()=>{const u=e;e=[],u.length&&o(()=>{i(()=>{u.forEach(h=>{n(h)})})})};return{batch:u=>{let h;t++;try{h=u()}finally{t--,t||c()}return h},batchCalls:u=>(...h)=>{a(()=>{u(...h)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{o=u}}}var bt=xQ(),wQ=class extends so{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},yd=new wQ;function CQ(e){return Math.min(1e3*2**e,3e4)}function A1(e){return(e??"online")==="online"?yd.isOnline():!0}var Mm=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function y1(e){let t=!1,n=0,i;const o=Dm(),a=()=>o.status!=="pending",c=C=>{if(!a()){const E=new Mm(C);y(E),e.onCancel?.(E)}},u=()=>{t=!0},h=()=>{t=!1},f=()=>Dg.isFocused()&&(e.networkMode==="always"||yd.isOnline())&&e.canRun(),g=()=>A1(e.networkMode)&&e.canRun(),m=C=>{a()||(i?.(),o.resolve(C))},y=C=>{a()||(i?.(),o.reject(C))},b=()=>new Promise(C=>{i=E=>{(a()||f())&&C(E)},e.onPause?.()}).then(()=>{i=void 0,a()||e.onContinue?.()}),w=()=>{if(a())return;let C;const E=n===0?e.initialPromise:void 0;try{C=E??e.fn()}catch(S){C=Promise.reject(S)}Promise.resolve(C).then(m).catch(S=>{if(a())return;const R=e.retry??($l.isServer()?0:3),k=e.retryDelay??CQ,I=typeof k=="function"?k(n,S):k,T=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,S);if(t||!T){y(S);return}n++,e.onFail?.(n,S),gQ(I).then(()=>f()?void 0:b()).then(()=>{t?y(S):w()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:h,canStart:g,start:()=>(g()?w():b().then(w),o)}}var v1=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qm(this.gcTime)&&(this.#t=qs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($l.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(qs.clearTimeout(this.#t),this.#t=void 0)}};function EQ(e){return{onFetch:(t,n)=>{const i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const f=async()=>{let g=!1;const m=w=>{vQ(w,()=>t.signal,()=>g=!0)},y=g1(t.options,t.fetchOptions),b=async(w,C,E)=>{if(g)return Promise.reject(t.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const R=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:C,direction:E?"backward":"forward",meta:t.options.meta};return m(Q),Q})(),k=await y(R),{maxPages:I}=t.options,T=E?yQ:AQ;return{pages:T(w.pages,k,I),pageParams:T(w.pageParams,C,I)}};if(o&&a.length){const w=o==="backward",C=w?SQ:P0,E={pages:a,pageParams:c},S=C(i,E);u=await b(E,S,w)}else{const w=e??a.length;do{const C=h===0?c[0]??i.initialPageParam:P0(i,u);if(h>0&&C==null)break;u=await b(u,C),h++}while(h<w)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function P0(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function SQ(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var kQ=class extends v1{#t;#e;#n;#r;#i;#s;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=H0(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=H0(this.options);t.data!==void 0&&(this.setState(F0(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=jm(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(un).catch(un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Vn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ng||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ts(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!m1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#o||this.#u()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},o=()=>{const h=g1(this.options,t),g=(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#o=!1,this.options.persister?this.options.persister(h,g,this):h(g)},c=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return i(h),h})();(this.#t==="infinite"?EQ(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#s=y1({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof Mm&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(h,f)=>{this.#l({type:"failed",failureCount:h,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const h=await this.#s.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#r.config.onSuccess?.(h,this),this.#r.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Mm){if(h.silent)return this.#s.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#r.config.onError?.(h,this),this.#r.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...b1(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...F0(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?i:void 0,i;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),bt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function b1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function F0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function H0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Og=class extends so{constructor(e,t){super(),this.options=t,this.#t=e,this.#o=null,this.#a=Dm(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#r=void 0;#i;#s;#a;#o;#u;#l;#h;#d;#p;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),U0(this.#e,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nm(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nm(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!Kl(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&q0(this.#e,n,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#e!==n||Vn(this.options.enabled,this.#e)!==Vn(t.enabled,this.#e)||ts(this.options.staleTime,this.#e)!==ts(t.staleTime,this.#e))&&this.#g();const o=this.#A();i&&(this.#e!==n||Vn(this.options.enabled,this.#e)!==Vn(t.enabled,this.#e)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return IQ(this,n)&&(this.#r=n,this.#s=this.options,this.#i=this.#e.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(un)),t}#g(){this.#b();const e=ts(this.options.staleTime,this.#e);if($l.isServer()||this.#r.isStale||!Qm(e))return;const n=m1(this.#r.dataUpdatedAt,e)+1;this.#d=qs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#A(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(e){this.#x(),this.#c=e,!($l.isServer()||Vn(this.options.enabled,this.#e)===!1||!Qm(this.#c)||this.#c===0)&&(this.#p=qs.setInterval(()=>{(this.options.refetchIntervalInBackground||Dg.isFocused())&&this.#f()},this.#c))}#v(){this.#g(),this.#y(this.#A())}#b(){this.#d!==void 0&&(qs.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#p!==void 0&&(qs.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){const n=this.#e,i=this.options,o=this.#r,a=this.#i,c=this.#s,h=e!==n?e.state:this.#n,{state:f}=e;let g={...f},m=!1,y;if(t._optimisticResults){const _=this.hasListeners(),F=!_&&U0(e,t),O=_&&q0(e,n,t,i);(F||O)&&(g={...g,...b1(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:C}=g;y=g.data;let E=!1;if(t.placeholderData!==void 0&&y===void 0&&C==="pending"){let _;o?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(_=o.data,E=!0):_=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,_!==void 0&&(C="success",y=jm(o?.data,_,t),m=!0)}if(t.select&&y!==void 0&&!E)if(o&&y===a?.data&&t.select===this.#u)y=this.#l;else try{this.#u=t.select,y=t.select(y),y=jm(o?.data,y,t),this.#l=y,this.#o=null}catch(_){this.#o=_}this.#o&&(b=this.#o,y=this.#l,w=Date.now(),C="error");const S=g.fetchStatus==="fetching",R=C==="pending",k=C==="error",I=R&&S,T=y!==void 0,j={status:C,fetchStatus:g.fetchStatus,isPending:R,isSuccess:C==="success",isError:k,isInitialLoading:I,isLoading:I,data:y,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:S,isRefetching:S&&!R,isLoadingError:k&&!T,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&T,isStale:zg(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Vn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const _=j.data!==void 0,F=j.status==="error"&&!_,O=J=>{F?J.reject(j.error):_&&J.resolve(j.data)},H=()=>{const J=this.#a=j.promise=Dm();O(J)},U=this.#a;switch(U.status){case"pending":e.queryHash===n.queryHash&&O(U);break;case"fulfilled":(F||j.data!==U.value)&&H();break;case"rejected":(!F||j.error!==U.reason)&&H();break}}return j}updateResult(){const e=this.#r,t=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#s=this.options,this.#i.data!==void 0&&(this.#h=this.#e),Kl(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!this.#m.size)return!0;const a=new Set(o??this.#m);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(c=>{const u=c;return this.#r[u]!==e[u]&&a.has(u)})};this.#C({listeners:n()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#C(e){bt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function BQ(e,t){return Vn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Vn(t.retryOnMount,e)===!1)}function U0(e,t){return BQ(e,t)||e.state.data!==void 0&&Nm(e,t,t.refetchOnMount)}function Nm(e,t,n){if(Vn(t.enabled,e)!==!1&&ts(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&zg(e,t)}return!1}function q0(e,t,n,i){return(e!==t||Vn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&zg(e,n)}function zg(e,t){return Vn(t.enabled,e)!==!1&&e.isStaleByTime(ts(t.staleTime,e))}function IQ(e,t){return!Kl(e.getCurrentResult(),t)}var RQ=class extends v1{#t;#e;#n;#r;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||x1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=y1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,c)=>{this.#i({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",o=!this.#r.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#i({type:"pending",context:c,variables:e,isPaused:o})}const a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),bt.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function x1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var QQ=class extends so{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const i=new RQ({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#t.add(e);const t=Lu(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=Lu(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Lu(e);if(typeof t=="string"){const i=this.#e.get(t)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Lu(e);return typeof t=="string"?this.#e.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bt.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>O0(t,n))}findAll(e={}){return this.getAll().filter(t=>O0(e,t))}notify(e){bt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return bt.batch(()=>Promise.all(e.map(t=>t.continue().catch(un))))}};function Lu(e){return e.options.scope?.id}var TQ=class extends so{#t;#e=void 0;#n;#r;constructor(t,n){super(),this.#t=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#t.defaultMutationOptions(t),Kl(this.options,n)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Ys(n.mutationKey)!==Ys(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??x1();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){bt.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#e.variables,i=this.#e.context,o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,i,o)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(t.data,null,n,i,o)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,i,o)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(void 0,t.error,n,i,o)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#e)})})}};function G0(e,t){const n=new Set(t);return e.filter(i=>!n.has(i))}function jQ(e,t,n){const i=e.slice(0);return i[t]=n,i}var DQ=class extends so{#t;#e;#n;#r;#i;#s;#a;#o;#u;#l=[];constructor(e,t,n){super(),this.#t=e,this.#r=n,this.#n=[],this.#i=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,bt.batch(()=>{const n=this.#i,i=this.#c(this.#n);i.forEach(g=>g.observer.setOptions(g.defaultedQueryOptions));const o=i.map(g=>g.observer),a=o.map(g=>g.getCurrentResult()),c=n.length!==o.length,u=o.some((g,m)=>g!==n[m]),h=c||u,f=h?!0:a.some((g,m)=>{const y=this.#e[m];return!y||!Kl(g,y)});!h&&!f||(h&&(this.#l=i,this.#i=o),this.#e=a,this.hasListeners()&&(h&&(G0(n,o).forEach(g=>{g.destroy()}),G0(o,n).forEach(g=>{g.subscribe(m=>{this.#m(g,m)})})),this.#f()))})}getCurrentResult(){return this.#e}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){const n=this.#c(e),i=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[i,a=>this.#d(a??i,t,o),()=>this.#h(i,n)]}#h(e,t){return t.map((n,i)=>{const o=e[i];return n.defaultedQueryOptions.notifyOnChangeProps?o:n.observer.trackResult(o,a=>{t.forEach(c=>{c.observer.trackProp(a)})})})}#d(e,t,n){if(t){const i=this.#u,o=n!==void 0&&i!==void 0&&(i.length!==n.length||n.some((a,c)=>a!==i[c]));return(!this.#s||this.#e!==this.#o||o||t!==this.#a)&&(this.#a=t,this.#o=this.#e,n!==void 0&&(this.#u=n),this.#s=Pd(this.#s,t(e))),this.#s}return e}#p(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#e[t]?.data===void 0)}#c(e){const t=new Map;this.#i.forEach(i=>{const o=i.options.queryHash;if(!o)return;const a=t.get(o);a?a.push(i):t.set(o,[i])});const n=[];return e.forEach(i=>{const o=this.#t.defaultQueryOptions(i),c=t.get(o.queryHash)?.shift()??new Og(this.#t,o);n.push({defaultedQueryOptions:o,observer:c})}),n}#m(e,t){const n=this.#i.indexOf(e);n!==-1&&(this.#e=jQ(this.#e,n,t),this.#f())}#f(){if(this.hasListeners()){const e=this.#h(this.#e,this.#l),t=this.#p(),n=this.#s,i=t?n:this.#d(e,this.#r?.combine);(t||n!==i)&&bt.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}},MQ=class extends so{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const i=t.queryKey,o=t.queryHash??Mg(i,t);let a=this.get(o);return a||(a=new kQ({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>_0(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>_0(e,n)):t}notify(e){bt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){bt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},NQ=class{#t;#e;#n;#r;#i;#s;#a;#o;constructor(e={}){this.#t=e.queryCache||new MQ,this.#e=e.mutationCache||new QQ,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=Dg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=yd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ts(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),a=this.#t.get(i.queryHash)?.state.data,c=pQ(t,a);if(c!==void 0)return this.#t.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return bt.batch(()=>this.#t.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;bt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return bt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=bt.batch(()=>this.#t.findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(un).catch(un)}invalidateQueries(e,t={}){return bt.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=bt.batch(()=>this.#t.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(un)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(un)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(ts(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(un).catch(un)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(un).catch(un)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yd.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{Ca(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{Ca(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mg(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===Ng&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},w1=x.createContext(void 0),yi=e=>{const t=x.useContext(w1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_Q=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(w1.Provider,{value:e,children:t})),C1=x.createContext(!1),E1=()=>x.useContext(C1);C1.Provider;function OQ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zQ=x.createContext(OQ()),S1=()=>x.useContext(zQ),k1=(e,t,n)=>{const i=n?.state.error&&typeof e.throwOnError=="function"?_g(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},B1=e=>{x.useEffect(()=>{e.clearReset()},[e])},I1=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||_g(n,[e.error,i])),R1=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},LQ=(e,t)=>e.isLoading&&e.isFetching&&!t,_m=(e,t)=>e?.suspense&&t.isPending,Om=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function PQ({queries:e,...t},n){const i=yi(),o=E1(),a=S1(),c=x.useMemo(()=>e.map(C=>{const E=i.defaultQueryOptions(C);return E._optimisticResults=o?"isRestoring":"optimistic",E}),[e,i,o]);c.forEach(C=>{R1(C);const E=i.getQueryCache().get(C.queryHash);k1(C,a,E)}),B1(a);const[u]=x.useState(()=>new DQ(i,c,t)),[h,f,g]=u.getOptimisticResult(c,t.combine),m=!o&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(C=>m?u.subscribe(bt.batchCalls(C)):un,[u,m]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setQueries(c,t)},[c,t,u]);const b=h.some((C,E)=>_m(c[E],C))?h.flatMap((C,E)=>{const S=c[E];if(S&&_m(S,C)){const R=new Og(i,S);return Om(S,R,a)}return[]}):[];if(b.length>0)throw Promise.all(b);const w=h.find((C,E)=>{const S=c[E];return S&&I1({result:C,errorResetBoundary:a,throwOnError:S.throwOnError,query:i.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(w?.error)throw w.error;return f(g())}function FQ(e,t,n){const i=E1(),o=S1(),a=yi(),c=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const u=a.getQueryCache().get(c.queryHash),h=e.subscribed!==!1;c._optimisticResults=i?"isRestoring":h?"optimistic":void 0,R1(c),k1(c,o,u),B1(o);const f=!a.getQueryCache().get(c.queryHash),[g]=x.useState(()=>new t(a,c)),m=g.getOptimisticResult(c),y=!i&&h;if(x.useSyncExternalStore(x.useCallback(b=>{const w=y?g.subscribe(bt.batchCalls(b)):un;return g.updateResult(),w},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),x.useEffect(()=>{g.setOptions(c)},[c,g]),_m(c,m))throw Om(c,g,o);if(I1({result:m,errorResetBoundary:o,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!$l.isServer()&&LQ(m,i)&&(f?Om(c,g,o):u?.promise)?.catch(un).finally(()=>{g.updateResult()}),c.notifyOnChangeProps?m:g.trackResult(m)}function Gt(e,t){return FQ(e,Og)}function Y0(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function HQ(e={},t){const n=yi().getMutationCache(),i=x.useRef(e),o=x.useRef(null);return o.current===null&&(o.current=Y0(n,e)),x.useEffect(()=>{i.current=e}),x.useSyncExternalStore(x.useCallback(a=>n.subscribe(()=>{const c=Pd(o.current,Y0(n,i.current));o.current!==c&&(o.current=c,bt.schedule(a))}),[n]),()=>o.current,()=>o.current)}function bn(e,t){const n=yi(),[i]=x.useState(()=>new TQ(n,e));x.useEffect(()=>{i.setOptions(e)},[i,e]);const o=x.useSyncExternalStore(x.useCallback(c=>i.subscribe(bt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=x.useCallback((c,u)=>{i.mutate(c,u).catch(un)},[i]);if(o.error&&_g(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}var oo=p1();const UQ=Ld(oo);function qQ(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const GQ=e=>{switch(e){case"success":return $Q;case"info":return JQ;case"warning":return VQ;case"error":return XQ;default:return null}},YQ=Array(12).fill(0),KQ=({visible:e,className:t})=>ge.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ge.createElement("div",{className:"sonner-spinner"},YQ.map((n,i)=>ge.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),$Q=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ge.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),VQ=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ge.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),JQ=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),XQ=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),WQ=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},ge.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ge.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ZQ=()=>{const[e,t]=ge.useState(document.hidden);return ge.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let eT=1;const tT=100,K0=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:eT++};class nT{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(n=>t(n)),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-tT;t<=0||(this.toasts=this.toasts.filter(n=>t>0&&this.dismissedToasts.has(n.id)?(this.dismissedToasts.delete(n.id),t--,!1):!0))},this.create=t=>{const{message:n,...i}=t,o=K0(t),a=this.pendingDismissals.get(o);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const c=this.dismissedToasts.has(o),u=t.dismissible===void 0?!0:t.dismissible;return c&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(f=>f.id!==o)),(c?void 0:this.toasts.find(f=>f.id===o))?this.toasts=this.toasts.map(f=>f.id===o?(this.publish({...f,...t,id:o,title:n}),{...f,...t,id:o,dismissible:u,title:n}):f):this.addToast({title:n,...i,dismissible:u,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(i=>{this.dismissedToasts.add(i.id),this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const n=this.pendingDismissals.get(t);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(i=>i({id:t,dismiss:!0}))})),t},this.message=(t,n)=>this.create({...n,message:t,type:void 0}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=i!==void 0,c;const u=o.then(async f=>{if(c=["resolve",f],ge.isValidElement(f))a=!1,this.create({id:i,type:"default",message:f});else if(iT(f)&&!f.ok){a=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:y,...w})}else if(f instanceof Error){a=!1;const m=typeof n.error=="function"?await n.error(f):n.error,y=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:y,...w})}else if(n.success!==void 0){a=!1;const m=typeof n.success=="function"?await n.success(f):n.success,y=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:i,type:"success",description:y,...w})}}).catch(async f=>{if(c=["reject",f],n.error!==void 0){a=!1;const g=typeof n.error=="function"?await n.error(f):n.error,m=typeof n.description=="function"?await n.description(f):n.description,b=typeof g=="object"&&!ge.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:m,...b})}}).finally(()=>{a&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),h=()=>new Promise((f,g)=>u.then(()=>c[0]==="reject"?g(c[1]):f(c[1])).catch(g));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(t,n)=>{const i=K0(n);return this.create({...n,jsx:t(i),id:i,type:void 0}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Tn=new nT,rT=(e,t)=>Tn.message(e,t),iT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sT=rT,oT=()=>Tn.toasts,aT=()=>Tn.getActiveToasts(),Ee=Object.assign(sT,{success:Tn.success,info:Tn.info,warning:Tn.warning,error:Tn.error,custom:Tn.custom,message:Tn.message,promise:Tn.promise,dismiss:Tn.dismiss,loading:Tn.loading},{getHistory:oT,getToasts:aT});qQ("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Pu(e){return e.label!==void 0}const lT=3,cT="24px",uT="16px",$0=4e3,dT=356,fT=14,hT=45,pT=200;function Rr(...e){return e.filter(Boolean).join(" ")}function mT(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const gT=e=>{var t,n,i,o,a,c,u,h,f;const{invert:g,toast:m,unstyled:y,interacting:b,setHeights:w,visibleToasts:C,heights:E,index:S,toasts:R,expanded:k,removeToast:I,defaultRichColors:T,closeButton:Q,style:j,cancelButtonStyle:_,actionButtonStyle:F,className:O="",descriptionClassName:H="",duration:U,position:J,gap:Y,expandByDefault:$,classNames:P,icons:V,closeButtonAriaLabel:ie="Close toast"}=e,[de,D]=ge.useState(null),[z,L]=ge.useState(null),[M,X]=ge.useState(!1),[ee,ne]=ge.useState(!1),[fe,ae]=ge.useState(!1),[ce,Me]=ge.useState(!1),[Te,_e]=ge.useState(!1),[$e,lt]=ge.useState(0),[kt,On]=ge.useState(0),xn=ge.useRef(m.duration||U||$0),gr=ge.useRef(null),sn=ge.useRef(null),Si=S===0,gs=S+1<=C,Ft=m.type,vo=Ft??"default",xt=m.dismissible!==!1,Pa=m.className||"",oe=m.descriptionClassName||"",me=ge.useMemo(()=>E.findIndex(Qe=>Qe.toastId===m.id)||0,[E,m.id]),Ie=ge.useMemo(()=>{var Qe;return(Qe=m.closeButton)!=null?Qe:Q},[m.closeButton,Q]),ze=ge.useMemo(()=>m.duration||U||$0,[m.duration,U]),We=ge.useRef(0),Tt=ge.useRef(0),Wn=ge.useRef(0),wt=ge.useRef(null),[Bt,on]=J.split("-"),it=ge.useMemo(()=>E.reduce((Qe,It,jt)=>jt>=me?Qe:Qe+It.height,0),[E,me]),Ar=ZQ(),Ct=ge.useMemo(()=>{var Qe;return(Qe=e.swipeDirections)!=null?Qe:mT(J)},[e.swipeDirections,J]),Ef=m.invert||g,ki=Ft==="loading";Tt.current=ge.useMemo(()=>me*Y+it,[me,it]),ge.useEffect(()=>{xn.current=ze},[ze]),ge.useEffect(()=>{X(!0)},[]),ge.useEffect(()=>{const Qe=sn.current;if(Qe){const It=Qe.getBoundingClientRect().height;return On(It),w(jt=>[{toastId:m.id,height:It,position:m.position},...jt]),()=>w(jt=>jt.filter(Dt=>Dt.toastId!==m.id))}},[w,m.id]),ge.useLayoutEffect(()=>{if(!M)return;const Qe=sn.current,It=Qe.style.height;Qe.style.height="auto";const jt=Qe.getBoundingClientRect().height;Qe.style.height=It,On(jt),w(Dt=>Dt.find(Mt=>Mt.toastId===m.id)?Dt.map(Mt=>Mt.toastId===m.id?{...Mt,height:jt}:Mt):[{toastId:m.id,height:jt,position:m.position},...Dt])},[M,m.title,m.description,w,m.id,m.jsx,m.action,m.cancel]);const zn=ge.useCallback(()=>{ne(!0),lt(Tt.current),w(Qe=>Qe.filter(It=>It.toastId!==m.id)),setTimeout(()=>{I(m)},pT)},[m,I,w,Tt]);ge.useEffect(()=>{if(m.promise&&Ft==="loading"||m.duration===1/0||m.type==="loading")return;let Qe;return k||b||Ar?(()=>{if(Wn.current<We.current){const Dt=new Date().getTime()-We.current;xn.current=xn.current-Dt}Wn.current=new Date().getTime()})():xn.current!==1/0&&(We.current=new Date().getTime(),Qe=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),zn()},xn.current)),()=>clearTimeout(Qe)},[k,b,m,Ft,Ar,zn]),ge.useEffect(()=>{m.delete&&(zn(),m.onDismiss==null||m.onDismiss.call(m,m))},[zn,m.delete]);function As(){var Qe;if(V?.loading){var It;return ge.createElement("div",{className:Rr(P?.loader,m==null||(It=m.classNames)==null?void 0:It.loader,"sonner-loader"),"data-visible":Ft==="loading"},V.loading)}return ge.createElement(KQ,{className:Rr(P?.loader,m==null||(Qe=m.classNames)==null?void 0:Qe.loader),visible:Ft==="loading"})}const Hr=m.icon||V?.[Ft]||GQ(Ft);var ys,Bi;return ge.createElement("li",{tabIndex:0,ref:sn,className:Rr(O,Pa,P?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,P?.[vo],m==null||(n=m.classNames)==null?void 0:n[vo]),"data-sonner-toast":"","data-rich-colors":(ys=m.richColors)!=null?ys:T,"data-styled":!(m.jsx||m.unstyled||y),"data-mounted":M,"data-promise":!!m.promise,"data-swiped":Te,"data-removed":ee,"data-visible":gs,"data-y-position":Bt,"data-x-position":on,"data-index":S,"data-front":Si,"data-swiping":fe,"data-dismissible":xt,"data-type":Ft,"data-invert":Ef,"data-swipe-out":ce,"data-swipe-direction":z,"data-expanded":!!(k||$&&M),"data-testid":m.testId,style:{"--index":S,"--toasts-before":S,"--z-index":R.length-S,"--offset":`${ee?$e:Tt.current}px`,"--initial-height":$?"auto":`${kt}px`,...j,...m.style},onDragEnd:()=>{ae(!1),D(null),wt.current=null},onPointerDown:Qe=>{Qe.button!==2&&(ki||!xt||(gr.current=new Date,lt(Tt.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(ae(!0),wt.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,It,jt;if(ce||!xt)return;wt.current=null;const Dt=Number(((Qe=sn.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vs=Number(((It=sn.current)==null?void 0:It.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mt=new Date().getTime()-((jt=gr.current)==null?void 0:jt.getTime()),mn=de==="x"?Dt:vs,Ln=Math.abs(mn)/Mt;if((de==="x"?Ct.includes(Dt>0?"right":"left"):Ct.includes(vs>0?"bottom":"top"))&&(Math.abs(mn)>=hT||Ln>.11)){lt(Tt.current),m.onDismiss==null||m.onDismiss.call(m,m),L(de==="x"?Dt>0?"right":"left":vs>0?"down":"up"),zn(),Me(!0);return}else{var wn,bo;(wn=sn.current)==null||wn.style.setProperty("--swipe-amount-x","0px"),(bo=sn.current)==null||bo.style.setProperty("--swipe-amount-y","0px")}_e(!1),ae(!1),D(null)},onPointerMove:Qe=>{var It,jt,Dt;if(!wt.current||!xt||((It=window.getSelection())==null?void 0:It.toString().length)>0)return;const Mt=Qe.clientY-wt.current.y,mn=Qe.clientX-wt.current.x;!de&&(Math.abs(mn)>1||Math.abs(Mt)>1)&&D(Math.abs(mn)>Math.abs(Mt)?"x":"y");let Ln={x:0,y:0};const bs=wn=>1/(1.5+Math.abs(wn)/20);if(de==="y"){if(Ct.includes("top")||Ct.includes("bottom"))if(Ct.includes("top")&&Mt<0||Ct.includes("bottom")&&Mt>0)Ln.y=Mt;else{const wn=Mt*bs(Mt);Ln.y=Math.abs(wn)<Math.abs(Mt)?wn:Mt}}else if(de==="x"&&(Ct.includes("left")||Ct.includes("right")))if(Ct.includes("left")&&mn<0||Ct.includes("right")&&mn>0)Ln.x=mn;else{const wn=mn*bs(mn);Ln.x=Math.abs(wn)<Math.abs(mn)?wn:mn}(Math.abs(Ln.x)>0||Math.abs(Ln.y)>0)&&_e(!0),(jt=sn.current)==null||jt.style.setProperty("--swipe-amount-x",`${Ln.x}px`),(Dt=sn.current)==null||Dt.style.setProperty("--swipe-amount-y",`${Ln.y}px`)}},Ie&&!m.jsx&&Ft!=="loading"?ge.createElement("button",{"aria-label":ie,"data-disabled":ki,"data-close-button":!0,onClick:ki||!xt?()=>{}:()=>{zn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Rr(P?.closeButton,m==null||(i=m.classNames)==null?void 0:i.closeButton)},(Bi=V?.close)!=null?Bi:WQ):null,(Ft||m.icon||m.promise)&&m.icon!==null&&(V?.[Ft]!==null||m.icon)?ge.createElement("div",{"data-icon":"",className:Rr(P?.icon,m==null||(o=m.classNames)==null?void 0:o.icon)},Ft==="loading"?m.icon||As():m.promise?As():null,Ft!=="loading"?Hr:null):null,ge.createElement("div",{"data-content":"",className:Rr(P?.content,m==null||(a=m.classNames)==null?void 0:a.content)},ge.createElement("div",{"data-title":"",className:Rr(P?.title,m==null||(c=m.classNames)==null?void 0:c.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ge.createElement("div",{"data-description":"",className:Rr(H,oe,P?.description,m==null||(u=m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),ge.isValidElement(m.cancel)?m.cancel:m.cancel&&Pu(m.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||_,onClick:Qe=>{Pu(m.cancel)&&xt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Qe),zn())},className:Rr(P?.cancelButton,m==null||(h=m.classNames)==null?void 0:h.cancelButton)},m.cancel.label):null,ge.isValidElement(m.action)?m.action:m.action&&Pu(m.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:Qe=>{Pu(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Qe),!Qe.defaultPrevented&&zn())},className:Rr(P?.actionButton,m==null||(f=m.classNames)==null?void 0:f.actionButton)},m.action.label):null)};function V0(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function AT(e,t){const n={};return[e,t].forEach((i,o)=>{const a=o===1,c=a?"--mobile-offset":"--offset",u=a?uT:cT;function h(f){["top","right","bottom","left"].forEach(g=>{n[`${c}-${g}`]=typeof f=="number"?`${f}px`:f})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(f=>{i[f]===void 0?n[`${c}-${f}`]=u:n[`${c}-${f}`]=typeof i[f]=="number"?`${i[f]}px`:i[f]}):h(u)}),n}const yT=ge.forwardRef(function(t,n){const{id:i,invert:o,position:a="bottom-right",hotkey:c=["altKey","KeyT"],expand:u,closeButton:h,className:f,offset:g,mobileOffset:m,theme:y="light",richColors:b,duration:w,style:C,visibleToasts:E=lT,toastOptions:S,dir:R=V0(),gap:k=fT,icons:I,customAriaLabel:T,containerAriaLabel:Q="Notifications"}=t,[j,_]=ge.useState([]),F=ge.useMemo(()=>i?j.filter(X=>X.toasterId===i):j.filter(X=>!X.toasterId),[j,i]),O=ge.useMemo(()=>Array.from(new Set([a].concat(F.filter(X=>X.position).map(X=>X.position)))),[F,a]),[H,U]=ge.useState([]),[J,Y]=ge.useState(!1),[$,P]=ge.useState(!1),[V,ie]=ge.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),de=ge.useRef(null),D=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=ge.useRef(null),L=ge.useRef(!1),M=ge.useCallback(X=>{_(ee=>{var ne;return(ne=ee.find(fe=>fe.id===X.id))!=null&&ne.delete||Tn.dismiss(X.id),ee.filter(({id:fe})=>fe!==X.id)})},[]);return ge.useEffect(()=>Tn.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{_(ee=>ee.map(ne=>ne.id===X.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{UQ.flushSync(()=>{_(ee=>{const ne=ee.findIndex(fe=>fe.id===X.id);return ne!==-1?[...ee.slice(0,ne),{...ee[ne],...X},...ee.slice(ne+1)]:[X,...ee]})})})}),[]),ge.useEffect(()=>{if(y!=="system"){ie(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:ee})=>{ie(ee?"dark":"light")})}catch{X.addListener(({matches:ne})=>{try{ie(ne?"dark":"light")}catch(fe){console.error(fe)}})}},[y]),ge.useEffect(()=>{j.length<=1&&Y(!1)},[j]),ge.useEffect(()=>{const X=ee=>{var ne;if(c.length>0&&c.every(ce=>ee[ce]||ee.code===ce)){var ae;Y(!0),(ae=de.current)==null||ae.focus()}ee.code==="Escape"&&(document.activeElement===de.current||(ne=de.current)!=null&&ne.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[c]),ge.useEffect(()=>{if(de.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,L.current=!1)}},[de.current]),ge.createElement("section",{ref:n,"aria-label":T??`${Q} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((X,ee)=>{var ne;const[fe,ae]=X.split("-");return F.length?ge.createElement("ol",{key:X,dir:R==="auto"?V0():R,tabIndex:-1,ref:de,className:f,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":fe,"data-x-position":ae,style:{"--front-toast-height":`${((ne=H[0])==null?void 0:ne.height)||0}px`,"--width":`${dT}px`,"--gap":`${k}px`,...C,...AT(g,m)},onBlur:ce=>{L.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(L.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||L.current||(L.current=!0,z.current=ce.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{$||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||P(!0)},onPointerUp:()=>P(!1)},F.filter(ce=>!ce.position&&ee===0||ce.position===X).map((ce,Me)=>{var Te,_e;return ge.createElement(gT,{key:ce.id,icons:I,index:Me,toast:ce,defaultRichColors:b,duration:(Te=S?.duration)!=null?Te:w,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(_e=S?.closeButton)!=null?_e:h,interacting:$,position:X,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:M,toasts:F.filter($e=>$e.position==ce.position),heights:H.filter($e=>$e.position==ce.position),setHeights:U,expandByDefault:u,gap:k,expanded:J,swipeDirections:t.swipeDirections})})):null}))}),Q1="kirby.theme",T1=window.matchMedia("(prefers-color-scheme: dark)"),zm=new Set;let cc=vT();function vT(){try{const e=localStorage.getItem(Q1);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function j1(e=cc){return e==="system"?T1.matches?"dark":"light":e}function Lg(){const e=j1();document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e;for(const t of zm)t()}function D1(e){cc=e;try{localStorage.setItem(Q1,e)}catch{}Lg()}function M1(e){D1(e),window.kirby?.setDesktopPrefs({theme:e}).catch(()=>{})}function bT(){return cc}T1.addEventListener("change",()=>{cc==="system"&&Lg()});function xT(){Lg(),window.kirby?.getDesktopPrefs().then(e=>{e.theme!==cc&&D1(e.theme)}).catch(()=>{})}function J0(e){return zm.add(e),()=>zm.delete(e)}function us(){const e=x.useSyncExternalStore(J0,bT),t=x.useSyncExternalStore(J0,()=>j1());return{preference:e,resolved:t,setPreference:M1}}function wT(e){const{resolved:t}=us();return p.jsx(yT,{theme:t,position:"bottom-right",offset:32,toastOptions:{classNames:{toast:"!bg-popover !text-popover-foreground !border-border !shadow-lg !text-base",description:"!text-muted-foreground"}},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})}var CT=Object.defineProperty,Pg=(e,t)=>CT(e,"name",{value:t,configurable:!0});function Lm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Pg(Lm,"setRef");function Ks(...e){return t=>{let n=!1;const i=e.map(o=>{const a=Lm(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<i.length;o++){const a=i[o];typeof a=="function"?a():Lm(e[o],null)}}}}Pg(Ks,"composeRefs");function Le(...e){return x.useCallback(Ks(...e),e)}Pg(Le,"useComposedRefs");var ET=Object.defineProperty,Cr=(e,t)=>ET(e,"name",{value:t,configurable:!0});function _r(e){const t=x.forwardRef((n,i)=>{let{children:o,...a}=n,c=null,u=!1;const h=[];Pm(o)&&typeof Fu=="function"&&(o=Fu(o._payload)),x.Children.forEach(o,y=>{if(L1(y)){u=!0;const b=y;let w="child"in b.props?b.props.child:b.props.children;Pm(w)&&typeof Fu=="function"&&(w=Fu(w._payload)),c=kT(b,w),h.push(c?.props?.children)}else h.push(y)}),c?c=x.cloneElement(c,void 0,h):!u&&x.Children.count(o)===1&&x.isValidElement(o)&&(c=o);const f=c?z1(c):void 0,g=Le(i,f);if(!c){if(o||o===0)throw new Error(u?RT(e):IT(e));return o}const m=O1(a,c.props??{});return c.type!==x.Fragment&&(m.ref=i?g:f),x.cloneElement(c,m)});return t.displayName=`${e}.Slot`,t}Cr(_r,"createSlot");var ST=_r("Slot"),N1=Symbol.for("radix.slottable");function _1(e){const t=Cr(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=N1,t}Cr(_1,"createSlottable");var kT=Cr((e,t)=>{if("child"in e.props){const n=e.props.child;return x.isValidElement(n)?x.cloneElement(n,void 0,e.props.children(n.props.children)):null}return x.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function O1(e,t){const n={...t};for(const i in t){const o=e[i],a=t[i];/^on[A-Z]/.test(i)?o&&a?n[i]=(...u)=>{const h=a(...u);return o(...u),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...a}:i==="className"&&(n[i]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}Cr(O1,"mergeProps");function z1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Cr(z1,"getElementRef");function L1(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===N1}Cr(L1,"isSlottable");var BT=Symbol.for("react.lazy");function Pm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===BT&&"_payload"in e&&P1(e._payload)}Cr(Pm,"isLazyComponent");function P1(e){return typeof e=="object"&&e!==null&&"then"in e}Cr(P1,"isPromiseLike");var IT=Cr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),RT=Cr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Fu=Ia[" use ".trim().toString()],QT=Object.defineProperty,TT=(e,t)=>QT(e,"name",{value:t,configurable:!0}),jT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=jT.reduce((e,t)=>{const n=_r(`Primitive.${t}`),i=x.forwardRef((o,a)=>{const{asChild:c,...u}=o,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(h,{...u,ref:a})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Fg(e,t){e&&oo.flushSync(()=>e.dispatchEvent(t))}TT(Fg,"dispatchDiscreteCustomEvent");var DT=Object.defineProperty,MT=(e,t)=>DT(e,"name",{value:t,configurable:!0}),F1=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NT=x.forwardRef(MT(function(t,n){return p.jsx(Re.span,{...t,ref:n,style:{...F1,...t.style}})},"VisuallyHidden")),_T=NT,OT=Object.defineProperty,ur=(e,t)=>OT(e,"name",{value:t,configurable:!0});function zT(e,t){const n=x.createContext(t);n.displayName=e+"Context";const i=ur(a=>{const{children:c,...u}=a,h=x.useMemo(()=>u,Object.values(u));return p.jsx(n.Provider,{value:h,children:c})},"Provider");i.displayName=e+"Provider";function o(a,c={}){const{optional:u=!1}=c,h=x.useContext(n);if(h)return h;if(t!==void 0)return t;if(!u)throw new Error(`\`${a}\` must be used within \`${e}\``)}return ur(o,"useContext"),[i,o]}ur(zT,"createContext");function Xn(e,t=[]){let n=[];function i(a,c){const u=x.createContext(c);u.displayName=a+"Context";const h=n.length;n=[...n,c];const f=ur(m=>{const{scope:y,children:b,...w}=m,C=y?.[e]?.[h]||u,E=x.useMemo(()=>w,Object.values(w));return p.jsx(C.Provider,{value:E,children:b})},"Provider");f.displayName=a+"Provider";function g(m,y,b={}){const{optional:w=!1}=b,C=y?.[e]?.[h]||u,E=x.useContext(C);if(E)return E;if(c!==void 0)return c;if(!w)throw new Error(`\`${m}\` must be used within \`${a}\``)}return ur(g,"useContext"),[f,g]}ur(i,"createContext");const o=ur(()=>{const a=n.map(c=>x.createContext(c));return ur(function(u){const h=u?.[e]||a;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:h}}),[u,h])},"useScope")},"createScope");return o.scopeName=e,[i,H1(o,...t)]}ur(Xn,"createContextScope");function H1(...e){const t=e[0];if(e.length===1)return t;const n=ur(()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return ur(function(a){const c=i.reduce((u,{useScope:h,scopeName:f})=>{const m=h(a)[`__scope${f}`];return{...u,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}ur(H1,"composeContextScopes");var LT=Object.defineProperty,Vt=(e,t)=>LT(e,"name",{value:t,configurable:!0});function Fd(e){const t=e+"CollectionProvider",[n,i]=Xn(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=Vt(C=>{const{scope:E,children:S}=C,R=x.useRef(null),k=x.useRef(new Map).current;return p.jsx(o,{scope:E,itemMap:k,collectionRef:R,children:S})},"CollectionProvider");c.displayName=t;const u=e+"CollectionSlot",h=_r(u),f=x.forwardRef((C,E)=>{const{scope:S,children:R}=C,k=a(u,S),I=Le(E,k.collectionRef);return p.jsx(h,{ref:I,children:R})});f.displayName=u;const g=e+"CollectionItemSlot",m="data-radix-collection-item",y=_r(g),b=x.forwardRef((C,E)=>{const{scope:S,children:R,...k}=C,I=x.useRef(null),T=Le(E,I),Q=a(g,S);return x.useEffect(()=>(Q.itemMap.set(I,{ref:I,...k}),()=>{Q.itemMap.delete(I)})),p.jsx(y,{[m]:"",ref:T,children:R})});b.displayName=g;function w(C){const E=a(e+"CollectionConsumer",C);return x.useCallback(()=>{const R=E.collectionRef.current;if(!R)return[];const k=Array.from(R.querySelectorAll(`[${m}]`));return Array.from(E.itemMap.values()).sort((Q,j)=>k.indexOf(Q.ref.current)-k.indexOf(j.ref.current))},[E.collectionRef,E.itemMap])}return Vt(w,"useCollection"),[{Provider:c,Slot:f,ItemSlot:b},w,i]}Vt(Fd,"createCollection");var X0=new WeakMap,Lt,$n,Fp=($n=class extends Map{constructor(n){super(n);S0(this,Lt);Mp(this,Lt,[...super.keys()]),X0.set(this,!0)}set(n,i){return X0.get(this)&&(this.has(n)?an(this,Lt)[an(this,Lt).indexOf(n)]=n:an(this,Lt).push(n)),super.set(n,i),this}insert(n,i,o){const a=this.has(i),c=an(this,Lt).length,u=Hg(n);let h=u>=0?u:c+u;const f=h<0||h>=c?-1:h;if(f===this.size||a&&f===this.size-1||f===-1)return this.set(i,o),this;const g=this.size+(a?0:1);u<0&&h++;const m=[...an(this,Lt)];let y,b=!1;for(let w=h;w<g;w++)if(h===w){let C=m[w];m[w]===i&&(C=m[w+1]),a&&this.delete(i),y=this.get(C),this.set(i,o)}else{!b&&m[w-1]===i&&(b=!0);const C=m[b?w:w-1],E=y;y=this.get(C),this.delete(C),this.set(C,E)}return this}with(n,i,o){const a=new $n(this);return a.insert(n,i,o),a}before(n){const i=an(this,Lt).indexOf(n)-1;if(!(i<0))return this.entryAt(i)}setBefore(n,i,o){const a=an(this,Lt).indexOf(n);return a===-1?this:this.insert(a,i,o)}after(n){let i=an(this,Lt).indexOf(n);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(n,i,o){const a=an(this,Lt).indexOf(n);return a===-1?this:this.insert(a+1,i,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Mp(this,Lt,[]),super.clear()}delete(n){const i=super.delete(n);return i&&an(this,Lt).splice(an(this,Lt).indexOf(n),1),i}deleteAt(n){const i=this.keyAt(n);return i!==void 0?this.delete(i):!1}at(n){const i=ud(an(this,Lt),n);if(i!==void 0)return this.get(i)}entryAt(n){const i=ud(an(this,Lt),n);if(i!==void 0)return[i,this.get(i)]}indexOf(n){return an(this,Lt).indexOf(n)}keyAt(n){return ud(an(this,Lt),n)}from(n,i){const o=this.indexOf(n);if(o===-1)return;let a=o+i;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(n,i){const o=this.indexOf(n);if(o===-1)return;let a=o+i;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(n,i){let o=0;for(const a of this){if(Reflect.apply(n,i,[a,o,this]))return a;o++}}findIndex(n,i){let o=0;for(const a of this){if(Reflect.apply(n,i,[a,o,this]))return o;o++}return-1}filter(n,i){const o=[];let a=0;for(const c of this)Reflect.apply(n,i,[c,a,this])&&o.push(c),a++;return new $n(o)}map(n,i){const o=[];let a=0;for(const c of this)o.push([c[0],Reflect.apply(n,i,[c,a,this])]),a++;return new $n(o)}reduce(...n){const[i,o]=n;let a=0,c=o??this.at(0);for(const u of this)a===0&&n.length===1?c=u:c=Reflect.apply(i,this,[c,u,a,this]),a++;return c}reduceRight(...n){const[i,o]=n;let a=o??this.at(-1);for(let c=this.size-1;c>=0;c--){const u=this.at(c);c===this.size-1&&n.length===1?a=u:a=Reflect.apply(i,this,[a,u,c,this])}return a}toSorted(n){const i=[...this.entries()].sort(n);return new $n(i)}toReversed(){const n=new $n;for(let i=this.size-1;i>=0;i--){const o=this.keyAt(i),a=this.get(o);n.set(o,a)}return n}toSpliced(...n){const i=[...this.entries()];return i.splice(...n),new $n(i)}slice(n,i){const o=new $n;let a=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),i!==void 0&&i>0&&(a=i-1);for(let c=n;c<=a;c++){const u=this.keyAt(c),h=this.get(u);o.set(u,h)}return o}every(n,i){let o=0;for(const a of this){if(!Reflect.apply(n,i,[a,o,this]))return!1;o++}return!0}some(n,i){let o=0;for(const a of this){if(Reflect.apply(n,i,[a,o,this]))return!0;o++}return!1}},Lt=new WeakMap,Vt($n,"OrderedDict"),$n);function ud(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=U1(e,t);return n===-1?void 0:e[n]}Vt(ud,"at");function U1(e,t){const n=e.length,i=Hg(t),o=i>=0?i:n+i;return o<0||o>=n?-1:o}Vt(U1,"toSafeIndex");function Hg(e){return e!==e||e===0?0:Math.trunc(e)}Vt(Hg,"toSafeInteger");function PT(e){const t=e+"CollectionProvider",[n,i]=Xn(t),[o,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Fp,setItemMap:Vt(()=>{},"setItemMap")}),c=Vt(({state:k,...I})=>k?p.jsx(h,{...I,state:k}):p.jsx(u,{...I}),"CollectionProvider");c.displayName=t;const u=Vt(k=>{const I=E();return p.jsx(h,{...k,state:I})},"CollectionInit");u.displayName=t+"Init";const h=Vt(k=>{const{scope:I,children:T,state:Q}=k,j=x.useRef(null),[_,F]=x.useState(null),O=Le(j,F),[H,U]=Q;return x.useEffect(()=>{if(!_)return;const J=Y1(()=>{});return J.observe(_,{childList:!0,subtree:!0}),()=>{J.disconnect()}},[_]),p.jsx(o,{scope:I,itemMap:H,setItemMap:U,collectionRef:O,collectionRefObject:j,collectionElement:_,children:T})},"CollectionProviderImpl");h.displayName=t+"Impl";const f=e+"CollectionSlot",g=_r(f),m=x.forwardRef((k,I)=>{const{scope:T,children:Q}=k,j=a(f,T),_=Le(I,j.collectionRef);return p.jsx(g,{ref:_,children:Q})});m.displayName=f;const y=e+"CollectionItemSlot",b="data-radix-collection-item",w=_r(y),C=x.forwardRef((k,I)=>{const{scope:T,children:Q,...j}=k,_=x.useRef(null),[F,O]=x.useState(null),H=Le(I,_,O),U=a(y,T),{setItemMap:J}=U,Y=x.useRef(j);q1(Y.current,j)||(Y.current=j);const $=Y.current;return x.useEffect(()=>{const P=$;return J(V=>F?V.has(F)?V.set(F,{...P,element:F}).toSorted(Fm):(V.set(F,{...P,element:F}),V.toSorted(Fm)):V),()=>{J(V=>!F||!V.has(F)?V:(V.delete(F),new Fp(V)))}},[F,$,J]),p.jsx(w,{[b]:"",ref:H,children:Q})});C.displayName=y;function E(){return x.useState(new Fp)}Vt(E,"useInitCollection");function S(k){const{itemMap:I}=a(e+"CollectionConsumer",k);return I}return Vt(S,"useCollection"),[{Provider:c,Slot:m,ItemSlot:C},{createCollectionScope:i,useCollection:S,useInitCollection:E}]}Vt(PT,"createCollection");function q1(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||e[o]!==t[o])return!1;return!0}Vt(q1,"shallowEqual");function G1(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Vt(G1,"isElementPreceding");function Fm(e,t){return!e[1].element||!t[1].element?0:G1(e[1].element,t[1].element)?-1:1}Vt(Fm,"sortByDocumentPosition");function Y1(e){return new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){e();return}})}Vt(Y1,"getChildListObserver");var FT=Object.defineProperty,Ra=(e,t)=>FT(e,"name",{value:t,configurable:!0}),K1=!!(typeof window<"u"&&window.document&&window.document.createElement);function we(e,t,{checkForDefaultPrevented:n=!0}={}){return Ra(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}Ra(we,"composeEventHandlers");function HT(e){if(!K1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Ra(HT,"getOwnerWindow");function Hm(e){if(!K1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Ra(Hm,"getOwnerDocument");function $1(e,t=!1){const{activeElement:n}=Hm(e);if(!n?.nodeName)return null;if(V1(n)&&n.contentDocument)return $1(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const o=Hm(n).getElementById(i);if(o)return o}}return n}Ra($1,"getActiveElement");function V1(e){return e.tagName==="IFRAME"}Ra(V1,"isFrame");var vt=globalThis?.document?x.useLayoutEffect:()=>{},UT=Object.defineProperty,qT=(e,t)=>UT(e,"name",{value:t,configurable:!0}),W0=Ia[" useEffectEvent ".trim().toString()],Z0=Ia[" useInsertionEffect ".trim().toString()];function J1(e){if(typeof W0=="function")return W0(e);const t=x.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Z0=="function"?Z0(()=>{t.current=e}):vt(()=>{t.current=e}),x.useMemo(()=>((...n)=>t.current?.(...n)),[])}qT(J1,"useEffectEvent");var GT=Object.defineProperty,uc=(e,t)=>GT(e,"name",{value:t,configurable:!0}),YT=Ia[" useInsertionEffect ".trim().toString()]||vt;function hi({prop:e,defaultProp:t,onChange:n=uc(()=>{},"onChange"),caller:i}){const[o,a,c]=X1({defaultProp:t,onChange:n}),u=e!==void 0,h=u?e:o,f=x.useCallback(g=>{if(u){const m=W1(g)?g(e):g;m!==e&&c.current?.(m)}else a(g)},[u,e,a,c]);return[h,f]}uc(hi,"useControllableState");function X1({defaultProp:e,onChange:t}){const[n,i]=x.useState(e),o=x.useRef(n),a=x.useRef(t);return YT(()=>{a.current=t},[t]),x.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,i,a]}uc(X1,"useUncontrolledState");function W1(e){return typeof e=="function"}uc(W1,"isFunction");var ew=Symbol("RADIX:SYNC_STATE");function KT(e,t,n,i){const{prop:o,defaultProp:a,onChange:c,caller:u}=t,h=o!==void 0,f=J1(c),g=[{...n,state:a}];i&&g.push(i);const[m,y]=x.useReducer((E,S)=>{if(S.type===ew)return{...E,state:S.state};const R=e(E,S);return h&&!Object.is(R.state,E.state)&&f(R.state),R},...g),b=m.state,w=x.useRef(b);x.useEffect(()=>{w.current!==b&&(w.current=b,h||f(b))},[b,w,h]);const C=x.useMemo(()=>o!==void 0?{...m,state:o}:m,[m,o]);return x.useEffect(()=>{h&&!Object.is(o,m.state)&&y({type:ew,state:o})},[o,m.state,h]),[C,y]}uc(KT,"useControllableStateReducer");var $T=Object.defineProperty,pi=(e,t)=>$T(e,"name",{value:t,configurable:!0});function Z1(e,t){return x.useReducer((n,i)=>t[n][i]??n,e)}pi(Z1,"useStateMachine");var Mn=pi(e=>{const{present:t,children:n}=e,i=eE(t),o=typeof n=="function"?n({present:i.isPresent}):x.Children.only(n),a=tE(i.ref,nE(o));return typeof n=="function"||i.isPresent?x.cloneElement(o,{ref:a}):null},"Presence");function eE(e){const[t,n]=x.useState(),i=x.useRef(null),o=x.useRef(e),a=x.useRef("none"),c=x.useRef(void 0),u=e?"mounted":"unmounted",[h,f]=Z1(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{h==="mounted"?(a.current=c.current??ha(i.current),c.current=void 0):a.current="none"},[h]),vt(()=>{const g=i.current,m=o.current;if(m!==e){const b=a.current,w=ha(g);e?(c.current=w,f("MOUNT")):w==="none"||g?.display==="none"?f("UNMOUNT"):f(m&&b!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),vt(()=>{if(t){let g;const m=t.ownerDocument.defaultView??window,y=pi(w=>{const E=ha(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&E&&(f("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",g=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},"handleAnimationEnd"),b=pi(w=>{w.target===t&&(a.current=ha(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(g),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:x.useCallback(g=>{if(g){const m=getComputedStyle(g);i.current=m,c.current=ha(m)}else i.current=null;n(g)},[])}}pi(eE,"usePresence");function Um(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}pi(Um,"setRef");function tE(...e){const t=x.useRef(e);return t.current=e,x.useCallback(n=>{const i=t.current;let o=!1;const a=i.map(c=>{const u=Um(c,n);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let c=0;c<a.length;c++){const u=a[c];typeof u=="function"?u():Um(i[c],null)}}},[])}pi(tE,"useStableComposedRefs");function ha(e){return e?.animationName||"none"}pi(ha,"getAnimationName");function nE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pi(nE,"getElementRef");var VT=Object.defineProperty,JT=(e,t)=>VT(e,"name",{value:t,configurable:!0}),XT=Ia[" useId ".trim().toString()]||(()=>{}),WT=0;function rn(e){const[t,n]=x.useState(XT());return vt(()=>{e||n(i=>i??String(WT++))},[e]),e||(t?`radix-${t}`:"")}JT(rn,"useId");var ZT=Object.defineProperty,dc=(e,t)=>ZT(e,"name",{value:t,configurable:!0}),Ug="Collapsible",[ej,TY]=Xn(Ug),[tj,qg]=ej(Ug),nj=x.forwardRef(dc(function(t,n){const{__scopeCollapsible:i,open:o,defaultOpen:a,disabled:c,onOpenChange:u,...h}=t,[f,g]=hi({prop:o,defaultProp:a??!1,onChange:u,caller:Ug});return p.jsx(tj,{scope:i,disabled:c,contentId:rn(),open:f,onOpenToggle:x.useCallback(()=>g(m=>!m),[g]),children:p.jsx(Re.div,{"data-state":Hd(f),"data-disabled":c?"":void 0,...h,ref:n})})},"Collapsible")),rj="CollapsibleTrigger",ij=x.forwardRef(dc(function(t,n){const{__scopeCollapsible:i,...o}=t,a=qg(rj,i);return p.jsx(Re.button,{type:"button","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":Hd(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:n,onClick:we(t.onClick,a.onOpenToggle)})},"CollapsibleTrigger")),rE="CollapsibleContent",sj=x.forwardRef(dc(function(t,n){const{forceMount:i,...o}=t,a=qg(rE,t.__scopeCollapsible);return p.jsx(Mn,{present:i||a.open,children:({present:c})=>p.jsx(oj,{...o,ref:n,present:c})})},"CollapsibleContent")),oj=x.forwardRef(dc(function(t,n){const{__scopeCollapsible:i,present:o,children:a,...c}=t,u=qg(rE,i),[h,f]=x.useState(o),g=x.useRef(null),m=Le(n,g),y=x.useRef(0),b=y.current,w=x.useRef(0),C=w.current,E=u.open||h,S=x.useRef(E),R=x.useRef(void 0);return x.useEffect(()=>{const k=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(k)},[]),vt(()=>{const k=g.current;if(k){R.current=R.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const I=k.getBoundingClientRect();y.current=I.height,w.current=I.width,S.current||(k.style.transitionDuration=R.current.transitionDuration,k.style.animationName=R.current.animationName),f(o)}},[u.open,o]),p.jsx(Re.div,{"data-state":Hd(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!E,...c,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:E&&a})},"CollapsibleContentImpl"));function Hd(e){return e?"open":"closed"}dc(Hd,"getState");var aj=nj,lj=Object.defineProperty,cj=(e,t)=>lj(e,"name",{value:t,configurable:!0}),uj=x.createContext(void 0);function fc(e){const t=x.useContext(uj);return e||t||"ltr"}cj(fc,"useDirection");var dj=Object.defineProperty,fj=(e,t)=>dj(e,"name",{value:t,configurable:!0});function qt(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...n)=>t.current?.(...n)),[])}fj(qt,"useCallbackRef");var hj=Object.defineProperty,$t=(e,t)=>hj(e,"name",{value:t,configurable:!0}),qm="dismissableLayer.update",pj="dismissableLayer.pointerDownOutside",mj="dismissableLayer.focusOutside",tw,iE=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ud=x.forwardRef($t(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:h,onDismiss:f,...g}=t,m=x.useContext(iE),[y,b]=x.useState(null),w=y?.ownerDocument??globalThis?.document,[,C]=x.useState({}),E=Le(n,b),S=Array.from(m.layers),[R]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),k=R?S.indexOf(R):-1,I=y?S.indexOf(y):-1,T=m.layersWithOutsidePointerEventsDisabled.size>0,Q=I>=k,j=x.useRef(!1),_=oE(U=>{c?.(U),h?.(U),U.defaultPrevented||f?.()},{ownerDocument:w,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:j,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:x.useCallback(U=>{if(!(U instanceof Node))return!1;const J=[...m.branches].some(Y=>Y.contains(U));return Q&&!J},[m.branches,Q])}),F=aE(U=>{if(o&&j.current)return;const J=U.target;[...m.branches].some($=>$.contains(J))||(u?.(U),h?.(U),U.defaultPrevented||f?.())},w),O=y?I===S.length-1:!1,H=qt(U=>{U.key==="Escape"&&(a?.(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))});return x.useEffect(()=>{if(O)return w.addEventListener("keydown",H,{capture:!0}),()=>w.removeEventListener("keydown",H,{capture:!0})},[w,O,H]),x.useEffect(()=>{if(y)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(tw=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),Gm(),()=>{i&&(m.layersWithOutsidePointerEventsDisabled.delete(y),m.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=tw))}},[y,w,i,m]),x.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),Gm())},[y,m]),x.useEffect(()=>{const U=$t(()=>C({}),"handleUpdate");return document.addEventListener(qm,U),()=>document.removeEventListener(qm,U)},[]),p.jsx(Re.div,{...g,ref:E,style:{pointerEvents:T?Q?"auto":"none":void 0,...t.style},onFocusCapture:we(t.onFocusCapture,F.onFocusCapture),onBlurCapture:we(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:we(t.onPointerDownCapture,_.onPointerDownCapture)})},"DismissableLayer"));function sE(){const e=x.useContext(iE),[t,n]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}$t(sE,"useDismissableLayerSurface");var gj=$t(()=>!0,"IS_TRUE");function oE(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a,shouldHandlePointerDownOutside:c=gj}=t,u=qt(e),h=x.useRef(!1),f=x.useRef(!1),g=x.useRef(new Map),m=x.useRef(()=>{});return x.useEffect(()=>{function y(){f.current=!1,o.current=!1,g.current.clear()}$t(y,"resetOutsideInteraction");function b(){return Array.from(g.current.values()).some(Boolean)}$t(b,"isOutsideInteractionIntercepted");function w(k){if(!f.current)return;const I=k.target;I instanceof Node&&[...a].some(Q=>Q.contains(I))||g.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}$t(w,"handleInteractionCapture");function C(k){f.current&&g.current.set(k.type,!1)}$t(C,"handleInteractionBubble");const E=$t(k=>{if(k.target&&!h.current){let I=function(){n.removeEventListener("click",m.current);const Q=b();y(),Q||Gg(pj,u,T,{discrete:!0})};if($t(I,"handleAndDispatchPointerDownOutsideEvent"),!c(k.target)){n.removeEventListener("click",m.current),y(),h.current=!1;return}const T={originalEvent:k};f.current=!0,o.current=i&&k.button===0,g.current.clear(),!i||k.button!==0?I():(n.removeEventListener("click",m.current),m.current=I,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),y();h.current=!1},"handlePointerDown"),S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of S)n.addEventListener(k,w,!0),n.addEventListener(k,C);const R=window.setTimeout(()=>{n.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(R),n.removeEventListener("pointerdown",E),n.removeEventListener("click",m.current);for(const k of S)n.removeEventListener(k,w,!0),n.removeEventListener(k,C)}},[n,u,i,o,a,c]),{onPointerDownCapture:$t(()=>h.current=!0,"onPointerDownCapture")}}$t(oE,"usePointerDownOutside");function aE(e,t=globalThis?.document){const n=qt(e),i=x.useRef(!1);return x.useEffect(()=>{const o=$t(a=>{a.target&&!i.current&&Gg(mj,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:$t(()=>i.current=!0,"onFocusCapture"),onBlurCapture:$t(()=>i.current=!1,"onBlurCapture")}}$t(aE,"useFocusOutside");function Gm(){const e=new CustomEvent(qm);document.dispatchEvent(e)}$t(Gm,"dispatchUpdate");function Gg(e,t,n,{discrete:i}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?Fg(o,a):o.dispatchEvent(a)}$t(Gg,"handleAndDispatchCustomEvent");var Aj=Object.defineProperty,yn=(e,t)=>Aj(e,"name",{value:t,configurable:!0}),Hp="focusScope.autoFocusOnMount",Up="focusScope.autoFocusOnUnmount",nw={bubbles:!1,cancelable:!0},Yg=x.forwardRef(yn(function(t,n){const{loop:i=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...u}=t,[h,f]=x.useState(null),g=qt(a),m=qt(c),y=x.useRef(null),b=Le(n,f),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(o){let E=function(I){if(w.paused||!h)return;const T=I.target;h.contains(T)?y.current=T:ui(y.current,{select:!0})},S=function(I){if(w.paused||!h)return;const T=I.relatedTarget;T!==null&&(h.contains(T)||ui(y.current,{select:!0}))},R=function(I){if(document.activeElement===document.body)for(const Q of I)Q.removedNodes.length>0&&ui(h)};yn(E,"handleFocusIn"),yn(S,"handleFocusOut"),yn(R,"handleMutations"),document.addEventListener("focusin",E),document.addEventListener("focusout",S);const k=new MutationObserver(R);return h&&k.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",S),k.disconnect()}}},[o,h,w.paused]),x.useEffect(()=>{if(h){rw.add(w);const E=document.activeElement;if(!h.contains(E)){const R=new CustomEvent(Hp,nw);h.addEventListener(Hp,g),h.dispatchEvent(R),R.defaultPrevented||(lE(hE(Kg(h)),{select:!0}),document.activeElement===E&&ui(h))}return()=>{h.removeEventListener(Hp,g),setTimeout(()=>{const R=new CustomEvent(Up,nw);h.addEventListener(Up,m),h.dispatchEvent(R),R.defaultPrevented||ui(E??document.body,{select:!0}),h.removeEventListener(Up,m),rw.remove(w)},0)}}},[h,g,m,w]);const C=x.useCallback(E=>{if(!i&&!o||w.paused)return;const S=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(S&&R){const k=E.currentTarget,[I,T]=cE(k);I&&T?!E.shiftKey&&R===T?(E.preventDefault(),i&&ui(I,{select:!0})):E.shiftKey&&R===I&&(E.preventDefault(),i&&ui(T,{select:!0})):R===k&&E.preventDefault()}},[i,o,w.paused]);return p.jsx(Re.div,{tabIndex:-1,...u,ref:b,onKeyDown:C})},"FocusScope"));function lE(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(ui(i,{select:t}),document.activeElement!==n)return}yn(lE,"focusFirst");function cE(e){const t=Kg(e),n=Ym(t,e),i=Ym(t.reverse(),e);return[n,i]}yn(cE,"getTabbableEdges");function Kg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:yn(i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}yn(Kg,"getTabbableCandidates");function Ym(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):uE(i,{upTo:t})))return i}yn(Ym,"findVisible");function uE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}yn(uE,"isHidden");function dE(e){return e instanceof HTMLInputElement&&"select"in e}yn(dE,"isSelectableInput");function ui(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dE(e)&&t&&e.select()}}yn(ui,"focus");var rw=fE();function fE(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Km(e,t),e.unshift(t)},remove(t){e=Km(e,t),e[0]?.resume()}}}yn(fE,"createFocusScopesStack");function Km(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}yn(Km,"arrayRemove");function hE(e){return e.filter(t=>t.tagName!=="A")}yn(hE,"removeLinks");var yj=Object.defineProperty,vj=(e,t)=>yj(e,"name",{value:t,configurable:!0}),qd=x.forwardRef(vj(function(t,n){const{container:i,...o}=t,[a,c]=x.useState(!1);vt(()=>c(!0),[]);const u=i||a&&globalThis?.document?.body;return u?oo.createPortal(p.jsx(Re.div,{...o,ref:n}),u):null},"Portal")),bj=Object.defineProperty,$g=(e,t)=>bj(e,"name",{value:t,configurable:!0}),Hu=0,sa=null;function xj(e){return hc(),e.children}$g(xj,"FocusGuards");function hc(){x.useEffect(()=>{sa||(sa={start:$m(),end:$m()});const{start:e,end:t}=sa;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Hu++,()=>{Hu===1&&(sa?.start.remove(),sa?.end.remove(),sa=null),Hu=Math.max(0,Hu-1)}},[])}$g(hc,"useFocusGuards");function $m(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}$g($m,"createFocusGuard");var Dr=function(){return Dr=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dr.apply(this,arguments)};function pE(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]]);return n}function wj(e,t,n){if(n||arguments.length===2)for(var i=0,o=t.length,a;i<o;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var dd="right-scroll-bar-position",fd="width-before-scroll-bar",Cj="with-scroll-bars-hidden",Ej="--removed-body-scroll-bar-size";function qp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sj(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=t,n.facade}var kj=typeof window<"u"?x.useLayoutEffect:x.useEffect,iw=new WeakMap;function Bj(e,t){var n=Sj(null,function(i){return e.forEach(function(o){return qp(o,i)})});return kj(function(){var i=iw.get(n);if(i){var o=new Set(i),a=new Set(e),c=n.current;o.forEach(function(u){a.has(u)||qp(u,null)}),a.forEach(function(u){o.has(u)||qp(u,c)})}iw.set(n,e)},[e]),n}function Ij(e){return e}function Rj(e,t){t===void 0&&(t=Ij);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,i);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(a){for(i=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){i=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(a),c=n}var h=function(){var g=c;c=[],g.forEach(a)},f=function(){return Promise.resolve().then(h)};f(),n={push:function(g){c.push(g),f()},filter:function(g){return c=c.filter(g),n}}}};return o}function Qj(e){e===void 0&&(e={});var t=Rj(null);return t.options=Dr({async:!0,ssr:!1},e),t}var mE=function(e){var t=e.sideCar,n=pE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,Dr({},n))};mE.isSideCarExport=!0;function Tj(e,t){return e.useMedium(t),mE}var gE=Qj(),Gp=function(){},Gd=x.forwardRef(function(e,t){var n=x.useRef(null),i=x.useState({onScrollCapture:Gp,onWheelCapture:Gp,onTouchMoveCapture:Gp}),o=i[0],a=i[1],c=e.forwardProps,u=e.children,h=e.className,f=e.removeScrollBar,g=e.enabled,m=e.shards,y=e.sideCar,b=e.noRelative,w=e.noIsolation,C=e.inert,E=e.allowPinchZoom,S=e.as,R=S===void 0?"div":S,k=e.gapMode,I=pE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=y,Q=Bj([n,t]),j=Dr(Dr({},I),o);return x.createElement(x.Fragment,null,g&&x.createElement(T,{sideCar:gE,removeScrollBar:f,shards:m,noRelative:b,noIsolation:w,inert:C,setCallbacks:a,allowPinchZoom:!!E,lockRef:n,gapMode:k}),c?x.cloneElement(x.Children.only(u),Dr(Dr({},j),{ref:Q})):x.createElement(R,Dr({},j,{className:h,ref:Q}),u))});Gd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gd.classNames={fullWidth:fd,zeroRight:dd};var jj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jj();return t&&e.setAttribute("nonce",t),e}function Mj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _j=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Dj())&&(Mj(t,n),Nj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Oj=function(){var e=_j();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},AE=function(){var e=Oj(),t=function(n){var i=n.styles,o=n.dynamic;return e(i,o),null};return t},zj={left:0,top:0,right:0,gap:0},Yp=function(e){return parseInt(e||"",10)||0},Lj=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yp(n),Yp(i),Yp(o)]},Pj=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zj;var t=Lj(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},Fj=AE(),ya="data-scroll-locked",Hj=function(e,t,n,i){var o=e.left,a=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
10
|
+
.`.concat(Cj,` {
|
|
11
|
+
overflow: hidden `).concat(i,`;
|
|
12
|
+
padding-right: `).concat(u,"px ").concat(i,`;
|
|
13
|
+
}
|
|
14
|
+
body[`).concat(ya,`] {
|
|
15
|
+
overflow: hidden `).concat(i,`;
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
18
|
+
padding-left: `.concat(o,`px;
|
|
19
|
+
padding-top: `).concat(a,`px;
|
|
20
|
+
padding-right: `).concat(c,`px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: `).concat(u,"px ").concat(i,`;
|
|
24
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(dd,` {
|
|
28
|
+
right: `).concat(u,"px ").concat(i,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(fd,` {
|
|
32
|
+
margin-right: `).concat(u,"px ").concat(i,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.`).concat(dd," .").concat(dd,` {
|
|
36
|
+
right: 0 `).concat(i,`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.`).concat(fd," .").concat(fd,` {
|
|
40
|
+
margin-right: 0 `).concat(i,`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[`).concat(ya,`] {
|
|
44
|
+
`).concat(Ej,": ").concat(u,`px;
|
|
45
|
+
}
|
|
46
|
+
`)},sw=function(){var e=parseInt(document.body.getAttribute(ya)||"0",10);return isFinite(e)?e:0},Uj=function(){x.useEffect(function(){return document.body.setAttribute(ya,(sw()+1).toString()),function(){var e=sw()-1;e<=0?document.body.removeAttribute(ya):document.body.setAttribute(ya,e.toString())}},[])},qj=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,o=i===void 0?"margin":i;Uj();var a=x.useMemo(function(){return Pj(o)},[o]);return x.createElement(Fj,{styles:Hj(a,!t,o,n?"":"!important")})},Vm=!1;if(typeof window<"u")try{var Uu=Object.defineProperty({},"passive",{get:function(){return Vm=!0,!0}});window.addEventListener("test",Uu,Uu),window.removeEventListener("test",Uu,Uu)}catch{Vm=!1}var oa=Vm?{passive:!1}:!1,Gj=function(e){return e.tagName==="TEXTAREA"},yE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gj(e)&&n[t]==="visible")},Yj=function(e){return yE(e,"overflowY")},Kj=function(e){return yE(e,"overflowX")},ow=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=vE(e,i);if(o){var a=bE(e,i),c=a[1],u=a[2];if(c>u)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},$j=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},Vj=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},vE=function(e,t){return e==="v"?Yj(t):Kj(t)},bE=function(e,t){return e==="v"?$j(t):Vj(t)},Jj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xj=function(e,t,n,i,o){var a=Jj(e,window.getComputedStyle(t).direction),c=a*i,u=n.target,h=t.contains(u),f=!1,g=c>0,m=0,y=0;do{if(!u)break;var b=bE(e,u),w=b[0],C=b[1],E=b[2],S=C-E-a*w;(w||S)&&vE(e,u)&&(m+=S,y+=w);var R=u.parentNode;u=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!h&&u!==document.body||h&&(t.contains(u)||t===u));return(g&&Math.abs(m)<1||!g&&Math.abs(y)<1)&&(f=!0),f},qu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aw=function(e){return[e.deltaX,e.deltaY]},lw=function(e){return e&&"current"in e?e.current:e},Wj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zj=function(e){return`
|
|
47
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
49
|
+
`)},eD=0,aa=[];function tD(e){var t=x.useRef([]),n=x.useRef([0,0]),i=x.useRef(),o=x.useState(eD++)[0],a=x.useState(AE)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=wj([e.lockRef.current],(e.shards||[]).map(lw),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var S=qu(C),R=n.current,k="deltaX"in C?C.deltaX:R[0]-S[0],I="deltaY"in C?C.deltaY:R[1]-S[1],T,Q=C.target,j=Math.abs(k)>Math.abs(I)?"h":"v";if("touches"in C&&j==="h"&&Q.type==="range")return!1;var _=window.getSelection(),F=_&&_.anchorNode,O=F?F===Q||F.contains(Q):!1;if(O)return!1;var H=ow(j,Q);if(!H)return!0;if(H?T=j:(T=j==="v"?"h":"v",H=ow(j,Q)),!H)return!1;if(!i.current&&"changedTouches"in C&&(k||I)&&(i.current=T),!T)return!0;var U=i.current||T;return Xj(U,E,C,U==="h"?k:I)},[]),h=x.useCallback(function(C){var E=C;if(!(!aa.length||aa[aa.length-1]!==a)){var S="deltaY"in E?aw(E):qu(E),R=t.current.filter(function(T){return T.name===E.type&&(T.target===E.target||E.target===T.shadowParent)&&Wj(T.delta,S)})[0];if(R&&R.should){E.cancelable&&E.preventDefault();return}if(!R){var k=(c.current.shards||[]).map(lw).filter(Boolean).filter(function(T){return T.contains(E.target)}),I=k.length>0?u(E,k[0]):!c.current.noIsolation;I&&E.cancelable&&E.preventDefault()}}},[]),f=x.useCallback(function(C,E,S,R){var k={name:C,delta:E,target:S,should:R,shadowParent:nD(S)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(I){return I!==k})},1)},[]),g=x.useCallback(function(C){n.current=qu(C),i.current=void 0},[]),m=x.useCallback(function(C){f(C.type,aw(C),C.target,u(C,e.lockRef.current))},[]),y=x.useCallback(function(C){f(C.type,qu(C),C.target,u(C,e.lockRef.current))},[]);x.useEffect(function(){return aa.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:y}),document.addEventListener("wheel",h,oa),document.addEventListener("touchmove",h,oa),document.addEventListener("touchstart",g,oa),function(){aa=aa.filter(function(C){return C!==a}),document.removeEventListener("wheel",h,oa),document.removeEventListener("touchmove",h,oa),document.removeEventListener("touchstart",g,oa)}},[]);var b=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(a,{styles:Zj(o)}):null,b?x.createElement(qj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rD=Tj(gE,tD);var Yd=x.forwardRef(function(e,t){return x.createElement(Gd,Dr({},e,{ref:t,sideCar:rD}))});Yd.classNames=Gd.classNames;var iD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},la=new WeakMap,Gu=new WeakMap,Yu={},Kp=0,xE=function(e){return e&&(e.host||xE(e.parentNode))},sD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=xE(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},oD=function(e,t,n,i){var o=sD(t,Array.isArray(e)?e:[e]);Yu[n]||(Yu[n]=new WeakMap);var a=Yu[n],c=[],u=new Set,h=new Set(o),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};o.forEach(f);var g=function(m){!m||h.has(m)||Array.prototype.forEach.call(m.children,function(y){if(u.has(y))g(y);else try{var b=y.getAttribute(i),w=b!==null&&b!=="false",C=(la.get(y)||0)+1,E=(a.get(y)||0)+1;la.set(y,C),a.set(y,E),c.push(y),C===1&&w&&Gu.set(y,!0),E===1&&y.setAttribute(n,"true"),w||y.setAttribute(i,"true")}catch(S){console.error("aria-hidden: cannot operate on ",y,S)}})};return g(t),u.clear(),Kp++,function(){c.forEach(function(m){var y=la.get(m)-1,b=a.get(m)-1;la.set(m,y),a.set(m,b),y||(Gu.has(m)||m.removeAttribute(i),Gu.delete(m)),b||m.removeAttribute(n)}),Kp--,Kp||(la=new WeakMap,la=new WeakMap,Gu=new WeakMap,Yu={})}},Vg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=iD(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),oD(i,o,n,"aria-hidden")):function(){return null}},aD=Object.defineProperty,pr=(e,t)=>aD(e,"name",{value:t,configurable:!0}),Jg="Dialog",[wE,jY]=Xn(Jg),[lD,Pr]=wE(Jg),CE=pr(e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,u=x.useRef(null),h=x.useRef(null),[f,g]=hi({prop:i,defaultProp:o??!1,onChange:a,caller:Jg}),[m,y]=x.useState(0),[b,w]=x.useState(0);return p.jsx(lD,{scope:t,triggerRef:u,contentRef:h,contentId:rn(),titleId:rn(),descriptionId:rn(),titlePresent:m>0,descriptionPresent:b>0,setTitleCount:y,setDescriptionCount:w,open:f,onOpenChange:g,onOpenToggle:x.useCallback(()=>g(C=>!C),[g]),modal:c,children:n})},"Dialog"),EE="DialogPortal",[cD,SE]=wE(EE,{forceMount:void 0}),kE=pr(e=>{const{__scopeDialog:t,forceMount:n,children:i,container:o}=e,a=Pr(EE,t);return p.jsx(cD,{scope:t,forceMount:n,children:x.Children.map(i,c=>p.jsx(Mn,{present:n||a.open,children:p.jsx(qd,{asChild:!0,container:o,children:c})}))})},"DialogPortal"),Jm="DialogOverlay",BE=x.forwardRef(pr(function(t,n){const i=SE(Jm,t.__scopeDialog),{forceMount:o=i.forceMount,...a}=t,c=Pr(Jm,t.__scopeDialog);return c.modal?p.jsx(Mn,{present:o||c.open,children:p.jsx(dD,{...a,ref:n})}):null},"DialogOverlay")),uD=_r("DialogOverlay.RemoveScroll"),dD=x.forwardRef(pr(function(t,n){const{__scopeDialog:i,...o}=t,a=Pr(Jm,i),c=sE(),u=Le(n,c);return p.jsx(Yd,{as:uD,allowPinchZoom:!0,shards:[a.contentRef],children:p.jsx(Re.div,{"data-state":Xg(a.open),...o,ref:u,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Vl="DialogContent",IE=x.forwardRef(pr(function(t,n){const i=SE(Vl,t.__scopeDialog),{forceMount:o=i.forceMount,...a}=t,c=Pr(Vl,t.__scopeDialog);return p.jsx(Mn,{present:o||c.open,children:c.modal?p.jsx(fD,{...a,ref:n}):p.jsx(hD,{...a,ref:n})})},"DialogContent")),fD=x.forwardRef(pr(function(t,n){const i=Pr(Vl,t.__scopeDialog),o=x.useRef(null),a=Le(n,i.contentRef,o);return x.useEffect(()=>{const c=o.current;if(c)return Vg(c)},[]),p.jsx(RE,{...t,ref:a,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:we(t.onCloseAutoFocus,c=>{c.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:we(t.onPointerDownOutside,c=>{const u=c.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0;(u.button===2||h)&&c.preventDefault()}),onFocusOutside:we(t.onFocusOutside,c=>c.preventDefault())})},"DialogContentModal")),hD=x.forwardRef(pr(function(t,n){const i=Pr(Vl,t.__scopeDialog),o=x.useRef(!1),a=x.useRef(!1);return p.jsx(RE,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||i.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=c.target;i.triggerRef.current?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.current&&c.preventDefault()}})},"DialogContentNonModal")),RE=x.forwardRef(pr(function(t,n){const{__scopeDialog:i,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:c,...u}=t,h=Pr(Vl,i);return hc(),p.jsx(p.Fragment,{children:p.jsx(Yg,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:c,children:p.jsx(Ud,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":Xg(h.open),...u,ref:n,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),pD="DialogTitle",mD=x.forwardRef(pr(function(t,n){const{__scopeDialog:i,...o}=t,a=Pr(pD,i),{setTitleCount:c}=a;return vt(()=>(c(u=>u+1),()=>c(u=>u-1)),[c]),p.jsx(Re.h2,{id:a.titleId,...o,ref:n})},"DialogTitle")),gD="DialogDescription",AD=x.forwardRef(pr(function(t,n){const{__scopeDialog:i,...o}=t,a=Pr(gD,i),{setDescriptionCount:c}=a;return vt(()=>(c(u=>u+1),()=>c(u=>u-1)),[c]),p.jsx(Re.p,{id:a.descriptionId,...o,ref:n})},"DialogDescription")),yD="DialogClose",vD=x.forwardRef(pr(function(t,n){const{__scopeDialog:i,...o}=t,a=Pr(yD,i);return p.jsx(Re.button,{type:"button",...o,ref:n,onClick:we(t.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function Xg(e){return e?"open":"closed"}pr(Xg,"getState");var bD=Object.defineProperty,xD=(e,t)=>bD(e,"name",{value:t,configurable:!0});function Wg(e){const[t,n]=x.useState(void 0);return vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let c,u;if("borderBoxSize"in a){const h=a.borderBoxSize,f=Array.isArray(h)?h[0]:h;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}xD(Wg,"useSize");const wD=["top","right","bottom","left"],os=Math.min,di=Math.max,vd=Math.round,Ku=Math.floor,fi=e=>({x:e,y:e}),CD={left:"right",right:"left",bottom:"top",top:"bottom"};function QE(e,t,n){return di(e,os(t,n))}function mi(e,t){return typeof e=="function"?e(t):e}function as(e){return e.split("-")[0]}function Qa(e){return e.split("-")[1]}function Zg(e){return e==="x"?"y":"x"}function eA(e){return e==="y"?"height":"width"}function Mr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tA(e){return Zg(Mr(e))}function ED(e,t,n){n===void 0&&(n=!1);const i=Qa(e),o=tA(e),a=eA(o);let c=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=bd(c)),[c,bd(c)]}function SD(e){const t=bd(e);return[Xm(e),t,Xm(t)]}function Xm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cw=["left","right"],uw=["right","left"],kD=["top","bottom"],BD=["bottom","top"];function ID(e,t,n){switch(e){case"top":case"bottom":return n?t?uw:cw:t?cw:uw;case"left":case"right":return t?kD:BD;default:return[]}}function RD(e,t,n,i){const o=Qa(e);let a=ID(as(e),n==="start",i);return o&&(a=a.map(c=>c+"-"+o),t&&(a=a.concat(a.map(Xm)))),a}function bd(e){const t=as(e);return CD[t]+e.slice(t.length)}function QD(e){var t,n,i,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(o=e.left)!=null?o:0}}function TE(e){return typeof e!="number"?QD(e):{top:e,right:e,bottom:e,left:e}}function xd(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function dw(e,t,n){let{reference:i,floating:o}=e;const a=Mr(t),c=tA(t),u=eA(c),h=as(t),f=a==="y",g=i.x+i.width/2-o.width/2,m=i.y+i.height/2-o.height/2,y=i[u]/2-o[u]/2;let b;switch(h){case"top":b={x:g,y:i.y-o.height};break;case"bottom":b={x:g,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:m};break;case"left":b={x:i.x-o.width,y:m};break;default:b={x:i.x,y:i.y}}const w=Qa(t);return w&&(b[c]+=y*(w==="end"?1:-1)*(n&&f?-1:1)),b}async function TD(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:a,rects:c,elements:u,strategy:h}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:y=!1,padding:b=0}=mi(t,e),w=TE(b),E=u[y?m==="floating"?"reference":"floating":m],S=xd(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:g,strategy:h})),R=m==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),I=await(a.isElement==null?void 0:a.isElement(k))&&await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1},T=xd(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:k,strategy:h}):R);return{top:(S.top-T.top+w.top)/I.y,bottom:(T.bottom-S.bottom+w.bottom)/I.y,left:(S.left-T.left+w.left)/I.x,right:(T.right-S.right+w.right)/I.x}}const jD=50,DD=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:TD},h=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:m}=dw(f,i,h),y=i,b=0;const w={};for(let C=0;C<a.length;C++){const E=a[C];if(!E)continue;const{name:S,fn:R}=E,{x:k,y:I,data:T,reset:Q}=await R({x:g,y:m,initialPlacement:i,placement:y,strategy:o,middlewareData:w,rects:f,platform:u,elements:{reference:e,floating:t}});g=k??g,m=I??m,w[S]={...w[S],...T},Q&&b<jD&&(b++,typeof Q=="object"&&(Q.placement&&(y=Q.placement),Q.rects&&(f=Q.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):Q.rects),{x:g,y:m}=dw(f,y,h)),C=-1)}return{x:g,y:m,placement:y,strategy:o,middlewareData:w}},MD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:a,platform:c,elements:u,middlewareData:h}=t,{element:f,padding:g=0}=mi(e,t)||{};if(f==null)return{};const m=TE(g),y={x:n,y:i},b=tA(o),w=eA(b),C=await c.getDimensions(f),E=b==="y",S=E?"top":"left",R=E?"bottom":"right",k=E?"clientHeight":"clientWidth",I=a.reference[w]+a.reference[b]-y[b]-a.floating[w],T=y[b]-a.reference[b],Q=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let j=Q?Q[k]:0;(!j||!await(c.isElement==null?void 0:c.isElement(Q)))&&(j=u.floating[k]||a.floating[w]);const _=I/2-T/2,F=j/2-C[w]/2-1,O=os(m[S],F),H=os(m[R],F),U=j-C[w]-H,J=j/2-C[w]/2+_,Y=QE(O,J,U),$=!h.arrow&&Qa(o)!=null&&J!==Y&&a.reference[w]/2-(J<O?O:H)-C[w]/2<0,P=$?J<O?J-O:J-U:0;return{[b]:y[b]+P,data:{[b]:Y,centerOffset:J-Y-P,...$&&{alignmentOffset:P}},reset:$}}}),ND=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:a,rects:c,initialPlacement:u,platform:h,elements:f}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=mi(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=as(o),R=Mr(u),k=as(u)===u,I=await(h.isRTL==null?void 0:h.isRTL(f.floating)),T=y||(k||!C?[bd(u)]:SD(u)),Q=w!=="none";!y&&Q&&T.push(...RD(u,C,w,I));const j=[u,...T],_=await h.detectOverflow(t,E),F=[];let O=((i=a.flip)==null?void 0:i.overflows)||[];if(g&&F.push(_[S]),m){const Y=ED(o,c,I);F.push(_[Y[0]],_[Y[1]])}if(O=[...O,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var H,U;const Y=(((H=a.flip)==null?void 0:H.index)||0)+1,$=j[Y];if($&&(!(m==="alignment"?R!==Mr($):!1)||O.every(ie=>Mr(ie.placement)===R?ie.overflows[0]>0:!0)))return{data:{index:Y,overflows:O},reset:{placement:$}};let P=(U=O.filter(V=>V.overflows[0]<=0).sort((V,ie)=>V.overflows[1]-ie.overflows[1])[0])==null?void 0:U.placement;if(!P)switch(b){case"bestFit":{var J;const V=(J=O.filter(ie=>{if(Q){const de=Mr(ie.placement);return de===R||de==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(de=>de>0).reduce((de,D)=>de+D,0)]).sort((ie,de)=>ie[1]-de[1])[0])==null?void 0:J[0];V&&(P=V);break}case"initialPlacement":P=u;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function fw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hw(e){return wD.some(t=>e[t]>=0)}const _D=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...a}=mi(e,t);switch(o){case"referenceHidden":{const c=await i.detectOverflow(t,{...a,elementContext:"reference"}),u=fw(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:hw(u)}}}case"escaped":{const c=await i.detectOverflow(t,{...a,altBoundary:!0}),u=fw(c,n.floating);return{data:{escapedOffsets:u,escaped:hw(u)}}}default:return{}}}}},jE=new Set(["left","top"]);async function OD(e,t){const{placement:n,platform:i,elements:o}=e,a=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=as(n),u=Qa(n),h=Mr(n)==="y",f=jE.has(c)?-1:1,g=a&&h?-1:1,m=mi(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof w=="number"&&(b=u==="end"?w*-1:w),h?{x:b*g,y:y*f}:{x:y*f,y:b*g}}const zD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:a,placement:c,middlewareData:u}=t,h=await OD(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:a+h.y,data:{...h,placement:c}}}}},LD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o,platform:a}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:h={fn:R=>{let{x:k,y:I}=R;return{x:k,y:I}}},...f}=mi(e,t),g={x:n,y:i},m=await a.detectOverflow(t,f),y=Mr(o),b=Zg(y);let w=g[b],C=g[y];const E=(R,k)=>QE(k+m[R==="y"?"top":"left"],k,k-m[R==="y"?"bottom":"right"]);c&&(w=E(b,w)),u&&(C=E(y,C));const S=h.fn({...t,[b]:w,[y]:C});return{...S,data:{x:S.x-n,y:S.y-i,enabled:{[b]:c,[y]:u}}}}}},PD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:o,y:a,placement:c,rects:u,middlewareData:h}=t,{offset:f=0,mainAxis:g=!0,crossAxis:m=!0}=mi(e,t),y={x:o,y:a},b=Mr(c),w=Zg(b);let C=y[w],E=y[b];const S=mi(f,t),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(i=S.crossAxis)!=null?i:0};if(g){const T=w==="y"?"height":"width",Q=u.reference[w]-u.floating[T]+R.mainAxis,j=u.reference[w]+u.reference[T]-R.mainAxis;C<Q?C=Q:C>j&&(C=j)}if(m){var k,I;const T=w==="y"?"width":"height",Q=jE.has(as(c)),j=u.reference[b]-u.floating[T]+(Q&&((k=h.offset)==null?void 0:k[b])||0)+(Q?0:R.crossAxis),_=u.reference[b]+u.reference[T]+(Q?0:((I=h.offset)==null?void 0:I[b])||0)-(Q?R.crossAxis:0);E<j?E=j:E>_&&(E=_)}return{[w]:C,[b]:E}}}},FD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:o,elements:a}=t,{apply:c=()=>{},...u}=mi(e,t),h=await o.detectOverflow(t,u),f=as(n),g=Qa(n),m=Mr(n)==="y",{width:y,height:b}=i.floating;let w,C;f==="top"||f==="bottom"?(w=f,C=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(C=f,w=g==="end"?"top":"bottom");const E=b-h.top-h.bottom,S=y-h.left-h.right,R=os(b-h[w],E),k=os(y-h[C],S),I=t.middlewareData.shift,T=!I;let Q=R,j=k;I!=null&&I.enabled.x&&(j=S),I!=null&&I.enabled.y&&(Q=E),T&&!g&&(m?j=y-2*di(h.left,h.right):Q=b-2*di(h.top,h.bottom)),await c({...t,availableWidth:j,availableHeight:Q});const _=await o.getDimensions(a.floating);return y!==_.width||b!==_.height?{reset:{rects:!0}}:{}}}};function Kd(){return typeof window<"u"}function Ta(e){return DE(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vi(e){var t;return(t=(DE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function DE(e){return Kd()?e instanceof Node||e instanceof jn(e).Node:!1}function Or(e){return Kd()?e instanceof Element||e instanceof jn(e).Element:!1}function ds(e){return Kd()?e instanceof HTMLElement||e instanceof jn(e).HTMLElement:!1}function pw(e){return!Kd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}function $d(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&o!=="inline"&&o!=="contents"}function HD(e){return/^(table|td|th)$/.test(Ta(e))}function Vd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const UD=/transform|translate|scale|rotate|perspective|filter/,qD=/paint|layout|strict|content/,zs=e=>!!e&&e!=="none";let $p;function nA(e){const t=Or(e)?zr(e):e;return zs(t.transform)||zs(t.translate)||zs(t.scale)||zs(t.rotate)||zs(t.perspective)||!rA()&&(zs(t.backdropFilter)||zs(t.filter))||UD.test(t.willChange||"")||qD.test(t.contain||"")}function GD(e){let t=$s(e);for(;ds(t)&&!Jl(t);){if(nA(t))return t;if(Vd(t))return null;t=$s(t)}return null}function rA(){return $p==null&&($p=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$p}function Jl(e){return/^(html|body|#document)$/.test(Ta(e))}function zr(e){return jn(e).getComputedStyle(e)}function Jd(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $s(e){if(Ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pw(e)&&e.host||vi(e);return pw(t)?t.host:t}function ME(e){const t=$s(e);return Jl(t)?(e.ownerDocument||e).body:ds(t)&&$d(t)?t:ME(t)}function Xl(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ME(e),a=o===((i=e.ownerDocument)==null?void 0:i.body),c=jn(o);if(a){const u=Wm(c);return t.concat(c,c.visualViewport||[],$d(o)?o:[],u&&n?Xl(u):[])}else return t.concat(o,Xl(o,[],n))}function Wm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function NE(e){const t=zr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=ds(e),a=o?e.offsetWidth:n,c=o?e.offsetHeight:i,u=vd(n)!==a||vd(i)!==c;return u&&(n=a,i=c),{width:n,height:i,$:u}}function iA(e){return Or(e)?e:e.contextElement}function va(e){const t=iA(e);if(!ds(t))return fi(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:a}=NE(t);let c=(a?vd(n.width):n.width)/i,u=(a?vd(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const YD=fi(0);function _E(e){const t=jn(e);return!rA()||!t.visualViewport?YD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===jn(e)}function Vs(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=iA(e);let c=fi(1);t&&(i?Or(i)&&(c=va(i)):c=va(e));const u=KD(a,n,i)?_E(a):fi(0);let h=(o.left+u.x)/c.x,f=(o.top+u.y)/c.y,g=o.width/c.x,m=o.height/c.y;if(a&&i){const y=jn(a),b=Or(i)?jn(i):i;let w=y,C=Wm(w);for(;C&&b!==w;){const E=va(C),S=C.getBoundingClientRect(),R=zr(C),k=S.left+(C.clientLeft+parseFloat(R.paddingLeft))*E.x,I=S.top+(C.clientTop+parseFloat(R.paddingTop))*E.y;h*=E.x,f*=E.y,g*=E.x,m*=E.y,h+=k,f+=I,w=jn(C),C=Wm(w)}}return xd({width:g,height:m,x:h,y:f})}function Xd(e,t){const n=Jd(e).scrollLeft;return t?t.left+n:Vs(vi(e)).left+n}function OE(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Xd(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function $D(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const a=o==="fixed",c=vi(i),u=t?Vd(t.floating):!1;if(i===c||u&&a)return n;let h={scrollLeft:0,scrollTop:0},f=fi(1);const g=fi(0),m=ds(i);if((m||!a)&&((Ta(i)!=="body"||$d(c))&&(h=Jd(i)),m)){const b=Vs(i);f=va(i),g.x=b.x+i.clientLeft,g.y=b.y+i.clientTop}const y=c&&!m&&!a?OE(c,h):fi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-h.scrollLeft*f.x+g.x+y.x,y:n.y*f.y-h.scrollTop*f.y+g.y+y.y}}function VD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function JD(e){const t=Jd(e),n=e.ownerDocument.body,i=di(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=di(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Xd(e);const c=-t.scrollTop;return zr(n).direction==="rtl"&&(a+=di(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:c}}const XD=25;function WD(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",o=jn(e),a=vi(e),c=o.visualViewport;let u=a.clientWidth,h=a.clientHeight,f=0,g=0;if(c){const y=!rA()||t==="fixed";i?y||(f=-c.offsetLeft,g=-c.offsetTop):(u=c.width,h=c.height,y&&(f=c.offsetLeft,g=c.offsetTop))}if(Xd(a)<=0){const y=a.ownerDocument,b=y.body,w=getComputedStyle(b),C=y.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(a.clientWidth-b.clientWidth-C),S=getComputedStyle(a).scrollbarGutter==="stable both-edges"?E/2:E;S<=XD&&(u-=S)}return{width:u,height:h,x:f,y:g}}function ZD(e,t){const n=Vs(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,a=va(e),c=e.clientWidth*a.x,u=e.clientHeight*a.y,h=o*a.x,f=i*a.y;return{width:c,height:u,x:h,y:f}}function mw(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=WD(e,n,t);else if(t==="document")i=JD(vi(e));else if(Or(t))i=ZD(t,n);else{const o=_E(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xd(i)}function eM(e,t){const n=t.get(e);if(n)return n;let i=Xl(e,[],!1).filter(u=>Or(u)&&Ta(u)!=="body"),o=null;const a=zr(e).position==="fixed";let c=a?$s(e):e;for(;Or(c)&&!Jl(c);){const u=zr(c),h=nA(c),f=o?o.position:a?"fixed":"";!h&&(f==="fixed"||f==="absolute"&&u.position==="static")?i=i.filter(m=>m!==c):o=u,c=$s(c)}return t.set(e,i),i}function tM(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const c=[...n==="clippingAncestors"?Vd(t)?[]:eM(t,this._c):[].concat(n),i],u=mw(t,c[0],o);let h=u.top,f=u.right,g=u.bottom,m=u.left;for(let y=1;y<c.length;y++){const b=mw(t,c[y],o);h=di(b.top,h),f=os(b.right,f),g=os(b.bottom,g),m=di(b.left,m)}return{width:f-m,height:g-h,x:m,y:h}}function nM(e){const{width:t,height:n}=NE(e);return{width:t,height:n}}function rM(e,t,n){const i=ds(t),o=vi(t),a=n==="fixed",c=Vs(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const h=fi(0);if((i||!a)&&((Ta(t)!=="body"||$d(o))&&(u=Jd(t)),i)){const y=Vs(t,!0,a,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}!i&&o&&(h.x=Xd(o));const f=o&&!i&&!a?OE(o,u):fi(0),g=c.left+u.scrollLeft-h.x-f.x,m=c.top+u.scrollTop-h.y-f.y;return{x:g,y:m,width:c.width,height:c.height}}function Vp(e){return zr(e).position==="static"}function gw(e,t){if(!ds(e)||zr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vi(e)===n&&(n=n.ownerDocument.body),n}function zE(e,t){const n=jn(e);if(Vd(e))return n;if(!ds(e)){let o=$s(e);for(;o&&!Jl(o);){if(Or(o)&&!Vp(o))return o;o=$s(o)}return n}let i=gw(e,t);for(;i&&HD(i)&&Vp(i);)i=gw(i,t);return i&&Jl(i)&&Vp(i)&&!nA(i)?n:i||GD(e)||n}const iM=async function(e){const t=this.getOffsetParent||zE,n=this.getDimensions,i=await n(e.floating);return{reference:rM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function sM(e){return zr(e).direction==="rtl"}const oM={convertOffsetParentRelativeRectToViewportRelativeRect:$D,getDocumentElement:vi,getClippingRect:tM,getOffsetParent:zE,getElementRects:iM,getClientRects:VD,getDimensions:nM,getScale:va,isElement:Or,isRTL:sM};function LE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aM(e,t,n){let i=null,o;const a=vi(e);function c(){var g;clearTimeout(o),(g=i)==null||g.disconnect(),i=null}function u(g,m){g===void 0&&(g=!1),m===void 0&&(m=1),c();const y=e.getBoundingClientRect(),{left:b,top:w,width:C,height:E}=y;if(g||t(),!C||!E)return;const S=Ku(w),R=Ku(a.clientWidth-(b+C)),k=Ku(a.clientHeight-(w+E)),I=Ku(b),Q={rootMargin:-S+"px "+-R+"px "+-k+"px "+-I+"px",threshold:di(0,os(1,m))||1};let j=!0;function _(F){const O=F[0].intersectionRatio;if(!LE(y,e.getBoundingClientRect()))return u();if(O!==m){if(!j)return u();O?u(!1,O):o=setTimeout(()=>{u(!1,1e-7)},1e3)}j=!1}try{i=new IntersectionObserver(_,{...Q,root:a.ownerDocument})}catch{i=new IntersectionObserver(_,Q)}i.observe(e)}const h=jn(e),f=()=>u(n);return h.addEventListener("resize",f),u(!0),()=>{h.removeEventListener("resize",f),c()}}function lM(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,f=iA(e),g=o||a?[...f?Xl(f):[],...t?Xl(t):[]]:[];g.forEach(S=>{o&&S.addEventListener("scroll",n),a&&S.addEventListener("resize",n)});const m=f&&u?aM(f,n,a):null;let y=-1,b=null;c&&(b=new ResizeObserver(S=>{let[R]=S;R&&R.target===f&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var k;(k=b)==null||k.observe(t)})),n()}),f&&!h&&b.observe(f),t&&b.observe(t));let w,C=h?Vs(e):null;h&&E();function E(){const S=Vs(e);C&&!LE(C,S)&&n(),C=S,w=requestAnimationFrame(E)}return n(),()=>{var S;g.forEach(R=>{o&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),m?.(),(S=b)==null||S.disconnect(),b=null,h&&cancelAnimationFrame(w)}}const cM=zD,uM=LD,dM=ND,fM=FD,hM=_D,Aw=MD,pM=PD,mM=(e,t,n)=>{const i=new Map,o=n??{},a={...oM,...o.platform,_c:i};return DD(e,t,{...o,platform:a})};var gM=typeof document<"u",AM=function(){},hd=gM?x.useLayoutEffect:AM;function wd(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,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!wd(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const a=o[i];if(!(a==="_owner"&&e.$$typeof)&&!wd(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function PE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yw(e,t){const n=PE(e);return Math.round(t*n)/n}function Jp(e){const t=x.useRef(e);return hd(()=>{t.current=e}),t}function yM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:a,floating:c}={},transform:u=!0,whileElementsMounted:h,open:f}=e,[g,m]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=x.useState(i);wd(y,i)||b(i);const[w,C]=x.useState(null),[E,S]=x.useState(null),R=x.useCallback(ie=>{ie!==Q.current&&(Q.current=ie,C(ie))},[]),k=x.useCallback(ie=>{ie!==j.current&&(j.current=ie,S(ie))},[]),I=a||w,T=c||E,Q=x.useRef(null),j=x.useRef(null),_=x.useRef(g),F=h!=null,O=Jp(h),H=Jp(o),U=Jp(f),J=x.useCallback(()=>{if(!Q.current||!j.current)return;const ie={placement:t,strategy:n,middleware:y};H.current&&(ie.platform=H.current),mM(Q.current,j.current,ie).then(de=>{const D={...de,isPositioned:U.current!==!1};Y.current&&!wd(_.current,D)&&(_.current=D,oo.flushSync(()=>{m(D)}))})},[y,t,n,H,U]);hd(()=>{f===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,m(ie=>({...ie,isPositioned:!1})))},[f]);const Y=x.useRef(!1);hd(()=>(Y.current=!0,()=>{Y.current=!1}),[]),hd(()=>{if(I&&(Q.current=I),T&&(j.current=T),I&&T){if(O.current)return O.current(I,T,J);J()}},[I,T,J,O,F]);const $=x.useMemo(()=>({reference:Q,floating:j,setReference:R,setFloating:k}),[R,k]),P=x.useMemo(()=>({reference:I,floating:T}),[I,T]),V=x.useMemo(()=>{const ie={position:n,left:0,top:0};if(!P.floating)return ie;const de=yw(P.floating,g.x),D=yw(P.floating,g.y);return u?{...ie,transform:"translate("+de+"px, "+D+"px)",...PE(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:de,top:D}},[n,u,P.floating,g.x,g.y]);return x.useMemo(()=>({...g,update:J,refs:$,elements:P,floatingStyles:V}),[g,J,$,P,V])}const vM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?Aw({element:i.current,padding:o}).fn(n):{}:i?Aw({element:i,padding:o}).fn(n):{}}}},bM=(e,t)=>{const n=cM(e);return{name:n.name,fn:n.fn,options:[e,t]}},xM=(e,t)=>{const n=uM(e);return{name:n.name,fn:n.fn,options:[e,t]}},wM=(e,t)=>({fn:pM(e).fn,options:[e,t]}),CM=(e,t)=>{const n=dM(e);return{name:n.name,fn:n.fn,options:[e,t]}},EM=(e,t)=>{const n=fM(e);return{name:n.name,fn:n.fn,options:[e,t]}},SM=(e,t)=>{const n=hM(e);return{name:n.name,fn:n.fn,options:[e,t]}},kM=(e,t)=>{const n=vM(e);return{name:n.name,fn:n.fn,options:[e,t]}};var BM=Object.defineProperty,ns=(e,t)=>BM(e,"name",{value:t,configurable:!0}),FE="Popper",[HE,ja]=Xn(FE),[IM,UE]=HE(FE),RM=ns(e=>{const{__scopePopper:t,children:n}=e,[i,o]=x.useState(null),[a,c]=x.useState(void 0);return p.jsx(IM,{scope:t,anchor:i,onAnchorChange:o,placementState:a,setPlacementState:c,children:n})},"Popper"),QM="PopperAnchor",TM=x.forwardRef(ns(function(t,n){const{__scopePopper:i,virtualRef:o,...a}=t,c=UE(QM,i),u=x.useRef(null),h=c.onAnchorChange,f=x.useCallback(C=>{u.current=C,C&&h(C)},[h]),g=Le(n,f),m=x.useRef(null);x.useEffect(()=>{if(!o)return;const C=m.current;m.current=o.current,C!==m.current&&h(m.current)});const y=c.placementState&&Wd(c.placementState),b=y?.[0],w=y?.[1];return o?null:p.jsx(Re.div,{"data-radix-popper-side":b,"data-radix-popper-align":w,...a,ref:g})},"PopperAnchor")),qE="PopperContent",[jM,DY]=HE(qE),DM=x.forwardRef(ns(function(t,n){const{__scopePopper:i,side:o="bottom",sideOffset:a=0,align:c="center",alignOffset:u=0,arrowPadding:h=0,avoidCollisions:f=!0,collisionBoundary:g=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:C,...E}=t,S=UE(qE,i),[R,k]=x.useState(null),I=Le(n,k),[T,Q]=x.useState(null),j=Wg(T),_=j?.width??0,F=j?.height??0,O=o+(c!=="center"?"-"+c:""),H=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(g)?g:[g],J=U.length>0,Y={padding:H,boundary:U.filter(GE),altBoundary:J},{refs:$,floatingStyles:P,placement:V,isPositioned:ie,middlewareData:de}=yM({strategy:"fixed",placement:O,whileElementsMounted:ns((...ce)=>lM(...ce,{animationFrame:w==="always"}),"whileElementsMounted"),elements:{reference:S.anchor},middleware:[bM({mainAxis:a+F,alignmentAxis:u}),f&&xM({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?wM():void 0,...Y}),f&&CM({...Y}),EM({...Y,apply:ns(({elements:ce,rects:Me,availableWidth:Te,availableHeight:_e})=>{const{width:$e,height:lt}=Me.reference,kt=ce.floating.style;kt.setProperty("--radix-popper-available-width",`${Te}px`),kt.setProperty("--radix-popper-available-height",`${_e}px`),kt.setProperty("--radix-popper-anchor-width",`${$e}px`),kt.setProperty("--radix-popper-anchor-height",`${lt}px`)},"apply")}),T&&kM({element:T,padding:h}),MM({arrowWidth:_,arrowHeight:F}),b&&SM({strategy:"referenceHidden",...Y,boundary:J?Y.boundary:void 0})]}),D=S.setPlacementState;vt(()=>(D(V),()=>{D(void 0)}),[V,D]);const[z,L]=Wd(V),M=qt(C);vt(()=>{ie&&M?.()},[ie,M]);const X=de.arrow?.x,ee=de.arrow?.y,ne=de.arrow?.centerOffset!==0,[fe,ae]=x.useState();return vt(()=>{R&&ae(window.getComputedStyle(R).zIndex)},[R]),p.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:ie?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[de.transformOrigin?.x,de.transformOrigin?.y].join(" "),...de.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(jM,{scope:i,placedSide:z,placedAlign:L,onArrowChange:Q,arrowX:X,arrowY:ee,shouldHideArrow:ne,children:p.jsx(Re.div,{"data-side":z,"data-align":L,...E,ref:I,style:{...E.style,animation:ie?E.style?.animation:"none"}})})})},"PopperContent"));function GE(e){return e!==null}ns(GE,"isNotNull");var MM=ns(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[f,g]=Wd(n),m={start:"0%",center:"50%",end:"100%"}[g],y=(o.arrow?.x??0)+u/2,b=(o.arrow?.y??0)+h/2;let w="",C="";return f==="bottom"?(w=c?m:`${y}px`,C=`${-h}px`):f==="top"?(w=c?m:`${y}px`,C=`${i.floating.height+h}px`):f==="right"?(w=`${-h}px`,C=c?m:`${b}px`):f==="left"&&(w=`${i.floating.width+h}px`,C=c?m:`${b}px`),{data:{x:w,y:C}}}}),"transformOrigin");function Wd(e){const[t,n="center"]=e.split("-");return[t,n]}ns(Wd,"getSideAndAlignFromPlacement");var sA=RM,oA=TM,aA=DM,NM=Object.defineProperty,lA=(e,t)=>NM(e,"name",{value:t,configurable:!0}),Xp=!1;function YE(){const[e,t]=x.useState(Xp);return x.useEffect(()=>{Xp||(Xp=!0,t(!0))},[]),e}lA(YE,"useIsHydrated");var KE=Ia[" useSyncExternalStore ".trim().toString()];function $E(){return()=>{}}lA($E,"subscribe");function VE(){return KE($E,()=>!0,()=>!1)}lA(VE,"useIsHydratedModern");var _M=typeof KE=="function"?VE:YE,OM=Object.defineProperty,ao=(e,t)=>OM(e,"name",{value:t,configurable:!0}),Wp="rovingFocusGroup.onEntryFocus",zM={bubbles:!1,cancelable:!0},Zd="RovingFocusGroup",[Zm,JE,LM]=Fd(Zd),[PM,XE]=Xn(Zd,[LM]),[FM,HM]=PM(Zd),UM=x.forwardRef(ao(function(t,n){return p.jsx(Zm.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(Zm.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(qM,{...t,ref:n})})})},"RovingFocusGroup")),qM=x.forwardRef(ao(function(t,n){const{__scopeRovingFocusGroup:i,orientation:o,loop:a=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:f,onEntryFocus:g,preventScrollOnEntryFocus:m=!1,...y}=t,b=x.useRef(null),w=Le(n,b),C=fc(c),[E,S]=hi({prop:u,defaultProp:h??null,onChange:f,caller:Zd}),[R,k]=x.useState(!1),I=qt(g),T=JE(i),Q=x.useRef(!1),[j,_]=x.useState(0);return x.useEffect(()=>{const F=b.current;if(F)return F.addEventListener(Wp,I),()=>F.removeEventListener(Wp,I)},[I]),p.jsx(FM,{scope:i,orientation:o,dir:C,loop:a,currentTabStopId:E,onItemFocus:x.useCallback(F=>S(F),[S]),onItemShiftTab:x.useCallback(()=>k(!0),[]),onFocusableItemAdd:x.useCallback(()=>_(F=>F+1),[]),onFocusableItemRemove:x.useCallback(()=>_(F=>F-1),[]),children:p.jsx(Re.div,{tabIndex:R||j===0?-1:0,"data-orientation":o,...y,ref:w,style:{outline:"none",...t.style},onMouseDown:we(t.onMouseDown,()=>{Q.current=!0}),onFocus:we(t.onFocus,F=>{const O=!Q.current;if(F.target===F.currentTarget&&O&&!R){const H=new CustomEvent(Wp,zM);if(F.currentTarget.dispatchEvent(H),!H.defaultPrevented){const U=T().filter(V=>V.focusable),J=U.find(V=>V.active),Y=U.find(V=>V.id===E),P=[J,Y,...U].filter(Boolean).map(V=>V.ref.current);cA(P,m)}}Q.current=!1}),onBlur:we(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),GM="RovingFocusGroupItem",YM=x.forwardRef(ao(function(t,n){const{__scopeRovingFocusGroup:i,focusable:o=!0,active:a=!1,tabStopId:c,children:u,...h}=t,f=rn(),g=c||f,m=HM(GM,i),y=m.currentTabStopId===g,b=JE(i),{onFocusableItemAdd:w,onFocusableItemRemove:C,currentTabStopId:E}=m,S=_M();return vt(()=>{if(!(!S||!o))return w(),()=>C()},[S,o,w,C]),x.useEffect(()=>{if(!(S||!o))return w(),()=>C()},[S,o,w,C]),p.jsx(Zm.ItemSlot,{scope:i,id:g,focusable:o,active:a,children:p.jsx(Re.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...h,ref:n,onMouseDown:we(t.onMouseDown,R=>{o?m.onItemFocus(g):R.preventDefault()}),onFocus:we(t.onFocus,()=>m.onItemFocus(g)),onKeyDown:we(t.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){m.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const k=ZE(R,m.orientation,m.dir);if(k!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let T=b().filter(Q=>Q.focusable).map(Q=>Q.ref.current);if(k==="last")T.reverse();else if(k==="prev"||k==="next"){k==="prev"&&T.reverse();const Q=T.indexOf(R.currentTarget);T=m.loop?eS(T,Q+1):T.slice(Q+1)}setTimeout(()=>cA(T))}}),children:typeof u=="function"?u({isCurrentTabStop:y,hasTabStop:E!=null}):u})})},"RovingFocusGroupItem")),KM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}ao(WE,"getDirectionAwareKey");function ZE(e,t,n){const i=WE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return KM[i]}ao(ZE,"getFocusIntent");function cA(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}ao(cA,"focusFirst");function eS(e,t){return e.map((n,i)=>e[(t+i)%e.length])}ao(eS,"wrapArray");var $M=UM,VM=YM,JM=Object.defineProperty,at=(e,t)=>JM(e,"name",{value:t,configurable:!0}),XM=["Enter"," "],WM=["ArrowDown","PageUp","Home"],tS=["ArrowUp","PageDown","End"],ZM=[...WM,...tS],ef="Menu",[eg,eN,tN]=Fd(ef),[lo,nS]=Xn(ef,[tN,ja,XE]),uA=ja(),rS=XE(),[nN,pc]=lo(ef),[rN,dA]=lo(ef),iN=at(e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:o,onOpenChange:a,modal:c=!0}=e,u=uA(t),[h,f]=x.useState(null),g=x.useRef(!1),m=qt(a),y=fc(o);return x.useEffect(()=>{const b=at(()=>{g.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},"handleKeyDown"),w=at(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),x.useEffect(()=>{if(!n)return;const b=at(()=>m(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[n,m]),p.jsx(sA,{...u,children:p.jsx(nN,{scope:t,open:n,onOpenChange:m,content:h,onContentChange:f,children:p.jsx(rN,{scope:t,onClose:x.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:g,dir:y,modal:c,children:i})})})},"Menu"),sN=x.forwardRef(at(function(t,n){const{__scopeMenu:i,...o}=t,a=uA(i);return p.jsx(oA,{...a,...o,ref:n})},"MenuAnchor")),iS="MenuPortal",[oN,aN]=lo(iS,{forceMount:void 0}),lN=at(e=>{const{__scopeMenu:t,forceMount:n,children:i,container:o}=e,a=pc(iS,t);return p.jsx(oN,{scope:t,forceMount:n,children:p.jsx(Mn,{present:n||a.open,children:p.jsx(qd,{asChild:!0,container:o,children:i})})})},"MenuPortal"),rs="MenuContent",[cN,sS]=lo(rs),uN=x.forwardRef(at(function(t,n){const i=aN(rs,t.__scopeMenu),{forceMount:o=i.forceMount,...a}=t,c=pc(rs,t.__scopeMenu),u=dA(rs,t.__scopeMenu);return p.jsx(eg.Provider,{scope:t.__scopeMenu,children:p.jsx(Mn,{present:o||c.open,children:p.jsx(eg.Slot,{scope:t.__scopeMenu,children:u.modal?p.jsx(dN,{...a,ref:n}):p.jsx(fN,{...a,ref:n})})})})},"MenuContent")),dN=x.forwardRef(at(function(t,n){const i=pc(rs,t.__scopeMenu),o=x.useRef(null),a=Le(n,o);return x.useEffect(()=>{const c=o.current;if(c)return Vg(c)},[]),p.jsx(oS,{...t,ref:a,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:we(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),fN=x.forwardRef(at(function(t,n){const i=pc(rs,t.__scopeMenu);return p.jsx(oS,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),hN=_r("MenuContent.ScrollLock"),oS=x.forwardRef(at(function(t,n){const{__scopeMenu:i,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:h,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,disableOutsideScroll:C,...E}=t,S=pc(rs,i),R=dA(rs,i),k=uA(i),I=rS(i),T=eN(i),[Q,j]=x.useState(null),_=x.useRef(null),F=Le(n,_,S.onContentChange),O=x.useRef(0),H=x.useRef(""),U=x.useRef(0),J=x.useRef(null),Y=x.useRef("right"),$=x.useRef(0),P=C?Yd:x.Fragment,V=C?{as:hN,allowPinchZoom:!0}:void 0,ie=at(D=>{const z=H.current+D,L=T().filter(ae=>!ae.disabled),M=document.activeElement,X=L.find(ae=>ae.ref.current===M)?.textValue,ee=L.map(ae=>ae.textValue),ne=fS(ee,z,X),fe=L.find(ae=>ae.textValue===ne)?.ref.current;at((function ae(ce){H.current=ce,window.clearTimeout(O.current),ce!==""&&(O.current=window.setTimeout(()=>ae(""),1e3))}),"updateSearch")(z),fe&&setTimeout(()=>fe.focus())},"handleTypeaheadSearch");x.useEffect(()=>()=>window.clearTimeout(O.current),[]),hc();const de=x.useCallback(D=>Y.current===J.current?.side&&pS(D,J.current?.area),[]);return p.jsx(cN,{scope:i,searchRef:H,onItemEnter:x.useCallback(D=>{de(D)&&D.preventDefault()},[de]),onItemLeave:x.useCallback(D=>{de(D)||(_.current?.focus(),j(null))},[de]),onTriggerLeave:x.useCallback(D=>{de(D)&&D.preventDefault()},[de]),pointerGraceTimerRef:U,onPointerGraceIntentChange:x.useCallback(D=>{J.current=D},[]),children:p.jsx(P,{...V,children:p.jsx(Yg,{asChild:!0,trapped:a,onMountAutoFocus:we(c,D=>{D.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:p.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:b,onDismiss:w,children:p.jsx($M,{asChild:!0,...I,dir:R.dir,orientation:"vertical",loop:o,currentTabStopId:Q,onCurrentTabStopIdChange:j,onEntryFocus:we(f,D=>{R.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(aA,{role:"menu","aria-orientation":"vertical","data-state":cS(S.open),"data-radix-menu-content":"",dir:R.dir,...k,...E,ref:F,style:{outline:"none",...E.style},onKeyDown:we(E.onKeyDown,D=>{const L=D.target.closest("[data-radix-menu-content]")===D.currentTarget,M=D.ctrlKey||D.altKey||D.metaKey,X=D.key.length===1;L&&(D.key==="Tab"&&D.preventDefault(),!M&&X&&ie(D.key));const ee=_.current;if(D.target!==ee||!ZM.includes(D.key))return;D.preventDefault();const fe=T().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);tS.includes(D.key)&&fe.reverse(),uS(fe)}),onBlur:we(t.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(O.current),H.current="")}),onPointerMove:we(t.onPointerMove,Cd(D=>{const z=D.target,L=$.current!==D.clientX;if(D.currentTarget.contains(z)&&L){const M=D.clientX>$.current?"right":"left";Y.current=M,$.current=D.clientX}}))})})})})})})},"MenuContentImpl")),pN=x.forwardRef(at(function(t,n){const{__scopeMenu:i,...o}=t;return p.jsx(Re.div,{...o,ref:n})},"MenuLabel")),tg="MenuItem",vw="menu.itemSelect",aS=x.forwardRef(at(function(t,n){const{disabled:i=!1,onSelect:o,...a}=t,c=x.useRef(null),u=dA(tg,t.__scopeMenu),h=sS(tg,t.__scopeMenu),f=Le(n,c),g=x.useRef(!1),m=at(()=>{const y=c.current;if(!i&&y){const b=new CustomEvent(vw,{bubbles:!0,cancelable:!0});y.addEventListener(vw,w=>o?.(w),{once:!0}),Fg(y,b),b.defaultPrevented?g.current=!1:u.onClose()}},"handleSelect");return p.jsx(mN,{...a,ref:f,disabled:i,onClick:we(t.onClick,m),onPointerDown:y=>{t.onPointerDown?.(y),g.current=!0},onPointerUp:we(t.onPointerUp,y=>{g.current||y.currentTarget?.click()}),onKeyDown:we(t.onKeyDown,y=>{i||y.target!==y.currentTarget||h.searchRef.current!==""&&y.key===" "||XM.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})},"MenuItem")),mN=x.forwardRef(at(function(t,n){const{__scopeMenu:i,disabled:o=!1,textValue:a,...c}=t,u=sS(tg,i),h=rS(i),f=x.useRef(null),g=Le(n,f),[m,y]=x.useState(!1),[b,w]=x.useState("");return x.useEffect(()=>{const C=f.current;C&&w((C.textContent??"").trim())},[c.children]),p.jsx(eg.ItemSlot,{scope:i,disabled:o,textValue:a??b,children:p.jsx(VM,{asChild:!0,...h,focusable:!o,children:p.jsx(Re.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:g,onPointerMove:we(t.onPointerMove,Cd(C=>{o?u.onItemLeave(C):(u.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(t.onPointerLeave,Cd(C=>u.onItemLeave(C))),onFocus:we(t.onFocus,()=>y(!0)),onBlur:we(t.onBlur,()=>y(!1))})})})},"MenuItemImpl")),gN=x.forwardRef(at(function(t,n){const{checked:i=!1,onCheckedChange:o,...a}=t;return p.jsx(yN,{scope:t.__scopeMenu,checked:i,children:p.jsx(aS,{role:"menuitemcheckbox","aria-checked":Wl(i)?"mixed":i,...a,ref:n,"data-state":fA(i),onSelect:we(a.onSelect,()=>o?.(Wl(i)?!0:!i),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),AN="MenuRadioGroup",[MY,NY]=lo(AN,{value:void 0,onValueChange:at(()=>{},"onValueChange")}),lS="MenuItemIndicator",[yN,vN]=lo(lS,{checked:!1}),bN=x.forwardRef(at(function(t,n){const{__scopeMenu:i,forceMount:o,...a}=t,c=vN(lS,i);return p.jsx(Mn,{present:o||Wl(c.checked)||c.checked===!0,children:p.jsx(Re.span,{...a,ref:n,"data-state":fA(c.checked)})})},"MenuItemIndicator")),xN=x.forwardRef(at(function(t,n){const{__scopeMenu:i,...o}=t;return p.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),wN="MenuSub",[_Y,OY]=lo(wN);function cS(e){return e?"open":"closed"}at(cS,"getOpenState");function Wl(e){return e==="indeterminate"}at(Wl,"isIndeterminate");function fA(e){return Wl(e)?"indeterminate":e?"checked":"unchecked"}at(fA,"getCheckedState");function uS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}at(uS,"focusFirst");function dS(e,t){return e.map((n,i)=>e[(t+i)%e.length])}at(dS,"wrapArray");function fS(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let c=dS(e,Math.max(a,0));o.length===1&&(c=c.filter(f=>f!==n));const h=c.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}at(fS,"getNextMatch");function hS(e,t){const{x:n,y:i}=e;let o=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const u=t[a],h=t[c],f=u.x,g=u.y,m=h.x,y=h.y;g>i!=y>i&&n<(m-f)*(i-g)/(y-g)+f&&(o=!o)}return o}at(hS,"isPointInPolygon");function pS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return hS(n,t)}at(pS,"isPointerInGraceArea");function Cd(e){return t=>t.pointerType==="mouse"?e(t):void 0}at(Cd,"whenMouse");var CN=iN,EN=sN,SN=lN,kN=uN,BN=pN,IN=aS,RN=gN,QN=bN,TN=xN,jN=Object.defineProperty,bi=(e,t)=>jN(e,"name",{value:t,configurable:!0}),hA="DropdownMenu",[DN,zY]=Xn(hA,[nS]),xi=nS(),[MN,mS]=DN(hA),NN=bi(e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:o,defaultOpen:a,onOpenChange:c,modal:u=!0}=e,h=xi(t),f=x.useRef(null),[g,m]=hi({prop:o,defaultProp:a??!1,onChange:c,caller:hA});return p.jsx(MN,{scope:t,triggerId:rn(),triggerRef:f,contentId:rn(),open:g,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(y=>!y),[m]),modal:u,children:p.jsx(CN,{...h,open:g,onOpenChange:m,dir:i,modal:u,children:n})})},"DropdownMenu"),_N="DropdownMenuTrigger",ON=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,disabled:o=!1,...a}=t,c=mS(_N,i),u=xi(i),h=Le(n,c.triggerRef);return p.jsx(EN,{asChild:!0,...u,children:p.jsx(Re.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:h,onPointerDown:we(t.onPointerDown,f=>{!o&&f.button===0&&f.ctrlKey===!1&&(c.onOpenToggle(),c.open||f.preventDefault())}),onKeyDown:we(t.onKeyDown,f=>{o||(["Enter"," "].includes(f.key)&&c.onOpenToggle(),f.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})},"DropdownMenuTrigger")),zN=bi(e=>{const{__scopeDropdownMenu:t,...n}=e,i=xi(t);return p.jsx(SN,{...i,...n})},"DropdownMenuPortal"),LN="DropdownMenuContent",PN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=mS(LN,i),c=xi(i),u=x.useRef(!1);return p.jsx(kN,{id:a.contentId,"aria-labelledby":a.triggerId,...c,...o,ref:n,onCloseAutoFocus:we(t.onCloseAutoFocus,h=>{u.current||a.triggerRef.current?.focus(),u.current=!1,h.preventDefault()}),onInteractOutside:we(t.onInteractOutside,h=>{const f=h.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,m=f.button===2||g;(!a.modal||m)&&(u.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),FN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=xi(i);return p.jsx(BN,{...a,...o,ref:n})},"DropdownMenuLabel")),HN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=xi(i);return p.jsx(IN,{...a,...o,ref:n})},"DropdownMenuItem")),UN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=xi(i);return p.jsx(RN,{...a,...o,ref:n})},"DropdownMenuCheckboxItem")),qN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=xi(i);return p.jsx(QN,{...a,...o,ref:n})},"DropdownMenuItemIndicator")),GN=x.forwardRef(bi(function(t,n){const{__scopeDropdownMenu:i,...o}=t,a=xi(i);return p.jsx(TN,{...a,...o,ref:n})},"DropdownMenuSeparator")),YN=NN,KN=ON,$N=zN,VN=PN,JN=FN,XN=HN,WN=UN,ZN=qN,e_=GN,t_=Object.defineProperty,n_=(e,t)=>t_(e,"name",{value:t,configurable:!0}),r_=x.forwardRef(n_(function(t,n){return p.jsx(Re.label,{...t,ref:n,onMouseDown:i=>{i.target.closest("button, input, select, textarea")||(t.onMouseDown?.(i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}})},"Label")),i_=r_,s_=Object.defineProperty,o_=(e,t)=>s_(e,"name",{value:t,configurable:!0});function gS(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}o_(gS,"usePrevious");var a_=Object.defineProperty,l_=(e,t)=>a_(e,"name",{value:t,configurable:!0});function Ed(e,[t,n]){return Math.min(n,Math.max(t,e))}l_(Ed,"clamp");var c_=Object.defineProperty,Ge=(e,t)=>c_(e,"name",{value:t,configurable:!0});function AS(e,t){return x.useReducer((n,i)=>t[n][i]??n,e)}Ge(AS,"useStateMachine");var yS="ScrollArea",[vS,LY]=Xn(yS),[u_,mr]=vS(yS),d_=x.forwardRef(Ge(function(t,n){const{__scopeScrollArea:i,type:o="hover",dir:a,scrollHideDelay:c=600,...u}=t,[h,f]=x.useState(null),[g,m]=x.useState(null),[y,b]=x.useState(null),[w,C]=x.useState(null),[E,S]=x.useState(null),[R,k]=x.useState(0),[I,T]=x.useState(0),[Q,j]=x.useState(!1),[_,F]=x.useState(!1),O=Le(n,f),H=fc(a);return p.jsx(u_,{scope:i,type:o,dir:H,scrollHideDelay:c,scrollArea:h,viewport:g,onViewportChange:m,content:y,onContentChange:b,scrollbarX:w,onScrollbarXChange:C,scrollbarXEnabled:Q,onScrollbarXEnabledChange:j,scrollbarY:E,onScrollbarYChange:S,scrollbarYEnabled:_,onScrollbarYEnabledChange:F,onCornerWidthChange:k,onCornerHeightChange:T,children:p.jsx(Re.div,{dir:H,...u,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":I+"px",...t.style}})})},"ScrollArea")),f_="ScrollAreaViewport",h_=x.forwardRef(Ge(function(t,n){const{__scopeScrollArea:i,children:o,nonce:a,...c}=t,u=mr(f_,i),h=x.useRef(null),f=Le(n,h,u.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx(p_,{nonce:a}),p.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...c,ref:f,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:p.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})},"ScrollAreaViewport")),p_=x.memo(Ge(function({nonce:t}){return p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),wi="ScrollAreaScrollbar",m_=x.forwardRef(Ge(function(t,n){const{forceMount:i,...o}=t,a=mr(wi,t.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:u}=a,h=t.orientation==="horizontal";return x.useEffect(()=>(h?c(!0):u(!0),()=>{h?c(!1):u(!1)}),[h,c,u]),a.type==="hover"?p.jsx(g_,{...o,ref:n,forceMount:i}):a.type==="scroll"?p.jsx(A_,{...o,ref:n,forceMount:i}):a.type==="auto"?p.jsx(bS,{...o,ref:n,forceMount:i}):a.type==="always"?p.jsx(pA,{...o,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),g_=x.forwardRef(Ge(function(t,n){const{forceMount:i,...o}=t,a=mr(wi,t.__scopeScrollArea),[c,u]=x.useState(!1);return x.useEffect(()=>{const h=a.scrollArea;let f=0;if(h){const g=Ge(()=>{window.clearTimeout(f),u(!0)},"handlePointerEnter"),m=Ge(()=>{f=window.setTimeout(()=>u(!1),a.scrollHideDelay)},"handlePointerLeave");return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),p.jsx(Mn,{present:i||c,children:p.jsx(bS,{"data-state":c?"visible":"hidden",...o,ref:n})})},"ScrollAreaScrollbarHover")),A_=x.forwardRef(Ge(function(t,n){const{forceMount:i,...o}=t,a=mr(wi,t.__scopeScrollArea),c=t.orientation==="horizontal",u=gc(()=>f("SCROLL_END"),100),[h,f]=AS("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(h==="idle"){const g=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(g)}},[h,a.scrollHideDelay,f]),x.useEffect(()=>{const g=a.viewport,m=c?"scrollLeft":"scrollTop";if(g){let y=g[m];const b=Ge(()=>{const w=g[m];y!==w&&(f("SCROLL"),u()),y=w},"handleScroll");return g.addEventListener("scroll",b),()=>g.removeEventListener("scroll",b)}},[a.viewport,c,f,u]),p.jsx(Mn,{present:i||h!=="hidden",children:p.jsx(pA,{"data-state":h==="hidden"?"hidden":"visible",...o,ref:n,onPointerEnter:we(t.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:we(t.onPointerLeave,()=>f("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),bS=x.forwardRef(Ge(function(t,n){const i=mr(wi,t.__scopeScrollArea),{forceMount:o,...a}=t,[c,u]=x.useState(!1),h=t.orientation==="horizontal",f=gc(()=>{if(i.viewport){const g=i.viewport.offsetWidth<i.viewport.scrollWidth,m=i.viewport.offsetHeight<i.viewport.scrollHeight;u(h?g:m)}},10);return Js(i.viewport,f),Js(i.content,f),p.jsx(Mn,{present:o||c,children:p.jsx(pA,{"data-state":c?"visible":"hidden",...a,ref:n})})},"ScrollAreaScrollbarAuto")),pA=x.forwardRef(Ge(function(t,n){const{orientation:i="vertical",...o}=t,a=mr(wi,t.__scopeScrollArea),c=x.useRef(null),u=x.useRef(0),[h,f]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),g=mA(h.viewport,h.content),m={...o,sizes:h,onSizesChange:f,hasThumb:g>0&&g<1,onThumbChange:Ge(b=>c.current=b,"onThumbChange"),onThumbPointerUp:Ge(()=>u.current=0,"onThumbPointerUp"),onThumbPointerDown:Ge(b=>u.current=b,"onThumbPointerDown")};function y(b,w){return ES(b,u.current,h,w)}return Ge(y,"getScrollPosition"),i==="horizontal"?p.jsx(y_,{...m,ref:n,onThumbPositionChange:()=>{if(a.viewport&&c.current){const b=a.viewport.scrollLeft,w=rg(b,h,a.dir);c.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollLeft=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollLeft=y(b,a.dir))}}):i==="vertical"?p.jsx(v_,{...m,ref:n,onThumbPositionChange:()=>{if(a.viewport&&c.current){const b=a.viewport.scrollTop,w=rg(b,h);c.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{a.viewport&&(a.viewport.scrollTop=b)},onDragScroll:b=>{a.viewport&&(a.viewport.scrollTop=y(b))}}):null},"ScrollAreaScrollbarVisible")),y_=x.forwardRef(Ge(function(t,n){const{sizes:i,onSizesChange:o,...a}=t,c=mr(wi,t.__scopeScrollArea),[u,h]=x.useState(),f=x.useRef(null),g=Le(n,f,c.onScrollbarXChange);return x.useEffect(()=>{f.current&&h(getComputedStyle(f.current))},[f]),p.jsx(wS,{"data-orientation":"horizontal",...a,ref:g,sizes:i,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":mc(i)+"px",...t.style},onThumbPointerDown:m=>t.onThumbPointerDown(m.x),onDragScroll:m=>t.onDragScroll(m.x),onWheelScroll:(m,y)=>{if(c.viewport){const b=c.viewport.scrollLeft+m.deltaX;t.onWheelScroll(b),AA(b,y)&&m.preventDefault()}},onResize:()=>{f.current&&c.viewport&&u&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Zl(u.paddingLeft),paddingEnd:Zl(u.paddingRight)}})}})},"ScrollAreaScrollbarX")),v_=x.forwardRef(Ge(function(t,n){const{sizes:i,onSizesChange:o,...a}=t,c=mr(wi,t.__scopeScrollArea),[u,h]=x.useState(),f=x.useRef(null),g=Le(n,f,c.onScrollbarYChange);return x.useEffect(()=>{f.current&&h(getComputedStyle(f.current))},[f]),p.jsx(wS,{"data-orientation":"vertical",...a,ref:g,sizes:i,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":mc(i)+"px",...t.style},onThumbPointerDown:m=>t.onThumbPointerDown(m.y),onDragScroll:m=>t.onDragScroll(m.y),onWheelScroll:(m,y)=>{if(c.viewport){const b=c.viewport.scrollTop+m.deltaY;t.onWheelScroll(b),AA(b,y)&&m.preventDefault()}},onResize:()=>{f.current&&c.viewport&&u&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Zl(u.paddingTop),paddingEnd:Zl(u.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[b_,xS]=vS(wi),wS=x.forwardRef(Ge(function(t,n){const{__scopeScrollArea:i,sizes:o,hasThumb:a,onThumbChange:c,onThumbPointerUp:u,onThumbPointerDown:h,onThumbPositionChange:f,onDragScroll:g,onWheelScroll:m,onResize:y,...b}=t,w=mr(wi,i),[C,E]=x.useState(null),S=Le(n,E),R=x.useRef(null),k=x.useRef(""),I=w.viewport,T=o.content-o.viewport,Q=qt(m),j=qt(f),_=gc(y,10);function F(O){if(R.current){const H=O.clientX-R.current.left,U=O.clientY-R.current.top;g({x:H,y:U})}}return Ge(F,"handleDragScroll"),x.useEffect(()=>{const O=Ge(H=>{const U=H.target;C?.contains(U)&&Q(H,T)},"handleWheel");return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[I,C,T,Q]),x.useEffect(j,[o,j]),Js(C,_),Js(w.content,_),p.jsx(b_,{scope:i,scrollbar:C,hasThumb:a,onThumbChange:qt(c),onThumbPointerUp:qt(u),onThumbPositionChange:j,onThumbPointerDown:qt(h),children:p.jsx(Re.div,{...b,ref:S,style:{position:"absolute",...b.style},onPointerDown:we(t.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),R.current=C.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),F(O))}),onPointerMove:we(t.onPointerMove,F),onPointerUp:we(t.onPointerUp,O=>{const H=O.target;H.hasPointerCapture(O.pointerId)&&H.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=k.current,w.viewport&&(w.viewport.style.scrollBehavior=""),R.current=null})})})},"ScrollAreaScrollbarImpl")),ng="ScrollAreaThumb",x_=x.forwardRef(Ge(function(t,n){const{forceMount:i,...o}=t,a=xS(ng,t.__scopeScrollArea);return p.jsx(Mn,{present:i||a.hasThumb,children:p.jsx(w_,{ref:n,...o})})},"ScrollAreaThumb")),w_=x.forwardRef(Ge(function(t,n){const{__scopeScrollArea:i,style:o,...a}=t,c=mr(ng,i),u=xS(ng,i),{onThumbPositionChange:h}=u,f=Le(n,u.onThumbChange),g=x.useRef(void 0),m=gc(()=>{g.current&&(g.current(),g.current=void 0)},100);return x.useEffect(()=>{const y=c.viewport;if(y){const b=Ge(()=>{if(m(),!g.current){const w=S_(y,h);g.current=w,h()}},"handleScroll");return h(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[c.viewport,m,h]),p.jsx(Re.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:we(t.onPointerDownCapture,y=>{const w=y.target.getBoundingClientRect(),C=y.clientX-w.left,E=y.clientY-w.top;u.onThumbPointerDown({x:C,y:E})}),onPointerUp:we(t.onPointerUp,u.onThumbPointerUp)})},"ScrollAreaThumbImpl")),CS="ScrollAreaCorner",C_=x.forwardRef(Ge(function(t,n){const i=mr(CS,t.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?p.jsx(E_,{...t,ref:n}):null},"ScrollAreaCorner")),E_=x.forwardRef(Ge(function(t,n){const{__scopeScrollArea:i,...o}=t,a=mr(CS,i),[c,u]=x.useState(0),[h,f]=x.useState(0),g=!!(c&&h),{onCornerWidthChange:m,onCornerHeightChange:y}=a;return Js(a.scrollbarX,()=>{const b=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(b),f(b)}),Js(a.scrollbarY,()=>{const b=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(b),u(b)}),x.useEffect(()=>()=>{m(0),y(0)},[m,y]),g?p.jsx(Re.div,{...o,ref:n,style:{width:c,height:h,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null},"ScrollAreaCornerImpl"));function Zl(e){return e?parseInt(e,10):0}Ge(Zl,"toInt");function mA(e,t){const n=e/t;return isNaN(n)?0:n}Ge(mA,"getThumbRatio");function mc(e){const t=mA(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}Ge(mc,"getThumbSize");function ES(e,t,n,i="ltr"){const o=mc(n),a=o/2,c=t||a,u=o-c,h=n.scrollbar.paddingStart+c,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,g=n.content-n.viewport,m=i==="ltr"?[0,g]:[g*-1,0];return gA([h,f],m)(e)}Ge(ES,"getScrollPositionFromPointer");function rg(e,t,n="ltr"){const i=mc(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,c=t.content-t.viewport,u=a-i,h=n==="ltr"?[0,c]:[c*-1,0],f=Ed(e,h);return gA([0,c],[0,u])(f)}Ge(rg,"getThumbOffsetFromScroll");function gA(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}Ge(gA,"linearScale");function AA(e,t){return e>0&&e<t}Ge(AA,"isScrollingWithinScrollbarBounds");var S_=Ge((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return Ge((function o(){const a={left:e.scrollLeft,top:e.scrollTop},c=n.left!==a.left,u=n.top!==a.top;(c||u)&&t(),n=a,i=window.requestAnimationFrame(o)}),"loop")(),()=>window.cancelAnimationFrame(i)},"addUnlinkedScrollListener");function gc(e,t){const n=qt(e),i=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),x.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}Ge(gc,"useDebounceCallback");function Js(e,t){const n=qt(t);vt(()=>{let i=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(i),o.unobserve(e)}}},[e,n])}Ge(Js,"useResizeObserver");var k_=d_,B_=h_,I_=C_,R_=Object.defineProperty,et=(e,t)=>R_(e,"name",{value:t,configurable:!0}),Q_=[" ","Enter","ArrowUp","ArrowDown"],T_=[" ","Enter"],Ea="Select",[tf,nf,j_]=Fd(Ea),[co,PY]=Xn(Ea,[j_,ja]),yA=ja(),[D_,fs]=co(Ea),[M_,N_]=co(Ea);function SS(e){const{__scopeSelect:t,children:n,open:i,defaultOpen:o,onOpenChange:a,value:c,defaultValue:u,onValueChange:h,dir:f,name:g,autoComplete:m,disabled:y,required:b,form:w,internal_do_not_use_render:C}=e,E=yA(t),[S,R]=x.useState(null),[k,I]=x.useState(null),[T,Q]=x.useState(!1),j=fc(f),[_,F]=hi({prop:i,defaultProp:o??!1,onChange:a,caller:Ea}),[O,H]=hi({prop:c,defaultProp:u,onChange:h,caller:Ea}),U=x.useRef(null),J=x.useRef(O);x.useEffect(()=>{const L=w?S?.ownerDocument.getElementById(w):S?.form;if(L instanceof HTMLFormElement){const M=et(()=>H(J.current),"reset");return L.addEventListener("reset",M),()=>L.removeEventListener("reset",M)}},[w,S,H]);const Y=S?!!w||!!S.closest("form"):!0,[$,P]=x.useState(new Set),V=rn(),ie=Array.from($).map(L=>L.props.value).join(";"),de=x.useCallback(L=>{P(M=>new Set(M).add(L))},[]),D=x.useCallback(L=>{P(M=>{const X=new Set(M);return X.delete(L),X})},[]),z={required:b,trigger:S,onTriggerChange:R,valueNode:k,onValueNodeChange:I,valueNodeHasChildren:T,onValueNodeHasChildrenChange:Q,contentId:V,value:O,onValueChange:H,open:_,onOpenChange:F,dir:j,triggerPointerDownPosRef:U,disabled:y,name:g,autoComplete:m,form:w,nativeOptions:$,nativeSelectKey:ie,isFormControl:Y};return p.jsx(sA,{...E,children:p.jsx(D_,{scope:t,...z,children:p.jsx(tf.Provider,{scope:t,children:p.jsx(M_,{scope:t,onNativeOptionAdd:de,onNativeOptionRemove:D,children:RS(C)?C(z):n})})})})}et(SS,"SelectProvider");var __=et(e=>{const{__scopeSelect:t,children:n,...i}=e;return p.jsx(SS,{__scopeSelect:t,...i,internal_do_not_use_render:({isFormControl:o})=>p.jsxs(p.Fragment,{children:[n,o?p.jsx(lO,{__scopeSelect:t}):null]})})},"Select"),O_="SelectTrigger",z_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,disabled:o=!1,...a}=t,c=yA(i),u=fs(O_,i),h=u.disabled||o,f=Le(n,u.onTriggerChange),g=nf(i),m=x.useRef("touch"),[y,b,w]=bA(E=>{const S=g().filter(I=>!I.disabled),R=S.find(I=>I.value===u.value),k=xA(S,E,R);k!==void 0&&u.onValueChange(k.value)}),C=et(E=>{h||(u.onOpenChange(!0),w()),E&&(u.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})},"handleOpen");return p.jsx(oA,{asChild:!0,...c,children:p.jsx(Re.button,{type:"button",role:"combobox","aria-controls":u.open?u.contentId:void 0,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Ac(u.value)?"":void 0,...a,ref:f,onClick:we(a.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&C(E)}),onPointerDown:we(a.onPointerDown,E=>{m.current=E.pointerType;const S=E.target;S.hasPointerCapture(E.pointerId)&&S.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:we(a.onKeyDown,E=>{const S=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&b(E.key),!(S&&E.key===" ")&&Q_.includes(E.key)&&(C(),E.preventDefault())})})})},"SelectTrigger")),L_="SelectValue",P_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,className:o,style:a,children:c,placeholder:u="",...h}=t,f=fs(L_,i),{onValueNodeHasChildrenChange:g}=f,m=c!==void 0,y=Le(n,f.onValueNodeChange);vt(()=>{g(m)},[g,m]);const b=Ac(f.value);return p.jsx(Re.span,{...h,asChild:b?!1:h.asChild,ref:y,style:{pointerEvents:"none"},children:p.jsx(x.Fragment,{children:b?u:c},b?"placeholder":"value")})},"SelectValue")),F_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,children:o,...a}=t;return p.jsx(Re.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})},"SelectIcon")),H_="SelectPortal",[U_,q_]=co(H_,{forceMount:void 0}),G_=et(e=>{const{__scopeSelect:t,forceMount:n,...i}=e;return p.jsx(U_,{scope:e.__scopeSelect,forceMount:n,children:p.jsx(qd,{asChild:!0,...i})})},"SelectPortal"),Xs="SelectContent",Y_=x.forwardRef(et(function(t,n){const i=q_(Xs,t.__scopeSelect),{forceMount:o=i.forceMount,...a}=t,c=fs(Xs,t.__scopeSelect),[u,h]=x.useState();return vt(()=>{h(new DocumentFragment)},[]),p.jsx(Mn,{present:o||c.open,children:({present:f})=>f?p.jsx(V_,{...a,ref:n}):p.jsx(K_,{...a,fragment:u})})},"SelectContent")),K_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,children:o,fragment:a}=t;return a?oo.createPortal(p.jsx(kS,{scope:i,children:p.jsx(tf.Slot,{scope:i,children:p.jsx("div",{ref:n,children:o})})}),a):null},"SelectContentFragment")),xr=10,[kS,uo]=co(Xs),$_=_r("SelectContent.RemoveScroll"),V_=x.forwardRef(et(function(t,n){const{__scopeSelect:i}=t,{position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:c,onPointerDownOutside:u,side:h,sideOffset:f,align:g,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:C,hideWhenDetached:E,avoidCollisions:S,...R}=t,k=fs(Xs,i),[I,T]=x.useState(null),[Q,j]=x.useState(null),_=Le(n,T),[F,O]=x.useState(null),[H,U]=x.useState(null),J=nf(i),[Y,$]=x.useState(!1),P=x.useRef(!1);x.useEffect(()=>{if(I)return Vg(I)},[I]),hc();const V=x.useCallback(ae=>{const[ce,...Me]=J().map($e=>$e.ref.current),[Te]=Me.slice(-1),_e=document.activeElement;for(const $e of ae)if($e===_e||($e?.scrollIntoView({block:"nearest"}),$e===ce&&Q&&(Q.scrollTop=0),$e===Te&&Q&&(Q.scrollTop=Q.scrollHeight),$e?.focus(),document.activeElement!==_e))return},[J,Q]),ie=x.useCallback(()=>V([F,I]),[V,F,I]);x.useEffect(()=>{Y&&ie()},[Y,ie]);const{onOpenChange:de,triggerPointerDownPosRef:D}=k;x.useEffect(()=>{if(I){let ae={x:0,y:0};const ce=et(Te=>{ae={x:Math.abs(Math.round(Te.pageX)-(D.current?.x??0)),y:Math.abs(Math.round(Te.pageY)-(D.current?.y??0))}},"handlePointerMove"),Me=et(Te=>{ae.x<=10&&ae.y<=10?Te.preventDefault():Te.composedPath().includes(I)||de(!1),document.removeEventListener("pointermove",ce),D.current=null},"handlePointerUp");return D.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Me,{capture:!0})}}},[I,de,D]),x.useEffect(()=>{const ae=et(()=>de(!1),"close");return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[de]);const[z,L]=bA(ae=>{const ce=J().filter(_e=>!_e.disabled),Me=ce.find(_e=>_e.ref.current===document.activeElement),Te=xA(ce,ae,Me);Te&&setTimeout(()=>Te.ref.current?.focus())}),M=x.useCallback((ae,ce,Me)=>{const Te=!P.current&&!Me;(k.value!==void 0&&k.value===ce||Te)&&(O(ae),Te&&(P.current=!0))},[k.value]),X=x.useCallback(()=>I?.focus(),[I]),ee=x.useCallback((ae,ce,Me)=>{const Te=!P.current&&!Me;(k.value!==void 0&&k.value===ce||Te)&&U(ae)},[k.value]),ne=o==="popper"?bw:J_,fe=ne===bw?{side:h,sideOffset:f,align:g,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:C,hideWhenDetached:E,avoidCollisions:S}:{};return p.jsx(kS,{scope:i,content:I,viewport:Q,onViewportChange:j,itemRefCallback:M,selectedItem:F,onItemLeave:X,itemTextRefCallback:ee,focusSelectedItem:ie,selectedItemText:H,position:o,isPositioned:Y,searchRef:z,children:p.jsx(Yd,{as:$_,allowPinchZoom:!0,children:p.jsx(Yg,{asChild:!0,trapped:k.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:we(a,ae=>{k.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:p.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:p.jsx(ne,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:ae=>ae.preventDefault(),...R,...fe,onPlaced:()=>$(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:we(R.onKeyDown,ae=>{const ce=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!ce&&ae.key.length===1&&L(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Te=J().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const _e=ae.target,$e=Te.indexOf(_e);Te=Te.slice($e+1)}setTimeout(()=>V(Te)),ae.preventDefault()}})})})})})})},"SelectContentImpl")),J_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,onPlaced:o,...a}=t,c=fs(Xs,i),u=uo(Xs,i),[h,f]=x.useState(null),[g,m]=x.useState(null),y=Le(n,m),b=nf(i),w=x.useRef(!1),C=x.useRef(!0),{viewport:E,selectedItem:S,selectedItemText:R,focusSelectedItem:k}=u,I=x.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&g&&E&&S&&R){const _=c.trigger.getBoundingClientRect(),F=g.getBoundingClientRect(),O=c.valueNode.getBoundingClientRect(),H=R.getBoundingClientRect();if(c.dir!=="rtl"){const _e=H.left-F.left,$e=O.left-_e,lt=_.left-$e,kt=_.width+lt,On=Math.max(kt,F.width),xn=window.innerWidth-xr,gr=Ed($e,[xr,Math.max(xr,xn-On)]);h.style.minWidth=kt+"px",h.style.left=gr+"px"}else{const _e=F.right-H.right,$e=window.innerWidth-O.right-_e,lt=window.innerWidth-_.right-$e,kt=_.width+lt,On=Math.max(kt,F.width),xn=window.innerWidth-xr,gr=Ed($e,[xr,Math.max(xr,xn-On)]);h.style.minWidth=kt+"px",h.style.right=gr+"px"}const U=b(),J=window.innerHeight-xr*2,Y=E.scrollHeight,$=window.getComputedStyle(g),P=parseInt($.borderTopWidth,10),V=parseInt($.paddingTop,10),ie=parseInt($.borderBottomWidth,10),de=parseInt($.paddingBottom,10),D=P+V+Y+de+ie,z=Math.min(S.offsetHeight*5,D),L=window.getComputedStyle(E),M=parseInt(L.paddingTop,10),X=parseInt(L.paddingBottom,10),ee=_.top+_.height/2-xr,ne=J-ee,fe=S.offsetHeight/2,ae=S.offsetTop+fe,ce=P+V+ae,Me=D-ce;if(ce<=ee){const _e=U.length>0&&S===U[U.length-1].ref.current;h.style.bottom="0px";const $e=g.clientHeight-E.offsetTop-E.offsetHeight,lt=Math.max(ne,fe+(_e?X:0)+$e+ie),kt=ce+lt;h.style.height=kt+"px"}else{const _e=U.length>0&&S===U[0].ref.current;h.style.top="0px";const lt=Math.max(ee,P+E.offsetTop+(_e?M:0)+fe)+Me;h.style.height=lt+"px",E.scrollTop=ce-ee+E.offsetTop}h.style.margin=`${xr}px 0`,h.style.minHeight=z+"px",h.style.maxHeight=J+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,h,g,E,S,R,c.dir,o]);vt(()=>I(),[I]);const[T,Q]=x.useState();vt(()=>{g&&Q(window.getComputedStyle(g).zIndex)},[g]);const j=x.useCallback(_=>{_&&C.current===!0&&(I(),k?.(),C.current=!1)},[I,k]);return p.jsx(X_,{scope:i,contentWrapper:h,shouldExpandOnScrollRef:w,onScrollButtonChange:j,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:p.jsx(Re.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})},"SelectItemAlignedPosition")),bw=x.forwardRef(et(function(t,n){const{__scopeSelect:i,align:o="start",collisionPadding:a=xr,...c}=t,u=yA(i);return p.jsx(aA,{...u,...c,ref:n,align:o,collisionPadding:a,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[X_,vA]=co(Xs,{}),xw="SelectViewport",W_=x.forwardRef(et(function(t,n){const{__scopeSelect:i,nonce:o,...a}=t,c=uo(xw,i),u=vA(xw,i),h=Le(n,c.onViewportChange),f=x.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(tf.Slot,{scope:i,children:p.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:we(a.onScroll,g=>{const m=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=u;if(b?.current&&y){const w=Math.abs(f.current-m.scrollTop);if(w>0){const C=window.innerHeight-xr*2,E=parseFloat(y.style.minHeight),S=parseFloat(y.style.height),R=Math.max(E,S);if(R<C){const k=R+w,I=Math.min(C,k),T=k-I;y.style.height=I+"px",y.style.bottom==="0px"&&(m.scrollTop=T>0?T:0,y.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})},"SelectViewport")),Z_="SelectGroup",[FY,HY]=co(Z_),ig="SelectItem",[eO,BS]=co(ig),tO=x.forwardRef(et(function(t,n){const{__scopeSelect:i,value:o,disabled:a=!1,textValue:c,...u}=t,h=fs(ig,i),f=uo(ig,i),g=h.value===o,[m,y]=x.useState(c??""),[b,w]=x.useState(!1),C=qt(I=>f.itemRefCallback?.(I,o,a)),E=Le(n,C),S=rn(),R=x.useRef("touch"),k=et(()=>{a||(h.onValueChange(o),h.onOpenChange(!1))},"handleSelect");return p.jsx(eO,{scope:i,value:o,disabled:a,textId:S,isSelected:g,onItemTextChange:x.useCallback(I=>{y(T=>T||(I?.textContent??"").trim())},[]),children:p.jsx(tf.ItemSlot,{scope:i,value:o,disabled:a,textValue:m,children:p.jsx(Re.div,{role:"option","aria-labelledby":S,"data-highlighted":b?"":void 0,"aria-selected":g&&b,"data-state":g?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:E,onFocus:we(u.onFocus,()=>w(!0)),onBlur:we(u.onBlur,()=>w(!1)),onClick:we(u.onClick,()=>{R.current!=="mouse"&&k()}),onPointerUp:we(u.onPointerUp,()=>{R.current==="mouse"&&k()}),onPointerDown:we(u.onPointerDown,I=>{R.current=I.pointerType}),onPointerMove:we(u.onPointerMove,I=>{R.current=I.pointerType,a?f.onItemLeave?.():R.current==="mouse"&&I.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(u.onPointerLeave,I=>{I.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:we(u.onKeyDown,I=>{a||I.target!==I.currentTarget||f.searchRef?.current!==""&&I.key===" "||(T_.includes(I.key)&&k(),I.key===" "&&I.preventDefault())})})})})},"SelectItem")),$u="SelectItemText",nO=x.forwardRef(et(function(t,n){const{__scopeSelect:i,className:o,style:a,...c}=t,u=fs($u,i),h=uo($u,i),f=BS($u,i),g=N_($u,i),[m,y]=x.useState(null),b=qt(k=>h.itemTextRefCallback?.(k,f.value,f.disabled)),w=Le(n,y,f.onItemTextChange,b),C=m?.textContent,E=x.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:C},f.value),[f.disabled,f.value,C]),{onNativeOptionAdd:S,onNativeOptionRemove:R}=g;return vt(()=>(S(E),()=>R(E)),[S,R,E]),p.jsxs(p.Fragment,{children:[p.jsx(Re.span,{id:f.textId,...c,ref:w}),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren&&!Ac(u.value)?oo.createPortal(c.children,u.valueNode):null]})},"SelectItemText")),rO="SelectItemIndicator",iO=x.forwardRef(et(function(t,n){const{__scopeSelect:i,...o}=t;return BS(rO,i).isSelected?p.jsx(Re.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator")),ww="SelectScrollUpButton",sO=x.forwardRef(et(function(t,n){const i=uo(ww,t.__scopeSelect),o=vA(ww,t.__scopeSelect),[a,c]=x.useState(!1),u=Le(n,o.onScrollButtonChange);return vt(()=>{if(i.viewport&&i.isPositioned){let h=function(){const g=f.scrollTop>0;c(g)};et(h,"handleScroll");const f=i.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,i.isPositioned]),a?p.jsx(IS,{...t,ref:u,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=i;h&&f&&(h.scrollTop=h.scrollTop-f.offsetHeight)}}):null},"SelectScrollUpButton")),Cw="SelectScrollDownButton",oO=x.forwardRef(et(function(t,n){const i=uo(Cw,t.__scopeSelect),o=vA(Cw,t.__scopeSelect),[a,c]=x.useState(!1),u=Le(n,o.onScrollButtonChange);return vt(()=>{if(i.viewport&&i.isPositioned){let h=function(){const g=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<g;c(m)};et(h,"handleScroll");const f=i.viewport;return h(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,i.isPositioned]),a?p.jsx(IS,{...t,ref:u,onAutoScroll:()=>{const{viewport:h,selectedItem:f}=i;h&&f&&(h.scrollTop=h.scrollTop+f.offsetHeight)}}):null},"SelectScrollDownButton")),IS=x.forwardRef(et(function(t,n){const{__scopeSelect:i,onAutoScroll:o,...a}=t,c=uo("SelectScrollButton",i),u=x.useRef(null),h=nf(i),f=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>f(),[f]),vt(()=>{h().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),p.jsx(Re.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:we(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(o,50))}),onPointerMove:we(a.onPointerMove,()=>{c.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(o,50))}),onPointerLeave:we(a.onPointerLeave,()=>{f()})})},"SelectScrollButtonImpl")),aO="SelectBubbleInput",lO=x.forwardRef(et(function({__scopeSelect:t,...n},i){const o=fs(aO,t),{value:a,onValueChange:c,required:u,disabled:h,name:f,autoComplete:g,form:m}=o,{nativeOptions:y,nativeSelectKey:b}=o,w=x.useRef(null),C=Le(i,w),E=a??"",S=gS(E),R=Array.from(y).some(k=>(k.props.value??"")==="");return x.useEffect(()=>{const k=w.current;if(!k)return;const I=window.HTMLSelectElement.prototype,Q=Object.getOwnPropertyDescriptor(I,"value").set;if(S!==E&&Q){const j=new Event("change",{bubbles:!0});Q.call(k,E),k.dispatchEvent(j)}},[S,E]),p.jsxs(Re.select,{"aria-hidden":!0,required:u,tabIndex:-1,name:f,autoComplete:g,disabled:h,form:m,onChange:k=>c(k.target.value),...n,style:{...F1,...n.style},ref:C,defaultValue:E,children:[Ac(a)&&!R?p.jsx("option",{value:""}):null,Array.from(y)]},b)},"SelectBubbleInput"));function RS(e){return typeof e=="function"}et(RS,"isFunction");function Ac(e){return e===""||e===void 0}et(Ac,"shouldShowPlaceholder");function bA(e){const t=qt(e),n=x.useRef(""),i=x.useRef(0),o=x.useCallback(c=>{const u=n.current+c;t(u),et((function h(f){n.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(u)},[t]),a=x.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,a]}et(bA,"useTypeaheadSearch");function xA(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let c=QS(e,Math.max(a,0));o.length===1&&(c=c.filter(f=>f!==n));const h=c.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}et(xA,"findNextItem");function QS(e,t){return e.map((n,i)=>e[(t+i)%e.length])}et(QS,"wrapArray");var cO=Object.defineProperty,ls=(e,t)=>cO(e,"name",{value:t,configurable:!0}),wA="Switch",[uO,UY]=Xn(wA),[dO,CA]=uO(wA);function TS(e){const{__scopeSwitch:t,checked:n,children:i,defaultChecked:o,disabled:a,form:c,name:u,onCheckedChange:h,required:f,value:g="on",internal_do_not_use_render:m}=e,[y,b]=hi({prop:n,defaultProp:o??!1,onChange:h,caller:wA}),[w,C]=x.useState(null),[E,S]=x.useState(null),R=x.useRef(!1),[k,I]=x.useReducer(j=>j+1,0),T=w?!!c||!!w.closest("form"):!0,Q={checked:y,setChecked:b,disabled:a,control:w,setControl:C,name:u,form:c,value:g,hasConsumerStoppedPropagationRef:R,userInteractionCount:k,onUserInteraction:I,required:f,defaultChecked:o,isFormControl:T,bubbleInput:E,setBubbleInput:S};return p.jsx(dO,{scope:t,...Q,children:jS(m)?m(Q):i})}ls(TS,"SwitchProvider");var fO="SwitchTrigger",hO=x.forwardRef(ls(function({__scopeSwitch:t,onClick:n,...i},o){const{control:a,form:c,value:u,disabled:h,checked:f,required:g,setControl:m,setChecked:y,hasConsumerStoppedPropagationRef:b,onUserInteraction:w,isFormControl:C,bubbleInput:E}=CA(fO,t),S=Le(o,m),R=x.useRef(f);return x.useEffect(()=>{const k=c?a?.ownerDocument.getElementById(c):a?.form;if(k instanceof HTMLFormElement){const I=ls(()=>y(R.current),"reset");return k.addEventListener("reset",I),()=>k.removeEventListener("reset",I)}},[a,c,y]),p.jsx(Re.button,{type:"button",role:"switch","aria-checked":f,"aria-required":g,"data-state":EA(f),"data-disabled":h?"":void 0,disabled:h,value:u,...i,ref:S,onClick:we(n,k=>{w(),y(I=>!I),E&&C&&(b.current=k.isPropagationStopped(),b.current||k.stopPropagation())})})},"SwitchTrigger")),pO=x.forwardRef(ls(function(t,n){const{__scopeSwitch:i,name:o,checked:a,defaultChecked:c,required:u,disabled:h,value:f,onCheckedChange:g,form:m,...y}=t;return p.jsx(TS,{__scopeSwitch:i,checked:a,defaultChecked:c,disabled:h,required:u,onCheckedChange:g,name:o,form:m,value:f,internal_do_not_use_render:({isFormControl:b})=>p.jsxs(p.Fragment,{children:[p.jsx(hO,{...y,ref:n,__scopeSwitch:i}),b&&p.jsx(yO,{__scopeSwitch:i})]})})},"Switch")),mO="SwitchThumb",gO=x.forwardRef(ls(function(t,n){const{__scopeSwitch:i,...o}=t,a=CA(mO,i);return p.jsx(Re.span,{"data-state":EA(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:n})},"SwitchThumb")),AO="SwitchBubbleInput",yO=x.forwardRef(ls(function({__scopeSwitch:t,onClick:n,...i},o){const{control:a,hasConsumerStoppedPropagationRef:c,userInteractionCount:u,checked:h,defaultChecked:f,required:g,disabled:m,name:y,value:b,form:w,bubbleInput:C,setBubbleInput:E}=CA(AO,t),S=Le(o,E),R=Wg(a),k=x.useRef(!1),I=x.useRef(h),T=x.useRef(u);x.useEffect(()=>{const j=C;if(!j)return;const _=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(_,"checked").set,H=u!==T.current;T.current=u;const U=I.current!==h;I.current=h;const J=!(H&&c.current);if(U&&O){k.current=!H;const Y=new Event("click",{bubbles:J});O.call(j,h),j.dispatchEvent(Y),k.current=!1}},[C,h,c,u]);const Q=x.useRef(h);return p.jsx(Re.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??Q.current,required:g,disabled:m,name:y,value:b,form:w,...i,tabIndex:-1,ref:S,onClick:we(n,j=>{k.current&&j.stopPropagation()}),style:{...i.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function jS(e){return typeof e=="function"}ls(jS,"isFunction");function EA(e){return e?"checked":"unchecked"}ls(EA,"getState");var vO=Object.defineProperty,Jt=(e,t)=>vO(e,"name",{value:t,configurable:!0}),[SA,qY]=Xn("Tooltip",[ja]),kA=ja(),bO="TooltipProvider",xO=700,sg="tooltip.open",[wO,BA]=SA(bO),CO=Jt(e=>{const{__scopeTooltip:t,delayDuration:n=xO,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:a}=e,c=x.useRef(!0),u=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const f=h.current;return()=>window.clearTimeout(f)},[]),p.jsx(wO,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:x.useCallback(()=>{i<=0||(window.clearTimeout(h.current),c.current=!1)},[i]),onClose:x.useCallback(()=>{i<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,i))},[i]),isPointerInTransitRef:u,onPointerInTransitChange:x.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})},"TooltipProvider"),og="Tooltip",[EO,yc]=SA(og),SO=Jt(e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:o,onOpenChange:a,disableHoverableContent:c,delayDuration:u}=e,h=BA(og,e.__scopeTooltip),f=kA(t),[g,m]=x.useState(null),[y,b]=x.useState(void 0),w=rn(),C=x.useRef(0),E=c??h.disableHoverableContent,S=u??h.delayDuration,R=x.useRef(!1),[k,I]=hi({prop:i,defaultProp:o??!1,onChange:Jt(O=>{O?(h.onOpen(),document.dispatchEvent(new CustomEvent(sg))):h.onClose(),a?.(O)},"onChange"),caller:og}),T=x.useMemo(()=>k?R.current?"delayed-open":"instant-open":"closed",[k]),Q=x.useCallback(()=>{window.clearTimeout(C.current),C.current=0,R.current=!1,I(!0)},[I]),j=x.useCallback(()=>{window.clearTimeout(C.current),C.current=0,I(!1)},[I]),_=x.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{R.current=!0,I(!0),C.current=0},S)},[S,I]);x.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]);const F=y??w;return p.jsx(sA,{...f,children:p.jsx(EO,{scope:t,contentId:F,setContentId:b,open:k,stateAttribute:T,trigger:g,onTriggerChange:m,onTriggerEnter:x.useCallback(()=>{h.isOpenDelayedRef.current?_():Q()},[h.isOpenDelayedRef,_,Q]),onTriggerLeave:x.useCallback(()=>{E?j():(window.clearTimeout(C.current),C.current=0)},[j,E]),onOpen:Q,onClose:j,disableHoverableContent:E,children:n})})},"Tooltip"),Ew="TooltipTrigger",kO=x.forwardRef(Jt(function(t,n){const{__scopeTooltip:i,...o}=t,a=yc(Ew,i),c=BA(Ew,i),u=kA(i),h=x.useRef(null),f=Le(n,h,a.onTriggerChange),g=x.useRef(!1),m=x.useRef(!1),y=x.useCallback(()=>g.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),p.jsx(oA,{asChild:!0,...u,children:p.jsx(Re.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:f,onPointerMove:we(t.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!c.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:we(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:we(t.onPointerDown,()=>{a.open&&a.onClose(),g.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:we(t.onFocus,()=>{g.current||a.onOpen()}),onBlur:we(t.onBlur,a.onClose),onClick:we(t.onClick,a.onClose)})})},"TooltipTrigger")),DS="TooltipPortal",[BO,IO]=SA(DS,{forceMount:void 0}),RO=Jt(e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:o}=e,a=yc(DS,t);return p.jsx(BO,{scope:t,forceMount:n,children:p.jsx(Mn,{present:n||a.open,children:p.jsx(qd,{asChild:!0,container:o,children:i})})})},"TooltipPortal"),ec="TooltipContent",QO=x.forwardRef(Jt(function(t,n){const i=IO(ec,t.__scopeTooltip),{forceMount:o=i.forceMount,side:a="top",...c}=t,u=yc(ec,t.__scopeTooltip);return p.jsx(Mn,{present:o||u.open,children:u.disableHoverableContent?p.jsx(MS,{side:a,...c,ref:n}):p.jsx(TO,{side:a,...c,ref:n})})},"TooltipContent")),TO=x.forwardRef(Jt(function(t,n){const i=yc(ec,t.__scopeTooltip),o=BA(ec,t.__scopeTooltip),a=x.useRef(null),c=Le(n,a),[u,h]=x.useState(null),{trigger:f,onClose:g}=i,m=a.current,{onPointerInTransitChange:y}=o,b=x.useCallback(()=>{h(null),y(!1)},[y]),w=x.useCallback((C,E)=>{const S=C.currentTarget,R={x:C.clientX,y:C.clientY},k=NS(R,S.getBoundingClientRect()),I=_S(R,k),T=OS(E.getBoundingClientRect()),Q=LS([...I,...T]);h(Q),y(!0)},[y]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(f&&m){const C=Jt(S=>w(S,m),"handleTriggerLeave"),E=Jt(S=>w(S,f),"handleContentLeave");return f.addEventListener("pointerleave",C),m.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",C),m.removeEventListener("pointerleave",E)}}},[f,m,w,b]),x.useEffect(()=>{if(u){const C=Jt(E=>{const S=E.target,R={x:E.clientX,y:E.clientY},k=f?.contains(S)||m?.contains(S),I=!zS(R,u);k?b():I&&(b(),g())},"handleTrackPointerGrace");return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[f,m,u,g,b]),p.jsx(MS,{...t,ref:c})},"TooltipContentHoverable")),jO=_1("TooltipContent"),MS=x.forwardRef(Jt(function(t,n){const{__scopeTooltip:i,children:o,"aria-label":a,id:c,onEscapeKeyDown:u,onPointerDownOutside:h,...f}=t,g=yc(ec,i),m=kA(i),{onClose:y}=g;x.useEffect(()=>(document.addEventListener(sg,y),()=>document.removeEventListener(sg,y)),[y]),x.useEffect(()=>{if(g.trigger){const w=Jt(C=>{C.target instanceof Node&&C.target.contains(g.trigger)&&y()},"handleScroll");return window.addEventListener("scroll",w,{capture:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})}},[g.trigger,y]);const{setContentId:b}=g;return vt(()=>(b(c),()=>{b(void 0)}),[c,b]),p.jsx(Ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:w=>w.preventDefault(),onDismiss:y,children:p.jsxs(aA,{"data-state":g.stateAttribute,role:a?void 0:"tooltip",id:a?void 0:g.contentId,...m,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(jO,{children:o}),a?p.jsx(_T,{id:g.contentId,role:"tooltip",children:a}):null]})})},"TooltipContentImpl"));function NS(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,i,o,a)){case a:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}Jt(NS,"getExitSideFromRect");function _S(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}Jt(_S,"getPaddedExitPoints");function OS(e){const{top:t,right:n,bottom:i,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:i},{x:o,y:i}]}Jt(OS,"getPointsFromRect");function zS(e,t){const{x:n,y:i}=e;let o=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const u=t[a],h=t[c],f=u.x,g=u.y,m=h.x,y=h.y;g>i!=y>i&&n<(m-f)*(i-g)/(y-g)+f&&(o=!o)}return o}Jt(zS,"isPointInPolygon");function LS(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),PS(t)}Jt(LS,"getHull");function PS(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const o=e[i];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(o.y-c.y)>=(a.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const o=e[i];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(o.y-c.y)>=(a.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Jt(PS,"getHullPresorted");var DO=CO,MO=SO,NO=kO,_O=RO,OO=QO;function FS(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=FS(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function HS(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=FS(e))&&(i&&(i+=" "),i+=t);return i}const zO=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},LO=(e,t)=>({classGroupId:e,validator:t}),US=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Sd="-",Sw=[],PO="arbitrary..",FO=e=>{const t=UO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return HO(c);const u=c.split(Sd),h=u[0]===""&&u.length>1?1:0;return qS(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=i[c],f=n[c];return h?f?zO(f,h):h:f||Sw}return n[c]||Sw}}},qS=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const f=qS(e,t+1,a);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(Sd):e.slice(t).join(Sd),h=c.length;for(let f=0;f<h;f++){const g=c[f];if(g.validator(u))return g.classGroupId}},HO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?PO+i:void 0})(),UO=e=>{const{theme:t,classGroups:n}=e;return qO(n,t)},qO=(e,t)=>{const n=US();for(const i in e){const o=e[i];IA(o,n,i,t)}return n},IA=(e,t,n,i)=>{const o=e.length;for(let a=0;a<o;a++){const c=e[a];GO(c,t,n,i)}},GO=(e,t,n,i)=>{if(typeof e=="string"){YO(e,t,n);return}if(typeof e=="function"){KO(e,t,n,i);return}$O(e,t,n,i)},YO=(e,t,n)=>{const i=e===""?t:GS(t,e);i.classGroupId=n},KO=(e,t,n,i)=>{if(VO(e)){IA(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(LO(n,e))},$O=(e,t,n,i)=>{const o=Object.entries(e),a=o.length;for(let c=0;c<a;c++){const[u,h]=o[c];IA(h,GS(t,u),n,i)}},GS=(e,t)=>{let n=e;const i=t.split(Sd),o=i.length;for(let a=0;a<o;a++){const c=i[a];let u=n.nextPart.get(c);u||(u=US(),n.nextPart.set(c,u)),n=u}return n},VO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,JO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(a,c)=>{n[a]=c,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(a){let c=n[a];if(c!==void 0)return c;if((c=i[a])!==void 0)return o(a,c),c},set(a,c){a in n?n[a]=c:o(a,c)}}},ag="!",kw=":",XO=[],Bw=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),WO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const a=[];let c=0,u=0,h=0,f;const g=o.length;for(let C=0;C<g;C++){const E=o[C];if(c===0&&u===0){if(E===kw){a.push(o.slice(h,C)),h=C+1;continue}if(E==="/"){f=C;continue}}E==="["?c++:E==="]"?c--:E==="("?u++:E===")"&&u--}const m=a.length===0?o:o.slice(h);let y=m,b=!1;m.endsWith(ag)?(y=m.slice(0,-1),b=!0):m.startsWith(ag)&&(y=m.slice(1),b=!0);const w=f&&f>h?f-h:void 0;return Bw(a,b,y,w)};if(t){const o=t+kw,a=i;i=c=>c.startsWith(o)?a(c.slice(o.length)):Bw(XO,!1,c,void 0,!0)}if(n){const o=i;i=a=>n({className:a,parseClassName:o})}return i},ZO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let a=0;a<n.length;a++){const c=n[a],u=c[0]==="[",h=t.has(c);u||h?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(c)):o.push(c)}return o.length>0&&(o.sort(),i.push(...o)),i}},ez=e=>({cache:JO(e.cacheSize),parseClassName:WO(e),sortModifiers:ZO(e),postfixLookupClassGroupIds:tz(e),...FO(e)}),tz=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},nz=/\s+/,rz=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:a,postfixLookupClassGroupIds:c}=t,u=[],h=e.trim().split(nz);let f="";for(let g=h.length-1;g>=0;g-=1){const m=h[g],{isExternal:y,modifiers:b,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:E}=n(m);if(y){f=m+(f.length>0?" "+f:f);continue}let S=!!E,R;if(S){const j=C.substring(0,E);R=i(j);const _=R&&c[R]?i(C):void 0;_&&_!==R&&(R=_,S=!1)}else R=i(C);if(!R){if(!S){f=m+(f.length>0?" "+f:f);continue}if(R=i(C),!R){f=m+(f.length>0?" "+f:f);continue}S=!1}const k=b.length===0?"":b.length===1?b[0]:a(b).join(":"),I=w?k+ag:k,T=I+R;if(u.indexOf(T)>-1)continue;u.push(T);const Q=o(R,S);for(let j=0;j<Q.length;++j){const _=Q[j];u.push(I+_)}f=m+(f.length>0?" "+f:f)}return f},iz=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=YS(n))&&(o&&(o+=" "),o+=i);return o},YS=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=YS(e[i]))&&(n&&(n+=" "),n+=t);return n},sz=(e,...t)=>{let n,i,o,a;const c=h=>{const f=t.reduce((g,m)=>m(g),e());return n=ez(f),i=n.cache.get,o=n.cache.set,a=u,u(h)},u=h=>{const f=i(h);if(f)return f;const g=rz(h,n);return o(h,g),g};return a=c,(...h)=>a(iz(...h))},oz=[],Ut=e=>{const t=n=>n[e]||oz;return t.isThemeGetter=!0,t},KS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$S=/^\((?:(\w[\w-]*):)?(.+)\)$/i,az=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cz=/\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$/,uz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wi=e=>az.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),Qr=e=>!!e&&Number.isInteger(Number(e)),Zp=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),ai=e=>lz.test(e),VS=()=>!0,hz=e=>cz.test(e)&&!uz.test(e),RA=()=>!1,pz=e=>dz.test(e),mz=e=>fz.test(e),gz=e=>!ye(e)&&!ve(e),Az=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),yz=e=>hs(e,WS,RA),ye=e=>KS.test(e),Ls=e=>hs(e,ZS,hz),Iw=e=>hs(e,kz,Pe),vz=e=>hs(e,tk,VS),bz=e=>hs(e,ek,RA),Rw=e=>hs(e,JS,RA),xz=e=>hs(e,XS,mz),Vu=e=>hs(e,nk,pz),ve=e=>$S.test(e),jl=e=>fo(e,ZS),wz=e=>fo(e,ek),Qw=e=>fo(e,JS),Cz=e=>fo(e,WS),Ez=e=>fo(e,XS),Ju=e=>fo(e,nk,!0),Sz=e=>fo(e,tk,!0),hs=(e,t,n)=>{const i=KS.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},fo=(e,t,n=!1)=>{const i=$S.exec(e);return i?i[1]?t(i[1]):n:!1},JS=e=>e==="position"||e==="percentage",XS=e=>e==="image"||e==="url",WS=e=>e==="length"||e==="size"||e==="bg-size",ZS=e=>e==="length",kz=e=>e==="number",ek=e=>e==="family-name",tk=e=>e==="number"||e==="weight",nk=e=>e==="shadow",Bz=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),i=Ut("font-weight"),o=Ut("tracking"),a=Ut("leading"),c=Ut("breakpoint"),u=Ut("container"),h=Ut("spacing"),f=Ut("radius"),g=Ut("shadow"),m=Ut("inset-shadow"),y=Ut("text-shadow"),b=Ut("drop-shadow"),w=Ut("blur"),C=Ut("perspective"),E=Ut("aspect"),S=Ut("ease"),R=Ut("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...I(),ve,ye],Q=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],_=()=>[ve,ye,h],F=()=>[Wi,"full","auto",..._()],O=()=>[Qr,"none","subgrid",ve,ye],H=()=>["auto",{span:["full",Qr,ve,ye]},Qr,ve,ye],U=()=>[Qr,"auto",ve,ye],J=()=>["auto","min","max","fr",ve,ye],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",..._()],V=()=>[Wi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],ie=()=>[Wi,"screen","full","dvw","lvw","svw","min","max","fit",..._()],de=()=>[Wi,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],D=()=>[e,ve,ye],z=()=>[...I(),Qw,Rw,{position:[ve,ye]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",Cz,yz,{size:[ve,ye]}],X=()=>[Zp,jl,Ls],ee=()=>["","none","full",f,ve,ye],ne=()=>["",Pe,jl,Ls],fe=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Pe,Zp,Qw,Rw],Me=()=>["","none",w,ve,ye],Te=()=>["none",Pe,ve,ye],_e=()=>["none",Pe,ve,ye],$e=()=>[Pe,ve,ye],lt=()=>[Wi,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ai],breakpoint:[ai],color:[VS],container:[ai],"drop-shadow":[ai],ease:["in","out","in-out"],font:[gz],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ai],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ai],shadow:[ai],spacing:["px",Pe],text:[ai],"text-shadow":[ai],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wi,ye,ve,E]}],container:["container"],"container-type":[{"@container":["","normal","size",ve,ye]}],"container-named":[Az],columns:[{columns:[Pe,ye,ve,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:T()}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],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:[Qr,"auto",ve,ye]}],basis:[{basis:[Wi,"full","auto",u,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,Wi,"auto","initial","none",ye]}],grow:[{grow:["",Pe,ve,ye]}],shrink:[{shrink:["",Pe,ve,ye]}],order:[{order:[Qr,"first","last","none",ve,ye]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[u,"screen",...V()]}],"min-w":[{"min-w":[u,"screen","none",...V()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,jl,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Sz,vz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zp,ye]}],"font-family":[{font:[wz,bz,t]}],"font-features":[{"font-features":[ye]}],"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:[o,ve,ye]}],"line-clamp":[{"line-clamp":[Pe,"none",ve,Iw]}],leading:[{leading:[a,..._()]}],"list-image":[{"list-image":["none",ve,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",ve,Ls]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Pe,"auto",ve,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"tab-size":[{tab:[Qr,ve,ye]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ye]}],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",ve,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qr,ve,ye],radial:["",ve,ye],conic:[Qr,ve,ye]},Ez,xz]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,ve,ye]}],"outline-w":[{outline:["",Pe,jl,Ls]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",g,Ju,Vu]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",m,Ju,Vu]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Pe,Ls]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",y,Ju,Vu]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Pe,ve,ye]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ve,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":I()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ye]}],filter:[{filter:["","none",ve,ye]}],blur:[{blur:Me()}],brightness:[{brightness:[Pe,ve,ye]}],contrast:[{contrast:[Pe,ve,ye]}],"drop-shadow":[{"drop-shadow":["","none",b,Ju,Vu]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Pe,ve,ye]}],"hue-rotate":[{"hue-rotate":[Pe,ve,ye]}],invert:[{invert:["",Pe,ve,ye]}],saturate:[{saturate:[Pe,ve,ye]}],sepia:[{sepia:["",Pe,ve,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ye]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,ve,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,ve,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,ve,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,ve,ye]}],"backdrop-invert":[{"backdrop-invert":["",Pe,ve,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,ve,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,ve,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,ve,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",ve,ye]}],ease:[{ease:["linear","initial",S,ve,ye]}],delay:[{delay:[Pe,ve,ye]}],animate:[{animate:["none",R,ve,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ve,ye]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:Te()}],"rotate-x":[{"rotate-x":Te()}],"rotate-y":[{"rotate-y":Te()}],"rotate-z":[{"rotate-z":Te()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[ve,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lt()}],"translate-x":[{"translate-x":lt()}],"translate-y":[{"translate-y":lt()}],"translate-z":[{"translate-z":lt()}],"translate-none":["translate-none"],zoom:[{zoom:[Qr,ve,ye]}],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",ve,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ve,ye]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Pe,jl,Ls,Iw]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Iz=sz(Bz);function pe(...e){return Iz(HS(e))}function rf(e){const t=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(t))return"";const n=Math.round((Date.now()-t)/1e3);if(n<45)return"just now";const i=Math.round(n/60);if(i<60)return`${i}m ago`;const o=Math.round(i/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`}function Rz(e){const t=e.replace(/[-_.]/g," ").trim().split(/\s+/);return t.length===0||!t[0]?"?":t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function tc(e){return e.split("/").filter(Boolean).pop()??e}function Xe(e){return e instanceof Error?e.message:String(e)}const Qz=typeof navigator<"u"&&/Mac/i.test(navigator.userAgent),cn=Qz?"⌘":"Ctrl";function Tz({delayDuration:e=400,...t}){return p.jsx(DO,{"data-slot":"tooltip-provider",delayDuration:e,skipDelayDuration:200,...t})}function jz(e){return p.jsx(MO,{"data-slot":"tooltip",...e})}function Dz(e){return p.jsx(NO,{"data-slot":"tooltip-trigger",...e})}function Mz({className:e,sideOffset:t=4,children:n,...i}){return p.jsx(_O,{children:p.jsx(OO,{"data-slot":"tooltip-content",sideOffset:t,className:pe("z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-md border border-border bg-popover px-2 py-1 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...i,children:n})})}function Fe({label:e,side:t,children:n}){return p.jsxs(jz,{children:[p.jsx(Dz,{asChild:!0,children:n}),p.jsx(Mz,{side:t,children:e})]})}const Nz=new NQ({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1,staleTime:5e3}}}),Je={repo:["repo"],version:["version"],recents:["recents"],sidebar:e=>["sidebar",e],sync:e=>["sync",e],branches:e=>["branches",e],settings:e=>["settings",e],sessions:e=>["sessions",e],diff:(e,t,n)=>["diff",e,t,n],worktreeDiff:(e,t,n)=>["worktree-diff",e,t,n],parsedDiff:e=>["parsed-diff",e],threads:(e,t)=>["threads",e,t],prDescription:(e,t)=>["pr-description",e,t],activity:e=>["session-activity",e],commentImage:e=>["comment-image",e],drafts:(e,t)=>["drafts",e,t],reviewViewer:e=>["review-viewer",e],branchRemoval:(e,t)=>["branch-removal",e,t],fileAnalysis:(e,t,n)=>["file-analysis",e,t,n],codeTokens:(e,t,n)=>["code-tokens",e,t,n]};function _z(e){e.removeQueries({predicate:t=>t.queryKey[0]!==Je.repo[0]}),e.getMutationCache().clear()}function rk(e){let t=3735928559,n=1103547991;for(let o=0;o<e.length;o++){const a=e.charCodeAt(o);t=Math.imul(t^a,2654435761),n=Math.imul(n^a,1597334677)}t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909);const i=4294967296*(2097151&n)+(t>>>0);return`${e.length}-${i.toString(36)}`}let kd={theme:"system",nativeFrame:!1};const Bd=new Set;async function Oz(){try{kd=await window.kirby.getDesktopPrefs()}catch{}for(const e of Bd)e();return kd}async function zz(e){kd=await window.kirby.setDesktopPrefs(e);for(const t of Bd)t()}function Lz(e){return Bd.add(e),()=>Bd.delete(e)}function ik(){return x.useSyncExternalStore(Lz,()=>kd)}const Pz=typeof navigator<"u"&&/Mac/i.test(navigator.userAgent),Fz=["index ","--- ","+++ "];function Hz(e){const t=e.split(`
|
|
50
|
+
`);return t.length>0&&t[t.length-1]===""&&t.pop(),t.map(n=>n.endsWith("\r")?n.slice(0,-1):n)}function Uz(e){const t=e.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);return t?{oldLine:parseInt(t[1],10),newLine:parseInt(t[2],10)}:null}function qz(e,t){return e.startsWith("+")?{type:"add",content:e.slice(1),newLine:t.newLine++}:e.startsWith("-")?{type:"remove",content:e.slice(1),oldLine:t.oldLine++}:e.startsWith(" ")||e===""?{type:"context",content:e.startsWith(" ")?e.slice(1):e,oldLine:t.oldLine++,newLine:t.newLine++}:null}function Gz(e){const t=new Map;let n=null,i=[];const o={oldLine:0,newLine:0};for(const a of Hz(e)){if(a.startsWith("diff --git ")){n&&t.set(n,i);const u=a.match(/diff --git a\/(.+?) b\/(.+)/);n=u?u[2]:null,i=[];continue}if(Fz.some(u=>a.startsWith(u)))continue;if(a.startsWith("@@")){const u=Uz(a);u&&(o.oldLine=u.oldLine,o.newLine=u.newLine),i.push({type:"hunk-header",content:a});continue}if(!n)continue;const c=qz(a,o);c&&i.push(c)}return n&&t.set(n,i),t}let Ps=null,Yz=1;const Pl=new Map;function Kz(){return Ps||(Ps=new Worker(new URL(""+new URL("diff-worker-cT02HnWg.js",import.meta.url).href,import.meta.url),{type:"module"}),Ps.onmessage=e=>{const t=Pl.get(e.data.id);t&&(Pl.delete(e.data.id),e.data.type==="error"?t.reject(new Error(e.data.message)):t.resolve(e.data))},Ps.onerror=()=>{for(const{reject:e}of Pl.values())e(new Error("diff worker crashed"));Pl.clear(),Ps?.terminate(),Ps=null}),Ps}function QA(e){const t=Yz++;return new Promise((n,i)=>{Pl.set(t,{resolve:n,reject:i}),Kz().postMessage({...e,id:t})})}async function $z(e){try{const t=await QA({type:"parse",text:e});if(t.type==="parse")return t.entries}catch{}return[...Gz(e).entries()]}async function Vz(e,t,n){const i=await QA({type:"analyze",filename:e,lines:t,theme:n});return i.type!=="analyze"?{tokens:null,wordRanges:new Map}:{tokens:i.tokens,wordRanges:new Map(i.wordRanges)}}async function Jz(e,t,n){const i=await QA({type:"code",code:e,tag:t,theme:n});return i.type==="code"?i.tokens:null}async function Xz(){const[e]=await Promise.all([window.kirby.getRepo().catch(()=>null),Oz()]);return e}function Wz(){return Gt({queryKey:Je.repo,queryFn:Xz,staleTime:1/0})}function Zz(){return Gt({queryKey:Je.version,queryFn:()=>window.kirby.getVersion(),staleTime:1/0})}function sk(){return Gt({queryKey:Je.recents,queryFn:()=>window.kirby.listRecentRepos(),staleTime:0})}function eL(e){return Gt({queryKey:Je.sidebar(e),queryFn:()=>window.kirby.getSidebarModel(),refetchInterval:4e3,placeholderData:t=>t})}function tL(e){return Gt({queryKey:Je.sync(e),queryFn:()=>window.kirby.getSyncState(),refetchInterval:4e3,placeholderData:t=>t})}function ok(e,t=!0){return Gt({queryKey:Je.branches(e),queryFn:()=>window.kirby.listAllBranches(),enabled:t,staleTime:3e4})}function nL(e){return window.kirby.canRemoveBranch(e).catch(t=>({safe:!1,reason:Xe(t)}))}function rL(e,t){return Gt({queryKey:Je.branchRemoval(e,t),queryFn:()=>nL(t),staleTime:0,gcTime:0})}function iL(e){return Gt({queryKey:Je.settings(e),queryFn:()=>window.kirby.getSettingsView()})}function sL(e,t,n,i={}){return Gt({queryKey:Je.diff(e,t,n),queryFn:()=>window.kirby.fetchDiffText(t,n),enabled:i.enabled??!0,staleTime:6e4})}function oL(e,t,n,i){return Gt({queryKey:Je.worktreeDiff(e,t,n),queryFn:()=>window.kirby.fetchWorktreeDiffText(t,n),enabled:i.enabled,refetchInterval:i.live?2e3:!1,placeholderData:o=>o,staleTime:0})}function aL(e){const t=x.useMemo(()=>e==null?"":rk(e),[e]);return Gt({queryKey:Je.parsedDiff(t),queryFn:()=>$z(e??"").catch(()=>[]),enabled:e!=null,staleTime:1/0,gcTime:0})}function lL(e,t){return Gt({queryKey:Je.threads(e,t),queryFn:()=>window.kirby.fetchCommentThreads(t),staleTime:3e4,enabled:t>0})}function cL(e){return Gt({queryKey:Je.sessions(e),queryFn:()=>window.kirby.listSessions(),refetchInterval:2e3,placeholderData:t=>t})}function ak(e){return Gt({queryKey:Je.activity(e),queryFn:()=>window.kirby.getSessionActivity(),refetchInterval:1e3,placeholderData:t=>t})}function uL(e,t){return Gt({queryKey:Je.prDescription(e,t),queryFn:()=>window.kirby.fetchPrDescription(t),staleTime:5*6e4,enabled:t>0})}function dL(e){return Gt({queryKey:Je.commentImage(e),queryFn:()=>window.kirby.fetchCommentImage(e),enabled:e.length>0,staleTime:1/0,gcTime:10*6e4})}function fL(e,t){return Gt({queryKey:Je.drafts(e,t),queryFn:()=>window.kirby.listDraftComments(t),refetchInterval:2e3,placeholderData:n=>n,enabled:t>0})}const lk=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const hL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const pL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const Tw=e=>{const t=pL(e);return t.charAt(0).toUpperCase()+t.slice(1)};var em={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const mL=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},gL=x.createContext({}),AL=()=>x.useContext(gL),yL=x.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:o="",children:a,iconNode:c,...u},h)=>{const{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:m=!1,color:y="currentColor",className:b=""}=AL()??{},w=i??m?Number(n??g)*24/Number(t??f):n??g;return x.createElement("svg",{ref:h,...em,width:t??f??em.width,height:t??f??em.height,stroke:e??y,strokeWidth:w,className:lk("lucide",b,o),...!a&&!mL(u)&&{"aria-hidden":"true"},...u},[...c.map(([C,E])=>x.createElement(C,E)),...Array.isArray(a)?a:[a]])});const Ae=(e,t)=>{const n=x.forwardRef(({className:i,...o},a)=>x.createElement(yL,{ref:a,iconNode:t,className:lk(`lucide-${hL(Tw(e))}`,`lucide-${e}`,i),...o}));return n.displayName=Tw(e),n};const vL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],bL=Ae("arrow-right",vL);const xL=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],wL=Ae("book-open",xL);const CL=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],TA=Ae("bot",CL);const EL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Lr=Ae("check",EL);const SL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Er=Ae("chevron-down",SL);const kL=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],BL=Ae("chevron-left",kL);const IL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ci=Ae("chevron-right",IL);const RL=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jA=Ae("chevron-up",RL);const QL=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],TL=Ae("chevrons-up-down",QL);const jL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],lg=Ae("circle-alert",jL);const DL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],vc=Ae("circle-check",DL);const ML=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],NL=Ae("circle-dashed",ML);const _L=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],ck=Ae("circle-dot",_L);const OL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],zL=Ae("circle-slash",OL);const LL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],sf=Ae("circle-x",LL);const PL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],FL=Ae("circle",PL);const HL=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],UL=Ae("clipboard-check",HL);const qL=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],uk=Ae("clipboard-list",qL);const GL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],dk=Ae("clock",GL);const YL=[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],KL=Ae("cloud-off",YL);const $L=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],VL=Ae("code",$L);const JL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],XL=Ae("columns-2",JL);const WL=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ZL=Ae("copy",WL);const e3=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],fk=Ae("corner-down-right",e3);const t3=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],cg=Ae("external-link",t3);const n3=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],DA=Ae("eye-off",n3);const r3=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hk=Ae("eye",r3);const i3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],s3=Ae("file-diff",i3);const o3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],pk=Ae("file",o3);const a3=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],l3=Ae("files",a3);const c3=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],MA=Ae("folder-open",c3);const u3=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],d3=Ae("folder",u3);const f3=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],h3=Ae("git-branch-plus",f3);const p3=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Da=Ae("git-branch",p3);const m3=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M18 6V5",key:"1oao2s"}],["path",{d:"M18 11v-1",key:"11c8tz"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],g3=Ae("git-pull-request-draft",m3);const A3=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],of=Ae("git-pull-request",A3);const y3=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],v3=Ae("image-off",y3);const b3=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],x3=Ae("list-plus",b3);const w3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ho=Ae("loader-circle",w3);const C3=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],E3=Ae("menu",C3);const S3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],k3=Ae("message-square-plus",S3);const B3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],I3=Ae("message-square-text",B3);const R3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]],Q3=Ae("message-square-warning",R3);const T3=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],po=Ae("message-square",T3);const j3=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],D3=Ae("messages-square",j3);const M3=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],N3=Ae("monitor",M3);const _3=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ug=Ae("moon",_3);const O3=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],nc=Ae("notebook-pen",O3);const z3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],mk=Ae("panel-left-close",z3);const L3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],gk=Ae("panel-left-open",L3);const P3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],F3=Ae("panel-left",P3);const H3=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ak=Ae("pencil",H3);const U3=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Id=Ae("play",U3);const q3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jw=Ae("plus",q3);const G3=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],NA=Ae("refresh-cw",G3);const Y3=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],_A=Ae("rotate-ccw",Y3);const K3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],$3=Ae("rows-2",K3);const V3=[["path",{d:"m13 13.5 2-2.5-2-2.5",key:"1rvxrh"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}],["path",{d:"M9 8.5 7 11l2 2.5",key:"6ffwbx"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J3=Ae("search-code",V3);const X3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yk=Ae("search",X3);const W3=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],af=Ae("send",W3);const Z3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],OA=Ae("settings",Z3);const e5=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],t5=Ae("skip-forward",e5);const n5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],r5=Ae("square",n5);const i5=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],dg=Ae("sun",i5);const s5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],vk=Ae("terminal",s5);const o5=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],a5=Ae("text-wrap",o5);const l5=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],bk=Ae("trash-2",l5);const c5=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],xk=Ae("triangle-alert",c5);const u5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ma=Ae("x",u5);function zA({className:e}){return p.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:pe("text-primary",e),children:[p.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"6",fill:"currentColor"}),p.jsx("path",{d:"M8 7v10M8 12c0-2.5 2-3.5 4-3.5h1M16 7a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM8 15.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zM8 5.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Dw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mw=HS,wk=(e,t)=>n=>{var i;if(t?.variants==null)return Mw(e,n?.class,n?.className);const{variants:o,defaultVariants:a}=t,c=Object.keys(o).map(f=>{const g=n?.[f],m=a?.[f];if(g===null)return null;const y=Dw(g)||Dw(m);return o[f][y]}),u=n&&Object.entries(n).reduce((f,g)=>{let[m,y]=g;return y===void 0||(f[m]=y),f},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((f,g)=>{let{class:m,className:y,...b}=g;return Object.entries(b).every(w=>{let[C,E]=w;return Array.isArray(E)?E.includes({...a,...u}[C]):{...a,...u}[C]===E})?[...f,m,y]:f},[]);return Mw(e,c,h,n?.class,n?.className)},d5=wk("inline-flex shrink-0 cursor-default items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-accent border border-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 px-3 text-base has-[>svg]:px-2.5",sm:"h-6 rounded px-2 text-sm has-[>svg]:px-1.5",lg:"h-9 rounded-md px-5 text-base",icon:"size-7","icon-sm":"size-6 rounded [&_svg:not([class*=size-])]:size-3.5","icon-xs":"size-5 rounded [&_svg:not([class*=size-])]:size-3.5"}},defaultVariants:{variant:"default",size:"default"}});function be({className:e,variant:t,size:n,asChild:i=!1,...o}){const a=i?ST:"button";return p.jsx(a,{"data-slot":"button",className:pe(d5({variant:t,size:n,className:e})),...o})}function LA(e){return p.jsx(YN,{"data-slot":"dropdown-menu",...e})}function PA(e){return p.jsx(KN,{"data-slot":"dropdown-menu-trigger",...e})}function FA({className:e,sideOffset:t=4,...n}){return p.jsx($N,{children:p.jsx(VN,{"data-slot":"dropdown-menu-content",sideOffset:t,className:pe("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[10rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...n})})}function fg({className:e,inset:t,variant:n="default",...i}){return p.jsx(XN,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:pe("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg]:text-destructive",e),...i})}function f5({className:e,children:t,checked:n,...i}){return p.jsxs(WN,{"data-slot":"dropdown-menu-checkbox-item",className:pe("relative flex cursor-default select-none items-center gap-2 rounded-sm py-1 pr-2 pl-7 text-base outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(ZN,{children:p.jsx(Lr,{className:"size-3.5"})})}),t]})}function Rd({className:e,inset:t,...n}){return p.jsx(JN,{"data-slot":"dropdown-menu-label","data-inset":t,className:pe("px-2 py-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground data-[inset]:pl-7",e),...n})}function Nw({className:e,...t}){return p.jsx(e_,{"data-slot":"dropdown-menu-separator",className:pe("-mx-1 my-1 h-px bg-border",e),...t})}function es({className:e,...t}){return p.jsx("kbd",{"data-slot":"kbd",className:pe("inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1 font-sans text-xs font-medium text-muted-foreground",e),...t})}function Ck({repo:e,onSwitchRepo:t,onOpenRepo:n,onOpenPalette:i,onOpenSettings:o}){const{nativeFrame:a}=ik(),c=!a;return p.jsxs("header",{className:`${c?"app-drag":""} relative z-20 flex h-9 shrink-0 select-none items-center bg-titlebar text-sidebar-foreground shadow-[inset_0_-1px_0_0_var(--color-border)]`,style:c?{paddingLeft:"env(titlebar-area-x, 0px)",paddingRight:"calc(100% - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100%))"}:void 0,children:[p.jsxs("div",{className:"flex h-full min-w-0 flex-1 items-center gap-1 pl-2",children:[!a&&!Pz&&p.jsx(Fe,{label:"Menu",children:p.jsx(be,{variant:"ghost",size:"icon","aria-label":"Application menu",className:"app-no-drag",onClick:()=>{window.kirby.showAppMenu()},children:p.jsx(E3,{})})}),p.jsx("div",{className:"app-no-drag flex items-center pl-1",children:p.jsx(zA,{className:"size-5"})}),e?p.jsx(h5,{repo:e,onSwitchRepo:t,onOpenRepo:n}):p.jsx("span",{className:"px-2 text-base font-medium",children:"Kirby"})]}),e&&i&&p.jsx("div",{className:"app-no-drag flex shrink-0 justify-center",children:p.jsxs("button",{type:"button",onClick:i,className:"flex h-6 w-[min(34rem,40vw)] items-center gap-2 rounded-md border border-border bg-background/60 px-2.5 text-sm text-muted-foreground transition-colors hover:bg-background hover:text-foreground",children:[p.jsx(yk,{className:"size-3.5"}),p.jsx("span",{className:"flex-1 truncate text-left",children:"Search branches, pull requests, commands…"}),p.jsxs(es,{className:"ml-2 h-4 min-w-4 px-1 text-[10px]",children:[cn," K"]})]})}),p.jsxs("div",{className:"flex h-full flex-1 items-center justify-end gap-0.5 pr-2",children:[p.jsx(p5,{}),e&&o&&p.jsx(Fe,{label:`Settings (${cn} ,)`,children:p.jsx(be,{variant:"ghost",size:"icon",onClick:o,"aria-label":"Settings",className:"app-no-drag",children:p.jsx(OA,{})})})]})]})}function h5({repo:e,onSwitchRepo:t,onOpenRepo:n}){const o=(sk().data??[]).filter(a=>a.cwd!==e.cwd&&a.valid);return p.jsxs(LA,{children:[p.jsx(PA,{asChild:!0,children:p.jsxs("button",{type:"button",className:"app-no-drag flex h-6 max-w-72 items-center gap-1 rounded-md px-2 text-base font-medium transition-colors hover:bg-accent",children:[p.jsx("span",{className:"truncate",children:tc(e.cwd)}),p.jsx(Er,{className:"size-3.5 opacity-60"})]})}),p.jsxs(FA,{align:"start",className:"min-w-64",children:[p.jsx(Rd,{children:"Repository"}),p.jsx("div",{className:"truncate px-2 pb-1.5 font-mono text-xs text-muted-foreground",children:e.cwd}),p.jsx(Nw,{}),o.length>0&&p.jsxs(p.Fragment,{children:[p.jsx(Rd,{children:"Recent"}),o.slice(0,6).map(a=>p.jsxs(fg,{onSelect:()=>n?.(a.cwd),className:"flex-col items-start gap-0",children:[p.jsx("span",{children:tc(a.cwd)}),p.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:a.cwd})]},a.cwd)),p.jsx(Nw,{})]}),p.jsxs(fg,{onSelect:t,children:[p.jsx(MA,{}),"Open another repository…"]})]})]})}function p5(){const{preference:e,resolved:t,setPreference:n}=us(),i=t==="dark"?ug:dg,o=[{value:"system",label:"System",icon:N3},{value:"light",label:"Light",icon:dg},{value:"dark",label:"Dark",icon:ug}];return p.jsxs(LA,{children:[p.jsx(Fe,{label:"Theme",children:p.jsx(PA,{asChild:!0,children:p.jsx(be,{variant:"ghost",size:"icon","aria-label":"Theme",className:"app-no-drag",children:p.jsx(i,{})})})}),p.jsxs(FA,{align:"end",className:"min-w-36",children:[p.jsx(Rd,{children:"Theme"}),o.map(a=>p.jsxs(f5,{checked:e===a.value,onCheckedChange:()=>n(a.value),children:[p.jsx(a.icon,{className:"mr-1 size-3.5 text-muted-foreground"}),a.label]},a.value))]})]})}function HA({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",spellCheck:!1,className:pe("flex h-7 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-base text-foreground shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function m5({onOpened:e}){const t=sk(),[n,i]=x.useState(""),[o,a]=x.useState(!1),c=async f=>{const g=(f??n).trim();if(g){a(!0);try{e(await window.kirby.openRepo(g))}catch(m){Ee.error(Xe(m)),t.refetch()}finally{a(!1)}}},u=async()=>{try{const f=await window.kirby.selectRepoDirectory();f&&c(f)}catch(f){Ee.error(Xe(f))}},h=t.data??[];return p.jsxs("div",{className:"flex h-screen flex-col bg-background",children:[p.jsx(Ck,{repo:null,onSwitchRepo:()=>{}}),p.jsx("main",{className:"flex min-h-0 flex-1 items-center justify-center p-8",children:p.jsxs("div",{className:"grid w-full max-w-3xl grid-cols-[1fr_1.1fr] gap-10",children:[p.jsxs("section",{className:"flex flex-col justify-center",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(zA,{className:"size-10"}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Kirby"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Worktrees, agents and reviews for one repository."})]})]}),p.jsxs("div",{className:"mt-8 space-y-3",children:[p.jsxs(be,{size:"lg",className:"w-full",onClick:()=>{u()},disabled:o,children:[p.jsx(MA,{})," ",o?"Opening…":"Open repository…"]}),p.jsxs("form",{className:"flex gap-2",onSubmit:f=>{f.preventDefault(),c()},children:[p.jsx(HA,{value:n,onChange:f=>i(f.target.value),placeholder:"/path/to/repository",className:"h-9 font-mono"}),p.jsx(be,{type:"submit",variant:"outline",size:"lg",disabled:o||!n.trim(),children:"Open"})]})]})]}),p.jsxs("section",{className:"flex min-h-64 flex-col rounded-lg border border-border bg-card",children:[p.jsxs("div",{className:"flex h-9 items-center gap-2 border-b border-border px-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[p.jsx(dk,{className:"size-3.5"})," Recent"]}),p.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto p-1.5",children:[t.isLoading&&p.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Loading…"}),!t.isLoading&&h.length===0&&p.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Repositories you open will show up here."}),h.map(f=>p.jsxs("div",{className:"group flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-accent",children:[p.jsxs("button",{type:"button",onClick:()=>{c(f.cwd)},disabled:!f.valid||o,className:"min-w-0 flex-1 text-left disabled:opacity-50",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"truncate text-base font-medium",children:tc(f.cwd)}),!f.valid&&p.jsx("span",{className:"rounded bg-muted px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"missing"}),p.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:rf(f.lastOpenedAt)})]}),p.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:f.cwd})]}),p.jsx(be,{variant:"ghost",size:"icon-xs","aria-label":"Remove from recent",className:"opacity-0 group-hover:opacity-100",onClick:()=>{window.kirby.forgetRecent(f.cwd).then(()=>t.refetch())},children:p.jsx(Ma,{})})]},f.cwd))]})]})]})})]})}function g5(e,t){const n=getComputedStyle(e),i=parseFloat(n.fontSize);return t*i}function A5(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),i=parseFloat(n.fontSize);return t*i}function y5(e){return e/100*window.innerHeight}function v5(e){return e/100*window.innerWidth}function b5(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Fl({groupSize:e,panelElement:t,styleProp:n}){let i;const[o,a]=b5(n);switch(a){case"%":{i=o/100*e;break}case"px":{i=o;break}case"rem":{i=A5(t,o);break}case"em":{i=g5(t,o);break}case"vh":{i=y5(o);break}case"vw":{i=v5(o);break}}return i}function vn(e){return parseFloat(e.toFixed(3))}function Sa({group:e}){const{orientation:t,panels:n}=e;return n.reduce((i,o)=>(i+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,i),0)}function hg(e){const{panels:t}=e,n=Sa({group:e});return n===0?t.map(i=>({groupResizeBehavior:i.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:o,panelConstraints:a}=i;let c=0;if(a.collapsedSize!==void 0){const g=Fl({groupSize:n,panelElement:o,styleProp:a.collapsedSize});c=vn(g/n*100)}let u;if(a.defaultSize!==void 0){const g=Fl({groupSize:n,panelElement:o,styleProp:a.defaultSize});u=vn(g/n*100)}let h=0;if(a.minSize!==void 0){const g=Fl({groupSize:n,panelElement:o,styleProp:a.minSize});h=vn(g/n*100)}let f=100;if(a.maxSize!==void 0){const g=Fl({groupSize:n,panelElement:o,styleProp:a.maxSize});f=vn(g/n*100)}return{groupResizeBehavior:a.groupResizeBehavior,collapsedSize:c,collapsible:a.collapsible===!0,defaultSize:u,disabled:a.disabled,minSize:h,maxSize:f,panelId:i.id}})}function ft(e,t="Assertion error"){if(!e)throw Error(t)}function pg(e,t){return Array.from(t).sort(e==="horizontal"?x5:w5)}function x5(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function w5(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Ek(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Sk(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function C5({orientation:e,rects:t,targetRect:n}){const i={x:n.x+n.width/2,y:n.y+n.height/2};let o,a=Number.MAX_VALUE;for(const c of t){const{x:u,y:h}=Sk(i,c),f=e==="horizontal"?u:h;f<a&&(a=f,o=c)}return ft(o,"No rect found"),o}let Xu;function E5(){return Xu===void 0&&(typeof matchMedia=="function"?Xu=!!matchMedia("(pointer:coarse)").matches:Xu=!1),Xu}function kk(e){const{element:t,orientation:n,panels:i,separators:o}=e,a=pg(n,Array.from(t.children).filter(Ek).map(w=>({element:w}))).map(({element:w})=>w),c=[];let u=!1,h=!1,f=-1,g=-1,m=0,y,b=[];{let w=-1;for(const C of a)C.hasAttribute("data-panel")&&(w++,C.hasAttribute("data-disabled")||(m++,f===-1&&(f=w),g=w))}if(m>1){let w=-1;for(const C of a)if(C.hasAttribute("data-panel")){w++;const E=i.find(S=>S.element===C);if(E){if(y){const S=y.element.getBoundingClientRect(),R=C.getBoundingClientRect();let k;if(h){const I=n==="horizontal"?new DOMRect(S.right,S.top,0,S.height):new DOMRect(S.left,S.bottom,S.width,0),T=n==="horizontal"?new DOMRect(R.left,R.top,0,R.height):new DOMRect(R.left,R.top,R.width,0);switch(b.length){case 0:{k=[I,T];break}case 1:{const Q=b[0],j=C5({orientation:n,rects:[S,R],targetRect:Q.element.getBoundingClientRect()});k=[Q,j===S?T:I];break}default:{k=b;break}}}else b.length?k=b:k=[n==="horizontal"?new DOMRect(S.right,R.top,R.left-S.right,R.height):new DOMRect(R.left,S.bottom,R.width,R.top-S.bottom)];for(const I of k){let T="width"in I?I:I.element.getBoundingClientRect();const Q=E5()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(T.width<Q){const _=Q-T.width;T=new DOMRect(T.x-_/2,T.y,T.width+_,T.height)}if(T.height<Q){const _=Q-T.height;T=new DOMRect(T.x,T.y-_/2,T.width,T.height+_)}const j=w<=f||w>g;!u&&!j&&c.push({group:e,groupSize:Sa({group:e}),panels:[y,E],separator:"width"in I?void 0:I,rect:T}),u=!1}}h=!1,y=E,b=[]}}else if(C.hasAttribute("data-separator")){C.ariaDisabled!==null&&(u=!0);const E=o.find(S=>S.element===C);E?b.push(E):(y=void 0,b=[])}else h=!0}return c}class Bk{#t={};addListener(t,n){const i=this.#t[t];return i===void 0?this.#t[t]=[n]:i.includes(n)||i.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const i=this.#t[t];if(i!==void 0)if(i.length===1)i[0].call(null,n);else{let o=!1,a=null;const c=Array.from(i);for(let u=0;u<c.length;u++){const h=c[u];try{h.call(null,n)}catch(f){a===null&&(o=!0,a=f)}}if(o)throw a}}removeAllListeners(){this.#t={}}removeListener(t,n){const i=this.#t[t];if(i!==void 0){const o=i.indexOf(n);o>=0&&i.splice(o,1)}}}let ba={cursorFlags:0,state:"inactive"};const UA=new Bk;function Ws(){return ba}function S5(e){return UA.addListener("change",e)}function k5(e){const t=ba,n={...ba};n.cursorFlags=e,ba=n,UA.emit("change",{prev:t,next:n})}function xa(e){const t=ba;ba=e,UA.emit("change",{prev:t,next:e})}const B5=e=>e,tm=()=>{},Ik=1,Rk=2,Qk=4,Tk=8,_w=3,Ow=12;let Wu;function zw(){return Wu===void 0&&(Wu=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Wu=!0)),Wu}function I5({cursorFlags:e,groups:t,state:n}){let i=0,o=0;switch(n){case"active":case"hover":t.forEach(a=>{if(!a.mutableState.disableCursor)switch(a.orientation){case"horizontal":{i++;break}case"vertical":{o++;break}}})}if(!(i===0&&o===0)){switch(n){case"active":{if(e&&zw()){const a=(e&Ik)!==0,c=(e&Rk)!==0,u=(e&Qk)!==0,h=(e&Tk)!==0;if(a)return u?"se-resize":h?"ne-resize":"e-resize";if(c)return u?"sw-resize":h?"nw-resize":"w-resize";if(u)return"s-resize";if(h)return"n-resize"}break}}return zw()?i>0&&o>0?"move":i>0?"ew-resize":"ns-resize":i>0&&o>0?"grab":i>0?"col-resize":"row-resize"}}const Lw=new WeakMap;function qA(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Lw.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const i=Ws();switch(i.state){case"active":case"hover":{const o=I5({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(c=>c.group),state:i.state}),a=`*, *:hover {cursor: ${o} !important; }`;if(t===a)return;t=a,o?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}Lw.set(e,{prevStyle:t,styleSheet:n})}let Nr=new Map;const jk=new Bk;function R5(e){Nr=new Map(Nr),Nr.delete(e)}function Pw(e,t){for(const[n]of Nr)if(n.id===e)return n}function is(e,t){for(const[n,i]of Nr)if(n.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function mo(){return Nr}function GA(e,t){return jk.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function gi(e,t,n){const i=Nr.get(e);Nr=new Map(Nr),Nr.set(e,t),jk.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:i,next:t})}function Dk(e){const t=Ws();let n=!1;return t.state==="active"&&(xa({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(qA(e),n=!0,t.hitRegions.forEach(i=>{const o=is(i.group.id,!0);gi(i.group,o,{isUserInteraction:!0})}))),n}function Fw(e){e.defaultPrevented||Dk(e.currentTarget)}function Q5(e,t,n){let i,o={x:1/0,y:1/0};for(const a of t){const c=Sk(n,a.rect);switch(e){case"horizontal":{c.x<=o.x&&(i=a,o=c);break}case"vertical":{c.y<=o.y&&(i=a,o=c);break}}}return i?{distance:o,hitRegion:i}:void 0}function T5(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function j5(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:qw(e),b:qw(t)};let i;for(;n.a.at(-1)===n.b.at(-1);)i=n.a.pop(),n.b.pop();ft(i,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Uw(Hw(n.a)),b:Uw(Hw(n.b))};if(o.a===o.b){const a=i.childNodes,c={a:n.a.at(-1),b:n.b.at(-1)};let u=a.length;for(;u--;){const h=a[u];if(h===c.a)return 1;if(h===c.b)return-1}}return Math.sign(o.a-o.b)}const D5=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function M5(e){const t=getComputedStyle(Mk(e)??e).display;return t==="flex"||t==="inline-flex"}function N5(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||M5(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"||D5.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Hw(e){let t=e.length;for(;t--;){const n=e[t];if(ft(n,"Missing node"),N5(n))return n}return null}function Uw(e){return e&&Number(getComputedStyle(e).zIndex)||0}function qw(e){const t=[];for(;e;)t.push(e),e=Mk(e);return t}function Mk(e){const{parentNode:t}=e;return T5(t)?t.host:t}function _5(e,t){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 O5({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Ek(n)||n.contains(e)||e.contains(n))return!0;if(j5(n,e)>0){let i=n;for(;i;){if(i.contains(e))return!0;if(_5(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function YA(e,t){const n=[];return t.forEach((i,o)=>{if(o.disabled)return;const a=kk(o),c=Q5(o.orientation,a,{x:e.clientX,y:e.clientY});c&&c.distance.x<=0&&c.distance.y<=0&&O5({groupElement:o.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&n.push(c.hitRegion)}),n}function z5(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 dn(e,t,n=0){return Math.abs(vn(e)-vn(t))<=n}function jr(e,t){return dn(e,t)?0:e>t?1:-1}function Aa({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:i}){const{collapsedSize:o=0,collapsible:a,disabled:c,maxSize:u=100,minSize:h=0}=t;if(c&&!e)return n;if(jr(i,h)<0)if(a){const f=(o+h)/2;jr(i,f)<0?i=o:i=h}else i=h;return i=Math.min(u,i),i=vn(i),i}function rc({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:i,prevLayout:o,trigger:a}){if(dn(e,0))return t;const c=a==="imperative-api",u=Object.values(t),h=Object.values(o),f=[...u],[g,m]=i;ft(g!=null,"Invalid first pivot index"),ft(m!=null,"Invalid second pivot index");let y=0;switch(a){case"keyboard":{{const C=e<0?m:g,E=n[C];ft(E,`Panel constraints not found for index ${C}`);const{collapsedSize:S=0,collapsible:R,minSize:k=0}=E;if(R){const I=u[C];if(ft(I!=null,`Previous layout not found for panel index ${C}`),dn(I,S)){const T=k-I;jr(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}{const C=e<0?g:m,E=n[C];ft(E,`No panel constraints found for index ${C}`);const{collapsedSize:S=0,collapsible:R,minSize:k=0}=E;if(R){const I=u[C];if(ft(I!=null,`Previous layout not found for panel index ${C}`),dn(I,k)){const T=I-S;jr(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}break}default:{const C=e<0?m:g,E=n[C];ft(E,`Panel constraints not found for index ${C}`);const S=u[C],{collapsible:R,collapsedSize:k,minSize:I}=E;if(R&&jr(S,I)<0)if(e>0){const T=I-k,Q=T/2,j=S+e;jr(j,I)<0&&(e=jr(e,Q)<=0?0:T)}else{const T=I-k,Q=100-T/2,j=S-e;jr(j,I)<0&&(e=jr(100+e,Q)>0?0:-T)}break}}{const C=e<0?1:-1;let E=e<0?m:g,S=0;for(;;){const k=u[E];ft(k!=null,`Previous layout not found for panel index ${E}`);const I=Aa({overrideDisabledPanels:c,panelConstraints:n[E],prevSize:k,size:100})-k;if(S+=I,E+=C,E<0||E>=n.length)break}const R=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-R:R}{let C=e<0?g:m;for(;C>=0&&C<n.length;){const E=Math.abs(e)-Math.abs(y),S=u[C];ft(S!=null,`Previous layout not found for panel index ${C}`);const R=S-E,k=Aa({overrideDisabledPanels:c,panelConstraints:n[C],prevSize:S,size:R});if(!dn(S,k)&&(y+=S-k,f[C]=k,y.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?C--:C++}}if(z5(h,f))return o;{const C=e<0?m:g,E=u[C];ft(E!=null,`Previous layout not found for panel index ${C}`);const S=E+y,R=Aa({overrideDisabledPanels:c,panelConstraints:n[C],prevSize:E,size:S});if(f[C]=R,!dn(R,S)){let k=S-R,I=e<0?m:g;for(;I>=0&&I<n.length;){const T=f[I];ft(T!=null,`Previous layout not found for panel index ${I}`);const Q=T+k,j=Aa({overrideDisabledPanels:c,panelConstraints:n[I],prevSize:T,size:Q});if(dn(T,j)||(k-=j-T,f[I]=j),dn(k,0))break;e>0?I--:I++}}}const b=Object.values(f).reduce((C,E)=>E+C,0);if(!dn(b,100,.1))return o;const w=Object.keys(o);return f.reduce((C,E,S)=>(C[w[S]]=E,C),{})}function Zs(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||jr(e[n],t[n])!==0)return!1;return!0}function eo({layout:e,panelConstraints:t}){const n=Object.values(e),i=[...n],o=i.reduce((u,h)=>u+h,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(u=>`${u}%`).join(", ")}`);if(!dn(o,100)&&i.length>0)for(let u=0;u<t.length;u++){const h=i[u];ft(h!=null,`No layout data found for index ${u}`);const f=100/o*h;i[u]=f}let a=0;for(let u=0;u<t.length;u++){const h=n[u];ft(h!=null,`No layout data found for index ${u}`);const f=i[u];ft(f!=null,`No layout data found for index ${u}`);const g=Aa({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:h,size:f});f!=g&&(a+=f-g,i[u]=g)}if(!dn(a,0))for(let u=0;u<t.length;u++){const h=i[u];ft(h!=null,`No layout data found for index ${u}`);const f=h+a,g=Aa({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:h,size:f});if(h!==g&&(a-=g-h,i[u]=g,dn(a,0)))break}const c=Object.keys(e);return i.reduce((u,h,f)=>(u[c[f]]=h,u),{})}function Nk({groupId:e,panelId:t}){const n=()=>{const h=mo();for(const[f,{defaultLayoutDeferred:g,derivedPanelConstraints:m,layout:y,groupSize:b,separatorToPanels:w}]of h)if(f.id===e)return{defaultLayoutDeferred:g,derivedPanelConstraints:m,group:f,groupSize:b,layout:y,separatorToPanels:w};throw Error(`Group ${e} not found`)},i=()=>{const h=n().derivedPanelConstraints.find(f=>f.panelId===t);if(h!==void 0)return h;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const h=n().group.panels.find(f=>f.id===t);if(h!==void 0)return h;throw Error(`Layout not found for Panel ${t}`)},a=()=>{const h=n().layout[t];if(h!==void 0)return h;throw Error(`Layout not found for Panel ${t}`)},c=({nextSize:h,panels:f,prevLayout:g,derivedPanelConstraints:m})=>{const y=a(),b=f.findIndex(E=>E.id===t),w=b===0,C=b===f.length-1;if(C&&h<y&&(w||f.slice(0,b).every((E,S)=>{const R=m[S];return R?.collapsible&&dn(R.collapsedSize,g[R.panelId])}))){const E=f.slice(0,b).reduce((S,R)=>S+g[R.id],0);return{...g,[t]:vn(100-E)}}return rc({delta:C?y-h:h-y,initialLayout:g,panelConstraints:m,pivotIndices:C?[b-1,b]:[b,b+1],prevLayout:g,trigger:"imperative-api"})},u=h=>{const f=a();if(h===f)return;const{defaultLayoutDeferred:g,derivedPanelConstraints:m,group:y,groupSize:b,layout:w,separatorToPanels:C}=n(),E=c({nextSize:h,panels:y.panels,prevLayout:w,derivedPanelConstraints:m}),S=eo({layout:E,panelConstraints:m});Zs(w,S)||gi(y,{defaultLayoutDeferred:g,derivedPanelConstraints:m,groupSize:b,layout:S,separatorToPanels:C})};return{collapse:()=>{const{collapsible:h,collapsedSize:f}=i(),{mutableValues:g}=o(),m=a();h&&m!==f&&(g.expandToSize=m,u(f))},expand:()=>{const{collapsible:h,collapsedSize:f,minSize:g}=i(),{mutableValues:m}=o(),y=a();if(h&&y===f){let b=m.expandToSize??g;b===0&&(b=1),u(b)}},getSize:()=>{const{group:h}=n(),f=a(),{element:g}=o(),m=h.orientation==="horizontal"?g.offsetWidth:g.offsetHeight;return{asPercentage:f,inPixels:m}},isCollapsed:()=>{const{collapsible:h,collapsedSize:f}=i(),g=a();return h&&dn(f,g)},resize:h=>{const{group:f}=n(),{element:g}=o(),m=Sa({group:f}),y=Fl({groupSize:m,panelElement:g,styleProp:h}),b=vn(y/m*100);u(b)}}}function Gw(e){if(e.defaultPrevented)return;const t=mo();YA(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const i=n.panels.find(o=>o.panelConstraints.defaultSize!==void 0);if(i){const o=i.panelConstraints.defaultSize,a=Nk({groupId:n.group.id,panelId:i.id});a&&o!==void 0&&(a.resize(o),e.preventDefault())}}})}function pd(e){const t=mo();for(const[n]of t)if(n.separators.some(i=>i.element===e))return n;throw Error("Could not find parent Group for separator element")}function _k({groupId:e}){const t=()=>{const n=mo();for(const[i,o]of n)if(i.id===e)return{group:i,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:i}=t();return n?{}:i},setLayout(n){const{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:a,groupSize:c,layout:u,separatorToPanels:h}=t(),f=eo({layout:n,panelConstraints:o});return i?u:(Zs(u,f)||gi(a,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:f,separatorToPanels:h}),f)}}}function Fs(e,t){const n=pd(e),i=is(n.id,!0),o=n.separators.find(g=>g.element===e);ft(o,"Matching separator not found");const a=i.separatorToPanels.get(o);ft(a,"Matching panels not found");const c=a.map(g=>n.panels.indexOf(g)),u=_k({groupId:n.id}).getLayout(),h=rc({delta:t,initialLayout:u,panelConstraints:i.derivedPanelConstraints,pivotIndices:c,prevLayout:u,trigger:"keyboard"}),f=eo({layout:h,panelConstraints:i.derivedPanelConstraints});Zs(u,f)||gi(n,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:f,separatorToPanels:i.separatorToPanels},{isUserInteraction:!0})}function Yw(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=pd(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Fs(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Fs(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Fs(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Fs(t,-5);break}case"End":{e.preventDefault(),Fs(t,100);break}case"Enter":{e.preventDefault();const i=pd(t),o=is(i.id,!0),{derivedPanelConstraints:a,layout:c,separatorToPanels:u}=o,h=i.separators.find(y=>y.element===t);ft(h,"Matching separator not found");const f=u.get(h);ft(f,"Matching panels not found");const g=f[0],m=a.find(y=>y.panelId===g.id);if(ft(m,"Panel metadata not found"),m.collapsible){const y=c[g.id],b=m.collapsedSize===y?i.mutableState.expandedPanelSizes[g.id]??m.minSize:m.collapsedSize;Fs(t,b-y)}break}case"F6":{e.preventDefault();const i=pd(t).separators.map(c=>c.element),o=Array.from(i).findIndex(c=>c===e.currentTarget);ft(o!==null,"Index not found");const a=e.shiftKey?o>0?o-1:i.length-1:o+1<i.length?o+1:0;i[a].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),Fs(t,-100);break}}}function Kw(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=mo(),n=YA(e,t),i=new Map;let o=!1;n.forEach(a=>{a.separator&&(o||(o=!0,a.separator.element.focus({focusVisible:!1,preventScroll:!0})));const c=t.get(a.group);c&&i.set(a.group,c.layout)}),xa({cursorFlags:0,hitRegions:n,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function Ok({document:e,event:t,hitRegions:n,initialLayoutMap:i,mountedGroups:o,pointerDownAtPoint:a,prevCursorFlags:c}){let u=0;n.forEach(f=>{const{group:g,groupSize:m}=f,{orientation:y,panels:b}=g,{disableCursor:w}=g.mutableState;let C=0;a?y==="horizontal"?C=(t.clientX-a.x)/m*100:C=(t.clientY-a.y)/m*100:y==="horizontal"?C=t.clientX<0?-100:100:C=t.clientY<0?-100:100;const E=i.get(g),S=o.get(g);if(!E||!S)return;const{defaultLayoutDeferred:R,derivedPanelConstraints:k,groupSize:I,layout:T,separatorToPanels:Q}=S;if(k&&T&&Q){const j=rc({delta:C,initialLayout:E,panelConstraints:k,pivotIndices:f.panels.map(_=>b.indexOf(_)),prevLayout:T,trigger:"mouse-or-touch"});if(Zs(j,T)){if(C!==0&&!w)switch(y){case"horizontal":{u|=C<0?Ik:Rk;break}case"vertical":{u|=C<0?Qk:Tk;break}}}else gi(f.group,{defaultLayoutDeferred:R,derivedPanelConstraints:k,groupSize:I,layout:j,separatorToPanels:Q})}});let h=0;t.movementX===0?h|=c&_w:h|=u&_w,t.movementY===0?h|=c&Ow:h|=u&Ow,k5(h),qA(e)}function $w(e){const t=mo(),n=Ws();n.state==="active"&&Ok({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function Vw(e){if(e.defaultPrevented)return;const t=Ws(),n=mo();switch(t.state){case"active":{if(e.buttons===0){xa({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(i=>{const o=is(i.group.id,!0);gi(i.group,o,{isUserInteraction:!0})});return}for(const i of t.hitRegions)if(i.separator){const{element:o}=i.separator;o.hasPointerCapture?.(e.pointerId)||o.setPointerCapture?.(e.pointerId)}Ok({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const i=YA(e,n);i.length===0?t.state!=="inactive"&&xa({cursorFlags:0,state:"inactive"}):xa({cursorFlags:0,hitRegions:i,state:"hover"}),qA(e.currentTarget);break}}}function Jw(e){e.relatedTarget instanceof HTMLIFrameElement&&Ws().state==="hover"&&xa({cursorFlags:0,state:"inactive"})}function Xw(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||Dk(e.currentTarget)&&e.preventDefault()}function Ww(e){let t=0,n=0;const i={};for(const a of e)if(a.defaultSize!==void 0){t++;const c=vn(a.defaultSize);n+=c,i[a.panelId]=c}else i[a.panelId]=void 0;const o=e.length-t;if(o!==0){const a=vn((100-n)/o);for(const c of e)c.defaultSize===void 0&&(i[c.panelId]=a)}return i}function L5(e,t,n){if(!n[0])return;const i=e.panels.find(h=>h.element===t);if(!i||!i.onResize)return;const o=Sa({group:e}),a=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,c=i.mutableValues.prevSize,u={asPercentage:vn(a/o*100),inPixels:a};i.mutableValues.prevSize=u,i.onResize(u,i.id,c)}function P5(e,t){if(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 F5({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:i}){if(n<=0||t<=0||n===t)return i;let o=0,a=0,c=!1;const u=new Map,h=[];for(const m of e.panels){const y=i[m.id]??0;if(m.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){c=!0;const b=y/100*n,w=vn(b/t*100);u.set(m.id,w),o+=w}else h.push(m.id),a+=y}if(!c||h.length===0)return i;const f=100-o,g={...i};if(u.forEach((m,y)=>{g[y]=m}),a>0)for(const m of h){const y=i[m]??0;g[m]=vn(y/a*f)}else{const m=vn(f/h.length);for(const y of h)g[y]=m}return g}function H5(e,t){const n=e.map(o=>o.id),i=Object.keys(t);if(n.length!==i.length)return!1;for(const o of n)if(!i.includes(o))return!1;return!0}const ca=new Map;function U5(e){let t=!0;ft(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,o=new Set,a=new n(w=>{for(const C of w){const{borderBoxSize:E,target:S}=C;if(S===e.element){if(t){const R=Sa({group:e});if(R===0)return;const k=is(e.id);if(!k)return;const I=hg(e),T=k.defaultLayoutDeferred?Ww(I):k.layout,Q=F5({group:e,nextGroupSize:R,prevGroupSize:k.groupSize,prevLayout:T}),j=eo({layout:Q,panelConstraints:I});if(!k.defaultLayoutDeferred&&Zs(k.layout,j)&&P5(k.derivedPanelConstraints,I)&&k.groupSize===R)return;gi(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:I,groupSize:R,layout:j,separatorToPanels:k.separatorToPanels})}}else L5(e,S,E)}});a.observe(e.element),e.panels.forEach(w=>{ft(!i.has(w.id),`Panel ids must be unique; id "${w.id}" was used more than once`),i.add(w.id),w.onResize&&a.observe(w.element)});const c=Sa({group:e}),u=hg(e),h=e.panels.map(({id:w})=>w).join(",");let f=e.mutableState.defaultLayout;f&&(H5(e.panels,f)||(f=void 0));const g=e.mutableState.layouts[h]??f??Ww(u),m=eo({layout:g,panelConstraints:u}),y=e.element.ownerDocument;ca.set(y,(ca.get(y)??0)+1);const b=new Map;return kk(e).forEach(w=>{w.separator&&b.set(w.separator,w.panels)}),gi(e,{defaultLayoutDeferred:c===0,derivedPanelConstraints:u,groupSize:c,layout:m,separatorToPanels:b}),e.separators.forEach(w=>{ft(!o.has(w.id),`Separator ids must be unique; id "${w.id}" was used more than once`),o.add(w.id),w.element.addEventListener("keydown",Yw)}),ca.get(y)===1&&(y.addEventListener("contextmenu",Fw,!0),y.addEventListener("dblclick",Gw,!0),y.addEventListener("pointerdown",Kw,!0),y.addEventListener("pointerleave",$w),y.addEventListener("pointermove",Vw),y.addEventListener("pointerout",Jw),y.addEventListener("pointerup",Xw,!0)),function(){t=!1,ca.set(y,Math.max(0,(ca.get(y)??0)-1)),R5(e),e.separators.forEach(w=>{w.element.removeEventListener("keydown",Yw)}),ca.get(y)||(y.removeEventListener("contextmenu",Fw,!0),y.removeEventListener("dblclick",Gw,!0),y.removeEventListener("pointerdown",Kw,!0),y.removeEventListener("pointerleave",$w),y.removeEventListener("pointermove",Vw),y.removeEventListener("pointerout",Jw),y.removeEventListener("pointerup",Xw,!0)),a.disconnect()}}function q5(){const[e,t]=x.useState({}),n=x.useCallback(()=>t({}),[]);return[e,n]}function KA(e){const t=x.useId();return`${e??t}`}const go=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Hl(e){const t=x.useRef(e);return go(()=>{t.current=e},[e]),x.useCallback((...n)=>t.current?.(...n),[t])}function $A(...e){return Hl(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function VA(e){const t=x.useRef({...e});return go(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const zk=x.createContext(null);function G5(e,t){const n=x.useRef({getLayout:()=>({}),setLayout:B5});x.useImperativeHandle(t,()=>n.current,[]),go(()=>{Object.assign(n.current,_k({groupId:e}))})}function JA({children:e,className:t,defaultLayout:n,disableCursor:i,disabled:o,elementRef:a,groupRef:c,id:u,onLayoutChange:h,onLayoutChanged:f,orientation:g="horizontal",resizeTargetMinimumSize:m={coarse:20,fine:10},style:y,...b}){const w=x.useRef({onLayoutChange:{},onLayoutChanged:{}}),C=Hl(H=>{Zs(w.current.onLayoutChange,H)||(w.current.onLayoutChange=H,h?.(H))}),E=Hl((H,U)=>{Zs(w.current.onLayoutChanged,H)||(w.current.onLayoutChanged=H,f?.(H,{isUserInteraction:U}))}),S=KA(u),R=x.useRef(null),[k,I]=q5(),T=x.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:m,separators:[]}),Q=$A(R,a);G5(S,c);const j=Hl((H,U)=>{const J=Ws(),Y=Pw(H),$=is(H);if($){let P=!1;return J.state==="active"&&(P=J.hitRegions.some(V=>V.group===Y)),{flexGrow:$.layout[U]??1,pointerEvents:P?"none":void 0}}if(n?.[U])return{flexGrow:n?.[U]}}),_=VA({defaultLayout:n,disableCursor:i}),F=x.useMemo(()=>({get disableCursor(){return!!_.disableCursor},getPanelStyles:j,id:S,orientation:g,registerPanel:H=>{const U=T.current;return U.panels=pg(g,[...U.panels,H]),I(),()=>{U.panels=U.panels.filter(J=>J!==H),I()}},registerSeparator:H=>{const U=T.current;return U.separators=pg(g,[...U.separators,H]),I(),()=>{U.separators=U.separators.filter(J=>J!==H),I()}},updatePanelProps:(H,{disabled:U})=>{const J=T.current.panels.find(P=>P.id===H);J&&(J.panelConstraints.disabled=U);const Y=Pw(S),$=is(S);Y&&$&&gi(Y,{...$,derivedPanelConstraints:hg(Y)})},updateSeparatorProps:(H,{disabled:U,disableDoubleClick:J})=>{const Y=T.current.separators.find($=>$.id===H);Y&&(Y.disabled=U,Y.disableDoubleClick=J)}}),[j,S,I,g,_]),O=x.useRef(null);return go(()=>{const H=R.current;if(H===null)return;const U=T.current;let J;if(_.defaultLayout!==void 0&&Object.keys(_.defaultLayout).length===U.panels.length){J={};for(const D of U.panels){const z=_.defaultLayout[D.id];z!==void 0&&(J[D.id]=z)}}const Y={disabled:!!o,element:H,id:S,mutableState:{defaultLayout:J,disableCursor:!!_.disableCursor,expandedPanelSizes:T.current.lastExpandedPanelSizes,layouts:T.current.layouts},orientation:g,panels:U.panels,resizeTargetMinimumSize:U.resizeTargetMinimumSize,separators:U.separators};O.current=Y;const $=U5(Y),{defaultLayoutDeferred:P,derivedPanelConstraints:V,layout:ie}=is(Y.id,!0);!P&&V.length>0&&(C(ie),E(ie,!1));const de=GA(S,D=>{const{defaultLayoutDeferred:z,derivedPanelConstraints:L,layout:M}=D.next;if(z||L.length===0)return;const X=Y.panels.map(({id:ne})=>ne).join(",");Y.mutableState.layouts[X]=M,L.forEach(ne=>{if(ne.collapsible){const{layout:fe}=D.prev??{};if(fe){const ae=dn(ne.collapsedSize,M[ne.panelId]),ce=dn(ne.collapsedSize,fe[ne.panelId]);ae&&!ce&&(Y.mutableState.expandedPanelSizes[ne.panelId]=fe[ne.panelId])}}});const ee=Ws().state!=="active";C(M),ee&&E(M,D.isUserInteraction)});return()=>{O.current=null,$(),de()}},[o,S,E,C,g,k,_]),x.useEffect(()=>{const H=O.current;H&&(H.mutableState.defaultLayout=n,H.mutableState.disableCursor=!!i)}),p.jsx(zk.Provider,{value:F,children:p.jsx("div",{...b,className:t,"data-group":!0,"data-testid":S,id:S,ref:Q,style:{height:"100%",width:"100%",overflow:"hidden",...y,display:"flex",flexDirection:g==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:g==="horizontal"?"pan-y":"pan-x"},children:e})})}JA.displayName="Group";function XA(){const e=x.useContext(zk);return ft(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Y5(e,t){const{id:n}=XA(),i=x.useRef({collapse:tm,expand:tm,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:tm});x.useImperativeHandle(t,()=>i.current,[]),go(()=>{Object.assign(i.current,Nk({groupId:n,panelId:e}))})}function ic({children:e,className:t,collapsedSize:n="0%",collapsible:i=!1,defaultSize:o,disabled:a,elementRef:c,groupResizeBehavior:u="preserve-relative-size",id:h,maxSize:f="100%",minSize:g="0%",onResize:m,panelRef:y,style:b,...w}){const C=!!h,E=KA(h),S=VA({disabled:a}),R=x.useRef(null),k=$A(R,c),{getPanelStyles:I,id:T,orientation:Q,registerPanel:j,updatePanelProps:_}=XA(),F=m!==null,O=Hl((Y,$,P)=>{m?.(Y,h,P)});go(()=>{const Y=R.current;if(Y!==null){const $={element:Y,id:E,idIsStable:C,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:F?O:void 0,panelConstraints:{groupResizeBehavior:u,collapsedSize:n,collapsible:i,defaultSize:o,disabled:S.disabled,maxSize:f,minSize:g}};return j($)}},[u,n,i,o,F,E,C,f,g,O,j,S]),x.useEffect(()=>{_(E,{disabled:a})},[a,E,_]),Y5(E,y);const H=()=>{const Y=I(T,E);if(Y)return JSON.stringify(Y)},U=x.useSyncExternalStore(Y=>GA(T,Y),H,H);let J;return U?J=JSON.parse(U):o!==void 0?J={flexGrow:void 0,flexShrink:void 0,flexBasis:o}:J={flexGrow:1},p.jsx("div",{...w,"data-disabled":a||void 0,"data-panel":!0,"data-testid":E,id:E,ref:k,style:{...K5,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...J},children:p.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...b,touchAction:Q==="horizontal"?"pan-y":"pan-x"},children:e})})}ic.displayName="Panel";const K5={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function $5({layout:e,panelConstraints:t,panelId:n,panelIndex:i}){let o,a;const c=e[n],u=t.find(h=>h.panelId===n);if(u){const h=u.maxSize,f=u.collapsible?u.collapsedSize:u.minSize,g=[i,i+1];a=eo({layout:rc({delta:f-c,initialLayout:e,panelConstraints:t,pivotIndices:g,prevLayout:e}),panelConstraints:t})[n],o=eo({layout:rc({delta:h-c,initialLayout:e,panelConstraints:t,pivotIndices:g,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:a,valueNow:c}}function WA({children:e,className:t,disabled:n,disableDoubleClick:i,elementRef:o,id:a,style:c,...u}){const h=KA(a),f=VA({disabled:n,disableDoubleClick:i}),[g,m]=x.useState({}),[y,b]=x.useState("inactive"),[w,C]=x.useState(!1),E=x.useRef(null),S=$A(E,o),{disableCursor:R,id:k,orientation:I,registerSeparator:T,updateSeparatorProps:Q}=XA(),j=I==="horizontal"?"vertical":"horizontal";go(()=>{const O=E.current;if(O!==null){const H={disabled:f.disabled,disableDoubleClick:f.disableDoubleClick,element:O,id:h},U=T(H),J=S5($=>{b($.next.state!=="inactive"&&$.next.hitRegions.some(P=>P.separator===H)?$.next.state:"inactive")}),Y=GA(k,$=>{const{derivedPanelConstraints:P,layout:V,separatorToPanels:ie}=$.next,de=ie.get(H);if(de){const D=de[0],z=de.indexOf(D);m($5({layout:V,panelConstraints:P,panelId:D.id,panelIndex:z}))}});return()=>{J(),Y(),U()}}},[k,h,T,f]),x.useEffect(()=>{Q(h,{disabled:n,disableDoubleClick:i})},[n,i,h,Q]);let _;n&&!R&&(_="not-allowed");let F;return n?F="disabled":y==="active"?F="active":w?F="focus":F=y,p.jsx("div",{...u,"aria-controls":g.valueControls,"aria-disabled":n||void 0,"aria-orientation":j,"aria-valuemax":g.valueMax,"aria-valuemin":g.valueMin,"aria-valuenow":g.valueNow,children:e,className:t,"data-separator":F,"data-testid":h,id:h,onBlur:()=>C(!1),onFocus:()=>C(!0),ref:S,role:"separator",style:{flexBasis:"auto",cursor:_,...c,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}WA.displayName="Separator";function Lk(e){return e==="changes-requested"||e==="waiting-for-author"||e==="rejected"}const V5=["worktrees","draft-pull-requests","pull-requests","needs-review","waiting","approved"],J5={worktrees:"Worktrees","draft-pull-requests":"Draft Pull Requests","pull-requests":"Pull Requests","needs-review":"Needs Your Review",waiting:"Waiting for Author",approved:"Approved by You"};function dr(e){const t=e.pr;return t?`pr:${t.id}`:e.kind==="session"?`branch:${e.branch??e.session.name}`:`pr:${e.pr.id}`}function X5(e){return e.kind==="session"?e.pr?e.pr.isDraft?"draft-pull-requests":"pull-requests":"worktrees":e.kind==="orphan-pr"?e.pr.isDraft?"draft-pull-requests":"pull-requests":e.category==="needs-review"?"needs-review":e.category==="waiting"?"waiting":"approved"}function ka(e){return e.kind==="session"?e.session.running:e.running===!0}function Qd(e){return e.kind==="session"?e.branch??e.session.name:e.pr.title}function Dn(e){return e.kind==="session"?e.branch??e.session.name:e.pr.sourceBranch}function to(e){return e.kind==="session"?e.session.name:e.sessionName}function Pk(e){return e.kind==="session"?!0:!!e.sessionName}function W5(e,t){return t.size===0?e:e.flatMap(n=>t.has(Dn(n))?n.kind==="session"?[]:[{...n,sessionName:void 0,running:void 0}]:[n])}function Z5(e){const t=new Map;for(const n of e){const i=X5(n),o=t.get(i);o?o.push(n):t.set(i,[n])}return V5.filter(n=>t.has(n)).map(n=>({key:n,label:J5[n],items:t.get(n)??[]}))}const e4={rejected:3,blocked:2,partial:1,approved:0},t4={failed:3,running:2,absent:1,passed:0},n4={rejected:"rejected",blocked:"waiting",partial:"partial",approved:"approved"},r4={failed:"ci-failed",running:"ci-running",absent:"ci-absent",passed:"ci-passed"};function Ul(e,t){return`${e} ${t}${e===1?"":"s"}`}function i4(e){return e==="passed"?"CI passed":e==="failed"?"CI failed":e==="running"?"CI running":"No CI result"}function s4(e,t,n){const i=`${t} of ${Ul(n,"reviewer")} approved`;return e==="rejected"?`changes rejected (${i})`:e==="blocked"?`waiting for the author (${i})`:e==="approved"?`all ${Ul(n,"reviewer")} approved`:n===0?"no reviewers yet":`waiting on ${Ul(n-t,"approval")} (${i})`}function o4(e){return e==="succeeded"?"passed":e==="failed"?"failed":e==="pending"?"running":"absent"}function a4(e,t){return t==="failed"||e==="rejected"?"red":t==="running"||e==="blocked"?"yellow":e==="approved"?"green":"muted"}function l4(e,t,n){const i=e.length,o=e.filter(g=>g.decision==="approved").length,a=o4(t),c=e.some(g=>g.decision==="rejected")?"rejected":e.some(g=>n(g.decision))?"blocked":i>0&&o===i?"approved":"partial",u=t4[a]>e4[c]?r4[a]:n4[c],h=c==="approved"&&a==="passed",f=h?`Ready to merge — CI passed, all ${Ul(i,"reviewer")} approved`:`${i4(a)} — ${s4(c,o,i)}`;return{approval:c,ci:a,tone:a4(c,a),glyph:u,label:f,filled:h,approved:o,total:i}}function Fk(e){return`${Ul(e,"unresolved comment")}`}function c4(e,t){if(e!=null)return t.some(n=>n.name===e)?e:void 0}function Zu(){return{entries:[],openInTabs:0}}function u4(e){return(e.kind==="session"||e.kind==="orphan-pr")&&e.pr!=null}function md(e,t,n,i){i?e.openInTabs+=1:e.entries.push({pr:t,key:n})}function d4(e,t,n,i){t.buildStatus==="failed"&&md(e.ciFailing,t,n,i),t.reviewers?.some(o=>Lk(o.decision))&&md(e.changesRequested,t,n,i),(t.activeCommentCount??0)>0&&(md(e.unresolvedComments,t,n,i),i||(e.unresolvedCommentTotal+=t.activeCommentCount??0))}function f4(e,t){const n={needsReview:Zu(),ciFailing:Zu(),changesRequested:Zu(),unresolvedComments:Zu(),unresolvedCommentTotal:0},i=new Set;for(const o of e){const a=o.pr;if(!a)continue;const c=dr(o);if(i.has(c))continue;i.add(c);const u=t.has(c);o.kind==="review-pr"&&o.category==="needs-review"&&md(n.needsReview,a,c,u),u4(o)&&d4(n,a,c,u)}return n}const h4={tabs:[],activeId:null,autoOpened:[]};function Hk(e,t){return e.map(n=>n.id!==t||n.kind!=="item"?n:{...n,preview:!1})}function p4(e,t){return e.tabs.some(n=>n.id===t)?{...e,activeId:t}:e}function m4(e,t){const n=e.tabs.filter(i=>i.id===t);return{...e,tabs:n,activeId:n[0]?.id??null}}function Uk(e,t){switch(t.type){case"open-item":return g4(e,t.itemKey,t.preview);case"open-settings":return A4(e);case"pin":return{...e,tabs:Hk(e.tabs,t.id)};case"activate":return p4(e,t.id);case"close":return y4(e,t.id);case"close-others":return m4(e,t.id);case"close-all":return{...e,tabs:[],activeId:null};case"move":return v4(e,t.id,t.targetId,t.side);case"sync-items":return C4(w4(b4(e,t.entries),t.entries,e.tabs),t.entries)}}function g4(e,t,n){const i=`item:${t}`,o=e.tabs.find(u=>u.kind==="item"&&(u.itemKey===t||u.id===i));if(o){const u=n?e.tabs:Hk(e.tabs,o.id);return{...e,tabs:u,activeId:o.id}}const a={id:i,kind:"item",itemKey:t,preview:n},c=e.tabs.findIndex(u=>u.preview);if(n&&c>=0){const u=[...e.tabs];return u[c]=a,{...e,tabs:u,activeId:i}}return{...e,tabs:[...e.tabs,a],activeId:i}}function A4(e){return e.tabs.some(t=>t.id==="settings")?{...e,activeId:"settings"}:{...e,tabs:[...e.tabs,{id:"settings",kind:"settings",preview:!1}],activeId:"settings"}}function y4(e,t){const n=e.tabs.findIndex(a=>a.id===t);if(n<0)return e;const i=e.tabs.filter(a=>a.id!==t);let o=e.activeId;return e.activeId===t&&(o=i[Math.min(n,i.length-1)]?.id??null),{...e,tabs:i,activeId:o}}function v4(e,t,n,i){if(t===n)return e;const o=e.tabs.findIndex(h=>h.id===t);if(o<0)return e;const a=[...e.tabs],[c]=a.splice(o,1),u=a.findIndex(h=>h.id===n);return u<0?e:(a.splice(i==="after"?u+1:u,0,c),{...e,tabs:a})}function b4(e,t){const n=new Map,i=new Set;for(const u of t){i.add(u.itemKey);const h=n.get(u.branch);(!h||h.startsWith("branch:")&&u.itemKey.startsWith("pr:"))&&n.set(u.branch,u.itemKey)}const o=new Map(t.map(u=>[u.itemKey,u.branch]));let a=!1;const c=e.tabs.map(u=>{if(u.kind!=="item")return u;if(i.has(u.itemKey)){const g=o.get(u.itemKey);return g&&u.branch!==g?(a=!0,{...u,branch:g}):u}const h=u.branch??(u.itemKey.startsWith("branch:")?u.itemKey.slice(7):void 0),f=h?n.get(h):void 0;return!f||f===u.itemKey?u:(a=!0,{...u,itemKey:f,branch:h})});return a?{...e,...x4(c,e.activeId)}:e}function x4(e,t){const n=new Map,i=[];let o=t;for(const a of e){const c=a.kind==="item"?a.itemKey:a.id,u=n.get(c);if(!u){n.set(c,a),i.push(a);continue}if(u.kind==="item"&&!a.preview&&u.preview){const h=i.indexOf(u),f={...u,preview:!1};i[h]=f,n.set(c,f)}o===a.id&&(o=u.id)}return{tabs:i,activeId:o}}function w4(e,t,n){const i=new Set(e.autoOpened);let o=e,a=!1;for(const c of t)!c.running||!c.sessionName||i.has(c.sessionName)||(i.add(c.sessionName),a=!0,!n.some(u=>u.id===`item:${c.itemKey}`)&&(o=Uk(o,{type:"open-item",itemKey:c.itemKey,preview:!1})));return a?{...o,autoOpened:[...i]}:o}function C4(e,t){const n=new Map(t.map(c=>[c.itemKey,c.branch])),i=new Set(t.filter(c=>c.running).map(c=>c.branch));if(i.size===0)return e;let o=!1;const a=e.tabs.map(c=>{if(c.kind!=="item"||!c.preview)return c;const u=n.get(c.itemKey);return!u||!i.has(u)?c:(o=!0,{...c,preview:!1})});return o?{...e,tabs:a}:e}const qk=x.createContext(null);function E4({children:e}){const[t,n]=x.useReducer(Uk,h4),i=x.useCallback((C,E)=>n({type:"open-item",itemKey:C,preview:E?.preview??!1}),[]),o=x.useCallback(()=>n({type:"open-settings"}),[]),a=x.useCallback(C=>n({type:"pin",id:C}),[]),c=x.useCallback(C=>n({type:"activate",id:C}),[]),u=x.useCallback(C=>n({type:"close",id:C}),[]),h=x.useCallback(C=>n({type:"close-others",id:C}),[]),f=x.useCallback(()=>n({type:"close-all"}),[]),g=x.useCallback(()=>{t.activeId&&n({type:"close",id:t.activeId})},[t.activeId]),m=x.useCallback(C=>{const{tabs:E,activeId:S}=t;if(E.length<2)return;const R=E.findIndex(I=>I.id===S),k=E[(R+C+E.length)%E.length];n({type:"activate",id:k.id})},[t]),y=x.useCallback((C,E,S)=>n({type:"move",id:C,targetId:E,side:S}),[]),b=x.useCallback(C=>n({type:"sync-items",entries:C}),[]),w=x.useMemo(()=>({...t,openItem:i,openSettings:o,pin:a,activate:c,close:u,closeOthers:h,closeAll:f,closeActive:g,cycle:m,moveTab:y,syncItems:b}),[t,i,o,a,c,u,h,f,g,m,y,b]);return p.jsx(qk.Provider,{value:w,children:e})}function ps(){const e=x.useContext(qk);if(!e)throw new Error("useTabs must be used within TabsProvider");return e}function S4({items:e,onReveal:t}){const n=ps(),i=x.useMemo(()=>new Set(n.tabs.flatMap(a=>a.kind==="item"?[a.itemKey]:[])),[n.tabs]),o=x.useMemo(()=>f4(e,i),[e,i]);return p.jsxs("div",{className:"flex w-9 shrink-0 flex-col items-center gap-1 border-r border-border bg-sidebar pt-1",children:[p.jsx(Fe,{label:"Show sidebar (Ctrl B)",side:"right",children:p.jsx(be,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Show sidebar",children:p.jsx(gk,{})})}),p.jsx("div",{className:"my-1 h-px w-5 shrink-0 bg-border"}),p.jsx(ed,{category:o.needsReview,icon:p.jsx(hk,{className:"size-4"}),tone:"text-warning",label:"Needs your review",reason:"waiting for your review",onOpen:a=>n.openItem(a)}),p.jsx(ed,{category:o.ciFailing,icon:p.jsx(sf,{className:"size-4"}),tone:"text-destructive",label:"CI failing on your PRs",reason:"CI failed",onOpen:a=>n.openItem(a)}),p.jsx(ed,{category:o.changesRequested,icon:p.jsx(Q3,{className:"size-4"}),tone:"text-warning",label:"Changes requested on your PRs",reason:"changes requested",onOpen:a=>n.openItem(a)}),p.jsx(ed,{category:o.unresolvedComments,icon:p.jsx(po,{className:"size-4"}),tone:"text-info",label:"Unresolved comments on your PRs",reason:"unresolved comments",count:o.unresolvedCommentTotal,onOpen:a=>n.openItem(a)})]})}function ed({category:e,icon:t,tone:n,label:i,reason:o,count:a,onOpen:c}){const u=a??e.entries.length;if(e.entries.length===0)return null;const h=e.openInTabs>0?` (+${e.openInTabs} already open)`:"";return p.jsxs(LA,{children:[p.jsx(Fe,{label:`${i}${h}`,side:"right",children:p.jsx(PA,{asChild:!0,children:p.jsxs("button",{type:"button","aria-label":i,className:pe("relative flex size-7 items-center justify-center rounded-md transition-colors hover:bg-sidebar-accent",n),children:[t,p.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-primary px-0.5 text-[9px] font-semibold leading-none text-primary-foreground tabular-nums",children:u>99?"99+":u})]})})}),p.jsxs(FA,{side:"right",align:"start",className:"max-w-96",children:[p.jsx(Rd,{children:i}),e.entries.map(({pr:f,key:g})=>p.jsx(fg,{onSelect:()=>c(g),children:p.jsxs("span",{className:"min-w-0",children:[p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"truncate font-medium",children:f.title}),p.jsxs("span",{className:"shrink-0 text-muted-foreground",children:["#",f.id]})]}),p.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[o,f.activeCommentCount&&o==="unresolved comments"?` (${f.activeCommentCount})`:""," ","· ",f.sourceBranch]})]})},g))]})]})}function k4(e,t){return e==="approve"||e==="approve-with-suggestions"?"approved":t==="github"?"changes-requested":e==="wait-for-author"?"waiting-for-author":"rejected"}function Nn(e){const t=yi();return{sidebar:()=>t.invalidateQueries({queryKey:Je.sidebar(e)}),sync:()=>t.invalidateQueries({queryKey:Je.sync(e)}),branches:()=>t.invalidateQueries({queryKey:Je.branches(e)}),sessions:()=>t.invalidateQueries({queryKey:Je.sessions(e)}),settings:()=>t.invalidateQueries({queryKey:Je.settings(e)}),threads:n=>t.invalidateQueries({queryKey:Je.threads(e,n)}),drafts:n=>t.invalidateQueries({queryKey:Je.drafts(e,n)})}}function B4(e,t){const n=yi(),i=Nn(e);return bn({mutationFn:({prId:o,verdict:a})=>window.kirby.submitReviewVerdict(o,a),onMutate:async({prId:o,verdict:a})=>{const c=await n.fetchQuery({queryKey:Je.reviewViewer(e),queryFn:()=>window.kirby.getReviewViewer(),staleTime:1/0}).catch(()=>null);if(!c)return{prev:void 0};const u=Je.sidebar(e);await n.cancelQueries({queryKey:u});const h=n.getQueryData(u);if(h){const f=k4(a,t),g=c.identifier.toLowerCase();n.setQueryData(u,h.map(m=>{if(m.pr?.id!==o)return m;const y=m.pr.reviewers??[],w=y.some(C=>C.identifier.toLowerCase()===g)?y.map(C=>C.identifier.toLowerCase()===g?{...C,decision:f}:C):[...y,{identifier:c.identifier,displayName:"You",decision:f}];return{...m,pr:{...m.pr,reviewers:w}}}))}return{prev:h}},onError:(o,a,c)=>{c?.prev&&n.setQueryData(Je.sidebar(e),c.prev)},onSettled:async()=>{try{await window.kirby.refreshRemote()}catch{}i.sidebar()}})}function ZA(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.createWorktree(n),onSuccess:()=>{t.sidebar(),t.branches()}})}const Gk=["remove-worktree"];function I4(e){const t=Nn(e);return bn({mutationKey:Gk,mutationFn:({branch:n,force:i})=>window.kirby.removeWorktree(n,i),onSuccess:(n,{branch:i})=>Ee.success(`Removed worktree ${i}`),onError:n=>Ee.error(Xe(n)),onSettled:()=>{t.sidebar(),t.branches()}})}function R4(){const e=HQ({filters:{mutationKey:Gk,status:"pending"},select:t=>t.state.variables?.branch});return x.useMemo(()=>new Set(e.filter(t=>!!t)),[e])}function Yk(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.launchAgent(n),onSuccess:()=>{t.sidebar(),t.sessions()}})}function Q4(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.launchReviewAgent(n),onSuccess:()=>{t.sidebar(),t.branches(),t.sessions()}})}function T4(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.checkoutPlan(n),onSuccess:()=>{t.sidebar(),t.branches(),t.sessions()}})}function Kk(e){const t=Nn(e);return bn({mutationFn:({prId:n,id:i,patch:o})=>window.kirby.updateDraftComment(n,i,o),onSettled:(n,i,o)=>{t.drafts(o.prId)}})}function $k(e){const t=Nn(e);return bn({mutationFn:({prId:n,id:i})=>window.kirby.deleteDraftComment(n,i),onSettled:(n,i,o)=>{t.drafts(o.prId)}})}function ey(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.postDraftComments(n),onSettled:(n,i,o)=>{t.drafts(o.prId),t.threads(o.prId)}})}function ty(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.killSession(n),onSuccess:()=>{t.sidebar(),t.sessions()}})}function Vk(){return bn({mutationFn:e=>window.kirby.openInEditor(e)})}function lf(e){const t=Nn(e);return bn({mutationFn:()=>window.kirby.refreshRemote(),onSettled:()=>{t.sidebar(),t.sync()}})}function j4(e){const t=Nn(e);return bn({mutationFn:n=>window.kirby.replyToThread(n),onSuccess:(n,i)=>{t.threads(i.prId)}})}function D4(e){const t=yi(),n=Nn(e);return bn({mutationFn:i=>window.kirby.setThreadResolved(i),onMutate:async i=>{const o=Je.threads(e,i.prId);await t.cancelQueries({queryKey:o});const a=t.getQueryData(o);return a&&t.setQueryData(o,{...a,threads:a.threads.map(c=>c.id===i.thread.id?{...c,isResolved:i.resolved}:c)}),{prev:a}},onError:(i,o,a)=>{a?.prev&&t.setQueryData(Je.threads(e,o.prId),a.prev)},onSettled:(i,o,a)=>{n.threads(a.prId)}})}function M4(e){const t=Nn(e);return bn({mutationFn:({ref:n,value:i})=>window.kirby.updateSettingsField(n,i),onSettled:()=>{t.settings()}})}const Jk=x.createContext(null);function N4({value:e,children:t}){return p.jsx(Jk.Provider,{value:e,children:t})}function hn(){const e=x.useContext(Jk);if(!e)throw new Error("useRepo must be used inside RepoProvider");return e}var Zw=1,_4=.9,O4=.8,z4=.17,nm=.1,rm=.999,L4=.9999,P4=.99,F4=/[\\\/_+.#"@\[\(\{&]/,H4=/[\\\/_+.#"@\[\(\{&]/g,U4=/[\s-]/,Xk=/[\s-]/g;function mg(e,t,n,i,o,a,c){if(a===t.length)return o===e.length?Zw:P4;var u=`${o},${a}`;if(c[u]!==void 0)return c[u];for(var h=i.charAt(a),f=n.indexOf(h,o),g=0,m,y,b,w;f>=0;)m=mg(e,t,n,i,f+1,a+1,c),m>g&&(f===o?m*=Zw:F4.test(e.charAt(f-1))?(m*=O4,b=e.slice(o,f-1).match(H4),b&&o>0&&(m*=Math.pow(rm,b.length))):U4.test(e.charAt(f-1))?(m*=_4,w=e.slice(o,f-1).match(Xk),w&&o>0&&(m*=Math.pow(rm,w.length))):(m*=z4,o>0&&(m*=Math.pow(rm,f-o))),e.charAt(f)!==t.charAt(a)&&(m*=L4)),(m<nm&&n.charAt(f-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(f-1)!==i.charAt(a))&&(y=mg(e,t,n,i,f+1,a+2,c),y*nm>m&&(m=y*nm)),m>g&&(g=m),f=n.indexOf(h,f+1);return c[u]=g,g}function eC(e){return e.toLowerCase().replace(Xk," ")}function q4(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,mg(e,t,eC(e),eC(t),0,0,{})}var Dl='[cmdk-group=""]',im='[cmdk-group-items=""]',G4='[cmdk-group-heading=""]',Wk='[cmdk-item=""]',tC=`${Wk}:not([aria-disabled="true"])`,gg="cmdk-item-select",pa="data-value",Y4=(e,t,n)=>q4(e,t,n),Zk=x.createContext(void 0),bc=()=>x.useContext(Zk),eB=x.createContext(void 0),ny=()=>x.useContext(eB),tB=x.createContext(void 0),nB=x.forwardRef((e,t)=>{let n=ma(()=>{var L,M;return{search:"",value:(M=(L=e.value)!=null?L:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ma(()=>new Set),o=ma(()=>new Map),a=ma(()=>new Map),c=ma(()=>new Set),u=rB(e),{label:h,children:f,value:g,onValueChange:m,filter:y,shouldFilter:b,loop:w,disablePointerSelection:C=!1,vimBindings:E=!0,...S}=e,R=rn(),k=rn(),I=rn(),T=x.useRef(null),Q=r8();no(()=>{if(g!==void 0){let L=g.trim();n.current.value=L,j.emit()}},[g]),no(()=>{Q(6,J)},[]);let j=x.useMemo(()=>({subscribe:L=>(c.current.add(L),()=>c.current.delete(L)),snapshot:()=>n.current,setState:(L,M,X)=>{var ee,ne,fe,ae;if(!Object.is(n.current[L],M)){if(n.current[L]=M,L==="search")U(),O(),Q(1,H);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(I);ce?ce.focus():(ee=document.getElementById(R))==null||ee.focus()}if(Q(7,()=>{var ce;n.current.selectedItemId=(ce=Y())==null?void 0:ce.id,j.emit()}),X||Q(5,J),((ne=u.current)==null?void 0:ne.value)!==void 0){let ce=M??"";(ae=(fe=u.current).onValueChange)==null||ae.call(fe,ce);return}}j.emit()}},emit:()=>{c.current.forEach(L=>L())}}),[]),_=x.useMemo(()=>({value:(L,M,X)=>{var ee;M!==((ee=a.current.get(L))==null?void 0:ee.value)&&(a.current.set(L,{value:M,keywords:X}),n.current.filtered.items.set(L,F(M,X)),Q(2,()=>{O(),j.emit()}))},item:(L,M)=>(i.current.add(L),M&&(o.current.has(M)?o.current.get(M).add(L):o.current.set(M,new Set([L]))),Q(3,()=>{U(),O(),n.current.value||H(),j.emit()}),()=>{a.current.delete(L),i.current.delete(L),n.current.filtered.items.delete(L);let X=Y();Q(4,()=>{U(),X?.getAttribute("id")===L&&H(),j.emit()})}),group:L=>(o.current.has(L)||o.current.set(L,new Set),()=>{a.current.delete(L),o.current.delete(L)}),filter:()=>u.current.shouldFilter,label:h||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:R,inputId:I,labelId:k,listInnerRef:T}),[]);function F(L,M){var X,ee;let ne=(ee=(X=u.current)==null?void 0:X.filter)!=null?ee:Y4;return L?ne(L,n.current.search,M):0}function O(){if(!n.current.search||u.current.shouldFilter===!1)return;let L=n.current.filtered.items,M=[];n.current.filtered.groups.forEach(ee=>{let ne=o.current.get(ee),fe=0;ne.forEach(ae=>{let ce=L.get(ae);fe=Math.max(ce,fe)}),M.push([ee,fe])});let X=T.current;$().sort((ee,ne)=>{var fe,ae;let ce=ee.getAttribute("id"),Me=ne.getAttribute("id");return((fe=L.get(Me))!=null?fe:0)-((ae=L.get(ce))!=null?ae:0)}).forEach(ee=>{let ne=ee.closest(im);ne?ne.appendChild(ee.parentElement===ne?ee:ee.closest(`${im} > *`)):X.appendChild(ee.parentElement===X?ee:ee.closest(`${im} > *`))}),M.sort((ee,ne)=>ne[1]-ee[1]).forEach(ee=>{var ne;let fe=(ne=T.current)==null?void 0:ne.querySelector(`${Dl}[${pa}="${encodeURIComponent(ee[0])}"]`);fe?.parentElement.appendChild(fe)})}function H(){let L=$().find(X=>X.getAttribute("aria-disabled")!=="true"),M=L?.getAttribute(pa);j.setState("value",M||void 0)}function U(){var L,M,X,ee;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let ne=0;for(let fe of i.current){let ae=(M=(L=a.current.get(fe))==null?void 0:L.value)!=null?M:"",ce=(ee=(X=a.current.get(fe))==null?void 0:X.keywords)!=null?ee:[],Me=F(ae,ce);n.current.filtered.items.set(fe,Me),Me>0&&ne++}for(let[fe,ae]of o.current)for(let ce of ae)if(n.current.filtered.items.get(ce)>0){n.current.filtered.groups.add(fe);break}n.current.filtered.count=ne}function J(){var L,M,X;let ee=Y();ee&&(((L=ee.parentElement)==null?void 0:L.firstChild)===ee&&((X=(M=ee.closest(Dl))==null?void 0:M.querySelector(G4))==null||X.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function Y(){var L;return(L=T.current)==null?void 0:L.querySelector(`${Wk}[aria-selected="true"]`)}function $(){var L;return Array.from(((L=T.current)==null?void 0:L.querySelectorAll(tC))||[])}function P(L){let M=$()[L];M&&j.setState("value",M.getAttribute(pa))}function V(L){var M;let X=Y(),ee=$(),ne=ee.findIndex(ae=>ae===X),fe=ee[ne+L];(M=u.current)!=null&&M.loop&&(fe=ne+L<0?ee[ee.length-1]:ne+L===ee.length?ee[0]:ee[ne+L]),fe&&j.setState("value",fe.getAttribute(pa))}function ie(L){let M=Y(),X=M?.closest(Dl),ee;for(;X&&!ee;)X=L>0?t8(X,Dl):n8(X,Dl),ee=X?.querySelector(tC);ee?j.setState("value",ee.getAttribute(pa)):V(L)}let de=()=>P($().length-1),D=L=>{L.preventDefault(),L.metaKey?de():L.altKey?ie(1):V(1)},z=L=>{L.preventDefault(),L.metaKey?P(0):L.altKey?ie(-1):V(-1)};return x.createElement(Re.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:L=>{var M;(M=S.onKeyDown)==null||M.call(S,L);let X=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||X))switch(L.key){case"n":case"j":{E&&L.ctrlKey&&D(L);break}case"ArrowDown":{D(L);break}case"p":case"k":{E&&L.ctrlKey&&z(L);break}case"ArrowUp":{z(L);break}case"Home":{L.preventDefault(),P(0);break}case"End":{L.preventDefault(),de();break}case"Enter":{L.preventDefault();let ee=Y();if(ee){let ne=new Event(gg);ee.dispatchEvent(ne)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:s8},h),cf(e,L=>x.createElement(eB.Provider,{value:j},x.createElement(Zk.Provider,{value:_},L))))}),K4=x.forwardRef((e,t)=>{var n,i;let o=rn(),a=x.useRef(null),c=x.useContext(tB),u=bc(),h=rB(e),f=(i=(n=h.current)==null?void 0:n.forceMount)!=null?i:c?.forceMount;no(()=>{if(!f)return u.item(o,c?.id)},[f]);let g=iB(o,a,[e.value,e.children,a],e.keywords),m=ny(),y=cs(Q=>Q.value&&Q.value===g.current),b=cs(Q=>f||u.filter()===!1?!0:Q.search?Q.filtered.items.get(o)>0:!0);x.useEffect(()=>{let Q=a.current;if(!(!Q||e.disabled))return Q.addEventListener(gg,w),()=>Q.removeEventListener(gg,w)},[b,e.onSelect,e.disabled]);function w(){var Q,j;C(),(j=(Q=h.current).onSelect)==null||j.call(Q,g.current)}function C(){m.setState("value",g.current,!0)}if(!b)return null;let{disabled:E,value:S,onSelect:R,forceMount:k,keywords:I,...T}=e;return x.createElement(Re.div,{ref:Ks(a,t),...T,id:o,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!y,"data-disabled":!!E,"data-selected":!!y,onPointerMove:E||u.getDisablePointerSelection()?void 0:C,onClick:E?void 0:w},e.children)}),$4=x.forwardRef((e,t)=>{let{heading:n,children:i,forceMount:o,...a}=e,c=rn(),u=x.useRef(null),h=x.useRef(null),f=rn(),g=bc(),m=cs(b=>o||g.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);no(()=>g.group(c),[]),iB(c,u,[e.value,e.heading,h]);let y=x.useMemo(()=>({id:c,forceMount:o}),[o]);return x.createElement(Re.div,{ref:Ks(u,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&x.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),cf(e,b=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},x.createElement(tB.Provider,{value:y},b))))}),V4=x.forwardRef((e,t)=>{let{alwaysRender:n,...i}=e,o=x.useRef(null),a=cs(c=>!c.search);return!n&&!a?null:x.createElement(Re.div,{ref:Ks(o,t),...i,"cmdk-separator":"",role:"separator"})}),J4=x.forwardRef((e,t)=>{let{onValueChange:n,...i}=e,o=e.value!=null,a=ny(),c=cs(f=>f.search),u=cs(f=>f.selectedItemId),h=bc();return x.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),x.createElement(Re.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":u,id:h.inputId,type:"text",value:o?e.value:c,onChange:f=>{o||a.setState("search",f.target.value),n?.(f.target.value)}})}),X4=x.forwardRef((e,t)=>{let{children:n,label:i="Suggestions",...o}=e,a=x.useRef(null),c=x.useRef(null),u=cs(f=>f.selectedItemId),h=bc();return x.useEffect(()=>{if(c.current&&a.current){let f=c.current,g=a.current,m,y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let b=f.offsetHeight;g.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return y.observe(f),()=>{cancelAnimationFrame(m),y.unobserve(f)}}},[]),x.createElement(Re.div,{ref:Ks(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":i,id:h.listId},cf(e,f=>x.createElement("div",{ref:Ks(c,h.listInnerRef),"cmdk-list-sizer":""},f)))}),W4=x.forwardRef((e,t)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:a,container:c,...u}=e;return x.createElement(CE,{open:n,onOpenChange:i},x.createElement(kE,{container:c},x.createElement(BE,{"cmdk-overlay":"",className:o}),x.createElement(IE,{"aria-label":e.label,"cmdk-dialog":"",className:a},x.createElement(nB,{ref:t,...u}))))}),Z4=x.forwardRef((e,t)=>cs(n=>n.filtered.count===0)?x.createElement(Re.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),e8=x.forwardRef((e,t)=>{let{progress:n,children:i,label:o="Loading...",...a}=e;return x.createElement(Re.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},cf(e,c=>x.createElement("div",{"aria-hidden":!0},c)))}),Ao=Object.assign(nB,{List:X4,Item:K4,Input:J4,Group:$4,Separator:V4,Dialog:W4,Empty:Z4,Loading:e8});function t8(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function n8(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function rB(e){let t=x.useRef(e);return no(()=>{t.current=e}),t}var no=typeof window>"u"?x.useEffect:x.useLayoutEffect;function ma(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function cs(e){let t=ny(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function iB(e,t,n,i=[]){let o=x.useRef(),a=bc();return no(()=>{var c;let u=(()=>{var f;for(let g of n){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(f=g.current.textContent)==null?void 0:f.trim():o.current}})(),h=i.map(f=>f.trim());a.value(e,u,h),(c=t.current)==null||c.setAttribute(pa,u),o.current=u}),o}var r8=()=>{let[e,t]=x.useState(),n=ma(()=>new Map);return no(()=>{n.current.forEach(i=>i()),n.current=new Map},[e]),(i,o)=>{n.current.set(i,o),t({})}};function i8(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function cf({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement(i8(t),{ref:t.ref},n(t.props.children)):n(t)}var s8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Na(e){return p.jsx(CE,{"data-slot":"dialog",...e})}function o8({className:e,...t}){return p.jsx(BE,{"data-slot":"dialog-overlay",className:pe("fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function _a({className:e,children:t,showCloseButton:n=!0,...i}){return p.jsxs(kE,{"data-slot":"dialog-portal",children:[p.jsx(o8,{}),p.jsxs(IE,{"data-slot":"dialog-content",className:pe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-5 text-popover-foreground shadow-xl duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-md",e),...i,children:[t,n&&p.jsxs(vD,{"data-slot":"dialog-close",className:"absolute top-3 right-3 rounded-sm p-0.5 opacity-60 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring/40 disabled:pointer-events-none",children:[p.jsx(Ma,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function uf({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:pe("flex flex-col gap-1.5 pr-8 text-left",e),...t})}function ry({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-footer",className:pe("flex flex-row justify-end gap-2",e),...t})}function Oa({className:e,...t}){return p.jsx(mD,{"data-slot":"dialog-title",className:pe("text-lg font-semibold leading-none",e),...t})}function xc({className:e,...t}){return p.jsx(AD,{"data-slot":"dialog-description",className:pe("text-base text-muted-foreground",e),...t})}function a8({className:e,...t}){return p.jsx(Ao,{"data-slot":"command",className:pe("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",e),...t})}function l8({title:e="Command palette",description:t="Search for a command to run",children:n,className:i,...o}){return p.jsx(Na,{...o,children:p.jsxs(_a,{showCloseButton:!1,className:pe("top-[18%] translate-y-0 overflow-hidden p-0 sm:max-w-lg",i),children:[p.jsx(Oa,{className:"sr-only",children:e}),p.jsx(xc,{className:"sr-only",children:t}),p.jsx(a8,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-1 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]_svg]:size-4",children:n})]})})}function c8({className:e,...t}){return p.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b border-border px-3",children:[p.jsx(yk,{className:"size-4 shrink-0 opacity-50"}),p.jsx(Ao.Input,{"data-slot":"command-input",className:pe("flex h-9 w-full rounded-md bg-transparent py-2 text-base outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function u8({className:e,...t}){return p.jsx(Ao.List,{"data-slot":"command-list",className:pe("max-h-[min(22rem,50vh)] scroll-py-1 overflow-x-hidden overflow-y-auto py-1",e),...t})}function d8(e){return p.jsx(Ao.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-base text-muted-foreground",...e})}function Ml({className:e,...t}){return p.jsx(Ao.Group,{"data-slot":"command-group",className:pe("overflow-hidden p-1 text-foreground",e),...t})}function f8({className:e,...t}){return p.jsx(Ao.Separator,{"data-slot":"command-separator",className:pe("-mx-1 h-px bg-border",e),...t})}function ci({className:e,...t}){return p.jsx(Ao.Item,{"data-slot":"command-item",className:pe("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-base outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}function nC({className:e,...t}){return p.jsx("span",{"data-slot":"command-shortcut",className:pe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function h8({open:e,onOpenChange:t,items:n,onToggleSidebar:i,onSwitchRepo:o}){const{repo:a}=hn(),c=ps(),{resolved:u,setPreference:h}=us(),f=ok(a.cwd,e),g=ZA(a.cwd),m=lf(a.cwd),[y,b]=x.useState(""),w=x.useMemo(()=>new Set(n.filter(j=>j.kind==="session").map(j=>Dn(j))),[n]),C=x.useMemo(()=>n.filter(j=>!j.pr),[n]),E=x.useMemo(()=>n.filter(j=>!!j.pr),[n]),S=j=>{T(),c.openItem(dr(j))},R=y.trim(),k=(f.data??[]).some(j=>j===R),I=R.length>0&&!k&&!/\s/.test(R),T=()=>{t(!1),b("")},Q=j=>{T();const _=Ee.loading(`Checking out ${j}…`),F=n.find(J=>Dn(J)===j),O=F?dr(F):`branch:${j}`,H=`item:${O}`,U=F!=null||c.tabs.some(J=>J.kind==="item"&&(J.itemKey===O||J.id===H));c.openItem(O),g.mutate(j,{onSuccess:()=>Ee.success(`Worktree ready: ${j}`,{id:_}),onError:J=>{Ee.error(Xe(J),{id:_}),U||c.close(H)}})};return p.jsxs(l8,{open:e,onOpenChange:j=>j?t(!0):T(),title:"Command palette",description:"Jump to a worktree or pull request, check out a branch, or run a command",children:[p.jsx(c8,{placeholder:"Branch name, pull request, or command…",value:y,onValueChange:b}),p.jsxs(u8,{children:[p.jsx(d8,{children:"No matches."}),I&&p.jsx(Ml,{heading:"Create",children:p.jsxs(ci,{value:`create ${R}`,onSelect:()=>Q(R),children:[p.jsx(h3,{}),"Create branch ",p.jsx("span",{className:"font-mono",children:R})," and open a worktree"]})}),p.jsxs(Ml,{heading:"Commands",children:[p.jsxs(ci,{value:"command settings preferences",onSelect:()=>{T(),c.openSettings()},children:[p.jsx(OA,{}),"Open settings",p.jsxs(nC,{children:[cn," ,"]})]}),p.jsxs(ci,{value:"command refresh pull requests sync",onSelect:()=>{T(),m.mutate(void 0,{onError:j=>Ee.error(Xe(j))})},children:[p.jsx(NA,{}),"Refresh pull requests"]}),p.jsxs(ci,{value:"command toggle sidebar",onSelect:()=>{T(),i()},children:[p.jsx(F3,{}),"Toggle sidebar",p.jsxs(nC,{children:[cn," B"]})]}),p.jsxs(ci,{value:"command toggle theme dark light",onSelect:()=>{T(),h(u==="dark"?"light":"dark")},children:[u==="dark"?p.jsx(dg,{}):p.jsx(ug,{}),"Switch to ",u==="dark"?"light":"dark"," theme"]}),p.jsxs(ci,{value:"command switch open repository",onSelect:()=>{T(),o()},children:[p.jsx(MA,{}),"Open another repository…"]})]}),p.jsx(f8,{}),C.length>0&&p.jsx(Ml,{heading:"Worktrees",children:C.map(j=>p.jsx(rC,{item:j,onOpen:S},dr(j)))}),E.length>0&&p.jsx(Ml,{heading:"Worktrees w/ pull request",children:E.map(j=>p.jsx(rC,{item:j,onOpen:S},dr(j)))}),p.jsxs(Ml,{heading:"Check out branch",children:[f.isLoading&&p.jsx(ci,{disabled:!0,value:"__loading",children:"Loading branches…"}),(f.data??[]).filter(j=>!w.has(j)).slice(0,200).map(j=>p.jsxs(ci,{value:`branch ${j}`,onSelect:()=>Q(j),children:[p.jsx(Da,{}),p.jsx("span",{className:"truncate font-mono",children:j})]},j))]})]})]})}function rC({item:e,onOpen:t}){return p.jsxs(ci,{value:`open ${Qd(e)} ${Dn(e)} ${e.pr?`#${e.pr.id}`:""}`,onSelect:()=>t(e),children:[e.pr?p.jsx(of,{}):p.jsx(Da,{}),p.jsx("span",{className:"truncate",children:Qd(e)}),e.pr&&p.jsxs("span",{className:"text-muted-foreground",children:["#",e.pr.id]})]})}function hr(e,t){return`${e}:${t}`}function sB(e,t){const n=e.comments[0];return{kind:"remote",id:e.id,file:e.file,line:e.lineStart,body:n?.body??"",author:n?.author??"unknown",replies:e.comments.slice(1).map(i=>({author:i.author,body:i.body}))}}function oB(e,t){return{kind:"local",id:e.id,file:e.file,line:e.lineStart,body:e.body,severity:e.severity}}let fr=new Map;const Ag=new Set;function p8(e){return Ag.add(e),()=>{Ag.delete(e)}}function m8(){return fr}function g8(){for(const e of Ag)e()}function df(e,t){fr=new Map(fr),t.length===0?fr.delete(e):fr.set(e,t),g8()}function Td(e,t){const n=fr.get(e)??[],i=hr(t.kind,t.id),o=n.findIndex(c=>hr(c.kind,c.id)===i),a=n.slice();if(o>=0){const c=a[o];a[o]=t.annotation===void 0&&c.annotation!==void 0?{...t,annotation:c.annotation}:t}else a.push(t);df(e,a)}function iy(e,t,n){const i=fr.get(e);if(!i)return;const o=hr(t,n),a=i.filter(c=>hr(c.kind,c.id)!==o);a.length!==i.length&&df(e,a)}function aB(e,t,n){const i=fr.get(e);if(!i)return!1;const o=hr(t,n);return i.some(a=>hr(a.kind,a.id)===o)}function lB(e,t){return aB(e,t.kind,t.id)?(iy(e,t.kind,t.id),!1):(Td(e,t),!0)}function cB(e,t,n,i){const o=fr.get(e);if(!o)return;const a=hr(t,n),c=o.findIndex(g=>hr(g.kind,g.id)===a);if(c<0)return;const u=i.trim(),h=o.slice(),f={...h[c]};u?f.annotation=u:delete f.annotation,h[c]=f,df(e,h)}function A8(e){return fr.get(e)??[]}function y8(e){return fr.get(e)?.length??0}function uB(e){fr.has(e)&&df(e,[])}const v8="Resolve these PR review comments:";function iC(e){const t=e.file??"general";return e.line!=null?`${t}:${e.line}`:t}function b8(e,t){const n=[],i=t+1;if(e.kind==="local")n.push(`### ${i}. ${iC(e)} [${e.severity}]`),n.push(e.body);else{n.push(`### ${i}. ${iC(e)}`),n.push(`@${e.author}: ${e.body}`);for(const o of e.replies)n.push(` ↳ @${o.author}: ${o.body}`)}return e.annotation&&n.push(`Your note: ${e.annotation}`),n.join(`
|
|
51
|
+
`)}function dB(e){const t=e.map(b8);return[v8,"",t.join(`
|
|
52
|
+
|
|
53
|
+
`)].join(`
|
|
54
|
+
`)}function fB(){return{snapshot:x.useSyncExternalStore(p8,m8),add:Td,remove:iy,has:aB,toggle:lB,annotate:cB,list:A8,count:y8,clear:uB}}const x8=[];function sy(e){const{snapshot:t}=fB(),n=x.useMemo(()=>t.get(e)??x8,[t,e]);return x.useMemo(()=>{const i=new Set(n.map(a=>hr(a.kind,a.id))),o=(a,c)=>n.find(u=>u.kind===a&&u.id===c);return{items:n,count:n.length,has:(a,c)=>i.has(hr(a,c)),noteFor:(a,c)=>o(a,c)?.annotation,add:a=>Td(e,a),removeWithUndo:a=>{iy(e,a.kind,a.id),Ee("Removed from plan",{action:{label:"Undo",onClick:()=>Td(e,a)}})},toggle:a=>lB(e,a),annotate:(a,c,u)=>cB(e,a,c,u),clear:()=>uB(e)}},[n,e])}function w8(e){const{snapshot:t}=fB();return e==null?0:t.get(e)?.length??0}function hB(e,t,n,i){const[o,a]=x.useState(!1),c=e.has(t,n),u=e.noteFor(t,n),h=x.useCallback(()=>{const m=i();e.has(t,n)?(a(!1),e.removeWithUndo(m)):e.add(m)},[e,t,n,i]),f=x.useCallback(()=>{e.add(i()),a(!0)},[e,i]),g=x.useCallback(m=>{e.annotate(t,n,m),a(!1)},[e,t,n]);return{inPlan:c,note:u,composing:o,toggleInPlan:h,startNote:f,saveNote:g,cancelNote:x.useCallback(()=>a(!1),[])}}function pB(e){const{repo:t}=hn(),n=ps(),i=ty(t.cwd),o=ak(t.cwd),a=i.mutate,[c,u]=x.useState(null),h=x.useCallback(C=>{const E=new Map(e.map(k=>[dr(k),k])),S=new Map(e.map(k=>[Dn(k),k])),R=new Map;for(const k of C){if(k.kind!=="item")continue;const I=E.get(k.itemKey)??(k.branch?S.get(k.branch):void 0);if(!I)continue;const T=Dn(I);for(const Q of e){const j=to(Q);j&&Dn(Q)===T&&R.set(j,T)}}return[...R].map(([k,I])=>({name:k,branch:I}))},[e]),f=x.useCallback(C=>{for(const E of C)a(E,{onError:S=>Ee.error(Xe(S))})},[a]),g=x.useCallback((C,E)=>{const S=h(C),R=S.map(I=>I.name),k=S.filter(I=>o.data?.[I.name]?.active).map(I=>I.branch);if(k.length>0){u({activeBranches:k,run:()=>{f(R),E()}});return}f(R),E()},[h,f,o.data]),m=x.useCallback(C=>{const E=n.tabs.find(S=>S.id===C);E&&g([E],()=>n.close(C))},[n,g]),y=x.useCallback(C=>{g(n.tabs.filter(E=>E.id!==C),()=>n.closeOthers(C))},[n,g]),b=x.useCallback(()=>{g(n.tabs,()=>n.closeAll())},[n,g]),w=x.useCallback(()=>{n.activeId&&m(n.activeId)},[n.activeId,m]);return x.useMemo(()=>{const C=c?p.jsx(Na,{open:!0,onOpenChange:E=>!E&&u(null),children:p.jsxs(_a,{className:"sm:max-w-md",children:[p.jsxs(uf,{children:[p.jsxs(Oa,{children:["Agent",c.activeBranches.length===1?" is":"s are"," still working"]}),p.jsxs(xc,{children:[c.activeBranches.map((E,S)=>p.jsxs("span",{children:[S>0&&", ",p.jsx("span",{className:"font-mono text-foreground",children:E})]},E))," ",c.activeBranches.length===1?"is":"are"," actively producing output. Closing the tab stops the agent."]})]}),p.jsxs(ry,{children:[p.jsx(be,{variant:"ghost",onClick:()=>u(null),children:"Keep working"}),p.jsx(be,{variant:"destructive",onClick:()=>{u(null),c.run()},children:"Stop agent & close"})]})]})}):null;return{close:m,closeOthers:y,closeAll:b,closeActive:w,confirmDialog:C}},[m,y,b,w,c])}class C8 extends x.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){t.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[p.jsx(xk,{className:"size-8 text-warning"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:this.props.label??"Something went wrong rendering this view."}),p.jsx("p",{className:"mx-auto mt-1 max-w-md font-mono text-sm text-muted-foreground",children:this.state.error.message})]}),p.jsxs(be,{variant:"outline",size:"sm",onClick:()=>this.setState({error:null}),children:[p.jsx(_A,{})," Try again"]})]}):this.props.children}}const E8=[{key:"appearance",label:"Appearance",blurb:"How Kirby Desktop looks."},{key:"general",label:"General",blurb:"Editor, identity and worktree placement."},{key:"agent",label:"Agent",blurb:"Which AI coding agent Kirby launches."},{key:"sync",label:"Sync",blurb:"Keeping worktrees in step with merged pull requests."},{key:"terminal",label:"Terminal",blurb:"How agent sessions are hosted."},{key:"provider",label:"Provider",blurb:"Credentials and project for your VCS host."}];function S8(e){const t=new Map;for(const n of e??[]){const i=t.get(n.group)??[];i.push(n),t.set(n.group,i)}return E8.filter(n=>n.key==="appearance"||(t.get(n.key)?.length??0)>0).map(n=>({...n,fields:t.get(n.key)??[]}))}function Xt({className:e,...t}){return p.jsx("div",{"data-slot":"skeleton",className:pe("animate-pulse rounded-md bg-muted",e),...t})}function ff(e){return p.jsx(__,{"data-slot":"select",...e})}function hf(e){return p.jsx(P_,{"data-slot":"select-value",...e})}function pf({className:e,children:t,...n}){return p.jsxs(z_,{"data-slot":"select-trigger",className:pe("flex h-7 w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-background px-2.5 py-1 text-base shadow-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",e),...n,children:[t,p.jsx(F_,{asChild:!0,children:p.jsx(Er,{className:"size-3.5 opacity-60"})})]})}function mf({className:e,children:t,position:n="popper",...i}){return p.jsx(G_,{children:p.jsxs(Y_,{"data-slot":"select-content",className:pe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[p.jsx(sO,{className:"flex cursor-default items-center justify-center py-1",children:p.jsx(jA,{className:"size-3.5"})}),p.jsx(W_,{className:pe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(oO,{className:"flex cursor-default items-center justify-center py-1",children:p.jsx(Er,{className:"size-3.5"})})]})})}function ss({className:e,children:t,...n}){return p.jsxs(tO,{"data-slot":"select-item",className:pe("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1 pr-7 pl-2 text-base outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(iO,{children:p.jsx(Lr,{className:"size-3.5"})})}),p.jsx(nO,{children:t})]})}function mB({className:e,...t}){return p.jsx(pO,{"data-slot":"switch",className:pe("peer inline-flex h-[18px] w-8 shrink-0 cursor-default items-center rounded-full border border-transparent shadow-xs transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:p.jsx(gO,{"data-slot":"switch-thumb",className:"pointer-events-none block size-3.5 rounded-full bg-white shadow ring-0 transition-transform data-[state=checked]:translate-x-[15px] data-[state=unchecked]:translate-x-0.5"})})}function k8({className:e,...t}){return p.jsx(i_,{"data-slot":"label",className:pe("flex select-none items-center gap-2 text-base font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function sc({label:e,description:t,control:n,htmlFor:i}){return p.jsxs("div",{className:"flex items-center gap-6 px-4 py-3",children:[p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx(k8,{htmlFor:i,children:e}),t&&p.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:t})]}),p.jsx("div",{className:"flex shrink-0 items-center gap-2",children:n})]})}function B8(){const{preference:e,setPreference:t}=us(),n=ik();return p.jsxs(p.Fragment,{children:[p.jsx(sc,{label:"Theme",description:"Follow the system, or force light / dark.",control:p.jsxs(ff,{value:e,onValueChange:i=>t(i),children:[p.jsx(pf,{className:"w-40",children:p.jsx(hf,{})}),p.jsxs(mf,{children:[p.jsx(ss,{value:"system",children:"System"}),p.jsx(ss,{value:"light",children:"Light"}),p.jsx(ss,{value:"dark",children:"Dark"})]})]})}),p.jsx(sc,{htmlFor:"pref-native-frame",label:"Native window frame",description:"Use the operating system's title bar and menu bar instead of Kirby's compact header. Takes effect the next time Kirby starts.",control:p.jsx(mB,{id:"pref-native-frame",checked:n.nativeFrame,onCheckedChange:i=>{zz({nativeFrame:i}).then(()=>Ee.success(i?"Native frame on next launch":"Compact header on next launch")).catch(o=>Ee.error(Xe(o)))}})})]})}const I8="••••••••";function R8(e,t,n){return n?n.seenAt!==t||n.base!==e?e:n.value:e}const Hs="__custom__";function Q8({field:e,updatedAt:t}){const{repo:n}=hn(),i=M4(n.cwd),o=`field-${e.key}-${e.label.replace(/\W+/g,"-")}`,a=x.useRef(null),c=(f,g=e.label)=>{f!==R8(e.value,t,a.current)&&(a.current={seenAt:t,base:e.value,value:f},i.mutate({ref:{label:e.label,key:e.key},value:f},{onSuccess:()=>Ee.success(`${g} saved`),onError:m=>Ee.error(Xe(m))}))},u=!!e.disabled,h=u?{...e,description:e.description?`${e.description} (${e.disabled})`:e.disabled}:e;return e.kind==="boolean"?p.jsx(sc,{htmlFor:o,label:h.label,description:h.description,control:p.jsx(mB,{id:o,checked:e.value==="true",disabled:i.isPending||u,onCheckedChange:f=>c(f?"true":"false")})}):e.kind==="select"?p.jsx(T8,{field:h,id:o,onSave:c,saving:i.isPending||u},e.value):p.jsx(j8,{field:h,id:o,onSave:c,saving:i.isPending||u},e.value)}function T8({field:e,id:t,onSave:n,saving:i}){const o=e.presets??[],a=o.some(b=>b.value===null),c=o.some(b=>b.value===e.value),u=o.find(b=>b.value!==null)?.value??"",h=e.value===""?u:c?e.value:Hs,[f,g]=x.useState(h===Hs),[m,y]=x.useState(e.value);return p.jsx(sc,{htmlFor:t,label:e.label,description:e.description,control:p.jsxs(p.Fragment,{children:[f&&p.jsx(HA,{value:m,onChange:b=>y(b.target.value),onBlur:b=>n(b.currentTarget.value),onKeyDown:b=>b.key==="Enter"&&n(b.currentTarget.value),className:"w-48 font-mono",placeholder:"custom value"}),p.jsxs(ff,{value:f?Hs:h,disabled:i,onValueChange:b=>{if(b===Hs){g(!0);return}g(!1),n(b)},children:[p.jsx(pf,{id:t,className:"w-44",children:p.jsx(hf,{})}),p.jsxs(mf,{children:[o.filter(b=>b.value!==null).map(b=>p.jsx(ss,{value:b.value??"",children:b.name},b.name)),a&&p.jsx(ss,{value:Hs,children:"Custom…"}),!a&&h===Hs&&p.jsxs(ss,{value:Hs,children:["Custom: ",e.value]})]})]})]})})}function j8({field:e,id:t,onSave:n,saving:i}){const[o,a]=x.useState(e.value),[c,u]=x.useState(!1),h=o!==e.value;return p.jsx(sc,{htmlFor:t,label:e.label,description:e.description,control:p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"relative",children:[p.jsx(HA,{id:t,type:e.masked&&!c?"password":"text",value:o,disabled:i,onChange:f=>a(f.target.value),onBlur:f=>n(f.currentTarget.value),onKeyDown:f=>f.key==="Enter"&&n(f.currentTarget.value),className:pe("w-64 font-mono",e.masked&&"pr-8"),placeholder:e.masked?"••••••••":void 0}),e.masked&&o!==I8&&p.jsx("button",{type:"button",onClick:()=>u(f=>!f),"aria-label":c?"Hide":"Reveal",className:"absolute top-1/2 right-2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c?p.jsx(DA,{className:"size-3.5"}):p.jsx(hk,{className:"size-3.5"})})]}),h&&p.jsx(be,{size:"sm",onClick:()=>n(o),disabled:i,children:"Save"})]})})}function D8(){const{repo:e}=hn(),t=iL(e.cwd),[n,i]=x.useState("appearance"),o=S8(t.data),a=c=>{i(c),document.getElementById(`settings-${c}`)?.scrollIntoView({block:"start",behavior:"smooth"})};return p.jsxs("div",{className:"flex h-full min-h-0",children:[p.jsx("nav",{className:"w-44 shrink-0 border-r border-border bg-sidebar/60 py-3",children:o.map(c=>p.jsx("button",{type:"button",onClick:()=>a(c.key),className:pe("flex h-7 w-full items-center px-4 text-base transition-colors hover:bg-accent",n===c.key?"border-l-2 border-primary bg-sidebar-active font-medium text-foreground":"border-l-2 border-transparent text-muted-foreground"),children:c.label},c.key))}),p.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:p.jsxs("div",{className:"mx-auto max-w-3xl px-8 py-6",children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Settings"}),p.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Stored in ",p.jsx("span",{className:"font-mono",children:"~/.kirby"})," and the repository's ",p.jsx("span",{className:"font-mono",children:".kirby/"})," — shared with the Kirby terminal UI."]}),t.isLoading&&p.jsxs("div",{className:"mt-6 space-y-3",children:[p.jsx(Xt,{className:"h-20 w-full"}),p.jsx(Xt,{className:"h-20 w-full"})]}),t.error&&p.jsx("div",{className:"mt-6 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:String(t.error.message)}),o.map(c=>p.jsxs("section",{id:`settings-${c.key}`,className:"scroll-mt-4 pt-8",children:[p.jsx("h2",{className:"text-lg font-semibold",children:c.label}),p.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:c.blurb}),p.jsx("div",{className:"divide-y divide-border rounded-lg border border-border bg-card",children:c.key==="appearance"?p.jsx(B8,{}):c.fields.map(u=>p.jsx(Q8,{field:u,updatedAt:t.dataUpdatedAt},`${u.key}:${u.label}`))})]},c.key)),p.jsx("div",{className:"h-16"})]})})]})}function M8({onOpenPalette:e,hasItems:t}){return p.jsxs("div",{className:"flex h-full select-none flex-col items-center justify-center bg-background text-muted-foreground",children:[p.jsx(zA,{className:"size-14 opacity-20 grayscale"}),p.jsx("p",{className:"mt-4 text-base",children:t?"Pick a worktree or pull request from the sidebar.":"Check out a branch to create your first worktree."}),p.jsxs("div",{className:"mt-6 grid grid-cols-[auto_auto] items-center gap-x-4 gap-y-2 text-sm",children:[p.jsx("span",{className:"text-right",children:"Search & commands"}),p.jsxs("button",{type:"button",onClick:e,className:"flex items-center gap-1 hover:text-foreground",children:[p.jsx(es,{children:cn}),p.jsx(es,{children:"K"})]}),p.jsx("span",{className:"text-right",children:"Toggle sidebar"}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(es,{children:cn}),p.jsx(es,{children:"B"})]}),p.jsx("span",{className:"text-right",children:"Settings"}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(es,{children:cn}),p.jsx(es,{children:","})]})]})]})}const N8=7.8,_8=18,O8=24,z8=16;function L8(e,t){const n=document.createElement("div");n.className="term-row",n.style.position="absolute",n.style.visibility="hidden";const i=document.createElement("span");i.textContent="W".repeat(40),n.appendChild(i),e.appendChild(n);const o=i.getBoundingClientRect().width/40,a=n.getBoundingClientRect().height;if(n.remove(),o<=0||a<=0)return null;const c=getComputedStyle(e),u=(parseFloat(c.paddingLeft)||0)+(parseFloat(c.paddingRight)||0),h=(parseFloat(c.paddingTop)||0)+(parseFloat(c.paddingBottom)||0);return{cols:Math.max(20,Math.floor((t.width-u)/o)),rows:Math.max(5,Math.floor((t.height-h)/a))}}function oy(e,t=1){const n=Math.max(20,Math.floor((e.width*t-O8)/N8)),i=Math.max(5,Math.floor((e.height-z8)/_8));return{cols:n,rows:i}}const gB="kirby.diff.options",sm={view:"unified",wrap:!1,hideResolved:!1},yg=new Set;let gd=(()=>{try{const e=localStorage.getItem(gB);return e?{...sm,...JSON.parse(e)}:sm}catch{return sm}})();function td(e){gd={...gd,...e};try{localStorage.setItem(gB,JSON.stringify(gd))}catch{}for(const t of yg)t()}function P8(e){return yg.add(e),()=>yg.delete(e)}function ay(){return x.useSyncExternalStore(P8,()=>gd)}function F8(e,t){return e==="agent"&&t.hasSession?"agent":e==="review"&&t.hasDrafts?"review":e==="overview"&&t.hasPr?"overview":e==="plan"&&t.hasPlan?"plan":"diff"}function H8(e,t,n){return e||t!=null&&n===void 0}function U8(e){return e.filter(t=>t.status!=="posted")}function q8(e){const t=new Map;for(const n of e)(t.get(n.file)??t.set(n.file,[]).get(n.file)).push(n);return t}function G8(e){const t=new Map;for(const n of e)n.file!=null&&(t.get(n.file)??t.set(n.file,[]).get(n.file)).push(n);return t}function Y8(e,t,n){return e.map(([i,o])=>({path:i,additions:o.filter(a=>a.type==="add").length,deletions:o.filter(a=>a.type==="remove").length,comments:(t.get(i)??[]).filter(a=>!a.isResolved).length,drafts:(n.get(i)??[]).length}))}function K8(e,t,n,i){const o=new Map(e.map(([c],u)=>[c,u])),a=[];for(const c of t)a.push($8(c));for(const c of n)a.push(V8(c,o));for(const c of i)a.push(J8(c,o));return a.sort(X8),a}function $8(e){const t=e.comments[0];return{id:e.id,kind:"thread",author:t?.author??"",where:"Conversation",preview:t?.body??"",resolved:e.isResolved,file:null,line:0,fileRank:-1}}function V8(e,t){const n=e.comments[0];return{id:e.id,kind:"thread",author:n?.author??"",where:`${e.file?.split("/").pop()??""}${e.lineStart!=null?`:${e.lineStart}`:""}`,preview:n?.body??"",resolved:e.isResolved,file:e.file,line:e.lineStart??0,fileRank:t.get(e.file??"")??Number.MAX_SAFE_INTEGER}}function J8(e,t){return{id:e.id,kind:"draft",author:"Draft",where:`${e.file.split("/").pop()}:${e.lineStart}`,preview:e.body,resolved:!1,severity:e.severity,file:e.file,line:e.lineStart,fileRank:t.get(e.file)??Number.MAX_SAFE_INTEGER}}function X8(e,t){const n=e.file==null?0:1,i=t.file==null?0:1;return n!==i?n-i:e.fileRank!==t.fileRank?e.fileRank-t.fileRank:e.line-t.line}function W8(e,t){return t?e.filter(n=>!n.resolved):e}function Z8(e,t){return e.findIndex(n=>n.id===t)}function e6(e,t,n){if(e.length===0)return null;const i=t<0?0:(t+n+e.length)%e.length;return e[i]}function t6({files:e,general:t,inlineThreads:n,drafts:i,hideResolved:o,onShowDiff:a}){const c=x.useRef(null),u=x.useRef(null),[h,f]=x.useState(null),[g,m]=x.useState(null),y=x.useMemo(()=>K8(e,t,n,i),[e,t,n,i]),b=W8(y,o),w=Z8(b,g),C=x.useCallback(k=>{f(k),a(),requestAnimationFrame(()=>u.current?.jumpToFile(k))},[a]),E=x.useCallback((k,I)=>{m(k),a(),I&&f(I),requestAnimationFrame(()=>{const T=u.current;T?.jumpToId(k)||I&&T?.jumpToFile(I)||c.current?.scrollTo({top:0})})},[a]),S=x.useCallback(k=>{const I=b.find(T=>T.id===k.id);E(k.id,I?.file??null)},[b,E]),R=x.useCallback(k=>{const I=e6(b,w,k);I&&E(I.id,I.file??null)},[b,w,E]);return{scrollRef:c,jumpRef:u,items:b,navIndex:w,focusId:g,selectedFile:h,jumpToFile:C,jumpToId:E,jumpToItem:S,step:R}}function n6(e){return e.file==null?"Conversation":e.line!=null?`${e.file}:${e.line}`:e.file}function r6(e){return e.map((t,n)=>({key:hr(t.kind,t.id),index:n+1,kind:t.kind,id:t.id,location:n6(t),...t.kind==="remote"?{author:t.author,replyCount:t.replies.length}:{severity:t.severity,replyCount:0},body:t.body,...t.annotation?{note:t.annotation}:{}}))}function AB(e){return{count:e.length,noted:e.filter(t=>(t.annotation??"").trim().length>0).length}}function i6(e){const t=e.agentRunning?["inject","new-session"]:["new-session"];return{canSend:e.count>0&&!e.sending,choices:t,primary:t[0]}}function s6({cwd:e,pr:t,running:n,paneRef:i,threads:o,drafts:a,onSent:c,onShowInDiff:u,onOpenPlan:h}){const f=sy(t?.id??0),g=T4(e),{count:m,noted:y}=AB(f.items),[b,w]=x.useState(null),C=x.useCallback(S=>{const R=o.find(Q=>Q.id===S),k=R?void 0:a.find(Q=>Q.id===S),I=R?sB(R):k?oB(k):null;if(!I)return;const T=f.has(I.kind,I.id);window.kirby.showContextMenu([{id:"toggle",label:T?"Remove from plan":"Add to plan"},{id:"note",label:T?"Edit note…":"Add to plan with a note…"}]).then(Q=>{Q==="toggle"?T?f.removeWithUndo(I):f.add(I):Q==="note"&&(f.add(I),w({key:hr(I.kind,I.id)}),h())})},[o,a,f,h]),E=x.useCallback(S=>{if(!t||f.items.length===0)return;const R=i.current?.getBoundingClientRect();g.mutate({pr:t,prompt:dB(f.items),mode:S,...R?oy(R,.6):{}},{onSuccess:k=>{f.clear(),c(),Ee.success(k==="injected"?"Plan sent to the agent":"Agent started with the plan")},onError:k=>Ee.error(Xe(k))})},[t,f,g,i,c]);return t?{count:m,noted:y,api:f,onCommentContextMenu:C,wiring:{items:f.items,agentRunning:n,sending:g.isPending,onRemove:f.removeWithUndo,onAnnotate:(S,R)=>f.annotate(S.kind,S.id,R),onShowInDiff:u,onClear:f.clear,onSend:E,openNoteFor:b}}:{count:0,noted:0,api:f,onCommentContextMenu:C}}const o6="AGFzbQEAAAABQAtgAAF/YAAAYAF/AX9gAX8AYAJ/fwBgBH9/f38AYAN/f38AYAJ/fwF/YAV/f39/fwBgBH9/f38Bf2ADf39/AX8DQUAAAAAAAAEAAAICAAAAAAACAgICAAAAAAAAAAAAAAAAAAAAAAEAAAMDBAQFBQUEBgcBCAkGAQEECgYGBAQDAAQEBAUBcAEBAQUDAQBkBgkBfwFBgIDAAAsH/gUsBm1lbW9yeQIACmdldE1heENvbHMAAAtnZXRDZWxsU2l6ZQABDmdldERlYnVnTG9nTWF4AAIUZ2V0RGVidWdMb2dFbnRyeVNpemUAARBnZXREZWJ1Z0xvZ0NvdW50AAMOZ2V0RGVidWdMb2dQdHIABA1jbGVhclJlc3BvbnNlAAUOZ2V0UmVzcG9uc2VMZW4ABg5nZXRSZXNwb25zZVB0cgAHFGdldFNjcm9sbGJhY2tMaW5lTGVuAAgRZ2V0U2Nyb2xsYmFja0xpbmUACRtnZXRTY3JvbGxiYWNrRGlzY2FyZGVkQ291bnQAChJnZXRTY3JvbGxiYWNrQ291bnQACxlnZXRIeXBlcmxpbmtSZWplY3RlZENvdW50AAwRZ2V0SHlwZXJsaW5rQ291bnQADRRnZXRIeXBlcmxpbmtDYXBhY2l0eQAODGdldExpbmtJZExlbgAPDGdldExpbmtJZFB0cgAQDWdldExpbmtVcmlMZW4AEQ1nZXRMaW5rVXJpUHRyABIPZ2V0VGl0bGVDaGFuZ2VkABMLZ2V0VGl0bGVMZW4AFAtnZXRUaXRsZVB0cgAVH2dldFN5bmNocm9uaXplZE91dHB1dEdlbmVyYXRpb24AFhVnZXRTeW5jaHJvbml6ZWRPdXRwdXQAFw5nZXRGb2N1c0V2ZW50cwAYC2dldE1vdXNlU2dyABkQZ2V0TW91c2VUcmFja2luZwAaEWdldFVzaW5nQWx0U2NyZWVuABsRZ2V0QnJhY2tldGVkUGFzdGUAHBBnZXRDdXJzb3JLZXlzQXBwAB0HZ2V0Um93cwAeB2dldENvbHMAHxBnZXRDdXJzb3JWaXNpYmxlACAMZ2V0Q3Vyc29yQ29sACEMZ2V0Q3Vyc29yUm93ACIKY2xlYXJEaXJ0eQAjC2dldERpcnR5UHRyACQKZ2V0R3JpZFB0cgAlCndyaXRlQnl0ZXMAJg5nZXRXcml0ZUJ1ZmZlcgA9DnJlc2l6ZVRlcm1pbmFsAD4EaW5pdAA/Cr6CAUAFAEGAAgsEAEEMCwQAQSALCwBBACgCzK6YgQALCABB5q6YgQALSQECfwJAQQAvAeqxmIEAIgBFDQBBAC8B9LGYgQAiAUEAOgCQtKCBAEEAIABBf2o7AeqxmIEAQQAgAUEBakH/D3E7AfSxmIEACwsrAQF/QQAhAAJAQQAvAeqxmIEARQ0AQQAvAfSxmIEALQCQtKCBACEACyAACxUAQQAvAfSxmIEAQQZ0QZC0mIEAags8AQF/QQAhAQJAIABBACgCuL3cggBPDQBBACgCvL3cggAgAGtB5wdqQegHcEGEGGwvAZj2oIEAIQELIAELRQEBf0EAIQECQCAAQQAoAri93IIATw0AQQAoAry93IIAIABrQecHakHoB3BBhBhsQZjeoIEAaiEBCyABQZjGoIEAIAEbCwsAQQAoAsC93IIACwsAQQAoAri93IIACwsAQQAoAsSO8IAACwsAQQAvAciumIEACwUAQYAICzkBAX9BACEBAkAgAEF/akH//wNxIgBBAC8ByK6YgQBB//8DcU8NACAAQYQFbC8Byo7wgAAhAQsgAQs8ACAAQX9qQf//A3EiAEGEBWxByI7wgABqQQAgAEEALwHIrpiBAEH//wNxSSIAG0GEBGpBxL3cggAgABsLOQEBf0EAIQECQCAAQX9qQf//A3EiAEEALwHIrpiBAEH//wNxTw0AIABBhAVsLwHIjvCAACEBCyABCzsAIABBf2pB//8DcSIAQYQFbEHIjvCAAGpBACAAQQAvAciumIEAQf//A3FJIgAbQQRqQcS93IIAIAAbCygBAX9BACEAAkBBAC0Aj7SYgQBFDQBBAEEAOgCPtJiBAEEBIQALIAALCwBBAC8B+rGYgQALCABBjrKYgQALCwBBACgC1K6YgQALCwBBAC0AhrKYgQALCwBBAC0AibKYgQALCwBBAC0AirKYgQALCwBBAC8B9rGYgQALCwBBAC0AjbKYgQALCwBBAC0AjrSYgQALCwBBAC0Ai7KYgQALCwBBAC8B2q6YgQALCwBBAC8B3K6YgQALCwBBAC0AiLKYgQALCwBBAC8B+LGYgQALCwBBAC8BgrKYgQALNwECf0EALwH2h/CAACEAQQAhAQJAA0AgACABRg0BIAFB+IfwgABqQQA6AAAgAUEBaiEBDAALCwsIAEH4h/CAAAsIAEH0h8CAAAuUSQMFfwF+B38jgICAgABB8ABrIgEkgICAgAAgAEGAwAAgAEGAwABJGyECQfiJ8IAAQQJqIQNBACEAA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAIAJGDQACQAJAAkACQAJAAkACQAJAAkACQAJAIAAtAMS93IIAIgRBaGoOBAIBAgABC0EALQCeivCAACEEQQBBAjoAnorwgAAgBEEHcUEHRg0DQQBBADsBtIrwgAAMKAsCQAJAAkACQAJAAkBBAC0AnorwgABBB3EOCAsAAQIDBAUHCwsgBMBBv39KDQlBAC0AvI7wgABBAC0Au47wgABrQQdxQbeO8IAAaiAEOgAAQQBBAC0Au47wgABBf2pBB3EiBDoAu47wgAAgBA0sQf3/AyEEAkACQAJAAkBBAC0AvI7wgABBB3FBfmoOAwABAgMLQQAtALeO8IAAQR9xQQZ0QQAtALiO8IAAQT9xciEEDAILQQAtALiO8IAAQT9xQQZ0QQAtALeO8IAAQQ9xQQx0ckEALQC5jvCAAEE/cXIhBAwBC0EALQC4jvCAAEE/cUEMdEEALQC3jvCAAEESdHJBAC0AuY7wgABBP3FBBnRyQQAtALqO8IAAQT9xciEEC0EAIAQ7AfiJ8IAAIAMgBEGAgPwAcUEQdjoAAEEAQQA6AJ6K8IAADAsLAkACQAJAIARBpX9qDgMAAgECC0EAQQQ6AJ6K8IAAQQBBADsBtIrwgABBAEEAOgChivCAAEEAQQA6AKCK8IAAQaKK8IAAIQVBiIIwIQQDQCAEQaiCMEYNLiAEQfSHwIAAakEAOwEAIAVBADoAACAEQQJqIQQgBUEBaiEFDAALC0EAQQc6AJ6K8IAAQQBBADoAto7wgABBAEEAOwGcivCAAAwsCwJAIARB8AFxQSBHDQACQEEALQC0ivCAACIFQQFLDQAgBSAEOgCyivCAAEEAQQAtALSK8IAAQQFqOgC0ivCAAAtBAEEDOgCeivCAAAwsCyAEQVBqQf8BcUHPAEkNECAEQSBJDSQMBAsCQCAEQfABcUEgRw0AQQAtALSK8IAAIgVBAUsNKyAFIAQ6ALKK8IAAQQBBAC0AtIrwgABBAWo6ALSK8IAADCsLIARBUGpB/wFxQc8ASQ0PIARBIEkNIwwDCwJAAkACQAJAAkACQCAEQVBqQf8BcSIFQQlLDQBBAC0AoYrwgAANL0EALQCgivCAACIEDQFBACEEQQBBAToAoIrwgAAMAgsgBEFGag4GAgIEBC0tAwsgBEF/akH/AXEhBAsgBEEBdCIEQX8gBC8B/InwgABBEHStQgp+IganIAZCIIinG0EQdiAFaiIEQf//AyAEQf//A0kbOwH8ifCAAAwsC0EALQCgivCAACIFQQ9LDStBACAFQQEgBUEBSxsiBUEBajoAoIrwgAAgBEE6Rw0rIAVBAToAoorwgAAMKwsgBEEhRg0pCwJAIARB8AFxQSBHDQACQEEALQC0ivCAACIFQQFLDQAgBSAEOgCyivCAAEEAQQAtALSK8IAAQQFqOgC0ivCAAAtBAEEFOgCeivCAAAwqCyAEQUBqQf8BcUE/SQ0JIARBIEkNIgwnCwJAIARB8AFxQSBHDQBBAC0AtIrwgAAiBUEBSw0pIAUgBDoAsorwgABBAEEALQC0ivCAAEEBajoAtIrwgAAMKQsgBEFAakH/AXFBP0kNCCAEQSBPDSYMIQsgBEFAakH/AXFBPksNJwtBAEEAOgCeivCAAAwmCyAEQQdHDQFBAEEAOgCeivCAAAtBAC8BnIrwgAAiBEECSQ0kQQAtALaK8IAAIgVBUGoOAwgHCAcLIARBIEkNIyAEQf8ARg0jAkBBAC8BnIrwgAAiBUH/A0sNACAFIAQ6ALaK8IAAQQAgBUEBajsBnIrwgAAMJAtBAEEBOgC2jvCAAAwjC0EAQQA6AJ6K8IAACyAEQSBJDRoCQCAEQf8ASQ0AAkAgBEH/AEcNAEEAQf8AOgCfivCAAAwdCwJAIARB4AFxQcABRw0AQQBBAjoAvI7wgABBACAEOgC3jvCAAEEAQQE6ALuO8IAAQQBBAToAnorwgAAMIwsCQCAEQfABcUHgAUcNAEEAQQM6ALyO8IAAQQAgBDoAt47wgABBAEECOgC7jvCAAEEAQQE6AJ6K8IAADCMLIARB+AFxQfABRw0iQQBBBDoAvI7wgABBACAEOgC3jvCAAEEAQQM6ALuO8IAAQQBBAToAnorwgAAMIgtBACAEOwH4ifCAACADQQA6AAALQQAoAviJ8IAAIQdBAC0AlcSggQANAQwYC0EAIAQ6AJ+K8IAAQQBBADoAnorwgAACQEEALQC1ivCAACIFQT9HDQACQAJAAkAgBEGYf2oOBQACAgIBAgtBARCngICAAAwiC0EAEKeAgIAADCELIARBPxCogICAAAwgCwJAIARB8ABHDQAgBUEhRw0AQQBBAToAkcSggQBBAEEBOgCIspiBAEEAQYCCgAg2AeaxmIEAQQBBAC8B2q6YgQA7AfCxmIEAQQBBADoAkMSggQBBAEEAOgCOtJiBAEEAQQA6AIuymIEAQQBBADoAirKYgQBBAEEAOwH2sZiBAEEAQQA6AImymIEAQQBBADoAhrKYgQBBAEEAOwHusZiBAEEAQQA6AJLEoIEADCALAkAgBUE+Rw0AIARBPhCogICAAAwgCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAEQUBqDjYlAAECAwQFBiMiBwgJCiIiCyIiDA0iIiIOIiIiIiIiIiQPIiIQESMSIiIiIiITJyIiIiYaNBsiC0EAQQBBAC8BgrKYgQAiBEEALwH8ifCAACIFQQEgBUEBSxtBAUEALQCgivCAABtrIgUgBSAESxs7AYKymIEAQQBBADoAlcSggQAMMwtBAEEALwGCspiBAEEALwH8ifCAACIEQQEgBEEBSxtBAUEALQCgivCAABtqQf//A3EiBEEALwHarpiBAEF/akH//wNxIgUgBCAFSRs7AYKymIEAQQBBADoAlcSggQAMMgtBAEEALwH4sZiBAEEALwH8ifCAACIEQQEgBEEBSxtBAUEALQCgivCAABtqQf//A3EiBEEALwHcrpiBAEF/akH//wNxIgUgBCAFSRs7AfixmIEAQQBBADoAlcSggQAMMQtBAEEAQQAvAfixmIEAIgRBAC8B/InwgAAiBUEBIAVBAUsbQQFBAC0AoIrwgAAbayIFIAUgBEsbOwH4sZiBAEEAQQA6AJXEoIEADDALQQBBAC8BgrKYgQBBAC8B/InwgAAiBEEBIARBAUsbQQFBAC0AoIrwgAAbakH//wNxIgRBAC8B2q6YgQBBf2pB//8DcSIFIAQgBUkbOwGCspiBAEEAQQA6AJXEoIEAQQBBADsB+LGYgQAMLwtBAEEAQQAvAYKymIEAIgRBAC8B/InwgAAiBUEBIAVBAUsbQQFBAC0AoIrwgAAbayIFIAUgBEsbOwGCspiBAEEAQQA6AJXEoIEAQQBBADsB+LGYgQAMLgtBAEEAQQAvAfyJ8IAAIgRBf2oiBSAFIARLG0EAQQAtAKCK8IAAGyIEQQAvAdyumIEAIgVBf2ogBCAFSRs7AfixmIEAQQBBADoAlcSggQAMLQsCQEEALQCgivCAAA0AIAFBgAI2AjggAUGAAjsBNCABQSA2AjAgAUEALwHosZiBADsBNgwkC0EALwH8ifCAACEFIAFBgAI2AjggAUEALwHosZiBADsBNiABQYACOwE0IAFBIDYCMAJAAkAgBQ4EJQABAS4LQQAhBAJAA0AgBEH//wNxQQAvAYKymIEAIgVPDQEgBCABQTBqEKmAgIAAIARBAWohBAwACwsgBUEAQQAvAfixmIEAQQFqIAFBMGoQqoCAgAAMLQtBACEEAkADQCAEQf//A3FBAC8B2q6YgQBPDQEgBCABQTBqEKmAgIAAIARBAWohBAwACwsgBUEDRw0sQQAoAsCO8IAAIgRFDSwgBEEANgKo37sBIARCADcCoN+7AQwsC0EALQCgivCAAA0LIAFBgAI2AjggAUGAAjsBNCABQSA2AjAgAUEALwHosZiBADsBNgwhC0EALwGCspiBACIEQQAvAe6xmIEASQ0qIARBAC8B8LGYgQAiBU8NKkEALwH8ifCAACEIQQAtAKCK8IAAIQkgAUGAAjYCOCABQYACOwE0IAFBIDYCMCABQQAvAeixmIEAOwE2IAQgBSAIQQEgCEEBSxtBASAJGyABQTBqEKuAgIAADCoLQQAvAYKymIEAIgRBAC8B7rGYgQBJDSkgBEEALwHwsZiBACIFTw0pQQAvAfyJ8IAAIQhBAC0AoIrwgAAhCSABQYACNgI4IAFBgAI7ATQgAUEgNgIwIAFBAC8B6LGYgQA7ATYgBCAFIAhBASAIQQFLG0EBIAkbIAFBMGoQrICAgAAMKQtBAC0AoIrwgAAhBUEALwH8ifCAACEEIAFBgAI2AjggAUEALwHosZiBADsBNiABQYACOwE0IAFBIDYCMEEALwH4sZiBACIIIARBASAEQQFLG0EBIAUbaiEHAkBBAC8BgrKYgQAiCUEALwHarpiBAE8NACAHQf//A3EiCkEALwHcrpiBACIEIAogBEkbIQcgCEH//wNxIgUgBCAFIARJGyEIIAQgBU0NACAIIAlBgBhsQfSHwIAAaiIJIAhBDGxqLQAJRSAFQQBHcWshCCAKIARPDQACQCAJIAdBDGxqLQAJDQAgB0EBaiEHDAELIAcgCSAHQX9qQf//A3FBDGxqLQAJQQJGaiEHCyAIQf//A3EiBEEMbCIJQfSHwIAAaiEFIAcgCGtB//8DcSIKQQxsQfSHwIAAaiELAkADQCAKIARqQQAvAdyumIEAIghPDQEgCyAJQQAvAYKymIEAQYAYbGoiCGoiBykCACEGIAhB/IfAgABqIAdBCGooAgA2AgAgCEH0h8CAAGogBjcCACAFQQxqIQUgCUEMaiEJIARBAWohBAwACwsCQANAQQAvAYKymIEAIQkgBCAIQf//A3FPDQEgBSAJQYAYbGoiCCABKQIwNwIAIAhBCGogAUEwakEIaigCADYCACAFQQxqIQUgBEEBaiEEQQAvAdyumIEAIQgMAAsLIAlBAToA+IfwgAAgCSABQTBqEK2AgIAADCgLQQAvAfyJ8IAAIgRBASAEQQFLG0EBQQAtAKCK8IAAGyEJQQAvAe6xmIEAIQUCQEEALQCNspiBAA0AIAVB//8DcQ0AQQAhBUEAKALAjvCAACIHRQ0AQQAhBUEAIQQDQCAEQf//A3EiCCAJTw0BIAhBAC8B8LGYgQAgBWtB//8DcU8NASAHIAQgBWpB//8DcUGAGGxB9IfAgABqQQAvAdyumIEAEK6AgIAAIARBAWohBEEALwHusZiBACEFDAALCyABQYACNgI4IAFBgAI7ATQgAUEgNgIwIAFBAC8B6LGYgQA7ATYgBUEALwHwsZiBACAJIAFBMGoQrICAgAAMJwtBAC0AoIrwgAAhBUEALwH8ifCAACEEIAFBgAI2AjggAUEALwHosZiBADsBNiABQYACOwE0IAFBIDYCMEEALwHusZiBAEEALwHwsZiBACAEQQEgBEEBSxtBASAFGyABQTBqEKuAgIAADCYLQQAtAKCK8IAAIQVBAC8B/InwgAAhBCABQYACNgI4IAFBAC8B6LGYgQA7ATYgAUGAAjsBNCABQSA2AjBBAC8BgrKYgQBBAC8B+LGYgQAiCCAIIARBASAEQQFLG0EBIAUbakH//wNxIgRBAC8B3K6YgQAiBSAEIAVJGyABQTBqEKqAgIAADCULQQBBAC8B+LGYgQBBAC8B/InwgAAiBEEBIARBAUsbQQFBAC0AoIrwgAAbakH//wNxIgRBAC8B3K6YgQBBf2pB//8DcSIFIAQgBUkbOwH4sZiBAEEAQQA6AJXEoIEADCQLQQBBAEEALwH8ifCAACIEQX9qIgUgBSAESxtBAEEALQCgivCAABsiBEEALwHarpiBACIFQX9qIAQgBUkbOwGCspiBAEEAQQA6AJXEoIEADCMLQQBBAC8BgrKYgQBBAC8B/InwgAAiBEEBIARBAUsbQQFBAC0AoIrwgAAbakH//wNxIgRBAC8B2q6YgQBBf2pB//8DcSIFIAQgBUkbOwGCspiBAEEAQQA6AJXEoIEADCILAkACQEEALQCgivCAAEUNAEEALwH8ifCAAA4EACMjASMLQQAvAfixmIEAIgRB/wFLDSIgBEEAOgCWxKCBAAwiC0GivOAAIQQDQCAEQaK+4ABGDSIgBEH0h8CAAGpBADoAACAEQQFqIQQMAAsLQQAhBAJAQQAtAKCK8IAAIgUNAEEAQYCCgAg2AeaxmIEAQQBBADoAksSggQAMIQsDQCAEQf8BcSIIIAVB/wFxTw0hAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAIQQF0LwH8ifCAACIJDjIAAQIDBAUUBgcIFBQUFBQUFBQUFBQUCQoLDBQNDg8UFBQUFBQUFBARFBQUFBQUFBQSExQLQQBBgIKACDYB5rGYgQBBAEEAOgCSxKCBAAwbC0EAQQAtAJLEoIEAQQFyOgCSxKCBAAwaC0EAQQAtAJLEoIEAQQJyOgCSxKCBAAwZC0EAQQAtAJLEoIEAQQRyOgCSxKCBAAwYCyAEQQFqIglB/wFxIgggBUH/AXFJDRBBAC0AksSggQAhBQwVC0EAQQAtAJLEoIEAQRByOgCSxKCBAAwWC0EAQQAtAJLEoIEAQSByOgCSxKCBAAwVC0EAQQAtAJLEoIEAQcAAcjoAksSggQAMFAtBAEEALQCSxKCBAEGAAXI6AJLEoIEADBMLQQBBAC0AksSggQBB/AFxOgCSxKCBAAwSC0EAQQAtAJLEoIEAQfsBcToAksSggQAMEQtBAEEALQCSxKCBAEH3AXE6AJLEoIEADBALQQBBAC0AksSggQBB7wFxOgCSxKCBAAwPC0EAQQAtAJLEoIEAQd8BcToAksSggQAMDgtBAEEALQCSxKCBAEG/AXE6AJLEoIEADA0LQQBBAC0AksSggQBB/wBxOgCSxKCBAAwMCyAEQeaxmIEAEK+AgIAAQf8BcSAEaiEEDAsLQQBBgAI7AeaxmIEADAoLIARB6LGYgQAQr4CAgABB/wFxIARqIQQMCQtBAEGAAjsB6LGYgQAMCAsgCUFiaiIHQf//A3FBCEkNBCAJQfj/A3FBKEYNAyAJQaZ/akH//wNxQQhJDQIgCUGcf2pB//8DcUEISQ0BIAVBf2ohBCAFQf8BcUF/aiEJA0AgCSAIRg0IIAhBo4rwgABqIQUgCEEBaiIHIQggBS0AAEUNBwwACwtBAC0AksSggQAhBSAILQCiivCAAEUNBEEAQQhBACAIQQF0LwH8ifCAABsgBUH3AXFyOgCSxKCBACAJIQQMBgtBACAJQaR/ajsB6LGYgQAMBQtBACAJQa5/ajsB5rGYgQAMBAtBACAJQVhqOwHosZiBAAwDC0EAIAc7AeaxmIEADAILQQAgBUEIcjoAksSggQAMAQsgB0F/aiEECyAEQQFqIQRBAC0AoIrwgAAhBQwACwtBAC8B/InwgAAhBCABQYACNgI4IAFBAC8B6LGYgQA7ATYgAUGAAjsBNCABQSA2AjAgBA4DFRQTHwtBAEEAOwH4sZiBABCwgICAAEEAQQA6AJXEoIEADBYLIAFB8ABqJICAgIAADwsgBUE4Rw0cQQAtALeK8IAAQf8BcUE7Rw0cAkBBAC0Ato7wgAANACABQSRqQbaK8IAAIARBAkE7ELGAgIAAIAEtAChFDQAgBCABKAIkIgVBAWoiCEYNACAFQbeK8IAAaiEMIAQgCGshDSAFQX5qIQtBASEJQQAhBQJAA0ACQAJAIAlB/wFxDQBBACEJQQAhCEEAIQQMAQsgAUEwakG4ivCAACALIAVBOhCxgICAACABKAIwIgogCyABLQA0IgcbIAVrIQQgBUG4ivCAAGohCCAHQQBHIQkgCkEBakEAIAcbIQULQQAhCgJAIAgNAEEAIQhBACEEDAILQQAhBwJAIARBA0kNACAIQQNBgIDAgABBAxCygICAACEHCyAEQQRJDQAgB0EBcUUNAAsgBEF9aiEEIAhBA2ohCAsCQCANQYAESw0AQQAhCiAEQQAgCBsiCUGAAUsNAEEALwHIrpiBACEHAkAgCEUNAEEBIQogB0EBakH//wNxIQVByI7wgAAhBANAIAUgCkYNAQJAIARBBGogBC8BACAMIA0QsoCAgABBAXFFDQAgBEGEBGogBEECai8BACAIIAkQsoCAgABBAXENAwsgBEGEBWohBCAKQQFqIQoMAAsLAkAgB0GACEYNACAHQYQFbCEEAkAgDUUNACAEQcyO8IAAaiAMIA38CgAACyAEIA07AciO8IAAAkAgCUUNACAEQcyS8IAAaiAIQYOAwIAAIAgbIAn8CgAACyAEIAk7AcqO8IAAQQBBAC8ByK6YgQBBAWoiCjsByK6YgQAMAQtBACEKQQBBACgCxI7wgABBAWoiBEF/IAQbNgLEjvCAAAtBACAKOwHssZiBAAwdC0EAQQA7AeyxmIEADBwLQQAtALeK8IAAQTtHDRsgBEF+aiIEQYACIARBgAJJGyEFQQAhBAJAA0AgBSAERg0BIARBjrKYgQBqIARBuIrwgABqLQAAOgAAIARBAWohBAwACwtBAEEBOgCPtJiBAEEAIAU7AfqxmIEADBsLQQAgBDoAn4rwgABBAEEAOgCeivCAAAJAQQAtALSK8IAARQ0AQQAtALKK8IAAQf8BcUEjRw0AAkAgBEG8f2oOCgUEHBwJHBwcHAYACwJAIARBSWoOAgIABwtBACEFAkADQCAFQf//A3FBAC8B2q6YgQBPDQFBACEEAkADQCAEQf//A3FBAC8B3K6YgQBPDQEgBSAEQZCAwIAAELOAgIAAIARBAWohBAwACwsgBUEBaiEFDAALC0EAQQA7AfixmIEAQQBBADsBgrKYgQAMGwsCQCAEQbx/ag4KBAMbGwgbGxsbBQALAkAgBEFJag4CAQIACyAEQeMARg0GDBoLELSAgIAADBkLELWAgIAADBgLQQBBADoAlcSggQBBAEEAOwH4sZiBAAsQsICAgAAMFgsCQEEALwGCspiBACIEQQAvAe6xmIEARw0AIAFBgAI2AjggAUGAAjsBNCABQSA2AjAgAUEALwHosZiBADsBNiAEQQAvAfCxmIEAQQEgAUEwahCrgICAAAwWCyAERQ0VQQAgBEF/ajsBgrKYgQAMFQsgBEHjAEcNFAtBAC8B3K6YgQBBAC8B2q6YgQAQtoCAgAAMEwtBAC8B+LGYgQAiBEH/AUsNEiAEQQE6AJbEoIEADBILIARBABCogICAAAwRC0EAQQBBAC8B/InwgAAiBEF/aiIFIAUgBEsbQQBBAC0AoIrwgAAiBBsiBUEALwHarpiBACIIQX9qIAUgCEkbOwGCspiBAEEAQQBBAC8B/onwgAAiBUF/aiIIIAggBUsbQQAgBEEBSxsiBEEALwHcrpiBACIFQX9qIAQgBUkbOwH4sZiBAEEAQQA6AJXEoIEADBALQQBBAEEALwH8ifCAACIEQX9qIgUgBSAESxtBAEEALQCgivCAABsiBEEALwHcrpiBACIFQX9qIAQgBUkbOwH4sZiBAEEAQQA6AJXEoIEADA8LQQAtAKCK8IAAIQVBAC8B/InwgAAhBCABQYACNgI4IAFBAC8B6LGYgQA7ATYgAUGAAjsBNCABQSA2AjAgBEEBIARBAUsbQQEgBRshCQJAQQAvAfixmIEAIgpBAC8B3K6YgQAiBE8NACAKIApBAEdBAC8BgrKYgQBBgBhsIApBDGxqLQD9h8CAAEVxayEKCwJAIAogCWoiC0H//wNxIgcgBEkNAEEALwGCspiBACAKIAQgAUEwahCqgICAAAwPCwJAA0AgBEF/aiIEQf//A3EgB0kNAUEALwGCspiBAEGAGGxB9IfAgABqIgUgBCAJa0H//wNxQQxsaiIIKQIAIQYgBSAEQf//A3FBDGxqIgVBCGogCEEIaigCADYCACAFIAY3AgAMAAsLQQAgC0H//wNxIgRBAC8B3K6YgQAiBSAEIAVJGyIEIApB//8DcSIFayIIIAggBEsbIQQgBUEMbEH0h8CAAGohBQJAA0BBAC8BgrKYgQAhCCAERQ0BIAUgCEGAGGxqIgggASkCMDcCACAIQQhqIAFBMGpBCGooAgA2AgAgBEF/aiEEIAVBDGohBQwACwsgCEEBOgD4h/CAACAIIAFBMGoQrYCAgAAMDgtBAEEALwH8ifCAACIEQX9qIgUgBSAESxtBAEEALQCgivCAACIIGyIJQQAvAf6J8IAAIgVBAC8B2q6YgQAiBCAFIARJGyAEIAUbIAQgCEEBSxsiBE8NDUEAIAQ7AfCxmIEAQQAgCTsB7rGYgQBBACAJQQBBAC0AkMSggQAbOwGCspiBAEEAQQA6AJXEoIEAQQBBADsB+LGYgQAMDQtBAC0AoIrwgABFDQxBAC8B/InwgABB//8DcUEGRw0MIAFBm7YBOwAwQQAvAfixmIEAIQQgAUEwaiABQTBqQQJBAC8BgrKYgQBBAWoQt4CAgAAiBUH/AXFqQTs6AAAgAUEwaiABQTBqIAVBAWogBEEBahC3gICAAEH/AXEiBGpB0gA6AABBAC8B6rGYgQAiCEGAEEYNDEEALwHysZiBACEFAkAgBEE/IARBP0kbQQFqIgRFDQAgBUEGdEGQtJiBAGogAUEwaiAE/AoAAAtBACAFQQFqQf8PcTsB8rGYgQAgBSAEOgCQtKCBAEEAIAhBAWo7AeqxmIEADAwLQQAvAYKymIEAIAFBMGoQqYCAgAAMCwtBAC8BgrKYgQBBAEEALwH4sZiBAEEBaiABQTBqEKqAgIAADAoLQQAvAYKymIEAQQAvAfixmIEAQQAvAdyumIEAIAFBMGoQqoCAgAAMCQtBAC8BgrKYgQBBAC8B+LGYgQBBAC8B3K6YgQAgAUEwahCqgICAAEEALwGCspiBACEEA0AgBEEBaiIEQf//A3FBAC8B2q6YgQBPDQkgBCABQTBqEKmAgIAADAALC0EAIQRB+wAhBQJAA0AgBSAETSIKDQECQCAHQf///wBxIgkgBSAEa0EBdiAEaiIIQQN0QZyAwIAAaikCACIGp0H///8AcU8NACAIIQUMAQsgCSAGQiCIp0H///8AcU0NASAIQQFqIQQMAAsLQQAhBEEALwH4sZiBACEIQQEhBQJAIAoNAEEALwHcrpiBAEH//wNxIglBAU0NAEEBIQRBAiEFIAhBAWpB//8DcSAJSQ0AQQAhBAJAQQAtAJHEoIEADQBBASEFDAELIAFBgAI2AhQgAUGAAjsBECABQSA2AgwgAUEALwHosZiBADsBEkEALwGCspiBACAIIAFBDGoQuICAgABBAC8BgrKYgQBBAC8B+LGYgQAgAUEMahCzgICAAEEAQQA7AfixmIEAELCAgIAAQQAvAfixmIEAIQhBASEECyABQYACNgIgIAFBgAI7ARwgAUEgNgIYIAFBAC8B6LGYgQA7AR5BAC8BgrKYgQAgCCABQRhqELiAgIAAAkAgBEUNAEEALwGCspiBAEEALwH4sZiBAEEBaiABQRhqELiAgIAACyABIAU6AC0gAUEALwHssZiBADsBLiABQQAtAJLEoIEAOgAsIAFBACgB5rGYgQA2AiggASAHQf///wBxNgIkQQAvAYKymIEAQQAvAfixmIEAIAFBJGoQs4CAgAACQCAERQ0AIAFBADoAOSABQQA2AjAgAUEALwHssZiBADsBOiABQQAtAJLEoIEAOgA4IAFBACgB5rGYgQA2AjRBAC8BgrKYgQBBAC8B+LGYgQBBAWogAUEwahCzgICAAAsCQEEALwH4sZiBACAFaiIEQf//A3FBAC8B3K6YgQAiBU8NAEEAIAQ7AfixmIEADAgLQQAgBUF/ajsB+LGYgQBBAC0AkcSggQBFDQdBAEEBOgCVxKCBAAwHC0EAIQVBACAEOgCfivCAACAEQXhqDgYAAQICAgMGC0EALwH4sZiBACIERQ0FIARBf2ohBQwCC0EALwHcrpiBACIJQQAvAfixmIEAIgRBAWpB//8DcSIFIAkgBUsbIQcCQANAIARBAWoiBSAJTw0BIARBl8SggQBqIQggBSEEIAgtAABBAUcNAAsgBSEHCyAHIAlBf2ogBSAJSRshBQwBCxCwgICAAEEAIQVBAC0Ah7KYgQBFDQMLQQAgBTsB+LGYgQBBAEEAOgCVxKCBAAwCC0EAQQY6AJ6K8IAADAELQQAgBDoAtYrwgAALIABBAWohAAwACwuZBAEDf0EALQCgivCAACIBQQEgAUEBSxtBAXQhAkEAIQEDQAJAAkACQAJAAkACQCACIAFGDQACQAJAAkACQAJAAkACQAJAAkACQCABQfyJ8IAAai8BACIDQZh4ag4HAQ8CDwMPBAALAkACQAJAAkACQAJAIANBf2oOBwEUFBQUAgMACwJAIANB6XdqDgMKDQsACyADQRRGDQMgA0EZRg0EIANBL0YNCSADQdQPRg0LIANB6g9GDQ0MEwtBACAAQQFxOgCLspiBAAwSC0EAIABBAXE6AJDEoIEADBELQQAgAEEBcToAkcSggQAMEAtBACAAQQFxOgCHspiBAAwPC0EAIABBAXE6AIiymIEADA4LQegHIQMgAEEBcQ0MQQAhA0EALwH2sZiBAEHoB0cNDQwMC0HqByEDIABBAXENCkEAIQNBAC8B9rGYgQBB6gdHDQwMCgtBACAAQQFxOgCJspiBAAwLC0EAIABBAXE6AIqymIEADAoLIABBABC6gICAAAwJCyAAQQEQuoCAgAAMCAtBACAAQQFxOgCOtJiBAAwHCyAAQQFxDQMQtYCAgAAMBgsgAEEBcSIDRQ0BQQAtAIaymIEADQFBAEEAKALUrpiBAEEBajYC1K6YgQAMAQsPC0EAIAM6AIaymIEADAMLELSAgIAADAILQQAgAzsB9rGYgQAMAQtBACADOwH2sZiBAAsgAUECaiEBDAALC+YBAQJ/I4CAgIAAQRBrIgIkgICAgABBACEDIAJBADoACyACIAE6AAkgAiAAOgAIIAJCADcDACACQQAtAKCK8IAAIgE6AAogAUEEIAFBBEkbQQF0IQECQANAIAEgA0YNASACIANqIANB/InwgABqLwEAOwEAIANBAmohAwwACwtBAC0AlMSggQAiA0EMbCIBIAIpAwA3AeaumIEAIAFB7q6YgQBqIAJBCGooAgA2AQBBACADQQFqQR9xOgCUxKCBAEEAQQAoAsyumIEAQQFqIgNBfyADGzYCzK6YgQAgAkEQaiSAgICAAAt4AQJ/AkAgAEH//wNxIgJBAC8B9ofwgABPDQAgAkGAGGxB9IfAgABqIQBBACEDAkADQCADQQAvAfSH8IAATw0BIAAgASkCADcCACAAQQhqIAFBCGooAgA2AgAgAEEMaiEAIANBAWohAwwACwsgAkEBOgD4h/CAAAsLsAIBA38CQCAAQf//A3EiBEEALwH2h/CAAE8NACABQf//A3EiBUEALwH0h/CAACIAIAUgAEkbIQECQCAFIAJB//8DcSIGIAAgBiAASRsiBk8NACABIARBgBhsQfSHwIAAaiIFIAFBDGxqLQAJRSABQf//A3FBAEdxayEBIAJB//8DcSAATw0AAkAgBSAGQQxsai0ACQ0AIAZBAWohBgwBCyAGIAUgBkF/akH//wNxQQxsai0ACUECRmohBgtBACAGQf//A3EiACABQf//A3EiAmsiASABIABLGyEBIARBgBhsIAJBDGxqQfSHwIAAaiEAAkADQCABRQ0BIAAgAykCADcCACAAQQhqIANBCGooAgA2AgAgAEEMaiEAIAFBf2ohAQwACwsgBEEBOgD4h/CAAAsL4QEBBH8CQCACQf//A3FFDQAgAUH//wNxIABB//8DcU0NACABIABrIgQgAkH//wNxIgIgBEH//wNxIgQgAiAESRsiBWtB//8DcSEGQQAhAgNAAkAgBiACRw0AIAUgAGpB//8DcSECA0AgAEH//wNxIAJPDQMgACADEKmAgIAAIABBAWohAAwACwsgASACQX9zaiIHQf//A3EhBAJAQYAYRQ0AIARBgBhsQfSHwIAAaiAHIAVrQf//A3FBgBhsQfSHwIAAakGAGPwKAAALIARBAToA+IfwgAAgAkEBaiECDAALCwvYAQEDfwJAIAJB//8DcUUNACABQf//A3EgAEH//wNxTQ0AIAJB//8DcSICIAEgAGtB//8DcSIEIAIgBEkbIgRBgBhsQfSHwIAAaiEFIAFB//8DcSEGIABB//8DcSIAQYAYbCECA0ACQCAEIABqIAZJDQADQCAAQf//A3EgAUH//wNxTw0DIAAgAxCpgICAACAAQQFqIQAMAAsLAkBBgBhFDQAgAkH0h8CAAGogBSACakGAGPwKAAALIABB+IfwgABqQQE6AAAgAkGAGGohAiAAQQFqIQAMAAsLCysAAkAgAEH//wNxQQAvAdqumIEATw0AIABBAC8B3K6YgQAgARC5gICAAAsLtQECA38BfiACQf//A3EhAyAAIAAoAqTfuwFBhBhsaiIEIQUCQANAIANFDQEgASkCACEGIAVBCGogAUEIaigCADYCACAFIAY3AgAgAUEMaiEBIAVBDGohBSADQX9qIQMMAAsLIAQgAjsBgBggACAAKAKk37sBQQFqQegHcDYCpN+7AQJAIAAoAqDfuwEiAUHoB0kNACAAIAAoAqjfuwFBAWo2AqjfuwEPCyAAIAFBAWo2AqDfuwEL3QIBA39BACECAkAgAEEBakH/AXEiA0EALQCgivCAACIETw0AAkACQAJAIANBAXQvAfyJ8IAAQX5qDgQBAwMAAwsgAEECakH/AXEiACAETw0CIABBAXQvAfyJ8IAAIQBBAiECDAELIABBBGpB/wFxIgMgBE8NASADQQF0LwH8ifCAACECAkAgAEECakH/AXFBAXQvAfyJ8IAAIgMgAEEDakH/AXFBAXQvAfyJ8IAAIgBHDQAgACACQf//A3FHDQBBBCECAkAgA0H/AXEiAEEITw0AQRAhAAwCCwJAIABB+AFNDQBB5wEhAAwCCyADQXhqQf8BcUEKbkHoAWoiAEH/ASAAQf8BSRshAAwBCyADQQVsQf8AakH//wNxQf8BbkEkbCAAQQVsQf8AakH//wNxQf8BbkEGbGogAkEFbEH/AGpB//8DcUH/AW5qQRBqIQBBBCECCyABIAA7AQALIAIL7QEBBH8jgICAgABBEGsiACSAgICAAAJAAkACQEEALwGCspiBAEEBaiIBQf//A3FBAC8B8LGYgQAiAkkNAEEALwHusZiBACEBQQAtAI2ymIEADQEgAUH//wNxDQFBACEBQQAoAsCO8IAAIgNFDQEgA0H0h8CAAEEALwHcrpiBABCugICAAEEALwHwsZiBACECQQAvAe6xmIEAIQEMAQtBACABOwGCspiBAAwBCyAAQYACNgIMIABBgAI7AQggAEEgNgIEIABBAC8B6LGYgQA7AQogASACQQEgAEEEahCsgICAAAsgAEEQaiSAgICAAAtYAAJAIAMgAkkNACAAQgA3AgAPCyAEQf8BcSEEAkADQCACIANGDQECQCABIANqLQAAIARHDQAgAEEBOgAEIAAgAzYCAA8LIANBAWohAwwACwsgAEIANwIAC/UCAQV/I4CAgIAAQRBrIgQkgICAgAACQAJAIAEgA0cNAEEBIQUgAUUNASAAQQEgARsiBiACQQEgAxsiB0YNAQJAIAFBEEsNAAJAIAFBBE8NACAALQAAIActAABGIAAgAUF/aiIDai0AACAHIANqLQAARnEgACABQQF2IgNqLQAAIAcgA2otAABGcSEFDAMLQQAhAyAEQQA2AgAgBCABQXxqIgU2AgQgBCABQQF2QQxxIgA2AgggBCAFIABrNgIMQQAhBQJAA0AgA0EQRg0BIAcgBCADaigCACIAaigAACAGIABqKAAAcyAFciEFIANBBGohAwwACwsgBUUhBQwCCyABQX9qQQJ2QQFqIQAgBiEDIAchBQJAA0AgAEF/aiIARQ0BIAUoAAAhAiADKAAAIQggA0EEaiEDIAVBBGohBSAIIAJHDQIMAAsLIAYgAUF8aiIDaigAACAHIANqKAAARiEFDAELQQAhBQsgBEEQaiSAgICAACAFC3UAAkAgAEH//wNxQQAvAfaH8IAATw0AIAFB//8DcUEALwH0h/CAAEH//wNxTw0AIABB//8DcSIAQYAYbCABQf//A3FBDGxqIgEgAikCADcC9IfAgAAgAUH8h8CAAGogAkEIaigCADYCACAAQQE6APiH8IAACwtKAEEAQQAvAYKymIEAOwHerpiBAEEAQQAvAfixmIEAOwHgrpiBAEEAQQAoAeaxmIEANgHirpiBAEEAQQAtAJLEoIEAOgCTxKCBAAtVAEEAQQAvAd6umIEAOwGCspiBAEEAQQAvAeCumIEAOwH4sZiBAEEAQQAoAeKumIEANgHmsZiBAEEAQQAtAJPEoIEAOgCSxKCBAEEAQQA6AJXEoIEAC8wDAQF/I4CAgIAAQYACayICJICAgIAAIAAgARC7gICAAAJAQcgERQ0AQfiJ8IAAQQBByAT8CwALQQAgATsB2q6YgQBBACAAOwHcrpiBAEEAQQE6AIiymIEAQQBCgICAgICggIABNwHerpiBAEEAQYCCgAg2AeaxmIEAQQBBAToAkcSggQBBACABOwHwsZiBAEEAQQA7AYKymIEAQQBBADoAlcSggQBBAEEAOwGSxKCBAEEAQQA2AuyxmIEAQQBBADoAkMSggQBBAEEAOgCLspiBAEEAQQA6AI60mIEAQQBBADoAirKYgQBBAEEANgH2sZiBAEEAQQA6AImymIEAQQBBADoAhrKYgQBBAEEAOgCHspiBAEEAQoCAgIiAIDcB+rGYgQBBAEEAOwGEspiBAEEAQQA6AIyymIEAQQBBADoAjbKYgQBBAEEAOwHYrpiBAEEAQQA6AI+0mIEAQQBBADYB8rGYgQBBAEEAOwHqsZiBAAJAQYACRQ0AIAJBAEGAAvwLAAtBCCEBAkADQCABQf8BSw0BIAIgAWpBAToAACABQQhqIQEMAAsLAkBBgAJFDQBBlsSggQAgAkGAAvwKAAALIAJBgAJqJICAgIAAC50BAQN/I4CAgIAAQRBrIgMkgICAgABBACEEA38CQCACQf//A3EiBQ0AIAFB/wFxIQIgA0ELakF/aiEFAkADQCAERQ0BIAAgAmogBSAEai0AADoAACACQQFqIQIgBEF/aiEEDAALCyADQRBqJICAgIAAIAIPCyADQQtqIARqIAIgBUEKbiIFQQpsa0EwcjoAACAEQQFqIQQgBSECDAALC5ICAQN/AkAgAEH//wNxQQAvAdqumIEATw0AIAFB//8DcUEALwHcrpiBAEH//wNxTw0AAkACQAJAAkAgAEH//wNxIgNBgBhsQfSHwIAAaiIEIAFB//8DcSIFQQxsaiIALQAJDgMABAEECyAFRQ0BIAQgAUF/akH//wNxQQxsaiIBLQAJQQJHDQEgASACKQIANwIAIAFBCGogAkEIaigCADYCAAwBCyAAIAIpAgA3AgAgAEEIaiACQQhqKAIANgIAIAFBAWoiAUH//wNxQQAvAdyumIEATw0BIAQgAUH//wNxQQxsaiIALQAJDQELIAAgAikCADcCACAAQQhqIAJBCGooAgA2AgALIANBAToA+IfwgAALC50CAQd/IABB//8DcSIDQYAYbEH0h8CAAGohBEEAIQBBACEFA0ACQAJAIABB//8DcSIGIAFB//8DcSIHTw0AAkACQAJAIAQgBkEMbGoiCC0ACQ4DAAQBAgsCQCAGRQ0AIAQgAEF/akH//wNxQQxsai0ACUECRg0ECyAIIAIpAgA3AgAgCEEIaiACQQhqKAIANgIAQQEhBQwDCwJAAkAgAEEBaiIJQf//A3EiBiAHTw0AIAQgBkEMbGotAAlFDQELIAggAikCADcCACAIQQhqIAJBCGooAgA2AgBBASEFIAkhAAwECyAAQQJqIQAMAwtBASEFIAhBAToACQwBCwJAIAVBAXFFDQAgA0EBOgD4h/CAAAsPCyAAQQFqIQAMAAsL0wMBAX8CQCAAQQFxQQAtAI2ymIEARg0AQQAoAtCumIEAIgJFDQACQAJAAkACQAJAAkAgAEEBcUUNAEEAQQAvAeyxmIEAOwHYrpiBAEEAQQA7AeyxmIEAIAFBAXENAQwECwJAQYSCMEUNAEH0h8CAACACQYSCMPwKAAALQQAhAEEAQQAvAdiumIEAOwHssZiBAEEAQQA6AI2ymIEAIAFBAXENAQwCC0EAQQAvAYKymIEAOwGEspiBAEEAQQAvAfixmIEAOwGAspiBAEEAQQAtAJLEoIEAOgCMspiBAEEAQQAoAeaxmIEAQRB3NgL8sZiBAAwCC0EAQQAvAYSymIEAOwGCspiBAEEAQQAvAYCymIEAOwH4sZiBAEEAQQAtAIyymIEAOgCSxKCBAEEAQQAoAvyxmIEAQRB3NgHmsZiBAEEAQQA6AJXEoIEAC0EALwHarpiBACEBA0AgASAARg0CIABB+IfwgABqQQE6AAAgAEEBaiEADAALCwJAQYSCMEUNACACQfSHwIAAQYSCMPwKAAALQQAvAdyumIEAQQAvAdqumIEAELuAgIAAQQBBAToAjbKYgQALQQBBAC8B2q6YgQA7AfCxmIEAQQBBADsB7rGYgQALC08AQQAgATsB9ofwgABBACAAOwH0h/CAAEEAIQACQANAIABB//8DcSABQf//A3FPDQEgABC8gICAACAAQQFqIQBBAC8B9ofwgAAhAQwACwsLEAAgAEGEgMCAABCpgICAAAsIAEHEvdyCAAvTCgENfyOAgICAAEEQayICJICAgIAAQYACIAFB//8DcSIDQQEgA0EBSxsiA0GAAiADQYACSRsgAUGAAksbIQRBAC8B2q6YgQAhBQJAAkBBgAIgAEH//wNxIgFBASABQQFLGyIBQYACIAFBgAJJGyAAQYACSxsiBkEALwHcrpiBACIDRw0AIAQgBUH//wNxRg0BCwJAIAYgA0kiB0UNACAEIAVB//8DcSIBIAQgAUkbIQggBkEMbEH0h8CAAGohCUEAIQoDQCAKIAhGDQEgCSEBIAYhAAJAA0AgAyAAQf//A3FGDQEgAUEIakEAKAKMgMCAADYCACABQQApAoSAwIAANwIAIAFBDGohASAAQQFqIQAMAAsLIAlBgBhqIQkgCkEBaiEKDAALCwJAIAQgBUH//wNxIghPDQBBAC8BgrKYgQAiASAESSIADQBBACABIARrQQFqIgEgABshCwJAQQAtAI2ymIEADQBBACgCwI7wgABFDQAgBiADIAcbIQogAUH//wNxIQlB9IfAgAAhAEEAIQEDQCAJIAFGDQEgASAKQYSAwIAAELmAgIAAQQAoAsCO8IAAIAAgChCugICAACAAQYAYaiEAIAFBAWohAQwACwtBACAFIAtBhIDAgAAQrICAgABBAEEAQQAvAYKymIEAIgEgC0H//wNxayIAIAAgAUsbOwGCspiBAAtBACEBQQAgBDsB2q6YgQBBACAGOwHcrpiBAEEAIAQ7AfaH8IAAQQAgBjsB9IfwgAACQCAEIAhNDQACQEEALQCNspiBAA0AQQAhAUEAKALAjvCAACIARQ0AIAAoAqDfuwEiACAEIAVrQf//A3EiCiAAIApJGyIMRQ0AQQAgBSAMaiAMQYSAwIAAEKuAgIAAIAxBf2ohC0EAIQcCQANAIAcgDEYNAUEAKALAjvCAACIKKAKg37sBIgFFDQEgC0H//wNxQYAYbEH0h8CAAGohACAKIAFBf2o2AqDfuwEgCiAKKAKk37sBQecHakHoB3AiCTYCpN+7ASAHQX9zIAxqIg1B//8DcSEOQQAhASAKIAlBhBhsaiIIIQkDQAJAAkAgBiABRg0AQYSAwIAAIQogASAILwGAGE8NASACQQhqIAlBCGooAgA2AgAgAiAJKQIANwMAIAIhCgwBCyANIAZBhIDAgAAQuYCAgAAgDkEBOgD4h/CAACALQX9qIQsgB0EBaiEHDAILIAAgCikCADcCACAAQQhqIApBCGooAgA2AgAgAEEMaiEAIAlBDGohCSABQQFqIQEMAAsLC0EAQQAvAYKymIEAIAxqOwGCspiBACAMIQELIAEgBWohAQNAIAFB//8DcSAETw0BIAEQvICAgAAgAUEBaiEBDAALCwJAIAYgA00NACAEIAVB//8DcSIBIAQgAUkbIQkgBiADayEIIANBDGxB9IfAgABqIQpBACEDA0AgAyAJRg0BIAghACAKIQECQANAIABFDQEgAUEIakEAKAKMgMCAADYCACABQQApAoSAwIAANwIAIABBf2ohACABQQxqIQEMAAsLIANBAToA+IfwgAAgCkGAGGohCiADQQFqIQMMAAsLQQAhAUEAIAQ7AfCxmIEAQQBBADsB7rGYgQACQANAIAFB//8DcSAETw0BIAFBhIDAgAAQrYCAgAAgAUEBaiEBDAALCwJAQQAvAfixmIEAIAZJDQBBACAGQX9qOwH4sZiBAAsCQEEALwGCspiBACAESQ0AQQAgBEF/ajsBgrKYgQALQQAhAQNAIAQgAUYNASABQfiH8IAAakEBOgAAIAFBAWohAQwACwsgAkEQaiSAgICAAAt0AEGAAiAAQQEgABsgAEGAAksbQYACIAFBASABGyABQYACSxsQtoCAgABBAEHE/dyCADYC0K6YgQBBAEGY3qCBADYCwI7wgABBAEIANwK4vdyCAEEAQQA2AsSO8IAAQQBBADsByK6YgQBBAEEANgLAvdyCAAsL/gcBAEGAgMAAC/QHaWQ9ACAAAAAAAQABAAEAAEUAAAAAAQABAAEAAAARAABfEQAAGiMAABsjAAApIwAAKiMAAOkjAADsIwAA8CMAAPAjAADzIwAA8yMAAP0lAAD+JQAAFCYAABUmAAAwJgAANyYAAEgmAABTJgAAfyYAAH8mAACKJgAAjyYAAJMmAACTJgAAoSYAAKEmAACqJgAAqyYAAL0mAAC+JgAAxCYAAMUmAADOJgAAziYAANQmAADUJgAA6iYAAOomAADyJgAA8yYAAPUmAAD1JgAA+iYAAPomAAD9JgAA/SYAAAUnAAAFJwAACicAAAsnAAAoJwAAKCcAAEwnAABMJwAATicAAE4nAABTJwAAVScAAFcnAABXJwAAlScAAJcnAACwJwAAsCcAAL8nAAC/JwAAGysAABwrAABQKwAAUCsAAFUrAABVKwAAgC4AAJkuAACbLgAA8y4AAAAvAADVLwAA8C8AAD4wAABBMAAAljAAAJkwAAD/MAAABTEAAC8xAAAxMQAAjjEAAJAxAADlMQAA7zEAAB4yAAAgMgAARzIAAFAyAACMpAAAkKQAAMakAABgqQAAfKkAAACsAACj1wAAAPkAAP/6AAAQ/gAAGf4AADD+AABS/gAAVP4AAGb+AABo/gAAa/4AAAH/AABg/wAA4P8AAOb/AADgbwEA5G8BAPBvAQD2bwEAAHABANWMAQD/jAEAHo0BAICNAQDyjQEA8K8BAPOvAQD1rwEA+68BAP2vAQD+rwEAALABACKxAQAysQEAMrEBAFCxAQBSsQEAVbEBAFWxAQBksQEAZ7EBAHCxAQD7sgEAANMBAFbTAQBg0wEAdtMBAATwAQAE8AEAz/ABAM/wAQCO8QEAjvEBAJHxAQCa8QEAAPIBAALyAQAQ8gEAO/IBAEDyAQBI8gEAUPIBAFHyAQBg8gEAZfIBAADzAQAg8wEALfMBADXzAQA38wEAfPMBAH7zAQCT8wEAoPMBAMrzAQDP8wEA0/MBAODzAQDw8wEA9PMBAPTzAQD48wEAPvQBAED0AQBA9AEAQvQBAPz0AQD/9AEAPfUBAEv1AQBO9QEAUPUBAGf1AQB69QEAevUBAJX1AQCW9QEApPUBAKT1AQD79QEAT/YBAID2AQDF9gEAzPYBAMz2AQDQ9gEA0vYBANX2AQDY9gEA3PYBAN/2AQDr9gEA7PYBAPT2AQD89gEA4PcBAOv3AQDw9wEA8PcBAAz5AQA6+QEAPPkBAEX5AQBH+QEA//kBAHD6AQB8+gEAgPoBAIr6AQCO+gEAxvoBAMj6AQDI+gEAzfoBANz6AQDf+gEA6voBAO/6AQD4+gEAAAACAP3/AgAAAAMA/f8DAA==";function a6(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n.buffer}class ly{get dv(){return this._dvBuffer!==this.memory.buffer&&(this._dvBuffer=this.memory.buffer,this._dv=new DataView(this.memory.buffer)),this._dv}constructor(t){this.gridPtr=0,this.dirtyPtr=0,this.writeBufferPtr=0,this.cellSize=12,this.maxCols=256,this.encoder=new TextEncoder,this.decoder=new TextDecoder,this._dvBuffer=null,this.linkCache=new Map,this.exports=t.exports,this.memory=this.exports.memory}static async load(t){let n;if(t){const o=await fetch(t);if(!o.ok)throw new Error(`[wterm] Failed to load WASM from ${t}: ${o.status} ${o.statusText}`);n=await o.arrayBuffer()}else n=a6(o6);const{instance:i}=await WebAssembly.instantiate(n);return new ly(i)}init(t,n){this.exports.init(t,n),this.linkCache.clear(),this._updatePointers()}_updatePointers(){this.gridPtr=this.exports.getGridPtr(),this.dirtyPtr=this.exports.getDirtyPtr(),this.writeBufferPtr=this.exports.getWriteBuffer(),this.cellSize=this.exports.getCellSize(),this.maxCols=this.exports.getMaxCols()}writeString(t,n){const i=this.encoder.encode(t);this.writeRaw(i,n)}writeRaw(t,n){let i=0;for(;i<t.length;){const o=Math.min(t.length-i,8192);new Uint8Array(this.memory.buffer,this.writeBufferPtr,8192).set(t.subarray(i,i+o)),this.exports.writeBytes(o),i+=o,n?.()}}getCell(t,n){const i=this.gridPtr+(t*this.maxCols+n)*this.cellSize,o=this.dv,a={char:o.getUint32(i,!0),fg:o.getUint16(i+4,!0),bg:o.getUint16(i+6,!0),flags:o.getUint8(i+8),width:o.getUint8(i+9)};return Object.assign(a,this._readLink(o.getUint16(i+10,!0))),a}isDirtyRow(t){return new Uint8Array(this.memory.buffer,this.dirtyPtr,256)[t]!==0}clearDirty(){this.exports.clearDirty()}getCursor(){return{row:this.exports.getCursorRow(),col:this.exports.getCursorCol(),visible:this.exports.getCursorVisible()!==0}}getCols(){return this.exports.getCols()}getRows(){return this.exports.getRows()}cursorKeysApp(){return this.exports.getCursorKeysApp()!==0}bracketedPaste(){return this.exports.getBracketedPaste()!==0}usingAltScreen(){return this.exports.getUsingAltScreen()!==0}mouseTracking(){const t=this.exports.getMouseTracking();return t===1e3||t===1002?t:0}mouseSgr(){return this.exports.getMouseSgr()!==0}focusEvents(){return this.exports.getFocusEvents()!==0}synchronizedOutput(){return this.exports.getSynchronizedOutput()!==0}synchronizedOutputGeneration(){return this.exports.getSynchronizedOutputGeneration()}getTitle(){if(this.exports.getTitleChanged()===0)return null;const t=this.exports.getTitlePtr(),n=this.exports.getTitleLen(),i=new Uint8Array(this.memory.buffer,t,n);return this.decoder.decode(i)}getResponse(){const t=this.exports.getResponseLen();if(t===0)return null;const n=this.exports.getResponsePtr(),i=new Uint8Array(this.memory.buffer,n,t),o=this.decoder.decode(i);return this.exports.clearResponse(),o}getResourceState(){const t=this.exports.getHyperlinkCapacity?.(),n=this.exports.getHyperlinkCount?.(),i=this.exports.getHyperlinkRejectedCount?.();return t===void 0||n===void 0||i===void 0?{}:{hyperlinks:{capacity:t,used:n,rejected:i,saturated:n>=t}}}getScrollbackCount(){return this.exports.getScrollbackCount()}getScrollbackDiscardedCount(){return this.exports.getScrollbackDiscardedCount()}getScrollbackCell(t,n){const o=this.exports.getScrollbackLine(t)+n*this.cellSize,a=this.dv,c={char:a.getUint32(o,!0),fg:a.getUint16(o+4,!0),bg:a.getUint16(o+6,!0),flags:a.getUint8(o+8),width:a.getUint8(o+9)};return Object.assign(c,this._readLink(a.getUint16(o+10,!0))),c}getScrollbackLineLen(t){return this.exports.getScrollbackLineLen(t)}getUnhandledSequences(){const t=this.exports.getDebugLogCount();if(t===0)return[];const n=this.exports.getDebugLogPtr(),i=this.exports.getDebugLogEntrySize(),o=this.exports.getDebugLogMax(),a=Math.min(t,o),c=new DataView(this.memory.buffer),u=[],h=t>=o?t%o:0;for(let f=0;f<a;f++){const g=(h+f)%o,m=n+g*i,y=c.getUint8(m);if(y===0)continue;const b=c.getUint8(m+1),w=c.getUint8(m+2),C=[];for(let E=0;E<Math.min(w,4);E++)C.push(c.getUint16(m+4+E*2,!0));u.push({final:String.fromCharCode(y),private:b?String.fromCharCode(b):"",paramCount:w,params:C})}return u}resize(t,n){this.exports.resizeTerminal(t,n),this._updatePointers()}_readLink(t){if(t===0)return;const n=this.linkCache.get(t);if(n)return n;const i=this.exports.getLinkUriLen(t);if(i===0)return;const o=this.decoder.decode(new Uint8Array(this.memory.buffer,this.exports.getLinkUriPtr(t),i)),a=this.exports.getLinkIdLen(t),c=a===0?void 0:this.decoder.decode(new Uint8Array(this.memory.buffer,this.exports.getLinkIdPtr(t),a)),u={linkUri:o,linkId:c,linkKey:c?`e\0${c}\0${o}`:`b\0${t}`};return this.linkCache.set(t,u),u}}const ro=256,l6=1,yB=2,c6=4,u6=8,jd=32,d6=64,f6=128,h6=10;function vB(e){const t=e>>16&255,n=e>>8&255,i=e&255;return`rgb(${t},${n},${i})`}function bB(e){if(e===ro)return null;if(e<16)return`var(--term-color-${e})`;if(e<232){const n=e-16,i=Math.floor(n/36)*51,o=Math.floor(n/6)%6*51,a=n%6*51;return`rgb(${i},${o},${a})`}const t=(e-232)*10+8;return`rgb(${t},${t},${t})`}function xB(e,t){return t!==void 0?vB(t):bB(e)}function Dd(e,t){return t!==void 0?vB(t):bB(e)}function sC(e,t,n,i,o){let a=e,c=t,u=i,h=o;if(n&jd){const b=a;a=c,c=b;const w=u;u=h,h=w,u===void 0&&a===ro&&(a=0),h===void 0&&c===ro&&(c=7)}const f=xB(a,u),g=Dd(c,h);let m="";f&&(m+=`color:${f};`),g&&(m+=`background:${g};`),n&l6&&(m+="font-weight:bold;"),n&yB&&(m+="opacity:0.5;"),n&c6&&(m+="font-style:italic;");const y=[];return n&u6&&y.push("underline"),n&f6&&y.push("line-through"),y.length&&(m+=`text-decoration:${y.join(" ")};`),n&d6&&(m+="visibility:hidden;"),m}function li(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function p6(e){if(e)try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function m6(e){return e.linkUri?e.linkKey??`fallback\0${e.linkId??""}\0${e.linkUri}`:""}function g6(e,t,n,i,o){let a=e,c=t,u=i,h=o;return n&jd&&([a,c]=[c,a],[u,h]=[h,u],u===void 0&&a===ro&&(a=0),h===void 0&&c===ro&&(c=7)),{fg:xB(a,u)||"var(--term-fg)",bg:Dd(c,h)||"var(--term-bg)"}}const nd="round(calc(var(--term-row-height) * 0.125), 1px)",oC="round(calc(var(--term-row-height) * 0.25), 1px)",aC="round(calc(var(--term-row-height) * 0.375), 1px)",rd="round(calc(var(--term-row-height) * 0.5), 1px)",lC="round(calc(var(--term-row-height) * 0.625), 1px)",cC="round(calc(var(--term-row-height) * 0.75), 1px)",uC="round(calc(var(--term-row-height) * 0.875), 1px)";function A6(e,t,n){switch(e){case 9600:return`linear-gradient(${t} ${rd},${n} ${rd})`;case 9601:return`linear-gradient(${n} ${uC},${t} ${uC})`;case 9602:return`linear-gradient(${n} ${cC},${t} ${cC})`;case 9603:return`linear-gradient(${n} ${lC},${t} ${lC})`;case 9604:return`linear-gradient(${n} ${rd},${t} ${rd})`;case 9605:return`linear-gradient(${n} ${aC},${t} ${aC})`;case 9606:return`linear-gradient(${n} ${oC},${t} ${oC})`;case 9607:return`linear-gradient(${n} ${nd},${t} ${nd})`;case 9608:return t;case 9609:return`linear-gradient(to right,${t} 87.5%,${n} 87.5%)`;case 9610:return`linear-gradient(to right,${t} 75%,${n} 75%)`;case 9611:return`linear-gradient(to right,${t} 62.5%,${n} 62.5%)`;case 9612:return`linear-gradient(to right,${t} 50%,${n} 50%)`;case 9613:return`linear-gradient(to right,${t} 37.5%,${n} 37.5%)`;case 9614:return`linear-gradient(to right,${t} 25%,${n} 25%)`;case 9615:return`linear-gradient(to right,${t} 12.5%,${n} 12.5%)`;case 9616:return`linear-gradient(to right,${n} 50%,${t} 50%)`;case 9617:return`color-mix(in srgb,${t} 25%,${n})`;case 9618:return`color-mix(in srgb,${t} 50%,${n})`;case 9619:return`color-mix(in srgb,${t} 75%,${n})`;case 9620:return`linear-gradient(${t} ${nd},${n} ${nd})`;case 9621:return`linear-gradient(to right,${n} 87.5%,${t} 87.5%)`;default:{const o={9622:[!1,!1,!0,!1],9623:[!1,!1,!1,!0],9624:[!0,!1,!1,!1],9625:[!0,!1,!0,!0],9626:[!0,!1,!1,!0],9627:[!0,!0,!0,!1],9628:[!0,!0,!1,!0],9629:[!1,!0,!1,!1],9630:[!1,!0,!0,!1],9631:[!1,!0,!0,!0]}[e];if(!o)return t;const[a,c,u,h]=o;if(a&&c&&u&&h)return t;const f=[],g=["0 0","100% 0","0 100%","100% 100%"];return o.forEach((m,y)=>{m&&f.push(`linear-gradient(${t},${t}) ${g[y]}/50% 50% no-repeat`)}),f.push(n),f.join(",")}}}class y6{constructor(t){this.rows=0,this.cols=0,this.rowEls=[],this.prevCursorRow=-1,this.prevCursorCol=-1,this.prevContainerBg="",this.prevRowBg=[],this._scrollbackRowEls=[],this._scrollbackStartKey=0,this._renderedScrollbackCount=-1,this._renderedDiscardedCount=-1,this._scrollbackTopSpacer=null,this._scrollbackBottomSpacer=null,this.container=t}setup(t,n){this.cols=t,this.rows=n,this.container.innerHTML="",this.rowEls=[],this.prevRowBg=[],this._scrollbackRowEls=[],this._scrollbackStartKey=0,this._renderedScrollbackCount=-1,this._renderedDiscardedCount=-1;const i=document.createDocumentFragment();this._scrollbackTopSpacer=document.createElement("div"),this._scrollbackTopSpacer.className="term-scrollback-spacer",i.appendChild(this._scrollbackTopSpacer),this._scrollbackBottomSpacer=document.createElement("div"),this._scrollbackBottomSpacer.className="term-scrollback-spacer",i.appendChild(this._scrollbackBottomSpacer);for(let o=0;o<n;o++){const a=document.createElement("div");a.className="term-row",i.appendChild(a),this.rowEls.push(a)}this.container.appendChild(i),this.prevCursorRow=-1,this.prevCursorCol=-1}_buildRowContent(t,n,i,o,a){let c="",u="",h="",f=[],g=0,m="",y,b="";const w=(k,I,T)=>{const Q=p6(T),j=Q?I:"";j!==b&&(b&&(c+="</a>"),j&&(c+=`<a class="term-link" href="${li(Q)}" target="_blank" rel="noopener noreferrer">`),b=j),c+=k},C=k=>{if(!h)return;const I=li(h);let T="";if(o>=g&&o<k){const Q=o-g,j=f.slice(0,Q).join(""),_=f[Q]||" ",F=f.slice(Q+1).join("");j&&(T+=u?`<span style="${u}">${li(j)}</span>`:`<span>${li(j)}</span>`),T+=u?`<span class="term-cursor" style="${u}">${li(_)}</span>`:`<span class="term-cursor">${li(_)}</span>`,F&&(T+=u?`<span style="${u}">${li(F)}</span>`:`<span>${li(F)}</span>`)}else T+=u?`<span style="${u}">${I}</span>`:`<span>${I}</span>`;w(T,m,y),h="",f=[]},E=(k,I,T,Q,j)=>{const _=k?` class="${k}"`:"",F=I?` style="${I}"`:"";w(`<span${_}${F}>${li(T)}</span>`,Q,j)};for(let k=0;k<this.cols;k++){const I=n(k),T=k<i,Q=T?I.char:0,j=T?I.width??1:1,_=T?m6(I):"",F=T?I.linkUri:void 0;if(T&&j===0){C(k),k>0&&(n(k-1).width??1)===2||E(k===o?"term-cursor":"",""," ",_,F),u="",m="",y=void 0,h="",f=[],g=k+1;continue}if(T&&j===2){if(C(k),k+1>=this.cols){E(k===o?"term-cursor":"",""," ",_,F),u="",m="",y=void 0,h="",f=[],g=k+1;continue}const O=I.chars??(Q>=32?String.fromCodePoint(Q):" "),H=sC(I.fg,I.bg,I.flags,I.fgRgb,I.bgRgb),U=o>=k&&o<k+2?"term-wide term-cursor":"term-wide";E(U,H,O,_,F),u="",m="",y=void 0,h="",f=[],g=k+2;continue}if(T&&Q>=9600&&Q<=9631){C(k);const O=g6(I.fg,I.bg,I.flags,I.fgRgb,I.bgRgb),H=k===o?"term-block term-cursor":"term-block",U=A6(Q,O.fg,O.bg),J=I.flags&yB?"opacity:0.5;":"";w(`<span class="${H}" style="background:${U};${J}"></span>`,_,F),u="",m="",y=void 0,h="",f=[],g=k+1}else{const O=I.chars??(T&&Q>=32?String.fromCodePoint(Q):" "),H=T?sC(I.fg,I.bg,I.flags,I.fgRgb,I.bgRgb):"";H!==u||_!==m?(C(k),u=H,m=_,y=F,h=O,f=[O],g=k):(h+=O,f.push(O))}}C(this.cols),b&&(c+="</a>"),t.innerHTML=c;let S="";if(i>=this.cols&&this.cols>0){const k=n(this.cols-1);let I=k.bg,T=k.bgRgb;k.flags&jd&&(I=k.fg,T=k.fgRgb,T===void 0&&I===ro&&(I=7)),S=Dd(I,T)||""}const R=S?`0 1px 0 ${S}`:"";a>=0?S!==(this.prevRowBg[a]??"")&&(t.style.background=S,t.style.boxShadow=R,this.prevRowBg[a]=S):(t.style.background=S,t.style.boxShadow=R)}_buildScrollbackRowEl(t,n){const i=document.createElement("div");i.className="term-row term-scrollback-row";const o=t.getScrollbackLineLen(n);return this._buildRowContent(i,a=>t.getScrollbackCell(n,a),o,-1,-1),i}syncScrollback(t,n){const i=t.getScrollbackCount(),o=n?.rowHeight??0,a=n!==void 0&&o>0,c=n?.overscanRows??h6,u=n?.scrollbackDiscardedCount!==void 0,h=n?.scrollbackDiscardedCount??0,f=n&&n.clientHeight>0?n.clientHeight:this.rows*o,g=a?Math.floor(n.scrollTop/o):0,m=a?Math.ceil(f/o):i;let y=a?Math.max(0,Math.min(i,g-c)):0,b=a?Math.max(y,Math.min(i,g+m+c)):i;const w=this.container.ownerDocument.getSelection();w!==null&&!w.isCollapsed&&(this.container.contains(w.anchorNode)||this.container.contains(w.focusNode))&&this._scrollbackRowEls.length>0&&(y=Math.min(y,Math.max(0,this._scrollbackStartKey-h)),b=Math.max(b,Math.min(i,this._scrollbackStartKey-h+this._scrollbackRowEls.length)));const E=h+y;if(u&&i===this._renderedScrollbackCount&&h===this._renderedDiscardedCount&&E===this._scrollbackStartKey&&b-y===this._scrollbackRowEls.length)return;const S=new Map;for(let T=0;T<this._scrollbackRowEls.length;T++)S.set(this._scrollbackStartKey+T,this._scrollbackRowEls[T]);const R=h+b;for(const[T,Q]of S)(T<E||T>=R)&&Q.remove();const k=[];let I=this._scrollbackTopSpacer?.nextSibling??null;for(let T=y;T<b;T++){const Q=h+T,j=i-1-T,_=this._buildScrollbackRowEl(t,j),F=S.get(Q);let O=_,H=!1;F&&F.innerHTML===_.innerHTML&&F.style.cssText===_.style.cssText?O=F:F&&(F.replaceWith(_),H=!0),!H&&O!==I&&this.container.insertBefore(O,I??this._scrollbackBottomSpacer),I=O.nextSibling,k.push(O)}this._scrollbackRowEls=k,this._scrollbackStartKey=E,this._renderedScrollbackCount=i,this._renderedDiscardedCount=h,this._scrollbackTopSpacer&&(this._scrollbackTopSpacer.style.height=`${y*o}px`),this._scrollbackBottomSpacer&&(this._scrollbackBottomSpacer.style.height=`${(i-b)*o}px`)}render(t,n){const i=t.getRows(),o=t.getCols();let a=!1;(i!==this.rows||o!==this.cols)&&(this.setup(o,i),a=!0),this.syncScrollback(t,n);const c=t.getCursor(),u=c.visible,h=c.row!==this.prevCursorRow||c.col!==this.prevCursorCol;for(let g=0;g<this.rows;g++){const m=a||t.isDirtyRow(g),y=g===this.prevCursorRow&&h,b=g===c.row;if(m||y||b&&h){const w=b&&u?c.col:-1;this._buildRowContent(this.rowEls[g],C=>t.getCell(g,C),this.cols,w,g)}}if(this.prevCursorRow=c.row,this.prevCursorCol=c.col,a||t.isDirtyRow(this.rows-1)){const g=t.getCell(this.rows-1,this.cols-1);let m=g.bg,y=g.bgRgb;g.flags&jd&&(m=g.fg,y=g.fgRgb,y===void 0&&m===ro&&(m=7));const b=Dd(m,y)||"";b!==this.prevContainerBg&&(this.container.style.background=b,this.prevContainerBg=b)}t.clearDirty()}}function vg(e,t){return t.platform.startsWith("Mac")?e.metaKey:e.ctrlKey}const v6={ArrowUp:"\x1B[A",ArrowDown:"\x1B[B",ArrowRight:"\x1B[C",ArrowLeft:"\x1B[D",Home:"\x1B[H",End:"\x1B[F"},b6={ArrowUp:"\x1BOA",ArrowDown:"\x1BOB",ArrowRight:"\x1BOC",ArrowLeft:"\x1BOD",Home:"\x1BOH",End:"\x1BOF"},x6={Enter:"\r",Backspace:"",Tab:" ",Escape:"\x1B",Insert:"\x1B[2~",Delete:"\x1B[3~",PageUp:"\x1B[5~",PageDown:"\x1B[6~",F1:"\x1BOP",F2:"\x1BOQ",F3:"\x1BOR",F4:"\x1BOS",F5:"\x1B[15~",F6:"\x1B[17~",F7:"\x1B[18~",F8:"\x1B[19~",F9:"\x1B[20~",F10:"\x1B[21~",F11:"\x1B[23~",F12:"\x1B[24~"};class w6{constructor(t,n,i,o=()=>null){this.composing=!1,this.mouseButtons=0,this.focused=!1,this.element=t,this.onData=n,this.getBridge=i,this.getCellSize=o,this.textarea=document.createElement("textarea"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("autocomplete","off"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.setAttribute("enterkeyhint","send"),this.textarea.setAttribute("tabindex","0"),this.textarea.setAttribute("aria-hidden","true");const a=this.textarea.style;a.position="absolute",a.left="-9999px",a.top="0",a.width="1px",a.height="1px",a.opacity="0",a.overflow="hidden",a.border="0",a.padding="0",a.margin="0",a.outline="none",a.resize="none",a.pointerEvents="none",a.caretColor="transparent",a.color="transparent",a.background="transparent",t.appendChild(this.textarea),this._onKeyDown=this.handleKeyDown.bind(this),this._onPaste=this.handlePaste.bind(this),this._onCompositionStart=this.handleCompositionStart.bind(this),this._onCompositionEnd=this.handleCompositionEnd.bind(this),this._onInput=this.handleInput.bind(this),this._onFocus=()=>{this.focused||(this.focused=!0,this.element.classList.add("focused"),this.getBridge()?.focusEvents?.()&&this.onData("\x1B[I"))},this._onBlur=()=>{this.focused=!1,this.element.classList.remove("focused"),this.stopMouseCapture(),this.getBridge()?.focusEvents?.()&&this.onData("\x1B[O")},this._onMouseDown=c=>this.handleMouse(c,"press"),this._onMouseMove=c=>{this.mouseButtons!==0&&this.handleMouse(c,"move")},this._onMouseUp=c=>{this.mouseButtons!==0&&(this.handleMouse(c,"release"),this.mouseButtons=c.buttons&7,this.mouseButtons===0&&this.stopMouseCapture())},this._onWheel=c=>this.handleMouse(c,"wheel"),this.textarea.addEventListener("keydown",this._onKeyDown),this.textarea.addEventListener("paste",this._onPaste),this.textarea.addEventListener("compositionstart",this._onCompositionStart),this.textarea.addEventListener("compositionend",this._onCompositionEnd),this.textarea.addEventListener("input",this._onInput),this.textarea.addEventListener("focus",this._onFocus),this.textarea.addEventListener("blur",this._onBlur),this.element.addEventListener("mousedown",this._onMouseDown),this.element.addEventListener("wheel",this._onWheel,{passive:!1})}focus(){this.textarea.focus({preventScroll:!0})}destroy(){this.textarea.removeEventListener("keydown",this._onKeyDown),this.textarea.removeEventListener("paste",this._onPaste),this.textarea.removeEventListener("compositionstart",this._onCompositionStart),this.textarea.removeEventListener("compositionend",this._onCompositionEnd),this.textarea.removeEventListener("input",this._onInput),this.textarea.removeEventListener("focus",this._onFocus),this.textarea.removeEventListener("blur",this._onBlur),this.element.removeEventListener("mousedown",this._onMouseDown),this.stopMouseCapture(),this.element.removeEventListener("wheel",this._onWheel),this.element.classList.remove("focused"),this.textarea.remove()}handleKeyDown(t){if(this.composing)return;if((t.metaKey||t.ctrlKey)&&t.key==="c"){const i=window.getSelection();if(i&&i.toString().length>0)return}if((t.metaKey||t.ctrlKey)&&t.key==="v"){this.textarea.focus();return}if(t.metaKey&&!t.ctrlKey){if(t.key==="Backspace")t.preventDefault(),this.onData("");else if(t.key==="a"){t.preventDefault();const i=window.getSelection();if(i){const o=document.createRange();o.selectNodeContents(this.element),i.removeAllRanges(),i.addRange(o)}}return}t.preventDefault();const n=this.keyToSequence(t);n&&this.onData(n)}handlePaste(t){t.preventDefault();const n=t.clipboardData?.getData("text");if(!n)return;const i=this.getBridge();if(i&&i.bracketedPaste()){const o=n.replace(/\x1b/g,"");this.onData("\x1B[200~"+o+"\x1B[201~")}else this.onData(n)}handleCompositionStart(){this.composing=!0}handleCompositionEnd(t){this.composing=!1,t.data&&this.onData(t.data),this.textarea.value=""}handleInput(){if(this.composing)return;const t=this.textarea.value;t&&(this.onData(t),this.textarea.value="")}handleMouse(t,n){const i=this.getBridge(),o=i?.mouseTracking?.()??0;if(!i||o===0||!i.mouseSgr?.()||n==="press"&&vg(t,this.element.ownerDocument.defaultView?.navigator??navigator)&&t.target instanceof Element&&t.target.closest(".term-link")||n==="press"&&(t.shiftKey||t.button>2)||n==="release"&&t.button>2)return;const a=t.buttons&7;if(n==="move"&&(o!==1002||a===0))return;const c=this.element.ownerDocument.defaultView;if(!c)return;const u=this.element.querySelector(".term-row:not(.term-scrollback-row)"),h=this.element.getBoundingClientRect(),f=u?.getBoundingClientRect(),g=this.getCellSize();let m,y,b,w;if(f&&g)m=f.left,y=f.top,b=g.charWidth,w=g.rowHeight;else{const I=c.getComputedStyle(this.element),T=parseFloat(I.borderLeftWidth)||0,Q=parseFloat(I.borderRightWidth)||0,j=parseFloat(I.borderTopWidth)||0,_=parseFloat(I.borderBottomWidth)||0,F=parseFloat(I.paddingLeft)||0,O=parseFloat(I.paddingRight)||0,H=parseFloat(I.paddingTop)||0,U=parseFloat(I.paddingBottom)||0;m=f?.left??h.left+T+F,y=f?.top??h.top+j+H,b=(h.width-T-Q-F-O)/i.getCols(),w=(h.height-j-_-H-U)/i.getRows()}if(b<=0||w<=0)return;n==="press"&&(this.textarea.focus({preventScroll:!0}),this.focused||this._onFocus(),this.mouseButtons=a||(t.button===1?4:t.button===2?2:1),c.addEventListener("mousemove",this._onMouseMove),c.addEventListener("mouseup",this._onMouseUp));const C=Math.max(1,Math.min(i.getCols(),Math.floor((t.clientX-m)/b)+1)),E=Math.max(1,Math.min(i.getRows(),Math.floor((t.clientY-y)/w)+1)),S=(t.shiftKey?4:0)|(t.altKey?8:0)|(t.ctrlKey?16:0);let R,k="M";if(n==="wheel"){const I=t;if(Math.abs(I.deltaX)>Math.abs(I.deltaY)){if(I.deltaX===0)return;R=(I.deltaX<0?66:67)|S}else{if(I.deltaY===0)return;R=(I.deltaY<0?64:65)|S}}else R=(n==="move"?a&4?1:a&2?2:0:t.button===1?1:t.button===2?2:0)|S|(n==="move"?32:0),n==="release"&&(k="m");t.preventDefault(),this.onData(`\x1B[<${R};${C};${E}${k}`)}stopMouseCapture(){this.mouseButtons=0;const t=this.element.ownerDocument.defaultView;t?.removeEventListener("mousemove",this._onMouseMove),t?.removeEventListener("mouseup",this._onMouseUp)}keyToSequence(t){if(t.ctrlKey&&!t.altKey&&!t.metaKey){if(t.key.length===1){const u=t.key.toLowerCase().charCodeAt(0);if(u>=97&&u<=122)return String.fromCharCode(u-96)}if(t.key==="[")return"\x1B";if(t.key==="\\")return"";if(t.key==="]")return"";if(t.key==="^")return"";if(t.key==="_")return""}if(t.key==="Enter"&&t.shiftKey)return"\x1B[13;2u";if(t.key==="Tab"&&t.shiftKey)return"\x1B[Z";const n=x6[t.key];if(n)return t.altKey?"\x1B"+n:n;const i=this.getBridge(),c=(i&&i.cursorKeysApp()?b6:v6)[t.key];return c?t.altKey?"\x1B"+c:c:t.key.length===1&&!t.ctrlKey&&!t.metaKey?t.altKey?"\x1B"+t.key:t.key:null}}const C6={1:"bold",2:"dim",4:"italic",8:"underline",16:"blink",32:"reverse",64:"invisible",128:"strikethrough"};function E6(e){const t=[];for(const[n,i]of Object.entries(C6))e&Number(n)&&t.push(i);return t}const om=27;function S6(e){const t=[],n=Date.now();let i=0,o=0;const a=()=>{if(i>o){const c=e.slice(o,i);c.length>0&&!/^[\x00-\x1f]+$/.test(c)&&t.push({ts:n,type:"text",raw:c.slice(0,60)})}};for(;i<e.length;){if(e.charCodeAt(i)!==om){i++;continue}a();const c=i;if(i++,i>=e.length)break;const u=e[i];if(u==="["){i++;let h="";i<e.length&&(e[i]==="?"||e[i]===">"||e[i]==="!")&&(h=e[i],i++);let f="";for(;i<e.length&&(e.charCodeAt(i)>=48&&e.charCodeAt(i)<=59||e[i]===":");)f+=e[i],i++;for(;i<e.length&&e.charCodeAt(i)>=32&&e.charCodeAt(i)<=47;)i++;let g="";i<e.length&&e.charCodeAt(i)>=64&&e.charCodeAt(i)<=126&&(g=e[i],i++);const m=e.slice(c,i),y=f?f.split(/[;:]/).map(Number).filter(w=>!isNaN(w)):[],b=g==="m"?"sgr":"csi";t.push({ts:n,type:b,raw:m,params:y.length>0?y:void 0,private:h||void 0,final:g})}else if(u==="]"){for(i++;i<e.length&&e.charCodeAt(i)!==7&&!(e.charCodeAt(i)===om&&i+1<e.length&&e[i+1]==="\\");)i++;i<e.length&&(e.charCodeAt(i)===7?i++:e.charCodeAt(i)===om&&(i+=2));const h=e.slice(c,i);t.push({ts:n,type:"osc",raw:h.slice(0,80)})}else u>=" "&&u<="~"?(i++,t.push({ts:n,type:"esc",raw:e.slice(c,i),final:u})):i++;o=i}return a(),t}const dC=500;class k6{constructor(){this._traces=[],this._bridge=null,this._perf={frameCount:0,totalRenderMs:0,avgRenderMs:0,maxRenderMs:0,lastDirtyRows:0}}get traces(){return this._traces}get perf(){return this._perf}setBridge(t){this._bridge=t}traceWrite(t){const n=typeof t=="string"?t:new TextDecoder().decode(t),i=S6(n);for(const o of i)this._traces.push(o);this._traces.length>dC&&(this._traces=this._traces.slice(-dC))}recordRender(t,n){this._perf.frameCount++,this._perf.totalRenderMs+=t,this._perf.avgRenderMs=this._perf.totalRenderMs/this._perf.frameCount,t>this._perf.maxRenderMs&&(this._perf.maxRenderMs=t),this._perf.lastDirtyRows=n}resetPerf(){this._perf={frameCount:0,totalRenderMs:0,avgRenderMs:0,maxRenderMs:0,lastDirtyRows:0}}cell(t,n){if(!this._bridge)return null;const i=this._bridge.getCell(t,n);return{...i,charStr:i.chars??(i.char>=32?String.fromCodePoint(i.char):""),flagNames:E6(i.flags)}}row(t){if(!this._bridge)return null;const n=this._bridge.getCols(),i=[];for(let o=0;o<n;o++)i.push(this.cell(t,o));return i}grid(){if(!this._bridge)return null;const t=this._bridge.getCursor();return{rows:this._bridge.getRows(),cols:this._bridge.getCols(),cursor:t,altScreen:this._bridge.usingAltScreen(),scrollbackCount:this._bridge.getScrollbackCount()}}unhandled(){return this._bridge?this._bridge.getUnhandledSequences():[]}dump(t=50){const n=this._traces.slice(-t);console.group(`%cwterm debug — last ${n.length} traces`,"color: #569cd6; font-weight: bold");for(const i of n){const o=i.type==="sgr"?"%cSGR":i.type==="csi"?"%cCSI":i.type==="osc"?"%cOSC":i.type==="esc"?"%cESC":"%cTXT",a=i.type==="sgr"?"background:#2d5a27;color:#fff;padding:1px 4px;border-radius:2px":i.type==="csi"?"background:#1e4a7a;color:#fff;padding:1px 4px;border-radius:2px":"background:#555;color:#fff;padding:1px 4px;border-radius:2px",c=[i.private?`private=${i.private}`:"",i.params?`params=[${i.params}]`:"",i.final?`final=${i.final}`:""].filter(Boolean).join(" ");console.log(`${o} ${i.raw.slice(0,40)}`,a,c?` ${c}`:"")}console.groupEnd()}dumpUnhandled(){const t=this.unhandled();if(t.length===0){console.log("%cwterm debug — no unhandled sequences","color: #6a9955");return}console.group(`%cwterm debug — ${t.length} unhandled sequences`,"color: #d7ba7d; font-weight: bold");for(const n of t)console.log(` final=${n.final} private=${n.private||"-"} params=[${n.params.slice(0,n.paramCount)}]`);console.groupEnd()}}const B6=1e3;class I6{constructor(t,n={}){this.bridge=null,this.debug=null,this.renderer=null,this.input=null,this.rafId=null,this._synchronizedOutputTimer=null,this._synchronizedOutputState="idle",this._synchronizedOutputGeneration=0,this._rendererNeedsSetup=!1,this.resizeObserver=null,this._destroyed=!1,this._shouldScrollToBottom=!1,this._scrollbackDiscardedCount=0,this._programmaticScrollTop=null,this._pendingResizeScrollTop=null,this._rowHeight=0,this._charWidth=0,this.element=t,this._coreOption=n.core,this.wasmUrl=n.wasmUrl,this.cols=n.cols||80,this.rows=n.rows||24,this.autoResize=n.autoResize!==!1,this._debugEnabled=n.debug??!1,this.onData=n.onData||null,this.onTitle=n.onTitle||null,this.onResize=n.onResize||null,this._container=document.createElement("div"),this._container.className="term-grid",this.element.appendChild(this._container),this.element.classList.add("wterm"),n.cursorBlink&&this.element.classList.add("cursor-blink"),this._onClickFocus=i=>{const o=i.target;if(o instanceof Element&&o.closest(".term-link")){if(vg(i,this.element.ownerDocument.defaultView?.navigator??navigator)||i.detail===0)return;i.preventDefault()}const a=window.getSelection();(!a||a.isCollapsed)&&this.input?.focus()},this.element.addEventListener("click",this._onClickFocus),this._onModifierChange=i=>{this.element.classList.toggle("link-modifier-active",vg(i,this.element.ownerDocument.defaultView?.navigator??navigator))},this._onWindowBlur=()=>{this.element.classList.remove("link-modifier-active")},this.element.ownerDocument.addEventListener("keydown",this._onModifierChange),this.element.ownerDocument.addEventListener("keyup",this._onModifierChange),this.element.ownerDocument.defaultView?.addEventListener("blur",this._onWindowBlur),this._onScroll=()=>{if(this._pendingResizeScrollTop===null){if(this._programmaticScrollTop!==null&&this.element.scrollTop===this._programmaticScrollTop){this._programmaticScrollTop=null;return}this._programmaticScrollTop=null,this._shouldScrollToBottom=!1,this._scheduleRender()}},this.element.addEventListener("scroll",this._onScroll,{passive:!0})}async init(){try{if(this._coreOption?this.bridge=this._coreOption:this.bridge=await ly.load(this.wasmUrl),this._destroyed)return this;this.bridge.init(this.cols,this.rows),this._debugEnabled&&(this.debug=new k6,this.debug.setBridge(this.bridge),globalThis.__wterm=this),this._setRowHeight(),this._measureCharSize(),this.renderer=new y6(this._container),this.renderer.setup(this.cols,this.rows),this.input=new w6(this.element,t=>{this._scrollToBottom(),this.onData?this.onData(t):this.write(t)},()=>this.bridge,()=>this._charWidth>0&&this._rowHeight>0?{charWidth:this._charWidth,rowHeight:this._rowHeight}:null),this.autoResize?this._setupResizeObserver():this._lockHeight(),this.input.focus(),this._initialRender()}catch(t){throw this.destroy(),new Error(`wterm: failed to initialize: ${t instanceof Error?t.message:t}`)}return this}_isScrolledToBottom(){const t=this.element;return t.scrollHeight-t.scrollTop-t.clientHeight<5}_scrollToBottom(){const t=this.element,n=t.scrollHeight-t.clientHeight;if(n<=0){this._setScrollTop(0);return}this._setScrollTop(n)}_setScrollTop(t){this.element.scrollTop!==t&&(this._programmaticScrollTop=t,this.element.scrollTop=t)}write(t){if(!this.bridge)return;this.debug&&this.debug.traceWrite(t),this._shouldScrollToBottom=this._isScrolledToBottom();let n,i=!1;const o=()=>{const u=this._drainResponses();!i&&u.hasError&&(i=!0,n=u.error)};typeof t=="string"?this.bridge.writeString(t,o):this.bridge.writeRaw(t,o);const a=this.bridge.synchronizedOutput?.()??!1,c=this.bridge.synchronizedOutputGeneration?.()??0;if(this._updateSynchronizedOutput(a,c),this._synchronizedOutputState!=="held"&&(this._setupRendererIfNeeded(),this._scheduleRender()),o(),i)throw n}resize(t,n){if(!this.bridge)return;this._shouldScrollToBottom=this._pendingResizeScrollTop===null&&this._isScrolledToBottom(),this.cols=t,this.rows=n,this.bridge.resize(t,n);const i=this.bridge.synchronizedOutput?.()??!1,o=this.bridge.synchronizedOutputGeneration?.()??0;this._updateSynchronizedOutput(i,o)?this._rendererNeedsSetup=!0:(this._setupRenderer(t,n),this._scheduleRender()),this.onResize&&this.onResize(t,n)}focus(){this.input?this.input.focus():this.element.focus()}_scheduleRender(){this.rafId==null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null,this._doRender()}))}_cancelScheduledRender(){this.rafId!=null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}_updateSynchronizedOutput(t,n){return t?this._synchronizedOutputState==="held"&&n!==this._synchronizedOutputGeneration?(this._armSynchronizedOutputFallback(n),!0):(this._synchronizedOutputState==="passthrough"&&n!==this._synchronizedOutputGeneration&&(this._synchronizedOutputState="idle"),this._synchronizedOutputState!=="idle"?this._synchronizedOutputState==="held":(this._synchronizedOutputState="held",this._cancelScheduledRender(),this._armSynchronizedOutputFallback(n),!0)):(this._synchronizedOutputState==="held"&&this._cancelSynchronizedOutputFallback(),this._synchronizedOutputState="idle",!1)}_armSynchronizedOutputFallback(t){this._cancelSynchronizedOutputFallback(),this._synchronizedOutputGeneration=t,this._synchronizedOutputTimer=setTimeout(()=>{this._synchronizedOutputState!=="held"||this._synchronizedOutputGeneration!==t||(this._synchronizedOutputTimer=null,this._synchronizedOutputState="passthrough",this._setupRendererIfNeeded(),this._cancelScheduledRender(),this._doRender())},B6)}_cancelSynchronizedOutputFallback(){this._synchronizedOutputTimer!=null&&(clearTimeout(this._synchronizedOutputTimer),this._synchronizedOutputTimer=null)}_setupRendererIfNeeded(){this._rendererNeedsSetup&&(this._setupRenderer(this.cols,this.rows),this._rendererNeedsSetup=!1)}_setupRenderer(t,n){!this._shouldScrollToBottom&&this._pendingResizeScrollTop===null&&(this._pendingResizeScrollTop=this.element.scrollTop),this.renderer?.setup(t,n)}_initialRender(){this._doRender()}_doRender(){if(!this.bridge||!this.renderer)return;let t=0;const n=this.debug?performance.now():0;if(this.debug)for(let g=0;g<this.rows;g++)this.bridge.isDirtyRow(g)&&t++;const i=this._rowHeight||17,o=this.bridge.getScrollbackCount(),a=this.bridge.getScrollbackDiscardedCount?.(),c=a!==void 0&&a>=this._scrollbackDiscardedCount?a-this._scrollbackDiscardedCount:0;a!==void 0&&(this._scrollbackDiscardedCount=a);let u=this._pendingResizeScrollTop!==null?this._pendingResizeScrollTop:this.element.scrollTop;!this._shouldScrollToBottom&&c>0&&(u=Math.max(0,u-c*i),this._pendingResizeScrollTop!==null?this._pendingResizeScrollTop=u:this._setScrollTop(u)),this.renderer.render(this.bridge,{scrollTop:this._shouldScrollToBottom?Math.max(0,(o+this.rows)*i-this.element.clientHeight):u,clientHeight:this.element.clientHeight,rowHeight:i,scrollbackDiscardedCount:a}),this.debug&&this.debug.recordRender(performance.now()-n,t);const h=o>0;if(this.element.classList.toggle("has-scrollback",h),this._shouldScrollToBottom)this._scrollToBottom();else if(this._pendingResizeScrollTop!==null){const g=this._pendingResizeScrollTop;this._pendingResizeScrollTop=null,this._setScrollTop(g)}else!h&&this.element.scrollTop!==0&&(this.element.scrollTop=0);const f=this.bridge.getTitle();f!==null&&this.onTitle&&this.onTitle(f),this._drainResponses()}_drainResponses(){if(!this.bridge)return{hasError:!1};let t,n,i=!1;for(;(t=this.bridge.getResponse())!==null;)try{this.onData&&this.onData(t)}catch(o){i||(i=!0,n=o)}return{hasError:i,error:n}}_lockHeight(){const t=this._rowHeight||17,n=this.rows*t,i=getComputedStyle(this.element);let o=(parseFloat(i.paddingTop)||0)+(parseFloat(i.paddingBottom)||0);i.boxSizing==="border-box"&&(o+=(parseFloat(i.borderTopWidth)||0)+(parseFloat(i.borderBottomWidth)||0)),this.element.style.height=`${n+o}px`}_setRowHeight(){const t=document.createElement("div");t.className="term-row",t.style.visibility="hidden",t.style.position="absolute",t.textContent="W",this._container.appendChild(t);const n=t.getBoundingClientRect().height;if(t.remove(),n>0){const i=Math.ceil(n);this._rowHeight=i,this.element.style.setProperty("--term-row-height",`${i}px`)}}_measureCharSize(){const t=document.createElement("div");t.className="term-row",t.style.visibility="hidden",t.style.position="absolute";const n=document.createElement("span");n.textContent="W",t.appendChild(n),this._container.appendChild(t);const i=n.getBoundingClientRect().width,o=t.getBoundingClientRect().height;return t.remove(),i===0||o===0?null:(this._charWidth=i,this._rowHeight=o,{charWidth:i,rowHeight:o})}_setupResizeObserver(){const t=this._measureCharSize();if(!t)return;let{charWidth:n,rowHeight:i}=t;this.resizeObserver=new ResizeObserver(o=>{const a=this._measureCharSize();a&&(n=a.charWidth,i=a.rowHeight);for(const c of o){const{width:u,height:h}=c.contentRect,f=Math.max(1,Math.floor(u/n)),g=Math.max(1,Math.floor(h/i));(f!==this.cols||g!==this.rows)&&this.resize(f,g)}}),this.resizeObserver.observe(this.element)}destroy(){this._destroyed=!0,this._cancelScheduledRender(),this._cancelSynchronizedOutputFallback(),this.resizeObserver&&this.resizeObserver.disconnect(),this.input&&this.input.destroy(),this.element.removeEventListener("click",this._onClickFocus),this.element.removeEventListener("scroll",this._onScroll),this.element.ownerDocument.removeEventListener("keydown",this._onModifierChange),this.element.ownerDocument.removeEventListener("keyup",this._onModifierChange),this.element.ownerDocument.defaultView?.removeEventListener("blur",this._onWindowBlur),this.element.classList.remove("link-modifier-active"),this.element.innerHTML="",this.debug&&globalThis.__wterm===this&&delete globalThis.__wterm,this.debug=null}}const R6=x.forwardRef(function({cols:t=80,rows:n=24,core:i,wasmUrl:o,theme:a,autoResize:c=!1,cursorBlink:u=!1,debug:h=!1,onData:f,onTitle:g,onResize:m,onReady:y,onError:b,className:w,style:C,...E},S){const R=x.useRef(null),k=x.useRef({onData:f,onTitle:g,onResize:m,onReady:y,onError:b}),I=x.useRef(c);k.current={onData:f,onTitle:g,onResize:m,onReady:y,onError:b},I.current=c,x.useImperativeHandle(S,()=>({write(O){R.current?.write(O)},resize(O,H){R.current?.resize(O,H)},focus(){R.current?.focus()},get instance(){return R.current}}));const T=x.useCallback(O=>{if(!O)return;const H=new I6(O,{cols:t,rows:n,core:i,wasmUrl:o,autoResize:I.current,cursorBlink:u,debug:h,onData:k.current.onData?U=>k.current.onData?.(U):void 0,onTitle:U=>k.current.onTitle?.(U),onResize:(U,J)=>k.current.onResize?.(U,J)});return R.current=H,H.init().then(()=>{k.current.onReady?.(H)}).catch(U=>{k.current.onError?k.current.onError(U):console.error(U)}),()=>{H.destroy(),R.current=null}},[i,o]),Q=R.current;if(Q?.bridge){!I.current&&(Q.cols!==t||Q.rows!==n)&&Q.resize(t,n);const O=Q.element;u&&!O.classList.contains("cursor-blink")?O.classList.add("cursor-blink"):!u&&O.classList.contains("cursor-blink")&&O.classList.remove("cursor-blink"),f&&!Q.onData?Q.onData=H=>k.current.onData?.(H):!f&&Q.onData&&(Q.onData=null)}const _=["wterm",a?`theme-${a}`:"",w].filter(Boolean).join(" "),F={...c?void 0:{height:n*17+24},...C};return p.jsx("div",{ref:T,className:_||void 0,style:F,role:"textbox","aria-label":"Terminal","aria-multiline":"true","aria-roledescription":"terminal",...E})}),Q6=""+new URL("wterm-Coe9fLBZ.wasm",import.meta.url).href;function T6({name:e,active:t}){const n=x.useRef(null),i=x.useRef(null),[o,a]=x.useState(!1),{resolved:c}=us(),u=x.useRef(0),h=x.useCallback(()=>{const f=Date.now();f-u.current<1e3||(u.current=f,window.kirby.markSessionSeen(e))},[e]);return x.useEffect(()=>{if(!(!t||!o))return window.kirby.onSessionData(({name:f})=>{f===e&&h()})},[t,o,e,h]),x.useEffect(()=>{if(!o)return;const f=n.current;if(!f)return;let g=null;const m=[],y=window.kirby.onSessionData(({name:C,data:E,seq:S})=>{C===e&&(g===null?m.push({seq:S,data:E}):S>g&&f.write(E))}),b=window.kirby.onSessionExit(({name:C,code:E})=>{C===e&&f.write(`\r
|
|
55
|
+
\x1B[2m[session exited${E?` with code ${E}`:""}]\x1B[0m\r
|
|
56
|
+
`)});let w=!1;return window.kirby.getSessionBuffer(e).then(({data:C,seq:E})=>{if(!w){C&&f.write(C),g=E;for(const S of m)S.seq>E&&f.write(S.data);m.length=0}}).catch(()=>{if(!w){g=0;for(const C of m)f.write(C.data);m.length=0}}),()=>{w=!0,y(),b()}},[e,o]),x.useEffect(()=>{const f=i.current;if(!f||!o)return;const g=m=>{const y=[...m.clipboardData?.items??[]].find(b=>b.kind==="file"&&b.type.startsWith("image/"))?.getAsFile();y&&(m.preventDefault(),m.stopPropagation(),(async()=>{try{const b=new Uint8Array(await y.arrayBuffer()),C=`${await window.kirby.saveClipboardImage(b,y.type)} `,E=n.current?.instance?.bridge?.bracketedPaste()===!0;await window.kirby.writeSession(e,E?`\x1B[200~${C}\x1B[201~`:C)}catch(b){Ee.error(Xe(b))}})())};return f.addEventListener("paste",g,!0),()=>f.removeEventListener("paste",g,!0)},[o,e]),x.useEffect(()=>{t&&o&&(n.current?.focus(),u.current=0,h())},[t,o,h]),x.useEffect(()=>{if(!o)return;const f=i.current,g=n.current,m=g?.instance;if(!f||!g||!m)return;let y=0;const b=(C=!1)=>{cancelAnimationFrame(y),y=requestAnimationFrame(()=>{const E=f.getBoundingClientRect();if(E.width<2||E.height<2)return;const S=L8(m.element,E)??oy(E);S.cols!==m.cols||S.rows!==m.rows?g.resize(S.cols,S.rows):C&&(g.resize(S.cols,S.rows-1),y=requestAnimationFrame(()=>g.resize(S.cols,S.rows)))})};b(t);const w=new ResizeObserver(()=>b());return w.observe(f),()=>{w.disconnect(),cancelAnimationFrame(y)}},[o,t]),p.jsx("div",{ref:i,className:"absolute inset-0",children:p.jsx(R6,{ref:n,wasmUrl:Q6,className:"h-full w-full",theme:c==="light"?"light":void 0,autoResize:!0,cursorBlink:!0,onReady:f=>{a(!0),t&&f.focus()},onData:f=>{window.kirby.writeSession(e,f)},onResize:(f,g)=>{window.kirby.resizeSession(e,f,g)}})})}function j6(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,a,c){if(typeof a=="string"){const u=a.charCodeAt(0);if(u>=48&&u<=57){const h=+a;if(Number.isInteger(h)&&h>=0&&h<e){let f=o[h];if(!f){const g=t[h*2];f=o[h]={index:h,key:n(h),start:g,size:t[h*2+1],end:g+t[h*2+1],lane:0}}return f}}if(a==="length")return e}return Reflect.get(o,a,c)}})}function ua(e,t,n){let i=n.initialDeps??[],o,a=!0;function c(){const u=e();return(u.length!==i.length||u.some((f,g)=>i[g]!==f))&&(i=u,o=t(...u),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(o),a=!1),o}return c.updateDeps=u=>{i=u},c}function fC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const D6=(e,t)=>Math.abs(e-t)<1.01,M6=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let Nl;const am=()=>{if(Nl!==void 0)return Nl;if(typeof navigator>"u")return Nl=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Nl=!0;const e=navigator.maxTouchPoints;return Nl=navigator.platform==="MacIntel"&&e!==void 0&&e>0},hC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},N6=e=>e,_6=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let a=0;a<i;a++)o[a]=t+a;return o},O6=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=c=>{const{width:u,height:h}=c;t({width:Math.round(u),height:Math.round(h)})};if(o(hC(n)),!i.ResizeObserver)return()=>{};const a=new i.ResizeObserver(c=>{const u=()=>{const h=c[0];if(h?.borderBoxSize){const f=h.borderBoxSize[0];if(f){o({width:f.inlineSize,height:f.blockSize});return}}o(hC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},Md={passive:!0},z6=typeof window>"u"?!0:"onscrollend"in window,L6=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const a=e.options.useScrollendEvent&&z6;let c=0;const u=a?null:M6(o,()=>t(c,!1),e.options.isScrollingResetDelay),h=m=>()=>{c=n(i),u?.(),t(c,m)},f=h(!0),g=h(!1);return i.addEventListener("scroll",f,Md),a&&i.addEventListener("scrollend",g,Md),()=>{i.removeEventListener("scroll",f),a&&i.removeEventListener("scrollend",g),u?.cancel()}},P6=(e,t)=>L6(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),F6=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),a=n.itemSizeCache.get(o);if(a!==void 0)return a}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},H6=(e,{adjustments:t=0,behavior:n},i)=>{var o,a;(a=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},U6=H6;class q6{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const c=()=>{const u=a.target,h=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);for(const[f,g]of this.elementsCache)if(g===u){this.elementsCache.delete(f);break}return}this.isIndexInRange(h)&&this.shouldMeasureDuringScroll(h)&&this.resizeItem(h,this.options.measureElement(u,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var a;return(a=i())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=i())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const a={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:N6,rangeExtractor:_6,onChange:()=>{},measureElement:F6,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const y in n){const b=n[y];b!==void 0&&(a[y]=b)}const c=this.options;let u=null,h=null,f=!1;if(c!==void 0&&c.enabled&&a.enabled&&a.anchorTo==="end"&&this.scrollElement!==null){const y=c.count,b=a.count,w=this.getMeasurements(),C=y>0?((i=w[0])==null?void 0:i.key)??c.getItemKey(0):null,E=y>0?((o=w[y-1])==null?void 0:o.key)??c.getItemKey(y-1):null;if(b!==y||y>0&&b>0&&(a.getItemKey(0)!==C||a.getItemKey(b-1)!==E)){f=!0;const k=y>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;k&&(u=[k.key,this.getScrollOffset()-k.start]);const I=a.followOnAppend===!0?"auto":a.followOnAppend||null;I&&b>y&&this.isAtEnd(c.scrollEndThreshold)&&(y===0||a.getItemKey(b-1)!==E)&&(h=I)}}this.options=a,f&&(this.pendingMin=0,this.itemSizeCacheVersion++);let g=!1,m=0;if(u&&this.scrollOffset!==null){const[y,b]=u,w=this.getMeasurements(),{count:C,getItemKey:E}=this.options;let S=0;for(;S<C&&E(S)!==y;)S++;if(S<C){const R=w[S];if(R){const k=Math.max(0,R.start+b);k!==this.scrollOffset&&(m=k-this.scrollOffset,this.scrollOffset=k,g=!0)}}}(g||h)&&(this.pendingScrollAnchor=[g?u[0]:null,g?u[1]:0,h,m])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=ua(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,c)=>{if(c&&this._intendedScrollOffset===null&&a===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(a-this._intendedScrollOffset)<1.5&&(a=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const u=this.getScrollOffset();this.scrollDirection=c?u===a?this.scrollDirection:u<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=c,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const a=this.scrollElement,c=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},u=()=>{this._iosTouching=!1,!(!am()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};a.addEventListener("touchstart",c,Md),a.addEventListener("touchend",u,Md),this.unsubs.push(()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchend",u),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[a,c,u,h]=o;a!==null&&!u&&(am()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?h!==0&&(this._iosDeferredAdjustment+=h):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),u&&this.scrollToEnd({behavior:u})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ua(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,a,c,u,h,f)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:h,gap:f}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=ua(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:h,gap:f},g)=>{const m=this.itemSizeCache;if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const S of this.laneAssignments.keys())S>=n&&this.laneAssignments.delete(S);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(S=>{this.itemSizeCache.set(S.key,S.size)}));const y=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),u===1){const S=n*2;let R=this._flatMeasurements;if(!R||R.length<S){const T=new Float64Array(S);R&&y>0&&T.set(R.subarray(0,y*2)),R=T,this._flatMeasurements=R}let k;if(y===0)k=i+o;else{const T=y-1;k=R[T*2]+R[T*2+1]+f}for(let T=y;T<n;T++){const Q=a(T),j=m.get(Q),_=typeof j=="number"?j:this.options.estimateSize(T);R[T*2]=k,R[T*2+1]=_,k+=_+f}const I=j6(n,R,a);return this.measurementsCache=I,I}const b=this.measurementsCache.slice(0,y),w=new Array(u).fill(void 0),C=new Float64Array(u);let E=0;for(let S=0;S<y;S++){const R=b[S];R&&(w[R.lane]===void 0&&E++,w[R.lane]=S,C[R.lane]=R.end)}for(let S=y;S<n;S++){const R=a(S),k=this.laneAssignments.get(S);let I,T;const Q=h==="estimate"||m.has(R);if(k!==void 0&&this.options.lanes>1){I=k;const O=w[I],H=O!==void 0?b[O]:void 0;T=H?H.end+f:i+o}else if(E===u){let O=0,H=C[0],U=w[0];for(let J=1;J<u;J++){const Y=C[J];(Y<H||Y===H&&w[J]<U)&&(O=J,H=Y,U=w[J])}I=O,T=H+f,Q&&this.laneAssignments.set(S,I)}else I=S%this.options.lanes,T=i+o,Q&&this.laneAssignments.set(S,I);const j=m.get(R),_=typeof j=="number"?j:this.options.estimateSize(S),F=T+_;b[S]={index:S,start:T,size:_,end:F,key:R,lane:I},w[I]===void 0&&E++,w[I]=S,C[I]=F}return this.measurementsCache=b,b},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ua(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,a)=>n.length===0||i===0?(this.range=null,null):(this.range=Y6(n,i,o,a,a===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ua(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,a,c)=>a===null||c===null?[]:n({startIndex:a,endIndex:c,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),c=Math.max(0,o-a),u=Math.min(this.options.count-1,o+a);return n>=c&&n<=u}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((c,u)=>{c.isConnected||(this.observer.unobserve(c),this.elementsCache.delete(u))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,a;if(!this.isIndexInRange(n))return;let c,u,h;const f=this._flatMeasurements;if(this.options.lanes===1&&f!==null)h=this.options.getItemKey(n),u=f[n*2],c=f[n*2+1];else{const y=this.measurementsCache[n];if(!y)return;h=y.key,u=y.start,c=y.size}const g=this.itemSizeCache.get(h)??c,m=i-g;if(m!==0){const y=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,b=y?this.getTotalSize():0,w=this.getScrollOffset()+this.scrollAdjustments,E=!this.itemSizeCache.has(h)?u<w:u+g<=w&&this.scrollDirection!=="backward",S=((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:h,start:u,size:c,end:u+c,lane:0},m,this):E);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(h,i),this.itemSizeCacheVersion++;let R=!1;y?R=this.applyScrollAdjustment(this.getTotalSize()-b):S&&(R=this.applyScrollAdjustment(m)),this.notify(R)}},this.getVirtualItems=ua(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let a=0,c=n.length;a<c;a++){const u=n[a],h=i[u];o.push(h)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,a=this.options.lanes===1&&o!=null,c=wB(0,i.length-1,a?u=>o[u*2]:u=>fC(i[u]).start,n);return fC(i[c])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),c=this.getScrollOffset();i==="auto"&&(i=n>=c+a?"end":"start"),i==="center"?n+=(o-a)/2:i==="end"&&(n-=a);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),a=this.getScrollOffset(),c=this.measurementsCache[n];if(!c)return;if(i==="auto")if(c.end>=a+o-this.options.scrollPaddingEnd)i="end";else if(c.start<=a+this.options.scrollPaddingStart)i="start";else return[a,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const u=i==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,i,c.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const a=this.getOffsetForAlignment(n,i),c=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,i);if(!a)return;const[c,u]=a,h=this.now();this.scrollState={index:n,align:u,behavior:o,startedAt:h,lastTargetOffset:c,stableFrames:0},this._scrollToOffset(c,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const a=i.length-1,c=this._flatMeasurements;c!=null?o=c[a*2]+c[a*2+1]:o=((n=i[a])==null?void 0:n.end)??0}else{const a=Array(this.options.lanes).fill(null);let c=i.length-1;for(;c>=0&&a.some(u=>u===null);){const u=i[c];a[u.lane]===null&&(a[u.lane]=u.end),c--}o=Math.max(...a.filter(u=>u!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){return t===0?!1:am()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=t,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,a=1,c=o!==this.scrollState.lastTargetOffset;if(!c&&D6(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,c){const u=this.getSize()||600,h=Math.abs(o-this.getScrollOffset()),f=this.scrollState.behavior==="smooth"&&h>u;this.scrollState.lastTargetOffset=o,f||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:f?"smooth":"auto"})}this.scheduleScrollReconcile()}}const wB=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,a=n(o);if(a<i)e=o+1;else if(a>i)t=o-1;else return o}return e>0?e-1:0};function G6(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,a=e[o*2];if(a<n)i=o+1;else if(a>n)t=o-1;else return o}return i>0?i-1:0}function Y6(e,t,n,i,o){const a=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:a};if(i===1&&o!==null){const f=G6(o,a,n);let g=f;const m=n+t;for(;g<a&&o[g*2]+o[g*2+1]<m;)g++;return{startIndex:f,endIndex:g}}let u=wB(0,a,f=>e[f].start,n),h=u;if(i===1)for(;h<a&&e[h].end<n+t;)h++;else if(i>1){const f=Array(i).fill(0);for(;h<a&&f.some(m=>m<n+t);){const m=e[h];f[m.lane]=m.end,h++}const g=Array(i).fill(n+t);for(;u>=0&&g.some(m=>m>=n);){const m=e[u];g[m.lane]=m.start,u--}u=Math.max(0,u-u%i),h=Math.min(a,h+(i-1-h%i))}return{startIndex:u,endIndex:h}}const lm=typeof document<"u"?x.useLayoutEffect:x.useEffect;function K6({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...i}){const o=x.useReducer(g=>g+1,0)[1],a=x.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;const c=g=>{const m=a.current;if(!m.enabled||!m.container)return;const y=g.getTotalSize();if(y!==m.lastSize){m.lastSize=y;const b=g.options.horizontal?"width":"height";m.container.style[b]=`${y}px`}},u=g=>{const m=a.current;if(!m.enabled||!m.container)return;c(g);const y=!!g.options.horizontal,b=m.mode==="transform",w=y?"left":"top",C=g.options.scrollMargin,E=g.getVirtualItems();for(const S of E){const R=S.start-C,k=g.elementsCache.get(S.key);k&&m.lastPositions.get(k)!==R&&(m.lastPositions.set(k,R),b?k.style.transform=y?`translate3d(${R}px, 0, 0)`:`translate3d(0, ${R}px, 0)`:k.style[w]=`${R}px`)}},h={...i,onChange:(g,m)=>{var y;const b=a.current;let w=!0;if(b.enabled){u(g);const C=g.range,E=b.prevRange;w=!E||E.isScrolling!==g.isScrolling||E.startIndex!==C?.startIndex||E.endIndex!==C?.endIndex,w&&(b.prevRange=C?{startIndex:C.startIndex,endIndex:C.endIndex,isScrolling:g.isScrolling}:null)}w&&(e&&m?oo.flushSync(o):o()),(y=i.onChange)==null||y.call(i,g,m)}},[f]=x.useState(()=>{const g=new q6(h);return Object.assign(g,{containerRef:m=>{const y=a.current;if(y.container=m,y.lastSize=null,m&&y.enabled){const b=g.getTotalSize();y.lastSize=b;const w=g.options.horizontal?"width":"height";m.style[w]=`${b}px`}}})});return f.setOptions(h),lm(()=>f._didMount(),[]),lm(()=>(c(f),f._willUpdate())),lm(()=>{u(f)}),f}function $6(e){return K6({observeElementRect:O6,observeElementOffset:P6,scrollToFn:U6,...e})}const V6=3,J6=4,X6=20;function oc(e,t){return`${e}${t}`}function CB(e){const t=[];return e.newLine!=null&&t.push(oc("R",e.newLine)),e.oldLine!=null&&t.push(oc("L",e.oldLine)),t}function W6(e){return`${e.type}:${e.oldLine??""}:${e.newLine??""}`}function Z6(e,t={}){return t.noFold?e.map((n,i)=>({kind:"line",index:i})):nP(eP(e,t))}function eP(e,t){const n=t.context??V6,i=e.length,o=new Uint8Array(i),a=c=>{const u=Math.max(0,c-n),h=Math.min(i-1,c+n);for(let f=u;f<=h;f++)o[f]=1};for(let c=0;c<i;c++){const u=e[c];(u.type==="add"||u.type==="remove"||u.type==="hunk-header"||tP(u,t.pinnedAnchors))&&a(c),t.expanded?.has(c)&&(o[c]=1)}return o}function tP(e,t){return t?.size?CB(e).some(n=>t.has(n)):!1}function nP(e){const t=e.length,n=[];let i=0;for(;i<t;){if(e[i]){n.push({kind:"line",index:i}),i+=1;continue}let o=i;for(;o<t&&!e[o];)o+=1;if(o-i<J6)for(let a=i;a<o;a++)n.push({kind:"line",index:a});else n.push({kind:"fold",from:i,to:o});i=o}return n}function rP(e,t,n=X6){const i=[];if(t==="all")for(let o=e.from;o<e.to;o++)i.push(o);else if(t==="up")for(let o=e.from;o<Math.min(e.to,e.from+n);o++)i.push(o);else for(let o=Math.max(e.from,e.to-n);o<e.to;o++)i.push(o);return i}function iP(e,t,n){const i=[],o=[];let a=n;for(;a<t.length;){const c=t[a];if(c.kind!=="line")break;const u=e[c.index];if(u.type==="remove"&&o.length===0)i.push({index:c.index,line:u});else if(u.type==="add")o.push({index:c.index,line:u});else break;a+=1}return{removes:i,adds:o,next:a}}function sP(e,t){const n=[];let i=0;for(;i<t.length;){const o=t[i];if(o.kind==="fold"){n.push(o),i+=1;continue}const a=e[o.index];if(a.type==="hunk-header"){n.push({kind:"hunk",index:o.index}),i+=1;continue}if(a.type==="context"){n.push({kind:"context",index:o.index}),i+=1;continue}const{removes:c,adds:u,next:h}=iP(e,t,i);i=h;const f=Math.max(c.length,u.length);for(let g=0;g<f;g++)n.push({kind:"pair",left:c[g]??null,right:u[g]??null})}return n}const oP=/(^|\/)(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb|Gemfile\.lock|Cargo\.lock|poetry\.lock|composer\.lock|Pipfile\.lock|go\.sum)$/,aP=/(\.min\.(js|css)|\.bundle\.(js|css)|\.generated\.\w+|\.map|\.snap)$|(^|\/)(dist|build)\//,lP=1500;function cP(e,t){return oP.test(e)?"lockfile":aP.test(e)?"generated":t>lP?"large":null}const pC={critical:0,major:1,minor:2,nit:3};function uP(e,t){return[...e].sort((n,i)=>{const o=pC[n.severity]-pC[i.severity];if(o!==0)return o;const a=t.get(n.file)??Number.MAX_SAFE_INTEGER,c=t.get(i.file)??Number.MAX_SAFE_INTEGER;return a!==c?a-c:n.lineStart-i.lineStart})}function EB(e){const t={critical:0,major:0,minor:0,nit:0};for(const n of e)t[n.severity]+=1;return t}function dP(e,t,n,i,o=3){const a=t==="LEFT"?"oldLine":"newLine",c=y=>{const b=y[a];return b!=null&&b>=n&&b<=i},u=e.findIndex(c);if(u<0)return[];let h=u;for(let y=u;y<e.length;y++)c(e[y])&&(h=y);const f=Math.max(0,u-o),g=Math.min(e.length-1,h+o),m=[];for(let y=f;y<=g;y++)m.push({line:e[y],anchored:y>=u&&y<=h});return m}function fP(e){switch(e.kind){case"unified":case"split-context":case"split-pair":return 20;case"hunk":return 20;case"fold":return 24;case"file-header":return 37;case"comments":return 160;case"orphans":return 220;case"conversation":return 260}}function mC(e,t,n){const i=new Map,o=[],a=new Set;for(const c of t){const u=n(c);if(u==null){o.push(c);continue}const h=oc(c.side==="LEFT"?"L":"R",u);e.has(h)?((i.get(h)??i.set(h,[]).get(h)).push(c),a.add(h)):o.push(c)}return{byAnchor:i,orphans:o,pinned:a}}function hP(e){const t=new Set;for(const n of e)for(const i of CB(n))t.add(i);return t}function pP(e,t,n,i,o){if(i.length===0&&o.length===0)return;const a=e.length;e.push({key:`o:${n}`,kind:"orphans",file:n,threads:i,drafts:o});for(const c of i)t.set(c.id,a);for(const c of o)t.set(c.id,a)}function mP(e,t,n){const i=n.fileState.get(e)??{},o=t.filter(g=>g.type==="add").length,a=t.filter(g=>g.type==="remove").length,c=cP(e,o+a),u=n.threadsByFile.get(e)??[],h=n.hideResolved?u.filter(g=>!g.isResolved):u,f=(n.draftsByFile.get(e)??[]).filter(g=>g.status!=="posted");return{state:i,stats:{adds:o,dels:a,openThreads:u.filter(g=>!g.isResolved).length,draftCount:f.length,collapseReason:c,open:i.open??c===null,viewed:i.viewed??!1},visibleThreads:h,activeDrafts:f}}function gP(e,t){const n=[],i=new Map,o=new Map,a=new Map;if(t.hasConversation){n.push({key:"conversation",kind:"conversation"});for(const c of t.generalThreads)i.set(c.id,0)}for(const[c,u]of e){const h=mP(c,u,t),{state:f,visibleThreads:g,activeDrafts:m}=h;if(o.set(c,n.length),n.push({key:`h:${c}`,kind:"file-header",file:c}),a.set(c,h.stats),!h.stats.open)continue;const y=hP(u),b=mC(y,g,j=>j.lineStart==null?null:j.lineEnd??j.lineStart),w=mC(y,m,j=>j.lineEnd),C=new Set([...b.pinned,...w.pinned]),E=Z6(u,{pinnedAnchors:C,expanded:f.expanded??new Set,noFold:u.length<=40}),S=(j,_,F,O)=>{const H=[],U=[],J=$=>{H.push(...b.byAnchor.get($)??[]),U.push(...w.byAnchor.get($)??[])};if(!F&&j.newLine!=null&&J(oc("R",j.newLine)),(F||j.type!=="add")&&j.oldLine!=null&&J(oc("L",j.oldLine)),H.length===0&&U.length===0)return;const Y=n.length;n.push({key:`c:${c}:${_}`,kind:"comments",file:c,threads:H,drafts:U,indent:O});for(const $ of H)i.set($.id,Y);for(const $ of U)i.set($.id,Y)},R=j=>{n.push({key:`p:${c}:${j.left?.index??"x"}:${j.right?.index??"x"}`,kind:"split-pair",file:c,row:j}),j.left&&S(j.left.line,`l${j.left.index}`,!0,!1),j.right&&S(j.right.line,`r${j.right.index}`,!1,!1)},k=(j,_)=>{n.push({key:`f:${c}:${j}`,kind:"fold",file:c,from:j,to:_})},I=j=>{n.push({key:`k:${c}:${j}`,kind:"hunk",file:c,index:j})},T=()=>{for(const j of sP(u,E))j.kind==="fold"?k(j.from,j.to):j.kind==="hunk"?I(j.index):j.kind==="context"?(n.push({key:`s:${c}:${j.index}`,kind:"split-context",file:c,index:j.index}),S(u[j.index],`s${j.index}`,!1,!1)):R(j)},Q=()=>{for(const j of E){if(j.kind==="fold"){k(j.from,j.to);continue}const _=u[j.index];if(_.type==="hunk-header"){I(j.index);continue}n.push({key:`u:${c}:${j.index}`,kind:"unified",file:c,index:j.index}),S(_,`u${j.index}`,!1,!0)}};t.view==="split"?T():Q(),pP(n,i,c,b.orphans,w.orphans)}return{rows:n,indexById:i,fileIndex:o,stats:a}}const gC={tokens:null,wordRanges:new Map};function AP(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=`${e[n].type}\0${e[n].content}`;return t.join("\0")}const AC=new WeakMap;function yP(e){let t=AC.get(e);return t===void 0&&(t=rk(AP(e)),AC.set(e,t)),t}function SB(e,t,n){return{queryKey:Je.fileAnalysis(e,yP(t),n),queryFn:()=>Vz(e,t,n),staleTime:1/0,retry:!1,structuralSharing:!1}}function vP(e,t,n){return{queryKey:Je.codeTokens(t,n,e),queryFn:()=>Jz(e,t,n),staleTime:1/0,retry:!1,structuralSharing:!1}}function bP(e,t,n,i=!0){const o=x.useMemo(()=>SB(e,t,n),[e,t,n]),{data:a}=Gt({...o,enabled:i&&t.length>0});return i?a??gC:gC}const kB="\0";function xP(e,t){const n=[];for(const i of t)(e.get(i)?.length??0)>0&&n.push(i);return n.sort().join(kB)}function wP(e,t,n){const i=x.useMemo(()=>xP(e,n),[e,n]),{names:o,queries:a}=x.useMemo(()=>{const u=[],h=[],f=i===""?[]:i.split(kB);for(const g of f){const m=e.get(g);!m||m.length===0||(u.push(g),h.push(SB(g,m,t)))}return{names:u,queries:h}},[i,e,t]),c=x.useCallback(u=>{const h=new Map;return u.forEach((f,g)=>{f.data&&h.set(o[g],f.data)}),h},[o]);return PQ({queries:a,combine:c})}function CP(e,t,n){const{data:i}=Gt({...vP(e,t??"",n),enabled:!!t});return t?i??null:null}const BB={tokens:void 0,ranges:void 0};function bg(e,t){return e?{tokens:e.tokens?.[t],ranges:e.wordRanges.get(t)}:BB}function yC(e,t){return t?bg(e,t.index):BB}const EP=wk("inline-flex h-[18px] w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border px-1.5 text-xs font-medium leading-none [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border text-muted-foreground",success:"border-transparent bg-success/15 text-success",warning:"border-transparent bg-warning/15 text-warning",destructive:"border-transparent bg-destructive/15 text-destructive",info:"border-transparent bg-info/15 text-info",count:"border-transparent bg-muted px-1.5 text-muted-foreground tabular-nums"}},defaultVariants:{variant:"default"}});function Ai({className:e,variant:t,...n}){return p.jsx("span",{"data-slot":"badge",className:pe(EP({variant:t}),e),...n})}function wc({className:e,...t}){return p.jsx("textarea",{"data-slot":"textarea",className:pe("flex min-h-14 w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-base text-foreground shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50",e),...t})}const gf=["critical","major","minor","nit"],cy={critical:"destructive",major:"warning",minor:"info",nit:"outline"},IB={critical:"bg-destructive",major:"bg-warning",minor:"bg-info",nit:"bg-muted-foreground/50"},SP={critical:"border-l-destructive",major:"border-l-warning",minor:"border-l-info",nit:"border-l-muted-foreground/40"};function kP(e){return gf.filter(t=>e[t]>0).map(t=>`${e[t]} ${t}`).join(" · ")}function BP(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const IP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QP={};function vC(e,t){return(QP.jsx?RP:IP).test(e)}const TP=/[ \t\n\f\r]/g;function jP(e){return typeof e=="object"?e.type==="text"?bC(e.value):!1:bC(e)}function bC(e){return e.replace(TP,"")===""}class Cc{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Cc.prototype.normal={};Cc.prototype.property={};Cc.prototype.space=void 0;function RB(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Cc(n,i,t)}function xg(e){return e.toLowerCase()}class _n{constructor(t,n){this.attribute=n,this.property=t}}_n.prototype.attribute="";_n.prototype.booleanish=!1;_n.prototype.boolean=!1;_n.prototype.commaOrSpaceSeparated=!1;_n.prototype.commaSeparated=!1;_n.prototype.defined=!1;_n.prototype.mustUseProperty=!1;_n.prototype.number=!1;_n.prototype.overloadedBoolean=!1;_n.prototype.property="";_n.prototype.spaceSeparated=!1;_n.prototype.space=void 0;let DP=0;const je=yo(),Pt=yo(),wg=yo(),he=yo(),pt=yo(),Gs=yo(),Kn=yo();function yo(){return 2**++DP}const Cg=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Pt,commaOrSpaceSeparated:Kn,commaSeparated:Gs,number:he,overloadedBoolean:wg,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),cm=Object.keys(Cg);class uy extends _n{constructor(t,n,i,o){let a=-1;if(super(t,n),xC(this,"space",o),typeof i=="number")for(;++a<cm.length;){const c=cm[a];xC(this,cm[a],(i&Cg[c])===Cg[c])}}}uy.prototype.defined=!0;function xC(e,t,n){n&&(e[t]=n)}function za(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const a=new uy(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,n[xg(i)]=i,n[xg(a.attribute)]=i}return new Cc(t,n,e.space)}const QB=za({properties:{ariaActiveDescendant:null,ariaAtomic:Pt,ariaAutoComplete:null,ariaBusy:Pt,ariaChecked:Pt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Pt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Pt,ariaFlowTo:pt,ariaGrabbed:Pt,ariaHasPopup:null,ariaHidden:Pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:he,ariaLive:null,ariaModal:Pt,ariaMultiLine:Pt,ariaMultiSelectable:Pt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Pt,ariaReadOnly:Pt,ariaRelevant:null,ariaRequired:Pt,ariaRoleDescription:pt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Pt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function TB(e,t){return t in e?e[t]:t}function jB(e,t){return TB(e,t.toLowerCase())}const MP=za({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gs,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:pt,autoFocus:je,autoPlay:je,blocking:pt,capture:null,charSet:null,checked:je,cite:null,className:pt,closedBy:null,colorSpace:null,cols:he,colSpan:he,command:null,commandFor:null,content:null,contentEditable:Pt,controls:je,controlsList:pt,coords:he|Gs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:wg,draggable:Pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:pt,height:he,hidden:wg,high:he,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:pt,itemRef:pt,itemScope:je,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:he,pattern:null,ping:pt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:pt,required:je,reversed:je,rows:he,rowSpan:he,sandbox:pt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Pt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Pt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Gs,part:pt,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:jB}),NP=za({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",maskType:"mask-type",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:Kn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:pt,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Gs,g2:Gs,glyphName:Gs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kn,rev:Kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kn,requiredFeatures:Kn,requiredFonts:Kn,requiredFormats:Kn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:TB}),DB=za({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()}}),MB=za({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jB}),NB=za({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_P={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},OP=/[A-Z]/g,wC=/-[a-z]/g,zP=/^data[-\w.:]+$/i;function LP(e,t){const n=xg(t);let i=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(wC,FP);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!wC.test(a)){let c=a.replace(OP,PP);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=uy}return new o(i,t)}function PP(e){return"-"+e.toLowerCase()}function FP(e){return e.charAt(1).toUpperCase()}const HP=RB([QB,MP,DB,MB,NB],"html"),dy=RB([QB,NP,DB,MB,NB],"svg");function UP(e){return e.join(" ").trim()}var da={},um,CC;function qP(){if(CC)return um;CC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,h=`
|
|
57
|
+
`,f="/",g="*",m="",y="comment",b="declaration";function w(E,S){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];S=S||{};var R=1,k=1;function I(Y){var $=Y.match(t);$&&(R+=$.length);var P=Y.lastIndexOf(h);k=~P?Y.length-P:k+Y.length}function T(){var Y={line:R,column:k};return function($){return $.position=new Q(Y),F(),$}}function Q(Y){this.start=Y,this.end={line:R,column:k},this.source=S.source}Q.prototype.content=E;function j(Y){var $=new Error(S.source+":"+R+":"+k+": "+Y);if($.reason=Y,$.filename=S.source,$.line=R,$.column=k,$.source=E,!S.silent)throw $}function _(Y){var $=Y.exec(E);if($){var P=$[0];return I(P),E=E.slice(P.length),$}}function F(){_(n)}function O(Y){var $;for(Y=Y||[];$=H();)$!==!1&&Y.push($);return Y}function H(){var Y=T();if(!(f!=E.charAt(0)||g!=E.charAt(1))){for(var $=2;m!=E.charAt($)&&(g!=E.charAt($)||f!=E.charAt($+1));)++$;if($+=2,m===E.charAt($-1))return j("End of comment missing");var P=E.slice(2,$-2);return k+=2,I(P),E=E.slice($),k+=2,Y({type:y,comment:P})}}function U(){var Y=T(),$=_(i);if($){if(H(),!_(o))return j("property missing ':'");var P=_(a),V=Y({type:b,property:C($[0].replace(e,m)),value:P?C(P[0].replace(e,m)):m});return _(c),V}}function J(){var Y=[];O(Y);for(var $;$=U();)$!==!1&&(Y.push($),O(Y));return Y}return F(),J()}function C(E){return E?E.replace(u,m):m}return um=w,um}var EC;function GP(){if(EC)return da;EC=1;var e=da&&da.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(da,"__esModule",{value:!0}),da.default=n;const t=e(qP());function n(i,o){let a=null;if(!i||typeof i!="string")return a;const c=(0,t.default)(i),u=typeof o=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:f,value:g}=h;u?o(f,g,h):g&&(a=a||{},a[f]=g)}),a}return da}var _l={},SC;function YP(){if(SC)return _l;SC=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},c=function(f,g){return g.toUpperCase()},u=function(f,g){return"".concat(g,"-")},h=function(f,g){return g===void 0&&(g={}),a(f)?f:(f=f.toLowerCase(),g.reactCompat?f=f.replace(o,u):f=f.replace(i,u),f.replace(t,c))};return _l.camelCase=h,_l}var Ol,kC;function KP(){if(kC)return Ol;kC=1;var e=Ol&&Ol.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(GP()),n=YP();function i(o,a){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(u,h){u&&h&&(c[(0,n.camelCase)(u,a)]=h)}),c}return i.default=i,Ol=i,Ol}var $P=KP();const VP=Ld($P),_B=OB("end"),fy=OB("start");function OB(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function JP(e){const t=fy(e),n=_B(e);if(t&&n)return{start:t,end:n}}function ql(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?BC(e.position):"start"in e||"end"in e?BC(e):"line"in e||"column"in e?Eg(e):""}function Eg(e){return IC(e&&e.line)+":"+IC(e&&e.column)}function BC(e){return Eg(e&&e.start)+"-"+Eg(e&&e.end)}function IC(e){return e&&typeof e=="number"?e:1}class pn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",a={},c=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(c=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?a.ruleId=i:(a.source=i.slice(0,h),a.ruleId=i.slice(h+1))}if(!a.place&&a.ancestors&&a.ancestors){const h=a.ancestors[a.ancestors.length-1];h&&(a.place=h.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ql(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pn.prototype.file="";pn.prototype.name="";pn.prototype.reason="";pn.prototype.message="";pn.prototype.stack="";pn.prototype.column=void 0;pn.prototype.line=void 0;pn.prototype.ancestors=void 0;pn.prototype.cause=void 0;pn.prototype.fatal=void 0;pn.prototype.place=void 0;pn.prototype.ruleId=void 0;pn.prototype.source=void 0;const hy={}.hasOwnProperty,XP=new Map,WP=/[A-Z]/g,ZP=new Set(["table","tbody","thead","tfoot","tr"]),eF=new Set(["td","th"]),zB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tF(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=cF(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=lF(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?dy:HP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=LB(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function LB(e,t,n){if(t.type==="element")return nF(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rF(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return sF(e,t,n);if(t.type==="mdxjsEsm")return iF(e,t);if(t.type==="root")return oF(e,t,n);if(t.type==="text")return aF(e,t)}function nF(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=dy,e.schema=o),e.ancestors.push(t);const a=FB(e,t.tagName,!1),c=uF(e,t);let u=my(e,t);return ZP.has(t.tagName)&&(u=u.filter(function(h){return typeof h=="string"?!jP(h):!0})),PB(e,c,a,t),py(c,u),e.ancestors.pop(),e.schema=i,e.create(t,a,c,n)}function rF(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ac(e,t.position)}function iF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ac(e,t.position)}function sF(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=dy,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:FB(e,t.name,!0),c=dF(e,t),u=my(e,t);return PB(e,c,a,t),py(c,u),e.ancestors.pop(),e.schema=i,e.create(t,a,c,n)}function oF(e,t,n){const i={};return py(i,my(e,t)),e.create(t,e.Fragment,i,n)}function aF(e,t){return t.value}function PB(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function py(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lF(e,t,n){return i;function i(o,a,c,u){const f=Array.isArray(c.children)?n:t;return u?f(a,c,u):f(a,c)}}function cF(e,t){return n;function n(i,o,a,c){const u=Array.isArray(a.children),h=fy(i);return t(o,a,c,u,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function uF(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&hy.call(t.properties,o)){const a=fF(e,o,t.properties[o]);if(a){const[c,u]=a;e.tableCellAlignToStyle&&c==="align"&&typeof u=="string"&&eF.has(t.tagName)?i=u:n[c]=u}}if(i){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function dF(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const c=a.expression;c.type;const u=c.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ac(e,t.position);else{const o=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const u=i.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ac(e,t.position);else a=i.value===null?!0:i.value;n[o]=a}return n}function my(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:XP;for(;++i<t.children.length;){const a=t.children[i];let c;if(e.passKeys){const h=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(h){const f=o.get(h)||0;c=h+"-"+f,o.set(h,f+1)}}const u=LB(e,a,c);u!==void 0&&n.push(u)}return n}function fF(e,t,n){const i=LP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?BP(n):UP(n)),i.property==="style"){let o=typeof n=="object"?n:hF(e,String(n));return e.stylePropertyNameCase==="css"&&(o=pF(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?_P[i.property]||i.property:i.attribute,n]}}function hF(e,t){try{return VP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new pn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=zB+"#cannot-parse-style-attribute",o}}function FB(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,c;for(;++a<o.length;){const u=vC(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};c=c?{type:"MemberExpression",object:c,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}i=c}else i=vC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return hy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);ac(e)}function ac(e,t){const n=new pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zB+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pF(e){const t={};let n;for(n in e)hy.call(e,n)&&(t[mF(n)]=e[n]);return t}function mF(e){let t=e.replace(WP,gF);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gF(e){return"-"+e.toLowerCase()}const dm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},AF={};function gy(e,t){const n=AF,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return HB(e,i,o)}function HB(e,t,n){if(yF(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return RC(e.children,t,n)}return Array.isArray(e)?RC(e,t,n):""}function RC(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=HB(e[o],t,n);return i.join("")}function yF(e){return!!(e&&typeof e=="object")}const QC=document.createElement("i");function Ay(e){const t="&"+e+";";QC.innerHTML=t;const n=QC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jn(e,t,n,i){const o=e.length;let a=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)c=Array.from(i),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);a<i.length;)c=i.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function cr(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const TC={}.hasOwnProperty;function UB(e){const t={};let n=-1;for(;++n<e.length;)vF(t,e[n]);return t}function vF(e,t){let n;for(n in t){const o=(TC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let c;if(a)for(c in a){TC.call(o,c)||(o[c]=[]);const u=a[c];bF(o[c],Array.isArray(u)?u:u?[u]:[])}}}function bF(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Jn(e,0,0,i)}function qB(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function wr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=ms(/[A-Za-z]/),fn=ms(/[\dA-Za-z]/),xF=ms(/[#-'*+\--9=?A-Z^-~]/);function Nd(e){return e!==null&&(e<32||e===127)}const Sg=ms(/\d/),wF=ms(/[\dA-Fa-f]/),CF=ms(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const Af=ms(new RegExp("\\p{P}|\\p{S}","u")),io=ms(/\s/);function ms(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function La(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let c="";if(a===37&&fn(e.charCodeAt(n+1))&&fn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(c=String.fromCharCode(a,u),o=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(i,n),encodeURIComponent(c)),i=n+o+1,c=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Ze(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(h){return qe(h)?(e.enter(n),u(h)):t(h)}function u(h){return qe(h)&&a++<o?(e.consume(h),u):(e.exit(n),t(h))}}const EF={tokenize:SF};function SF(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(u)}function c(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return ke(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),c)}}const kF={tokenize:BF},jC={tokenize:IF};function BF(e){const t=this,n=[];let i=0,o,a,c;return u;function u(k){if(i<n.length){const I=n[i];return t.containerState=I[1],e.attempt(I[0].continuation,h,f)(k)}return f(k)}function h(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&R();const I=t.events.length;let T=I,Q;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){Q=t.events[T][1].end;break}S(i);let j=I;for(;j<t.events.length;)t.events[j][1].end={...Q},j++;return Jn(t.events,T+1,0,t.events.slice(I)),t.events.length=j,f(k)}return u(k)}function f(k){if(i===n.length){if(!o)return y(k);if(o.currentConstruct&&o.currentConstruct.concrete)return w(k);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jC,g,m)(k)}function g(k){return o&&R(),S(i),y(k)}function m(k){return t.parser.lazy[t.now().line]=i!==n.length,c=t.now().offset,w(k)}function y(k){return t.containerState={},e.attempt(jC,b,w)(k)}function b(k){return i++,n.push([t.currentConstruct,t.containerState]),y(k)}function w(k){if(k===null){o&&R(),S(0),e.consume(k);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),C(k)}function C(k){if(k===null){E(e.exit("chunkFlow"),!0),S(0),e.consume(k);return}return ke(k)?(e.consume(k),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,u):(e.consume(k),C)}function E(k,I){const T=t.sliceStream(k);if(I&&T.push(null),k.previous=a,a&&(a.next=k),a=k,o.defineSkip(k.start),o.write(T),t.parser.lazy[k.start.line]){let Q=o.events.length;for(;Q--;)if(o.events[Q][1].start.offset<c&&(!o.events[Q][1].end||o.events[Q][1].end.offset>c))return;const j=t.events.length;let _=j,F,O;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(F){O=t.events[_][1].end;break}F=!0}for(S(i),Q=j;Q<t.events.length;)t.events[Q][1].end={...O},Q++;Jn(t.events,_+1,0,t.events.slice(j)),t.events.length=Q}}function S(k){let I=n.length;for(;I-- >k;){const T=n[I];t.containerState=T[1],T[0].exit.call(t,e)}n.length=k}function R(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function IF(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ba(e){if(e===null||mt(e)||io(e))return 1;if(Af(e))return 2}function yf(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!i.includes(a)&&(t=a(t,n),i.push(a))}return t}const kg={name:"attention",resolveAll:RF,tokenize:QF};function RF(e,t){let n=-1,i,o,a,c,u,h,f,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},y={...e[n][1].start};DC(m,-h),DC(y,h),c={type:h>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},u={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},a={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[i][1].end={...c.start},e[n][1].start={...u.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=cr(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=cr(f,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",a,t]]),f=cr(f,yf(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=cr(f,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,f=cr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,Jn(e,i-1,n-i+3,f),n=i+f.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function QF(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Ba(i);let a;return c;function c(h){return a=h,e.enter("attentionSequence"),u(h)}function u(h){if(h===a)return e.consume(h),u;const f=e.exit("attentionSequence"),g=Ba(h),m=!g||g===2&&o||n.includes(h),y=!o||o===2&&g||n.includes(i);return f._open=!!(a===42?m:m&&(o||!y)),f._close=!!(a===42?y:y&&(g||!m)),t(h)}}function DC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const TF={name:"autolink",tokenize:jF};function jF(e,t,n){let i=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return An(b)?(e.consume(b),c):b===64?n(b):f(b)}function c(b){return b===43||b===45||b===46||fn(b)?(i=1,u(b)):f(b)}function u(b){return b===58?(e.consume(b),i=0,h):(b===43||b===45||b===46||fn(b))&&i++<32?(e.consume(b),u):(i=0,f(b))}function h(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Nd(b)?n(b):(e.consume(b),h)}function f(b){return b===64?(e.consume(b),g):xF(b)?(e.consume(b),f):n(b)}function g(b){return fn(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),i=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||fn(b))&&i++<63){const w=b===45?y:m;return e.consume(b),w}return n(b)}}const Ec={partial:!0,tokenize:DF};function DF(e,t,n){return i;function i(a){return qe(a)?Ze(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ke(a)?t(a):n(a)}}const GB={continuation:{tokenize:NF},exit:_F,name:"blockQuote",tokenize:MF};function MF(e,t,n){const i=this;return o;function o(c){if(c===62){const u=i.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return n(c)}function a(c){return qe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function NF(e,t,n){const i=this;return o;function o(c){return qe(c)?Ze(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(GB,t,n)(c)}}function _F(e){e.exit("blockQuote")}const YB={name:"characterEscape",tokenize:OF};function OF(e,t,n){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return CF(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const KB={name:"characterReference",tokenize:zF};function zF(e,t,n){const i=this;let o=0,a,c;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),h}function h(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,c=fn,g(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=wF,g):(e.enter("characterReferenceValue"),a=7,c=Sg,g(m))}function g(m){if(m===59&&o){const y=e.exit("characterReferenceValue");return c===fn&&!Ay(i.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(m)&&o++<a?(e.consume(m),g):n(m)}}const MC={partial:!0,tokenize:PF},NC={concrete:!0,name:"codeFenced",tokenize:LF};function LF(e,t,n){const i=this,o={partial:!0,tokenize:T};let a=0,c=0,u;return h;function h(Q){return f(Q)}function f(Q){const j=i.events[i.events.length-1];return a=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,u=Q,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(Q)}function g(Q){return Q===u?(c++,e.consume(Q),g):c<3?n(Q):(e.exit("codeFencedFenceSequence"),qe(Q)?Ze(e,m,"whitespace")(Q):m(Q))}function m(Q){return Q===null||ke(Q)?(e.exit("codeFencedFence"),i.interrupt?t(Q):e.check(MC,C,I)(Q)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(Q))}function y(Q){return Q===null||ke(Q)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(Q)):qe(Q)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(Q)):Q===96&&Q===u?n(Q):(e.consume(Q),y)}function b(Q){return Q===null||ke(Q)?m(Q):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(Q))}function w(Q){return Q===null||ke(Q)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(Q)):Q===96&&Q===u?n(Q):(e.consume(Q),w)}function C(Q){return e.attempt(o,I,E)(Q)}function E(Q){return e.enter("lineEnding"),e.consume(Q),e.exit("lineEnding"),S}function S(Q){return a>0&&qe(Q)?Ze(e,R,"linePrefix",a+1)(Q):R(Q)}function R(Q){return Q===null||ke(Q)?e.check(MC,C,I)(Q):(e.enter("codeFlowValue"),k(Q))}function k(Q){return Q===null||ke(Q)?(e.exit("codeFlowValue"),R(Q)):(e.consume(Q),k)}function I(Q){return e.exit("codeFenced"),t(Q)}function T(Q,j,_){let F=0;return O;function O($){return Q.enter("lineEnding"),Q.consume($),Q.exit("lineEnding"),H}function H($){return Q.enter("codeFencedFence"),qe($)?Ze(Q,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):U($)}function U($){return $===u?(Q.enter("codeFencedFenceSequence"),J($)):_($)}function J($){return $===u?(F++,Q.consume($),J):F>=c?(Q.exit("codeFencedFenceSequence"),qe($)?Ze(Q,Y,"whitespace")($):Y($)):_($)}function Y($){return $===null||ke($)?(Q.exit("codeFencedFence"),j($)):_($)}}}function PF(e,t,n){const i=this;return o;function o(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return i.parser.lazy[i.now().line]?n(c):t(c)}}const fm={name:"codeIndented",tokenize:HF},FF={partial:!0,tokenize:UF};function HF(e,t,n){const i=this;return o;function o(f){return e.enter("codeIndented"),Ze(e,a,"linePrefix",5)(f)}function a(f){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(f):n(f)}function c(f){return f===null?h(f):ke(f)?e.attempt(FF,c,h)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||ke(f)?(e.exit("codeFlowValue"),c(f)):(e.consume(f),u)}function h(f){return e.exit("codeIndented"),t(f)}}function UF(e,t,n){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?n(c):ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ze(e,a,"linePrefix",5)(c)}function a(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):ke(c)?o(c):n(c)}}const qF={name:"codeText",previous:YF,resolve:GF,tokenize:KF};function GF(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function YF(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KF(e,t,n){let i=0,o,a;return c;function c(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),i++,u):(e.exit("codeTextSequence"),h(m))}function h(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),h):m===96?(a=e.enter("codeTextSequence"),o=0,g(m)):ke(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||ke(m)?(e.exit("codeTextData"),h(m)):(e.consume(m),f)}function g(m){return m===96?(e.consume(m),o++,g):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class $F{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&zl(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),zl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);zl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zl(this.left,n.reverse())}}}function zl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $B(e){const t={};let n=-1,i,o,a,c,u,h,f;const g=new $F(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(i=g.get(n),n&&i[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,a=0,a<h.length&&h[a][1].type==="lineEndingBlank"&&(a+=2),a<h.length&&h[a][1].type==="content"))for(;++a<h.length&&h[a][1].type!=="content";)h[a][1].type==="chunkText"&&(h[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,VF(g,n)),n=t[n],f=!0);else if(i[1]._container){for(a=n,o=void 0;a--;)if(c=g.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...g.get(o)[1].start},u=g.slice(o,n),u.unshift(i),g.splice(o,n-o+1,u))}}return Jn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!f}function VF(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const a=[];let c=n._tokenizer;c||(c=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const u=c.events,h=[],f={};let g,m,y=-1,b=n,w=0,C=0;const E=[C];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(g=i.sliceStream(b),b.next||g.push(null),m&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(C=y+1,E.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),y=E.length;y--;){const S=u.slice(E[y],E[y+1]),R=a.pop();h.push([R,R+S.length-1]),e.splice(R,2,S)}for(h.reverse(),y=-1;++y<h.length;)f[w+h[y][0]]=w+h[y][1],w+=h[y][1]-h[y][0]-1;return f}const JF={resolve:WF,tokenize:ZF},XF={partial:!0,tokenize:eH};function WF(e){return $B(e),e}function ZF(e,t){let n;return i;function i(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):ke(u)?e.check(XF,c,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function c(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function eH(e,t,n){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(c){if(c===null||ke(c))return n(c);const u=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):e.interrupt(i.parser.constructs.flow,n,t)(c)}}function VB(e,t,n,i,o,a,c,u,h){const f=h||Number.POSITIVE_INFINITY;let g=0;return m;function m(S){return S===60?(e.enter(i),e.enter(o),e.enter(a),e.consume(S),e.exit(a),y):S===null||S===32||S===41||Nd(S)?n(S):(e.enter(i),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),C(S))}function y(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(o),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(u),y(S)):S===null||S===60||ke(S)?n(S):(e.consume(S),S===92?w:b)}function w(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function C(S){return!g&&(S===null||S===41||mt(S))?(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(i),t(S)):g<f&&S===40?(e.consume(S),g++,C):S===41?(e.consume(S),g--,C):S===null||S===32||S===40||Nd(S)?n(S):(e.consume(S),S===92?E:C)}function E(S){return S===40||S===41||S===92?(e.consume(S),C):C(S)}}function JB(e,t,n,i,o,a){const c=this;let u=0,h;return f;function f(b){return e.enter(i),e.enter(o),e.consume(b),e.exit(o),e.enter(a),g}function g(b){return u>999||b===null||b===91||b===93&&!h||b===94&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(i),t):ke(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||ke(b)||u++>999?(e.exit("chunkString"),g(b)):(e.consume(b),h||(h=!qe(b)),b===92?y:m)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,m):m(b)}}function XB(e,t,n,i,o,a){let c;return u;function u(y){return y===34||y===39||y===40?(e.enter(i),e.enter(o),e.consume(y),e.exit(o),c=y===40?41:y,h):n(y)}function h(y){return y===c?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),t):(e.enter(a),f(y))}function f(y){return y===c?(e.exit(a),h(c)):y===null?n(y):ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===c||y===null||ke(y)?(e.exit("chunkString"),f(y)):(e.consume(y),y===92?m:g)}function m(y){return y===c||y===92?(e.consume(y),g):g(y)}}function Gl(e,t){let n;return i;function i(o){return ke(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):qe(o)?Ze(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const tH={name:"definition",tokenize:rH},nH={partial:!0,tokenize:iH};function rH(e,t,n){const i=this;let o;return a;function a(b){return e.enter("definition"),c(b)}function c(b){return JB.call(i,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return o=wr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),h):n(b)}function h(b){return mt(b)?Gl(e,f)(b):f(b)}function f(b){return VB(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(nH,m,m)(b)}function m(b){return qe(b)?Ze(e,y,"whitespace")(b):y(b)}function y(b){return b===null||ke(b)?(e.exit("definition"),i.parser.defined.push(o),t(b)):n(b)}}function iH(e,t,n){return i;function i(u){return mt(u)?Gl(e,o)(u):n(u)}function o(u){return XB(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return qe(u)?Ze(e,c,"whitespace")(u):c(u)}function c(u){return u===null||ke(u)?t(u):n(u)}}const sH={name:"hardBreakEscape",tokenize:oH};function oH(e,t,n){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ke(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const aH={name:"headingAtx",resolve:lH,tokenize:cH};function lH(e,t){let n=e.length-2,i=3,o,a;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},a={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Jn(e,i,n-i+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function cH(e,t,n){let i=0;return o;function o(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&i++<6?(e.consume(g),c):g===null||mt(g)?(e.exit("atxHeadingSequence"),u(g)):n(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||ke(g)?(e.exit("atxHeading"),t(g)):qe(g)?Ze(e,u,"whitespace")(g):(e.enter("atxHeadingText"),f(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),u(g))}function f(g){return g===null||g===35||mt(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),f)}}const uH=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],_C=["pre","script","style","textarea"],dH={concrete:!0,name:"htmlFlow",resolveTo:pH,tokenize:mH},fH={partial:!0,tokenize:AH},hH={partial:!0,tokenize:gH};function pH(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mH(e,t,n){const i=this;let o,a,c,u,h;return f;function f(M){return g(M)}function g(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),m}function m(M){return M===33?(e.consume(M),y):M===47?(e.consume(M),a=!0,C):M===63?(e.consume(M),o=3,i.interrupt?t:D):An(M)?(e.consume(M),c=String.fromCharCode(M),E):n(M)}function y(M){return M===45?(e.consume(M),o=2,b):M===91?(e.consume(M),o=5,u=0,w):An(M)?(e.consume(M),o=4,i.interrupt?t:D):n(M)}function b(M){return M===45?(e.consume(M),i.interrupt?t:D):n(M)}function w(M){const X="CDATA[";return M===X.charCodeAt(u++)?(e.consume(M),u===X.length?i.interrupt?t:U:w):n(M)}function C(M){return An(M)?(e.consume(M),c=String.fromCharCode(M),E):n(M)}function E(M){if(M===null||M===47||M===62||mt(M)){const X=M===47,ee=c.toLowerCase();return!X&&!a&&_C.includes(ee)?(o=1,i.interrupt?t(M):U(M)):uH.includes(c.toLowerCase())?(o=6,X?(e.consume(M),S):i.interrupt?t(M):U(M)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(M):a?R(M):k(M))}return M===45||fn(M)?(e.consume(M),c+=String.fromCharCode(M),E):n(M)}function S(M){return M===62?(e.consume(M),i.interrupt?t:U):n(M)}function R(M){return qe(M)?(e.consume(M),R):O(M)}function k(M){return M===47?(e.consume(M),O):M===58||M===95||An(M)?(e.consume(M),I):qe(M)?(e.consume(M),k):O(M)}function I(M){return M===45||M===46||M===58||M===95||fn(M)?(e.consume(M),I):T(M)}function T(M){return M===61?(e.consume(M),Q):qe(M)?(e.consume(M),T):k(M)}function Q(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),h=M,j):qe(M)?(e.consume(M),Q):_(M)}function j(M){return M===h?(e.consume(M),h=null,F):M===null||ke(M)?n(M):(e.consume(M),j)}function _(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||mt(M)?T(M):(e.consume(M),_)}function F(M){return M===47||M===62||qe(M)?k(M):n(M)}function O(M){return M===62?(e.consume(M),H):n(M)}function H(M){return M===null||ke(M)?U(M):qe(M)?(e.consume(M),H):n(M)}function U(M){return M===45&&o===2?(e.consume(M),P):M===60&&o===1?(e.consume(M),V):M===62&&o===4?(e.consume(M),z):M===63&&o===3?(e.consume(M),D):M===93&&o===5?(e.consume(M),de):ke(M)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(fH,L,J)(M)):M===null||ke(M)?(e.exit("htmlFlowData"),J(M)):(e.consume(M),U)}function J(M){return e.check(hH,Y,L)(M)}function Y(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),$}function $(M){return M===null||ke(M)?J(M):(e.enter("htmlFlowData"),U(M))}function P(M){return M===45?(e.consume(M),D):U(M)}function V(M){return M===47?(e.consume(M),c="",ie):U(M)}function ie(M){if(M===62){const X=c.toLowerCase();return _C.includes(X)?(e.consume(M),z):U(M)}return An(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),ie):U(M)}function de(M){return M===93?(e.consume(M),D):U(M)}function D(M){return M===62?(e.consume(M),z):M===45&&o===2?(e.consume(M),D):U(M)}function z(M){return M===null||ke(M)?(e.exit("htmlFlowData"),L(M)):(e.consume(M),z)}function L(M){return e.exit("htmlFlow"),t(M)}}function gH(e,t,n){const i=this;return o;function o(c){return ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):n(c)}function a(c){return i.parser.lazy[i.now().line]?n(c):t(c)}}function AH(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ec,t,n)}}const yH={name:"htmlText",tokenize:vH};function vH(e,t,n){const i=this;let o,a,c;return u;function u(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),h}function h(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),T):D===63?(e.consume(D),k):An(D)?(e.consume(D),_):n(D)}function f(D){return D===45?(e.consume(D),g):D===91?(e.consume(D),a=0,w):An(D)?(e.consume(D),R):n(D)}function g(D){return D===45?(e.consume(D),b):n(D)}function m(D){return D===null?n(D):D===45?(e.consume(D),y):ke(D)?(c=m,V(D)):(e.consume(D),m)}function y(D){return D===45?(e.consume(D),b):m(D)}function b(D){return D===62?P(D):D===45?y(D):m(D)}function w(D){const z="CDATA[";return D===z.charCodeAt(a++)?(e.consume(D),a===z.length?C:w):n(D)}function C(D){return D===null?n(D):D===93?(e.consume(D),E):ke(D)?(c=C,V(D)):(e.consume(D),C)}function E(D){return D===93?(e.consume(D),S):C(D)}function S(D){return D===62?P(D):D===93?(e.consume(D),S):C(D)}function R(D){return D===null||D===62?P(D):ke(D)?(c=R,V(D)):(e.consume(D),R)}function k(D){return D===null?n(D):D===63?(e.consume(D),I):ke(D)?(c=k,V(D)):(e.consume(D),k)}function I(D){return D===62?P(D):k(D)}function T(D){return An(D)?(e.consume(D),Q):n(D)}function Q(D){return D===45||fn(D)?(e.consume(D),Q):j(D)}function j(D){return ke(D)?(c=j,V(D)):qe(D)?(e.consume(D),j):P(D)}function _(D){return D===45||fn(D)?(e.consume(D),_):D===47||D===62||mt(D)?F(D):n(D)}function F(D){return D===47?(e.consume(D),P):D===58||D===95||An(D)?(e.consume(D),O):ke(D)?(c=F,V(D)):qe(D)?(e.consume(D),F):P(D)}function O(D){return D===45||D===46||D===58||D===95||fn(D)?(e.consume(D),O):H(D)}function H(D){return D===61?(e.consume(D),U):ke(D)?(c=H,V(D)):qe(D)?(e.consume(D),H):F(D)}function U(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),o=D,J):ke(D)?(c=U,V(D)):qe(D)?(e.consume(D),U):(e.consume(D),Y)}function J(D){return D===o?(e.consume(D),o=void 0,$):D===null?n(D):ke(D)?(c=J,V(D)):(e.consume(D),J)}function Y(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||mt(D)?F(D):(e.consume(D),Y)}function $(D){return D===47||D===62||mt(D)?F(D):n(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function V(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),ie}function ie(D){return qe(D)?Ze(e,de,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):de(D)}function de(D){return e.enter("htmlTextData"),c(D)}}const yy={name:"labelEnd",resolveAll:CH,resolveTo:EH,tokenize:SH},bH={tokenize:kH},xH={tokenize:BH},wH={tokenize:IH};function CH(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Jn(e,0,e.length,n),e}function EH(e,t){let n=e.length,i=0,o,a,c,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=n);const h={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[c-2][1].start}};return u=[["enter",h,t],["enter",f,t]],u=cr(u,e.slice(a+1,a+i+3)),u=cr(u,[["enter",g,t]]),u=cr(u,yf(t.parser.constructs.insideSpan.null,e.slice(a+i+4,c-3),t)),u=cr(u,[["exit",g,t],e[c-2],e[c-1],["exit",f,t]]),u=cr(u,e.slice(c+1)),u=cr(u,[["exit",h,t]]),Jn(e,a,e.length,u),e}function SH(e,t,n){const i=this;let o=i.events.length,a,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){a=i.events[o][1];break}return u;function u(y){return a?a._inactive?m(y):(c=i.parser.defined.includes(wr(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):n(y)}function h(y){return y===40?e.attempt(bH,g,c?g:m)(y):y===91?e.attempt(xH,g,c?f:m)(y):c?g(y):m(y)}function f(y){return e.attempt(wH,g,m)(y)}function g(y){return t(y)}function m(y){return a._balanced=!0,n(y)}}function kH(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return mt(m)?Gl(e,a)(m):a(m)}function a(m){return m===41?g(m):VB(e,c,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function c(m){return mt(m)?Gl(e,h)(m):g(m)}function u(m){return n(m)}function h(m){return m===34||m===39||m===40?XB(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function f(m){return mt(m)?Gl(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function BH(e,t,n){const i=this;return o;function o(u){return JB.call(i,e,a,c,"reference","referenceMarker","referenceString")(u)}function a(u){return i.parser.defined.includes(wr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function c(u){return n(u)}}function IH(e,t,n){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const RH={name:"labelStartImage",resolveAll:yy.resolveAll,tokenize:QH};function QH(e,t,n){const i=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),c):n(u)}function c(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):t(u)}}const TH={name:"labelStartLink",resolveAll:yy.resolveAll,tokenize:jH};function jH(e,t,n){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const hm={name:"lineEnding",tokenize:DH};function DH(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const Ad={name:"thematicBreak",tokenize:MH};function MH(e,t,n){let i=0,o;return a;function a(f){return e.enter("thematicBreak"),c(f)}function c(f){return o=f,u(f)}function u(f){return f===o?(e.enter("thematicBreakSequence"),h(f)):i>=3&&(f===null||ke(f))?(e.exit("thematicBreak"),t(f)):n(f)}function h(f){return f===o?(e.consume(f),i++,h):(e.exit("thematicBreakSequence"),qe(f)?Ze(e,u,"whitespace")(f):u(f))}}const Qn={continuation:{tokenize:zH},exit:PH,name:"list",tokenize:OH},NH={partial:!0,tokenize:FH},_H={partial:!0,tokenize:LH};function OH(e,t,n){const i=this,o=i.events[i.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return u;function u(b){const w=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:Sg(b)){if(i.containerState.type||(i.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Ad,n,f)(b):f(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(b)}return n(b)}function h(b){return Sg(b)&&++c<10?(e.consume(b),h):(!i.interrupt||c<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(Ec,i.interrupt?n:g,e.attempt(NH,y,m))}function g(b){return i.containerState.initialBlankLine=!0,a++,y(b)}function m(b){return qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function zH(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ec,o,a);function o(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ze(e,t,"listItemIndent",i.containerState.size+1)(u)}function a(u){return i.containerState.furtherBlankLines||!qe(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(_H,t,c)(u))}function c(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ze(e,e.attempt(Qn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function LH(e,t,n){const i=this;return Ze(e,o,"listItemIndent",i.containerState.size+1);function o(a){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?t(a):n(a)}}function PH(e){e.exit(this.containerState.type)}function FH(e,t,n){const i=this;return Ze(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const c=i.events[i.events.length-1];return!qe(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const OC={name:"setextUnderline",resolveTo:HH,tokenize:UH};function HH(e,t){let n=e.length,i,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",c,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=c,e.push(["exit",c,t]),e}function UH(e,t,n){const i=this;let o;return a;function a(f){let g=i.events.length,m;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){m=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=f,c(f)):n(f)}function c(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===o?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),qe(f)?Ze(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||ke(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const qH={tokenize:GH};function GH(e){const t=this,n=e.attempt(Ec,i,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(JF,o)),"linePrefix")));return n;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YH={resolveAll:ZB()},KH=WB("string"),$H=WB("text");function WB(e){return{resolveAll:ZB(e==="text"?VH:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],a=n.attempt(o,c,u);return c;function c(g){return f(g)?a(g):u(g)}function u(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),h}function h(g){return f(g)?(n.exit("data"),a(g)):(n.consume(g),h)}function f(g){if(g===null)return!0;const m=o[g];let y=-1;if(m)for(;++y<m.length;){const b=m[y];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function ZB(e){return t;function t(n,i){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,i):n}}function VH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let a=o.length,c=-1,u=0,h;for(;a--;){const f=o[a];if(typeof f=="string"){for(c=f.length;f.charCodeAt(c-1)===32;)u++,c--;if(c)break;c=-1}else if(f===-2)h=!0,u++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||h||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:i.start._bufferIndex+c,_index:i.start._index+a,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const JH={42:Qn,43:Qn,45:Qn,48:Qn,49:Qn,50:Qn,51:Qn,52:Qn,53:Qn,54:Qn,55:Qn,56:Qn,57:Qn,62:GB},XH={91:tH},WH={[-2]:fm,[-1]:fm,32:fm},ZH={35:aH,42:Ad,45:[OC,Ad],60:dH,61:OC,95:Ad,96:NC,126:NC},eU={38:KB,92:YB},tU={[-5]:hm,[-4]:hm,[-3]:hm,33:RH,38:KB,42:kg,60:[TF,yH],91:TH,92:[sH,YB],93:yy,95:kg,96:qF},nU={null:[kg,YH]},rU={null:[42,95]},iU={null:[]},sU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rU,contentInitial:XH,disable:iU,document:JH,flow:ZH,flowInitial:WH,insideSpan:nU,string:eU,text:tU},Symbol.toStringTag,{value:"Module"}));function oU(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let c=[],u=[];const h={attempt:j(T),check:j(Q),consume:R,enter:k,exit:I,interrupt:j(Q,{interrupt:!0})},f={code:null,containerState:{},defineSkip:C,events:[],now:w,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:m};let g=t.tokenize.call(f,h);return t.resolveAll&&a.push(t),f;function m(H){return c=cr(c,H),E(),c[c.length-1]!==null?[]:(_(t,0),f.events=yf(a,f.events,f),f.events)}function y(H,U){return lU(b(H),U)}function b(H){return aU(c,H)}function w(){const{_bufferIndex:H,_index:U,line:J,column:Y,offset:$}=i;return{_bufferIndex:H,_index:U,line:J,column:Y,offset:$}}function C(H){o[H.line]=H.column,O()}function E(){let H;for(;i._index<c.length;){const U=c[i._index];if(typeof U=="string")for(H=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===H&&i._bufferIndex<U.length;)S(U.charCodeAt(i._bufferIndex));else S(U)}}function S(H){g=g(H)}function R(H){ke(H)?(i.line++,i.column=1,i.offset+=H===-3?2:1,O()):H!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=H}function k(H,U){const J=U||{};return J.type=H,J.start=w(),f.events.push(["enter",J,f]),u.push(J),J}function I(H){const U=u.pop();return U.end=w(),f.events.push(["exit",U,f]),U}function T(H,U){_(H,U.from)}function Q(H,U){U.restore()}function j(H,U){return J;function J(Y,$,P){let V,ie,de,D;return Array.isArray(Y)?L(Y):"tokenize"in Y?L([Y]):z(Y);function z(ne){return fe;function fe(ae){const ce=ae!==null&&ne[ae],Me=ae!==null&&ne.null,Te=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return L(Te)(ae)}}function L(ne){return V=ne,ie=0,ne.length===0?P:M(ne[ie])}function M(ne){return fe;function fe(ae){return D=F(),de=ne,ne.partial||(f.currentConstruct=ne),ne.name&&f.parser.constructs.disable.null.includes(ne.name)?ee():ne.tokenize.call(U?Object.assign(Object.create(f),U):f,h,X,ee)(ae)}}function X(ne){return H(de,D),$}function ee(ne){return D.restore(),++ie<V.length?M(V[ie]):P}}}function _(H,U){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&Jn(f.events,U,f.events.length-U,H.resolve(f.events.slice(U),f)),H.resolveTo&&(f.events=H.resolveTo(f.events,f))}function F(){const H=w(),U=f.previous,J=f.currentConstruct,Y=f.events.length,$=Array.from(u);return{from:Y,restore:P};function P(){i=H,f.previous=U,f.currentConstruct=J,f.events.length=Y,u=$,O()}}function O(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function aU(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let c;if(n===o)c=[e[n].slice(i,a)];else{if(c=e.slice(n,o),i>-1){const u=c[0];typeof u=="string"?c[0]=u.slice(i):c.shift()}a>0&&c.push(e[o].slice(0,a))}return c}function lU(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const a=e[n];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
|
|
58
|
+
`;break}case-3:{c=`\r
|
|
59
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(a)}o=a===-2,i.push(c)}return i.join("")}function cU(e){const i={constructs:UB([sU,...(e||{}).extensions||[]]),content:o(EF),defined:[],document:o(kF),flow:o(qH),lazy:{},string:o(KH),text:o($H)};return i;function o(a){return c;function c(u){return oU(i,a,u)}}}function uU(e){for(;!$B(e););return e}const zC=/[\0\t\n\r]/g;function dU(){let e=1,t="",n=!0,i;return o;function o(a,c,u){const h=[];let f,g,m,y,b;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(zC.lastIndex=m,f=zC.exec(a),y=f&&f.index!==void 0?f.index:a.length,b=a.charCodeAt(y),!f){t=a.slice(m);break}if(b===10&&m===y&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),m<y&&(h.push(a.slice(m,y)),e+=y-m),b){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}m=y+1}return u&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const fU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hU(e){return e.replace(fU,pU)}function pU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return qB(n.slice(a?2:1),a?16:10)}return Ay(n)||e}const e2={}.hasOwnProperty;function mU(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),gU(n)(uU(cU(n).document().write(dU()(e,t,!0))))}function gU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(sn),autolinkProtocol:F,autolinkEmail:F,atxHeading:a(kt),blockQuote:a(Me),characterEscape:F,characterReference:F,codeFenced:a(Te),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(Te,c),codeText:a(_e,c),codeTextData:F,data:F,codeFlowValue:F,definition:a($e),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(lt),hardBreakEscape:a(On),hardBreakTrailing:a(On),htmlFlow:a(xn,c),htmlFlowData:F,htmlText:a(xn,c),htmlTextData:F,image:a(gr),label:c,link:a(sn),listItem:a(gs),listItemValue:y,listOrdered:a(Si,m),listUnordered:a(Si),paragraph:a(Ft),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(kt),strong:a(vo),thematicBreak:a(Pa)},exit:{atxHeading:h(),atxHeadingSequence:T,autolink:h(),autolinkEmail:ce,autolinkProtocol:ae,blockQuote:h(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:ne,characterReference:fe,codeFenced:h(E),codeFencedFence:C,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:O,codeIndented:h(S),codeText:h($),codeTextData:O,data:O,definition:h(),definitionDestinationString:I,definitionLabelString:R,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(U),hardBreakTrailing:h(U),htmlFlow:h(J),htmlFlowData:O,htmlText:h(Y),htmlTextData:O,image:h(V),label:de,labelText:ie,lineEnding:H,link:h(P),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:X,resourceDestinationString:D,resourceTitleString:z,resource:L,setextHeading:h(_),setextHeadingLineSequence:j,setextHeadingText:Q,strong:h(),thematicBreak:h()}};t2(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(oe){let me={type:"root",children:[]};const Ie={stack:[me],tokenStack:[],config:t,enter:u,exit:f,buffer:c,resume:g,data:n},ze=[];let We=-1;for(;++We<oe.length;)if(oe[We][1].type==="listOrdered"||oe[We][1].type==="listUnordered")if(oe[We][0]==="enter")ze.push(We);else{const Tt=ze.pop();We=o(oe,Tt,We)}for(We=-1;++We<oe.length;){const Tt=t[oe[We][0]];e2.call(Tt,oe[We][1].type)&&Tt[oe[We][1].type].call(Object.assign({sliceSerialize:oe[We][2].sliceSerialize},Ie),oe[We][1])}if(Ie.tokenStack.length>0){const Tt=Ie.tokenStack[Ie.tokenStack.length-1];(Tt[1]||LC).call(Ie,void 0,Tt[0])}for(me.position={start:Zi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Zi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)me=t.transforms[We](me)||me;return me}function o(oe,me,Ie){let ze=me-1,We=-1,Tt=!1,Wn,wt,Bt,on;for(;++ze<=Ie;){const it=oe[ze];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?We++:We--,on=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(Wn&&!on&&!We&&!Bt&&(Bt=ze),on=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:on=void 0}if(!We&&it[0]==="enter"&&it[1].type==="listItemPrefix"||We===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(Wn){let Ar=ze;for(wt=void 0;Ar--;){const Ct=oe[Ar];if(Ct[1].type==="lineEnding"||Ct[1].type==="lineEndingBlank"){if(Ct[0]==="exit")continue;wt&&(oe[wt][1].type="lineEndingBlank",Tt=!0),Ct[1].type="lineEnding",wt=Ar}else if(!(Ct[1].type==="linePrefix"||Ct[1].type==="blockQuotePrefix"||Ct[1].type==="blockQuotePrefixWhitespace"||Ct[1].type==="blockQuoteMarker"||Ct[1].type==="listItemIndent"))break}Bt&&(!wt||Bt<wt)&&(Wn._spread=!0),Wn.end=Object.assign({},wt?oe[wt][1].start:it[1].end),oe.splice(wt||ze,0,["exit",Wn,it[2]]),ze++,Ie++}if(it[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};Wn=Ar,oe.splice(ze,0,["enter",Ar,it[2]]),ze++,Ie++,Bt=void 0,on=!0}}}return oe[me][1]._spread=Tt,Ie}function a(oe,me){return Ie;function Ie(ze){u.call(this,oe(ze),ze),me&&me.call(this,ze)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(oe,me,Ie){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([me,Ie||void 0]),oe.position={start:Zi(me.start),end:void 0}}function h(oe){return me;function me(Ie){oe&&oe.call(this,Ie),f.call(this,Ie)}}function f(oe,me){const Ie=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==oe.type&&(me?me.call(this,oe,ze[0]):(ze[1]||LC).call(this,oe,ze[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ql({start:oe.start,end:oe.end})+"): it’s not open");Ie.position.end=Zi(oe.end)}function g(){return gy(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(oe){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function b(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.lang=oe}function w(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.meta=oe}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.value=oe.replace(/(\r?\n|\r)$/g,"")}function R(oe){const me=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=me,Ie.identifier=wr(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.title=oe}function I(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.url=oe}function T(oe){const me=this.stack[this.stack.length-1];if(!me.depth){const Ie=this.sliceSerialize(oe).length;me.depth=Ie}}function Q(){this.data.setextHeadingSlurpLineEnding=!0}function j(oe){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function F(oe){const Ie=this.stack[this.stack.length-1].children;let ze=Ie[Ie.length-1];(!ze||ze.type!=="text")&&(ze=xt(),ze.position={start:Zi(oe.start),end:void 0},Ie.push(ze)),this.stack.push(ze)}function O(oe){const me=this.stack.pop();me.value+=this.sliceSerialize(oe),me.position.end=Zi(oe.end)}function H(oe){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=me.children[me.children.length-1];Ie.position.end=Zi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(F.call(this,oe),O.call(this,oe))}function U(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.value=oe}function Y(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.value=oe}function $(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.value=oe}function P(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=me,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function V(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=me,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ie(oe){const me=this.sliceSerialize(oe),Ie=this.stack[this.stack.length-2];Ie.label=hU(me),Ie.identifier=wr(me).toLowerCase()}function de(){const oe=this.stack[this.stack.length-1],me=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const ze=oe.children;Ie.children=ze}else Ie.alt=me}function D(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.url=oe}function z(){const oe=this.resume(),me=this.stack[this.stack.length-1];me.title=oe}function L(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function X(oe){const me=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=me,Ie.identifier=wr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ee(oe){this.data.characterReferenceType=oe.type}function ne(oe){const me=this.sliceSerialize(oe),Ie=this.data.characterReferenceType;let ze;Ie?(ze=qB(me,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Ay(me);const We=this.stack[this.stack.length-1];We.value+=ze}function fe(oe){const me=this.stack.pop();me.position.end=Zi(oe.end)}function ae(oe){O.call(this,oe);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(oe)}function ce(oe){O.call(this,oe);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(oe)}function Me(){return{type:"blockquote",children:[]}}function Te(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lt(){return{type:"emphasis",children:[]}}function kt(){return{type:"heading",depth:0,children:[]}}function On(){return{type:"break"}}function xn(){return{type:"html",value:""}}function gr(){return{type:"image",title:null,url:"",alt:null}}function sn(){return{type:"link",title:null,url:"",children:[]}}function Si(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function gs(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function vo(){return{type:"strong",children:[]}}function xt(){return{type:"text",value:""}}function Pa(){return{type:"thematicBreak"}}}function Zi(e){return{line:e.line,column:e.column,offset:e.offset}}function t2(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?t2(e,i):AU(e,i)}}function AU(e,t){let n;for(n in t)if(e2.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function LC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ql({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is still open")}function yU(e){const t=this;t.parser=n;function n(i){return mU(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function vU(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
60
|
+
`}]}function xU(e,t){const n=t.value?t.value+`
|
|
61
|
+
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function wU(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CU(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EU(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=La(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let c,u=e.footnoteCounts.get(i);u===void 0?(u=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=a+1,u+=1,e.footnoteCounts.set(i,u);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function SU(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kU(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function n2(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=i:o.push({type:"text",value:i}),o}function BU(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n2(e,t);const o={src:La(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function IU(e,t){const n={src:La(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function RU(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function QU(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n2(e,t);const o={href:La(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function TU(e,t){const n={href:La(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function jU(e,t,n){const i=e.all(t),o=n?DU(n):r2(t),a={},c=[];if(typeof t.checked=="boolean"){const g=i[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<i.length;){const g=i[u];(o||u!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
62
|
+
`}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const h=i[i.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
63
|
+
`});const f={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,f),e.applyData(t,f)}function DU(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=r2(n[i])}return t}function r2(e){const t=e.spread;return t??e.children.length>1}function MU(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const c=i[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function NU(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _U(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function OU(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zU(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],c),o.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=fy(t.children[1]),h=_B(t.children[t.children.length-1]);u&&h&&(c.position={start:u,end:h}),o.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function LU(e,t,n){const i=n?n.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,u=c?c.length:t.children.length;let h=-1;const f=[];for(;++h<u;){const m=t.children[h],y={},b=c?c[h]:void 0;b&&(y.align=b);let w={type:"element",tagName:a,properties:y,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,g),e.applyData(t,g)}function PU(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PC=9,FC=32;function FU(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const a=[];for(;i;)a.push(HC(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return a.push(HC(t.slice(o),o>0,!1)),a.join("")}function HC(e,t,n){let i=0,o=e.length;if(t){let a=e.codePointAt(i);for(;a===PC||a===FC;)i++,a=e.codePointAt(i)}if(n){let a=e.codePointAt(o-1);for(;a===PC||a===FC;)o--,a=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function HU(e,t){const n={type:"text",value:FU(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function UU(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const qU={blockquote:vU,break:bU,code:xU,delete:wU,emphasis:CU,footnoteReference:EU,heading:SU,html:kU,imageReference:BU,image:IU,inlineCode:RU,linkReference:QU,link:TU,listItem:jU,list:MU,paragraph:NU,root:_U,strong:OU,table:zU,tableCell:PU,tableRow:LU,text:HU,thematicBreak:UU,toml:id,yaml:id,definition:id,footnoteDefinition:id};function id(){}const i2=-1,vf=0,Yl=1,_d=2,vy=3,by=4,xy=5,wy=6,s2=7,o2=8,UC=typeof self=="object"?self:globalThis,GU=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),i=o=>{if(e.has(o))return e.get(o);const[a,c]=t[o];switch(a){case vf:case i2:return n(c,o);case Yl:{const u=n([],o);for(const h of c)u.push(i(h));return u}case _d:{const u=n({},o);for(const[h,f]of c)u[i(h)]=i(f);return u}case vy:return n(new Date(c),o);case by:{const{source:u,flags:h}=c;return n(new RegExp(u,h),o)}case xy:{const u=n(new Map,o);for(const[h,f]of c)u.set(i(h),i(f));return u}case wy:{const u=n(new Set,o);for(const h of c)u.add(i(h));return u}case s2:{const{name:u,message:h}=c;return n(new UC[u](h),o)}case o2:return n(BigInt(c),o);case"BigInt":return n(Object(BigInt(c)),o);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:u}=new Uint8Array(c);return n(new DataView(u),c)}}return n(new UC[a](c),o)};return i},qC=e=>GU(new Map,e)(0),fa="",{toString:YU}={},{keys:KU}=Object,Ll=e=>{const t=typeof e;if(t!=="object"||!e)return[vf,t];const n=YU.call(e).slice(8,-1);switch(n){case"Array":return[Yl,fa];case"Object":return[_d,fa];case"Date":return[vy,fa];case"RegExp":return[by,fa];case"Map":return[xy,fa];case"Set":return[wy,fa];case"DataView":return[Yl,n]}return n.includes("Array")?[Yl,n]:n.includes("Error")?[s2,n]:[_d,n]},sd=([e,t])=>e===vf&&(t==="function"||t==="symbol"),$U=(e,t,n,i)=>{const o=(c,u)=>{const h=i.push(c)-1;return n.set(u,h),h},a=c=>{if(n.has(c))return n.get(c);let[u,h]=Ll(c);switch(u){case vf:{let g=c;switch(h){case"bigint":u=o2,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return o([i2],c)}return o([u,g],c)}case Yl:{if(h){let y=c;return h==="DataView"?y=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(c)),o([h,[...y]],c)}const g=[],m=o([u,g],c);for(const y of c)g.push(a(y));return m}case _d:{if(h)switch(h){case"BigInt":return o([h,c.toString()],c);case"Boolean":case"Number":case"String":return o([h,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const g=[],m=o([u,g],c);for(const y of KU(c))(e||!sd(Ll(c[y])))&&g.push([a(y),a(c[y])]);return m}case vy:return o([u,c.toISOString()],c);case by:{const{source:g,flags:m}=c;return o([u,{source:g,flags:m}],c)}case xy:{const g=[],m=o([u,g],c);for(const[y,b]of c)(e||!(sd(Ll(y))||sd(Ll(b))))&&g.push([a(y),a(b)]);return m}case wy:{const g=[],m=o([u,g],c);for(const y of c)(e||!sd(Ll(y)))&&g.push(a(y));return m}}const{message:f}=c;return o([u,{name:h,message:f}],c)};return a},GC=(e,{json:t,lossy:n}={})=>{const i=[];return $U(!(t||n),!!t,new Map,i)(e),i},Od=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?qC(GC(e,t)):structuredClone(e):(e,t)=>qC(GC(e,t));function VU(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function JU(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XU(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VU,i=e.options.footnoteBackLabel||JU,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const g=e.all(f),m=String(f.identifier).toUpperCase(),y=La(m.toLowerCase());let b=0;const w=[],C=e.footnoteCounts.get(m);for(;C!==void 0&&++b<=C;){w.length>0&&w.push({type:"text",value:" "});let R=typeof n=="string"?n:n(h,b);typeof R=="string"&&(R={type:"text",value:R}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const R=E.children[E.children.length-1];R&&R.type==="text"?R.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...w)}else g.push(...w);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(g,!0)};e.patch(f,S),u.push(S)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Od(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
64
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
65
|
+
`}]}}const bf=(function(e){if(e==null)return t9;if(typeof e=="function")return xf(e);if(typeof e=="object")return Array.isArray(e)?WU(e):ZU(e);if(typeof e=="string")return e9(e);throw new Error("Expected function, string, or object as test")});function WU(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bf(e[n]);return xf(i);function i(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function ZU(e){const t=e;return xf(n);function n(i){const o=i;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function e9(e){return xf(t);function t(n){return n&&n.type===e}}function xf(e){return t;function t(n,i,o){return!!(n9(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function t9(){return!0}function n9(e){return e!==null&&typeof e=="object"&&"type"in e}const a2=[],r9=!0,Bg=!1,i9="skip";function l2(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const a=bf(o),c=i?-1:1;u(e,void 0,[])();function u(h,f,g){const m=h&&typeof h=="object"?h:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=a2,w,C,E;if((!t||a(h,f,g[g.length-1]||void 0))&&(b=s9(n(h,g)),b[0]===Bg))return b;if("children"in h&&h.children){const S=h;if(S.children&&b[0]!==i9)for(C=(i?S.children.length:-1)+c,E=g.concat(S);C>-1&&C<S.children.length;){const R=S.children[C];if(w=u(R,C,E)(),w[0]===Bg)return w;C=typeof w[1]=="number"?w[1]:C+c}}return b}}}function s9(e){return Array.isArray(e)?e:typeof e=="number"?[r9,e]:e==null?a2:[e]}function Cy(e,t,n,i){let o,a,c;typeof t=="function"&&typeof n!="function"?(a=void 0,c=t,o=n):(a=t,c=n,o=i),l2(e,a,u,o);function u(h,f){const g=f[f.length-1],m=g?g.children.indexOf(h):void 0;return c(h,m,g)}}const Ig={}.hasOwnProperty,o9={};function a9(e,t){const n=t||o9,i=new Map,o=new Map,a=new Map,c={...qU,...n.handlers},u={all:f,applyData:c9,definitionById:i,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:c,one:h,options:n,patch:l9,wrap:d9};return Cy(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?i:o,y=String(g.identifier).toUpperCase();m.has(y)||m.set(y,g)}}),u;function h(g,m){const y=g.type,b=u.handlers[y];if(Ig.call(u.handlers,y)&&b)return b(u,g,m);if(u.options.passThrough&&u.options.passThrough.includes(y)){if("children"in g){const{children:C,...E}=g,S=Od(E);return S.children=u.all(g),S}return Od(g)}return(u.options.unknownHandler||u9)(u,g,m)}function f(g){const m=[];if("children"in g){const y=g.children;let b=-1;for(;++b<y.length;){const w=u.one(y[b],g);if(w){if(b&&y[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=YC(w.value)),!Array.isArray(w)&&w.type==="element")){const C=w.children[0];C&&C.type==="text"&&(C.value=YC(C.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function l9(e,t){e.position&&(t.position=JP(e))}function c9(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const c="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:c}}n.type==="element"&&a&&Object.assign(n.properties,Od(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function u9(e,t){const n=t.data||{},i="value"in t&&!(Ig.call(n,"hProperties")||Ig.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function d9(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
66
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
67
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
68
|
+
`}),n}function YC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KC(e,t){const n=a9(e,t),i=n.one(e,void 0),o=XU(n),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
69
|
+
`},o),a}function f9(e,t){return e&&"run"in e?async function(n,i){const o=KC(n,{file:i,...t});await e.run(o,i)}:function(n,i){return KC(n,{file:i,...e||t})}}function $C(e){if(e)throw e}var pm,VC;function h9(){if(VC)return pm;VC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var g=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!g&&!m)return!1;var y;for(y in f);return typeof y>"u"||e.call(f,y)},c=function(f,g){n&&g.name==="__proto__"?n(f,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):f[g.name]=g.newValue},u=function(f,g){if(g==="__proto__")if(e.call(f,g)){if(i)return i(f,g).value}else return;return f[g]};return pm=function h(){var f,g,m,y,b,w,C=arguments[0],E=1,S=arguments.length,R=!1;for(typeof C=="boolean"&&(R=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<S;++E)if(f=arguments[E],f!=null)for(g in f)m=u(C,g),y=u(f,g),C!==y&&(R&&y&&(a(y)||(b=o(y)))?(b?(b=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},c(C,{name:g,newValue:h(R,w,y)})):typeof y<"u"&&c(C,{name:g,newValue:y}));return C},pm}var p9=h9();const mm=Ld(p9);function Rg(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function m9(){const e=[],t={run:n,use:i};return t;function n(...o){let a=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);u(null,...o);function u(h,...f){const g=e[++a];let m=-1;if(h){c(h);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,g?g9(g,u)(...f):c(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function g9(e,t){let n;return i;function i(...c){const u=e.length>c.length;let h;u&&c.push(o);try{h=e.apply(this,c)}catch(f){const g=f;if(u&&n)throw g;return o(g)}u||(h&&h.then&&typeof h.then=="function"?h.then(a,o):h instanceof Error?o(h):a(h))}function o(c,...u){n||(n=!0,t(c,...u))}function a(c){o(null,c)}}const Tr={basename:A9,dirname:y9,extname:v9,join:b9,sep:"/"};function A9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Sc(e);let n=0,i=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let c=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else c<0&&(a=!0,c=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(i=o):(u=-1,i=c));return n===i?i=c:i<0&&(i=e.length),e.slice(n,i)}function y9(e){if(Sc(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function v9(e){Sc(e);let t=e.length,n=-1,i=0,o=-1,a=0,c;for(;t--;){const u=e.codePointAt(t);if(u===47){if(c){i=t+1;break}continue}n<0&&(c=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function b9(...e){let t=-1,n;for(;++t<e.length;)Sc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":x9(n)}function x9(e){Sc(e);const t=e.codePointAt(0)===47;let n=w9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function w9(e,t){let n="",i=0,o=-1,a=0,c=-1,u,h;for(;++c<=e.length;){if(c<e.length)u=e.codePointAt(c);else{if(u===47)break;u=47}if(u===47){if(!(o===c-1||a===1))if(o!==c-1&&a===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),o=c,a=0;continue}}else if(n.length>0){n="",i=0,o=c,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,c):n=e.slice(o+1,c),i=c-o-1;o=c,a=0}else u===46&&a>-1?a++:a=-1}return n}function Sc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const C9={cwd:E9};function E9(){return"/"}function Qg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function S9(e){if(typeof e=="string")e=new URL(e);else if(!Qg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return k9(e)}function k9(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const gm=["history","path","basename","stem","extname","dirname"];class c2{constructor(t){let n;t?Qg(t)?n={path:t}:typeof t=="string"||B9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":C9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<gm.length;){const a=gm[i];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)gm.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Tr.basename(this.path):void 0}set basename(t){ym(t,"basename"),Am(t,"basename"),this.path=Tr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Tr.dirname(this.path):void 0}set dirname(t){JC(this.basename,"dirname"),this.path=Tr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Tr.extname(this.path):void 0}set extname(t){if(Am(t,"extname"),JC(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Tr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qg(t)&&(t=S9(t)),ym(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Tr.basename(this.path,this.extname):void 0}set stem(t){ym(t,"stem"),Am(t,"stem"),this.path=Tr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new pn(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Am(e,t){if(e&&e.includes(Tr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Tr.sep+"`")}function ym(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function B9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const I9=(function(e){const i=this.constructor.prototype,o=i[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,i),a}),R9={}.hasOwnProperty;class Ey extends I9{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=m9()}copy(){const t=new Ey;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(mm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xm("data",this.frozen),this.namespace[t]=n,this):R9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=od(t),i=this.parser||this.Parser;return vm("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),vm("process",this.parser||this.Parser),bm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,c){const u=od(t),h=i.parse(u);i.run(h,u,function(g,m,y){if(g||!m||!y)return f(g);const b=m,w=i.stringify(b,y);j9(w)?y.value=w:y.result=w,f(g,y)});function f(g,m){g||!m?c(g):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),vm("processSync",this.parser||this.Parser),bm("processSync",this.compiler||this.Compiler),this.process(t,o),WC("processSync","process",n),i;function o(a,c){n=!0,$C(a),i=c}}run(t,n,i){XC(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?a(void 0,i):new Promise(a);function a(c,u){const h=od(n);o.run(t,h,f);function f(g,m,y){const b=m||t;g?u(g):c?c(b):i(void 0,b,y)}}}runSync(t,n){let i=!1,o;return this.run(t,n,a),WC("runSync","run",i),o;function a(c,u){$C(c),o=u,i=!0}}stringify(t,n){this.freeze();const i=od(n),o=this.compiler||this.Compiler;return bm("stringify",o),XC(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(xm("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[g,...m]=f;h(g,m)}else c(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function c(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(o.settings=mm(!0,o.settings,f.settings))}function u(f){let g=-1;if(f!=null)if(Array.isArray(f))for(;++g<f.length;){const m=f[g];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,g){let m=-1,y=-1;for(;++m<i.length;)if(i[m][0]===f){y=m;break}if(y===-1)i.push([f,...g]);else if(g.length>0){let[b,...w]=g;const C=i[y][1];Rg(C)&&Rg(b)&&(b=mm(!0,C,b)),i[y]=[f,b,...w]}}}}const Q9=new Ey().freeze();function vm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XC(e){if(!Rg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function WC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function od(e){return T9(e)?e:new c2(e)}function T9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function j9(e){return typeof e=="string"||D9(e)}function D9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const M9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZC=[],e1={allowDangerousHtml:!0},N9=/^(https?|ircs?|mailto|xmpp)$/i,_9=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function O9(e){const t=z9(e),n=L9(e);return P9(t.runSync(t.parse(n),n),e)}function z9(e){const t=e.rehypePlugins||ZC,n=e.remarkPlugins||ZC,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...e1}:e1;return Q9().use(yU).use(n).use(f9,i).use(t)}function L9(e){const t=e.children||"",n=new c2;return typeof t=="string"&&(n.value=t),n}function P9(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,a=t.disallowedElements,c=t.skipHtml,u=t.unwrapDisallowed,h=t.urlTransform||F9;for(const g of _9)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+M9+g.id,void 0);return Cy(e,f),tF(e,{Fragment:p.Fragment,components:o,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function f(g,m,y){if(g.type==="raw"&&y&&typeof m=="number")return c?y.children.splice(m,1):y.children[m]={type:"text",value:g.value},m;if(g.type==="element"){let b;for(b in dm)if(Object.hasOwn(dm,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],C=dm[b];(C===null||C.includes(g.tagName))&&(g.properties[b]=h(String(w||""),b,g))}}if(g.type==="element"){let b=n?!n.includes(g.tagName):a?a.includes(g.tagName):!1;if(!b&&i&&typeof m=="number"&&(b=!i(g,m,y)),b&&y&&typeof m=="number")return u&&g.children?y.children.splice(m,1,...g.children):y.children.splice(m,1),m}}}function F9(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||N9.test(e.slice(0,t))?e:""}function t1(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}function H9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function U9(e,t,n){const o=bf((n||{}).ignore||[]),a=q9(t);let c=-1;for(;++c<a.length;)l2(e,"text",u);function u(f,g){let m=-1,y;for(;++m<g.length;){const b=g[m],w=y?y.children:void 0;if(o(b,w?w.indexOf(b):void 0,y))return;y=b}if(y)return h(f,g)}function h(f,g){const m=g[g.length-1],y=a[c][0],b=a[c][1];let w=0;const E=m.children.indexOf(f);let S=!1,R=[];y.lastIndex=0;let k=y.exec(f.value);for(;k;){const I=k.index,T={index:k.index,input:k.input,stack:[...g,f]};let Q=b(...k,T);if(typeof Q=="string"&&(Q=Q.length>0?{type:"text",value:Q}:void 0),Q===!1?y.lastIndex=I+1:(w!==I&&R.push({type:"text",value:f.value.slice(w,I)}),Array.isArray(Q)?R.push(...Q):Q&&R.push(Q),w=I+k[0].length,S=!0),!y.global)break;k=y.exec(f.value)}return S?(w<f.value.length&&R.push({type:"text",value:f.value.slice(w)}),m.children.splice(E,1,...R)):R=[f],E+R.length}}function q9(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const o=n[i];t.push([G9(o[0]),Y9(o[1])])}return t}function G9(e){return typeof e=="string"?new RegExp(H9(e),"g"):e}function Y9(e){return typeof e=="function"?e:function(){return e}}const wm="phrasing",Cm=["autolink","link","image","label"];function K9(){return{transforms:[e7],enter:{literalAutolink:V9,literalAutolinkEmail:Em,literalAutolinkHttp:Em,literalAutolinkWww:Em},exit:{literalAutolink:Z9,literalAutolinkEmail:W9,literalAutolinkHttp:J9,literalAutolinkWww:X9}}}function $9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wm,notInConstruct:Cm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wm,notInConstruct:Cm},{character:":",before:"[ps]",after:"\\/",inConstruct:wm,notInConstruct:Cm}]}}function V9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Em(e){this.config.enter.autolinkProtocol.call(this,e)}function J9(e){this.config.exit.autolinkProtocol.call(this,e)}function X9(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function W9(e){this.config.exit.autolinkEmail.call(this,e)}function Z9(e){this.exit(e)}function e7(e){U9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,t7],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),n7]],{ignore:["link","linkReference"]})}function t7(e,t,n,i,o){let a="";if(!u2(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!r7(n)))return!1;const c=i7(n+i);if(!c[0])return!1;const u={type:"link",title:null,url:a+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function n7(e,t,n,i){return!u2(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function r7(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function i7(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const o=t1(e,"(");let a=t1(e,")");for(;i!==-1&&o>a;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),a++;return[e,n]}function u2(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||io(n)||Af(n))&&(!t||n!==47)}d2.peek=h7;function s7(){this.buffer()}function o7(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function a7(){this.buffer()}function l7(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function c7(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function u7(e){this.exit(e)}function d7(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function f7(e){this.exit(e)}function h7(){return"["}function d2(e,t,n,i){const o=n.createTracker(i);let a=o.move("[^");const c=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),c(),a+=o.move("]"),a}function p7(){return{enter:{gfmFootnoteCallString:s7,gfmFootnoteCall:o7,gfmFootnoteDefinitionLabelString:a7,gfmFootnoteDefinition:l7},exit:{gfmFootnoteCallString:c7,gfmFootnoteCall:u7,gfmFootnoteDefinitionLabelString:d7,gfmFootnoteDefinition:f7}}}function m7(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:d2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,a,c){const u=a.createTracker(c);let h=u.move("[^");const f=a.enter("footnoteDefinition"),g=a.enter("label");return h+=u.move(a.safe(a.associationId(i),{before:h,after:"]"})),g(),h+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),h+=u.move((t?`
|
|
70
|
+
`:" ")+a.indentLines(a.containerFlow(i,u.current()),t?f2:g7))),f(),h}}function g7(e,t,n){return t===0?e:f2(e,t,n)}function f2(e,t,n){return(n?"":" ")+e}const A7=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];h2.peek=w7;function y7(){return{canContainEols:["delete"],enter:{strikethrough:b7},exit:{strikethrough:x7}}}function v7(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:A7}],handlers:{delete:h2}}}function b7(e){this.enter({type:"delete",children:[]},e)}function x7(e){this.exit(e)}function h2(e,t,n,i){const o=n.createTracker(i),a=n.enter("strikethrough");let c=o.move("~~");return c+=n.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),a(),c}function w7(){return"~"}function C7(e){return e.length}function E7(e,t){const n=t||{},i=(n.align||[]).concat(),o=n.stringLength||C7,a=[],c=[],u=[],h=[];let f=0,g=-1;for(;++g<e.length;){const C=[],E=[];let S=-1;for(e[g].length>f&&(f=e[g].length);++S<e[g].length;){const R=S7(e[g][S]);if(n.alignDelimiters!==!1){const k=o(R);E[S]=k,(h[S]===void 0||k>h[S])&&(h[S]=k)}C.push(R)}c[g]=C,u[g]=E}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<f;)a[m]=n1(i[m]);else{const C=n1(i);for(;++m<f;)a[m]=C}m=-1;const y=[],b=[];for(;++m<f;){const C=a[m];let E="",S="";C===99?(E=":",S=":"):C===108?E=":":C===114&&(S=":");let R=n.alignDelimiters===!1?1:Math.max(1,h[m]-E.length-S.length);const k=E+"-".repeat(R)+S;n.alignDelimiters!==!1&&(R=E.length+R+S.length,R>h[m]&&(h[m]=R),b[m]=R),y[m]=k}c.splice(1,0,y),u.splice(1,0,b),g=-1;const w=[];for(;++g<c.length;){const C=c[g],E=u[g];m=-1;const S=[];for(;++m<f;){const R=C[m]||"";let k="",I="";if(n.alignDelimiters!==!1){const T=h[m]-(E[m]||0),Q=a[m];Q===114?k=" ".repeat(T):Q===99?T%2?(k=" ".repeat(T/2+.5),I=" ".repeat(T/2-.5)):(k=" ".repeat(T/2),I=k):I=" ".repeat(T)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(k),S.push(R),n.alignDelimiters!==!1&&S.push(I),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}w.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return w.join(`
|
|
71
|
+
`)}function S7(e){return e==null?"":String(e)}function n1(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function k7(e,t,n,i){const o=n.enter("blockquote"),a=n.createTracker(i);a.move("> "),a.shift(2);const c=n.indentLines(n.containerFlow(e,a.current()),B7);return o(),c}function B7(e,t,n){return">"+(n?"":" ")+e}function I7(e,t){return r1(e,t.inConstruct,!0)&&!r1(e,t.notInConstruct,!1)}function r1(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function i1(e,t,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
72
|
+
`&&I7(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
73
|
+
`}function R7(e,t){const n=String(e);let i=n.indexOf(t),o=i,a=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++a>c&&(c=a):a=1,o=i+t.length,i=n.indexOf(t,o);return c}function Q7(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function T7(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function j7(e,t,n,i){const o=T7(n),a=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(Q7(e,n)){const m=n.enter("codeIndented"),y=n.indentLines(a,D7);return m(),y}const u=n.createTracker(i),h=o.repeat(Math.max(R7(a,o)+1,3)),f=n.enter("codeFenced");let g=u.move(h);if(e.lang){const m=n.enter(`codeFencedLang${c}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${c}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
|
|
74
|
+
`,encode:["`"],...u.current()})),m()}return g+=u.move(`
|
|
75
|
+
`),a&&(g+=u.move(a+`
|
|
76
|
+
`)),g+=u.move(h),f(),g}function D7(e,t,n){return(n?"":" ")+e}function Sy(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function M7(e,t,n,i){const o=Sy(n),a=o==='"'?"Quote":"Apostrophe",c=n.enter("definition");let u=n.enter("label");const h=n.createTracker(i);let f=h.move("[");return f+=h.move(n.safe(n.associationId(e),{before:f,after:"]",...h.current()})),f+=h.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(u=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
77
|
+
`,...h.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=h.move(" "+o),f+=h.move(n.safe(e.title,{before:f,after:o,...h.current()})),f+=h.move(o),u()),c(),f}function N7(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function lc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zd(e,t,n){const i=Ba(e),o=Ba(t);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}p2.peek=_7;function p2(e,t,n,i){const o=N7(n),a=n.enter("emphasis"),c=n.createTracker(i),u=c.move(o);let h=c.move(n.containerPhrasing(e,{after:o,before:u,...c.current()}));const f=h.charCodeAt(0),g=zd(i.before.charCodeAt(i.before.length-1),f,o);g.inside&&(h=lc(f)+h.slice(1));const m=h.charCodeAt(h.length-1),y=zd(i.after.charCodeAt(0),m,o);y.inside&&(h=h.slice(0,-1)+lc(m));const b=c.move(o);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+h+b}function _7(e,t,n){return n.options.emphasis||"*"}function O7(e,t){let n=!1;return Cy(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Bg}),!!((!e.depth||e.depth<3)&&gy(e)&&(t.options.setext||n))}function z7(e,t,n,i){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(i);if(O7(e,n)){const g=n.enter("headingSetext"),m=n.enter("phrasing"),y=n.containerPhrasing(e,{...a.current(),before:`
|
|
78
|
+
`,after:`
|
|
79
|
+
`});return m(),g(),y+`
|
|
80
|
+
`+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
81
|
+
`))+1))}const c="#".repeat(o),u=n.enter("headingAtx"),h=n.enter("phrasing");a.move(c+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
82
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=lc(f.charCodeAt(0))+f.slice(1)),f=f?c+" "+f:c,n.options.closeAtx&&(f+=" "+c),h(),u(),f}m2.peek=L7;function m2(e){return e.value||""}function L7(){return"<"}g2.peek=P7;function g2(e,t,n,i){const o=Sy(n),a=o==='"'?"Quote":"Apostrophe",c=n.enter("image");let u=n.enter("label");const h=n.createTracker(i);let f=h.move("![");return f+=h.move(n.safe(e.alt,{before:f,after:"]",...h.current()})),f+=h.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=h.move("<"),f+=h.move(n.safe(e.url,{before:f,after:">",...h.current()})),f+=h.move(">")):(u=n.enter("destinationRaw"),f+=h.move(n.safe(e.url,{before:f,after:e.title?" ":")",...h.current()}))),u(),e.title&&(u=n.enter(`title${a}`),f+=h.move(" "+o),f+=h.move(n.safe(e.title,{before:f,after:o,...h.current()})),f+=h.move(o),u()),f+=h.move(")"),c(),f}function P7(){return"!"}A2.peek=F7;function A2(e,t,n,i){const o=e.referenceType,a=n.enter("imageReference");let c=n.enter("label");const u=n.createTracker(i);let h=u.move("![");const f=n.safe(e.alt,{before:h,after:"]",...u.current()});h+=u.move(f+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const m=n.safe(n.associationId(e),{before:h,after:"]",...u.current()});return c(),n.stack=g,a(),o==="full"||!f||f!==m?h+=u.move(m+"]"):o==="shortcut"?h=h.slice(0,-1):h+=u.move("]"),h}function F7(){return"!"}y2.peek=H7;function y2(e,t,n){let i=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<n.unsafe.length;){const c=n.unsafe[a],u=n.compilePattern(c);let h;if(c.atBreak)for(;h=u.exec(i);){let f=h.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(h.index+1)}}return o+i+o}function H7(){return"`"}function v2(e,t){const n=gy(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}b2.peek=U7;function b2(e,t,n,i){const o=Sy(n),a=o==='"'?"Quote":"Apostrophe",c=n.createTracker(i);let u,h;if(v2(e,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let m=c.move("<");return m+=c.move(n.containerPhrasing(e,{before:m,after:">",...c.current()})),m+=c.move(">"),u(),n.stack=g,m}u=n.enter("link"),h=n.enter("label");let f=c.move("[");return f+=c.move(n.containerPhrasing(e,{before:f,after:"](",...c.current()})),f+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(h=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${a}`),f+=c.move(" "+o),f+=c.move(n.safe(e.title,{before:f,after:o,...c.current()})),f+=c.move(o),h()),f+=c.move(")"),u(),f}function U7(e,t,n){return v2(e,n)?"<":"["}x2.peek=q7;function x2(e,t,n,i){const o=e.referenceType,a=n.enter("linkReference");let c=n.enter("label");const u=n.createTracker(i);let h=u.move("[");const f=n.containerPhrasing(e,{before:h,after:"]",...u.current()});h+=u.move(f+"]["),c();const g=n.stack;n.stack=[],c=n.enter("reference");const m=n.safe(n.associationId(e),{before:h,after:"]",...u.current()});return c(),n.stack=g,a(),o==="full"||!f||f!==m?h+=u.move(m+"]"):o==="shortcut"?h=h.slice(0,-1):h+=u.move("]"),h}function q7(){return"["}function ky(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function G7(e){const t=ky(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Y7(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function w2(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function K7(e,t,n,i){const o=n.enter("list"),a=n.bulletCurrent;let c=e.ordered?Y7(n):ky(n);const u=e.ordered?c==="."?")":".":G7(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),w2(n)===c&&g){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=u),n.bulletCurrent=c;const f=n.containerFlow(e,i);return n.bulletLastUsed=c,n.bulletCurrent=a,o(),f}function $7(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function V7(e,t,n,i){const o=$7(n);let a=n.bulletCurrent||ky(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let c=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const u=n.createTracker(i);u.move(a+" ".repeat(c-a.length)),u.shift(c);const h=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),g);return h(),f;function g(m,y,b){return y?(b?"":" ".repeat(c))+m:(b?a:a+" ".repeat(c-a.length))+m}}function J7(e,t,n,i){const o=n.enter("paragraph"),a=n.enter("phrasing"),c=n.containerPhrasing(e,i);return a(),o(),c}const X7=bf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function W7(e,t,n,i){return(e.children.some(function(c){return X7(c)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Z7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}C2.peek=eq;function C2(e,t,n,i){const o=Z7(n),a=n.enter("strong"),c=n.createTracker(i),u=c.move(o+o);let h=c.move(n.containerPhrasing(e,{after:o,before:u,...c.current()}));const f=h.charCodeAt(0),g=zd(i.before.charCodeAt(i.before.length-1),f,o);g.inside&&(h=lc(f)+h.slice(1));const m=h.charCodeAt(h.length-1),y=zd(i.after.charCodeAt(0),m,o);y.inside&&(h=h.slice(0,-1)+lc(m));const b=c.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},u+h+b}function eq(e,t,n){return n.options.strong||"*"}function tq(e,t,n,i){return n.safe(e.value,i)}function nq(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function rq(e,t,n){const i=(w2(n)+(n.options.ruleSpaces?" ":"")).repeat(nq(n));return n.options.ruleSpaces?i.slice(0,-1):i}const E2={blockquote:k7,break:i1,code:j7,definition:M7,emphasis:p2,hardBreak:i1,heading:z7,html:m2,image:g2,imageReference:A2,inlineCode:y2,link:b2,linkReference:x2,list:K7,listItem:V7,paragraph:J7,root:W7,strong:C2,text:tq,thematicBreak:rq};function iq(){return{enter:{table:sq,tableData:s1,tableHeader:s1,tableRow:aq},exit:{codeText:lq,table:oq,tableData:Sm,tableHeader:Sm,tableRow:Sm}}}function sq(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function oq(e){this.exit(e),this.data.inTable=void 0}function aq(e){this.enter({type:"tableRow",children:[]},e)}function Sm(e){this.exit(e)}function s1(e){this.enter({type:"tableCell",children:[]},e)}function lq(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cq));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cq(e,t){return t==="|"?t:e}function uq(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
83
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:h,tableRow:u}};function c(b,w,C,E){return f(g(b,C,E),b.align)}function u(b,w,C,E){const S=m(b,C,E),R=f([S]);return R.slice(0,R.indexOf(`
|
|
84
|
+
`))}function h(b,w,C,E){const S=C.enter("tableCell"),R=C.enter("phrasing"),k=C.containerPhrasing(b,{...E,before:a,after:a});return R(),S(),k}function f(b,w){return E7(b,{align:w,alignDelimiters:i,padding:n,stringLength:o})}function g(b,w,C){const E=b.children;let S=-1;const R=[],k=w.enter("table");for(;++S<E.length;)R[S]=m(E[S],w,C);return k(),R}function m(b,w,C){const E=b.children;let S=-1;const R=[],k=w.enter("tableRow");for(;++S<E.length;)R[S]=h(E[S],b,w,C);return k(),R}function y(b,w,C){let E=E2.inlineCode(b,w,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function dq(){return{exit:{taskListCheckValueChecked:o1,taskListCheckValueUnchecked:o1,paragraph:hq}}}function fq(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pq}}}function o1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hq(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=t.children;let a=-1,c;for(;++a<o.length;){const u=o[a];if(u.type==="paragraph"){c=u;break}}c===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function pq(e,t,n,i){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",u=n.createTracker(i);a&&u.move(c);let h=E2.listItem(e,t,n,{...i,...u.current()});return a&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),h;function f(g){return g+c}}function mq(){return[K9(),p7(),y7(),iq(),dq()]}function gq(e){return{extensions:[$9(),m7(e),v7(),uq(e),fq()]}}const Aq={tokenize:Cq,partial:!0},S2={tokenize:Eq,partial:!0},k2={tokenize:Sq,partial:!0},B2={tokenize:kq,partial:!0},yq={tokenize:Bq,partial:!0},I2={name:"wwwAutolink",tokenize:xq,previous:Q2},R2={name:"protocolAutolink",tokenize:wq,previous:T2},Ei={name:"emailAutolink",tokenize:bq,previous:j2},Fr={};function vq(){return{text:Fr}}let Us=48;for(;Us<123;)Fr[Us]=Ei,Us++,Us===58?Us=65:Us===91&&(Us=97);Fr[43]=Ei;Fr[45]=Ei;Fr[46]=Ei;Fr[95]=Ei;Fr[72]=[Ei,R2];Fr[104]=[Ei,R2];Fr[87]=[Ei,I2];Fr[119]=[Ei,I2];function bq(e,t,n){const i=this;let o,a;return c;function c(m){return!Tg(m)||!j2.call(i,i.previous)||By(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(m))}function u(m){return Tg(m)?(e.consume(m),u):m===64?(e.consume(m),h):n(m)}function h(m){return m===46?e.check(yq,g,f)(m):m===45||m===95||fn(m)?(a=!0,e.consume(m),h):g(m)}function f(m){return e.consume(m),o=!0,h}function g(m){return a&&o&&An(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function xq(e,t,n){const i=this;return o;function o(c){return c!==87&&c!==119||!Q2.call(i,i.previous)||By(i.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Aq,e.attempt(S2,e.attempt(k2,a),n),n)(c))}function a(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function wq(e,t,n){const i=this;let o="",a=!1;return c;function c(m){return(m===72||m===104)&&T2.call(i,i.previous)&&!By(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),u):n(m)}function u(m){if(An(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),u;if(m===58){const y=o.toLowerCase();if(y==="http"||y==="https")return e.consume(m),h}return n(m)}function h(m){return m===47?(e.consume(m),a?f:(a=!0,h)):n(m)}function f(m){return m===null||Nd(m)||mt(m)||io(m)||Af(m)?n(m):e.attempt(S2,e.attempt(k2,g),n)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Cq(e,t,n){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),a):n(c)}function a(c){return c===null?n(c):t(c)}}function Eq(e,t,n){let i,o,a;return c;function c(f){return f===46||f===95?e.check(B2,h,u)(f):f===null||mt(f)||io(f)||f!==45&&Af(f)?h(f):(a=!0,e.consume(f),c)}function u(f){return f===95?i=!0:(o=i,i=void 0),e.consume(f),c}function h(f){return o||i||!a?n(f):t(f)}}function Sq(e,t){let n=0,i=0;return o;function o(c){return c===40?(n++,e.consume(c),o):c===41&&i<n?a(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(B2,t,a)(c):c===null||mt(c)||io(c)?t(c):(e.consume(c),o)}function a(c){return c===41&&i++,e.consume(c),o}}function kq(e,t,n){return i;function i(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),i):u===38?(e.consume(u),a):u===93?(e.consume(u),o):u===60||u===null||mt(u)||io(u)?t(u):n(u)}function o(u){return u===null||u===40||u===91||mt(u)||io(u)?t(u):i(u)}function a(u){return An(u)?c(u):n(u)}function c(u){return u===59?(e.consume(u),i):An(u)?(e.consume(u),c):n(u)}}function Bq(e,t,n){return i;function i(a){return e.consume(a),o}function o(a){return fn(a)?n(a):t(a)}}function Q2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function T2(e){return!An(e)}function j2(e){return!(e===47||Tg(e))}function Tg(e){return e===43||e===45||e===46||e===95||fn(e)}function By(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Iq={tokenize:_q,partial:!0};function Rq(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Dq,continuation:{tokenize:Mq},exit:Nq}},text:{91:{name:"gfmFootnoteCall",tokenize:jq},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Qq,resolveTo:Tq}}}}function Qq(e,t,n){const i=this;let o=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const h=i.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return u;function u(h){if(!c||!c._balanced)return n(h);const f=wr(i.sliceSerialize({start:c.end,end:i.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function Tq(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",c,t],["exit",c,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...u),e}function jq(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,c;return u;function u(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),h}function h(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!c||m===null||m===91||mt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return o.includes(wr(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return mt(m)||(c=!0),a++,e.consume(m),m===92?g:f}function g(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function Dq(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,c=0,u;return h;function h(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(w)}function g(w){if(c>999||w===93&&!u||w===null||w===91||mt(w))return n(w);if(w===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return a=wr(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return mt(w)||(u=!0),c++,e.consume(w),w===92?m:g}function m(w){return w===91||w===92||w===93?(e.consume(w),c++,g):g(w)}function y(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):n(w)}function b(w){return t(w)}}function Mq(e,t,n){return e.check(Ec,t,e.attempt(Iq,t,n))}function Nq(e){e.exit("gfmFootnoteDefinition")}function _q(e,t,n){const i=this;return Ze(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(a):n(a)}}function Oq(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,u){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let f=h;for(;f--;)if(c[f][0]==="exit"&&c[f][1].type==="strikethroughSequenceTemporary"&&c[f][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[f][1].end.offset-c[f][1].start.offset){c[h][1].type="strikethroughSequence",c[f][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[f][1].start),end:Object.assign({},c[h][1].end)},m={type:"strikethroughText",start:Object.assign({},c[f][1].end),end:Object.assign({},c[h][1].start)},y=[["enter",g,u],["enter",c[f][1],u],["exit",c[f][1],u],["enter",m,u]],b=u.parser.constructs.insideSpan.null;b&&Jn(y,y.length,0,yf(b,c.slice(f+1,h),u)),Jn(y,y.length,0,[["exit",m,u],["enter",c[h][1],u],["exit",c[h][1],u],["exit",g,u]]),Jn(c,f-1,h-f+3,y),h=f+y.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function a(c,u,h){const f=this.previous,g=this.events;let m=0;return y;function y(w){return f===126&&g[g.length-1][1].type!=="characterEscape"?h(w):(c.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const C=Ba(f);if(w===126)return m>1?h(w):(c.consume(w),m++,b);if(m<2&&!n)return h(w);const E=c.exit("strikethroughSequenceTemporary"),S=Ba(w);return E._open=!S||S===2&&!!C,E._close=!C||C===2&&!!S,u(w)}}}class zq{constructor(){this.map=[]}add(t,n,i){Lq(this,t,n,i)}consume(t){if(this.map.sort(function(a,c){return a[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let o=i.pop();for(;o;){for(const a of o)t.push(a);o=i.pop()}this.map.length=0}}function Lq(e,t,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...i);return}o+=1}e.map.push([t,n,i])}}function Pq(e,t){let n=!1;const i=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function Fq(){return{flow:{null:{name:"table",tokenize:Hq,resolveAll:Uq}}}}function Hq(e,t,n){const i=this;let o=0,a=0,c;return u;function u(O){let H=i.events.length-1;for(;H>-1;){const Y=i.events[H][1].type;if(Y==="lineEnding"||Y==="linePrefix")H--;else break}const U=H>-1?i.events[H][1].type:null,J=U==="tableHead"||U==="tableRow"?Q:h;return J===Q&&i.parser.lazy[i.now().line]?n(O):J(O)}function h(O){return e.enter("tableHead"),e.enter("tableRow"),f(O)}function f(O){return O===124||(c=!0,a+=1),g(O)}function g(O){return O===null?n(O):ke(O)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),b):n(O):qe(O)?Ze(e,g,"whitespace")(O):(a+=1,c&&(c=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),m(O)))}function m(O){return O===null||O===124||mt(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?y:m)}function y(O){return O===92||O===124?(e.consume(O),m):m(O)}function b(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(O):(e.enter("tableDelimiterRow"),c=!1,qe(O)?Ze(e,w,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):w(O))}function w(O){return O===45||O===58?E(O):O===124?(c=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),C):T(O)}function C(O){return qe(O)?Ze(e,E,"whitespace")(O):E(O)}function E(O){return O===58?(a+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),S):O===45?(a+=1,S(O)):O===null||ke(O)?I(O):T(O)}function S(O){return O===45?(e.enter("tableDelimiterFiller"),R(O)):T(O)}function R(O){return O===45?(e.consume(O),R):O===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(O))}function k(O){return qe(O)?Ze(e,I,"whitespace")(O):I(O)}function I(O){return O===124?w(O):O===null||ke(O)?!c||o!==a?T(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):T(O)}function T(O){return n(O)}function Q(O){return e.enter("tableRow"),j(O)}function j(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),j):O===null||ke(O)?(e.exit("tableRow"),t(O)):qe(O)?Ze(e,j,"whitespace")(O):(e.enter("data"),_(O))}function _(O){return O===null||O===124||mt(O)?(e.exit("data"),j(O)):(e.consume(O),O===92?F:_)}function F(O){return O===92||O===124?(e.consume(O),_):_(O)}}function Uq(e,t){let n=-1,i=!0,o=0,a=[0,0,0,0],c=[0,0,0,0],u=!1,h=0,f,g,m;const y=new zq;for(;++n<e.length;){const b=e[n],w=b[1];b[0]==="enter"?w.type==="tableHead"?(u=!1,h!==0&&(a1(y,t,h,f,g),g=void 0,h=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},y.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(i=!0,m=void 0,a=[0,0,0,0],c=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},y.add(n,0,[["enter",g,t]])),o=w.type==="tableDelimiterRow"?2:g?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(a[1]!==0&&(c[0]=c[1],m=ad(y,t,a,o,void 0,m),a=[0,0,0,0]),c[2]=n)):w.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(c[0]=c[1],m=ad(y,t,a,o,void 0,m)),a=c,c=[a[1],n,0,0])):w.type==="tableHead"?(u=!0,h=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(h=n,a[1]!==0?(c[0]=c[1],m=ad(y,t,a,o,n,m)):c[1]!==0&&(m=ad(y,t,c,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&a1(y,t,h,f,g),y.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=Pq(t.events,n))}return e}function ad(e,t,n,i,o,a){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},ga(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const h=ga(t.events,n[1]);if(a={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=ga(t.events,n[2]),g=ga(t.events,n[3]),m={type:u,start:Object.assign({},f),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",m,t]]),i!==2){const y=t.events[n[2]],b=t.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,C=n[3]-n[2]-1;e.add(w,C,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},ga(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function a1(e,t,n,i,o){const a=[],c=ga(t.events,n);o&&(o.end=Object.assign({},c),a.push(["exit",o,t])),i.end=Object.assign({},c),a.push(["exit",i,t]),e.add(n+1,0,a)}function ga(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const qq={name:"tasklistCheck",tokenize:Yq};function Gq(){return{text:{91:qq}}}function Yq(e,t,n){const i=this;return o;function o(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),a)}function a(h){return mt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(h)}function u(h){return ke(h)?t(h):qe(h)?e.check({tokenize:Kq},t,n)(h):n(h)}}function Kq(e,t,n){return Ze(e,i,"whitespace");function i(o){return o===null?n(o):t(o)}}function $q(e){return UB([vq(),Rq(),Oq(e),Fq(),Gq()])}const Vq={};function Jq(e){const t=this,n=e||Vq,i=t.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push($q(n)),a.push(mq()),c.push(gq(n))}function Xq(e){return p.jsx("div",{className:"my-1.5",...e})}const Wq={img:eG,a:Zq,p:Xq,code:tG};function wf({markdown:e}){return p.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-base leading-relaxed prose-p:my-1.5 prose-pre:my-2 prose-pre:text-sm prose-code:before:content-none prose-code:after:content-none prose-code:rounded prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:font-normal prose-a:text-primary prose-headings:my-2 prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-h4:text-base prose-ul:my-1.5 prose-ol:my-1.5 prose-li:my-0.5 prose-table:my-2 prose-th:py-1 prose-th:px-2 prose-td:py-1 prose-td:px-2 prose-blockquote:my-2 prose-blockquote:border-l-border prose-hr:my-3",children:p.jsx(O9,{remarkPlugins:[Jq],components:Wq,children:e})})}function Zq({href:e,children:t,...n}){return p.jsx("a",{...n,href:e,onClick:i=>{i.preventDefault(),e&&/^https?:/i.test(e)&&window.kirby.openExternal(e)},title:e,children:t})}function eG({src:e,alt:t}){const n=typeof e=="string"?e:"",i=dL(n),[o,a]=x.useState(!1);return n?i.isLoading?p.jsx("span",{className:"my-2 block",children:p.jsx(Xt,{className:"h-32 w-64 max-w-full"})}):i.isError||!i.data?p.jsxs("span",{className:"my-2 inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-1 text-sm text-muted-foreground",children:[p.jsx(v3,{className:"size-3.5"}),p.jsx("span",{children:t||"image"}),p.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 text-primary hover:underline",onClick:()=>{window.kirby.openExternal(n)},children:["open ",p.jsx(cg,{className:"size-3"})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",onClick:()=>a(!0),className:"my-2 block cursor-zoom-in rounded-md border border-border bg-background p-0.5 text-left hover:border-ring",title:t?`${t} — click to enlarge`:"Click to enlarge",children:p.jsx("img",{src:i.data.dataUrl,alt:t??"",className:"!my-0 max-h-72 max-w-full rounded object-contain"})}),p.jsx(Na,{open:o,onOpenChange:a,children:p.jsxs(_a,{className:"max-h-[92vh] w-auto max-w-[min(96vw,1400px)] overflow-auto p-3 sm:max-w-[min(96vw,1400px)]",children:[p.jsx(Oa,{className:"sr-only",children:t||"Image"}),p.jsx("img",{src:i.data.dataUrl,alt:t??"",className:"mx-auto block max-h-[84vh] max-w-full object-contain"}),p.jsxs("div",{className:pe("flex items-center justify-between gap-3 pt-2 text-sm text-muted-foreground"),children:[p.jsxs("span",{className:"truncate",children:[t||"image"," · ",i.data.contentType," ·"," ",(i.data.bytes/1024).toFixed(0)," KB"]}),p.jsxs(be,{variant:"outline",size:"sm",onClick:()=>{window.kirby.openExternal(n)},children:[p.jsx(cg,{})," Open original"]})]})]})})]}):null}function tG({className:e,children:t,...n}){const i=/language-([\w+-]+)/.exec(e??"");return i?p.jsx(nG,{code:String(t).replace(/\n$/,""),tag:i[1]}):p.jsx("code",{className:e,...n,children:t})}function D2(e){const t=[];return e.reduce((n,i)=>(t.push(n),n+i),0),t}function nG({code:e,tag:t}){const{resolved:n}=us(),i=CP(e,t,n),o=x.useMemo(()=>{const a=e.split(`
|
|
85
|
+
`),c=D2(a.map(u=>u.length+1));return a.map((u,h)=>({start:c[h],line:u,tokens:i?.[h]}))},[e,i]);return p.jsx("code",{className:"block",children:o.map(a=>p.jsx("span",{className:"block",children:a.tokens?p.jsx(rG,{tokens:a.tokens,start:a.start}):a.line||" "},a.start))})}function rG({tokens:e,start:t}){const n=D2(e.map(o=>o.content.length)),i=e.map((o,a)=>({tok:o,at:t+n[a]}));return p.jsx(p.Fragment,{children:i.map(({tok:o,at:a})=>p.jsx("span",{style:{color:o.color},children:o.content},a))})}function M2({inPlan:e,hasNote:t,onToggle:n,onNote:i}){return p.jsxs("span",{className:pe("flex shrink-0 items-center gap-1 transition-opacity",!e&&"opacity-0 focus-within:opacity-100 group-hover/card:opacity-100"),children:[e?p.jsx(Fe,{label:"Remove from plan",children:p.jsxs(be,{variant:"secondary",size:"sm",onClick:n,"aria-label":"Remove from plan","aria-pressed":!0,className:"border-primary/40 bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary",children:[p.jsx(Lr,{})," In plan"]})}):p.jsx(Fe,{label:"Queue this comment for the agent",children:p.jsxs(be,{variant:"outline",size:"sm",onClick:n,"aria-label":"Add to plan","aria-pressed":!1,children:[p.jsx(x3,{})," Add to plan"]})}),p.jsx(Fe,{label:t?"Edit your note":"Add to plan with a note",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":t?"Edit note":"Add to plan with a note",className:pe(t&&"text-primary"),children:p.jsx(nc,{})})})]})}function N2({initial:e,onSave:t,onCancel:n}){const[i,o]=x.useState(e),a=x.useRef(null);return x.useEffect(()=>{const c=a.current;c&&(c.focus(),c.setSelectionRange(c.value.length,c.value.length))},[]),p.jsxs("div",{className:"border-t border-primary/30 bg-primary/5 px-3 py-2",children:[p.jsxs("p",{className:"mb-1 flex items-center gap-1.5 text-xs font-medium text-primary",children:[p.jsx(nc,{className:"size-3.5"}),"Your note to the agent"]}),p.jsx(wc,{"aria-label":"Your note to the agent",ref:a,value:i,onChange:c=>o(c.target.value),onKeyDown:c=>{(c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),t(i)),c.key==="Escape"&&(c.preventDefault(),n())},placeholder:"How should the agent approach this? ⌘/Ctrl+Enter to save.",className:"min-h-16 bg-background"}),p.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:"The comment is already in the plan — a note just tells the agent how you want it handled."}),p.jsx("div",{className:"flex-1"}),p.jsx(be,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),p.jsx(be,{size:"sm",onClick:()=>t(i),children:"Save note"})]})]})}function iG({note:e,onEdit:t}){return p.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-start gap-2 border-t border-primary/25 bg-primary/5 px-3 py-1.5 text-left text-sm hover:bg-primary/10","aria-label":"Edit note",children:[p.jsx(nc,{className:"mt-0.5 size-3.5 shrink-0 text-primary"}),p.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap text-foreground/90",children:e})]})}function _2({composing:e,note:t,onSave:n,onCancel:i,onEdit:o}){return e?p.jsx(N2,{initial:t??"",onSave:n,onCancel:i}):t===void 0?null:p.jsx(iG,{note:t,onEdit:o})}function sG({posting:e,deleting:t,onEdit:n,onDelete:i,onPost:o}){return p.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border bg-muted/20 px-3 py-1.5",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:"Not posted yet — only you can see this."}),p.jsx("div",{className:"flex-1"}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:n,disabled:e,children:[p.jsx(Ak,{})," Edit"]}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:i,disabled:e||t,children:[p.jsx(bk,{})," Discard"]}),p.jsxs(be,{size:"sm",onClick:o,disabled:e,children:[e?p.jsx(ho,{className:"animate-spin"}):p.jsx(af,{}),e?"Posting…":"Post"]})]})}function oG({body:e,severity:t,saving:n,onBody:i,onSeverity:o,onSave:a,onCancel:c}){return p.jsxs("div",{className:"space-y-2 px-3 py-2",children:[p.jsx(wc,{autoFocus:!0,value:e,onChange:u=>i(u.target.value),onKeyDown:u=>{(u.metaKey||u.ctrlKey)&&u.key==="Enter"&&(u.preventDefault(),a()),u.key==="Escape"&&c()},className:"min-h-24 bg-background"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(ff,{value:t,onValueChange:u=>o(u),children:[p.jsx(pf,{className:"w-32",children:p.jsx(hf,{})}),p.jsx(mf,{children:gf.map(u=>p.jsx(ss,{value:u,children:u},u))})]}),p.jsx("div",{className:"flex-1"}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:c,children:[p.jsx(Ma,{})," Cancel"]}),p.jsxs(be,{size:"sm",onClick:a,disabled:n||!e.trim(),children:[p.jsx(Lr,{})," Save"]})]})]})}function O2({draft:e,prId:t,headSha:n,showLocation:i=!1,focused:o=!1}){const{repo:a}=hn(),c=sy(t),u=hB(c,"local",e.id,x.useCallback(()=>oB(e),[e])),h=Kk(a.cwd),f=$k(a.cwd),g=ey(a.cwd),[m,y]=x.useState(!1),[b,w]=x.useState(e.body),[C,E]=x.useState(e.severity),S=e.status==="posting"||g.isPending,R=x.useRef(null);x.useEffect(()=>{o&&R.current?.scrollIntoView({block:"center",behavior:"smooth"})},[o]);const k=()=>{h.mutate({prId:t,id:e.id,patch:{body:b.trim(),severity:C}},{onSuccess:()=>y(!1),onError:j=>Ee.error(Xe(j))})},I=()=>g.mutate({prId:t,ids:[e.id],headSha:n},{onSuccess:()=>Ee.success("Comment posted"),onError:j=>Ee.error(`Post failed: ${Xe(j)}`)}),T=()=>f.mutate({prId:t,id:e.id},{onError:j=>Ee.error(Xe(j))}),Q=`${e.file}:${e.lineStart}${e.lineEnd!==e.lineStart?`-${e.lineEnd}`:""}`;return p.jsxs("div",{ref:R,"data-draft":e.id,className:pe("group/card max-w-[900px] overflow-hidden rounded-lg border border-dashed border-l-[3px] bg-card text-card-foreground shadow-xs transition-shadow",u.inPlan?"border-primary/40":"border-border",SP[e.severity],o&&"ring-2 ring-primary/50"),children:[p.jsxs("div",{className:pe("flex items-center gap-2 border-b border-border px-3 py-1.5 text-sm",u.inPlan?"bg-primary/5":"bg-muted/40"),children:[p.jsx(TA,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Draft"}),p.jsx(Ai,{variant:cy[e.severity],children:e.severity}),i&&p.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:Q}),p.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:rf(e.createdAt)}),p.jsx(M2,{inPlan:u.inPlan,hasNote:u.note!==void 0,onToggle:u.toggleInPlan,onNote:u.startNote})]}),m?p.jsx(oG,{body:b,severity:C,saving:h.isPending,onBody:w,onSeverity:E,onSave:k,onCancel:()=>y(!1)}):p.jsx("div",{className:"px-3 py-2",children:p.jsx(wf,{markdown:e.body})}),!m&&p.jsx(_2,{composing:u.composing,note:u.note,onSave:u.saveNote,onCancel:u.cancelNote,onEdit:u.startNote}),!m&&p.jsx(sG,{posting:S,deleting:f.isPending,onEdit:()=>{w(e.body),E(e.severity),y(!0)},onDelete:T,onPost:I})]})}function aG(e,t,n){return e??(t||!n)}function lG(e){return e.file==null?null:`${e.file}${e.lineStart!=null?`:${e.lineStart}`:""}`}function cG(e){return e.split(`
|
|
86
|
+
`).find(t=>t.trim())??""}function kc({name:e,className:t,size:n="sm"}){let i=0;for(let c=0;c<e.length;c++)i=i*31+e.charCodeAt(c)|0;const o=Math.abs(i)%360,a=n==="xs"?"size-4 text-[8px]":n==="md"?"size-7 text-xs":"size-5 text-[9px]";return p.jsx("span",{"aria-hidden":!0,title:e,className:pe("inline-flex shrink-0 select-none items-center justify-center rounded-full font-semibold leading-none text-white",a,t),style:{backgroundColor:`oklch(0.55 0.12 ${o})`},children:Rz(e)})}function uG({canResolve:e,isResolved:t,composing:n,setComposing:i,draft:o,setDraft:a,sending:c,resolving:u,onSend:h,onToggleResolved:f}){return p.jsxs("div",{className:"flex items-start gap-2 border-t border-border bg-muted/20 px-3 py-2",children:[n?p.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[p.jsx(wc,{autoFocus:!0,value:o,onChange:g=>a(g.target.value),onKeyDown:g=>{(g.metaKey||g.ctrlKey)&&g.key==="Enter"&&(g.preventDefault(),h()),g.key==="Escape"&&i(!1)},placeholder:"Write a reply… Markdown supported. ⌘/Ctrl+Enter to send.",className:"min-h-20 bg-background"}),p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(be,{variant:"ghost",size:"sm",onClick:()=>i(!1),children:"Cancel"}),e&&!t&&p.jsxs(be,{variant:"outline",size:"sm",onClick:()=>h(!0),disabled:c||!o.trim(),children:[p.jsx(Lr,{})," Reply & resolve"]}),p.jsx(be,{size:"sm",onClick:()=>h(),disabled:c||!o.trim(),children:c?"Sending…":"Reply"})]})]}):p.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex h-7 flex-1 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-left text-sm text-muted-foreground hover:border-ring",children:[p.jsx(fk,{className:"size-3.5"}),"Reply…"]}),e&&!n&&p.jsx(be,{variant:t?"ghost":"outline",size:"sm",onClick:f,disabled:u,children:t?p.jsxs(p.Fragment,{children:[p.jsx(_A,{})," Reopen"]}):p.jsxs(p.Fragment,{children:[p.jsx(Lr,{})," Resolve"]})})]})}function Iy({thread:e,prId:t,showLocation:n=!1,focused:i=!1}){const{repo:o}=hn(),a=sy(t),c=hB(a,"remote",e.id,x.useCallback(()=>sB(e),[e])),u=j4(o.cwd),h=D4(o.cwd),[f,g]=x.useState(""),[m,y]=x.useState(!1),[b,w]=x.useState(null),[C,E]=x.useState(i);i!==C&&(E(i),i&&w(null));const S=aG(b,i,e.isResolved),R=x.useRef(null);x.useEffect(()=>{i&&R.current?.scrollIntoView({block:"center",behavior:"smooth"})},[i]);const k=e.comments[0];if(!k)return null;const I=e.comments.slice(1),T=(_=!1)=>{const F=f.trim();F&&u.mutate({prId:t,thread:e,body:F},{onSuccess:()=>{g(""),y(!1),_&&e.canResolve&&!e.isResolved&&h.mutate({prId:t,thread:e,resolved:!0},{onError:O=>Ee.error(Xe(O))})},onError:O=>Ee.error(Xe(O))})},Q=()=>h.mutate({prId:t,thread:e,resolved:!e.isResolved},{onError:_=>Ee.error(Xe(_))}),j=lG(e);return p.jsxs("div",{ref:R,"data-thread":e.id,className:pe("group/card max-w-[900px] overflow-hidden rounded-lg border bg-card text-card-foreground shadow-xs transition-shadow",c.inPlan?"border-primary/40":e.isResolved?"border-success/30":"border-border",i&&"ring-2 ring-primary/50"),children:[p.jsx(dG,{thread:e,author:k.author,preview:k.body,location:n?j:null,expanded:S,onToggle:()=>w(!S),inPlan:c.inPlan,hasNote:c.note!==void 0,onTogglePlan:c.toggleInPlan,onNote:()=>{w(!0),c.startNote()}}),S&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"divide-y divide-border",children:[p.jsx(l1,{comment:k}),I.map(_=>p.jsx(l1,{comment:_,reply:!0},_.id))]}),p.jsx(_2,{composing:c.composing,note:c.note,onSave:c.saveNote,onCancel:c.cancelNote,onEdit:c.startNote}),p.jsx(uG,{canResolve:e.canResolve,isResolved:e.isResolved,composing:m,setComposing:y,draft:f,setDraft:g,sending:u.isPending,resolving:h.isPending,onSend:T,onToggleResolved:Q})]})]})}function dG({thread:e,author:t,preview:n,location:i,expanded:o,onToggle:a,inPlan:c,hasNote:u,onTogglePlan:h,onNote:f}){return p.jsxs("div",{className:pe("flex items-center gap-2 px-3 py-1.5 text-sm",c?"bg-primary/5":e.isResolved?"bg-success/5":"bg-muted/40",o&&"border-b border-border"),children:[p.jsxs("button",{type:"button",onClick:a,className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-expanded":o,children:[o?p.jsx(Er,{className:"size-3.5 shrink-0 text-muted-foreground"}):p.jsx(Ci,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx(po,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx("span",{className:"shrink-0 font-medium",children:t}),i&&p.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:i}),!o&&p.jsxs("span",{className:"min-w-0 truncate text-muted-foreground",children:["— ",cG(n)]}),p.jsxs("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:[e.comments.length," comment",e.comments.length===1?"":"s"]})]}),p.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[p.jsx(M2,{inPlan:c,hasNote:u,onToggle:h,onNote:f}),e.isOutdated&&p.jsx(Ai,{variant:"outline",children:"Outdated"}),e.isResolved&&p.jsxs(Ai,{variant:"success",children:[p.jsx(vc,{})," Resolved"]})]})]})}function l1({comment:e,reply:t=!1}){return p.jsxs("article",{className:pe("px-3 py-2.5",t&&"border-l-[3px] border-l-border bg-muted/15 pl-4"),children:[p.jsxs("header",{className:"mb-1 flex items-center gap-2 text-sm",children:[t&&p.jsx(fk,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx(kc,{name:e.author,size:"sm"}),p.jsx("span",{className:"font-medium",children:e.author}),p.jsxs("span",{className:"text-muted-foreground",children:[t?"replied":"commented"," ",rf(e.createdAt)]}),e.isMinimized&&p.jsx(Ai,{variant:"outline",className:"ml-auto",children:"Hidden"})]}),p.jsx("div",{className:pe(t?"pl-[calc(1.25rem+0.875rem+0.5rem)]":"pl-7"),children:p.jsx(wf,{markdown:e.body})})]})}function fG({threads:e,drafts:t=[],prId:n,headSha:i,focusId:o,indent:a=!0}){return e.length===0&&t.length===0?null:p.jsxs("div",{className:pe("space-y-2 border-y border-border bg-muted/30 py-2 pr-4 font-sans",a?"pl-[5.5rem]":"pl-4"),children:[t.map(c=>p.jsx(O2,{draft:c,prId:n,headSha:i,focused:c.id===o},c.id)),e.map(c=>p.jsx(Iy,{thread:c,prId:n,focused:c.id===o},c.id))]})}function hG({threads:e,drafts:t,prId:n,headSha:i,focusId:o}){return p.jsxs("div",{className:"space-y-2 border-t border-border bg-muted/30 px-4 py-3 font-sans",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Comments on lines not in this diff"}),t.map(a=>p.jsx(O2,{draft:a,prId:n,headSha:i,showLocation:!0,focused:a.id===o},a.id)),e.map(a=>p.jsx(Iy,{thread:a,prId:n,showLocation:!0,focused:a.id===o},a.id))]})}function pG({threads:e,loading:t,prId:n,focusThreadId:i}){const[o,a]=x.useState(!0);return p.jsxs("section",{className:"border-b border-border bg-muted/20",children:[p.jsxs("button",{type:"button",onClick:()=>a(c=>!c),className:"flex h-8 w-full items-center gap-1.5 px-2 text-sm hover:bg-accent/60",children:[o?p.jsx(Er,{className:"size-3.5 text-muted-foreground"}):p.jsx(Ci,{className:"size-3.5 text-muted-foreground"}),p.jsx(D3,{className:"size-3.5 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Conversation"}),!t&&p.jsxs("span",{className:"text-muted-foreground",children:["(",e.length,")"]})]}),o&&p.jsxs("div",{className:"space-y-3 px-4 pb-3",children:[t&&e.length===0&&p.jsx(Xt,{className:"h-16 w-full"}),e.map(c=>p.jsx(Iy,{thread:c,prId:n,focused:c.id===i},c.id))]})]})}const mG={large:"large diff",lockfile:"lockfile",generated:"generated"};function gG({filename:e,open:t,onToggleOpen:n,viewed:i,onToggleViewed:o,collapseReason:a,draftCount:c,openThreads:u,adds:h,dels:f}){const g=e.lastIndexOf("/"),m=g>=0?e.slice(0,g+1):"",y=e.slice(m.length);return p.jsxs("div",{className:"sticky top-0 z-10 flex h-8 items-center gap-2 border-b border-border bg-background/95 px-2 backdrop-blur",children:[p.jsxs("button",{type:"button",onClick:n,className:"flex min-w-0 flex-1 items-center gap-1.5 text-left","aria-expanded":t,children:[t?p.jsx(Er,{className:"size-3.5 shrink-0 text-muted-foreground"}):p.jsx(Ci,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsxs("span",{className:"truncate font-mono text-sm",children:[p.jsx("span",{className:"text-muted-foreground",children:m}),p.jsx("span",{className:pe("text-foreground",i&&"text-muted-foreground line-through"),children:y})]})]}),a&&!t&&p.jsx("span",{className:"rounded-full bg-muted px-1.5 text-xs text-muted-foreground",children:mG[a]}),c>0&&p.jsxs("span",{className:"rounded-full border border-dashed border-border px-1.5 text-xs font-medium text-muted-foreground",children:[c," draft",c===1?"":"s"]}),u>0&&p.jsxs("span",{className:"rounded-full bg-warning/15 px-1.5 text-xs font-medium text-warning",children:[u," open"]}),p.jsxs("span",{className:"shrink-0 font-mono text-xs tabular-nums",children:[p.jsxs("span",{className:"text-success",children:["+",h]})," ",p.jsxs("span",{className:"text-destructive",children:["−",f]})]}),p.jsx(Fe,{label:i?"Mark as not viewed":"Mark as viewed",children:p.jsxs("button",{type:"button",onClick:o,className:pe("ml-1 flex h-5 items-center gap-1 rounded border px-1.5 text-xs transition-colors",i?"border-success/40 bg-success/10 text-success":"border-border text-muted-foreground hover:bg-accent"),children:[i?p.jsx(Lr,{className:"size-3"}):p.jsx(DA,{className:"size-3"}),"Viewed"]})})]})}const Ry={add:"bg-diff-add",remove:"bg-diff-del",context:"","hunk-header":""},z2={add:"bg-diff-add-gutter",remove:"bg-diff-del-gutter",context:"bg-background","hunk-header":""},AG={add:"+",remove:"−",context:" ","hunk-header":""};function Qy({type:e}){return p.jsx("span",{className:pe("w-5 text-center",e==="add"&&"text-success",e==="remove"&&"text-destructive"),children:AG[e]})}function Ty({line:e,tokens:t,ranges:n,wrap:i}){const o=e.content||" ",a=e.type==="add"?"bg-success/25 rounded-[2px]":e.type==="remove"?"bg-destructive/25 rounded-[2px]":"",c=pe("min-w-0 pr-6",i?"whitespace-pre-wrap break-all":"whitespace-pre");if(!t)return p.jsx("span",{className:c,children:c1(o,n,a)});let u=0;const h=[];return t.forEach((f,g)=>{const m=u,y=u+f.content.length;u=y,h.push(p.jsx("span",{style:{color:f.color},children:c1(f.content,yG(n,m,y),a,g)},m))}),p.jsx("span",{className:c,children:h})}function yG(e,t,n){if(!e)return;const i=[];for(const o of e){const a=Math.max(o.start,t),c=Math.min(o.end,n);a<c&&i.push({start:a-t,end:c-t})}return i.length?i:void 0}function c1(e,t,n,i=""){if(!t||t.length===0)return e;const o=[];let a=0;return t.forEach(c=>{c.start>a&&o.push(e.slice(a,c.start)),o.push(p.jsx("mark",{className:pe("text-inherit",n),children:e.slice(c.start,c.end)},`${i}-${c.start}`)),a=c.end}),a<e.length&&o.push(e.slice(a)),o}function vG({line:e,tokens:t,ranges:n,wrap:i}){return p.jsxs("div",{className:pe("flex",i?"w-full":"min-w-max",Ry[e.type]),children:[p.jsxs("span",{className:pe("sticky left-0 z-[1] flex shrink-0 select-none text-muted-foreground/70",z2[e.type]),children:[p.jsx("span",{className:"w-11 pr-2 text-right tabular-nums",children:e.oldLine??""}),p.jsx("span",{className:"w-11 pr-2 text-right tabular-nums",children:e.newLine??""}),p.jsx(Qy,{type:e.type})]}),p.jsx(Ty,{line:e,tokens:t,ranges:n,wrap:i})]})}function ld({cell:e,tokens:t,ranges:n,side:i,wrap:o}){if(!e)return p.jsx("div",{className:"min-w-0 border-l border-border bg-muted/20"});const{line:a}=e,c=i==="L"?a.oldLine:a.newLine;return p.jsxs("div",{className:pe("flex min-w-0",i==="R"&&"border-l border-border",Ry[a.type]),children:[p.jsxs("span",{className:pe("flex shrink-0 select-none text-muted-foreground/70",z2[a.type]),children:[p.jsx("span",{className:"w-11 pr-2 text-right tabular-nums",children:c??""}),p.jsx(Qy,{type:a.type})]}),p.jsx(Ty,{line:a,tokens:t,ranges:n,wrap:o})]})}function bG({fold:e,onExpand:t}){const n=e.to-e.from;return p.jsxs("div",{className:"flex h-7 items-center gap-1 border-y border-border bg-diff-hunk/60 px-2 font-sans text-xs text-muted-foreground",children:[p.jsx(Fe,{label:"Show 20 more lines above",children:p.jsx(be,{variant:"ghost",size:"icon-xs",onClick:()=>t(e,"up"),"aria-label":"Expand up",children:p.jsx(jA,{})})}),p.jsx(Fe,{label:"Show 20 more lines below",children:p.jsx(be,{variant:"ghost",size:"icon-xs",onClick:()=>t(e,"down"),"aria-label":"Expand down",children:p.jsx(Er,{})})}),p.jsxs("button",{type:"button",onClick:()=>t(e,"all"),className:"ml-1 flex items-center gap-1 rounded px-1.5 py-0.5 hover:bg-accent hover:text-foreground",children:[p.jsx(TL,{className:"size-3.5"}),n," unchanged line",n===1?"":"s"," hidden"]})]})}function xG({line:e}){return p.jsx("div",{className:"flex h-6 items-center bg-diff-hunk px-3 text-xs text-diff-hunk-fg",children:p.jsx("span",{className:"truncate",children:e.content})})}function wG({files:e,threadsByFile:t,draftsByFile:n,generalThreads:i,commentsLoading:o,prId:a,headSha:c,focusThreadId:u,scrollRef:h,jumpRef:f}){const g=ay(),{resolved:m}=us(),[y,b]=x.useState(()=>new Map),w=x.useMemo(()=>new Map(e),[e]),C=x.useMemo(()=>gP(e,{view:g.view,hideResolved:g.hideResolved,hasConversation:i.length>0||o,generalThreads:i,threadsByFile:t,draftsByFile:n,fileState:y}),[e,g.view,g.hideResolved,i,o,t,n,y]),E=C.rows,S=$6({count:E.length,getScrollElement:()=>h.current,estimateSize:_=>fP(E[_]),getItemKey:_=>E[_].key,overscan:16}),R=S.getVirtualItems(),k=x.useMemo(()=>{const _=new Set;for(const F of R){const O=E[F.index];"file"in O&&_.add(O.file)}return _},[R,E]),I=wP(w,m,k),T=x.useCallback((_,F)=>b(O=>{const H=new Map(O);return H.set(_,{...H.get(_),...F}),H}),[]),Q=x.useCallback((_,F,O)=>b(H=>{const U=new Map(H),J=U.get(_)??{},Y=new Set(J.expanded??[]);for(const $ of rP(F,O))Y.add($);return U.set(_,{...J,expanded:Y}),U}),[]);x.useImperativeHandle(f,()=>({jumpToId:_=>{const F=C.indexById.get(_);return F==null?!1:(S.scrollToIndex(F,{align:"center"}),!0)},jumpToFile:_=>{const F=C.fileIndex.get(_);return F==null?!1:(S.scrollToIndex(F,{align:"start"}),!0)}}),[C,S]);const j=_=>{switch(_.kind){case"conversation":return p.jsx(pG,{threads:i,loading:o,prId:a,focusThreadId:u});case"file-header":{const F=C.stats.get(_.file);return F?p.jsx("div",{"data-file":_.file,className:"border-t border-border",children:p.jsx(gG,{filename:_.file,open:F.open,onToggleOpen:()=>T(_.file,{open:!F.open}),viewed:F.viewed,onToggleViewed:()=>T(_.file,{viewed:!F.viewed,open:F.viewed}),collapseReason:F.collapseReason,draftCount:F.draftCount,openThreads:F.openThreads,adds:F.adds,dels:F.dels})}):null}case"hunk":return p.jsx(xG,{line:w.get(_.file)[_.index]});case"fold":return p.jsx(bG,{fold:{from:_.from,to:_.to},onExpand:(F,O)=>Q(_.file,F,O)});case"unified":{const F=w.get(_.file)[_.index],O=bg(I.get(_.file),_.index);return p.jsx(vG,{line:F,tokens:O.tokens,ranges:O.ranges,wrap:g.wrap})}case"split-context":{const F=w.get(_.file)[_.index],{tokens:O}=bg(I.get(_.file),_.index),H={index:_.index,line:F};return p.jsxs("div",{className:"grid grid-cols-2",children:[p.jsx(ld,{cell:H,tokens:O,side:"L",wrap:!0}),p.jsx(ld,{cell:H,tokens:O,side:"R",wrap:!0})]})}case"split-pair":{const F=I.get(_.file),{left:O,right:H}=_.row,U=yC(F,O),J=yC(F,H);return p.jsxs("div",{className:"grid grid-cols-2",children:[p.jsx(ld,{cell:O,tokens:U.tokens,ranges:U.ranges,side:"L",wrap:!0}),p.jsx(ld,{cell:H,tokens:J.tokens,ranges:J.ranges,side:"R",wrap:!0})]})}case"comments":return p.jsx(fG,{threads:_.threads,drafts:_.drafts,prId:a,headSha:c,focusId:u,indent:_.indent});case"orphans":return p.jsx(hG,{threads:_.threads,drafts:_.drafts,prId:a,headSha:c,focusId:u})}};return p.jsx("div",{className:"relative font-mono text-sm leading-5",style:{height:S.getTotalSize()},children:R.map(_=>p.jsx("div",{"data-index":_.index,ref:S.measureElement,className:"absolute top-0 left-0 w-full",style:{transform:`translateY(${_.start}px)`},children:j(E[_.index])},_.key))})}function CG({prId:e,headSha:t,sourceBranch:n,targetBranch:i,files:o,threadsByFile:a,draftsByFile:c,generalThreads:u,commentsLoading:h,diffLoading:f,diffError:g,focusThreadId:m,scrollRef:y,jumpRef:b,navCount:w,navIndex:C,onPrev:E,onNext:S}){const[R,k]=x.useState(!1);x.useEffect(()=>{const T=requestAnimationFrame(()=>x.startTransition(()=>k(!0)));return()=>cancelAnimationFrame(T)},[]);const I=f||!R;return p.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[p.jsx(EG,{navCount:w,navIndex:C,onPrev:E,onNext:S}),p.jsxs("div",{ref:y,className:"min-h-0 flex-1 overflow-auto",children:[I&&p.jsxs("div",{className:"space-y-2 p-4",children:[p.jsx(Xt,{className:"h-4 w-1/3"}),p.jsx(Xt,{className:"h-3 w-full"}),p.jsx(Xt,{className:"h-3 w-11/12"}),p.jsx(Xt,{className:"h-3 w-4/5"})]}),g&&p.jsx("div",{className:"m-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:g}),!I&&!g&&o.length===0&&p.jsxs("div",{className:"p-6 text-center text-sm text-muted-foreground",children:["No changes between ",p.jsx("span",{className:"font-mono",children:i})," ","and ",p.jsx("span",{className:"font-mono",children:n}),"."]}),!I&&p.jsx(wG,{files:o,threadsByFile:a,draftsByFile:c,generalThreads:u,commentsLoading:h,prId:e,headSha:t,focusThreadId:m,scrollRef:y,jumpRef:b})]})]})}function EG({navCount:e,navIndex:t,onPrev:n,onNext:i}){const o=ay();return p.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2 text-sm",children:[p.jsxs("div",{className:"flex items-center rounded-md border border-border p-0.5",children:[p.jsx(Fe,{label:"Unified view",children:p.jsxs("button",{type:"button",onClick:()=>td({view:"unified"}),className:pe("flex h-5 items-center gap-1 rounded px-1.5 text-xs",o.view==="unified"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:[p.jsx($3,{className:"size-3.5"})," Unified"]})}),p.jsx(Fe,{label:"Side-by-side view",children:p.jsxs("button",{type:"button",onClick:()=>td({view:"split"}),className:pe("flex h-5 items-center gap-1 rounded px-1.5 text-xs",o.view==="split"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground"),children:[p.jsx(XL,{className:"size-3.5"})," Split"]})})]}),p.jsx(Fe,{label:o.wrap?"Disable line wrapping":"Wrap long lines",children:p.jsxs(be,{variant:o.wrap?"secondary":"ghost",size:"sm",onClick:()=>td({wrap:!o.wrap}),"aria-pressed":o.wrap,children:[p.jsx(a5,{})," Wrap"]})}),p.jsx(Fe,{label:o.hideResolved?"Show resolved threads":"Hide resolved threads",children:p.jsxs(be,{variant:o.hideResolved?"secondary":"ghost",size:"sm",onClick:()=>td({hideResolved:!o.hideResolved}),"aria-pressed":o.hideResolved,children:[p.jsx(DA,{})," Hide resolved"]})}),p.jsx("div",{className:"flex-1"}),e>0&&p.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[p.jsx(po,{className:"size-3.5"}),p.jsxs("span",{className:"tabular-nums",children:[t>=0?t+1:"–","/",e]}),p.jsx(Fe,{label:"Previous comment",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:n,"aria-label":"Previous comment",children:p.jsx(jA,{})})}),p.jsx(Fe,{label:"Next comment",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Next comment",children:p.jsx(Er,{})})})]})]})}const SG={approve:"Approved","approve-with-suggestions":"Approved with suggestions","wait-for-author":"Marked as waiting for author",reject:"Changes requested"};function cd({tip:e,icon:t,pending:n,disabled:i,onClick:o,variant:a,className:c,children:u}){return p.jsx(Fe,{label:e,children:p.jsxs(be,{variant:a,size:"sm",onClick:o,disabled:i,className:c,children:[n?p.jsx(ho,{className:"animate-spin"}):t,u]})})}function kG({pr:e,isGitHub:t,submitting:n,pendingVerdict:i,onSubmit:o}){const c=(e.reviewers??[]).filter(u=>u.decision==="approved").length;return p.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 border-y border-border py-3",children:[p.jsx(cd,{tip:"Approve this pull request",icon:p.jsx(vc,{}),pending:i==="approve",disabled:n,onClick:()=>o("approve"),className:"bg-success text-white hover:bg-success/90",children:"Approve"}),p.jsx(cd,{tip:t?"Approve with a non-blocking note (GitHub has no separate vote for this)":"Approve, with non-blocking suggestions",icon:p.jsx(k3,{}),pending:i==="approve-with-suggestions",disabled:n,onClick:()=>o("approve-with-suggestions"),variant:"outline",className:"border-success/60 text-success hover:bg-success/10 hover:text-success",children:"Approve with suggestions"}),!t&&p.jsx(cd,{tip:"Block the PR until the author responds",icon:p.jsx(dk,{}),pending:i==="wait-for-author",disabled:n,onClick:()=>o("wait-for-author"),variant:"outline",className:"border-warning/60 text-warning hover:bg-warning/10 hover:text-warning",children:"Wait for author"}),p.jsx(cd,{tip:t?"Submit a changes-requested review":"Reject this pull request",icon:p.jsx(sf,{}),pending:i==="reject",disabled:n,onClick:()=>o("reject"),variant:"destructive",children:t?"Request changes":"Reject"}),c>0&&p.jsxs("span",{className:"ml-auto flex items-center gap-1 text-xs text-success",children:[p.jsx(Lr,{className:"size-3.5"}),c," approved"]})]})}function BG({pr:e}){const{repo:t}=hn(),n=uL(t.cwd,e.id),i=B4(t.cwd,t.providerId??void 0),o=t.providerId==="github",a=i.isPending?i.variables?.verdict:null,c=u=>i.mutate({prId:e.id,verdict:u},{onSuccess:()=>Ee.success(SG[u]),onError:h=>Ee.error(`Review vote failed: ${Xe(h)}`)});return p.jsx("div",{className:"h-full overflow-auto",children:p.jsxs("div",{className:"mx-auto max-w-[860px] px-6 py-6",children:[p.jsxs("h1",{className:"text-xl font-semibold leading-snug",children:[e.title," ",p.jsxs("span",{className:"font-normal text-muted-foreground",children:["#",e.id]})]}),p.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm text-muted-foreground",children:[p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(kc,{name:e.createdByDisplayName,size:"xs"}),e.createdByDisplayName]}),p.jsxs("span",{className:"font-mono text-xs",children:[e.sourceBranch," → ",e.targetBranch]}),e.isDraft&&p.jsx(Ai,{variant:"outline",children:"Draft"})]}),p.jsx(kG,{pr:e,isGitHub:o,submitting:i.isPending,pendingVerdict:a,onSubmit:c}),p.jsx("div",{className:"mt-4",children:n.isLoading?p.jsxs("div",{className:"space-y-2",children:[p.jsx(Xt,{className:"h-4 w-2/3"}),p.jsx(Xt,{className:"h-4 w-full"}),p.jsx(Xt,{className:"h-4 w-5/6"})]}):n.data?p.jsx(wf,{markdown:n.data}):p.jsx("p",{className:"text-sm text-muted-foreground",children:"This pull request has no description."})})]})})}function Cf({className:e,children:t,viewportClassName:n,viewportRef:i,...o}){return p.jsxs(k_,{"data-slot":"scroll-area",className:pe("relative overflow-hidden",e),...o,children:[p.jsx(B_,{ref:i,"data-slot":"scroll-area-viewport",className:pe("size-full rounded-[inherit] outline-none [&>div]:!block",n),children:t}),p.jsx(u1,{}),p.jsx(u1,{orientation:"horizontal"}),p.jsx(I_,{})]})}function u1({className:e,orientation:t="vertical",...n}){return p.jsx(m_,{"data-slot":"scroll-area-scrollbar",orientation:t,className:pe("flex touch-none select-none p-px transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:p.jsx(x_,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-foreground/20 hover:bg-foreground/35"})})}function IG({items:e,branch:t,agentRunning:n,sending:i,onRemove:o,onAnnotate:a,onShowInDiff:c,onClear:u,onSend:h,openNoteFor:f}){const[g,m]=x.useState(f?.key??null),[y,b]=x.useState(f);f!==y&&(b(f),f&&m(f.key));const[w,C]=x.useState(!1),E=r6(e),{count:S,noted:R}=AB(e),k=i6({count:S,agentRunning:n,sending:i});return p.jsxs("section",{"aria-label":"Plan",className:"flex h-full min-h-0 flex-col bg-background",children:[p.jsxs("header",{className:"flex shrink-0 items-center gap-2.5 border-b border-border px-4 py-2.5",children:[p.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:p.jsx(uk,{className:"size-4"})}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block text-base font-semibold leading-tight",children:"Plan"}),p.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[S," comment",S===1?"":"s",R>0&&` · ${R} with a note`," · for the agent on"," ",p.jsx("span",{className:"font-mono",children:t})]})]})]}),p.jsx(Cf,{className:"min-h-0 flex-1",children:p.jsx("ol",{"aria-label":"Queued comments",className:"divide-y divide-border",children:E.map((I,T)=>{const Q=e[T];return p.jsxs("li",{className:"group/row",children:[p.jsxs("div",{className:"flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-accent/40",children:[p.jsx("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full border border-border bg-muted text-xs font-medium tabular-nums text-foreground/70",children:I.index}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:I.location}),I.severity&&p.jsx(Ai,{variant:cy[I.severity],children:I.severity}),I.author&&p.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:["@",I.author]}),I.replyCount>0&&p.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:["+",I.replyCount," ",I.replyCount===1?"reply":"replies"]})]}),p.jsx("p",{className:"mt-0.5 line-clamp-3 whitespace-pre-wrap text-sm leading-snug",children:I.body}),I.note!==void 0&&g!==I.key&&p.jsxs("p",{className:"mt-1.5 flex w-fit max-w-full items-start gap-1.5 rounded-r border-l-2 border-primary/50 bg-primary/[0.06] py-0.5 pr-2 pl-2 text-sm",children:[p.jsx(nc,{className:"mt-0.5 size-3.5 shrink-0 text-primary/70"}),p.jsx("span",{className:"min-w-0 whitespace-pre-wrap",children:I.note})]})]}),p.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-muted-foreground opacity-70 transition-opacity group-hover/row:opacity-100",children:[p.jsx(Fe,{label:"Show in diff",children:p.jsx(be,{variant:"ghost",size:"icon-sm","aria-label":`Show ${I.location} in diff`,onClick:()=>c(Q),children:p.jsx(s3,{})})}),p.jsx(Fe,{label:I.note?"Edit note":"Add a note",children:p.jsx(be,{variant:"ghost",size:"icon-sm","aria-label":`${I.note?"Edit":"Add"} note for ${I.location}`,className:pe(I.note&&"text-primary opacity-100"),onClick:()=>m(j=>j===I.key?null:I.key),children:p.jsx(nc,{})})}),p.jsx(Fe,{label:"Remove from plan",children:p.jsx(be,{variant:"ghost",size:"icon-sm","aria-label":`Remove ${I.location} from plan`,onClick:()=>o(Q),children:p.jsx(Ma,{})})})]})]}),g===I.key&&p.jsx(N2,{initial:I.note??"",onSave:j=>{a(Q,j),m(null)},onCancel:()=>m(null)})]},I.key)})})}),p.jsx(RG,{open:w,onToggle:()=>C(I=>!I),prompt:dB(e)}),p.jsxs("footer",{className:"shrink-0 border-t border-border bg-muted/20 px-4 py-2.5",children:[n&&p.jsxs("p",{className:"mb-2 text-xs text-muted-foreground",children:["An agent is already running on"," ",p.jsx("span",{className:"font-mono",children:t}),". Sending adds the plan to the conversation it is already having."]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(be,{variant:"ghost",size:"sm",onClick:u,children:"Clear plan"}),p.jsx("div",{className:"flex-1"}),k.choices.includes("inject")&&p.jsxs(be,{variant:"outline",size:"sm",onClick:()=>h("new-session"),disabled:!k.canSend,children:[p.jsx(_A,{})," Restart with plan"]}),p.jsxs(be,{size:"sm",onClick:()=>h(k.primary),disabled:!k.canSend,children:[i?p.jsx(ho,{className:"animate-spin"}):p.jsx(af,{}),i?"Sending…":k.primary==="inject"?"Send to agent":"Start agent with plan"]})]})]})]})}function RG({open:e,onToggle:t,prompt:n}){return p.jsxs("section",{className:"shrink-0 border-t border-border",children:[p.jsxs("button",{type:"button",onClick:t,"aria-expanded":e,className:"flex h-8 w-full items-center gap-1.5 px-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground",children:[e?p.jsx(Er,{className:"size-3.5"}):p.jsx(Ci,{className:"size-3.5"}),"Prompt preview"]}),e&&p.jsx("pre",{className:"mx-4 mb-3 max-h-72 overflow-auto rounded-md border border-border bg-muted/40 p-3 font-mono text-xs leading-relaxed text-foreground/90",children:n})]})}function QG({body:e,severity:t,onBodyChange:n,onSeverityChange:i,onSave:o,onCancel:a}){return p.jsxs("div",{className:"space-y-2 p-3",children:[p.jsx(wc,{autoFocus:!0,value:e,onChange:c=>n(c.target.value),onKeyDown:c=>{(c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),o()),c.key==="Escape"&&(c.preventDefault(),a())},className:"min-h-28 bg-background"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(ff,{value:t,onValueChange:c=>i(c),children:[p.jsx(pf,{className:"w-32",children:p.jsx(hf,{})}),p.jsx(mf,{children:gf.map(c=>p.jsx(ss,{value:c,children:c},c))})]}),p.jsx("div",{className:"flex-1"}),p.jsx(be,{variant:"ghost",size:"sm",onClick:a,children:"Cancel"}),p.jsxs(be,{size:"sm",onClick:o,disabled:!e.trim(),children:[p.jsx(Lr,{})," Save"]})]})]})}function d1({line:e,tokens:t}){return p.jsxs("div",{className:pe("flex min-w-max",Ry[e.type]),children:[p.jsxs("span",{className:"flex shrink-0 select-none bg-background/40 text-muted-foreground/70",children:[p.jsx("span",{className:"w-10 pr-2 text-right tabular-nums",children:e.oldLine??""}),p.jsx("span",{className:"w-10 pr-2 text-right tabular-nums",children:e.newLine??""}),p.jsx(Qy,{type:e.type})]}),p.jsx(Ty,{line:e,tokens:t})]})}function TG({filename:e,rows:t}){const{resolved:n}=us(),i=x.useMemo(()=>t.map(f=>f.line),[t]),{tokens:o}=bP(e,i,n);if(t.length===0)return p.jsx("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",children:"This comment's lines aren't in the current diff (outdated or outside the changed hunks)."});const a=t.findIndex(f=>f.anchored),c=t.reduce((f,g,m)=>g.anchored?m:f,-1),u=[];let h=0;for(;h<t.length;)a>=0&&h===a?(u.push(p.jsx("div",{className:"border-y border-primary/40 bg-primary/5",children:t.slice(a,c+1).map(({line:f},g)=>p.jsx(d1,{line:f,tokens:o?.[a+g]},W6(f)))},"anchored-block")),h=c+1):(u.push(p.jsx(d1,{line:t[h].line,tokens:o?.[h]},h)),h+=1);return p.jsx("div",{className:"overflow-x-auto rounded-md border border-border bg-card font-mono text-sm leading-5",children:u})}function jG(e,t){const{onNext:n,onPrev:i,onEdit:o,onPost:a,onDiscard:c,onExit:u}=t;x.useEffect(()=>{if(!e)return;const h={ArrowDown:n,ArrowRight:n,j:n,ArrowUp:i,ArrowLeft:i,k:i,e:o,p:a,Enter:a,d:c,Escape:u},f=g=>{const m=g.target;if(m&&/^(INPUT|TEXTAREA|SELECT)$/.test(m.tagName))return;const y=h[g.key];y&&(g.preventDefault(),y())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,n,i,o,a,c,u])}function DG({draft:e,pos:t,total:n,counts:i,snippet:o,active:a,busy:c,atStart:u,atEnd:h,onPrev:f,onNext:g,onExit:m,onOpenInDiff:y,onPost:b,onDiscard:w,onSave:C}){const[E,S]=x.useState(!1),[R,k]=x.useState(e.body),[I,T]=x.useState(e.severity),Q=()=>{k(e.body),T(e.severity),S(!0)};jG(!E&&a,{onNext:g,onPrev:f,onEdit:Q,onPost:b,onDiscard:w,onExit:m});const j=()=>{C(R.trim(),I),S(!1)};return p.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[p.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-3 border-b border-border px-3",children:[p.jsx("span",{className:"text-sm font-medium",children:"Review ready"}),p.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums",children:[t," / ",n]}),p.jsx("span",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:gf.filter(_=>i[_]>0).map(_=>p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx("span",{className:pe("size-2 rounded-full",IB[_])}),i[_]," ",_]},_))}),p.jsx("div",{className:"flex-1"}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(Fe,{label:"Previous comment (← / ↑)",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:f,disabled:u,"aria-label":"Previous comment",children:p.jsx(BL,{})})}),p.jsx(Fe,{label:"Next comment (→ / ↓)",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:g,disabled:h,"aria-label":"Next comment",children:p.jsx(Ci,{})})})]}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:m,children:[p.jsx(Ma,{})," Close"]})]}),p.jsx("div",{className:"h-0.5 shrink-0 bg-muted",children:p.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${t/n*100}%`}})}),p.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:p.jsxs("div",{className:"mx-auto max-w-3xl space-y-3 p-4",children:[p.jsxs("button",{type:"button",onClick:y,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground",title:"Open this file in the diff",children:[p.jsx(pk,{className:"size-3.5"}),p.jsxs("span",{className:"font-mono",children:[e.file,":",e.lineStart,e.lineEnd!==e.lineStart?`-${e.lineEnd}`:""]}),p.jsx(bL,{className:"size-3"})]}),p.jsx(TG,{filename:e.file,rows:o}),p.jsxs("div",{className:"rounded-lg border border-dashed border-border bg-card",children:[p.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-1.5",children:[p.jsx(Ai,{variant:cy[e.severity],children:e.severity}),p.jsx("span",{className:"text-sm text-muted-foreground",children:"Draft comment"})]}),E?p.jsx(QG,{body:R,severity:I,onBodyChange:k,onSeverityChange:T,onSave:j,onCancel:()=>S(!1)}):p.jsx("div",{className:"p-3",children:p.jsx(wf,{markdown:e.body})}),!E&&p.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border bg-muted/20 px-3 py-2",children:[p.jsxs(be,{variant:"ghost",size:"sm",onClick:Q,disabled:c,children:[p.jsx(Ak,{})," Edit ",p.jsx(km,{children:"e"})]}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:w,disabled:c,children:[p.jsx(bk,{})," Discard ",p.jsx(km,{children:"d"})]}),p.jsxs(be,{variant:"ghost",size:"sm",onClick:g,disabled:h,children:[p.jsx(t5,{})," Skip"]}),p.jsx("div",{className:"flex-1"}),p.jsxs(be,{size:"sm",onClick:b,disabled:c,children:[c?p.jsx(ho,{className:"animate-spin"}):p.jsx(af,{}),"Post"," ",p.jsx(km,{className:"border-primary-foreground/30 text-primary-foreground/80",children:"↵"})]})]})]})]})})]})}function km({children:e,className:t}){return p.jsx("kbd",{className:pe("ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded border border-border px-1 font-sans text-[10px] text-muted-foreground",t),children:e})}function MG({prId:e,headSha:t,drafts:n,filesByName:i,fileOrder:o,active:a,onExit:c,onOpenInDiff:u}){const{repo:h}=hn(),f=Kk(h.cwd),g=$k(h.cwd),m=ey(h.cwd),y=x.useMemo(()=>uP(n,o),[n,o]),[b,w]=x.useState(0),C=Math.min(b,Math.max(0,y.length-1));C!==b&&w(C);const E=y[C];return y.length===0?p.jsx(NG,{onExit:c}):p.jsx(DG,{draft:E,pos:C+1,total:y.length,counts:EB(y),snippet:dP(i.get(E.file)??[],E.side,E.lineStart,E.lineEnd),active:a,busy:m.isPending||f.isPending||g.isPending,atStart:C===0,atEnd:C>=y.length-1,onPrev:()=>w(R=>Math.max(0,R-1)),onNext:()=>w(R=>Math.min(y.length-1,R+1)),onExit:c,onOpenInDiff:()=>u(E.file),onPost:()=>m.mutate({prId:e,ids:[E.id],headSha:t},{onSuccess:()=>Ee.success("Comment posted"),onError:R=>Ee.error(`Post failed: ${Xe(R)}`)}),onDiscard:()=>g.mutate({prId:e,id:E.id},{onError:R=>Ee.error(Xe(R))}),onSave:(R,k)=>f.mutate({prId:e,id:E.id,patch:{body:R,severity:k}},{onError:I=>Ee.error(Xe(I))})},E.id)}function NG({onExit:e}){return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[p.jsx("span",{className:"flex size-12 items-center justify-center rounded-full bg-success/15",children:p.jsx(Lr,{className:"size-6 text-success"})}),p.jsxs("div",{children:[p.jsx("p",{className:"text-lg font-semibold",children:"All drafts handled"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Every draft comment has been posted or discarded."})]}),p.jsx(be,{variant:"outline",size:"sm",onClick:e,children:"Back to diff"})]})}function Bm({visible:e,children:t}){return p.jsx("div",{className:pe("absolute inset-0",!e&&"invisible"),children:t})}function _G({effMode:e,pr:t,prId:n,branch:i,baseBranch:o,sessionName:a,active:c,files:u,filesByName:h,fileOrder:f,threadsByFile:g,draftsByFile:m,general:y,hideResolved:b,drafts:w,hasDrafts:C,commentsLoading:E,diffPending:S,diffError:R,focusThreadId:k,scrollRef:I,jumpRef:T,navCount:Q,navIndex:j,onPrev:_,onNext:F,onExitReview:O,onOpenInDiff:H,plan:U}){const J=t?.headSha,Y=b?y.filter($=>!$.isResolved):y;return p.jsxs("div",{className:"relative h-full min-h-0",children:[a&&p.jsx(Bm,{visible:e==="agent",children:p.jsx(T6,{name:a,active:c&&e==="agent"})}),C&&p.jsx(Bm,{visible:e==="review",children:e==="review"&&p.jsx(MG,{prId:n,headSha:J,drafts:w,filesByName:h,fileOrder:f,active:c,onExit:O,onOpenInDiff:H})}),U&&e==="plan"&&p.jsx("div",{className:"absolute inset-0",children:p.jsx(IG,{items:U.items,branch:i,agentRunning:U.agentRunning,sending:U.sending,onRemove:U.onRemove,onAnnotate:U.onAnnotate,onShowInDiff:U.onShowInDiff,onClear:U.onClear,onSend:U.onSend,openNoteFor:U.openNoteFor})}),t&&e==="overview"&&p.jsx("div",{className:"absolute inset-0",children:p.jsx(BG,{pr:t})}),p.jsx(Bm,{visible:e==="diff",children:p.jsx(CG,{prId:n,headSha:J,sourceBranch:i,targetBranch:o,files:u,threadsByFile:g,draftsByFile:m,generalThreads:Y,commentsLoading:E,diffLoading:S,diffError:R?String(R.message):null,focusThreadId:k,scrollRef:I,jumpRef:T,navCount:Q,navIndex:j,onPrev:_,onNext:F})})]})}function L2({branch:e}){const t=Vk();return p.jsx(Fe,{label:"Open worktree in editor",children:p.jsxs(be,{variant:"ghost",size:"sm",disabled:t.isPending,onClick:()=>t.mutate(e,{onSuccess:({editor:n})=>Ee.success(`Opened in ${n}`),onError:n=>Ee.error(Xe(n))}),children:[p.jsx(VL,{})," Editor"]})})}function OG({ci:e}){if(!e||e==="none")return null;const t=e==="succeeded"?"success":e==="failed"?"destructive":"warning";return p.jsxs(Ai,{variant:t,children:[e==="succeeded"&&p.jsx(vc,{}),e==="failed"&&p.jsx(sf,{}),e==="pending"&&p.jsx(ck,{}),"CI ",e]})}function zG(e){return e==="approved"?"bg-success":e==="rejected"?"bg-destructive":e==="changes-requested"||e==="waiting-for-author"?"bg-warning":e==="no-response"?"bg-muted-foreground/50":e==="declined"?"bg-muted-foreground":""}function LG({reviewers:e}){return e.length===0?null:p.jsx("span",{className:"flex items-center gap-1.5",children:e.slice(0,6).map(t=>p.jsx(Fe,{label:`${t.displayName}: ${t.decision.replaceAll("-"," ")}`,children:p.jsxs("span",{className:"relative",children:[p.jsx(kc,{name:t.displayName,size:"xs"}),p.jsx("span",{className:pe("absolute -right-0.5 -bottom-0.5 size-1.5 rounded-full ring-2 ring-background",zG(t.decision))})]})},t.identifier))})}function PG({pr:e}){const t=e.reviewers??[];return p.jsxs("header",{className:"flex h-10 shrink-0 items-center gap-3 border-b border-border px-3",children:[p.jsx(of,{className:"size-4 shrink-0 text-info"}),p.jsxs("span",{className:"flex min-w-0 shrink items-center gap-2",children:[p.jsx("span",{className:"truncate font-medium",children:e.title}),p.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",e.id]}),p.jsx(Fe,{label:"Copy branch name",children:p.jsxs("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(e.sourceBranch),Ee.success("Branch name copied")},className:"hidden min-w-0 items-center gap-1 truncate rounded px-1 font-mono text-xs text-muted-foreground hover:bg-accent hover:text-foreground sm:flex",children:[p.jsxs("span",{className:"truncate",children:[e.sourceBranch," → ",e.targetBranch]}),p.jsx(ZL,{className:"size-3 shrink-0"})]})})]}),p.jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-border"}),p.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm",children:[p.jsx(Fe,{label:`Opened by ${e.createdByDisplayName}`,children:p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(kc,{name:e.createdByDisplayName,size:"xs"}),p.jsx("span",{className:"hidden truncate text-muted-foreground md:inline",children:e.createdByDisplayName})]})}),e.isDraft&&p.jsx(Ai,{variant:"outline",children:"Draft"}),p.jsx(OG,{ci:e.buildStatus}),p.jsx(LG,{reviewers:t}),(e.activeCommentCount??0)>0&&p.jsx(Fe,{label:Fk(e.activeCommentCount??0),children:p.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[p.jsx(po,{className:"size-3.5"}),e.activeCommentCount," unresolved"]})})]}),p.jsx("div",{className:"flex-1"}),p.jsx(L2,{branch:e.sourceBranch}),p.jsx(Fe,{label:"Open on the provider",children:p.jsxs(be,{variant:"ghost",size:"sm",onClick:()=>{window.kirby.openExternal(e.url)},children:[p.jsx(cg,{})," Open"]})})]})}function FG({branch:e,baseBranch:t,fileCount:n}){return p.jsxs("header",{className:"flex h-10 shrink-0 items-center gap-3 border-b border-border px-3",children:[p.jsx(Da,{className:"size-4 shrink-0 text-muted-foreground"}),p.jsxs("span",{className:"flex min-w-0 shrink items-center gap-2",children:[p.jsx("span",{className:"truncate font-medium",children:e}),p.jsxs("span",{className:"hidden truncate font-mono text-xs text-muted-foreground sm:inline",children:["diff vs ",t]})]}),p.jsx("div",{className:"flex-1"}),p.jsxs("span",{className:"hidden shrink-0 text-xs text-muted-foreground lg:inline",children:[n," file",n===1?"":"s"," changed"]}),p.jsx(L2,{branch:e})]})}function HG({items:e,activeId:t,onJump:n,onContextMenu:i}){const[o,a]=x.useState(!0);if(e.length===0)return null;const c=e.filter(h=>!h.resolved).length,u=e.filter(h=>h.kind==="draft").length;return p.jsxs("div",{className:"flex min-h-0 flex-col border-t border-border",children:[p.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex h-8 shrink-0 items-center gap-1.5 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground",children:[o?p.jsx(Er,{className:"size-3.5"}):p.jsx(Ci,{className:"size-3.5"}),p.jsx(po,{className:"size-3.5"}),"Comments",p.jsxs("span",{className:"ml-auto rounded-full bg-muted px-1.5 text-[10px] font-medium tabular-nums",children:[u>0&&`${u} draft · `,c," open"]})]}),o&&p.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-2",children:e.map(h=>p.jsxs("button",{type:"button",onClick:()=>n(h),onContextMenu:f=>{i&&(f.preventDefault(),i(h))},className:pe("flex w-full items-start gap-2 px-3 py-1.5 text-left hover:bg-accent",t===h.id&&"bg-sidebar-active",h.resolved&&"opacity-60"),children:[h.kind==="draft"?p.jsx("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center",children:p.jsx("span",{className:pe("size-2.5 rounded-full",h.severity?IB[h.severity]:"bg-primary")})}):p.jsx(kc,{name:h.author,size:"xs",className:"mt-0.5"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[h.kind==="draft"?p.jsxs("span",{className:"flex items-center gap-1 font-medium text-foreground",children:[p.jsx(TA,{className:"size-3"})," Draft"]}):p.jsx("span",{className:"font-medium text-foreground",children:h.author}),p.jsx("span",{className:"truncate font-mono",children:h.where}),h.resolved&&p.jsx(vc,{className:"ml-auto size-3 shrink-0 text-success"})]}),p.jsx("span",{className:"line-clamp-2 text-sm leading-snug",children:h.preview})]})]},h.id))})]})}function UG(e){const t={kind:"dir",name:"",path:"",children:[]};for(const i of e){const o=i.path.split("/");let a=t;for(let c=0;c<o.length-1;c++){const u=o[c];let h=a.children.find(f=>f.kind==="dir"&&f.name===u);h||(h={kind:"dir",name:u,path:o.slice(0,c+1).join("/"),children:[]},a.children.push(h)),a=h}a.children.push({kind:"file",name:o[o.length-1],entry:i})}const n=i=>{let o=i;for(;o.children.length===1&&o.children[0].kind==="dir";){const a=o.children[0];o={kind:"dir",name:o.name?`${o.name}/${a.name}`:a.name,path:a.path,children:a.children}}return{...o,children:o.children.map(a=>a.kind==="dir"?n(a):a).sort((a,c)=>a.kind!==c.kind?a.kind==="dir"?-1:1:a.name.localeCompare(c.name))}};return n(t).children}function qG({entries:e,loading:t,selected:n,onSelect:i}){const[o,a]=x.useState(!0),c=x.useMemo(()=>UG(e),[e]),u=x.useMemo(()=>e.reduce((h,f)=>({additions:h.additions+f.additions,deletions:h.deletions+f.deletions}),{additions:0,deletions:0}),[e]);return p.jsxs("div",{className:pe("flex flex-col",o?"h-full":"shrink-0"),children:[p.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex h-8 shrink-0 items-center gap-1.5 px-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground","aria-expanded":o,children:[o?p.jsx(Er,{className:"size-3.5"}):p.jsx(Ci,{className:"size-3.5"}),p.jsx(l3,{className:"size-3.5"}),"Files",e.length>0&&p.jsxs("span",{className:"ml-auto font-mono font-normal normal-case tracking-normal tabular-nums",children:[p.jsxs("span",{className:"text-success",children:["+",u.additions]})," ",p.jsxs("span",{className:"text-destructive",children:["−",u.deletions]})]})]}),o&&p.jsxs(Cf,{className:"min-h-0 flex-1",children:[t&&p.jsxs("div",{className:"space-y-2 px-3 py-1",children:[p.jsx(Xt,{className:"h-4 w-3/4"}),p.jsx(Xt,{className:"h-4 w-1/2"}),p.jsx(Xt,{className:"h-4 w-2/3"})]}),p.jsx("div",{className:"pb-2",children:c.map(h=>p.jsx(P2,{node:h,depth:0,selected:n,onSelect:i},h.kind==="dir"?h.path:h.entry.path))})]})]})}function P2({node:e,depth:t,selected:n,onSelect:i}){const[o,a]=x.useState(!0),c={paddingLeft:8+t*12};if(e.kind==="dir")return p.jsxs("div",{children:[p.jsxs("button",{type:"button",onClick:()=>a(f=>!f),style:c,className:"flex h-[22px] w-full items-center gap-1 pr-2 text-base text-foreground/90 hover:bg-accent",children:[p.jsx(Ci,{className:pe("size-3.5 shrink-0 text-muted-foreground transition-transform",o&&"rotate-90")}),p.jsx(d3,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx("span",{className:"truncate",children:e.name})]}),o&&e.children.map(f=>p.jsx(P2,{node:f,depth:t+1,selected:n,onSelect:i},f.kind==="dir"?f.path:f.entry.path))]});const{entry:u}=e,h=n===u.path;return p.jsxs("button",{type:"button",onClick:()=>i(u.path),style:{paddingLeft:8+t*12+16},title:u.path,className:pe("flex h-[22px] w-full items-center gap-1.5 pr-2 text-base hover:bg-accent",h?"bg-sidebar-active text-foreground":"text-foreground/90"),children:[p.jsx(pk,{className:"size-3.5 shrink-0 text-muted-foreground"}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:e.name}),(u.drafts??0)>0&&p.jsx("span",{className:"rounded border border-dashed border-border px-1 text-[10px] text-muted-foreground",title:`${u.drafts} draft comment${u.drafts===1?"":"s"}`,children:u.drafts}),u.comments>0&&p.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-warning",children:[p.jsx(po,{className:"size-3"}),u.comments]}),p.jsxs("span",{className:"shrink-0 font-mono text-xs tabular-nums",children:[p.jsxs("span",{className:"text-success",children:["+",u.additions]})," ",p.jsxs("span",{className:"text-destructive",children:["−",u.deletions]})]})]})}function GG({running:e,busy:t,hasSession:n,agentActive:i,onSelectAgent:o,onLaunch:a,onStop:c}){return e?p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsxs("button",{type:"button",onClick:o,className:pe("flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-base transition-colors",i?"bg-sidebar-active text-foreground":"hover:bg-sidebar-accent"),children:[p.jsxs("span",{className:"relative flex size-4 shrink-0 items-center justify-center",children:[p.jsx(TA,{className:"size-4 text-muted-foreground"}),p.jsxs("span",{className:"absolute -right-0.5 -bottom-0.5 flex size-2",children:[p.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60"}),p.jsx("span",{className:"relative inline-flex size-2 rounded-full bg-success ring-2 ring-sidebar"})]})]}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:"Agent"}),p.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:"running"})]}),p.jsx(Fe,{label:"Stop agent",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:c,"aria-label":"Stop agent",children:p.jsx(r5,{})})})]}):p.jsxs(be,{className:"w-full",size:"sm",onClick:a,disabled:t,children:[p.jsx(Id,{})," ",t?"Working…":n?"Relaunch agent":"Launch agent"]})}function YG({drafts:e,reviewActive:t,onReview:n,postingAll:i,onPostAll:o}){return e.length===0?null:p.jsxs("div",{className:"shrink-0 border-b border-border px-2 py-2",children:[p.jsxs("button",{type:"button",onClick:n,className:pe("flex w-full items-center gap-2 rounded-md border px-2.5 py-1.5 text-left transition-colors",t?"border-primary bg-primary/10":"border-border hover:bg-sidebar-accent"),children:[p.jsx(UL,{className:"size-4 shrink-0 text-primary"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block text-base font-medium",children:"Review ready"}),p.jsx("span",{className:"block text-xs text-muted-foreground",children:kP(EB(e))})]}),p.jsx("span",{className:"shrink-0 rounded-full bg-primary px-1.5 text-xs font-medium text-primary-foreground tabular-nums",children:e.length})]}),p.jsxs(be,{variant:"outline",size:"sm",className:"mt-2 w-full",onClick:o,disabled:i,children:[i?p.jsx(ho,{className:"animate-spin"}):p.jsx(af,{}),"Post all ",e.length," draft",e.length===1?"":"s"]})]})}function KG({planCount:e,planNoted:t,planActive:n,onPlan:i}){return e===0?null:p.jsx("div",{className:"shrink-0 border-b border-border px-2 py-2",children:p.jsxs("button",{type:"button",onClick:i,className:pe("flex w-full items-center gap-2 rounded-md border px-2.5 py-1.5 text-left transition-colors",n?"border-primary bg-primary/10":"border-border hover:bg-sidebar-accent"),children:[p.jsx(uk,{className:"size-4 shrink-0 text-primary"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block text-base font-medium",children:"Plan"}),p.jsxs("span",{className:"block text-xs text-muted-foreground",children:[e," comment",e===1?"":"s",t>0&&` · ${t} with a note`]})]}),p.jsx("span",{className:"shrink-0 rounded-full bg-primary px-1.5 text-xs font-medium text-primary-foreground tabular-nums",children:e})]})})}function $G({hasPr:e,overviewActive:t,onOverview:n,running:i,busy:o,hasSession:a,agentActive:c,onSelectAgent:u,onLaunch:h,onStop:f,onHide:g,drafts:m,reviewActive:y,onReview:b,postingAll:w,onPostAll:C,planCount:E,planNoted:S,planActive:R,onPlan:k,entries:I,diffLoading:T,selectedFile:Q,onSelectFile:j,commentItems:_,activeCommentId:F,onJumpComment:O,onCommentContextMenu:H}){return p.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-sidebar/60",children:[p.jsxs("div",{className:"flex h-8 shrink-0 items-center justify-between pr-1 pl-3",children:[p.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Review"}),p.jsx(Fe,{label:"Hide review sidebar",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:g,"aria-label":"Hide review sidebar",children:p.jsx(mk,{})})})]}),e&&p.jsx("div",{className:"shrink-0 px-2 pb-1",children:p.jsxs("button",{type:"button",onClick:n,className:pe("flex h-7 w-full min-w-0 items-center gap-2 rounded-md px-2 text-base transition-colors",t?"bg-sidebar-active text-foreground":"hover:bg-sidebar-accent"),children:[p.jsx(wL,{className:"size-4 shrink-0 text-muted-foreground"}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:"Overview"})]})}),p.jsx("div",{className:"shrink-0 border-b border-border px-2 pb-2",children:p.jsx(GG,{running:i,busy:o,hasSession:a,agentActive:c,onSelectAgent:u,onLaunch:h,onStop:f})}),p.jsx(YG,{drafts:m,reviewActive:y,onReview:b,postingAll:w,onPostAll:C}),p.jsx(KG,{planCount:E,planNoted:S,planActive:R,onPlan:k}),p.jsxs(Cf,{className:"min-h-0 flex-1",children:[p.jsx(qG,{entries:I,loading:T,selected:Q,onSelect:j}),p.jsx(HG,{items:_,activeId:F,onJump:O,onContextMenu:H})]})]})}const VG=[];function JG(e,t,n){const[i,o]=x.useState(e);e!==i&&(o(e),e&&n());const[a,c]=x.useState(t);t!==a&&(c(t),t&&e&&n())}function f1({pr:e,branch:t,baseBranch:n,sessionName:i,running:o,active:a,busy:c,onLaunch:u,onStop:h}){const{repo:f}=hn(),g=e?.id??0,m=e==null,y=sL(f.cwd,t,n,{enabled:!m}),b=oL(f.cwd,t,n,{enabled:m,live:o}),w=m?b:y,C=lL(f.cwd,g),E=fL(f.cwd,g),S=ey(f.cwd),R=ay(),k=x.useRef(null),[I,T]=x.useState(o?"agent":"diff"),[Q,j]=x.useState(!1);JG(o,a,()=>T("agent"));const _=aL(w.data),F=_.data??VG,O=H8(w.isLoading,w.data,_.data),H=x.useMemo(()=>C.data?.threads??[],[C.data]),U=x.useMemo(()=>C.data?.generalComments??[],[C.data]),J=x.useMemo(()=>U8(E.data??[]),[E.data]),Y=x.useMemo(()=>q8(J),[J]),$=x.useMemo(()=>G8(H),[H]),P=x.useMemo(()=>new Map(F.map(([ae],ce)=>[ae,ce])),[F]),V=x.useMemo(()=>new Map(F),[F]),ie=J.length>0,de=x.useMemo(()=>Y8(F,$,Y),[F,$,Y]),D=x.useCallback(()=>T("diff"),[]),z=t6({files:F,general:U,inlineThreads:H,drafts:J,hideResolved:R.hideResolved,onShowDiff:D}),L=x.useCallback(ae=>z.jumpToId(ae.id,ae.file),[z]),M=x.useCallback(()=>T("agent"),[]),X=x.useCallback(()=>T("plan"),[]),ee=x.useMemo(()=>[...H,...U],[H,U]),ne=s6({cwd:f.cwd,pr:e,running:o,paneRef:k,threads:ee,drafts:J,onSent:M,onShowInDiff:L,onOpenPlan:X}),fe=F8(I,{hasSession:!!i,hasDrafts:ie,hasPr:e!=null,hasPlan:ne.count>0});return p.jsxs("div",{ref:k,className:"flex h-full min-h-0 min-w-0 flex-col",children:[e?p.jsx(PG,{pr:e}):p.jsx(FG,{branch:t,baseBranch:n,fileCount:F.length}),p.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[Q?p.jsx("div",{className:"flex w-9 shrink-0 flex-col items-center border-r border-border bg-sidebar pt-1",children:p.jsx(Fe,{label:"Show review sidebar",side:"right",children:p.jsx(be,{variant:"ghost",size:"icon",onClick:()=>j(!1),"aria-label":"Show review sidebar",children:p.jsx(gk,{})})})}):null,p.jsxs(JA,{orientation:"horizontal",className:"min-h-0 min-w-0 flex-1",children:[!Q&&p.jsxs(p.Fragment,{children:[p.jsx(ic,{id:"review-rail",defaultSize:"270px",minSize:"200px",maxSize:"45%",className:"min-w-0",children:p.jsx($G,{hasPr:!!e,overviewActive:fe==="overview",onOverview:()=>T("overview"),running:o,busy:c,hasSession:!!i,agentActive:fe==="agent",onSelectAgent:()=>T("agent"),onLaunch:u,onStop:h,onHide:()=>j(!0),drafts:J,reviewActive:fe==="review",onReview:()=>T("review"),postingAll:S.isPending,onPostAll:()=>S.mutate({prId:g,headSha:e?.headSha},{onSuccess:ae=>Ee.success(`Posted ${ae} comment${ae===1?"":"s"}`),onError:ae=>Ee.error(`Post failed: ${Xe(ae)}`)}),planCount:ne.count,planNoted:ne.noted,planActive:fe==="plan",onPlan:X,entries:de,diffLoading:O,selectedFile:fe==="diff"?z.selectedFile:null,onSelectFile:z.jumpToFile,commentItems:z.items,activeCommentId:fe==="diff"?z.focusId:null,onJumpComment:z.jumpToItem,onCommentContextMenu:ae=>ne.onCommentContextMenu(ae.id)})}),p.jsx(WA,{className:"relative w-px bg-border transition-colors after:absolute after:inset-y-0 after:-left-1 after:w-2 hover:bg-primary data-[resize-handle-state=drag]:bg-primary"})]}),p.jsx(ic,{id:"review-content",minSize:"30%",className:"min-w-0",children:p.jsx(_G,{effMode:fe,pr:e,prId:g,branch:t,baseBranch:n,sessionName:i,active:a,files:F,filesByName:V,fileOrder:P,threadsByFile:$,draftsByFile:Y,general:U,hideResolved:R.hideResolved,drafts:J,hasDrafts:ie,commentsLoading:C.isLoading,diffPending:O,diffError:w.error,focusThreadId:z.focusId,scrollRef:z.scrollRef,jumpRef:z.jumpRef,navCount:z.items.length,navIndex:z.navIndex,onPrev:()=>z.step(-1),onNext:()=>z.step(1),onExitReview:D,onOpenInDiff:z.jumpToFile,plan:ne.wiring})})]})]})]})}function XG({pr:e,hasWorktree:t,onChoose:n,onClose:i}){const[o,a]=x.useState("session"),[c,u]=x.useState(""),h=()=>{n(o==="session"?{kind:"session"}:o==="review"?{kind:"review"}:{kind:"review",instruction:c.trim()||void 0})};return p.jsx(Na,{open:!0,onOpenChange:f=>!f&&i(),children:p.jsxs(_a,{className:"sm:max-w-lg",onKeyDown:f=>{f.key==="Enter"&&!(o==="instruct"&&!(f.metaKey||f.ctrlKey))&&(f.preventDefault(),h())},children:[p.jsxs(uf,{children:[p.jsxs(Oa,{className:"flex items-center gap-2",children:[p.jsxs("span",{className:"text-muted-foreground",children:["#",e.id]}),p.jsx("span",{className:"truncate",children:e.title||e.sourceBranch})]}),p.jsxs(xc,{children:[p.jsx("span",{className:"font-mono",children:e.sourceBranch})," →"," ",p.jsx("span",{className:"font-mono",children:e.targetBranch})," by"," ",e.createdByDisplayName,!t&&" · a worktree will be created first"]})]}),p.jsx("p",{className:"text-base",children:"What would you like to do?"}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Im,{mode:o,setMode:a,go:h,value:"session",icon:Id,title:"Start / continue session",description:"Open the agent in this worktree with no task. Resumes a prior conversation when the agent supports it."}),p.jsx(Im,{mode:o,setMode:a,go:h,value:"review",icon:J3,title:"Start / continue review",description:"Ask the agent to review the pull request. Its comments appear as drafts in the diff for you to edit and post."}),p.jsx(Im,{mode:o,setMode:a,go:h,value:"instruct",icon:I3,title:"Review with instructions…",description:"Same as a review, with extra guidance for the agent."}),o==="instruct"&&p.jsx(wc,{autoFocus:!0,value:c,onChange:f=>u(f.target.value),placeholder:"e.g. Focus on error handling and the public API surface. ⌘/Ctrl+Enter to start.",className:"min-h-20"})]}),p.jsxs(ry,{children:[p.jsx(be,{variant:"ghost",onClick:i,children:"Cancel"}),p.jsxs(be,{onClick:h,disabled:o==="instruct"&&!c.trim(),children:[p.jsx(Id,{}),o==="session"?"Start session":"Start review"]})]})]})})}function Im({mode:e,setMode:t,go:n,value:i,icon:o,title:a,description:c}){const u=e===i;return p.jsxs("button",{type:"button",onClick:()=>t(i),onDoubleClick:()=>{t(i),i!=="instruct"&&n()},className:pe("flex w-full items-start gap-3 rounded-md border px-3 py-2 text-left transition-colors",u?"border-primary bg-primary/10":"border-border hover:bg-accent"),"aria-pressed":u,children:[p.jsx(o,{className:pe("mt-0.5 size-4 shrink-0",u?"text-primary":"text-muted-foreground")}),p.jsxs("span",{className:"min-w-0",children:[p.jsx("span",{className:"block font-medium",children:a}),p.jsx("span",{className:"block text-sm text-muted-foreground",children:c})]})]})}function WG(e,t,n){const i=to(e)??(t?to(t):void 0);return{sessionName:c4(i,n),running:ka(e)||(t?ka(t):!1),hasWorktree:!!i||Pk(e),pr:e.pr??t?.pr}}function ZG({item:e,items:t,itemKey:n,active:i,onPin:o}){const{repo:a}=hn(),c=Yk(a.cwd),u=Q4(a.cwd),h=ty(a.cwd),f=cL(a.cwd),g=ZA(a.cwd),m=x.useRef(null),[y,b]=x.useState(!1),[w,C]=x.useState(i);i!==w&&(C(i),i||b(!1));const E=e?Dn(e):"",S=x.useMemo(()=>t.find(Y=>Dn(Y)===E&&to(Y)),[t,E]),R=ok(a.cwd),k=x.useMemo(()=>new Set((R.data??[]).map($=>$.replace(/^origin\//,""))).has("main")?"main":"master",[R.data]);if(!e)return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-muted-foreground",children:[p.jsx(ho,{className:"size-6 animate-spin"}),p.jsxs("p",{className:"text-sm",children:["Preparing ",n.replace(/^[a-z]+:/,""),"…"]})]});const{sessionName:I,running:T,hasWorktree:Q,pr:j}=WG(e,S,f.data??[]),_=()=>{const Y=m.current;return Y?oy(Y.getBoundingClientRect(),.6):{}},F=async()=>{if(o(),!Q){const Y=Ee.loading(`Checking out ${E}…`);try{await g.mutateAsync(E),Ee.success(`Worktree ready: ${E}`,{id:Y})}catch($){Ee.error(Xe($),{id:Y});return}}c.mutate({branch:E,intent:"continue-or-blank",..._()},{onError:Y=>Ee.error(Xe(Y))})},O=()=>{o(),j?b(!0):F()},H=Y=>{if(b(!1),Y.kind==="session"){F();return}if(!j)return;const $=Ee.loading(Q?"Starting review…":`Checking out ${E} and starting review…`);u.mutate({pr:j,instruction:Y.instruction,..._()},{onSuccess:()=>Ee.success("Review agent started",{id:$}),onError:P=>Ee.error(Xe(P),{id:$})})},U=()=>I&&h.mutate(I,{onError:Y=>Ee.error(Xe(Y))}),J=c.isPending||g.isPending||u.isPending;return j?p.jsxs("div",{ref:m,className:"flex h-full min-h-0 min-w-0 flex-col",children:[p.jsx(f1,{pr:j,branch:j.sourceBranch,baseBranch:j.targetBranch,sessionName:I,running:T,active:i,busy:J,onLaunch:O,onStop:U}),y&&p.jsx(XG,{pr:j,hasWorktree:Q,onChoose:H,onClose:()=>b(!1)})]}):p.jsx("div",{ref:m,className:"flex h-full min-h-0 min-w-0 flex-col",children:Q?p.jsx(f1,{branch:E,baseBranch:k,sessionName:I,running:T,active:i,busy:J,onLaunch:O,onStop:U}):p.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-center text-muted-foreground",children:[p.jsx(vk,{className:"size-10 opacity-30"}),p.jsx("p",{className:"text-base",children:"No worktree for this branch yet."}),p.jsxs(be,{onClick:O,disabled:J,children:[p.jsx(Id,{})," Check out & launch"]})]})})}function eY({items:e,onOpenPalette:t}){const{repo:n}=hn(),i=ps(),o=pB(e),a=ak(n.cwd),c=x.useMemo(()=>new Map(e.map(w=>[dr(w),w])),[e]),u=x.useMemo(()=>new Map(e.map(w=>[Dn(w),w])),[e]),h=w=>{if(w.kind==="item")return c.get(w.itemKey)??(w.branch?u.get(w.branch):void 0)},f=w=>{const C=h(w);if(!C)return;const E=Dn(C);for(const S of e){const R=to(S);if(R&&Dn(S)===E)return R}},g=x.useDeferredValue(i.tabs),m=x.useDeferredValue(i.activeId),y=w=>f(w)!=null;if(i.tabs.length===0)return p.jsx(M8,{onOpenPalette:t,hasItems:e.length>0});const b=o.confirmDialog;return p.jsxs("div",{className:"flex h-full min-w-0 flex-col bg-background",children:[p.jsxs("div",{className:"flex h-9 shrink-0 items-stretch overflow-x-auto border-b border-border bg-tab [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[i.tabs.map(w=>{const C=f(w);return p.jsx(sY,{tab:w,item:h(w),active:w.id===i.activeId,closer:o,snapshot:C?a.data?.[C]:void 0},w.id)}),p.jsx("div",{className:"flex-1"})]}),p.jsx("div",{className:"relative min-h-0 flex-1",children:g.map(w=>{const C=w.id===m;return!C&&!y(w)?null:p.jsx("div",{"aria-hidden":!C,className:pe("absolute inset-0 flex min-h-0 flex-col",!C&&"invisible"),children:p.jsx(C8,{resetKey:w.id,children:w.kind==="settings"?p.jsx(D8,{}):p.jsx(ZG,{item:h(w),items:e,itemKey:w.itemKey,active:C,onPin:()=>i.pin(w.id)})})},w.id)})}),b]})}function tY({Icon:e,running:t,snapshot:n}){return p.jsxs("span",{className:"relative flex shrink-0",children:[p.jsx(e,{className:"size-4"}),n?.active?p.jsx("span",{className:"absolute -right-1 -bottom-1 flex items-center justify-center rounded-full bg-tab-active p-0.5",children:p.jsx("span",{className:"agent-spinner size-2.5 rounded-full"})}):t?p.jsx("span",{className:"absolute -right-0.5 -bottom-0.5 size-2 rounded-full bg-success ring-2 ring-tab-active"}):null]})}function nY(e,t){return e.kind==="settings"?{label:"Settings",Icon:OA}:{label:t?Qd(t):e.itemKey.replace(/^[a-z]+:/,""),Icon:t?.pr?of:Da}}function rY({count:e}){return e<=0?null:p.jsx("span",{"aria-label":`${e} comment${e===1?"":"s"} in the plan`,className:"shrink-0 rounded-full bg-primary/15 px-1.5 text-[10px] font-medium tabular-nums text-primary",children:e})}function iY({active:e,onClose:t}){return p.jsx("button",{type:"button",onClick:t,"aria-label":"Close tab",className:pe("flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",e&&"opacity-100"),children:p.jsx(Ma,{className:"size-3.5"})})}function sY({tab:e,item:t,active:n,closer:i,snapshot:o}){const a=ps(),{label:c,Icon:u}=nY(e,t),h=t?ka(t):!1,f=w8(t?.pr?.id),g=async m=>{m.preventDefault();const y=[{id:"close",label:"Close"},{id:"close-others",label:"Close Others",enabled:a.tabs.length>1},{id:"close-all",label:"Close All"}];e.preview&&y.push({type:"separator"},{id:"pin",label:"Keep Open"});const b=await window.kirby.showContextMenu(y);b==="close"?i.close(e.id):b==="close-others"?i.closeOthers(e.id):b==="close-all"?i.closeAll():b==="pin"&&a.pin(e.id)};return p.jsxs("div",{role:"tab","aria-selected":n,draggable:!0,onDragStart:m=>{m.dataTransfer.setData("text/kirby-tab",e.id),m.dataTransfer.effectAllowed="move"},onDragOver:m=>{m.dataTransfer.types.includes("text/kirby-tab")&&(m.preventDefault(),m.dataTransfer.dropEffect="move")},onDrop:m=>{const y=m.dataTransfer.getData("text/kirby-tab");if(!y||y===e.id)return;m.preventDefault();const b=m.currentTarget.getBoundingClientRect(),w=m.clientX<b.left+b.width/2?"before":"after";a.moveTab(y,e.id,w)},onMouseDown:m=>{m.button===1&&(m.preventDefault(),i.close(e.id))},onClick:()=>a.activate(e.id),onDoubleClick:()=>a.pin(e.id),onContextMenu:m=>{g(m)},className:pe("group relative flex h-full max-w-56 min-w-28 cursor-default items-center gap-2 border-r border-border pr-1.5 pl-3 text-base transition-colors select-none",n?"bg-tab-active text-foreground":"text-muted-foreground hover:bg-accent/60 hover:text-foreground",o?.flashing&&!n&&"tab-attention"),children:[n&&p.jsx("span",{className:"absolute inset-x-0 top-0 h-px bg-primary"}),p.jsx(tY,{Icon:u,running:h,snapshot:o}),p.jsx("span",{className:pe("min-w-0 flex-1 truncate",e.preview&&"italic"),children:c}),p.jsx(rY,{count:f}),p.jsx(iY,{active:n,onClose:m=>{m.stopPropagation(),i.close(e.id)}})]})}const oY=[["Search & commands",[cn,"K"]],["Command palette",[cn,"⇧","P"]],["Toggle sidebar",[cn,"B"]],["New worktree",[cn,"N"]],["Open repository",[cn,"O"]],["Settings",[cn,","]],["Close tab",[cn,"W"]],["Refresh pull requests",[cn,"R"]],["Send reply (in a comment box)",[cn,"↵"]]];function aY({open:e,onOpenChange:t}){return p.jsx(Na,{open:e,onOpenChange:t,children:p.jsxs(_a,{className:"sm:max-w-sm",children:[p.jsxs(uf,{children:[p.jsx(Oa,{children:"Keyboard shortcuts"}),p.jsx(xc,{children:"The same shortcuts are available from the application menu."})]}),p.jsx("div",{className:"grid grid-cols-[1fr_auto] items-center gap-x-6 gap-y-2 text-base",children:oY.map(([n,i])=>p.jsxs("div",{className:"contents",children:[p.jsx("span",{className:"text-muted-foreground",children:n}),p.jsx("span",{className:"flex items-center gap-1",children:i.map(o=>p.jsx(es,{children:o},o))})]},n))})]})})}function lY(e){return p.jsx(aj,{"data-slot":"collapsible",...e})}function cY(e){return p.jsx(ij,{"data-slot":"collapsible-trigger",...e})}function uY(e){return p.jsx(sj,{"data-slot":"collapsible-content",...e})}const dY=["open","launch","kill","checkout","open-pr","open-editor","copy","remove"];function fY(e){return e!==null&&dY.includes(e)}function hY(e){const{hasWorktree:t,running:n,hasPr:i}=e,o=[{id:"open",label:"Open"},{type:"separator"}];return t&&!n&&o.push({id:"launch",label:"Launch agent"}),t&&n&&o.push({id:"kill",label:"Stop agent"}),t||o.push({id:"checkout",label:"Check out as worktree"}),i&&o.push({id:"open-pr",label:"Open pull request in browser"}),o.push({id:"open-editor",label:"Open in editor"}),o.push({id:"copy",label:"Copy branch name"}),t&&o.push({type:"separator"},{id:"remove",label:"Remove worktree…",danger:!0}),o}const pY={red:"text-destructive",yellow:"text-warning",green:"text-success",muted:void 0};function mY({glyph:e,filled:t}){const n="size-3.5";switch(e){case"rejected":return p.jsx(zL,{className:n});case"waiting":return p.jsx(lg,{className:n});case"ci-failed":return p.jsx(sf,{className:n});case"ci-running":return p.jsx(ck,{className:pe(n,"animate-pulse")});case"ci-absent":return p.jsx(NL,{className:n});case"partial":return p.jsx(FL,{className:n});default:return p.jsx(vc,{className:pe(n,t&&"fill-current")})}}function gY({pr:e}){const t=l4(e.reviewers??[],e.buildStatus,Lk),n=e.activeCommentCount??0;return p.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",children:[p.jsx(Fe,{label:t.label,children:p.jsxs("span",{className:pe("flex items-center gap-0.5 tabular-nums",pY[t.tone]),children:[p.jsx(mY,{glyph:t.glyph,filled:t.filled}),t.total>0&&p.jsxs(p.Fragment,{children:[t.approved,"/",t.total]})]})}),n>0&&p.jsx(Fe,{label:Fk(n),children:p.jsxs("span",{className:"flex items-center gap-0.5 tabular-nums",children:[p.jsx(po,{className:"size-3"}),n]})})]})}function AY({branch:e,itemKey:t,running:n,onClose:i}){const{repo:o}=hn(),a=ps(),c=I4(o.cwd),{data:u}=rL(o.cwd,e),h=u?.safe===!1&&(u.reason==="uncommitted changes"||u.reason==="not pushed to upstream"),f=g=>{const m=a.tabs.find(y=>y.kind==="item"&&y.itemKey===t);m&&a.close(m.id),i(),c.mutate({branch:e,force:g})};return p.jsx(Na,{open:!0,onOpenChange:g=>!g&&i(),children:p.jsxs(_a,{children:[p.jsxs(uf,{children:[p.jsx(Oa,{children:"Remove worktree?"}),p.jsxs(xc,{children:["This deletes the worktree for"," ",p.jsx("span",{className:"font-mono text-foreground",children:e}),n?" and stops its running agent":"",". The branch is deleted too unless git refuses."]})]}),u&&!u.safe&&p.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2 text-sm text-foreground",children:[p.jsx(xk,{className:"mt-0.5 size-4 shrink-0 text-warning"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:h?"Not safe to delete":"Cannot delete"}),p.jsx("p",{className:"text-muted-foreground",children:u.reason})]})]}),p.jsxs(ry,{children:[p.jsx(be,{variant:"ghost",onClick:i,children:"Cancel"}),u?.safe!==!1?p.jsx(be,{variant:"destructive",disabled:!u,onClick:()=>f(!1),children:"Remove"}):h?p.jsx(be,{variant:"destructive",onClick:()=>f(!0),children:"Force remove"}):null]})]})})}function yY({item:e,running:t}){const n=e.pr;let i=Da,o="text-muted-foreground";return n?.isDraft?i=g3:n&&(i=of,o=e.kind==="review-pr"?vY(e.category):"text-info"),p.jsxs("span",{className:"relative flex size-4 shrink-0 items-center justify-center",children:[p.jsx(i,{className:pe("size-4",o)}),t&&p.jsxs("span",{className:"absolute -right-0.5 -bottom-0.5 flex size-2",children:[p.jsx("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60"}),p.jsx("span",{className:"relative inline-flex size-2 rounded-full bg-success ring-2 ring-sidebar"})]})]})}function vY(e){return e==="needs-review"?"text-warning":e==="approved"?"text-success":"text-muted-foreground"}function bY({merged:e,rebasing:t,conflictCount:n}){const i=`${n} conflict${n===1?"":"s"}`;return p.jsxs(p.Fragment,{children:[e&&p.jsx("span",{className:"shrink-0 rounded bg-success/15 px-1 text-[10px] font-medium text-success",children:"merged"}),t&&p.jsx("span",{className:"shrink-0 rounded bg-warning/15 px-1 text-[10px] font-medium text-warning",children:"rebasing"}),n>0&&p.jsx("span",{className:"shrink-0 rounded bg-warning/15 px-1 text-[10px] font-medium text-warning",title:`${i} against the main branch`,children:i})]})}function xY({item:e,active:t,onOpen:n}){const{repo:i}=hn(),o=Yk(i.cwd),a=ty(i.cwd),c=ZA(i.cwd),u=Vk(),[h,f]=x.useState(!1),g=ka(e),m=Pk(e),y=Dn(e),b=to(e),w=e.pr,C=Qd(e),E=e.kind==="session"&&e.session.state==="rebasing",S=e.kind==="session"&&e.isMerged,R=(e.kind==="session"?e.conflictCount:void 0)??0,k=()=>o.mutate({branch:y,intent:"continue-or-blank"},{onError:_=>Ee.error(Xe(_))}),I=()=>b&&a.mutate(b,{onError:_=>Ee.error(Xe(_))}),T=()=>{n(!1),c.mutate(y,{onSuccess:()=>Ee.success(`Worktree ready: ${y}`),onError:_=>Ee.error(Xe(_))})},Q=()=>{n(!1),e.kind==="session"&&!g&&k()},j=async _=>{_.preventDefault();const F=await window.kirby.showContextMenu(hY({hasWorktree:m,running:g,hasPr:!!w}));if(fY(F))switch(F){case"open":n(!1);break;case"launch":k();break;case"kill":I();break;case"checkout":T();break;case"open-pr":w&&window.kirby.openExternal(w.url);break;case"open-editor":u.mutate(y,{onSuccess:({editor:O})=>Ee.success(`Opened in ${O}`),onError:O=>Ee.error(Xe(O))});break;case"copy":navigator.clipboard.writeText(y),Ee.success("Branch name copied");break;case"remove":f(!0);break}};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{role:"button",tabIndex:0,onClick:()=>n(!0),onDoubleClick:Q,onContextMenu:_=>{j(_)},onKeyDown:_=>{_.key==="Enter"&&n(!1)},className:pe("group flex w-full cursor-default items-center gap-2 py-[3px] pr-2 pl-4 text-base outline-none transition-colors focus-visible:ring-1 focus-visible:ring-ring/60",t?"bg-sidebar-active text-sidebar-accent-foreground":"hover:bg-sidebar-accent"),children:[p.jsx(yY,{item:e,running:g}),p.jsxs("div",{className:"min-w-0 flex-1 leading-tight",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:pe("truncate",g&&"font-medium"),children:C}),p.jsx(bY,{merged:S,rebasing:E,conflictCount:R})]}),w&&p.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",title:w.title,children:[p.jsxs("span",{className:"shrink-0 tabular-nums",children:["#",w.id]}),p.jsx("span",{className:"min-w-0 truncate",children:e.kind==="session"?w.title:w.createdByDisplayName})]})]}),w&&p.jsx(gY,{pr:w})]}),h&&p.jsx(AY,{branch:y,itemKey:dr(e),running:g,onClose:()=>f(!1)})]})}function wY({items:e,loading:t,error:n,onNewWorktree:i,onCollapse:o}){const{repo:a}=hn(),c=ps(),u=lf(a.cwd),h=Z5(e),[f,g]=x.useState({}),m=(()=>{const y=c.tabs.find(b=>b.id===c.activeId);return y?.kind==="item"?y.itemKey:null})();return p.jsxs("aside",{className:"flex h-full min-w-0 flex-col bg-sidebar text-sidebar-foreground",children:[p.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between pr-1 pl-3",children:[p.jsx("span",{className:"truncate text-base font-semibold",children:tc(a.cwd)}),p.jsxs("div",{className:"flex items-center",children:[p.jsx(Fe,{label:"New worktree / check out branch",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"New worktree",children:p.jsx(jw,{})})}),p.jsx(Fe,{label:"Refresh pull requests",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:()=>u.mutate(),"aria-label":"Refresh",children:p.jsx(NA,{className:pe(u.isPending&&"animate-spin")})})}),p.jsx(Fe,{label:"Hide sidebar (Ctrl B)",children:p.jsx(be,{variant:"ghost",size:"icon-sm",onClick:o,"aria-label":"Hide sidebar",children:p.jsx(mk,{})})})]})]}),p.jsxs(Cf,{className:"min-h-0 flex-1",children:[t&&e.length===0&&p.jsxs("div",{className:"space-y-2 px-3 py-2",children:[p.jsx(Xt,{className:"h-3 w-24"}),p.jsx(Xt,{className:"h-6 w-full"}),p.jsx(Xt,{className:"h-6 w-5/6"}),p.jsx(Xt,{className:"h-6 w-4/6"})]}),!t&&e.length===0&&!n&&p.jsxs("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:[p.jsx("p",{children:"No worktrees or pull requests yet."}),p.jsxs(be,{variant:"outline",size:"sm",className:"mt-3",onClick:i,children:[p.jsx(jw,{})," New worktree"]})]}),h.map(y=>{const b=!f[y.key];return p.jsxs(lY,{open:b,onOpenChange:w=>g(C=>({...C,[y.key]:!w})),children:[p.jsx(cY,{asChild:!0,children:p.jsxs("button",{type:"button",className:"flex h-[22px] w-full items-center gap-1 px-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground",children:[p.jsx(Ci,{className:pe("size-3.5 transition-transform",b&&"rotate-90")}),p.jsx("span",{className:"truncate",children:y.label}),p.jsx("span",{className:"ml-auto mr-1 rounded-full bg-muted px-1.5 text-[10px] font-medium tabular-nums text-muted-foreground",children:y.items.length})]})}),p.jsx(uY,{children:y.items.map(w=>p.jsx(xY,{item:w,active:dr(w)===m,onOpen:C=>c.openItem(dr(w),{preview:C})},dr(w)))})]},y.key)})]}),n&&p.jsx("div",{className:"border-t border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:n})]})}function CY({items:e,onOpenSettings:t}){const{repo:n}=hn(),i=tL(n.cwd),o=lf(n.cwd),a=Zz(),c=e.filter(ka).length,[,u]=x.useState(0);x.useEffect(()=>{const f=setInterval(()=>u(g=>g+1),15e3);return()=>clearInterval(f)},[]);const h=i.data;return p.jsxs("footer",{className:"flex h-[22px] shrink-0 select-none items-center border-t border-border bg-statusbar px-2 text-xs text-statusbar-foreground",children:[p.jsxs(wa,{label:n.cwd,children:[p.jsx(Da,{className:"size-3"}),p.jsx("span",{className:"font-medium",children:tc(n.cwd)})]}),h&&p.jsx(EY,{sync:h,refreshing:o.isPending,onRefresh:()=>o.mutate(),onOpenSettings:t}),p.jsx("div",{className:"flex-1"}),c>0&&p.jsxs(wa,{label:`${c} agent${c===1?"":"s"} running`,children:[p.jsx(vk,{className:"size-3 text-success"}),c," running"]}),p.jsx(wa,{label:"kirby-desktop build",children:p.jsxs("span",{className:"text-muted-foreground",children:["v",a.data?.app??"…"]})})]})}function EY({sync:e,refreshing:t,onRefresh:n,onOpenSettings:i}){if(!e.providerId)return p.jsxs(wa,{label:"No VCS provider configured — open Settings",onClick:i,children:[p.jsx(KL,{className:"size-3"}),"No provider"]});if(!e.providerConfigured)return p.jsxs(wa,{label:`${Rm(e.providerId)} needs credentials — open Settings`,onClick:i,className:"text-warning",children:[p.jsx(lg,{className:"size-3"}),Rm(e.providerId)," not configured"]});const o=t||e.remoteSyncing;return p.jsxs(wa,{label:e.remoteError?`Last sync failed: ${e.remoteError}`:`Refresh pull requests (auto every ${Math.round(e.remoteIntervalMs/1e3)}s)`,onClick:n,className:pe(e.remoteError&&"text-destructive"),children:[o?p.jsx(ho,{className:"size-3 animate-spin"}):e.remoteError?p.jsx(lg,{className:"size-3"}):p.jsx(NA,{className:"size-3"}),Rm(e.providerId),p.jsx("span",{className:"text-muted-foreground",children:o?"syncing…":e.lastRemoteSyncAt?`synced ${rf(e.lastRemoteSyncAt)}`:"not synced"})]})}function Rm(e){return e==="github"?"GitHub":e==="azure-devops"?"Azure DevOps":e}function wa({label:e,onClick:t,className:n,children:i}){const o=p.jsx("span",{role:t?"button":void 0,onClick:t,className:pe("flex h-full items-center gap-1.5 px-1.5 transition-colors",t&&"cursor-pointer hover:bg-accent",n),children:i});return p.jsx(Fe,{label:e,children:o})}const h1="kirby.sidebar.hidden";function SY({repo:e,onSwitchRepo:t,onOpenRepo:n,onPickRepoFolder:i}){const o=x.useMemo(()=>({repo:e,switchRepo:t}),[e,t]);return p.jsx(N4,{value:o,children:p.jsx(E4,{children:p.jsx(kY,{onSwitchRepo:t,onOpenRepo:n,onPickRepoFolder:i})})})}function kY({onSwitchRepo:e,onOpenRepo:t,onPickRepoFolder:n}){const{repo:i}=hn(),o=ps(),a=eL(i.cwd),c=lf(i.cwd),u=R4(),h=x.useMemo(()=>W5(a.data??[],u),[a.data,u]),f=pB(h),[g,m]=x.useState(!1),[y,b]=x.useState(!1),[w,C]=x.useState(()=>localStorage.getItem(h1)==="1"),E=()=>C(I=>(localStorage.setItem(h1,I?"0":"1"),!I)),S=x.useMemo(()=>h.map(I=>({itemKey:dr(I),branch:Dn(I),running:ka(I),sessionName:to(I)})),[h]);x.useEffect(()=>{o.syncItems(S)},[o,S]);const R=yi();x.useEffect(()=>window.kirby.onSyncNotice(({message:T,kind:Q})=>{Q==="success"?Ee.success(T):Ee.warning(T),R.invalidateQueries({queryKey:Je.sidebar(i.cwd)})}),[R,i.cwd]);const k=a.error?Xe(a.error):null;return x.useEffect(()=>{k&&Ee.error(k,{id:"sidebar-error"})},[k]),x.useEffect(()=>{const I={"open-repo":n,"switch-repo":e,"new-worktree":()=>m(!0),"command-palette":()=>m(!0),"open-settings":()=>o.openSettings(),"close-tab":()=>f.closeActive(),"toggle-sidebar":E,"refresh-remote":()=>c.mutate(void 0,{onError:Q=>Ee.error(Xe(Q))}),"set-theme":Q=>{(Q==="system"||Q==="light"||Q==="dark")&&M1(Q)},"open-url":Q=>{Q&&window.kirby.openExternal(Q)},"show-shortcuts":()=>b(!0),about:()=>{window.kirby.showAbout()}};return window.kirby.onMenuCommand(({command:Q,arg:j})=>I[Q](j))},[o,f,c,n,e]),x.useEffect(()=>{const I=T=>{(T.metaKey||T.ctrlKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),m(j=>!j))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),p.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[p.jsx(Ck,{repo:i,onSwitchRepo:e,onOpenRepo:t,onOpenPalette:()=>m(!0),onOpenSettings:()=>o.openSettings()}),p.jsxs("div",{className:"flex min-h-0 flex-1",children:[w&&p.jsx(S4,{items:h,onReveal:E}),p.jsxs(JA,{orientation:"horizontal",className:"min-h-0 flex-1",id:"workspace",children:[!w&&p.jsxs(p.Fragment,{children:[p.jsx(ic,{id:"sidebar",defaultSize:"280px",minSize:"200px",maxSize:"45%",className:"min-w-0",children:p.jsx(wY,{items:h,loading:a.isLoading,error:null,onNewWorktree:()=>m(!0),onCollapse:E})}),p.jsx(WA,{className:"relative w-px bg-border transition-colors after:absolute after:inset-y-0 after:-left-1 after:w-2 hover:bg-primary data-[resize-handle-state=drag]:bg-primary"})]}),p.jsx(ic,{id:"editor",minSize:"40%",className:"min-w-0",children:p.jsx(eY,{items:h,onOpenPalette:()=>m(!0)})})]})]}),p.jsx(CY,{items:h,onOpenSettings:()=>o.openSettings()}),p.jsx(h8,{open:g,onOpenChange:m,items:h,onToggleSidebar:E,onSwitchRepo:e}),p.jsx(aY,{open:y,onOpenChange:b}),f.confirmDialog]})}function BY(){return p.jsx(_Q,{client:Nz,children:p.jsxs(Tz,{children:[p.jsx(IY,{}),p.jsx(wT,{})]})})}function IY(){const e=yi(),{data:t,isPending:n}=Wz(),i=x.useCallback(c=>{_z(e),e.setQueryData(Je.repo,c)},[e]),o=x.useCallback(c=>{window.kirby.openRepo(c).then(i).catch(u=>Ee.error(Xe(u)))},[i]),a=x.useCallback(()=>{window.kirby.selectRepoDirectory().then(c=>{c&&o(c)}).catch(c=>Ee.error(Xe(c)))},[o]);return n?p.jsx("main",{className:"flex h-screen items-center justify-center bg-background",children:p.jsx("p",{className:"animate-pulse text-sm text-muted-foreground",children:"Connecting to host…"})}):t?p.jsx(SY,{repo:t,onSwitchRepo:()=>e.setQueryData(Je.repo,null),onOpenRepo:o,onPickRepoFolder:a},t.cwd):p.jsx(m5,{onOpened:i})}xT();const F2=document.getElementById("root");if(!F2)throw new Error("#root not found");lQ.createRoot(F2).render(p.jsx(x.StrictMode,{children:p.jsx(BY,{})}));
|