bb-app 0.0.9 → 0.0.11
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/app/dist/assets/AppSettingsView-Dh4Od2M3.js +1 -0
- package/app/dist/assets/InternalReplayListView-BjzY8fhh.js +1 -0
- package/app/dist/assets/ProjectArchivedThreadsView-o1R22xfj.js +1 -0
- package/app/dist/assets/ProjectSettingsView-BoH5a1hi.js +1 -0
- package/app/dist/assets/ThreadDetailRoute-Caqz8odF.js +2867 -0
- package/app/dist/assets/{ThreadUnarchiveButton-ae8m78ng.js → ThreadUnarchiveButton-2shfHri9.js} +1 -1
- package/app/dist/assets/{angular-html-CsQHuPoy.js → angular-html-CN4B7z8Z.js} +1 -1
- package/app/dist/assets/{angular-ts-B9caFRUl.js → angular-ts-Be9rCyh7.js} +1 -1
- package/app/dist/assets/{apl-BaFDIJAy.js → apl-C-09mkOY.js} +1 -1
- package/app/dist/assets/{astro-CB3F_OsY.js → astro-DQR04HMP.js} +1 -1
- package/app/dist/assets/{blade-CjgH6QoP.js → blade-CHOb28s9.js} +1 -1
- package/app/dist/assets/{bsl-CG-fq4sc.js → bsl-9Rfj8X2G.js} +1 -1
- package/app/dist/assets/{c-Bknf8flU.js → c-Czi5ZOPg.js} +1 -1
- package/app/dist/assets/{cairo-Ds0kTeYT.js → cairo-B8t0-PSB.js} +1 -1
- package/app/dist/assets/{chunk-JZWAC4HX-C0wcTaAp.js → chunk-JZWAC4HX-CmnT162V.js} +1 -1
- package/app/dist/assets/{cobol-s_WYmRkb.js → cobol-C0UrcShI.js} +1 -1
- package/app/dist/assets/{coffee-B4wogQNr.js → coffee-DLCACHKU.js} +1 -1
- package/app/dist/assets/{cpp-DBcUjMMg.js → cpp-CKRDyJLk.js} +1 -1
- package/app/dist/assets/{crystal-BEUw9aly.js → crystal-DzdlwfxO.js} +1 -1
- package/app/dist/assets/{css-Tyi5cHoy.js → css-J88DqgyO.js} +1 -1
- package/app/dist/assets/dialog-JFJupr8S.js +22 -0
- package/app/dist/assets/{edge-DBVUn5K4.js → edge-BiusF5O8.js} +1 -1
- package/app/dist/assets/effective-hosts-BS3g3uzj.js +68 -0
- package/app/dist/assets/{elixir-DScCko2H.js → elixir-DVV1N8WB.js} +1 -1
- package/app/dist/assets/{elm-C4qaS622.js → elm-ZwoouJdM.js} +1 -1
- package/app/dist/assets/{erb-CZnOXF4N.js → erb-6WVNn8lP.js} +1 -1
- package/app/dist/assets/{erlang-C-m_88FN.js → erlang-CdOz9ruD.js} +1 -1
- package/app/dist/assets/{fortran-fixed-form-Cx1lv7HN.js → fortran-fixed-form-BmD2L0UY.js} +1 -1
- package/app/dist/assets/{fsharp-DC5k9sy2.js → fsharp-DgKUr7h2.js} +1 -1
- package/app/dist/assets/{gdresource-D0EsKdgH.js → gdresource-BqgTfeIa.js} +1 -1
- package/app/dist/assets/{git-commit-BcFsuO5E.js → git-commit-CPnaL3nl.js} +1 -1
- package/app/dist/assets/{git-rebase-QEKpMjJZ.js → git-rebase-CI6iVcd4.js} +1 -1
- package/app/dist/assets/{glimmer-js-BNOZF2qI.js → glimmer-js-MU0okVIL.js} +1 -1
- package/app/dist/assets/{glimmer-ts-apIdP2bg.js → glimmer-ts-BXJcqrHb.js} +1 -1
- package/app/dist/assets/{glsl-Dg2m4Gqj.js → glsl-CthKK13_.js} +1 -1
- package/app/dist/assets/{graphql-DFhF_r-2.js → graphql-Cfx6sMIN.js} +1 -1
- package/app/dist/assets/{hack-Bhx0ZE7U.js → hack-Cfn0L20S.js} +1 -1
- package/app/dist/assets/{haml-DI6_Yg2F.js → haml-DpOUW3De.js} +1 -1
- package/app/dist/assets/{handlebars-BnNY7a5K.js → handlebars-Dq6TUqDg.js} +1 -1
- package/app/dist/assets/{html-BOXTZS1i.js → html-CrFhd97J.js} +1 -1
- package/app/dist/assets/{html-derivative-v40-23QP.js → html-derivative-SXrZiT2S.js} +1 -1
- package/app/dist/assets/{http-BjNdwlfX.js → http-BxRXAeum.js} +1 -1
- package/app/dist/assets/{hurl-FLqiDEN1.js → hurl-BsAa903H.js} +1 -1
- package/app/dist/assets/{hxml-iQTOTWpM.js → hxml-DlOl0PEf.js} +1 -1
- package/app/dist/assets/index-DYJoFBAk.css +2 -0
- package/app/dist/assets/index-DbhAkEqX.js +1366 -0
- package/app/dist/assets/{java-BK7M4QRN.js → java-BZRe3u16.js} +1 -1
- package/app/dist/assets/{javascript-CIysJabp.js → javascript-YzZUmjcN.js} +1 -1
- package/app/dist/assets/{jinja-D22cUMUY.js → jinja-CkL9mgnB.js} +1 -1
- package/app/dist/assets/{jison-D5ZXfQQd.js → jison-DY01LEsx.js} +1 -1
- package/app/dist/assets/{json-DEUxBxBS.js → json-DeVTS63Q.js} +1 -1
- package/app/dist/assets/{jsx-cxjRg4Z9.js → jsx-B73xjEBK.js} +1 -1
- package/app/dist/assets/{julia-DfQvji8F.js → julia-D5UCqxaX.js} +1 -1
- package/app/dist/assets/{just-7mfnOEVc.js → just-BfeKX4XX.js} +1 -1
- package/app/dist/assets/{latex-CmEGWjs7.js → latex-CllT7gYn.js} +1 -1
- package/app/dist/assets/{liquid-Cmbkwo5G.js → liquid-Bgz2sjbj.js} +1 -1
- package/app/dist/assets/localhost-badge-BESHcXM2.js +1 -0
- package/app/dist/assets/{lua-DJijm0YV.js → lua-CKg4_5Yw.js} +1 -1
- package/app/dist/assets/{marko-TMTUEuNL.js → marko-CSplXaxm.js} +1 -1
- package/app/dist/assets/{mdc-DT_H0tm2.js → mdc-CR1bPJlt.js} +1 -1
- package/app/dist/assets/mutation-cache-effects-BX02KjBd.js +1 -0
- package/app/dist/assets/mutation-errors-DgGC9CkY.js +2 -0
- package/app/dist/assets/{nextflow-D-Ec_bsY.js → nextflow-CK5HLJvq.js} +1 -1
- package/app/dist/assets/{nginx-DfhY1ECI.js → nginx-Chba8emm.js} +1 -1
- package/app/dist/assets/{nim-CY6yBY6c.js → nim-BJOCNxTB.js} +1 -1
- package/app/dist/assets/page-shell-CaMV_G2I.js +39 -0
- package/app/dist/assets/{perl-BRRcO43t.js → perl-DtYnB2VK.js} +1 -1
- package/app/dist/assets/{php-DoQeKnTv.js → php-Cm6MwVxd.js} +1 -1
- package/app/dist/assets/{pill-CoTRlxZ6.js → pill-Ds03GLze.js} +1 -1
- package/app/dist/assets/{pug-BusbjPKV.js → pug-Cs95QZUY.js} +1 -1
- package/app/dist/assets/{qml-D4hm6vUS.js → qml-DV4H8TeV.js} +1 -1
- package/app/dist/assets/{r-C3JOt0ks.js → r-BOwNWtkP.js} +1 -1
- package/app/dist/assets/{razor-MHFIGhr-.js → razor-rzD3KE0N.js} +1 -1
- package/app/dist/assets/{regexp-DmDmHqK0.js → regexp-D5UpjLq1.js} +1 -1
- package/app/dist/assets/{rst-D5K5OvKu.js → rst-nRBldbnW.js} +1 -1
- package/app/dist/assets/{ruby-qXw_ViMa.js → ruby-DK9_UnsF.js} +1 -1
- package/app/dist/assets/{sas-SiqJsOSW.js → sas-BxxScrc4.js} +1 -1
- package/app/dist/assets/{scss-B9bBsqJt.js → scss-dYaO_Ssw.js} +1 -1
- package/app/dist/assets/{settings-section-B0JkCbim.js → settings-section-BgEyrMBV.js} +1 -1
- package/app/dist/assets/{shaderlab-DGohHMiF.js → shaderlab-jhHUXThs.js} +1 -1
- package/app/dist/assets/{shellscript-B0hF8Ck_.js → shellscript-BGY92qaj.js} +1 -1
- package/app/dist/assets/{shellsession-kbvqTqYV.js → shellsession-DHio1RBs.js} +1 -1
- package/app/dist/assets/{soy-DED6zzHR.js → soy-CWnh82_C.js} +1 -1
- package/app/dist/assets/{sparql-BgU2QITA.js → sparql-D050l-1j.js} +1 -1
- package/app/dist/assets/split-button-PlurXMEc.js +1 -0
- package/app/dist/assets/{sql-kJQbrAD6.js → sql-BgOSYFXh.js} +1 -1
- package/app/dist/assets/{stata-Bsjpyopz.js → stata-Di5c1EGu.js} +1 -1
- package/app/dist/assets/{surrealql-CV66KZgA.js → surrealql-CKgBuPai.js} +1 -1
- package/app/dist/assets/{svelte-DQTF70EG.js → svelte-DGNSQgHP.js} +1 -1
- package/app/dist/assets/{templ-5jXq5O2y.js → templ--mBJoDNy.js} +1 -1
- package/app/dist/assets/{tex-BKPWc06x.js → tex-Drg-gBC1.js} +1 -1
- package/app/dist/assets/thread-queries-DI7HoSpk.js +1 -0
- package/app/dist/assets/{ts-tags-DHR5Sjbn.js → ts-tags-_EoiaFc_.js} +1 -1
- package/app/dist/assets/{tsx-BikICA1y.js → tsx-C3E3ZPo7.js} +1 -1
- package/app/dist/assets/{twig-D00gH1GT.js → twig-BkmJOmf1.js} +1 -1
- package/app/dist/assets/{typescript-B9SUz1Ri.js → typescript-zC8doK3K.js} +1 -1
- package/app/dist/assets/{vue-nmyY5t9g.js → vue-Dqnq1uw7.js} +1 -1
- package/app/dist/assets/{vue-html-CxTWudeN.js → vue-html-CZNe_SnY.js} +1 -1
- package/app/dist/assets/{vue-vine-DKOrFY9Z.js → vue-vine-ChEJZJ0Y.js} +1 -1
- package/app/dist/assets/workspace-open-target-preference-Dve5Zih1.js +1 -0
- package/app/dist/assets/{xml-vPV5v5Ih.js → xml-DHqUJISw.js} +1 -1
- package/app/dist/assets/{xsl-FiPzBrgC.js → xsl-B_xW8s_z.js} +1 -1
- package/app/dist/assets/{yaml-CYAqjA7C.js → yaml-CHAY15k-.js} +1 -1
- package/app/dist/index.html +12 -11
- package/host-daemon/dist/bb +55 -55
- package/host-daemon/dist/bb-claude-code-bridge.mjs +37 -37
- package/host-daemon/dist/bb-pi-bridge.mjs +1 -1
- package/host-daemon/dist/daemon-bundle.mjs +439 -432
- package/package.json +1 -1
- package/server/dist/drizzle/0005_strong_exodus.sql +29 -0
- package/server/dist/drizzle/0006_rapid_santa_claus.sql +11 -0
- package/server/dist/drizzle/0007_curvy_ezekiel_stane.sql +2 -0
- package/server/dist/drizzle/meta/0005_snapshot.json +3227 -0
- package/server/dist/drizzle/meta/0006_snapshot.json +3243 -0
- package/server/dist/drizzle/meta/0007_snapshot.json +3260 -0
- package/server/dist/drizzle/meta/_journal.json +22 -1
- package/server/dist/index.js +11880 -14862
- package/app/dist/assets/AppSettingsView-3xuBYGm-.js +0 -1
- package/app/dist/assets/InternalReplayListView-D4BuZuhX.js +0 -1
- package/app/dist/assets/ProjectArchivedThreadsView-CQ79aEPs.js +0 -1
- package/app/dist/assets/ProjectSettingsView-D0t1s9Kc.js +0 -1
- package/app/dist/assets/ThreadDetailRoute-S7gHiq2R.js +0 -2871
- package/app/dist/assets/dialog-yU2jYzlX.js +0 -1
- package/app/dist/assets/effective-hosts-L1PAD_aI.js +0 -68
- package/app/dist/assets/index-BYWUZ2en.css +0 -2
- package/app/dist/assets/index-aLeXFWbZ.js +0 -1360
- package/app/dist/assets/localhost-badge-CmIXXpKJ.js +0 -22
- package/app/dist/assets/mutation-cache-effects-CDggZqqz.js +0 -1
- package/app/dist/assets/page-shell-BWng2QUG.js +0 -39
- package/app/dist/assets/split-button-D4kqBiFb.js +0 -1
- package/app/dist/assets/thread-queries-fJ7WqAPD.js +0 -1
- /package/app/dist/assets/{abap-B1dkBSPn.js → abap-B7RnWQOG.js} +0 -0
- /package/app/dist/assets/{actionscript-3-BT4ibYlP.js → actionscript-3-CRl2BRXz.js} +0 -0
- /package/app/dist/assets/{ada-CD92zeps.js → ada-CySgk42_.js} +0 -0
- /package/app/dist/assets/{addon-fit-Cm0rqjtv.js → addon-fit-C0pCnz-E.js} +0 -0
- /package/app/dist/assets/{addon-web-links-B8_D6zvC.js → addon-web-links-C74o10p8.js} +0 -0
- /package/app/dist/assets/{andromeeda-DqSmgxi0.js → andromeeda-Bnm9WW1a.js} +0 -0
- /package/app/dist/assets/{apache-D5suuoa_.js → apache-CQgWNR0K.js} +0 -0
- /package/app/dist/assets/{apex-BL-m4VHy.js → apex-CFa_x2c9.js} +0 -0
- /package/app/dist/assets/{applescript-CLiBqvKT.js → applescript-CCGt--QU.js} +0 -0
- /package/app/dist/assets/{ara-LdDF8cmv.js → ara-CJYv1XlV.js} +0 -0
- /package/app/dist/assets/{asciidoc-2DZ9hC2N.js → asciidoc-DxgPoKvx.js} +0 -0
- /package/app/dist/assets/{asm-0ZPGRSUy.js → asm-2LyQSByb.js} +0 -0
- /package/app/dist/assets/{aurora-x-Da7Zfvbg.js → aurora-x-DfOR6O80.js} +0 -0
- /package/app/dist/assets/{awk-Bn0gn_B_.js → awk-adfNbTQc.js} +0 -0
- /package/app/dist/assets/{ayu-dark-bqYKoqpM.js → ayu-dark-ADZF52JZ.js} +0 -0
- /package/app/dist/assets/{ayu-light-C45jTIzZ.js → ayu-light-CMMeLqXc.js} +0 -0
- /package/app/dist/assets/{ayu-mirage-BV_FCTQi.js → ayu-mirage-BZvrYN67.js} +0 -0
- /package/app/dist/assets/{ballerina-D2nw_w8Q.js → ballerina-G1jH5Moz.js} +0 -0
- /package/app/dist/assets/{bat-ByUBN5gS.js → bat-CHXtPpft.js} +0 -0
- /package/app/dist/assets/{beancount-BTb2W6Mp.js → beancount-EfboDiXG.js} +0 -0
- /package/app/dist/assets/{berry-5SO2uITG.js → berry-DAhQzFBm.js} +0 -0
- /package/app/dist/assets/{bibtex-CDBTNfUI.js → bibtex-CanpD3m2.js} +0 -0
- /package/app/dist/assets/{bicep-fgxG_4rP.js → bicep-Cc0u08ve.js} +0 -0
- /package/app/dist/assets/{bird2-BCwzDhwX.js → bird2-BmGSmafQ.js} +0 -0
- /package/app/dist/assets/{c3-Dlaci63_.js → c3-Bld9q8eN.js} +0 -0
- /package/app/dist/assets/{cadence-DHbRuEmm.js → cadence-_3OaglmQ.js} +0 -0
- /package/app/dist/assets/{catppuccin-frappe-DrL1fUuH.js → catppuccin-frappe-Dn0XJ8jj.js} +0 -0
- /package/app/dist/assets/{catppuccin-latte-C0REgVjl.js → catppuccin-latte-D25Kwd8S.js} +0 -0
- /package/app/dist/assets/{catppuccin-macchiato-ChQpylWO.js → catppuccin-macchiato-Bc6w_RYC.js} +0 -0
- /package/app/dist/assets/{catppuccin-mocha-Dd0JU1T0.js → catppuccin-mocha-Di4PH8Ri.js} +0 -0
- /package/app/dist/assets/{clarity-DMoTOm4G.js → clarity-CVKtZWJu.js} +0 -0
- /package/app/dist/assets/{clojure-DBhE3PpS.js → clojure-C4w8xKrn.js} +0 -0
- /package/app/dist/assets/{cmake-DwMc40Or.js → cmake-DuxpWyxB.js} +0 -0
- /package/app/dist/assets/{codeowners-1lVr8wqV.js → codeowners-BYgLRiPG.js} +0 -0
- /package/app/dist/assets/{codeql-DWflolvo.js → codeql-DmJo4bmm.js} +0 -0
- /package/app/dist/assets/{common-lisp-CrVQ5xT-.js → common-lisp-xmwdM7sj.js} +0 -0
- /package/app/dist/assets/{coq-CjfoyYSh.js → coq-D004aLp-.js} +0 -0
- /package/app/dist/assets/{csharp-C7bIWP5y.js → csharp-BJRWJrkS.js} +0 -0
- /package/app/dist/assets/{csv-DsAkDVtA.js → csv-Cx2EO4hN.js} +0 -0
- /package/app/dist/assets/{cue-BWmQgbOB.js → cue-BFvpulfw.js} +0 -0
- /package/app/dist/assets/{cypher-D-jVC50Q.js → cypher-CloxltJj.js} +0 -0
- /package/app/dist/assets/{d-CaviyOrm.js → d-ByN-nCZx.js} +0 -0
- /package/app/dist/assets/{dark-plus-DIrnwZt9.js → dark-plus-BRQ4k4kr.js} +0 -0
- /package/app/dist/assets/{dart-CZEi7JgC.js → dart-jaYeqpH7.js} +0 -0
- /package/app/dist/assets/{dax-BK-8zffy.js → dax-CQDoOssZ.js} +0 -0
- /package/app/dist/assets/{desktop-D3cjbL4D.js → desktop-DssJfs2S.js} +0 -0
- /package/app/dist/assets/{diff-sHAzLvlp.js → diff-DGLbp6Xl.js} +0 -0
- /package/app/dist/assets/{docker--xs2Ng3w.js → docker-B7aZDRTU.js} +0 -0
- /package/app/dist/assets/{dotenv-Cm4nwcJ7.js → dotenv-D3KyAIK0.js} +0 -0
- /package/app/dist/assets/{dracula-CAUSusef.js → dracula-6-t2eOMW.js} +0 -0
- /package/app/dist/assets/{dracula-soft-cjNkMFza.js → dracula-soft-B4TZzIlp.js} +0 -0
- /package/app/dist/assets/{dream-maker-fjmWTFCO.js → dream-maker-CjPuR0vx.js} +0 -0
- /package/app/dist/assets/{emacs-lisp-CJzqStIa.js → emacs-lisp-BHg7FqFZ.js} +0 -0
- /package/app/dist/assets/{everforest-dark-DBpaSMx1.js → everforest-dark-B4IVVaS6.js} +0 -0
- /package/app/dist/assets/{everforest-light-CiGrXwia.js → everforest-light-CNoEiPUu.js} +0 -0
- /package/app/dist/assets/{fennel-DRaXF7k8.js → fennel-DG6hK7z2.js} +0 -0
- /package/app/dist/assets/{fish-Bn-Yh3Jj.js → fish-_zY__9L4.js} +0 -0
- /package/app/dist/assets/{fluent-DF5F8Ks_.js → fluent-BBz3hVA9.js} +0 -0
- /package/app/dist/assets/{fortran-free-form-hCQHRqew.js → fortran-free-form-Db24aQuN.js} +0 -0
- /package/app/dist/assets/{gdscript-_C9_Hi_w.js → gdscript-CxxY7zMa.js} +0 -0
- /package/app/dist/assets/{gdshader-BW7b1X1Y.js → gdshader-W85lNgcx.js} +0 -0
- /package/app/dist/assets/{genie-Ch_6TCHd.js → genie-2WOhOayX.js} +0 -0
- /package/app/dist/assets/{gherkin-CaNUsmTq.js → gherkin-BsQJenZD.js} +0 -0
- /package/app/dist/assets/{github-dark-B9ygjgg6.js → github-dark-DH2_Q6FX.js} +0 -0
- /package/app/dist/assets/{github-dark-default-Br2bgYSx.js → github-dark-default-DTF8deNx.js} +0 -0
- /package/app/dist/assets/{github-dark-dimmed-CmtqpPJ-.js → github-dark-dimmed-BvtnYOMy.js} +0 -0
- /package/app/dist/assets/{github-dark-high-contrast-fSfmrZcC.js → github-dark-high-contrast-CQhqa0EF.js} +0 -0
- /package/app/dist/assets/{github-light-default-lIytXXhR.js → github-light-default-9rPElOua.js} +0 -0
- /package/app/dist/assets/{github-light-high-contrast-BRrjFb7n.js → github-light-high-contrast-Drx2T_ea.js} +0 -0
- /package/app/dist/assets/{github-light-BZjUqfZl.js → github-light-t2gQwbnC.js} +0 -0
- /package/app/dist/assets/{gleam-DALMDpNs.js → gleam-BjFNd70h.js} +0 -0
- /package/app/dist/assets/{gn-DGjqrYN9.js → gn-MXj_EEiV.js} +0 -0
- /package/app/dist/assets/{gnuplot-BYckvgQI.js → gnuplot-C40vWoS_.js} +0 -0
- /package/app/dist/assets/{go-JycvP538.js → go-B2Qj-jpc.js} +0 -0
- /package/app/dist/assets/{groovy-D5qMRONT.js → groovy-42TXi0JD.js} +0 -0
- /package/app/dist/assets/{gruvbox-dark-hard-M1dj1e6V.js → gruvbox-dark-hard-DaxQoAo9.js} +0 -0
- /package/app/dist/assets/{gruvbox-dark-medium-cqq_ncQu.js → gruvbox-dark-medium-CR6ynfxn.js} +0 -0
- /package/app/dist/assets/{gruvbox-dark-soft-B4QwL2a9.js → gruvbox-dark-soft-QoKQNR_B.js} +0 -0
- /package/app/dist/assets/{gruvbox-light-hard-DLayMKOQ.js → gruvbox-light-hard-C3-JuKAe.js} +0 -0
- /package/app/dist/assets/{gruvbox-light-medium-D52XgPKf.js → gruvbox-light-medium-676URJw_.js} +0 -0
- /package/app/dist/assets/{gruvbox-light-soft-Dola3KdD.js → gruvbox-light-soft-BGpHIYJO.js} +0 -0
- /package/app/dist/assets/{haskell-ys7wPPEd.js → haskell-C5VEzHiR.js} +0 -0
- /package/app/dist/assets/{haxe-94kiChn7.js → haxe-DxCG7g2C.js} +0 -0
- /package/app/dist/assets/{hcl-DmHt_-wq.js → hcl-B-KEcm-b.js} +0 -0
- /package/app/dist/assets/{hjson-xMmoJ0Gx.js → hjson-KcqWy6wG.js} +0 -0
- /package/app/dist/assets/{hlsl-b-Pskdze.js → hlsl-CU9ay1Rj.js} +0 -0
- /package/app/dist/assets/{horizon-BKMqttiR.js → horizon-BDDUNMOh.js} +0 -0
- /package/app/dist/assets/{horizon-bright-HNkBlnm5.js → horizon-bright-Km86OX7k.js} +0 -0
- /package/app/dist/assets/{houston-BkBSBSOQ.js → houston-CnK3oLKP.js} +0 -0
- /package/app/dist/assets/{hy-DKl1XhBq.js → hy-9kqolRdI.js} +0 -0
- /package/app/dist/assets/{imba-DPxkOTAg.js → imba-AWBATAYY.js} +0 -0
- /package/app/dist/assets/{ini-lkLGq_1x.js → ini-P5JLg6LV.js} +0 -0
- /package/app/dist/assets/{json5-Cy6ypJuJ.js → json5-Cj9weIvR.js} +0 -0
- /package/app/dist/assets/{jsonc-Cw2ugYAK.js → jsonc-CwVZHrLL.js} +0 -0
- /package/app/dist/assets/{jsonl-Dp5_qBVH.js → jsonl-CfYcxfNz.js} +0 -0
- /package/app/dist/assets/{jsonnet-BTbmg_-u.js → jsonnet-B351KcBZ.js} +0 -0
- /package/app/dist/assets/{jssm-CnT7nPea.js → jssm-CVNVxyp8.js} +0 -0
- /package/app/dist/assets/{kanagawa-dragon-CxsBnuhV.js → kanagawa-dragon-Bg-BKRuP.js} +0 -0
- /package/app/dist/assets/{kanagawa-lotus-vHdxDDOS.js → kanagawa-lotus-CVGoMXw8.js} +0 -0
- /package/app/dist/assets/{kanagawa-wave-CIkfTKWk.js → kanagawa-wave-CuNbEAGB.js} +0 -0
- /package/app/dist/assets/{kdl-BwK60g80.js → kdl-B2a5Hdo5.js} +0 -0
- /package/app/dist/assets/{kotlin-Dbd9Vi-v.js → kotlin-CwntYu9G.js} +0 -0
- /package/app/dist/assets/{kusto-BuTk9usc.js → kusto-DzqQhEgS.js} +0 -0
- /package/app/dist/assets/{laserwave-C0wf_d3o.js → laserwave-Bf5KiZGG.js} +0 -0
- /package/app/dist/assets/{lean-CYAW8bRN.js → lean-CLemLjY9.js} +0 -0
- /package/app/dist/assets/{less-D4uen21c.js → less-Dycz37IB.js} +0 -0
- /package/app/dist/assets/{light-plus-oqYyWKEE.js → light-plus-BISup5vO.js} +0 -0
- /package/app/dist/assets/{llvm-Z1xJzteV.js → llvm-B3vA1z1w.js} +0 -0
- /package/app/dist/assets/{log-BGUxlsk3.js → log-CM4eTPwH.js} +0 -0
- /package/app/dist/assets/{logo-wVUhvQ1b.js → logo-DCYIDlXZ.js} +0 -0
- /package/app/dist/assets/{luau-rPFZzCmq.js → luau-B3LrvOEt.js} +0 -0
- /package/app/dist/assets/{make-BmPf6m0P.js → make-Bep3F-fA.js} +0 -0
- /package/app/dist/assets/{markdown-AseU6zcW.js → markdown-BObkjWCp.js} +0 -0
- /package/app/dist/assets/{material-theme-darker-VPEo3Sem.js → material-theme-darker-DM1OIivA.js} +0 -0
- /package/app/dist/assets/{material-theme-6_W6rQhR.js → material-theme-jZt3rhQh.js} +0 -0
- /package/app/dist/assets/{material-theme-lighter-CUhzCcZ9.js → material-theme-lighter-HtgpH1FU.js} +0 -0
- /package/app/dist/assets/{material-theme-ocean-B2JdsaGb.js → material-theme-ocean-CeFuXoRG.js} +0 -0
- /package/app/dist/assets/{material-theme-palenight-DhY-sklA.js → material-theme-palenight-BMg4YxS6.js} +0 -0
- /package/app/dist/assets/{matlab-BOj_BDQv.js → matlab-BjvFQgI4.js} +0 -0
- /package/app/dist/assets/{mdx-Cm6cDkDI.js → mdx-DnKU9cqA.js} +0 -0
- /package/app/dist/assets/{mermaid-DLO-R4hv.js → mermaid-CH8Qvaqo.js} +0 -0
- /package/app/dist/assets/{min-dark-D34a_pX7.js → min-dark-B95jFnY0.js} +0 -0
- /package/app/dist/assets/{min-light-Cdd4KORE.js → min-light-CqwYUont.js} +0 -0
- /package/app/dist/assets/{mipsasm-DYpHF-GA.js → mipsasm-OAAwCDEg.js} +0 -0
- /package/app/dist/assets/{mojo-DqYVFv_G.js → mojo-COx3BOEA.js} +0 -0
- /package/app/dist/assets/{monokai-CDR4sQ2n.js → monokai-C988KBom.js} +0 -0
- /package/app/dist/assets/{moonbit-DRKee9wk.js → moonbit-ChOfdbnC.js} +0 -0
- /package/app/dist/assets/{move-DbRk6Vn9.js → move-jwG4QUY4.js} +0 -0
- /package/app/dist/assets/{narrat-IOfmaXfb.js → narrat-Bv3slmdi.js} +0 -0
- /package/app/dist/assets/{nextflow-groovy-EYl0c2BQ.js → nextflow-groovy-CYeLXiaP.js} +0 -0
- /package/app/dist/assets/{night-owl-yQJ3-I0I.js → night-owl-SjOLjRtB.js} +0 -0
- /package/app/dist/assets/{night-owl-light-Bedht9b4.js → night-owl-light-DHrEzBAj.js} +0 -0
- /package/app/dist/assets/{nix-C2IovEl2.js → nix-CcOD1khX.js} +0 -0
- /package/app/dist/assets/{nord-BjZ63GNL.js → nord-BGjNHkRW.js} +0 -0
- /package/app/dist/assets/{nushell-BflTrRB5.js → nushell-GFe6C8D1.js} +0 -0
- /package/app/dist/assets/{objective-c-GRClK1S7.js → objective-c-Da4gtNmU.js} +0 -0
- /package/app/dist/assets/{objective-cpp-l3qYw-v5.js → objective-cpp-Du3a_PKx.js} +0 -0
- /package/app/dist/assets/{ocaml-BBDyhyMH.js → ocaml-4v1g0DKj.js} +0 -0
- /package/app/dist/assets/{odin-jCJ7Js99.js → odin-C2CG6fMn.js} +0 -0
- /package/app/dist/assets/{one-dark-pro-PIx2Diul.js → one-dark-pro-BwcbXd-T.js} +0 -0
- /package/app/dist/assets/{one-light-BFMEz49S.js → one-light-BOQW5zin.js} +0 -0
- /package/app/dist/assets/{openscad-Drf0LgCX.js → openscad-Bs2SxlcB.js} +0 -0
- /package/app/dist/assets/{pascal-BT2XAUTl.js → pascal-B6AuHgs_.js} +0 -0
- /package/app/dist/assets/{pierre-dark-BMm5HxPQ.js → pierre-dark-CRPkZhl3.js} +0 -0
- /package/app/dist/assets/{pierre-light-DyzEot4Q.js → pierre-light-BT7AHM04.js} +0 -0
- /package/app/dist/assets/{pkl-ML-dWShO.js → pkl-BuPFXprX.js} +0 -0
- /package/app/dist/assets/{plastic-BFI-Z5Z2.js → plastic-BiAROaFC.js} +0 -0
- /package/app/dist/assets/{plsql-0vd5cLro.js → plsql-DQ_z5ed2.js} +0 -0
- /package/app/dist/assets/{po-CbZ_uqQA.js → po-BvHij3iO.js} +0 -0
- /package/app/dist/assets/{poimandres-Cayhd01L.js → poimandres-BbdNMHGS.js} +0 -0
- /package/app/dist/assets/{polar-C4hfV8Nc.js → polar-p_EVOYp2.js} +0 -0
- /package/app/dist/assets/{postcss-osFUbTLw.js → postcss-BVVH-mhK.js} +0 -0
- /package/app/dist/assets/{powerquery-CTlGUQPj.js → powerquery-D2htabf9.js} +0 -0
- /package/app/dist/assets/{powershell-DyZsOmuq.js → powershell-NfY3J8Uu.js} +0 -0
- /package/app/dist/assets/{prisma-SS92PO_I.js → prisma-CMeP8UTm.js} +0 -0
- /package/app/dist/assets/{prolog-B1O1NNVC.js → prolog-Cc9yvHML.js} +0 -0
- /package/app/dist/assets/{proto-BWu3eZTs.js → proto-CNBX21YV.js} +0 -0
- /package/app/dist/assets/{puppet-tvtRVdr6.js → puppet-ZnM2F-kY.js} +0 -0
- /package/app/dist/assets/{purescript-Dtbpb7D-.js → purescript-nyLIIaTP.js} +0 -0
- /package/app/dist/assets/{python-Dlk0Acio.js → python-Dt6SBvxD.js} +0 -0
- /package/app/dist/assets/{qmldir-B-iEOngH.js → qmldir-BDEiw2QJ.js} +0 -0
- /package/app/dist/assets/{qss-Ba0p-aHw.js → qss-B8ZOZZRM.js} +0 -0
- /package/app/dist/assets/{racket-BXDsxf2U.js → racket-emNFhxM0.js} +0 -0
- /package/app/dist/assets/{raku-Dw1WWFXK.js → raku-M_VGm79k.js} +0 -0
- /package/app/dist/assets/{red-BC3Ds49b.js → red-BcYVa2Jk.js} +0 -0
- /package/app/dist/assets/{reg-DXFHGaM4.js → reg-rRGLqGjW.js} +0 -0
- /package/app/dist/assets/{rel-Dc5_Ytx2.js → rel-DqcQFa7Q.js} +0 -0
- /package/app/dist/assets/{riscv-ZgswiWij.js → riscv-CanSyeO8.js} +0 -0
- /package/app/dist/assets/{ron-YghabWAH.js → ron-BQ46iNCb.js} +0 -0
- /package/app/dist/assets/{rose-pine-ByWLnVr3.js → rose-pine-BuTm62Vj.js} +0 -0
- /package/app/dist/assets/{rose-pine-dawn-DBmeySrz.js → rose-pine-dawn-B670NuiP.js} +0 -0
- /package/app/dist/assets/{rose-pine-moon-B9J-N3nK.js → rose-pine-moon-6KoQonQX.js} +0 -0
- /package/app/dist/assets/{rosmsg-DTKmAsVH.js → rosmsg-Bw0HfGe_.js} +0 -0
- /package/app/dist/assets/{rust-nfXwuE6F.js → rust-D83UuV7F.js} +0 -0
- /package/app/dist/assets/{sass-CbRjkld3.js → sass-CE2YZJdE.js} +0 -0
- /package/app/dist/assets/{scala-BzD3eypx.js → scala-CyYhociv.js} +0 -0
- /package/app/dist/assets/{scheme-D4d1PV1y.js → scheme-BrRWQ1yX.js} +0 -0
- /package/app/dist/assets/{sdbl-Cf-Ydnvx.js → sdbl-CtZR2I6R.js} +0 -0
- /package/app/dist/assets/{slack-dark-MszIyPZ2.js → slack-dark-nxsbRL6U.js} +0 -0
- /package/app/dist/assets/{slack-ochin-tQ3Q0gE9.js → slack-ochin-Cx2HX71B.js} +0 -0
- /package/app/dist/assets/{smalltalk-_uWoArwn.js → smalltalk-DGeW9hbd.js} +0 -0
- /package/app/dist/assets/{snazzy-light-9sniMEk5.js → snazzy-light-508iEJO_.js} +0 -0
- /package/app/dist/assets/{solarized-dark-CdD0Hxzv.js → solarized-dark-TCkigWjM.js} +0 -0
- /package/app/dist/assets/{solarized-light-C-nsEdqF.js → solarized-light-R2Rcjqww.js} +0 -0
- /package/app/dist/assets/{solidity-D6uC-xwP.js → solidity-46G7JVSr.js} +0 -0
- /package/app/dist/assets/{splunk-LQYHRu14.js → splunk-DKgoBk9o.js} +0 -0
- /package/app/dist/assets/{ssh-config-B7BUl8Rd.js → ssh-config-JoXpWa3y.js} +0 -0
- /package/app/dist/assets/{stylus-Byjxdx_q.js → stylus-BPw8WnNN.js} +0 -0
- /package/app/dist/assets/{swift-BexLlMrU.js → swift-Ce2Nlw8Q.js} +0 -0
- /package/app/dist/assets/{synthwave-84-BxMBwQMS.js → synthwave-84-Br2i7yYN.js} +0 -0
- /package/app/dist/assets/{system-verilog-DVGwm0mw.js → system-verilog-Dkc37EdI.js} +0 -0
- /package/app/dist/assets/{systemd-H2IT3-p5.js → systemd-CcJTFvpw.js} +0 -0
- /package/app/dist/assets/{talonscript-mKZIGM8n.js → talonscript-CHxC2PG4.js} +0 -0
- /package/app/dist/assets/{tasl-B7he_Ugr.js → tasl-woKXKJkx.js} +0 -0
- /package/app/dist/assets/{tcl-5mT3RxHH.js → tcl-6FTtarFH.js} +0 -0
- /package/app/dist/assets/{terraform-BZP0GLsT.js → terraform-DHx5Kdyi.js} +0 -0
- /package/app/dist/assets/{tokyo-night-CTPVdZt9.js → tokyo-night-BQsIhA-A.js} +0 -0
- /package/app/dist/assets/{toml-CTFA98he.js → toml-BCbG8Uu3.js} +0 -0
- /package/app/dist/assets/{tsv-BayJtYdY.js → tsv-Bfk0YRxN.js} +0 -0
- /package/app/dist/assets/{turtle-TVCBh_kY.js → turtle-DsCF_r1D.js} +0 -0
- /package/app/dist/assets/{typespec-BUvaJDLF.js → typespec-tsneGPKg.js} +0 -0
- /package/app/dist/assets/{typst-8NBaY7Ec.js → typst-BcQNhVIE.js} +0 -0
- /package/app/dist/assets/{v-VihyTigi.js → v-CPbK5D5K.js} +0 -0
- /package/app/dist/assets/{vala-DyFAPyX6.js → vala-CTmcnleK.js} +0 -0
- /package/app/dist/assets/{vb-Dg1Iqi4J.js → vb-iQRhK9Tp.js} +0 -0
- /package/app/dist/assets/{verilog-D2Xc-vhD.js → verilog-BxRFSB3_.js} +0 -0
- /package/app/dist/assets/{vesper-DJbtqYNr.js → vesper-D_U9vezF.js} +0 -0
- /package/app/dist/assets/{vhdl-CU3BVeE7.js → vhdl-D4h06VsC.js} +0 -0
- /package/app/dist/assets/{viml-hG2shuOW.js → viml-DMcwh6Y2.js} +0 -0
- /package/app/dist/assets/{vitesse-black-DbG2gsc0.js → vitesse-black-Dk8H62LF.js} +0 -0
- /package/app/dist/assets/{vitesse-dark-B6WV4xXH.js → vitesse-dark-BuiSS132.js} +0 -0
- /package/app/dist/assets/{vitesse-light-DC1pdD02.js → vitesse-light-DfdaVJLv.js} +0 -0
- /package/app/dist/assets/{vyper-C1wojIuk.js → vyper-DfAPtbtc.js} +0 -0
- /package/app/dist/assets/{wasm-C6Y0s02M.js → wasm-ByDQ9GrP.js} +0 -0
- /package/app/dist/assets/{wasm-y20ImDym.js → wasm-CfmxG3B2.js} +0 -0
- /package/app/dist/assets/{wenyan-BG5vPQF0.js → wenyan-DNkN8oQc.js} +0 -0
- /package/app/dist/assets/{wgsl-DrVb-Cub.js → wgsl-Bggw1Yhv.js} +0 -0
- /package/app/dist/assets/{wikitext-PRC4s8sH.js → wikitext-zXy-4mpr.js} +0 -0
- /package/app/dist/assets/{wit-ChW5qvg_.js → wit--vc2X9vR.js} +0 -0
- /package/app/dist/assets/{wolfram-B8mKuZSQ.js → wolfram-Dr60-Zy4.js} +0 -0
- /package/app/dist/assets/{xterm-DGJHbKBQ.js → xterm-Ba9eaFdZ.js} +0 -0
- /package/app/dist/assets/{zenscript-C-jEPC9j.js → zenscript-Cf2Qp-oj.js} +0 -0
- /package/app/dist/assets/{zig-EbnRGjcz.js → zig-DgUQodsP.js} +0 -0
|
@@ -0,0 +1,1366 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CN4B7z8Z.js","assets/page-shell-CaMV_G2I.js","assets/html-CrFhd97J.js","assets/css-J88DqgyO.js","assets/javascript-YzZUmjcN.js","assets/angular-ts-Be9rCyh7.js","assets/scss-dYaO_Ssw.js","assets/apl-C-09mkOY.js","assets/json-DeVTS63Q.js","assets/xml-DHqUJISw.js","assets/java-BZRe3u16.js","assets/astro-DQR04HMP.js","assets/postcss-BVVH-mhK.js","assets/tsx-C3E3ZPo7.js","assets/typescript-zC8doK3K.js","assets/blade-CHOb28s9.js","assets/html-derivative-SXrZiT2S.js","assets/sql-BgOSYFXh.js","assets/bsl-9Rfj8X2G.js","assets/sdbl-CtZR2I6R.js","assets/c-Czi5ZOPg.js","assets/cairo-B8t0-PSB.js","assets/python-Dt6SBvxD.js","assets/cobol-C0UrcShI.js","assets/coffee-DLCACHKU.js","assets/cpp-CKRDyJLk.js","assets/glsl-CthKK13_.js","assets/regexp-D5UpjLq1.js","assets/crystal-DzdlwfxO.js","assets/shellscript-BGY92qaj.js","assets/edge-BiusF5O8.js","assets/elixir-DVV1N8WB.js","assets/elm-ZwoouJdM.js","assets/erb-6WVNn8lP.js","assets/ruby-DK9_UnsF.js","assets/graphql-Cfx6sMIN.js","assets/jsx-B73xjEBK.js","assets/haml-DpOUW3De.js","assets/lua-CKg4_5Yw.js","assets/yaml-CHAY15k-.js","assets/erlang-CdOz9ruD.js","assets/markdown-BObkjWCp.js","assets/fortran-fixed-form-BmD2L0UY.js","assets/fortran-free-form-Db24aQuN.js","assets/fsharp-DgKUr7h2.js","assets/gdresource-BqgTfeIa.js","assets/gdscript-CxxY7zMa.js","assets/gdshader-W85lNgcx.js","assets/git-commit-CPnaL3nl.js","assets/diff-DGLbp6Xl.js","assets/git-rebase-CI6iVcd4.js","assets/glimmer-js-MU0okVIL.js","assets/glimmer-ts-BXJcqrHb.js","assets/hack-Cfn0L20S.js","assets/handlebars-Dq6TUqDg.js","assets/http-BxRXAeum.js","assets/hurl-BsAa903H.js","assets/csv-Cx2EO4hN.js","assets/hxml-DlOl0PEf.js","assets/haxe-DxCG7g2C.js","assets/jinja-CkL9mgnB.js","assets/jison-DY01LEsx.js","assets/julia-D5UCqxaX.js","assets/r-BOwNWtkP.js","assets/just-BfeKX4XX.js","assets/perl-DtYnB2VK.js","assets/latex-CllT7gYn.js","assets/tex-Drg-gBC1.js","assets/liquid-Bgz2sjbj.js","assets/marko-CSplXaxm.js","assets/less-Dycz37IB.js","assets/mdc-CR1bPJlt.js","assets/nextflow-CK5HLJvq.js","assets/nextflow-groovy-CYeLXiaP.js","assets/nginx-Chba8emm.js","assets/nim-BJOCNxTB.js","assets/php-Cm6MwVxd.js","assets/pug-Cs95QZUY.js","assets/qml-DV4H8TeV.js","assets/razor-rzD3KE0N.js","assets/csharp-BJRWJrkS.js","assets/rst-nRBldbnW.js","assets/cmake-DuxpWyxB.js","assets/sas-BxxScrc4.js","assets/shaderlab-jhHUXThs.js","assets/hlsl-CU9ay1Rj.js","assets/shellsession-DHio1RBs.js","assets/soy-CWnh82_C.js","assets/sparql-D050l-1j.js","assets/turtle-DsCF_r1D.js","assets/stata-Di5c1EGu.js","assets/surrealql-CKgBuPai.js","assets/svelte-DGNSQgHP.js","assets/templ--mBJoDNy.js","assets/go-B2Qj-jpc.js","assets/ts-tags-_EoiaFc_.js","assets/twig-BkmJOmf1.js","assets/vue-Dqnq1uw7.js","assets/vue-html-CZNe_SnY.js","assets/vue-vine-ChEJZJ0Y.js","assets/stylus-BPw8WnNN.js","assets/xsl-B_xW8s_z.js","assets/ThreadDetailRoute-Caqz8odF.js","assets/chunk-JZWAC4HX-CmnT162V.js","assets/workspace-open-target-preference-Dve5Zih1.js","assets/mutation-errors-DgGC9CkY.js","assets/effective-hosts-BS3g3uzj.js","assets/dialog-JFJupr8S.js","assets/ThreadUnarchiveButton-2shfHri9.js","assets/thread-queries-DI7HoSpk.js","assets/mutation-cache-effects-BX02KjBd.js","assets/localhost-badge-BESHcXM2.js","assets/split-button-PlurXMEc.js","assets/pill-Ds03GLze.js","assets/ThreadDetailRoute-BrP-ENHg.css","assets/AppSettingsView-Dh4Od2M3.js","assets/settings-section-BgEyrMBV.js","assets/ProjectSettingsView-BoH5a1hi.js","assets/ProjectArchivedThreadsView-o1R22xfj.js","assets/InternalReplayListView-BjzY8fhh.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$i as e,A as t,Aa as n,Bi as r,Br as i,C as a,Ca as o,Ct as s,D as c,Da as l,E as u,Ea as d,Ei as f,Et as p,Fi as m,Gi as h,Gn as g,H as _,Hi as v,Hr as y,Ht as b,Ii as x,J as S,Ji as C,Jn as w,Jt as T,K as E,Ki as D,Li as O,Ln as ee,Lr as te,Lt as k,M as A,Mi as j,Ni as M,O as ne,Oa as N,Oi as re,Qi as ie,Qn as ae,Rr as P,Rt as F,S as oe,Sa as se,T as I,Ta as L,Tr as ce,Tt as le,Ui as ue,Vi as R,Vr as de,Wn as fe,Xi as pe,Y as me,Yi as he,Yn as ge,Yt as _e,Zi as ve,Zn as ye,_ as be,_a as xe,_i as Se,_r as Ce,aa as we,b as Te,ba as Ee,bi as De,ca as Oe,ci as ke,ct as Ae,ea as je,er as Me,g as Ne,ga as Pe,h as Fe,ha as Ie,hn as Le,i as Re,ia as ze,it as Be,ja as Ve,ji as He,k as Ue,lt as We,m as Ge,ma as Ke,mt as qe,n as Je,na as Ye,oa as Xe,or as Ze,p as Qe,pa as $e,qi as et,r as tt,ra as nt,sa as rt,st as it,t as at,ta as ot,tn as st,v as ct,va as lt,w as ut,wa as dt,xa as ft,xr as pt,xt as mt,y as ht,ya as gt,yi as _t,zi as vt,zr as yt}from"./page-shell-CaMV_G2I.js";import{$ as bt,At as xt,B as St,Bt as Ct,C as wt,Ct as Tt,Dt as Et,Et as Dt,F as Ot,Ft as kt,G as At,Gt as jt,H as Mt,Ht as Nt,I as Pt,It as Ft,J as It,K as Lt,Kt as Rt,L as zt,Lt as Bt,M as Vt,Mt as Ht,N as Ut,Nt as Wt,Ot as Gt,P as Kt,Q as qt,R as Jt,Rt as Yt,S as Xt,St as Zt,Tt as Qt,U as $t,V as en,Vt as tn,W as nn,Wt as rn,X as an,Y as on,Z as sn,_ as cn,_t as ln,a as un,bt as dn,c as fn,ct as pn,d as mn,dt as hn,f as gn,ft as _n,g as vn,gt as yn,h as bn,ht as xn,i as Sn,jt as Cn,kt as wn,l as Tn,lt as En,m as Dn,mt as On,n as kn,nt as An,o as jn,ot as Mn,p as Nn,pt as Pn,q as Fn,r as In,s as Ln,st as Rn,u as zn,ut as Bn,v as Vn,vt as Hn,wt as Un,xt as Wn,y as Gn,yt as Kn,z as qn,zt as Jn}from"./effective-hosts-BS3g3uzj.js";import{A as Yn,D as Xn,E as Zn,M as Qn,O as $n,T as er,g as tr,i as nr,j as rr,k as ir,r as ar,s as or,w as sr,y as cr}from"./thread-queries-DI7HoSpk.js";import{a as lr,c as ur,d as dr,f as fr,i as pr,l as mr,n as hr,o as gr,p as z,r as _r,t as vr,u as yr}from"./chunk-JZWAC4HX-CmnT162V.js";import{_ as br,a as xr,c as Sr,g as Cr,h as wr,i as Tr,l as Er,m as Dr,n as Or,o as kr,p as Ar,r as jr,s as Mr,t as Nr,u as Pr,v as Fr}from"./dialog-JFJupr8S.js";import{C as Ir,E as Lr,S as Rr,T as zr,_ as Br,c as Vr,f as Hr,g as Ur,h as Wr,i as Gr,n as Kr,r as qr,t as Jr,u as Yr,v as Xr,x as Zr,y as Qr}from"./mutation-errors-DgGC9CkY.js";import{A as $r,C as ei,D as ti,E as ni,F as ri,I as ii,L as ai,M as oi,N as si,P as ci,S as li,T as ui,c as di,g as fi,h as pi,i as mi,j as hi,k as gi,m as _i,p as vi,s as yi,v as bi,w as xi,x as Si,y as Ci}from"./mutation-cache-effects-BX02KjBd.js";import{C as wi,S as Ti,_ as Ei,a as Di,b as Oi,c as ki,d as Ai,g as ji,h as Mi,i as Ni,l as Pi,m as Fi,n as Ii,o as Li,p as Ri,s as zi,t as Bi,u as Vi,v as Hi,x as Ui,y as Wi}from"./localhost-badge-BESHcXM2.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Gi=d((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}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 o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ki=d(((e,t)=>{t.exports=Gi()})),qi=d((e=>{var t=Ki(),n=L(),r=Rt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function k(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?k(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var A=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},N=[],re=-1;function ie(e){return{current:e}}function ae(e){0>re||(e.current=N[re],N[re]=null,re--)}function P(e,t){re++,N[re]=e.current,e.current=t}var F=ie(null),oe=ie(null),se=ie(null),I=ie(null);function ce(e,t){switch(P(se,t),P(oe,e),P(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(F),P(F,e)}function le(){ae(F),ae(oe),ae(se)}function ue(e){e.memoizedState!==null&&P(I,e);var t=F.current,n=ef(t,e.type);t!==n&&(P(oe,e),P(F,n))}function R(e){oe.current===e&&(ae(F),ae(oe)),I.current===e&&(ae(I),lp._currentValue=ne)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=M.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function nt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[it])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},wt={};function Tt(e){return ve.call(wt,e)?!0:ve.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Dt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ot(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Pt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,kt(n)):Bt(e,o,kt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+kt(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Mt(e)}function Bt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ht(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(A(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 Yt=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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Nt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(ku(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,`passive`,{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=f({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=f({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(f({},En,{dataTransfer:0})),kn=vn(f({},xn,{relatedTarget:0})),An=vn(f({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(f({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(f({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(f({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(f({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(f({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(f({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(f({},En,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Un=vn(f({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Ld(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){kd(e,0)}function cr(e){if(Nt(ht(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function z(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function _r(e,t){if(e===`click`)return cr(t)}function vr(e,t){if(e===`input`||e===`change`)return cr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ve.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pt(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=cn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Ld(kr,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};cn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),bt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<bu)throw bu=0,xu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,F.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=oi(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return di(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=oi(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=oi(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=oi(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Fe(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,Ni=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:Ad(`cancel`,t),Ad(`close`,t);break;case`iframe`:case`object`:case`embed`:Ad(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)Ad(Dd[n],t);break;case`source`:Ad(`error`,t);break;case`img`:case`image`:case`link`:Ad(`error`,t),Ad(`load`,t);break;case`details`:Ad(`toggle`,t);break;case`input`:Ad(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ad(`invalid`,t);break;case`textarea`:Ad(`invalid`,t),Ut(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ud(t.textContent,n)?(r.popover!=null&&(Ad(`beforetoggle`,t),Ad(`toggle`,t)),r.onScroll!=null&&Ad(`scroll`,t),r.onScrollEnd!=null&&Ad(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:ji=ji.return}}function Bi(e){if(e!==ji)return!1;if(!Ni)return zi(e),Ni=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||tf(e.type,e.memoizedProps)),n=!n),n&&Mi&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=Sf(e)}else t===27?(t=Mi,uf(e.type)?(e=xf,xf=null,Mi=e):Mi=t):Mi=ji?bf(e.stateNode.nextSibling):null;return!0}function Vi(){Mi=ji=null,Ni=!1}function Hi(){var e=Pi;return e!==null&&(ou===null?ou=e:ou.push.apply(ou,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=ie(null),Gi=null,qi=null;function Ji(e,t,n){P(Wi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Wi.current,ae(Wi)}function Xi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Zi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Xi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===I.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Gi=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return na(Gi,e)}function B(e,t){return Gi===null&&ea(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,V=t.unstable_NormalPriority,aa={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new ra,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ia(V,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=xd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ha=j.S;j.S=function(e,t){lu=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ie(null);function _a(){var e=ga.current;return e===null?Wl.pooledCache:e}function va(e,t){t===null?P(ga,ga.current):P(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=Wl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Na(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ui(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case h:return t=mi(t,e.mode,n),t.return=e,t;case T:return t=Ea(t),f(e,t,n)}if(A(t)||ee(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===b)return f(e,B(e,t),n);Pa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ea(n),p(e,t,n,r)}if(A(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===b)return p(e,t,B(e,n),r);Pa(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ea(r),_(e,t,n,r,i)}if(A(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ma(r),i);if(r.$$typeof===b)return _(e,t,n,B(t,r),i);Pa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ni&&Ei(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Ni&&Ei(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Ni&&Ei(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ni&&Ei(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ni&&Ei(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ni&&Ei(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ea(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ma(o),c);if(o.$$typeof===b)return x(e,r,B(e,o),c);Pa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ja=0;var i=x(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ua(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Wa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Kl&p)===p:(r&p)===p){p!==0&&p===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ra=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=ie(null),Za=ie(0);function Qa(e,t){e=Ql,P(Za,e),P(Xa,t),Ql=e|t.baseLanes}function $a(){P(Za,Ql),P(Xa,Xa.current)}function eo(){Ql=Za.current,ae(Xa),ae(Za)}var to=ie(null),no=null;function ro(e){var t=e.alternate;P(co,co.current&1),P(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){P(co,co.current),P(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(P(co,co.current),P(to,e),no===null&&(no=e)):oo(e)}function oo(){P(co,co.current),P(to,to.current)}function so(e){ae(to),no===e&&(no=null),ae(co)}var co=ie(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=0,fo=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return uo=a,fo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){j.H=Bs;var t=po!==null&&po.next!==null;if(uo=0,mo=po=fo=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&$i(e)&&(ac=!0))}function Eo(e,t,n,r){fo=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(fo.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}uo=0,mo=po=fo=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?fo.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=fo.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?fo.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw fo.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?fo.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ta(bo,e,t),t=fo,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===b)return ta(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=fo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=fo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=No(),fo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(uo&f)===f:(Kl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ua&&(d=!0);else if((uo&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,fo.lanes|=p,eu|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,fo.lanes|=f,eu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(ac=!0,d&&(n=da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Bo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);br(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=fo,a=Mo(),o=Ni;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((po||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Wl===null)throw Error(i(349));o||uo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fo.updateQueue,t===null?(t=No(),fo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ko(e){var t=ti(e,2);t!==null&&wu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ls(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(Ni){var n=Wl.formState;if(n!==null){a:{var r=fo;if(Ni){if(Mi){b:{for(var i=Mi,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=bf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,fo,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,fo,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,fo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===ba?Sa:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(fo.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=fo.updateQueue,t===null&&(t=No(),fo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();fo.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(fo.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){fo.flags|=4;var t=fo.updateQueue;if(t===null)t=No(),fo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(Ul&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||uo&1073741824&&!(Kl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Cu(),fo.lanes|=e,eu|=e,n)}function Cs(e,t,n,r){return br(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(Kl&261930)?(ac=!0,e.memoizedState=n):(e=Cu(),fo.lanes|=e,eu|=e,t):(e=Ss(e,n,r),br(e,t)||(ac=!0),e)}function ws(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Is(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ma(c,r),Su(e)):Fs(e,t,r,Su(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,ne,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},Su())}function ks(){return ta(lp)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=Va(n);var r=Ha(t,e,n);r!==null&&(wu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ei(e,t,n,r),n!==null&&(wu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,Su())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return $r(e,t,i,0),Wl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return wu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&wu(t,e,2)}function Ls(e){var t=e.alternate;return e===fo||t!==null&&t===fo}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Bs={readContext:ta,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ta,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ns.bind(null,fo,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,fo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,fo,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=fo,a=jo();if(Ni){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));Kl&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Wl.identifierPrefix;if(Ni){var n=Ti,r=wi;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,fo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,fo)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(Ul&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ta,use:Fo,useCallback:bs,useContext:ta,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ta,use:Fo,useCallback:bs,useContext:ta,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?Ss(n,e,t):Cs(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(wu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(wu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Su(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(wu(t,e,n),Ua(t,e,n))}};function Ks(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!xr(n,r)||!xr(i,a):!0}function qs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Gs.enqueueReplaceState(t,t.state,null)}function Js(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){Jr(e)}function Xs(e){console.error(e)}function Zs(e){Jr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Va(e),e.tag=3,e}function nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(fu===null?fu=new Set([this]):fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?Iu():n.alternate===null&&$l===0&&($l=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),td(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),td(e,r,a)),!1}throw Error(i(435,n.tag))}return td(e,r,a),Iu(),!1}if(Ni)return t=to.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=ec(e.stateNode,r,a),Wa(e,a),$l!==4&&($l=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),au===null?au=[o]:au.push(o),$l!==4&&($l=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ec(n.stateNode,r,e),Wa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(fu===null||!fu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ea(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(Ni&&s&&Oi(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ia(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ni){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(io(t),(e=Mi)?(e=gf(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Wl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),wu(r,e,s),ic;Iu(),t=mc(e,t,n)}else e=o.treeContext,Mi=bf(s.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=pc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return ea(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(Ni&&r&&Oi(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ac?(ko(e,t,a),jc(e,t,a)):(Ni&&r&&Oi(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Gs.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&qs(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=Ra||Ks(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ba(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&qs(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=Ra||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Vi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:ya()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ru),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(co.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ni){if(a?ro(t):oo(t),(e=Mi)?(e=gf(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Li(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(ro(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Wl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),wu(s,e,r),ic;_f(c)||Iu(),t=Dc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=bf(c.nextSibling),ji=t,Ni=!0,Pi=null,Fi=!1,e!==null&&Ai(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ia(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,P(co,o),oc(e,t,r,n),r=Ni?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),eu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ji(t,aa,e.memoizedState.cache),Vi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(co,co.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:Ji(t,aa,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,Ni&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=k(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,aa,r),r!==o.cache&&Zi(t,[aa],n,!0),Ka(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Ui(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=bf(e.firstChild),ji=t,Ni=!0,Pi=null,Fi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Vf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ni||(n=t.type,e=t.pendingProps,r=Qd(se.current).createElement(n),r[it]=t,r[at]=e,Kd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=Vf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&Ni&&(r=t.stateNode=wf(t.type,t.pendingProps,se.current),ji=t,Fi=!0,a=Mi,uf(t.type)?(xf=a,Mi=bf(r.firstChild)):Mi=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ni&&((a=r=Mi)&&(r=mf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=bf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,tf(a,o)?r=null:s!==null&&tf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),lp._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&Ni&&((e=n=Mi)&&(n=hf(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Li(t)),null;case 13:return wc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(aa),e===null?(a=_a(),a===null&&(a=Wl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ji(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,aa,r),r!==a.cache&&Zi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,aa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Nu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t))if(Nu())e.flags|=8192;else throw Da=Ca,xa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,iu|=t)}function zc(e,t){if(!Ni)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(aa),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(R(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=F.current,Bi(t)?Ri(t,e):(e=wf(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(R(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=F.current,Bi(t))Ri(t,o);else{var s=Qd(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Li(t,!0)}else e=Qd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),Bc(t),null);case 4:return le(),e===null&&Nd(t.stateNode.containerInfo),Bc(t),null;case 10:return Yi(t.type),Bc(t),null;case 19:if(ae(co),r=t.memoizedState,r===null)return Bc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return P(co,co.current&1|2),Ni&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>uu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ni)return Bc(t),null}else 2*Ce()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=co.current,P(co,a?n&1|2:n&1),Ni&&Ei(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(aa),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(aa),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return R(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(co),null;case 4:return le(),null;case 10:return Yi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&ae(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(aa),null;case 25:return null;default:return null}}function Uc(e,t){switch(ki(t),t.tag){case 3:Yi(aa),le();break;case 26:case 27:case 5:R(t);break;case 4:le();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:ae(co);break;case 10:Yi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&ae(ga);break;case 24:Yi(aa)}}function Wc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function Gc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){ed(e,e.return,t)}}}function qc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Jc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}function Xc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[at]=t}catch(t){ed(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[it]=e,t[at]=n}catch(t){ed(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Xd=vp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},vp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ed(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Wc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ed(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ed(n,n.return,e)}}r&64&&Kc(n),r&512&&Jc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ya(e,t)}catch(e){ed(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Xc(n),r&512&&Jc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=id.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:il||Yc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Yc(n,t);var r=dl,i=fl;uf(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),Tf(n.stateNode),dl=r,fl=i;break;case 5:il||Yc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){ed(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){ed(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,df(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):df(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),il||Gc(4,n,t),pl(e,t,n);break;case 1:il||(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){ed(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){ed(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ad.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(uf(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&64&&rl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Kd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else $f(a,e.type,e.stateNode);else e.stateNode=Jf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(a,e.type,e.stateNode):Jf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),n!==null&&r&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){ed(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ed(e,e.return,t)}}break;case 3:if(Zf=null,a=bl,bl=Of(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){ed(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=Of(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cu=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ed(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ed(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ff(m,!0):ff(l.stateNode,!1)}catch(e){ed(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){ed(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),Tl(t);break;case 1:Yc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),Tl(t);break;case 27:Tf(t.stateNode);case 26:case 5:Yc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),Wc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ed(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ja(c[i],s)}catch(e){ed(r,r.return,e)}}n&&o&64&&Kc(a),Jc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Xc(a),Jc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Jc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&sa(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Wc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ed(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&np(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=Of(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Gc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=ta(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(aa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,Ul=0,Wl=null,Gl=null,Kl=0,ql=0,Jl=null,Yl=!1,Xl=!1,Zl=!1,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=null,ou=null,su=!1,cu=0,lu=0,uu=1/0,du=null,fu=null,pu=0,mu=null,hu=null,gu=0,_u=0,vu=null,yu=null,bu=0,xu=null;function Su(){return Ul&2&&Kl!==0?Kl&-Kl:j.T===null?tt():xd()}function Cu(){if(ru===0)if(!(Kl&536870912)||Ni){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),ru=e}else ru=536870912;return e=to.current,e!==null&&(e.flags|=32),ru}function wu(e,t,n){(e===Wl&&(ql===2||ql===9)||e.cancelPendingCommit!==null)&&(ju(e,0),Ou(e,Kl,ru,!1)),Je(e,n),(!(Ul&2)||e!==Wl)&&(e===Wl&&(!(Ul&2)&&(tu|=n),$l===4&&Ou(e,Kl,ru,!1)),pd(e))}function Tu(e,t,n){if(Ul&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),a=r?zu(e,t):Lu(e,t,!0),o=r;do{if(a===0){Xl&&!r&&Ou(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Du(n)){a=Lu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=au;var l=c.current.memoizedState.isDehydrated;if(l&&(ju(c,s).flags|=256),s=Lu(c,s,!1),s!==2){if(Zl&&!l){c.errorRecoveryDisabledLanes|=o,tu|=o,a=4;break a}o=ou,ou=a,o!==null&&(ou===null?ou=o:ou.push.apply(ou,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ju(e,0),Ou(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ou(r,t,ru,!Yl);break a;case 2:ou=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=cu+300-Ce(),10<a)){if(Ou(r,t,ru,!Yl),Ue(r,0,!0)!==0)break a;gu=t,r.timeoutHandle=af(Eu.bind(null,r,n,ou,du,su,t,ru,tu,iu,Yl,o,`Throttled`,-0,0),a);break a}Eu(r,n,ou,du,su,t,ru,tu,iu,Yl,o,null,-0,0)}}break}while(1);pd(e)}function Eu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Fl(t,a,d);var m=(a&62914560)===a?cu-Ce():(a&4194048)===a?lu-Ce():0;if(m=ip(d,m),m!==null){gu=a,e.cancelPendingCommit=m(Ku.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Ou(e,a,o,!l);return}}Ku(e,t,a,n,r,i,o,s,c)}function Du(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ou(e,t,n,r){t&=~nu,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function ku(){return Ul&6?!0:(md(0,!1),!1)}function Au(){if(Gl!==null){if(ql===0)var e=Gl.return;else e=Gl,qi=Gi=null,Ao(e),Aa=null,ja=0,e=Gl;for(;e!==null;)Uc(e.alternate,e),e=e.return;Gl=null}}function ju(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,of(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),gu=0,Au(),Wl=e,Gl=n=ci(e.current,null),Kl=t,ql=0,Jl=null,Yl=!1,Xl=We(e,t),Zl=!1,iu=ru=nu=tu=eu=$l=0,ou=au=null,su=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Ql=t,Qr(),n}function Mu(e,t){fo=null,j.H=Bs,t===ba||t===Sa?(t=Oa(),ql=3):t===xa?(t=Oa(),ql=4):ql=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Jl=t,Gl===null&&($l=1,Qs(e,gi(t,e.current)))}function Nu(){var e=to.current;return e===null?!0:(Kl&4194048)===Kl?no===null:(Kl&62914560)===Kl||Kl&536870912?e===no:!1}function Pu(){var e=j.H;return j.H=Bs,e===null?Bs:e}function Fu(){var e=j.A;return j.A=Vl,e}function Iu(){$l=4,Yl||(Kl&4194048)!==Kl&&to.current!==null||(Xl=!0),!(eu&134217727)&&!(tu&134217727)||Wl===null||Ou(Wl,Kl,ru,!1)}function Lu(e,t,n){var r=Ul;Ul|=2;var i=Pu(),a=Fu();(Wl!==e||Kl!==t)&&(du=null,ju(e,t)),t=!1;var o=$l;a:do try{if(ql!==0&&Gl!==null){var s=Gl,c=Jl;switch(ql){case 8:Au(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=ql;if(ql=0,Jl=null,Uu(e,s,c,l),n&&Xl){o=0;break a}break;default:l=ql,ql=0,Jl=null,Uu(e,s,c,l)}}Ru(),o=$l;break}catch(t){Mu(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Gi=null,Ul=r,j.H=i,j.A=a,Gl===null&&(Wl=null,Kl=0,Qr()),o}function Ru(){for(;Gl!==null;)Vu(Gl)}function zu(e,t){var n=Ul;Ul|=2;var r=Pu(),a=Fu();Wl!==e||Kl!==t?(du=null,uu=Ce()+500,ju(e,t)):Xl=We(e,t);a:do try{if(ql!==0&&Gl!==null){t=Gl;var o=Jl;b:switch(ql){case 1:ql=0,Jl=null,Uu(e,t,o,1);break;case 2:case 9:if(wa(o)){ql=0,Jl=null,Hu(t);break}t=function(){ql!==2&&ql!==9||Wl!==e||(ql=7),pd(e)},o.then(t,t);break a;case 3:ql=7;break a;case 4:ql=5;break a;case 7:wa(o)?(ql=0,Jl=null,Hu(t)):(ql=0,Jl=null,Uu(e,t,o,7));break;case 5:var s=null;switch(Gl.tag){case 26:s=Gl.memoizedState;case 5:case 27:var c=Gl;if(s?tp(s):c.stateNode.complete){ql=0,Jl=null;var l=c.sibling;if(l!==null)Gl=l;else{var u=c.return;u===null?Gl=null:(Gl=u,Wu(u))}break b}}ql=0,Jl=null,Uu(e,t,o,5);break;case 6:ql=0,Jl=null,Uu(e,t,o,6);break;case 8:Au(),$l=6;break a;default:throw Error(i(462))}}Bu();break}catch(t){Mu(e,t)}while(1);return qi=Gi=null,j.H=r,j.A=a,Ul=n,Gl===null?(Wl=null,Kl=0,Qr(),$l):0}function Bu(){for(;Gl!==null&&!xe();)Vu(Gl)}function Vu(e){var t=Pc(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Wu(e):Gl=t}function Hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,Kl);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,Kl);break;case 5:Ao(t);default:Uc(n,t),t=Gl=li(t,Ql),t=Pc(n,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Wu(e):Gl=t}function Uu(e,t,n,r){qi=Gi=null,Ao(t),Aa=null,ja=0;var i=t.return;try{if(rc(e,i,t,n,Kl)){$l=1,Qs(e,gi(n,e.current)),Gl=null;return}}catch(t){if(i!==null)throw Gl=i,t;$l=1,Qs(e,gi(n,e.current)),Gl=null;return}t.flags&32768?(Ni||r===1?e=!0:Xl||Kl&536870912?e=!1:(Yl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gu(t,e)):Wu(t)}function Wu(e){var t=e;do{if(t.flags&32768){Gu(t,Yl);return}e=t.return;var n=Vc(t.alternate,t,Ql);if(n!==null){Gl=n;return}if(t=t.sibling,t!==null){Gl=t;return}Gl=t=e}while(t!==null);$l===0&&($l=5)}function Gu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,Gl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Gl=e;return}Gl=e=n}while(e!==null);$l=6,Gl=null}function Ku(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Zu();while(pu!==0);if(Ul&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Ye(e,n,o,s,c,l),e===Wl&&(Gl=Wl=null,Kl=0),hu=t,mu=e,gu=n,_u=o,vu=a,yu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,od(De,function(){return Qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,a=M.p,M.p=2,s=Ul,Ul|=4;try{cl(e,t,n)}finally{Ul=s,M.p=a,j.T=r}}pu=1,qu(),Ju(),Yu()}}function qu(){if(pu===1){pu=0;var e=mu,t=hu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Ul;Ul|=4;try{xl(t,e);var a=Zd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vp=!!Xd,Zd=Xd=null}finally{Ul=i,M.p=r,j.T=n}}e.current=t,pu=2}}function Ju(){if(pu===2){pu=0;var e=mu,t=hu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=Ul;Ul|=4;try{ll(e,t.alternate,t)}finally{Ul=i,M.p=r,j.T=n}}pu=3}}function Yu(){if(pu===4||pu===3){pu=0,Se();var e=mu,t=hu,n=gu,r=yu;t.subtreeFlags&10256||t.flags&10256?pu=5:(pu=0,hu=mu=null,Xu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(fu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}gu&3&&Zu(),pd(e),i=e.pendingLanes,n&261930&&i&42?e===xu?bu++:(bu=0,xu=e):bu=0,md(0,!1)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Zu(){return qu(),Ju(),Yu(),Qu()}function Qu(){if(pu!==5)return!1;var e=mu,t=_u;_u=0;var n=et(gu),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,md(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{M.p=a,j.T=r,Xu(e,t)}}function $u(e,t,n){t=gi(n,t),t=ec(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Je(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=gi(n,e),n=tc(2),r=Ha(t,n,2),r!==null&&(nc(n,r,t,e),Je(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(Kl&n)===n&&($l===4||$l===3&&(Kl&62914560)===Kl&&300>Ce()-cu?!(Ul&2)&&ju(e,0):nu|=n,iu===Kl&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=Ke()),e=ti(e,t),e!==null&&(Je(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return ye(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=Kl,a=Ue(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,yd(r,a));r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&rf()&&(e=fd);for(var t=Ce(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Wl,n=Kl,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ql===2||ql===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=vd.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function vd(e,t){if(pu!==0&&pu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zu()&&e.callbackNode!==n)return null;var r=Kl;return r=Ue(e,e===Wl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Tu(e,r,t),_d(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?vd.bind(null,e):null)}function yd(e,t){if(Zu())return null;Tu(e,t,!0)}function bd(){cf(function(){Ul&6?ye(Te,hd):gd()})}function xd(){if(fd===0){var e=ua;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),fd=e}return fd}function Sd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function Cd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Sd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?Sd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(fd!==0){var e=o?Cd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Cd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Td=0;Td<Kr.length;Td++){var Ed=Kr[Td];qr(Ed.toLowerCase(),`on`+(Ed[0].toUpperCase()+Ed.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`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(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function Ad(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Pd(t,e,2,!1),n.add(r))}function jd(e,t,n){var r=0;t&&(r|=4),Pd(n,e,r,t)}var Md=`_reactListening`+Math.random().toString(36).slice(2);function Nd(e){if(!e[Md]){e[Md]=!0,vt.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||jd(t,!1,e),jd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Md]||(t[Md]=!0,jd(`selectionchange`,!1,t))}}function Pd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Fd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case Rr:case zr:case Br:l=An;break;case Wr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=sn(m,p),g!=null&&d.push(Id(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Rd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&zd(s,c,l,d,!1),u!==null&&f!==null&&zd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c))if(ur)v=vr;else{v=z;var y=gr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=_r;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Ld(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Ld(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),wd(s,e,r,n,i)}kd(s,t)})}function Id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ld(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=sn(e,n),i!=null&&r.unshift(Id(e,i,a)),i=sn(e,t),i!=null&&r.push(Id(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=sn(n,a),l!=null&&o.unshift(Id(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(Id(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Bd=/\r\n?/g,Vd=/\u0000|\uFFFD/g;function Hd(e){return(typeof e==`string`?e:``+e).replace(Bd,`
|
|
10
|
+
`).replace(Vd,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,a.name,a,null),Wd(e,t,`formEncType`,a.formEncType,a,null),Wd(e,t,`formMethod`,a.formMethod,a,null),Wd(e,t,`formTarget`,a.formTarget,a,null)):(Wd(e,t,`encType`,a.encType,a,null),Wd(e,t,`method`,a.method,a,null),Wd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ad(`beforetoggle`,e),Ad(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Et(e,n,r))}}function Gd(e,t,n,r,a,o){switch(n){case`style`:qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function Kd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ad(`error`,e),Ad(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,o,s,n,null)}}a&&Wd(e,t,`srcSet`,n.srcSet,n,null),r&&Wd(e,t,`src`,n.src,n,null);return;case`input`:Ad(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Wd(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Ad(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Wd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in Ad(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Wd(e,t,s,c,n,null)}Ut(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Wd(e,t,l,r,n,null)}return;case`dialog`:Ad(`beforetoggle`,e),Ad(`toggle`,e),Ad(`cancel`,e),Ad(`close`,e);break;case`iframe`:case`object`:Ad(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)Ad(Dd[r],e);break;case`image`:Ad(`error`,e),Ad(`load`,e);break;case`details`:Ad(`toggle`,e);break;case`embed`:case`source`:case`link`:Ad(`error`,e),Ad(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Gd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Wd(e,t,c,r,n,null))}function qd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Wd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Wd(e,t,p,m,r,f)}}Lt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Wd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Wd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Wd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Wd(e,t,s,a,r,o)}Ht(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Wd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Wd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Wd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Wd(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Gd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Gd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Wd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Wd(e,t,f,p,r,m)}function Jd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Yd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Jd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Xd=null,Zd=null;function Qd(e){return e.nodeType===9?e:e.ownerDocument}function $d(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function ef(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function tf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nf=null;function rf(){var e=window.event;return e&&e.type===`popstate`?e===nf?!1:(nf=e,!0):(nf=null,!1)}var af=typeof setTimeout==`function`?setTimeout:void 0,of=typeof clearTimeout==`function`?clearTimeout:void 0,sf=typeof Promise==`function`?Promise:void 0,cf=typeof queueMicrotask==`function`?queueMicrotask:sf===void 0?af:function(e){return sf.resolve(null).then(e).catch(lf)};function lf(e){setTimeout(function(){throw e})}function uf(e){return e===`head`}function df(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body);n=i}while(n);Wp(t)}function ff(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=Qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=M.d;M.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=ku();return e||t}function jf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Hf(e);break;case`script`:a=Kf(e)}Ef.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Uf(a))||t===`script`&&r.querySelector(qf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Kf(e)}if(!Ef.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=gt(r).hoistableStyles,a=Hf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Uf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);_t(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,H(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=gt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0},t),(t=Ef.get(i))&&Xf(e,t),a=n.createElement(`script`),_t(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=gt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Xf(e,t),a=n.createElement(`script`),_t(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t,n,r){var a=(a=se.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Hf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Hf(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Uf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Gf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Kf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hf(e){return`href="`+It(e)+`"`}function Uf(e){return`link[rel="stylesheet"][`+e+`]`}function Wf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Gf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),_t(t),e.head.appendChild(t))}function Kf(e){return`[src="`+It(e)+`"]`}function qf(e){return`script[async]`+e}function Jf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Kd(r,`style`,a),H(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hf(n.href);var o=e.querySelector(Uf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Wf(n),(a=Ef.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,H(o,n.precedence,e),t.instance=o;case`script`:return o=Kf(n.src),(a=e.querySelector(qf(o)))?(t.instance=a,_t(a),a):(r=n,(a=Ef.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,H(r,n.precedence,e));return t.instance}function H(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Hf(r.href),a=t.querySelector(Uf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Wf(r),(i=Ef.get(i))&&Yf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Yd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ap.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lp={$$typeof:b,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function up(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function fp(e){return e?(e=ii,e):ii}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(wu(n,e,t),Ua(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&wu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=Su();t=$e(t);var n=ti(e,t);n!==null&&wu(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,xp(e,t,n,r)}finally{M.p=a,j.T=i}}function bp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,xp(e,t,n,r)}finally{M.p=a,j.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Fd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}pd(a),!(Ul&6)&&(uu=Ce()+500,md(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&wu(s,a,2),ku(),hp(a,2)}if(a=Sp(r),a===null&&Fd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Fd(e,t,r,null,n)}}function Sp(e){return e=en(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cp=e,null}function Tp(e){switch(e){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(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`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 Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){_p(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){_p(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=mt(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;pp(n,Su(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),ku(),t[ot]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.4`)throw Error(i(527,Jp,`19.2.4`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Me=Xp.inject(Yp),Ne=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ys,s=Xs,c=Zs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,r,null,o,s,c,Gp),e[ot]=t.current,Nd(e),new Kp(t)}})),Ji=d(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=qi()})),Yi=class extends dt{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new nt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Xi(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Xi(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Xi(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Xi(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){rt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Pe(t,e))}findAll(e={}){return this.getAll().filter(t=>Pe(e,t))}notify(e){rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return rt.batch(()=>Promise.all(e.map(e=>e.continue().catch(lt))))}};function Xi(e){return e.options.scope?.id}function Zi(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function Qi(e,t,n){let r=e.slice(0);return r[t]=n,r}var $i=class extends dt{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(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,rt.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!se(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(Zi(e,n).forEach(e=>{e.destroy()}),Zi(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=Ee(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new ze(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=Qi(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&rt.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ea=class extends dt{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Ie(r,t),a=this.get(i);return a||(a=new we({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){rt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>xe(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>xe(e,t)):t}notify(e){rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ta=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ea,this.#t=e.mutationCache||new Yi,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Oe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Xe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ft(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=$e(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return rt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;rt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return rt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=rt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(lt).catch(lt)}invalidateQueries(e,t={}){return rt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=rt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(lt)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(lt)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(ft(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lt).catch(lt)}fetchInfiniteQuery(e){return e.behavior=Qn(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lt).catch(lt)}ensureInfiniteQueryData(e){return e.behavior=Qn(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ke(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{gt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Ke(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{gt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ie(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===o&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},B=Ve(L(),1);function na({queries:t,...n},r){let i=ot(r),a=e(),o=ie(),s=B.useMemo(()=>t.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=a?`isRestoring`:`optimistic`,t}),[t,i,a]);s.forEach(e=>{h(e),he(e,o,i.getQueryCache().get(e.queryHash))}),ve(o);let[c]=B.useState(()=>new $i(i,s,n)),[l,u,d]=c.getOptimisticResult(s,n.combine),f=!a&&n.subscribed!==!1;B.useSyncExternalStore(B.useCallback(e=>f?c.subscribe(rt.batchCalls(e)):lt,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),B.useEffect(()=>{c.setQueries(s,n)},[s,n,c]);let p=l.some((e,t)=>et(s[t],e))?l.flatMap((e,t)=>{let n=s[t];if(n){let t=new ze(i,n);if(et(n,e))return D(n,t,o);C(e,a)&&D(n,t,o)}return[]}):[];if(p.length>0)throw Promise.all(p);let m=l.find((e,t)=>{let n=s[t];return n&&pe({result:e,errorResetBoundary:o,throwOnError:n.throwOnError,query:i.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m?.error)throw m.error;return u(d())}var ra=Ji(),ia=Ve(Rt(),1),V=Ye(),aa=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=O(`Primitive.${t}`),r=B.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,V.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),oa=`Separator`,sa=`horizontal`,ca=[`horizontal`,`vertical`],la=B.forwardRef((e,t)=>{let{decorative:n,orientation:r=sa,...i}=e,a=ua(r)?r:sa,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,V.jsx)(aa.div,{"data-orientation":a,...o,...i,ref:t})});la.displayName=oa;function ua(e){return ca.includes(e)}var da=la,fa=B.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,V.jsx)(da,{ref:i,decorative:n,orientation:t,className:R(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...r}));fa.displayName=da.displayName;function pa({className:e,...t}){return(0,V.jsx)(`div`,{className:R(`animate-pulse rounded-md bg-surface-selected`,e),...t})}var ma=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`}),ha=`VisuallyHidden`,ga=B.forwardRef((e,t)=>(0,V.jsx)(Kn.span,{...e,ref:t,style:{...ma,...e.style}}));ga.displayName=ha;var _a=ga,[va,ya]=Zt(`Tooltip`,[xn]),ba=xn(),xa=`TooltipProvider`,Sa=700,Ca=`tooltip.open`,[wa,Ta]=va(xa),Ea=e=>{let{__scopeTooltip:t,delayDuration:n=Sa,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=B.useRef(!0),s=B.useRef(!1),c=B.useRef(0);return B.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,V.jsx)(wa,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:B.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:B.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:B.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Ea.displayName=xa;var Da=`Tooltip`,[Oa,ka]=va(Da),Aa=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Ta(Da,e.__scopeTooltip),l=ba(t),[u,d]=B.useState(null),f=yn(),p=B.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=B.useRef(!1),[_,v]=pn({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ca))):c.onClose(),a?.(e)},caller:Da}),y=B.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=B.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=B.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=B.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return B.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,V.jsx)(On,{...l,children:(0,V.jsx)(Oa,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:B.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:B.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};Aa.displayName=Da;var ja=`TooltipTrigger`,Ma=B.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ka(ja,n),a=Ta(ja,n),o=ba(n),s=vt(t,B.useRef(null),i.onTriggerChange),c=B.useRef(!1),l=B.useRef(!1),u=B.useCallback(()=>c.current=!1,[]);return B.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,V.jsx)(hn,{asChild:!0,...o,children:(0,V.jsx)(Kn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Tt(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:Tt(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:Tt(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:Tt(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Tt(e.onBlur,i.onClose),onClick:Tt(e.onClick,i.onClose)})})});Ma.displayName=ja;var Na=`TooltipPortal`,[Pa,Fa]=va(Na,{forceMount:void 0}),Ia=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=ka(Na,t);return(0,V.jsx)(Pa,{scope:t,forceMount:n,children:(0,V.jsx)(En,{present:n||a.open,children:(0,V.jsx)(Bn,{asChild:!0,container:i,children:r})})})};Ia.displayName=Na;var La=`TooltipContent`,Ra=B.forwardRef((e,t)=>{let n=Fa(La,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=ka(La,e.__scopeTooltip);return(0,V.jsx)(En,{present:r||o.open,children:o.disableHoverableContent?(0,V.jsx)(Ua,{side:i,...a,ref:t}):(0,V.jsx)(za,{side:i,...a,ref:t})})}),za=B.forwardRef((e,t)=>{let n=ka(La,e.__scopeTooltip),r=Ta(La,e.__scopeTooltip),i=B.useRef(null),a=vt(t,i),[o,s]=B.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=B.useCallback(()=>{s(null),d(!1)},[d]),p=B.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=qa(r,Ka(r,n.getBoundingClientRect())),a=Ja(t.getBoundingClientRect());s(Xa([...i,...a])),d(!0)},[d]);return B.useEffect(()=>()=>f(),[f]),B.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),B.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Ya(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,V.jsx)(Ua,{...e,ref:a})}),[Ba,Va]=va(Da,{isInside:!1}),Ha=Wn(`TooltipContent`),Ua=B.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=ka(La,n),l=ba(n),{onClose:u}=c;return B.useEffect(()=>(document.addEventListener(Ca,u),()=>document.removeEventListener(Ca,u)),[u]),B.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,V.jsx)(ln,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,V.jsxs)(Pn,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,V.jsx)(Ha,{children:r}),(0,V.jsx)(Ba,{scope:n,isInside:!0,children:(0,V.jsx)(_a,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Ra.displayName=La;var Wa=`TooltipArrow`,Ga=B.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ba(n);return Va(Wa,n).isInside?null:(0,V.jsx)(_n,{...i,...r,ref:t})});Ga.displayName=Wa;function Ka(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function qa(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ja(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ya(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Xa(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Za(t)}function Za(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Qa=Ea,$a=Aa,eo=Ma,to=Ia,no=Ra,ro=Qa,io=$a,ao=eo,oo=B.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,V.jsx)(to,{children:(0,V.jsx)(no,{ref:r,sideOffset:t,className:R(`z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})}));oo.displayName=no.displayName;var so=`16rem`,co=`min(90vw, 320px)`,lo=`3rem`,uo=`b`,fo=`duration-200 flex shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/75 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,po=`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,mo=`h-8`,ho={"--sidebar-width-mobile":co},go=B.createContext(null);function _o(){let e=B.useContext(go);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function vo(){let{state:e,isCompactViewport:t,openMobile:n}=_o();return t?n:e===`expanded`}var yo=B.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o},s)=>{let c=rn(),[l,u]=B.useState(!1),[d,f]=B.useState(e),p=t??d,m=B.useCallback(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t)},[n,p]),h=B.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);B.useEffect(()=>{let e=e=>{e.key===uo&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=B.useMemo(()=>({state:g,open:p,setOpen:m,isCompactViewport:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,V.jsx)(go.Provider,{value:_,children:(0,V.jsx)(ro,{delayDuration:0,children:(0,V.jsx)(`div`,{style:{"--sidebar-width":so,"--sidebar-width-icon":lo,...i},className:R(`group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar`,r),ref:s,...o,children:a})})})});yo.displayName=`SidebarProvider`;var bo=B.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a},o)=>{let{isCompactViewport:s,state:c,openMobile:l,setOpenMobile:u}=_o();return n===`none`?(0,V.jsx)(`div`,{className:R(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),ref:o,...a,children:i}):(0,V.jsxs)(V.Fragment,{children:[l&&(0,V.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/80 md:hidden`,onClick:()=>u(!1)}),(0,V.jsxs)(`div`,{ref:o,className:`group peer text-sidebar-foreground`,"data-state":c,"data-collapsible":!s&&c===`collapsed`?n:``,"data-variant":t,"data-side":e,children:[(0,V.jsx)(`div`,{"data-sidebar":`gap`,className:R(`relative hidden h-svh w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear md:block`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,V.jsx)(`div`,{"data-sidebar":`panel`,className:R(`fixed inset-y-0 z-50 flex h-svh w-(--sidebar-width-mobile) flex-col bg-sidebar text-sidebar-foreground transition-[left,right,transform,width] duration-200 ease-in-out md:z-10 md:w-(--sidebar-width) md:transition-[left,right,width] md:ease-linear`,e===`left`?`left-0 -translate-x-full data-[open=true]:translate-x-0 md:translate-x-0 md:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 translate-x-full data-[open=true]:translate-x-0 md:translate-x-0 md:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`md:p-2 md:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]`:`md:group-data-[collapsible=icon]:w-(--sidebar-width-icon) md:group-data-[side=left]:border-r md:group-data-[side=right]:border-l`,r),"data-open":l,style:ho,...a,children:(0,V.jsx)(`div`,{"data-sidebar":`sidebar`,className:`flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow`,children:i})})]})]})});bo.displayName=`Sidebar`;var xo=B.forwardRef(({className:e,onClick:t,...n},i)=>{let{toggleSidebar:a}=_o();return(0,V.jsxs)(M,{ref:i,"data-sidebar":`trigger`,variant:`ghost`,size:`icon`,className:R(Cn,e),onClick:e=>{t?.(e),a()},...n,children:[(0,V.jsx)(r,{name:`PanelLeft`,className:`max-md:pointer-coarse:hidden`}),(0,V.jsx)(r,{name:`AlignLeft`,className:`hidden max-md:pointer-coarse:block`}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})});xo.displayName=`SidebarTrigger`;var So=B.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=_o();return(0,V.jsx)(`button`,{ref:n,"data-sidebar":`rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:R(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex`,`[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})});So.displayName=`SidebarRail`;var Co=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`main`,{ref:n,className:R(`relative flex min-h-svh min-w-0 flex-1 flex-col bg-background`,`peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow`,e),...t}));Co.displayName=`SidebarInset`;var wo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(Ar,{ref:n,"data-sidebar":`input`,className:R(`h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring`,e),...t}));wo.displayName=`SidebarInput`;var To=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:R(`flex flex-col gap-2 p-2`,e),...t}));To.displayName=`SidebarHeader`;var Eo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:R(`flex flex-col gap-2 p-2`,e),...t}));Eo.displayName=`SidebarFooter`;var Do=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(fa,{ref:n,"data-sidebar":`separator`,className:R(`mx-2 w-auto bg-sidebar-border`,e),...t}));Do.displayName=`SidebarSeparator`;var Oo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:R(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t}));Oo.displayName=`SidebarContent`;var ko=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`group`,className:R(`relative flex w-full min-w-0 flex-col p-2`,e),...t}));ko.displayName=`SidebarGroup`;var Ao=B.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,V.jsx)(t?x:`div`,{ref:r,"data-sidebar":`group-label`,className:R(fo,mo,po,e),...n}));Ao.displayName=`SidebarGroupLabel`;var jo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`group`,"data-sidebar-sticky-stack":``,className:R(`relative flex w-full min-w-0 flex-col`,e),...t}));jo.displayName=`SidebarStickyStack`;var Mo=B.forwardRef(({children:e,className:t,tier:n,...r},i)=>(0,V.jsx)(`div`,{ref:i,...r,"data-sidebar":n===`label`?`group-label`:void 0,"data-sidebar-sticky-tier":n,className:R(n===`label`&&fo,n===`label`&&po,`bg-sidebar`,t),children:e}));Mo.displayName=`SidebarStickyTier`;var No=B.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,V.jsx)(t?x:`button`,{ref:r,"data-sidebar":`group-action`,className:R(`absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n}));No.displayName=`SidebarGroupAction`;var Po=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`div`,{ref:n,"data-sidebar":`group-content`,className:R(`w-full text-sm`,e),...t}));Po.displayName=`SidebarGroupContent`;var Fo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:R(`flex w-full min-w-0 flex-col gap-1`,e),...t}));Fo.displayName=`SidebarMenu`;var Io=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`li`,{ref:n,"data-sidebar":`menu-item`,className:R(`group/menu-item relative`,e),...t}));Io.displayName=`SidebarMenuItem`;var Lo=m(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-border/70 data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[active=true]:hover:bg-sidebar-border/70 data-[active=true]:hover:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:!p-0`}},defaultVariants:{variant:`default`,size:`default`}}),Ro=B.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o},s)=>{let c=e?x:`button`,{isCompactViewport:l,state:u}=_o(),d=(0,V.jsx)(c,{ref:s,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:R(Lo({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,V.jsxs)(io,{children:[(0,V.jsx)(ao,{asChild:!0,children:d}),(0,V.jsx)(oo,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...i})]})):d});Ro.displayName=`SidebarMenuButton`;var zo=B.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,V.jsx)(t?x:`button`,{ref:i,"data-sidebar":`menu-action`,className:R(`absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`group-data-[collapsible=icon]:hidden`,n&&`group-hover/menu-item:opacity-100 group-has-[:focus-visible]/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0`,e),...r}));zo.displayName=`SidebarMenuAction`;var Bo=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`span`,{ref:n,"data-sidebar":`menu-badge`,className:R(`inline-flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium leading-none tabular-nums text-sidebar-foreground select-none pointer-events-none`,e),...t}));Bo.displayName=`SidebarMenuBadge`;var Vo=B.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=B.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,V.jsxs)(`div`,{ref:r,"data-sidebar":`menu-skeleton`,className:R(`rounded-md h-8 flex gap-2 px-2 items-center`,e),...n,children:[t&&(0,V.jsx)(pa,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,V.jsx)(pa,{className:`h-4 flex-1 max-w-[--skeleton-width]`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});Vo.displayName=`SidebarMenuSkeleton`;var Ho=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:R(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t}));Ho.displayName=`SidebarMenuSub`;var Uo=B.forwardRef(({...e},t)=>(0,V.jsx)(`li`,{ref:t,...e}));Uo.displayName=`SidebarMenuSubItem`;var Wo=B.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},a)=>(0,V.jsx)(e?x:`a`,{ref:a,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:R(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),...i}));Wo.displayName=`SidebarMenuSubButton`;function Go(){var e=[...arguments];return(0,B.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Ko=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function qo(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Jo(e){return`nodeType`in e}function Yo(e){return e?qo(e)?e:Jo(e)?e.ownerDocument?.defaultView??window:window:window}function Xo(e){let{Document:t}=Yo(e);return e instanceof t}function Zo(e){return qo(e)?!1:e instanceof Yo(e).HTMLElement}function Qo(e){return e instanceof Yo(e).SVGElement}function $o(e){return e?qo(e)?e.document:Jo(e)?Xo(e)?e:Zo(e)||Qo(e)?e.ownerDocument:document:document:document}var es=Ko?B.useLayoutEffect:B.useEffect;function ts(e){let t=(0,B.useRef)(e);return es(()=>{t.current=e}),(0,B.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function ns(){let e=(0,B.useRef)(null);return[(0,B.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,B.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function rs(e,t){t===void 0&&(t=[e]);let n=(0,B.useRef)(e);return es(()=>{n.current!==e&&(n.current=e)},t),n}function is(e,t){let n=(0,B.useRef)();return(0,B.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function as(e){let t=ts(e),n=(0,B.useRef)(null);return[n,(0,B.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function os(e){let t=(0,B.useRef)();return(0,B.useEffect)(()=>{t.current=e},[e]),t.current}var ss={};function cs(e,t){return(0,B.useMemo)(()=>{if(t)return t;let n=ss[e]==null?0:ss[e]+1;return ss[e]=n,e+`-`+n},[e,t])}function ls(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var us=ls(1),ds=ls(-1);function fs(e){return`clientX`in e&&`clientY`in e}function ps(e){if(!e)return!1;let{KeyboardEvent:t}=Yo(e.target);return t&&e instanceof t}function ms(e){if(!e)return!1;let{TouchEvent:t}=Yo(e.target);return t&&e instanceof t}function hs(e){if(ms(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return fs(e)?{x:e.clientX,y:e.clientY}:null}var gs=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[gs.Translate.toString(e),gs.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),_s=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function vs(e){return e.matches(_s)?e:e.querySelector(_s)}var ys={display:`none`};function bs(e){let{id:t,value:n}=e;return B.createElement(`div`,{id:t,style:ys},n)}function xs(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return B.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Ss(){let[e,t]=(0,B.useState)(``);return{announce:(0,B.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Cs=(0,B.createContext)(null);function ws(e){let t=(0,B.useContext)(Cs);(0,B.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Ts(){let[e]=(0,B.useState)(()=>new Set),t=(0,B.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,B.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Es={draggable:`
|
|
11
|
+
To pick up a draggable item, press the space bar.
|
|
12
|
+
While dragging, use the arrow keys to move the item.
|
|
13
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
14
|
+
`},Ds={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Os(e){let{announcements:t=Ds,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Es}=e,{announce:a,announcement:o}=Ss(),s=cs(`DndLiveRegion`),[c,l]=(0,B.useState)(!1);if((0,B.useEffect)(()=>{l(!0)},[]),ws((0,B.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=B.createElement(B.Fragment,null,B.createElement(bs,{id:r,value:i.draggable}),B.createElement(xs,{id:s,announcement:o}));return n?(0,ia.createPortal)(u,n):u}var ks;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(ks||={});function As(){}function js(e,t){return(0,B.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Ms(){var e=[...arguments];return(0,B.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Ns=Object.freeze({x:0,y:0});function Ps(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Fs(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Is(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ls(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Rs(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function zs(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Bs=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=zs(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Ps(zs(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Fs)},Vs=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Ls(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Ls(r),o=i.reduce((e,t,r)=>e+Ps(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Fs)};function Hs(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Us=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Hs(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Is)};function Ws(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var Gs=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&Ws(r,a)){let n=Ls(a).reduce((e,t)=>e+Ps(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(Fs)};function Ks(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function qs(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ns}function Js(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Ys=Js(1);function Xs(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zs(e,t,n){let r=Xs(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Qs={ignoreTransform:!1};function $s(e,t){t===void 0&&(t=Qs);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Yo(e).getComputedStyle(e);t&&(n=Zs(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function ec(e){return $s(e,{ignoreTransform:!0})}function tc(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function nc(e,t){return t===void 0&&(t=Yo(e).getComputedStyle(e)),t.position===`fixed`}function rc(e,t){t===void 0&&(t=Yo(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function ic(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Xo(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Zo(i)||Qo(i)||n.includes(i))return n;let a=Yo(e).getComputedStyle(i);return i!==e&&rc(i,a)&&n.push(i),nc(i,a)?n:r(i.parentNode)}return e?r(e):n}function ac(e){let[t]=ic(e,1);return t??null}function oc(e){return!Ko||!e?null:qo(e)?e:Jo(e)?Xo(e)||e===$o(e).scrollingElement?window:Zo(e)?e:null:null}function sc(e){return qo(e)?e.scrollX:e.scrollLeft}function cc(e){return qo(e)?e.scrollY:e.scrollTop}function lc(e){return{x:sc(e),y:cc(e)}}var uc;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(uc||={});function dc(e){return!Ko||!e?!1:e===document.scrollingElement}function fc(e){let t={x:0,y:0},n=dc(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var pc={x:.2,y:.2};function mc(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=pc);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=fc(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=uc.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=uc.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=uc.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=uc.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function hc(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function gc(e){return e.reduce((e,t)=>us(e,lc(t)),Ns)}function _c(e){return e.reduce((e,t)=>e+sc(t),0)}function vc(e){return e.reduce((e,t)=>e+cc(t),0)}function yc(e,t){if(t===void 0&&(t=$s),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);ac(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var bc=[[`x`,[`left`,`right`],_c],[`y`,[`top`,`bottom`],vc]],xc=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=ic(t),r=gc(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of bc)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Sc=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Cc(e){let{EventTarget:t}=Yo(e);return e instanceof t?e:$o(e)}function wc(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var Tc;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Tc||={});function Ec(e){e.preventDefault()}function Dc(e){e.stopPropagation()}var Oc;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Oc||={});var kc={start:[Oc.Space,Oc.Enter],cancel:[Oc.Esc],end:[Oc.Space,Oc.Enter,Oc.Tab]},Ac=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Oc.Right:return{...n,x:n.x+25};case Oc.Left:return{...n,x:n.x-25};case Oc.Down:return{...n,y:n.y+25};case Oc.Up:return{...n,y:n.y-25}}},jc=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Sc($o(t)),this.windowListeners=new Sc(Yo(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Tc.Resize,this.handleCancel),this.windowListeners.add(Tc.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Tc.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&yc(n),t(Ns)}handleKeyDown(e){if(ps(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=kc,coordinateGetter:a=Ac,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Ns;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=ds(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=fc(n),p=hc(n),m={x:Math.min(i===Oc.Right?p.right-p.width/2:p.right,Math.max(i===Oc.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Oc.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Oc.Down?p.top:p.top+p.height/2,u.y))},h=i===Oc.Right&&!s||i===Oc.Left&&!c,g=i===Oc.Down&&!l||i===Oc.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Oc.Right&&e<=d.x||i===Oc.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Oc.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Oc.Down&&e<=d.y||i===Oc.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Oc.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,us(ds(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};jc.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=kc,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Mc(e){return!!(e&&`distance`in e)}function Nc(e){return!!(e&&`delay`in e)}var Pc=class{constructor(e,t,n){n===void 0&&(n=Cc(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=$o(i),this.documentListeners=new Sc(this.document),this.listeners=new Sc(n),this.windowListeners=new Sc(Yo(i)),this.initialCoordinates=hs(r)??Ns,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Tc.Resize,this.handleCancel),this.windowListeners.add(Tc.DragStart,Ec),this.windowListeners.add(Tc.VisibilityChange,this.handleCancel),this.windowListeners.add(Tc.ContextMenu,Ec),this.documentListeners.add(Tc.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Nc(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Mc(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Tc.Click,Dc,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Tc.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=hs(e)??Ns,s=ds(n,o);if(!t&&a){if(Mc(a)){if(a.tolerance!=null&&wc(s,a.tolerance))return this.handleCancel();if(wc(s,a.distance))return this.handleStart()}if(Nc(a)&&wc(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Oc.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Fc={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},Ic=class extends Pc{constructor(e){let{event:t}=e,n=$o(t.target);super(e,Fc,n)}};Ic.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Lc={move:{name:`mousemove`},end:{name:`mouseup`}},Rc;(function(e){e[e.RightClick=2]=`RightClick`})(Rc||={});var zc=class extends Pc{constructor(e){super(e,Lc,$o(e.event.target))}};zc.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Rc.RightClick?!1:(r?.({event:n}),!0)}}];var Bc={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Vc=class extends Pc{constructor(e){super(e,Bc)}static setup(){return window.addEventListener(Bc.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Bc.move.name,e)};function e(){}}};Vc.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Hc;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Hc||={});var Uc;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Uc||={});function Wc(e){let{acceleration:t,activator:n=Hc.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Uc.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Kc({delta:d,disabled:!a}),[m,h]=ns(),g=(0,B.useRef)({x:0,y:0}),_=(0,B.useRef)({x:0,y:0}),v=(0,B.useMemo)(()=>{switch(n){case Hc.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Hc.DraggableRect:return i}},[n,i,c]),y=(0,B.useRef)(null),b=(0,B.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,B.useMemo)(()=>s===Uc.TreeOrder?[...l].reverse():l,[s,l]);(0,B.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=mc(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Gc={x:{[uc.Backward]:!1,[uc.Forward]:!1},y:{[uc.Backward]:!1,[uc.Forward]:!1}};function Kc(e){let{delta:t,disabled:n}=e,r=os(t);return is(e=>{if(n||!r||!e)return Gc;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[uc.Backward]:e.x[uc.Backward]||i.x===-1,[uc.Forward]:e.x[uc.Forward]||i.x===1},y:{[uc.Backward]:e.y[uc.Backward]||i.y===-1,[uc.Forward]:e.y[uc.Forward]||i.y===1}}},[n,t,r])}function qc(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return is(e=>t==null?null:r??e??null,[r,t])}function Jc(e,t){return(0,B.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Yc;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Yc||={});var Xc;(function(e){e.Optimized=`optimized`})(Xc||={});var Zc=new Map;function Qc(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,B.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,B.useRef)(e),d=g(),f=rs(d),p=(0,B.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,B.useRef)(null),h=is(t=>{if(d&&!n)return Zc;if(!t||t===Zc||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new xc(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,B.useEffect)(()=>{u.current=e},[e]),(0,B.useEffect)(()=>{d||p()},[n,d]),(0,B.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,B.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Yc.Always:return!1;case Yc.BeforeDragging:return n;default:return!n}}}function $c(e,t){return is(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function el(e,t){return $c(e,t)}function tl(e){let{callback:t,disabled:n}=e,r=ts(t),i=(0,B.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,B.useEffect)(()=>()=>i?.disconnect(),[i]),i}function nl(e){let{callback:t,disabled:n}=e,r=ts(t),i=(0,B.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,B.useEffect)(()=>()=>i?.disconnect(),[i]),i}function rl(e){return new xc($s(e),e)}function il(e,t,n){t===void 0&&(t=rl);let[r,i]=(0,B.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=tl({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=nl({callback:a});return es(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function al(e){return qs(e,$c(e))}var ol=[];function sl(e){let t=(0,B.useRef)(e),n=is(n=>e?n&&n!==ol&&e&&t.current&&e.parentNode===t.current.parentNode?n:ic(e):ol,[e]);return(0,B.useEffect)(()=>{t.current=e},[e]),n}function cl(e){let[t,n]=(0,B.useState)(null),r=(0,B.useRef)(e),i=(0,B.useCallback)(e=>{let t=oc(e.target);t&&n(e=>e?(e.set(t,lc(t)),new Map(e)):null)},[]);return(0,B.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=oc(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,lc(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{oc(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,B.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>us(e,t),Ns):gc(e):Ns,[e,t])}function ll(e,t){t===void 0&&(t=[]);let n=(0,B.useRef)(null);return(0,B.useEffect)(()=>{n.current=null},t),(0,B.useEffect)(()=>{let t=e!==Ns;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?ds(e,n.current):Ns}function ul(e){(0,B.useEffect)(()=>{if(!Ko)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function dl(e,t){return(0,B.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function fl(e){return(0,B.useMemo)(()=>e?tc(e):null,[e])}var pl=[];function ml(e,t){t===void 0&&(t=$s);let[n]=e,r=fl(n?Yo(n):null),[i,a]=(0,B.useState)(pl);function o(){a(()=>e.length?e.map(e=>dc(e)?r:new xc(t(e),e)):pl)}let s=nl({callback:o});return es(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function hl(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Zo(t)?t:e}function gl(e){let{measure:t}=e,[n,r]=(0,B.useState)(null),i=nl({callback:(0,B.useCallback)(e=>{for(let{target:n}of e)if(Zo(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=as((0,B.useCallback)(e=>{let n=hl(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,B.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var _l=[{sensor:Ic,options:{}},{sensor:jc,options:{}}],vl={current:{}},yl={draggable:{measure:ec},droppable:{measure:ec,strategy:Yc.WhileDragging,frequency:Xc.Optimized},dragOverlay:{measure:$s}},bl=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},xl={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new bl,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:As},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yl,measureDroppableContainers:As,windowRect:null,measuringScheduled:!1},Sl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:As,draggableNodes:new Map,over:null,measureDroppableContainers:As},Cl=(0,B.createContext)(Sl),wl=(0,B.createContext)(xl);function Tl(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new bl}}}function El(e,t){switch(t.type){case ks.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ks.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ks.DragEnd:case ks.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ks.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new bl(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case ks.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new bl(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case ks.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new bl(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Dl(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,B.useContext)(Cl),a=os(r),o=os(n?.id);return(0,B.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!ps(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=vs(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Ol(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function kl(e){return(0,B.useMemo)(()=>({draggable:{...yl.draggable,...e?.draggable},droppable:{...yl.droppable,...e?.droppable},dragOverlay:{...yl.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Al(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,B.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;es(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=qs(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=ac(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var jl=(0,B.createContext)({...Ns,scaleX:1,scaleY:1}),Ml;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Ml||={});var Nl=(0,B.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=_l,collisionDetection:o=Us,measuring:s,modifiers:c,...l}=e,[u,d]=(0,B.useReducer)(El,void 0,Tl),[f,p]=Ts(),[m,h]=(0,B.useState)(Ml.Uninitialized),g=m===Ml.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,B.useRef)({initial:null,translated:null}),C=(0,B.useMemo)(()=>_==null?null:{id:_,data:x?.data??vl,rect:S},[_,x]),w=(0,B.useRef)(null),[T,E]=(0,B.useState)(null),[D,O]=(0,B.useState)(null),ee=rs(l,Object.values(l)),te=cs(`DndDescribedBy`,t),k=(0,B.useMemo)(()=>b.getEnabled(),[b]),A=kl(s),{droppableRects:j,measureDroppableContainers:M,measuringScheduled:ne}=Qc(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),N=qc(v,_),re=(0,B.useMemo)(()=>D?hs(D):null,[D]),ie=Ae(),ae=el(N,A.draggable.measure);Al({activeNode:_==null?null:v.get(_),config:ie.layoutShiftCompensation,initialRect:ae,measure:A.draggable.measure});let P=il(N,A.draggable.measure,ae),F=il(N?N.parentElement:null),oe=(0,B.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=b.getNodeFor(oe.current.over?.id),I=gl({measure:A.dragOverlay.measure}),L=I.nodeRef.current??N,ce=g?I.rect??P:null,le=!!(I.nodeRef.current&&I.rect),ue=al(le?null:P),R=fl(L?Yo(L):null),de=sl(g?se??N:null),fe=ml(de),pe=Ol(c,{transform:{x:y.x-ue.x,y:y.y-ue.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:P,containerNodeRect:F,draggingNodeRect:ce,over:oe.current.over,overlayNodeRect:I.rect,scrollableAncestors:de,scrollableAncestorRects:fe,windowRect:R}),me=re?us(re,y):null,he=cl(de),ge=ll(he),_e=ll(he,[P]),ve=us(pe,ge),ye=ce?Ys(ce,pe):null,be=C&&ye?o({active:C,collisionRect:ye,droppableRects:j,droppableContainers:k,pointerCoordinates:me}):null,xe=Rs(be,`id`),[Se,Ce]=(0,B.useState)(null),we=Ks(le?pe:us(pe,_e),Se?.rect??null,P),Te=(0,B.useRef)(null),Ee=(0,B.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;Te.current=new n({active:w.current,activeNode:i,event:a,options:r,context:oe,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,ia.unstable_batchedUpdates)(()=>{r?.(i),h(Ml.Initializing),d({type:ks.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(Te.current),O(a)})},onMove(e){d({type:ks.DragMove,coordinates:e})},onEnd:o(ks.DragEnd),onCancel:o(ks.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=oe.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===ks.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=ks.DragCancel)}w.current=null,(0,ia.unstable_batchedUpdates)(()=>{d({type:e}),h(Ml.Uninitialized),Ce(null),E(null),O(null),Te.current=null;let t=e===ks.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),De=Jc(a,(0,B.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Ee(n,t))},[v,Ee]));ul(a),es(()=>{P&&m===Ml.Initializing&&h(Ml.Initialized)},[P,m]),(0,B.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=oe.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ve.x,y:ve.y},over:i};(0,ia.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[ve.x,ve.y]),(0,B.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=oe.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(xe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,ia.unstable_batchedUpdates)(()=>{Ce(s),a?.(c),f({type:`onDragOver`,event:c})})},[xe]),es(()=>{oe.current={activatorEvent:D,active:C,activeNode:N,collisionRect:ye,collisions:be,droppableRects:j,draggableNodes:v,draggingNode:L,draggingNodeRect:ce,droppableContainers:b,over:Se,scrollableAncestors:de,scrollAdjustedTranslate:ve},S.current={initial:ce,translated:ye}},[C,N,be,ye,v,L,ce,j,b,Se,de,ve]),Wc({...ie,delta:y,draggingRect:ye,pointerCoordinates:me,scrollableAncestors:de,scrollableAncestorRects:fe});let Oe=(0,B.useMemo)(()=>({active:C,activeNode:N,activeNodeRect:P,activatorEvent:D,collisions:be,containerNodeRect:F,dragOverlay:I,draggableNodes:v,droppableContainers:b,droppableRects:j,over:Se,measureDroppableContainers:M,scrollableAncestors:de,scrollableAncestorRects:fe,measuringConfiguration:A,measuringScheduled:ne,windowRect:R}),[C,N,P,D,be,F,I,v,b,j,Se,M,de,fe,A,ne,R]),ke=(0,B.useMemo)(()=>({activatorEvent:D,activators:De,active:C,activeNodeRect:P,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:Se,measureDroppableContainers:M}),[D,De,C,P,d,te,v,Se,M]);return B.createElement(Cs.Provider,{value:p},B.createElement(Cl.Provider,{value:ke},B.createElement(wl.Provider,{value:Oe},B.createElement(jl.Provider,{value:we},i)),B.createElement(Dl,{disabled:n?.restoreFocus===!1})),B.createElement(Os,{...n,hiddenTextDescribedById:te}));function Ae(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Pl=(0,B.createContext)(null),Fl=`button`,Il=`Draggable`;function Ll(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=cs(Il),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,B.useContext)(Cl),{role:p=Fl,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,B.useContext)(g?jl:Pl),[v,y]=as(),[b,x]=as(),S=dl(o,t),C=rs(n);return es(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,B.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===Fl?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function Rl(){return(0,B.useContext)(wl)}var zl=`Droppable`,Bl={timeout:25};function Vl(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=cs(zl),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,B.useContext)(Cl),u=(0,B.useRef)({disabled:n}),d=(0,B.useRef)(!1),f=(0,B.useRef)(null),p=(0,B.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Bl,...i},_=rs(h??r),v=nl({callback:(0,B.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=as((0,B.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=rs(t);return(0,B.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,B.useEffect)(()=>(s({type:ks.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:ks.UnregisterDroppable,key:a,id:r})),[r]),(0,B.useEffect)(()=>{n!==u.current.disabled&&(s({type:ks.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function Hl(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ul(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Wl(e){return e!==null&&e>=0}function Gl(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Kl(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var ql=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=Hl(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Jl={scaleX:1,scaleY:1},Yl=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...Jl}:null}let s=Xl(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...Jl}:r<t&&r>=a?{x:0,y:o.height+s,...Jl}:{x:0,y:0,...Jl}};function Xl(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var Zl=`Sortable`,Ql=B.createContext({activeIndex:-1,containerId:Zl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ql,disabled:{draggable:!1,droppable:!1}});function $l(e){let{children:t,id:n,items:r,strategy:i=ql,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=Rl(),d=cs(Zl,n),f=s.rect!==null,p=(0,B.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,B.useRef)(p),v=!Gl(p,_.current),y=g!==-1&&h===-1||v,b=Kl(a);es(()=>{v&&m&&u(p)},[v,p,m,u]),(0,B.useEffect)(()=>{_.current=p},[p]);let x=(0,B.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Ul(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return B.createElement(Ql.Provider,{value:x},t)}var eu=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Hl(n,r,i).indexOf(t)},tu=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},nu={duration:200,easing:`ease`},ru=`transform`,iu=gs.Transition.toString({property:ru,duration:0,easing:`linear`}),au={roleDescription:`sortable`};function ou(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,B.useState)(null),s=(0,B.useRef)(n);return es(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=$s(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,B.useEffect)(()=>{a&&o(null)},[a]),a}function su(e){let{animateLayoutChanges:t=tu,attributes:n,disabled:r,data:i,getNewIndex:a=eu,id:o,strategy:s,resizeObserverConfig:c,transition:l=nu}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,B.useContext)(Ql),y=cu(r,p),b=u.indexOf(o),x=(0,B.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,B.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=Vl({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:M,setActivatorNodeRef:ne,transform:N}=Ll({id:o,data:x,attributes:{...au,...n},disabled:y.draggable}),re=Go(E,k),ie=!!D,ae=ie&&!m&&Wl(f)&&Wl(g),P=!_&&j,F=ae?(P&&ae?N:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,oe=Wl(f)&&Wl(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,se=D?.id,I=(0,B.useRef)({activeId:se,items:u,newIndex:oe,containerId:d}),L=u!==I.current.items,ce=t({active:D,containerId:d,isDragging:j,isSorting:ie,id:o,index:b,items:u,newIndex:I.current.newIndex,previousItems:I.current.items,previousContainerId:I.current.containerId,transition:l,wasDragging:I.current.activeId!=null}),le=ou({disabled:!ce,index:b,node:w,rect:C});return(0,B.useEffect)(()=>{ie&&I.current.newIndex!==oe&&(I.current.newIndex=oe),d!==I.current.containerId&&(I.current.containerId=d),u!==I.current.items&&(I.current.items=u)},[ie,oe,d,u]),(0,B.useEffect)(()=>{if(se===I.current.activeId)return;if(se!=null&&I.current.activeId==null){I.current.activeId=se;return}let e=setTimeout(()=>{I.current.activeId=se},50);return()=>clearTimeout(e)},[se]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:oe,items:u,isOver:T,isSorting:ie,isDragging:j,listeners:A,node:w,overIndex:g,over:M,setNodeRef:re,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:le??F,transition:ue()};function ue(){if(le||L&&I.current.newIndex===b)return iu;if(!(P&&!ps(O)||!l)&&(ie||ce))return gs.Transition.toString({...l,property:ru})}}function cu(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function lu(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var uu=[Oc.Down,Oc.Right,Oc.Up,Oc.Left],du=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(uu.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case Oc.Down:r.top<a.top&&t.push(n);break;case Oc.Up:r.top>a.top&&t.push(n);break;case Oc.Left:r.left>a.left&&t.push(n);break;case Oc.Right:r.left<a.left&&t.push(n);break}});let c=Vs({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=Rs(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=ic(c).some((e,t)=>s[t]!==e),i=fu(e,t),a=pu(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:ds(u,l)}}}};function fu(e,t){return!lu(e)||!lu(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function pu(e,t){return!lu(e)||!lu(t)||!fu(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function mu(){let e=ur(),t=mr(`/projects/:projectId/*`),n=mr(`/projects/:projectId/threads/:threadId/*`),r=mr(`/threads/:threadId/*`),i=mr(`/projects/:projectId/archived`),a=mr(`/projects/:projectId/settings`),o=e.pathname===`/`,s=n?.params.projectId===de,c=r?.params.threadId,l=c??(s?void 0:n?.params.threadId),u=t?.params.projectId;return{projectId:c===void 0?s?void 0:u:de,threadId:l,isThreadView:!!r||!!n&&!s,isArchivedView:!!i,isSettingsView:!!a,isRootView:o,isProjectlessView:o||c!==void 0}}var hu=1e4;function gu({hasResolvedData:e,isFetching:t,isLoadingError:n,serverConnectionState:r,connectionGracePeriodElapsed:i}){return!e&&t||!e&&n&&r!==`connected`&&!i?{status:`loading`}:!e&&n?{status:`unavailable`}:{status:`ready`}}function _u(e=hu){let t=Mn(),[n,r]=(0,B.useState)(!1);return(0,B.useEffect)(()=>{if(t===`connected`){r(!1);return}let n=setTimeout(()=>r(!0),e);return()=>clearTimeout(n)},[t,e]),n}function vu({hasResolvedData:e,isFetching:t,isLoadingError:n}){let r=Mn(),i=_u();return(0,B.useMemo)(()=>gu({hasResolvedData:e,isFetching:t,isLoadingError:n,serverConnectionState:r,connectionGracePeriodElapsed:i}),[e,t,n,r,i])}function yu({queryClient:e}){tt({queryClient:e,queryKeys:wu()})}function bu({queryClient:e}){Re({queryClient:e,queryKeys:wu()})}function xu({queryClient:e}){e.invalidateQueries({queryKey:E()}),e.invalidateQueries({queryKey:ct()})}function Su({queryClient:e}){xu({queryClient:e}),e.invalidateQueries({queryKey:Ae()})}function Cu({queryClient:e}){e.invalidateQueries({queryKey:We()})}function wu(){return[E(),ct(),Ae(),ht(),Te(),F(),u(),a(),A(),c(),I(),ut(),Ue(),t(),ne(),Ne(),be(),Fe(),Ge(),Qe(),me(),qe(),oe()]}function Tu(e){let t=wr(Pr),n=wr(Er),r=(0,B.useMemo)(()=>e.length===0?[]:[...new Set(e)].sort(),[e]),i=t!=null&&n!=null&&r.length>0;return ue({queryKey:S(t??``,r),queryFn:i?()=>bt(n,r):o,staleTime:1e4}).data??{}}function Eu(e,t){return t==null?!1:e[t]===!1}var Du=`/auth/callback`,Ou=`/settings`,ku=`/projects/:projectId`,Au=`/threads/:threadId`,ju=`/projects/:projectId/settings`,Mu=`/projects/:projectId/archived`,Nu=`/projects/:projectId/threads/:threadId`;function Pu(e){return e===de}function Fu(){return`/`}function Iu(e){return`/projects/${e}`}function Lu(e){return`/projects/${e}/settings`}function Ru(e){return`/projects/${e}/archived`}function zu(e){return Pu(e.projectId)?`/threads/${e.threadId}`:`/projects/${e.projectId}/threads/${e.threadId}`}var Bu=[`/`,Du,Ou,ku,ju,Mu,Au,Nu],Vu=`bb.root-compose.project-id`,Hu=`bb.promptbox.new-thread-mode`;function Uu(e,t){return e&&e.length>0?e:t}function Wu(e){return e===`thread`||e===`manager`}var Gu=Qr({parse:Uu,serialize:e=>e}),Ku=Xr(Wu),qu=Lr(Vu,de,Gu,{getOnInit:!0}),Ju=Lr(Hu,`thread`,Ku,{getOnInit:!0}),Yu=Fr(null),Xu=Fr(e=>e(Ju),(e,t,n)=>{t(Ju,n),n===`manager`&&t(Yu,null)});function Zu(){return Dr(qu)}function Qu(){return Cr(qu)}function $u(){return Dr(Xu)}function ed(){return Cr(Xu)}function td(){return Dr(Yu)}function nd({message:e,icon:t,className:n,iconClassName:i,messageClassName:a}){return(0,V.jsxs)(`div`,{className:R(`flex items-center gap-2`,n),children:[t?(0,V.jsx)(r,{name:t,"aria-hidden":`true`,className:R(`size-4 shrink-0 text-subtle-foreground`,i)}):null,(0,V.jsx)(`p`,{className:R(`text-xs leading-5 text-muted-foreground`,a),children:e})]})}function rd({projectId:e,environmentId:t}){let n=yr(),r=Qu();return(0,B.useCallback)(()=>{r(e),n(Fu(),{state:{reuseEnvironmentId:t}})},[t,n,e,r])}function id({environmentId:e,queryClient:t}){let n=new Set;for(let{data:r}of ci(t,{queryKey:F()}))for(let t of ri(r))t.environmentId===e&&t.archivedAt===null&&n.add(t.id);return Array.from(n)}function ad({environmentId:e,queryClient:t}){si(t,{queryKey:F(),mapper:t=>t.filter(t=>t.environmentId!==e||t.archivedAt!==null)})}function od({queryClient:e,threadIds:t}){let n=Date.now();for(let r of t)e.setQueryData(le(r),e=>e&&{...e,archivedAt:n})}function sd(){let e=ot();return v({meta:{errorMessage:`Failed to run environment action.`,showErrorToast:!1},mutationFn:({id:e,...t})=>g(e,t),onSuccess:(t,n)=>{bi({environmentId:n.id,queryClient:e})}})}function cd(){let e=ot();return v({meta:{errorMessage:`Failed to archive worktree threads.`},mutationFn:({id:e})=>b(e),onMutate:async({id:t})=>{await e.cancelQueries({queryKey:F()});let n=id({environmentId:t,queryClient:e});await Promise.all(n.map(t=>e.cancelQueries({queryKey:le(t)})));let r=ai(e,{queryKey:F()}),i=n.map(t=>({id:t,thread:e.getQueryData(le(t))}));return od({queryClient:e,threadIds:n}),ad({environmentId:t,queryClient:e}),{archivedThreadIds:n,previousThreadLists:r,previousThreads:i}},onError:(t,n,r)=>{if(r){ii(e,r.previousThreadLists);for(let t of r.previousThreads)e.setQueryData(le(t.id),t.thread)}},onSettled:(t,n,r,i)=>{bi({environmentId:r.id,queryClient:e}),e.invalidateQueries({queryKey:F()});for(let n of t?.archivedThreadIds??i?.archivedThreadIds??[])e.invalidateQueries({queryKey:le(n)})}})}function ld(){let e=ot();return v({meta:{errorMessage:`Failed to update environment.`,showErrorToast:!1},mutationFn:({id:e,...t})=>Me(e,t),onSuccess:t=>{e.setQueryData(_(t.id),t),Ci({environmentId:t.id,queryClient:e})}})}var ud=`ContextMenu`,[dd,fd]=Zt(ud,[It]),pd=It(),[md,hd]=dd(ud),gd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=B.useState(!1),c=pd(t),l=Hn(r),u=B.useCallback(e=>{s(e),l(e)},[l]);return(0,V.jsx)(md,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,V.jsx)($t,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};gd.displayName=ud;var _d=`ContextMenuTrigger`,vd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=hd(_d,n),o=pd(n),s=B.useRef({x:0,y:0}),c=B.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=B.useRef(0),u=B.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return B.useEffect(()=>u,[u]),B.useEffect(()=>void(r&&u()),[r,u]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Vt,{...o,virtualRef:c}),(0,V.jsx)(Kn.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:Tt(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:Tt(e.onPointerDown,qd(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:Tt(e.onPointerMove,qd(u)),onPointerCancel:r?e.onPointerCancel:Tt(e.onPointerCancel,qd(u)),onPointerUp:r?e.onPointerUp:Tt(e.onPointerUp,qd(u))})]})});vd.displayName=_d;var yd=`ContextMenuPortal`,bd=e=>{let{__scopeContextMenu:t,...n}=e,r=pd(t);return(0,V.jsx)(St,{...r,...n})};bd.displayName=yd;var xd=`ContextMenuContent`,Sd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=hd(xd,n),a=pd(n),o=B.useRef(!1);return(0,V.jsx)(Ot,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Sd.displayName=xd;var Cd=`ContextMenuGroup`,wd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Pt,{...i,...r,ref:t})});wd.displayName=Cd;var Td=`ContextMenuLabel`,Ed=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(qn,{...i,...r,ref:t})});Ed.displayName=Td;var Dd=`ContextMenuItem`,Od=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(zt,{...i,...r,ref:t})});Od.displayName=Dd;var kd=`ContextMenuCheckboxItem`,Ad=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Kt,{...i,...r,ref:t})});Ad.displayName=kd;var jd=`ContextMenuRadioGroup`,Md=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(en,{...i,...r,ref:t})});Md.displayName=jd;var Nd=`ContextMenuRadioItem`,Pd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Mt,{...i,...r,ref:t})});Pd.displayName=Nd;var Fd=`ContextMenuItemIndicator`,Id=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Jt,{...i,...r,ref:t})});Id.displayName=Fd;var Ld=`ContextMenuSeparator`,Rd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(nn,{...i,...r,ref:t})});Rd.displayName=Ld;var zd=`ContextMenuArrow`,Bd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Ut,{...i,...r,ref:t})});Bd.displayName=zd;var Vd=`ContextMenuSub`,Hd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=pd(t),[s,c]=pn({prop:i,defaultProp:a??!1,onChange:r,caller:Vd});return(0,V.jsx)(At,{...o,open:s,onOpenChange:c,children:n})};Hd.displayName=Vd;var Ud=`ContextMenuSubTrigger`,Wd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Fn,{...i,...r,ref:t})});Wd.displayName=Ud;var Gd=`ContextMenuSubContent`,Kd=B.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=pd(n);return(0,V.jsx)(Lt,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Kd.displayName=Gd;function qd(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Jd=gd,Yd=vd,Xd=bd,Zd=Sd,Qd=Ed,$d=Od,ef=Ad,tf=Pd,nf=Id,rf=Rd,af=Wd,of=Kd,sf=Jd,cf=Yd,lf=B.forwardRef(({className:e,inset:t,children:n,...i},a)=>(0,V.jsxs)(af,{ref:a,className:R(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...i,children:[n,(0,V.jsx)(r,{name:`ChevronRight`,className:`ml-auto`})]}));lf.displayName=af.displayName;var uf=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(of,{ref:n,className:R(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));uf.displayName=of.displayName;var df=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(Xd,{children:(0,V.jsx)(Zd,{ref:n,className:R(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t})}));df.displayName=Zd.displayName;var ff=B.forwardRef(({className:e,inset:t,...n},r)=>(0,V.jsx)($d,{ref:r,className:R(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));ff.displayName=$d.displayName;var pf=B.forwardRef(({className:e,children:t,checked:n,...i},a)=>(0,V.jsxs)(ef,{ref:a,className:R(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...i,children:[(0,V.jsx)(`span`,{className:R(`absolute right-2 flex items-center justify-center`,Un),children:(0,V.jsx)(nf,{children:(0,V.jsx)(r,{name:`Check`,className:Un})})}),t]}));pf.displayName=ef.displayName;var mf=B.forwardRef(({className:e,children:t,...n},i)=>(0,V.jsxs)(tf,{ref:i,className:R(`relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,V.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,V.jsx)(nf,{children:(0,V.jsx)(r,{name:`Circle`,className:`h-2 w-2 fill-current`})})}),t]}));mf.displayName=tf.displayName;var hf=B.forwardRef(({className:e,inset:t,...n},r)=>(0,V.jsx)(Qd,{ref:r,className:R(`px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...n}));hf.displayName=Qd.displayName;var gf=B.forwardRef(({className:e,...t},n)=>(0,V.jsx)(rf,{ref:n,className:R(`-mx-1 my-1 h-px bg-muted`,e),...t}));gf.displayName=rf.displayName;function _f({className:e,...t}){return(0,V.jsx)(`span`,{className:R(`ml-auto text-xs tracking-widest opacity-60`,e),...t})}_f.displayName=`ContextMenuShortcut`;function vf({isPending:e,submit:t}){let{localHostId:n,pickFolder:r,platform:a}=Sr(),o=Di(),s=o.onClose,c=(0,B.useCallback)((r,i)=>{e||!n||t({path:r,hostId:n,target:i,closeDialog:s})},[s,e,n,t]),l=(0,B.useCallback)(t=>{if(!(e||!n)){if(r){(async()=>{let e=await r();e&&c(i(e),t)})();return}o.onOpen(t)}},[e,n,r,o,c]),u=(0,B.useCallback)((e,t)=>{c(t,e)},[c]);return{isAvailable:n!=null,localHostId:n,openPicker:l,platform:a,projectPathDialog:o,submitProjectPath:u}}function yf({target:e,pending:t=!1,platform:n,onOpenChange:r,onSubmit:i}){return(0,V.jsx)(Nr,{open:e!==null,onOpenChange:r,children:(0,V.jsx)(jr,{children:e?(0,V.jsx)(Cf,{target:e,pending:t,platform:n,onSubmit:i},e.kind===`create`?`create`:e.projectId):null})})}function bf(e){switch(e){case`create`:return`Add project`;case`update`:return`Update project path`;case`add-source`:return`Add project source`}}function xf(e){switch(e){case`create`:return`Add project`;case`update`:return`Save path`;case`add-source`:return`Add source`}}function Sf(e){let t=`/path/to/project`;return e===`wsl`?{description:`Enter an absolute WSL path to the project folder, such as /home/me/repo or /mnt/c/...`,placeholder:t}:{description:`Enter an absolute path to the project folder.`,placeholder:t}}function Cf({target:e,pending:t,platform:n,onSubmit:r}){let a=(0,B.useId)(),[o,s]=(0,B.useState)(e.kind===`update`?e.currentPath:``),[c,l]=(0,B.useState)(null),u=P(o),d=Sf(n),f=e.kind===`update`&&e.currentPath||d.placeholder;return(0,B.useEffect)(()=>{l(null)},[o]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsx)(Mr,{children:bf(e.kind)}),(0,V.jsx)(Tr,{children:d.description})]}),(0,V.jsxs)(`form`,{className:`space-y-4`,onSubmit:n=>{if(n.preventDefault(),t)return;let a=i(o),s=yt(a);if(s){l(s);return}if(e.kind===`create`&&!P(a)){l(`Could not derive a project name from that path.`);return}r(e,a)},children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(Ar,{id:a,"aria-label":`Project path`,value:o,autoFocus:!0,disabled:t,placeholder:f,onChange:e=>{s(e.target.value)}}),e.kind===`create`&&u?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Project name:`,` `,(0,V.jsx)(`span`,{className:`font-medium text-foreground`,children:u})]}):null,c?(0,V.jsx)(`p`,{className:`text-sm text-destructive`,children:c}):null]}),(0,V.jsx)(xr,{children:(0,V.jsx)(M,{type:`submit`,disabled:t,children:xf(e.kind)})})]})]})}function wf({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,V.jsx)(Nr,{open:e!==null,onOpenChange:n,children:(0,V.jsx)(jr,{children:e?(0,V.jsx)(Tf,{target:e,pending:t,onDelete:r}):null})})}function Tf({target:e,pending:t,onDelete:n}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsx)(Mr,{children:`Remove project?`}),(0,V.jsx)(Tr,{children:`Remove "${e.name}" and all of its threads? This cannot be undone.`})]}),(0,V.jsx)(xr,{children:(0,V.jsx)(M,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>n(e.id),children:`Remove project`})})]})}function Ef({target:e,pending:t=!1,onOpenChange:n,onRename:r}){return(0,V.jsx)(Nr,{open:e!==null,onOpenChange:n,children:(0,V.jsx)(jr,{children:e?(0,V.jsx)(Df,{target:e,pending:t,onRename:r},e.id):null})})}function Df({target:e,pending:t,onRename:n}){let r=(0,B.useId)(),[i,a]=(0,B.useState)(e.currentName),[o,s]=(0,B.useState)(null);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsx)(Mr,{children:`Rename project`}),(0,V.jsx)(Tr,{children:`Choose a new name for this project.`})]}),(0,V.jsxs)(`form`,{className:`space-y-4`,onSubmit:r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`Project name cannot be empty.`);return}n(e.id,a)},children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(Ar,{id:r,"aria-label":`Project name`,value:i,autoFocus:!0,autoCapitalize:`words`,autoCorrect:`off`,spellCheck:!1,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,V.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,V.jsx)(xr,{children:(0,V.jsx)(M,{type:`submit`,disabled:t,children:`Rename project`})})]})]})}var Of=`bb.sidebar.collapsedProjects`,kf=`bb.sidebar.collapsedManagers`,Af=`bb.sidebar.collapsedEnvironments`,jf=`bb.sidebar.sectionOrder`,Mf=[`projects`,`threads`],Nf=Lr(Of,[],Br(),{getOnInit:!0}),Pf=Lr(kf,[],Br(),{getOnInit:!0}),Ff=Lr(Af,[],Br(),{getOnInit:!0}),If=Lr(jf,[...Mf],Br(),{getOnInit:!0}),Lf=(0,B.createContext)(null);function Rf(){let e=(0,B.useContext)(Lf);if(!e)throw Error(`useProjectActions must be used within a <ProjectActionsProvider>`);return e}function zf({children:e}){let t=yr(),n=Cr(Nf),r=Ri(),i=ki(),a=Li(),{mutate:o}=r,{mutate:s}=i,{mutate:c}=a,l=Di(),u=Di(),{onClose:d,onOpen:f}=l,{onClose:p,onOpen:m}=u,h=(0,B.useCallback)(({path:e,hostId:t,target:n,closeDialog:r})=>{n.kind===`add-source`&&c({projectId:n.projectId,path:e,hostId:t},{onSuccess:r})},[c]),g=vf({isPending:a.isPending,submit:h}),_=(0,B.useCallback)(e=>{f({id:e.id,currentName:e.name})},[f]),v=(0,B.useCallback)((e,t)=>{o({id:e,name:t},{onSuccess:()=>d()})},[d,o]),y=(0,B.useCallback)(e=>{m({id:e.id,name:e.name})},[m]),b=(0,B.useCallback)(e=>{s(e,{onSuccess:()=>{p(),n(t=>t.filter(t=>t!==e)),t(`/`,{replace:!0})}})},[p,s,t,n]),x=(0,B.useCallback)(e=>{g.openPicker({kind:`add-source`,projectId:e.id,projectName:e.name})},[g]),S=(0,B.useMemo)(()=>({requestRename:_,requestDelete:y,requestAddLocalPath:x}),[_,y,x]);return(0,V.jsxs)(Lf.Provider,{value:S,children:[e,(0,V.jsx)(Ef,{target:l.target,pending:r.isPending,onOpenChange:l.onOpenChange,onRename:v}),(0,V.jsx)(wf,{target:u.target,pending:i.isPending,onOpenChange:u.onOpenChange,onDelete:b}),(0,V.jsx)(yf,{target:g.projectPathDialog.target,pending:a.isPending,platform:g.platform,onOpenChange:g.projectPathDialog.onOpenChange,onSubmit:g.submitProjectPath})]})}function Bf({children:e,className:t,onSelect:n,surface:r}){return r===`context`?(0,V.jsx)(ff,{className:t,onSelect:n,children:e}):(0,V.jsx)(gn,{className:t,onSelect:n,children:e})}function Vf({surface:e}){return e===`context`?(0,V.jsx)(gf,{}):(0,V.jsx)(Dn,{})}function Hf({project:e,surface:t}){let n=yr(),{localHostId:r}=Sr(),{requestRename:i,requestDelete:a,requestAddLocalPath:o}=Rf(),s=r!=null&&!y(e.sources,r);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Bf,{surface:t,onSelect:()=>{n(Lu(e.id))},children:`Project settings`}),(0,V.jsx)(Bf,{surface:t,onSelect:()=>{n(Ru(e.id))},children:`Archived threads`}),(0,V.jsx)(Vf,{surface:t}),(0,V.jsx)(Bf,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),i(e)},children:`Rename`}),s?(0,V.jsx)(Bf,{surface:t,onSelect:n=>{t===`dropdown`&&n.preventDefault(),o(e)},children:`Add local path`}):null,(0,V.jsx)(Bf,{surface:t,className:`text-destructive focus:text-destructive`,onSelect:n=>{t===`dropdown`&&n.preventDefault(),a(e)},children:`Remove`})]})}function Uf({project:e,triggerClassName:t,align:n=`end`,onOpenChange:i}){return(0,V.jsxs)(fn,{onOpenChange:i,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:R(`rounded-md p-0 text-muted-foreground`,t),"aria-label":`${e.name} actions`,title:`${e.name} actions`,onClick:e=>{e.stopPropagation()},children:(0,V.jsx)(r,{name:`MoreHorizontal`,className:Ht})})}),(0,V.jsx)(zn,{align:n,className:`w-44`,children:(0,V.jsx)(Hf,{project:e,surface:`dropdown`})})]})}function Wf({children:e,project:t,onOpenChange:n}){return(0,V.jsxs)(sf,{onOpenChange:n,children:[(0,V.jsx)(cf,{asChild:!0,children:e}),(0,V.jsx)(df,{"aria-label":`${t.name} actions`,className:`w-44`,children:(0,V.jsx)(Hf,{project:t,surface:`context`})})]})}var Gf=`bb-sidebar-hover-actions-row`,Kf=`bb-sidebar-hover-actions`,qf=`bb-sidebar-hover-actions-fade`;function Jf(e){switch(e){case`active`:case`created`:case`host-reconnecting`:case`provisioning`:return!0;case`error`:case`idle`:case`waiting-for-host`:return!1;default:return pt(e)}}function H(e,t){throw Error(t??`Unexpected value: ${String(e)}`)}function Yf(e){let t=e.replaceAll(`\\`,`/`).split(`/`),n=t[t.length-1];return n&&n.length>0?n:e}function Xf({mode:e,path:t}){switch(e){case`compact`:return Yf(t);case`full`:return t}}function Zf(e){return(e??``).toLowerCase().replaceAll(/[^a-z0-9]/gu,``)}function Qf(e){let t=e.trimEnd();return t.startsWith(`diff --git `)||t.startsWith(`index `)||t.startsWith(`new file mode `)||t.startsWith(`deleted file mode `)||t.startsWith(`similarity index `)||t.startsWith(`rename from `)||t.startsWith(`rename to `)||t.startsWith(`--- `)||t.startsWith(`+++ `)||t.startsWith(`@@`)||t===`\`}function $f(e){let t=e.diff;if(!t)return!1;for(let e of t.split(`
|
|
15
|
+
`))if(!(e.startsWith(`+++ `)||e.startsWith(`--- `))&&(e.startsWith(`+`)||e.startsWith(`-`)))return!0;return!1}function ep(e){if(e.movePath)return $f(e)?`edited`:`renamed`;let t=Zf(e.kind);return t.includes(`add`)||t.includes(`create`)?`created`:t.includes(`delete`)||t.includes(`remove`)?`deleted`:`edited`}function tp(e){switch(e){case`created`:return`Created`;case`deleted`:return`Deleted`;case`renamed`:return`Renamed`;case`edited`:return`Edited`}}function np(e){switch(e){case`created`:return`Creating`;case`deleted`:return`Deleting`;case`renamed`:return`Renaming`;case`edited`:return`Editing`}}function rp(e){switch(e){case`created`:return`create`;case`deleted`:return`delete`;case`renamed`:return`rename`;case`edited`:return`edit`}}function ip({change:e,mode:t}){let n=Xf({path:e.path,mode:t});return e.movePath?ep(e)===`edited`?Xf({path:e.movePath,mode:t}):`${n} -> ${Xf({path:e.movePath,mode:t})}`:n}function ap(e,t,n){return`${e} ${e===1?t:n??`${t}s`}`}function op(e){if(e===void 0)return;if(!Number.isFinite(e)||e<0)return`0s`;if(e<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/1e3);return t<60?`${t}s`:sp(t)}function sp(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,i=[];return t>0&&i.push(`${t}h`),n>0&&i.push(`${n}m`),r>0&&i.push(`${r}s`),i.join(` `)}var cp=new Intl.NumberFormat(`en-US`);function lp(e){return cp.format(e)}function up(e){let{added:t,removed:n,hideZero:r=!1}=e,i=`+${lp(t)}`,a=`-${lp(n)}`;if(!r)return`${i} ${a}`;let o=[];return t>0&&o.push(i),n>0&&o.push(a),o.join(` `)}function dp(e){return e.activityIntents.find(e=>e.type!==`unknown`)??null}function fp(e){return dp(e)!==null}function pp(e){return e.path??e.name}function mp(e,t){return Xf({path:pp(e),mode:t})}function hp({intent:e,pathMode:t,pending:n}){return gp({intent:e,pathMode:t,pending:n})}function gp({intent:e,pathMode:t,pending:n}){switch(e.type){case`read`:return{prefix:n?`Reading`:`Read`,content:mp(e,t)};case`list_files`:return{prefix:n?`Listing`:`Listed`,content:e.path?`files in ${e.path}`:`files`};case`search`:{let t=n?`Searching`:`Searched`;return e.query&&e.path?{prefix:t,content:`for ${e.query} in ${e.path}`}:e.query?{prefix:t,content:`for ${e.query}`}:e.path?{prefix:t,content:`in ${e.path}`}:{prefix:t,content:`files`}}case`unknown`:return{prefix:null,content:e.command};default:return H(e)}}function _p(e){switch(e.type){case`read`:return`read:${e.path??e.name}`;case`list_files`:return`list:${e.path??``}`;case`search`:return`search:${e.query??``}|${e.path??``}`;case`unknown`:return null;default:return H(e)}}function vp(e){return e.length===0?e:`${e.charAt(0).toLowerCase()}${e.slice(1)}`}function yp(e){switch(e.type){case`read`:return e.path??e.name;case`list_files`:case`search`:case`unknown`:return null;default:return H(e)}}function bp(e,t,n,r){for(let i of e.activityIntents)switch(i.type){case`read`:{let e=yp(i);e&&(n.add(e),r(`files`));break}case`list_files`:t.lists+=1,r(`lists`);break;case`search`:t.searches+=1,r(`searches`);break;case`unknown`:break;default:H(i)}}function xp(e){return e.change.movePath??e.change.path}function Sp(e){let t=[],n=new Set,r=e=>{n.has(e)||(n.add(e),t.push(e))},i={commands:0,createdFiles:0,deletedFiles:0,delegations:0,editedFiles:0,fileChanges:0,files:0,lists:0,renamedFiles:0,searches:0,tools:0,webFetches:0,webSearches:0,explorationKindOrder:t},a=new Set,o=new Set,s=new Set,c=new Set,l=new Set;for(let t of e)switch(t.workKind){case`command`:fp(t)?bp(t,i,a,r):i.commands+=1;break;case`tool`:fp(t)?bp(t,i,a,r):i.tools+=1;break;case`file-change`:switch(ep(t.change)){case`created`:o.add(xp(t));break;case`deleted`:s.add(xp(t));break;case`edited`:c.add(xp(t));break;case`renamed`:l.add(xp(t));break}break;case`web-fetch`:i.webFetches+=1;break;case`web-search`:i.webSearches+=Math.max(1,t.queries.length);break;case`delegation`:i.delegations+=1;break;case`question`:case`approval`:break;default:H(t)}return i.files=a.size,i.createdFiles=o.size,i.deletedFiles=s.size,i.editedFiles=c.size,i.renamedFiles=l.size,i.fileChanges=i.createdFiles+i.deletedFiles+i.editedFiles+i.renamedFiles,i}function Cp(e){let t=e.explorationKindOrder.map(t=>{switch(t){case`files`:return e.files>0?ap(e.files,`file`):null;case`searches`:return e.searches>0?ap(e.searches,`search`,`searches`):null;case`lists`:return e.lists>0?ap(e.lists,`list`):null;default:return H(t)}}).filter(e=>e!==null);return t.length===0?null:t.join(`, `)}function wp(e){let t=null,n=0,r=0,i=0;for(let a of e){let e;switch(a.workKind){case`command`:if(a.approvalStatus===null)return null;e=a.approvalStatus,n+=1;break;case`file-change`:if(a.approvalStatus===null)return null;e=a.approvalStatus,r+=1;break;case`tool`:if(a.approvalStatus===null)return null;e=a.approvalStatus,i+=1;break;case`approval`:case`question`:case`delegation`:case`web-fetch`:case`web-search`:return null;default:H(a)}if(t===null)t=e;else if(t!==e)return null}if(t===null)return null;let a=[n>0?ap(n,`command`):null,r>0?ap(r,`file change`):null,i>0?ap(i,`tool`):null].filter(e=>e!==null).join(`, `);return t===`denied`?`Denied ${a}`:`Waiting for approval on ${a}`}function Tp(e){switch(e.workKind){case`command`:return fp(e)?`exploration`:`commands`;case`tool`:return fp(e)?`exploration`:`tools`;case`file-change`:return`fileChanges`;case`web-fetch`:case`web-search`:return`webResearch`;case`delegation`:return`delegations`;case`approval`:case`question`:return null;default:return H(e)}}function Ep(e){let t=[];for(let n of e){let e=Tp(n);e&&!t.includes(e)&&t.push(e)}return t}var Dp={created:`Creating`,deleted:`Deleting`,edited:`Editing`,renamed:`Renaming`},Op={created:`Created`,deleted:`Deleted`,edited:`Edited`,renamed:`Renamed`};function kp(e,t){let n=[[`created`,e.createdFiles],[`deleted`,e.deletedFiles],[`edited`,e.editedFiles],[`renamed`,e.renamedFiles]].filter(([,e])=>e>0).map(([e,t])=>({action:e,count:t}));if(n.length===0)return null;if(n.length===1){let{action:e,count:r}=n[0];return`${t?Dp[e]:Op[e]} ${ap(r,`file`)}`}let r=n.reduce((e,t)=>e+t.count,0);return`${t?`Editing`:`Edited`} ${ap(r,`file`)}`}function Ap(e,t,n){switch(e){case`exploration`:return n?`Explored ${n}`:null;case`commands`:return t.commands>0?`Ran ${ap(t.commands,`command`)}`:null;case`fileChanges`:return kp(t,!1);case`webResearch`:return Np(t,!1);case`delegations`:return t.delegations>0?`Ran ${ap(t.delegations,`subagent`)}`:null;case`tools`:return t.tools>0?`Ran ${ap(t.tools,`tool`)}`:null;default:return H(e)}}function jp(e,t,n){switch(e){case`exploration`:return n?`Exploring ${n}`:null;case`commands`:return t.commands>0?`Running ${ap(t.commands,`command`)}`:null;case`fileChanges`:return kp(t,!0);case`webResearch`:return Np(t,!0);case`delegations`:return t.delegations>0?`Running ${ap(t.delegations,`subagent`)}`:null;case`tools`:return t.tools>0?`Running ${ap(t.tools,`tool`)}`:null;default:return H(e)}}function Mp(e){return e.map((e,t)=>t===0?e:vp(e)).join(`, `)}function Np(e,t){let n=[];return e.webSearches>0&&n.push(ap(e.webSearches,`search query`,`search queries`)),e.webFetches>0&&n.push(ap(e.webFetches,`web page`)),n.length===0?null:`${t?`Researching`:`Researched`} ${n.join(`, `)}`}function Pp(e,t={active:!1}){let n=wp(e.children);if(n!==null)return Fp(n);let r=Sp(e.children),i=t.active,a=Cp(r),o=Ep(e.children).map(e=>i?jp(e,r,a):Ap(e,r,a)).filter(e=>e!==null);return o.length===0?{verb:i?`Working`:`Worked`,rest:``}:Fp(Mp(o))}function Fp(e){let t=e.indexOf(` `);return t===-1?{verb:e,rest:``}:{verb:e.slice(0,t),rest:e.slice(t+1)}}function Ip(e,t){return e===`error`||t===`error`?`error`:e===`pending`||t===`pending`?`pending`:e===`interrupted`||t===`interrupted`?`interrupted`:`completed`}function Lp(e){let t=e[0];if(!t)throw Error(`Cannot summarize an empty timeline activity run`);let n=t.sourceSeqStart,r=t.sourceSeqEnd,i=t.startedAt,a=t.createdAt,o=t.turnId,s=t.status;for(let t of e)n=Math.min(n,t.sourceSeqStart),r=Math.max(r,t.sourceSeqEnd),i=Math.min(i,t.startedAt),a=Math.max(a,t.createdAt),s=Ip(s,t.status),o!==t.turnId&&(o=null);return{id:[t.threadId,o??`thread`,`work-summary`,t.id].join(`:`),threadId:t.threadId,turnId:o,sourceSeqStart:n,sourceSeqEnd:r,startedAt:i,createdAt:a,status:s}}function Rp(e){return e.kind===`work`&&e.workKind!==`approval`&&e.workKind!==`question`}function zp(e){return!(e.kind!==`conversation`||e.role===`user`&&e.turnRequest.status===`pending`)}function Bp(e){switch(e.workKind){case`command`:case`tool`:return fp(e)?`exploration`:e.workKind===`command`?`commands`:`tools`;case`file-change`:return`fileChanges`;case`delegation`:return`delegations`;case`web-search`:case`web-fetch`:return`webResearch`;case`approval`:case`question`:return`tools`;default:return H(e)}}function Vp(e){let t=null,n=[];for(let r of e){if(r.workKind!==`command`&&r.workKind!==`tool`||r.activityIntents.length===0){t=null,n.push(r);continue}let e=fp(r),i=[];for(let e of r.activityIntents){if(e.type===`unknown`){i.push(e);continue}let n=_p(e);n!==null&&n===t||(i.push(e),t=n)}if(i.length===r.activityIntents.length){n.push(r);continue}e&&!i.some(e=>e.type!==`unknown`)||n.push({...r,activityIntents:i})}return n}function Hp(e){let t=Vp(e);return{...Lp(t),kind:`step-summary`,children:t}}function Up(e){let t=Vp(e);return{...Lp(t),kind:`bundle-summary`,children:t}}function Wp(e){return e.length===0?[]:e.length===1?[{...e[0],inClosedStep:!0}]:[Hp(e)]}function Gp(e){if(e.length===0)return[];let t=[];for(let n of e){let e=Bp(n),r=t[t.length-1];r&&r.concept===e?r.rows.push(n):t.push({concept:e,rows:[n]})}let n=[];for(let e of t)e.rows.length===1?n.push(e.rows[0]):n.push(Up(e.rows));return n}function Kp(){return new WeakMap}function qp(e,t){if(e.workKind!==`delegation`)return e;let n=e.status!==`pending`;return{...e,childRows:Yp(e.childRows,{cache:t,closedScope:n})}}function Jp(e,t){switch(e.kind){case`conversation`:case`system`:return e;case`work`:return qp(e,t);case`turn`:return{...e,children:e.children?Yp(e.children,{cache:t,closedScope:!0}):null};default:return H(e)}}function Yp(e,t={}){let n=t.cache;if(n){let t=n.get(e);if(t)return t}let r=n??Kp(),i=e.map(e=>Jp(e,r)),a=[],o=[];for(let e of i){if(Rp(e)){o.push(e);continue}if(zp(e)){a.push(...Wp(o)),o=[],a.push(e);continue}a.push(...Gp(o)),o=[],a.push(e)}return t.closedScope?a.push(...Wp(o)):a.push(...Gp(o)),n&&n.set(e,a),a}var Xp=new Set([`sh`,`bash`,`zsh`]);function Zp(e){if(e.length<2)return e;let t=e[0];if(t!==`'`&&t!==`"`||e[e.length-1]!==t)return e;let n=e.slice(1,-1);if(t===`'`)return n;let r=``;for(let e=0;e<n.length;e+=1){let t=n[e];if(t===`\\`&&e+1<n.length){let t=n[e+1];if(t===`$`||t==="`"||t===`"`||t===`\\`||t===`
|
|
16
|
+
`){r+=t,e+=1;continue}}r+=t}return r}function Qp(e){let t=e.split(`/`).pop()??e;return Xp.has(t)}function $p(e){let t=e.trim();if(t.length===0)return;let n=/^(\S+)\s+(-lc|-c)\s+([\s\S]+)$/.exec(t);if(!n)return t;let r=n[1],i=n[3];return!r||!i||!Qp(r)?t:Zp(i.trim())}function em(e,t){if(!t)return e;let n=Object.entries(t).filter(([,e])=>e!==void 0);return n.length===0?e:`${e} { ${n.map(([e,t])=>{let n=typeof t==`string`?t.trim():JSON.stringify(t);return`${e}: ${n.length>40?`${n.slice(0,37)}...`:n}`}).join(`, `)} }`}function tm(e){return e.replace(/[\r\n]+/gu,` `)}function U(e,t={}){return{text:tm(e),em:t.em??!1,shimmer:t.shimmer??!1,truncate:t.truncate??!1,...t.plainText===void 0?{}:{plainText:tm(t.plainText)},...t.link===void 0?{}:{link:t.link}}}function nm(e){return e.filter(e=>e!==null)}function rm(e){return e!==null&&e>1e3?e:null}function im(e,t,n={}){return t!==null&&rm(t-e)===null?null:{kind:`duration`,startedAt:e,completedAt:t,em:n.em??!1}}function am(e,t){return t===null?null:{kind:`duration`,startedAt:e,completedAt:t,em:!0}}function om(e,t,n={}){return{kind:`status`,status:e,durationMs:rm(t),emphasis:n.emphasis??!1}}function sm(e){let t=0,n=0;for(let r of e.children)r.status===`error`&&(t+=1),r.status===`interrupted`&&(n+=1);return t===0&&n===0?null:{kind:`summary-status`,errorCount:t,interruptedCount:n}}function cm(e){let{added:t,removed:n}=e.diffStats;return t===0&&n===0?null:{kind:`diff-stats`,added:t,removed:n}}function lm(e){switch(e.kind){case`duration`:return e.completedAt===null?``:`(${op(e.completedAt-e.startedAt)})`;case`status`:return e.durationMs===null?`(${e.status})`:`(${op(e.durationMs)}, ${e.status})`;case`summary-status`:{let t=[];return e.errorCount>0&&t.push(`${e.errorCount} error${e.errorCount>1?`s`:``}`),e.interruptedCount>0&&t.push(`${e.interruptedCount} interrupted`),t.length===0?``:`(${t.join(`, `)})`}case`diff-stats`:return up({added:e.added,removed:e.removed,hideZero:!0});default:return H(e)}}function um(e,t){let n=e.map(e=>e.plainText??e.text).filter(e=>e.length>0).join(` `),r=t.map(lm).filter(e=>e.length>0).join(` `);return r.length===0?n:n.length===0?r:`${n} ${r}`}function dm({segments:e,decorations:t=[],tone:n=`default`,action:r=null}){return{segments:e,decorations:t,tone:n,action:r,plain:um(e,t)}}function fm({approvalStatus:e,status:t}){return e===`waiting_for_approval`?`waiting`:e===`denied`?`denied`:t}function pm(e){let t=mm(e);if(t!==null)return t;let n=fm({approvalStatus:e.approvalStatus,status:e.status}),r=e.workKind===`command`,i=r?e.command:em(e.toolName,e.toolArgs);switch(n){case`waiting`:return dm({segments:[U(`Waiting for approval`,{shimmer:!0}),U(r?`to run`:`to use`),U(i,{em:!0,truncate:!0})]});case`denied`:return dm({segments:[U(`Permission denied:`),U(i,{em:!0,truncate:!0})],decorations:nm([im(e.startedAt,e.completedAt)])});case`pending`:return dm({segments:[U(r?`Running`:`Running tool:`,{shimmer:!0}),U(i,{em:!0,truncate:!0})],decorations:nm([im(e.startedAt,e.completedAt)])});case`completed`:return dm({segments:[U(r?`Ran`:`Ran tool:`),U(i,{em:!0,truncate:!0})],decorations:nm([im(e.startedAt,e.completedAt)])});case`error`:return dm({segments:[U(r?`Ran`:`Ran tool:`),U(i,{em:!0,truncate:!0})],decorations:[om(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return dm({segments:[U(r?`Ran`:`Ran tool:`),U(i,{em:!0,truncate:!0})],decorations:[om(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return H(n)}}function mm(e){if(!fp(e))return null;let t=e.activityIntents.filter(e=>e.type!==`unknown`);if(t.length!==1)return null;let n=t[0];if(!n)return null;let r=fm({approvalStatus:e.approvalStatus,status:e.status}),i=r===`pending`,a=hp({intent:n,pathMode:`compact`,pending:i}),o=hp({intent:n,pathMode:`full`,pending:i});if(r===`denied`){let e=a.prefix?`${a.prefix} ${a.content}`:a.content,t=o.prefix?`${o.prefix} ${o.content}`:o.content;return dm({segments:[U(`Permission denied:`),U(e,{em:!0,truncate:!0,plainText:t})]})}if(r===`waiting`){let e=a.prefix?`${a.prefix} ${a.content}`:a.content,t=o.prefix?`${o.prefix} ${o.content}`:o.content;return dm({segments:[U(`Waiting for approval`,{shimmer:!0}),U(`to use`),U(e,{em:!0,truncate:!0,plainText:t})]})}let s=[];return a.prefix&&s.push(U(a.prefix,{shimmer:i})),s.push(U(a.content,{em:!1,truncate:!0,plainText:o.content})),dm({segments:s,decorations:r===`error`?[om(`error`,null)]:r===`interrupted`?[om(`interrupted`,null)]:[]})}function hm(e){let t=fm({approvalStatus:e.approvalStatus,status:e.status}),n=ep(e.change),r=ip({change:e.change,mode:`compact`}),i=ip({change:e.change,mode:`full`}),a={kind:`open-file-diff`,path:e.change.movePath??e.change.path},o=U(r,{em:!0,truncate:!0,plainText:i});switch(t){case`waiting`:return dm({segments:[U(`Waiting for approval`,{shimmer:!0}),U(`to edit`),o],decorations:nm([cm(e.change)]),action:a});case`denied`:return dm({segments:[U(`Permission denied:`),o],decorations:nm([cm(e.change)]),action:a});case`pending`:return dm({segments:[U(np(n),{shimmer:!0}),o],decorations:nm([cm(e.change)]),action:a});case`completed`:return dm({segments:[U(tp(n)),o],decorations:nm([cm(e.change)]),action:a});case`error`:return dm({segments:[U(`Failed to ${rp(n)}`),o],decorations:[om(`error`,null)],action:a});case`interrupted`:return dm({segments:[U(`Interrupted while ${np(n).toLowerCase()}`),o],action:a});default:return H(t)}}function gm(e){let t=U(e.queries.join(`, `)||`web search`,{em:!1,truncate:!0});switch(e.status){case`pending`:return dm({segments:[U(`Running web search:`,{shimmer:!0}),t]});case`completed`:return dm({segments:[U(`Ran web search:`),t],decorations:nm([im(e.startedAt,e.completedAt)])});case`error`:return dm({segments:[U(`Ran web search:`),t],decorations:[om(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return dm({segments:[U(`Interrupted web search:`),t],decorations:[om(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return H(e.status)}}function _m(e){let t=U(e.url,{em:!1,truncate:!0});switch(e.status){case`pending`:return dm({segments:[U(`Fetching:`,{shimmer:!0}),t]});case`completed`:return dm({segments:[U(`Fetched:`),t],decorations:nm([im(e.startedAt,e.completedAt)])});case`error`:return dm({segments:[U(`Fetched:`),t],decorations:[om(`error`,e.completedAt===null?null:e.completedAt-e.startedAt)]});case`interrupted`:return dm({segments:[U(`Interrupted fetch:`),t],decorations:[om(`interrupted`,e.completedAt===null?null:e.completedAt-e.startedAt)]});default:return H(e.status)}}function vm(e){switch(e){case`pending`:return{text:`Running subagent:`,shimmer:!0};case`completed`:return{text:`Ran subagent:`,shimmer:!1};case`error`:return{text:`Failed subagent:`,shimmer:!1};case`interrupted`:return{text:`Interrupted subagent:`,shimmer:!1};default:return H(e)}}function ym(e){let t=e.description??(e.output.trim()||e.toolName),n=vm(e.status),r=[U(n.text,{shimmer:n.shimmer}),U(t,{em:!0,truncate:!0})];return e.subagentType&&r.push(U(`(${e.subagentType})`,{em:!1,truncate:!0})),dm({segments:r,decorations:nm([im(e.startedAt,e.completedAt)])})}function bm(e){switch(e.lifecycle){case`waiting`:return dm({segments:[U(`Waiting for approval to edit`,{shimmer:!0}),U(`files`,{em:!0,truncate:!0})]});case`denied`:return dm({segments:[U(`Permission denied:`),U(`file changes`,{em:!0,truncate:!0})]});default:return H(e.lifecycle)}}function xm(e){let t=e.target.toolName,n=e.statusReason!==null&&e.statusReason.trim().length>0?e.statusReason.trim():null,r=n===null?null:U(`(${n})`,{truncate:!0});switch(e.lifecycle){case`pending`:return dm({segments:t===null?[U(`Waiting for permissions`,{shimmer:!0})]:[U(`Waiting for permission`,{shimmer:!0}),U(`to use`),U(t,{em:!0,truncate:!0})]});case`resolving`:return dm({segments:t===null?[U(`Delivering permissions`,{shimmer:!0})]:[U(`Delivering permission`,{shimmer:!0}),U(`to use`),U(t,{em:!0,truncate:!0})]});case`granted`:{let n=e.grantScope===`turn`?`for this turn`:e.grantScope===`session`?`for this session`:null,r=n===null?`Permission granted:`:`Permission granted ${n}:`;return dm({segments:t===null?[U(n===null?`Permission granted`:`Permission granted ${n}`)]:[U(r),U(t,{em:!0,truncate:!0})]})}case`denied`:return dm({segments:t===null?[U(`Permission denied`)]:[U(`Permission denied:`),U(t,{em:!0,truncate:!0})]});case`interrupted`:return dm({segments:nm([U(t===null?`Permission grant interrupted`:`Permission grant interrupted:`),t===null?null:U(t,{em:!0,truncate:!0}),r])});case`expired`:return dm({segments:nm([U(t===null?`Permission grant expired`:`Permission grant expired:`),t===null?null:U(t,{em:!0,truncate:!0}),r])});default:return H(e.lifecycle)}}function Sm(e){switch(e.approvalKind){case`file-edit`:return bm(e);case`permission-grant`:return xm(e);default:return H(e)}}function Cm(e){return e.questions.length===1?e.questions[0]??null:null}function wm(e,t){let n=e.answers?.[t.id];if(!n)return null;let r=n.selected.map(e=>t.options?.find(t=>t.value===e)?.label??e);n.freeText&&r.push(n.freeText);let i=r.join(`, `);return i.length>0?i:null}function Tm(e){let t=Cm(e),n=t?U(t.prompt,{em:!0,truncate:!0}):U(`${e.questions.length} questions`,{em:!0});switch(e.lifecycle){case`pending`:return dm({segments:[U(t?`Waiting for answer`:`Waiting for answers to`,{shimmer:!0}),n]});case`resolving`:return dm({segments:[U(t?`Delivering answer`:`Delivering answers to`,{shimmer:!0}),n]});case`answered`:{let r=t?wm(e,t):null;return dm({segments:nm([U(`Answered`),n,r?U(`— ${r}`,{truncate:!0}):null])})}case`interrupted`:return dm({segments:[U(`Asked`),n],decorations:[om(`interrupted`,null)]});case`expired`:return dm({segments:[U(`Asked`),n],decorations:[om(`expired`,null)]});default:return H(e.lifecycle)}}function Em(e,t){let n=(()=>{switch(e.workKind){case`command`:case`tool`:return pm(e);case`file-change`:return hm(e);case`web-search`:return gm(e);case`web-fetch`:return _m(e);case`delegation`:return ym(e);case`approval`:return Sm(e);case`question`:return Tm(e);default:return H(e)}})();return t.workStyle===`default`?n:{...n,tone:`summary`}}function Dm(e,t){let n=e.kind===`bundle-summary`&&t.isActiveLatestBundle===!0,{verb:r,rest:i}=Pp(e,{active:n}),a=nm([sm(e)]);if(t.summaryStyle===`background`)return dm({segments:[U(i.length===0?r:`${r} ${i}`,{em:!1,truncate:!0})],decorations:a,tone:`summary`});let o=U(r,{shimmer:n});return i.length===0?dm({segments:[{...o,truncate:!0}],decorations:a}):dm({segments:[o,U(i,{em:!0,truncate:!0})],decorations:a})}function Om(e){let t=e.status===`pending`,n=t?im(e.startedAt,e.completedAt,{em:!0}):am(e.startedAt,e.completedAt);return!t&&e.completedAt!==null&&n!==null?dm({segments:[U(`Worked for`,{shimmer:!1})],decorations:[n]}):dm({segments:[U(t?`Working`:`Worked`,{shimmer:t})],decorations:t&&n!==null?[n]:[]})}function km(e,t){return e===null?null:U(t??e,{em:!0,truncate:!0,link:{kind:`thread`,threadId:e}})}function Am(e){switch(e){case`completed`:case`error`:case`interrupted`:return{assign:`Thread assigned to`,release:`Thread unassigned from`,transferFrom:`Thread reassigned from`,transferTo:`to`};case`pending`:return{assign:`Assigning thread to`,release:`Releasing thread from`,transferFrom:`Reassigning thread from`,transferTo:`to`};default:return H(e)}}function jm(e){let t=e.managerAssignment,n=km(t.previousManagerThreadId,t.previousManagerThreadTitle),r=km(t.nextManagerThreadId,t.nextManagerThreadTitle),i=e.status===`pending`,a=Am(e.status);return dm({segments:(()=>{switch(t.action){case`assign`:return nm([U(a.assign,{shimmer:i}),r]);case`release`:return nm([U(a.release,{shimmer:i}),n]);case`transfer`:return nm([U(a.transferFrom,{shimmer:i}),n,r===null?null:U(a.transferTo,{shimmer:i}),r]);default:return H(t.action)}})(),decorations:(()=>{switch(e.status){case`error`:return[om(`error`,null,{emphasis:!0})];case`interrupted`:return[om(`interrupted`,null)];case`pending`:case`completed`:return[];default:return H(e.status)}})()})}function Mm(e){let t=e.systemKind===`error`||e.status===`error`;if(e.systemKind===`operation`&&e.operationKind===`manager-assignment`)return jm(e);let n=e.systemKind===`operation`&&e.operationKind===`compaction`,r=n&&e.status===`pending`?`${e.title}…`:e.title,i=t?[om(`error`,null,{emphasis:!0})]:n&&(e.status===`pending`||e.status===`completed`)?nm([im(e.startedAt,e.completedAt)]):[];return dm({segments:[U(r,{shimmer:e.status===`pending`,truncate:!0})],decorations:i})}function Nm(e){return dm({segments:[U(e.role===`user`?`User`:`Assistant`,{em:!1})]})}function Pm({intent:e,pending:t,failureStatus:n}){let r=hp({intent:e,pathMode:`compact`,pending:t}),i=hp({intent:e,pathMode:`full`,pending:t}),a=[];return r.prefix&&a.push(U(r.prefix,{shimmer:t})),a.push(U(r.content,{em:!1,truncate:!0,plainText:i.content})),dm({segments:a,decorations:n?[om(n,null)]:[]})}function Fm(e){if(!fp(e))return[];let t=null,n=[],r=e.status===`error`?`error`:e.status===`interrupted`?`interrupted`:void 0;return e.activityIntents.forEach((i,a)=>{if(i.type===`unknown`)return;let o=_p(i);o!==null&&o===t||(n.push({id:`${e.id}:activity-intent:${a}`,title:Pm({intent:i,pending:e.status===`pending`,...r?{failureStatus:r}:{}})}),t=o)}),n}function Im(e){return e.kind===`conversation`&&e.role===`user`}function Lm(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&!Im(n))return n}return null}function Rm(e){let t=Lm(e);return t?.kind===`bundle-summary`?t.id:null}function zm(e,t){switch(e.kind){case`conversation`:return Nm(e);case`system`:return Mm(e);case`work`:return Em(e,t);case`bundle-summary`:case`step-summary`:return Dm(e,t);case`turn`:return Om(e);default:return H(e)}}f({content:re(),status:re()}).passthrough(),f({todos:De(He())});function Bm(e){switch(e.workKind){case`web-search`:case`web-fetch`:case`approval`:return!1;case`question`:return e.lifecycle===`answered`||e.lifecycle===`resolving`;case`command`:case`tool`:return!fp(e);case`file-change`:return!0;case`delegation`:return e.childRows.length>0||e.output.trim().length>0;default:return H(e)}}function Vm(e){switch(e.kind){case`conversation`:return!1;case`system`:return e.detail!==null&&e.detail.trim().length>0;case`bundle-summary`:case`step-summary`:return e.children.length>0;case`turn`:return!0;case`work`:return Bm(e);default:return H(e)}}function Hm(e){return e.length>0&&e.every(e=>!Bm(e))}function Um(e){if(!Vm(e))return!1;switch(e.kind){case`system`:case`bundle-summary`:return!0;case`work`:return e.workKind===`delegation`;case`conversation`:case`step-summary`:case`turn`:return!1;default:return H(e)}}function Wm(e,t,n){if(!t)return;let r=Lm(e);r&&Um(r)&&n.add(r.id);for(let t of e)t.kind===`work`&&t.workKind===`delegation`&&t.status===`pending`&&Wm(t.childRows,!0,n)}function Gm({rows:e,scopeActive:t}){let n=new Set;return Wm(e,t,n),n}function Km({event:e,hasNavigation:t}){return e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey?null:e.key===`Escape`?`close`:t?e.key===`ArrowLeft`?`previous`:e.key===`ArrowRight`?`next`:null:null}function qm({currentIndex:e,direction:t,itemCount:n}){return n<=0?e:t===`previous`?e===0?n-1:e-1:e===n-1?0:e+1}function Jm({hasMultipleImages:e=!1,imageAlt:t,imageSrc:n,onClose:i,onNext:a,onPrevious:o,title:s}){let c=e&&o!==void 0&&a!==void 0;return(0,B.useEffect)(()=>{if(!n)return;let e=e=>{let t=Km({event:e,hasNavigation:c});if(t)switch(t){case`close`:e.preventDefault(),i();return;case`previous`:if(!o)return;e.preventDefault(),o();return;case`next`:if(!a)return;e.preventDefault(),a();return}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[c,n,i,a,o]),n?(0,V.jsx)(Nr,{open:!0,onOpenChange:e=>!e&&i(),children:(0,V.jsxs)(jr,{className:`left-0 top-0 flex h-screen w-screen max-w-none translate-x-0 translate-y-0 items-center justify-center border-none bg-transparent p-0 shadow-none data-[state=closed]:slide-out-to-left-0 data-[state=closed]:slide-out-to-top-0 data-[state=open]:slide-in-from-left-0 data-[state=open]:slide-in-from-top-0 sm:rounded-none [&>button]:hidden`,onClick:e=>{e.target===e.currentTarget&&i()},children:[(0,V.jsx)(Mr,{className:`sr-only`,children:s}),(0,V.jsx)(`img`,{src:n,alt:t,className:`max-h-[82vh] max-w-[90vw] rounded bg-background object-contain`}),c?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute left-2 top-1/2 size-9 -translate-y-1/2 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,onClick:o,"aria-label":`Previous image`,children:(0,V.jsx)(r,{name:`ChevronLeft`,className:`size-5`})}),(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute right-2 top-1/2 size-9 -translate-y-1/2 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,onClick:a,"aria-label":`Next image`,children:(0,V.jsx)(r,{name:`ChevronRight`,className:`size-5`})})]}):null,(0,V.jsx)(Or,{asChild:!0,children:(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute right-2 top-2 size-9 rounded-full bg-black/45 text-white hover:bg-black/60 hover:text-white`,"aria-label":`Close image preview`,children:(0,V.jsx)(r,{name:`X`,className:`size-5`})})})]})}):null}function Ym(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Xm(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Zm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$m={};function eh(e,t){return((t||$m).jsx?Qm:Zm).test(e)}var th=/[ \t\n\f\r]/g;function nh(e){return typeof e==`object`?e.type===`text`?rh(e.value):!1:rh(e)}function rh(e){return e.replace(th,``)===``}var ih=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ih.prototype.normal={},ih.prototype.property={},ih.prototype.space=void 0;function ah(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ih(n,r,t)}function oh(e){return e.toLowerCase()}var sh=class{constructor(e,t){this.attribute=t,this.property=e}};sh.prototype.attribute=``,sh.prototype.booleanish=!1,sh.prototype.boolean=!1,sh.prototype.commaOrSpaceSeparated=!1,sh.prototype.commaSeparated=!1,sh.prototype.defined=!1,sh.prototype.mustUseProperty=!1,sh.prototype.number=!1,sh.prototype.overloadedBoolean=!1,sh.prototype.property=``,sh.prototype.spaceSeparated=!1,sh.prototype.space=void 0;var ch=N({boolean:()=>uh,booleanish:()=>dh,commaOrSpaceSeparated:()=>hh,commaSeparated:()=>mh,number:()=>W,overloadedBoolean:()=>fh,spaceSeparated:()=>ph}),lh=0,uh=gh(),dh=gh(),fh=gh(),W=gh(),ph=gh(),mh=gh(),hh=gh();function gh(){return 2**++lh}var _h=Object.keys(ch),vh=class extends sh{constructor(e,t,n,r){let i=-1;if(super(e,t),yh(this,`space`,r),typeof n==`number`)for(;++i<_h.length;){let e=_h[i];yh(this,_h[i],(n&ch[e])===ch[e])}}};vh.prototype.defined=!0;function yh(e,t,n){n&&(e[t]=n)}function bh(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new vh(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[oh(r)]=r,n[oh(a.attribute)]=r}return new ih(t,n,e.space)}var xh=bh({properties:{ariaActiveDescendant:null,ariaAtomic:dh,ariaAutoComplete:null,ariaBusy:dh,ariaChecked:dh,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:ph,ariaCurrent:null,ariaDescribedBy:ph,ariaDetails:null,ariaDisabled:dh,ariaDropEffect:ph,ariaErrorMessage:null,ariaExpanded:dh,ariaFlowTo:ph,ariaGrabbed:dh,ariaHasPopup:null,ariaHidden:dh,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ph,ariaLevel:W,ariaLive:null,ariaModal:dh,ariaMultiLine:dh,ariaMultiSelectable:dh,ariaOrientation:null,ariaOwns:ph,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:dh,ariaReadOnly:dh,ariaRelevant:null,ariaRequired:dh,ariaRoleDescription:ph,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:dh,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Sh(e,t){return t in e?e[t]:t}function Ch(e,t){return Sh(e,t.toLowerCase())}var wh=bh({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:mh,acceptCharset:ph,accessKey:ph,action:null,allow:null,allowFullScreen:uh,allowPaymentRequest:uh,allowUserMedia:uh,alt:null,as:null,async:uh,autoCapitalize:null,autoComplete:ph,autoFocus:uh,autoPlay:uh,blocking:ph,capture:null,charSet:null,checked:uh,cite:null,className:ph,cols:W,colSpan:null,content:null,contentEditable:dh,controls:uh,controlsList:ph,coords:W|mh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:uh,defer:uh,dir:null,dirName:null,disabled:uh,download:fh,draggable:dh,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:uh,formTarget:null,headers:ph,height:W,hidden:fh,high:W,href:null,hrefLang:null,htmlFor:ph,httpEquiv:ph,id:null,imageSizes:null,imageSrcSet:null,inert:uh,inputMode:null,integrity:null,is:null,isMap:uh,itemId:null,itemProp:ph,itemRef:ph,itemScope:uh,itemType:ph,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:uh,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:uh,muted:uh,name:null,nonce:null,noModule:uh,noValidate:uh,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:uh,optimum:W,pattern:null,ping:ph,placeholder:null,playsInline:uh,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:uh,referrerPolicy:null,rel:ph,required:uh,reversed:uh,rows:W,rowSpan:W,sandbox:ph,scope:null,scoped:uh,seamless:uh,selected:uh,shadowRootClonable:uh,shadowRootDelegatesFocus:uh,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:dh,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:uh,useMap:null,value:dh,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ph,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:uh,declare:uh,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:uh,noHref:uh,noShade:uh,noWrap:uh,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:dh,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:uh,disableRemotePlayback:uh,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:Ch}),Th=bh({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:hh,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:ph,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:uh,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:mh,g2:mh,glyphName:mh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:hh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ph,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hh,rev:hh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hh,requiredFeatures:hh,requiredFonts:hh,requiredFormats:hh,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:hh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hh,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Sh}),Eh=bh({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()}}),Dh=bh({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ch}),Oh=bh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),kh={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`},Ah=/[A-Z]/g,jh=/-[a-z]/g,Mh=/^data[-\w.:]+$/i;function Nh(e,t){let n=oh(t),r=t,i=sh;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Mh.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(jh,Fh);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!jh.test(e)){let n=e.replace(Ah,Ph);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=vh}return new i(r,t)}function Ph(e){return`-`+e.toLowerCase()}function Fh(e){return e.charAt(1).toUpperCase()}var Ih=ah([xh,wh,Eh,Dh,Oh],`html`),Lh=ah([xh,Th,Eh,Dh,Oh],`svg`);function Rh(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function zh(e){return e.join(` `).trim()}var Bh=d(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
17
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Vh=d((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Bh());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Hh=d((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Uh=d(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Vh()),r=Hh();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Wh=Kh(`end`),Gh=Kh(`start`);function Kh(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function qh(e){let t=Gh(e),n=Wh(e);if(t&&n)return{start:t,end:n}}function Jh(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Xh(e.position):`start`in e||`end`in e?Xh(e):`line`in e||`column`in e?Yh(e):``}function Yh(e){return Zh(e&&e.line)+`:`+Zh(e&&e.column)}function Xh(e){return Yh(e&&e.start)+`-`+Yh(e&&e.end)}function Zh(e){return e&&typeof e==`number`?e:1}var Qh=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Jh(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Qh.prototype.file=``,Qh.prototype.name=``,Qh.prototype.reason=``,Qh.prototype.message=``,Qh.prototype.stack=``,Qh.prototype.column=void 0,Qh.prototype.line=void 0,Qh.prototype.ancestors=void 0,Qh.prototype.cause=void 0,Qh.prototype.fatal=void 0,Qh.prototype.place=void 0,Qh.prototype.ruleId=void 0,Qh.prototype.source=void 0;var $h=Ve(Uh(),1),eg={}.hasOwnProperty,tg=new Map,ng=/[A-Z]/g,rg=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ig=new Set([`td`,`th`]),ag=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function og(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=_g(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=gg(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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`?Lh:Ih,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=sg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function sg(e,t,n){if(t.type===`element`)return cg(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return lg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return dg(e,t,n);if(t.type===`mdxjsEsm`)return ug(e,t);if(t.type===`root`)return fg(e,t,n);if(t.type===`text`)return pg(e,t)}function cg(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Lh,e.schema=i),e.ancestors.push(t);let a=Cg(e,t.tagName,!1),o=vg(e,t),s=bg(e,t);return rg.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!nh(e):!0})),mg(e,o,a,t),hg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function lg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}wg(e,t.position)}function ug(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wg(e,t.position)}function dg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Lh,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Cg(e,t.name,!0),o=yg(e,t),s=bg(e,t);return mg(e,o,a,t),hg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fg(e,t,n){let r={};return hg(r,bg(e,t)),e.create(t,e.Fragment,r,n)}function pg(e,t){return t.value}function mg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function gg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function _g(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Gh(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function vg(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&eg.call(t.properties,i)){let a=xg(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ig.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function yg(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wg(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else wg(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function bg(e,t){let n=[],r=-1,i=e.passKeys?new Map:tg;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=sg(e,a,o);s!==void 0&&n.push(s)}return n}function xg(e,t,n){let r=Nh(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xm(n):zh(n)),r.property===`style`){let t=typeof n==`object`?n:Sg(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Tg(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?kh[r.property]||r.property:r.attribute,n]}}function Sg(e,t){try{return(0,$h.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Qh("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ag+`#cannot-parse-style-attribute`,r}}function Cg(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=eh(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=eh(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return eg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);wg(e)}function wg(e,t){let n=new Qh("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=ag+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Tg(e){let t={},n;for(n in e)eg.call(e,n)&&(t[Eg(n)]=e[n]);return t}function Eg(e){let t=e.replace(ng,Dg);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Dg(e){return`-`+e.toLowerCase()}var Og={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`]},kg={};function Ag(e,t){let n=t||kg;return jg(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function jg(e,t,n){if(Ng(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 Mg(e.children,t,n)}return Array.isArray(e)?Mg(e,t,n):``}function Mg(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=jg(e[i],t,n);return r.join(``)}function Ng(e){return!!(e&&typeof e==`object`)}var Pg={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:``,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:``,InvisibleTimes:``,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
18
|
+
`,Nfr:`𝔑`,NoBreak:``,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:` `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:``,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:``,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:``,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:``,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:``,zwnj:``},Fg={}.hasOwnProperty;function Ig(e){return Fg.call(Pg,e)?Pg[e]:!1}function Lg(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Rg(e,t){return e.length>0?(Lg(e,e.length,0,t),e):t}var zg={}.hasOwnProperty;function Bg(e){let t={},n=-1;for(;++n<e.length;)Vg(t,e[n]);return t}function Vg(e,t){let n;for(n in t){let r=(zg.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){zg.call(r,a)||(r[a]=[]);let e=i[a];Hg(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Hg(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Lg(e,0,0,r)}function Ug(e,t){let 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 Wg(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Gg=n_(/[A-Za-z]/),Kg=n_(/[\dA-Za-z]/),qg=n_(/[#-'*+\--9=?A-Z^-~]/);function Jg(e){return e!==null&&(e<32||e===127)}var Yg=n_(/\d/),Xg=n_(/[\dA-Fa-f]/),Zg=n_(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function Qg(e){return e!==null&&(e<0||e===32)}function $g(e){return e===-2||e===-1||e===32}var e_=n_(/\p{P}|\p{S}/u),t_=n_(/\s/);function n_(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function r_(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Kg(e.charCodeAt(n+1))&&Kg(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function i_(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $g(r)?(e.enter(n),s(r)):t(r)}function s(r){return $g(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var a_={tokenize:o_};function o_(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),i_(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return G(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var s_={tokenize:l_},c_={tokenize:u_};function l_(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Lg(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(c_,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(c_,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return G(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Lg(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function u_(e,t,n){return i_(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function d_(e){if(e===null||Qg(e)||t_(e))return 1;if(e_(e))return 2}function f_(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var p_={name:`attention`,resolveAll:m_,tokenize:h_};function m_(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};g_(d,-c),g_(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Rg(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Rg(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Rg(l,f_(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Rg(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Rg(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Lg(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function h_(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=d_(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=d_(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function g_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var __={name:`autolink`,tokenize:v_};function v_(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Gg(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Kg(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Kg(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Jg(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qg(t)?(e.consume(t),l):n(t)}function u(e){return Kg(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Kg(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var y_={partial:!0,tokenize:b_};function b_(e,t,n){return r;function r(t){return $g(t)?i_(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||G(e)?t(e):n(e)}}var x_={continuation:{tokenize:C_},exit:w_,name:`blockQuote`,tokenize:S_};function S_(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $g(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function C_(e,t,n){let r=this;return i;function i(t){return $g(t)?i_(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(x_,t,n)(r)}}function w_(e){e.exit(`blockQuote`)}var T_={name:`characterEscape`,tokenize:E_};function E_(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Zg(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var D_={name:`characterReference`,tokenize:O_};function O_(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Kg,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Xg,u):(e.enter(`characterReferenceValue`),a=7,o=Yg,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Kg&&!Ig(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var k_={partial:!0,tokenize:M_},A_={concrete:!0,name:`codeFenced`,tokenize:j_};function j_(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$g(t)?i_(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||G(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(k_,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$g(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),i_(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||G(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$g(t)?i_(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||G(t)?e.check(k_,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||G(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$g(t)?i_(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$g(t)?i_(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||G(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function M_(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var N_={name:`codeIndented`,tokenize:F_},P_={partial:!0,tokenize:I_};function F_(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),i_(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):G(t)?e.attempt(P_,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||G(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function I_(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):i_(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):G(e)?i(e):n(e)}}var L_={name:`codeText`,previous:z_,resolve:R_,tokenize:B_};function R_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function z_(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function B_(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||G(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var V_=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&H_(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),H_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),H_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);H_(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);H_(this.left,t.reverse())}}};function H_(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 U_(e){let t={},n=-1,r,i,a,o,s,c,l,u=new V_(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,W_(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Lg(e,0,1/0,u.slice(0)),!l}function W_(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var G_={resolve:q_,tokenize:J_},K_={partial:!0,tokenize:Y_};function q_(e){return U_(e),e}function J_(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):G(t)?e.check(K_,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Y_(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i_(e,a,`linePrefix`)}function a(i){if(i===null||G(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function X_(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Jg(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||G(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Qg(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Jg(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Z_(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):G(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||G(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$g(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Q_(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i_(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||G(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function $_(e,t){let n;return r;function r(i){return G(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$g(i)?i_(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ev={name:`definition`,tokenize:nv},tv={partial:!0,tokenize:rv};function nv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Z_.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Wg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Qg(t)?$_(e,l)(t):l(t)}function l(t){return X_(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(tv,d,d)(t)}function d(t){return $g(t)?i_(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||G(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function rv(e,t,n){return r;function r(t){return Qg(t)?$_(e,i)(t):n(t)}function i(t){return Q_(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $g(t)?i_(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||G(e)?t(e):n(e)}}var iv={name:`hardBreakEscape`,tokenize:av};function av(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return G(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var ov={name:`headingAtx`,resolve:sv,tokenize:cv};function sv(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Lg(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function cv(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Qg(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||G(n)?(e.exit(`atxHeading`),t(n)):$g(n)?i_(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Qg(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var lv=`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`.split(`.`),uv=[`pre`,`script`,`style`,`textarea`],dv={concrete:!0,name:`htmlFlow`,resolveTo:mv,tokenize:hv},fv={partial:!0,tokenize:_v},pv={partial:!0,tokenize:gv};function mv(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 hv(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):Gg(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Gg(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Gg(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Qg(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&uv.includes(l)?(i=1,r.interrupt?t(s):O(s)):lv.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Kg(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $g(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Gg(t)?(e.consume(t),b):$g(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Kg(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$g(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$g(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||G(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Qg(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$g(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||G(t)?O(t):$g(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):G(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(fv,ie,ee)(t)):t===null||G(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(pv,te,ie)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||G(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),N):O(t)}function j(t){return t===47?(e.consume(t),o=``,M):O(t)}function M(t){if(t===62){let n=o.toLowerCase();return uv.includes(n)?(e.consume(t),re):O(t)}return Gg(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):O(t)}function re(t){return t===null||G(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function gv(e,t,n){let r=this;return i;function i(t){return G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function _v(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(y_,t,n)}}var vv={name:`htmlText`,tokenize:yv};function yv(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Gg(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Gg(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):G(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):G(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):G(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):G(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return Gg(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Kg(t)?(e.consume(t),S):C(t)}function C(t){return G(t)?(o=C,j(t)):$g(t)?(e.consume(t),C):A(t)}function w(t){return t===45||Kg(t)?(e.consume(t),w):t===47||t===62||Qg(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||Gg(t)?(e.consume(t),E):G(t)?(o=T,j(t)):$g(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||Kg(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):G(t)?(o=D,j(t)):$g(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):G(t)?(o=O,j(t)):$g(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):G(t)?(o=ee,j(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Qg(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||Qg(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),M}function M(t){return $g(t)?i_(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var bv={name:`labelEnd`,resolveAll:wv,resolveTo:Tv,tokenize:Ev},xv={tokenize:Dv},Sv={tokenize:Ov},Cv={tokenize:kv};function wv(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Lg(e,0,e.length,n),e}function Tv(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Rg(s,e.slice(a+1,a+r+3)),s=Rg(s,[[`enter`,u,t]]),s=Rg(s,f_(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Rg(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Rg(s,e.slice(o+1)),s=Rg(s,[[`exit`,c,t]]),Lg(e,a,e.length,s),e}function Ev(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Wg(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(xv,u,o?u:d)(t):t===91?e.attempt(Sv,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Cv,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Dv(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Qg(t)?$_(e,a)(t):a(t)}function a(t){return t===41?u(t):X_(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Qg(t)?$_(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Q_(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Qg(t)?$_(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ov(e,t,n){let r=this;return i;function i(t){return Z_.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Wg(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function kv(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Av={name:`labelStartImage`,resolveAll:bv.resolveAll,tokenize:jv};function jv(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Mv={name:`labelStartLink`,resolveAll:bv.resolveAll,tokenize:Nv};function Nv(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Pv={name:`lineEnding`,tokenize:Fv};function Fv(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),i_(e,t,`linePrefix`)}}var Iv={name:`thematicBreak`,tokenize:Lv};function Lv(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||G(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$g(t)?i_(e,s,`whitespace`)(t):s(t))}}var Rv={continuation:{tokenize:Hv},exit:Wv,name:`list`,tokenize:Vv},zv={partial:!0,tokenize:Gv},Bv={partial:!0,tokenize:Uv};function Vv(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Yg(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Iv,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Yg(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(y_,r.interrupt?n:u,e.attempt(zv,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $g(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Hv(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(y_,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,i_(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$g(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Bv,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,i_(e,e.attempt(Rv,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Uv(e,t,n){let r=this;return i_(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Wv(e){e.exit(this.containerState.type)}function Gv(e,t,n){let r=this;return i_(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$g(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Kv={name:`setextUnderline`,resolveTo:qv,tokenize:Jv};function qv(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Jv(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$g(t)?i_(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||G(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Yv={tokenize:Xv};function Xv(e){let t=this,n=e.attempt(y_,r,e.attempt(this.parser.constructs.flowInitial,i,i_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(G_,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Zv={resolveAll:ty()},Qv=ey(`string`),$v=ey(`text`);function ey(e){return{resolveAll:ty(e===`text`?ny:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ty(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function ny(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var ry=N({attentionMarkers:()=>dy,contentInitial:()=>ay,disable:()=>fy,document:()=>iy,flow:()=>sy,flowInitial:()=>oy,insideSpan:()=>uy,string:()=>cy,text:()=>ly}),iy={42:Rv,43:Rv,45:Rv,48:Rv,49:Rv,50:Rv,51:Rv,52:Rv,53:Rv,54:Rv,55:Rv,56:Rv,57:Rv,62:x_},ay={91:ev},oy={[-2]:N_,[-1]:N_,32:N_},sy={35:ov,42:Iv,45:[Kv,Iv],60:dv,61:Kv,95:Iv,96:A_,126:A_},cy={38:D_,92:T_},ly={[-5]:Pv,[-4]:Pv,[-3]:Pv,33:Av,38:D_,42:p_,60:[__,vv],91:Mv,92:[iv,T_],93:bv,95:p_,96:L_},uy={null:[p_,Zv]},dy={null:[42,95]},fy={null:[]};function py(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Rg(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=f_(a,l.events,l),l.events):[]}function f(e,t){return hy(p(e),t)}function p(e){return my(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){G(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Lg(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function my(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hy(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
19
|
+
`;break;case-3:o=`\r
|
|
20
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function gy(e){let t={constructs:Bg([ry,...(e||{}).extensions||[]]),content:n(a_),defined:[],document:n(s_),flow:n(Yv),lazy:{},string:n(Qv),text:n($v)};return t;function n(e){return n;function n(n){return py(t,e,n)}}}function _y(e){for(;!U_(e););return e}var vy=/[\0\t\n\r]/g;function yy(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(vy.lastIndex=u,c=vy.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var by=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xy(e){return e.replace(by,Sy)}function Sy(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Ug(n.slice(t?2:1),t?16:10)}return Ig(n)||e}var Cy={}.hasOwnProperty;function wy(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),Ty(n)(_y(gy(n).document().write(yy()(e,t,!0))))}function Ty(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(R),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:L,autolinkProtocol:I,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:oe,characterReference:se,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(j),label:ne,labelText:M,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:P,resourceDestinationString:N,resourceTitleString:re,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Dy(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Cy.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ky).call(a,void 0,e[0])}for(r.position={start:Ey(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ey(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ey(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ky).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Jh({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ey(e.end)}function u(){return Ag(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Wg(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:Ey(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ey(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ey(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=xy(t),n.identifier=Wg(t).toLowerCase()}function ne(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function P(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Wg(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function F(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Ug(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Ig(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=Ey(e.end)}function I(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function L(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function R(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function Ey(e){return{line:e.line,column:e.column,offset:e.offset}}function Dy(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Dy(e,r):Oy(e,r)}}function Oy(e,t){let n;for(n in t)if(Cy.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ky(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Jh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jh({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Jh({start:t.start,end:t.end})+`) is still open`)}function Ay(e){let t=this;t.parser=n;function n(n){return wy(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function jy(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function My(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
21
|
+
`}]}function Ny(e,t){let n=t.value?t.value+`
|
|
22
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,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 Py(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fy(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iy(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=r_(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ly(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ry(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zy(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function By(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zy(e,t);let i={src:r_(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Vy(e,t){let n={src:r_(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hy(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Uy(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zy(e,t);let i={href:r_(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Wy(e,t){let n={href:r_(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gy(e,t,n){let r=e.all(t),i=n?Ky(n):qy(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
23
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
24
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Ky(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=qy(n[r])}return t}function qy(e){return e.spread??e.children.length>1}function Jy(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Yy(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xy(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Zy(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qy(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Gh(t.children[1]),o=Wh(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function $y(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function eb(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var tb=9,nb=32;function rb(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(ib(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ib(t.slice(i),i>0,!1)),a.join(``)}function ib(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===tb||t===nb;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===tb||t===nb;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ab(e,t){let n={type:`text`,value:rb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ob(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var sb={blockquote:jy,break:My,code:Ny,delete:Py,emphasis:Fy,footnoteReference:Iy,heading:Ly,html:Ry,imageReference:By,image:Vy,inlineCode:Hy,linkReference:Uy,link:Wy,listItem:Gy,list:Jy,paragraph:Yy,root:Xy,strong:Zy,table:Qy,tableCell:eb,tableRow:$y,text:ab,thematicBreak:ob,toml:cb,yaml:cb,definition:cb,footnoteDefinition:cb};function cb(){}var lb=typeof self==`object`?self:globalThis,ub=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new lb[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new lb[a](o),i)};return r},db=e=>ub(new Map,e)(0),fb=``,{toString:pb}={},{keys:mb}=Object,hb=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pb.call(e).slice(8,-1);switch(n){case`Array`:return[1,fb];case`Object`:return[2,fb];case`Date`:return[3,fb];case`RegExp`:return[4,fb];case`Map`:return[5,fb];case`Set`:return[6,fb];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},gb=([e,t])=>e===0&&(t===`function`||t===`symbol`),_b=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=hb(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of mb(r))(e||!gb(hb(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(gb(hb(n))||gb(hb(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!gb(hb(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},vb=(e,{json:t,lossy:n}={})=>{let r=[];return _b(!(t||n),!!t,new Map,r)(e),r},yb=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?db(vb(e,t)):structuredClone(e):(e,t)=>db(vb(e,t));function bb(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function xb(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Sb(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bb,r=e.options.footnoteBackLabel||xb,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=r_(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...yb(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
25
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
26
|
+
`}]}}var Cb=(function(e){if(e==null)return Ob;if(typeof e==`function`)return Db(e);if(typeof e==`object`)return Array.isArray(e)?wb(e):Tb(e);if(typeof e==`string`)return Eb(e);throw Error(`Expected function, string, or object as test`)});function wb(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Cb(e[n]);return Db(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Tb(e){let t=e;return Db(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Eb(e){return Db(t);function t(t){return t&&t.type===e}}function Db(e){return t;function t(t,n,r){return!!(kb(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ob(){return!0}function kb(e){return typeof e==`object`&&!!e&&`type`in e}function Ab(e){return e}var jb=[];function Mb(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Cb(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Ab(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=jb,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Nb(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Nb(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?jb:[e]}function Pb(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Mb(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Fb={}.hasOwnProperty,Ib={};function Lb(e,t){let n=t||Ib,r=new Map,i=new Map,a={all:s,applyData:zb,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...sb,...n.handlers},one:o,options:n,patch:Rb,wrap:Vb};return Pb(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Fb.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=yb(n);return r.children=a.all(e),r}return yb(e)}return(a.options.unknownHandler||Bb)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Hb(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Hb(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Rb(e,t){e.position&&(t.position=qh(e))}function zb(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,yb(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Bb(e,t){let n=t.data||{},r=`value`in t&&!(Fb.call(n,`hProperties`)||Fb.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vb(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
27
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
28
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
29
|
+
`}),n}function Hb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ub(e,t){let n=Lb(e,t),r=n.one(e,void 0),i=Sb(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
30
|
+
`},i)),a}function Wb(e,t){return e&&`run`in e?async function(n,r){let i=Ub(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ub(n,{file:r,...e||t})}}function Gb(e){if(e)throw e}var Kb=d(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function qb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jb(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Yb(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Yb(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Xb={basename:Zb,dirname:Qb,extname:$b,join:ex,sep:`/`};function Zb(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);rx(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Qb(e){if(rx(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $b(e){rx(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ex(...e){let t=-1,n;for(;++t<e.length;)rx(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:tx(n)}function tx(e){rx(e);let t=e.codePointAt(0)===47,n=nx(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nx(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function rx(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ix={cwd:ax};function ax(){return`/`}function ox(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sx(e){if(typeof e==`string`)e=new URL(e);else if(!ox(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cx(e)}function cx(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lx=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],ux=class{constructor(e){let t;t=e?ox(e)?{path:e}:typeof e==`string`||mx(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ix.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lx.length;){let e=lx[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lx.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Xb.basename(this.path):void 0}set basename(e){fx(e,`basename`),dx(e,`basename`),this.path=Xb.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Xb.dirname(this.path):void 0}set dirname(e){px(this.basename,`dirname`),this.path=Xb.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Xb.extname(this.path):void 0}set extname(e){if(dx(e,`extname`),px(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Xb.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ox(e)&&(e=sx(e)),fx(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Xb.basename(this.path,this.extname):void 0}set stem(e){fx(e,`stem`),dx(e,`stem`),this.path=Xb.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Qh(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dx(e,t){if(e&&e.includes(Xb.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Xb.sep+"`")}function fx(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function px(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hx=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gx=Ve(Kb(),1),_x={}.hasOwnProperty,vx=new class e extends hx{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=Jb()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gx.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xx(`data`,this.frozen),this.namespace[e]=t,this):_x.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xx(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wx(e),n=this.parser||this.Parser;return yx(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yx(`process`,this.parser||this.Parser),bx(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wx(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Ex(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yx(`processSync`,this.parser||this.Parser),bx(`processSync`,this.compiler||this.Compiler),this.process(e,r),Cx(`processSync`,`process`,t),n;function r(e,r){t=!0,Gb(e),n=r}}run(e,t,n){Sx(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wx(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Cx(`runSync`,`run`,n),r;function i(e,t){Gb(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wx(t),r=this.compiler||this.Compiler;return bx(`stringify`,r),Sx(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xx(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,gx.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qb(o)&&qb(r)&&(r=(0,gx.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yx(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bx(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xx(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sx(e){if(!qb(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Cx(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wx(e){return Tx(e)?e:new ux(e)}function Tx(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Ex(e){return typeof e==`string`||Dx(e)}function Dx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ox=[],kx={allowDangerousHtml:!0},Ax=/^(https?|ircs?|mailto|xmpp)$/i,jx=[{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 Mx(e){let t=Nx(e),n=Px(e);return Fx(t.runSync(t.parse(n),n),e)}function Nx(e){let t=e.rehypePlugins||Ox,n=e.remarkPlugins||Ox,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kx}:kx;return vx().use(Ay).use(n).use(Wb,r).use(t)}function Px(e){let t=e.children||``,n=new ux;return typeof t==`string`?n.value=t:``+t,n}function Fx(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ix;for(let e of jx)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Pb(e,l),og(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Og)if(Object.hasOwn(Og,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Og[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ix(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ax.test(e.slice(0,t))?e:``}var Lx=/[#.]/g;function Rx(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Lx.lastIndex=i;let e=Lx.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function zx(e,t,n){let r=n?Gx(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Rx(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Bx(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Vx(e,o.properties,t,n)}for(let e of a)Hx(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Bx(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Vx(e,t,n,r){let i=Nh(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Rh(r):i.commaSeparated?Ym(r):i.commaOrSpaceSeparated?Rh(Ym(r).join(` `)):Ux(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Wx(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Ux(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Hx(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Hx(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Hx(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Ux(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||oh(n)===oh(t)))return!0}return n}function Wx(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Gx(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Kx=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),qx=zx(Ih,`div`),Jx=zx(Lh,`g`,Kx);function Yx(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Xx(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Xx(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Xx(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Zx={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Qx={}.hasOwnProperty,$x=Object.prototype;function eS(e,t){let n=t||{};return tS({file:n.file||void 0,location:!1,schema:n.space===`svg`?Lh:Ih,verbose:n.verbose||!1},e)}function tS(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},iS(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:nS(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Yx(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},iS(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},iS(e,r,n),n}default:return n=rS(e,t),n}}function nS(e,t){let n=-1,r=[];for(;++n<t.length;){let i=tS(e,t[n]);r.push(i)}return r}function rS(e,t){let n=e.schema;e.schema=t.namespaceURI===Zx.svg?Lh:Ih;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Qx.call($x,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Jx:qx)(t.tagName,i,nS(e,t.childNodes));if(iS(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&oS(r.startTag),o=r&&r.endTag&&oS(r.endTag),s=tS(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function iS(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=aS(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function aS(e,t,n){let r=oS(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Qx.call(n.attrs,i)&&(r[Nh(e.schema,i).property]=oS(n.attrs[i]));n.startTag;let a=oS(n.startTag),o=n.endTag?oS(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function oS(e){let t=sS({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sS({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sS(e){return e.line&&e.column?e:void 0}var cS={}.hasOwnProperty;function lS(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&cS.call(t,e)){let n=String(t[e]);i=cS.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var uS={},dS={}.hasOwnProperty,fS=lS(`type`,{handlers:{root:mS,element:yS,text:_S,comment:vS,doctype:gS}});function pS(e,t){let n=(t||uS).space;return fS(e,n===`svg`?Lh:Ih)}function mS(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=xS(e.children,n,t),SS(e,n),n}function hS(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=xS(e.children,n,t),SS(e,n),n}function gS(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return SS(e,t),t}function _S(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return SS(e,t),t}function vS(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return SS(e,t),t}function yS(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Lh);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&dS.call(e.properties,a)){let t=bS(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Zx[o],childNodes:[],parentNode:null};return s.childNodes=xS(e.children,s,r),SS(e,s),e.tagName===`template`&&e.content&&(s.content=hS(e.content,r)),s}function bS(e,t,n){let r=Nh(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Xm(n):zh(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Zx[r.space]}return i}function xS(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=fS(e[r],n);a.parentNode=t,i.push(a)}return i}function SS(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var CS=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],wS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),K;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(K||={});var TS={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function ES(e){return e>=55296&&e<=57343}function DS(e){return e>=56320&&e<=57343}function OS(e,t){return(e-55296)*1024+9216+t}function kS(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function AS(e){return e>=64976&&e<=65007||wS.has(e)}var q;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(q||={});var jS=65536,MS=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=jS,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(DS(t))return this.pos++,this._addGap(),OS(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,K.EOF;return this._err(q.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let n=this.html.charCodeAt(t);return n===K.CARRIAGE_RETURN?K.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let e=this.html.charCodeAt(this.pos);return e===K.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,K.LINE_FEED):e===K.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ES(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===K.LINE_FEED||e===K.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){kS(e)?this._err(q.controlCharacterInInputStream):AS(e)&&this._err(q.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},NS;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(NS||={});function PS(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var FS=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),IS=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function LS(e){return e>=55296&&e<=57343||e>1114111?65533:IS.get(e)??e}var RS;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(RS||={});var zS=32,BS;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(BS||={});function VS(e){return e>=RS.ZERO&&e<=RS.NINE}function HS(e){return e>=RS.UPPER_A&&e<=RS.UPPER_F||e>=RS.LOWER_A&&e<=RS.LOWER_F}function US(e){return e>=RS.UPPER_A&&e<=RS.UPPER_Z||e>=RS.LOWER_A&&e<=RS.LOWER_Z||VS(e)}function WS(e){return e===RS.EQUALS||US(e)}var GS;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(GS||={});var KS;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(KS||={});var qS=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=GS.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=KS.Strict}startEntity(e){this.decodeMode=e,this.state=GS.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case GS.EntityStart:return e.charCodeAt(t)===RS.NUM?(this.state=GS.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=GS.NamedEntity,this.stateNamedEntity(e,t));case GS.NumericStart:return this.stateNumericStart(e,t);case GS.NumericDecimal:return this.stateNumericDecimal(e,t);case GS.NumericHex:return this.stateNumericHex(e,t);case GS.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|zS)===RS.LOWER_X?(this.state=GS.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=GS.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(VS(r)||HS(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(VS(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===RS.SEMI)this.consumed+=1;else if(this.decodeMode===KS.Strict)return 0;return this.emitCodePoint(LS(this.result),this.consumed),this.errors&&(e!==RS.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&BS.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=JS(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===KS.Attribute&&(i===0||WS(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&BS.VALUE_LENGTH)>>14,i!==0){if(a===RS.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==KS.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&BS.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~BS.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case GS.NamedEntity:return this.result!==0&&(this.decodeMode!==KS.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case GS.NumericDecimal:return this.emitNumericEntity(0,2);case GS.NumericHex:return this.emitNumericEntity(0,3);case GS.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case GS.EntityStart:return 0}}};function JS(e,t,n,r){let i=(t&BS.BRANCH_LENGTH)>>7,a=t&BS.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var J;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(J||={});var YS;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(YS||={});var XS;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(XS||={});var Y;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(Y||={});var X;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(X||={});var ZS=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function QS(e){return ZS.get(e)??X.UNKNOWN}var Z=X,$S={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},eC=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var tC={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function nC(e){return e>=K.DIGIT_0&&e<=K.DIGIT_9}function rC(e){return e>=K.LATIN_CAPITAL_A&&e<=K.LATIN_CAPITAL_Z}function iC(e){return e>=K.LATIN_SMALL_A&&e<=K.LATIN_SMALL_Z}function aC(e){return iC(e)||rC(e)}function oC(e){return aC(e)||nC(e)}function sC(e){return e+32}function cC(e){return e===K.SPACE||e===K.LINE_FEED||e===K.TABULATION||e===K.FORM_FEED}function lC(e){return cC(e)||e===K.SOLIDUS||e===K.GREATER_THAN_SIGN}function uC(e){return e===K.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:ES(e)?q.surrogateCharacterReference:AS(e)?q.noncharacterCharacterReference:kS(e)||e===K.CARRIAGE_RETURN?q.controlCharacterReference:null}var dC=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new MS(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new qS(FS,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=uC(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:NS.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:NS.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:NS.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:NS.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(PS(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=QS(e.tagName),e.type===NS.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(q.endTagWithAttributes),e.selfClosing&&this._err(q.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case NS.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case NS.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case NS.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:NS.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=cC(e)?NS.WHITESPACE_CHARACTER:e===K.NULL?NS.NULL_CHARACTER:NS.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(NS.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?KS.Attribute:KS.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitCodePoint(e);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case K.AMPERSAND:this._startCharacterReference();break;case K.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(aC(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case K.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case K.QUESTION_MARK:this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(aC(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.GREATER_THAN_SIGN:this._err(q.missingEndTagName),this.state=Q.DATA;break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.tagName+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(rC(e)?sC(e):e)}}_stateRcdataLessThanSign(e){e===K.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){aC(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case K.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case K.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===K.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){aC(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case K.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case K.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){aC(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===K.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:aC(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){aC(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(TS.SCRIPT,!1)&&lC(this.preprocessor.peek(TS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<TS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===K.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(TS.SCRIPT,!1)&&lC(this.preprocessor.peek(TS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<TS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(rC(e)?sC(e):e)}}_stateAfterAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case K.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case K.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.AMPERSAND:this._startCharacterReference();break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:case K.EQUALS_SIGN:case K.GRAVE_ACCENT:this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case K.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(TS.DASH_DASH,!0)?(this._createCommentToken(TS.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(TS.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(TS.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(TS.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(TS.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case K.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.GREATER_THAN_SIGN:this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case K.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case K.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case K.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==K.GREATER_THAN_SIGN&&e!==K.EOF&&this._err(q.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case K.HYPHEN_MINUS:t.data+=`-`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case K.GREATER_THAN_SIGN:this._err(q.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(rC(e))this._createDoctypeToken(String.fromCharCode(sC(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.NULL:this._err(q.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.NULL:this._err(q.unexpectedNullCharacter),t.name+=`�`;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(rC(e)?sC(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(TS.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(TS.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.NULL:this._err(q.unexpectedNullCharacter);break;case K.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case K.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case K.EOF:this._err(q.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===K.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA;break;case K.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(K.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&oC(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){oC(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===K.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},fC=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),pC=new Set([...fC,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),mC=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),hC=new Set([...mC,X.OL,X.UL]),gC=new Set([...mC,X.BUTTON]),_C=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),vC=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),yC=new Set([X.TR,X.TEMPLATE,X.HTML]),bC=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),xC=new Set([X.TABLE,X.TEMPLATE,X.HTML]),SC=new Set([X.TD,X.TH]),CC=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==J.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(eC,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(SC,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(xC,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(bC,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(yC,J.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===X.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===X.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(vC.has(r))return!1;break;case J.MATHML:if(_C.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,mC)}hasInListItemScope(e){return this.hasInDynamicScope(e,hC)}hasInButtonScope(e){return this.hasInDynamicScope(e,gC)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(eC.has(t))return!0;if(mC.has(t))return!1;break;case J.SVG:if(vC.has(t))return!1;break;case J.MATHML:if(_C.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&fC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&pC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&pC.has(this.currentTagId);)this.pop()}},wC=3,TC;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(TC||={});var EC={type:TC.Marker},DC=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===TC.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<wC)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<wC)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=wC&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(EC)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:TC.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:TC.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(EC);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===TC.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===TC.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===TC.Element&&t.element===e)}},OC={createDocument(){return{nodeName:`#document`,mode:XS.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};OC.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(OC.isTextNode(n)){n.value+=t;return}}OC.appendChild(e,OC.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&OC.isTextNode(r)?r.value+=t:OC.insertBefore(e,OC.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},kC=`html`,AC=`about:legacy-compat`,jC=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,MC=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),NC=[...MC,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],PC=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),FC=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],IC=[...FC,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function LC(e,t){return t.some(t=>e.startsWith(t))}function RC(e){return e.name===kC&&e.publicId===null&&(e.systemId===null||e.systemId===AC)}function zC(e){if(e.name!==kC)return XS.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===jC)return XS.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),PC.has(n))return XS.QUIRKS;let e=t===null?NC:MC;if(LC(n,e))return XS.QUIRKS;if(e=t===null?FC:IC,LC(n,e))return XS.LIMITED_QUIRKS}return XS.NO_QUIRKS}var BC={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},VC=`definitionurl`,HC=`definitionURL`,UC=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),WC=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),GC=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),KC=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function qC(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===YS.COLOR||e===YS.SIZE||e===YS.FACE)||KC.has(t)}function JC(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===VC){e.attrs[t].name=HC;break}}function YC(e){for(let t=0;t<e.attrs.length;t++){let n=UC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function XC(e){for(let t=0;t<e.attrs.length;t++){let n=WC.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function ZC(e){let t=GC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=QS(e.tagName))}function QC(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function $C(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===YS.ENCODING){let t=n[e].value.toLowerCase();return t===BC.TEXT_HTML||t===BC.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function ew(e,t,n,r){return(!r||r===J.HTML)&&$C(e,t,n)||(!r||r===J.MATHML)&&QC(e,t)}var tw=`hidden`,nw=8,rw=3,$;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})($||={});var iw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},aw=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),ow={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:OC,onParseError:null},sw=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ow,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new dC(this.options,this),this.activeFormattingElements=new DC(this.treeAdapter),this.fragmentContextID=n?QS(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new CC(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...ow,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??iw,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=tC.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=tC.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=tC.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=tC.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=tC.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===NS.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case NS.CHARACTER:this.onCharacter(e);break;case NS.NULL_CHARACTER:this.onNullCharacter(e);break;case NS.COMMENT:this.onComment(e);break;case NS.DOCTYPE:this.onDoctype(e);break;case NS.START_TAG:this._processStartTag(e);break;case NS.END_TAG:this.onEndTag(e);break;case NS.EOF:this.onEof(e);break;case NS.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return ew(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===TC.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return aw.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return $S[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TE(this,e);return}switch(this.insertionMode){case $.INITIAL:bw(this,e);break;case $.BEFORE_HTML:Cw(this,e);break;case $.BEFORE_HEAD:Ew(this,e);break;case $.IN_HEAD:Aw(this,e);break;case $.IN_HEAD_NO_SCRIPT:Nw(this,e);break;case $.AFTER_HEAD:Iw(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:zw(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:PT(this,e);break;case $.IN_TABLE_TEXT:qT(this,e);break;case $.IN_COLUMN_GROUP:eE(this,e);break;case $.AFTER_BODY:gE(this,e);break;case $.AFTER_AFTER_BODY:SE(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){wE(this,e);return}switch(this.insertionMode){case $.INITIAL:bw(this,e);break;case $.BEFORE_HTML:Cw(this,e);break;case $.BEFORE_HEAD:Ew(this,e);break;case $.IN_HEAD:Aw(this,e);break;case $.IN_HEAD_NO_SCRIPT:Nw(this,e);break;case $.AFTER_HEAD:Iw(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:PT(this,e);break;case $.IN_COLUMN_GROUP:eE(this,e);break;case $.AFTER_BODY:gE(this,e);break;case $.AFTER_AFTER_BODY:SE(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){hw(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:hw(this,e);break;case $.IN_TABLE_TEXT:JT(this,e);break;case $.AFTER_BODY:gw(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:_w(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:yw(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,q.misplacedDoctype);break;case $.IN_TABLE_TEXT:JT(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?DE(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:bw(this,e);break;case $.BEFORE_HTML:xw(this,e);break;case $.BEFORE_HEAD:ww(this,e);break;case $.IN_HEAD:Dw(this,e);break;case $.IN_HEAD_NO_SCRIPT:jw(this,e);break;case $.AFTER_HEAD:Pw(this,e);break;case $.IN_BODY:vT(this,e);break;case $.IN_TABLE:UT(this,e);break;case $.IN_TABLE_TEXT:JT(this,e);break;case $.IN_CAPTION:XT(this,e);break;case $.IN_COLUMN_GROUP:QT(this,e);break;case $.IN_TABLE_BODY:tE(this,e);break;case $.IN_ROW:rE(this,e);break;case $.IN_CELL:aE(this,e);break;case $.IN_SELECT:sE(this,e);break;case $.IN_SELECT_IN_TABLE:lE(this,e);break;case $.IN_TEMPLATE:dE(this,e);break;case $.AFTER_BODY:mE(this,e);break;case $.IN_FRAMESET:_E(this,e);break;case $.AFTER_FRAMESET:yE(this,e);break;case $.AFTER_AFTER_BODY:xE(this,e);break;case $.AFTER_AFTER_FRAMESET:CE(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?OE(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:bw(this,e);break;case $.BEFORE_HTML:Sw(this,e);break;case $.BEFORE_HEAD:Tw(this,e);break;case $.IN_HEAD:Ow(this,e);break;case $.IN_HEAD_NO_SCRIPT:Mw(this,e);break;case $.AFTER_HEAD:Fw(this,e);break;case $.IN_BODY:AT(this,e);break;case $.TEXT:MT(this,e);break;case $.IN_TABLE:WT(this,e);break;case $.IN_TABLE_TEXT:JT(this,e);break;case $.IN_CAPTION:ZT(this,e);break;case $.IN_COLUMN_GROUP:$T(this,e);break;case $.IN_TABLE_BODY:nE(this,e);break;case $.IN_ROW:iE(this,e);break;case $.IN_CELL:oE(this,e);break;case $.IN_SELECT:cE(this,e);break;case $.IN_SELECT_IN_TABLE:uE(this,e);break;case $.IN_TEMPLATE:fE(this,e);break;case $.AFTER_BODY:hE(this,e);break;case $.IN_FRAMESET:vE(this,e);break;case $.AFTER_FRAMESET:bE(this,e);break;case $.AFTER_AFTER_BODY:SE(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:bw(this,e);break;case $.BEFORE_HTML:Cw(this,e);break;case $.BEFORE_HEAD:Ew(this,e);break;case $.IN_HEAD:Aw(this,e);break;case $.IN_HEAD_NO_SCRIPT:Nw(this,e);break;case $.AFTER_HEAD:Iw(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:jT(this,e);break;case $.TEXT:NT(this,e);break;case $.IN_TABLE_TEXT:JT(this,e);break;case $.IN_TEMPLATE:pE(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:vw(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===K.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:Rw(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:PT(this,e);break;case $.IN_TABLE_TEXT:KT(this,e);break;default:}}};function cw(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):kT(e,t),n}function lw(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function uw(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=rw;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=dw(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function dw(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function fw(e,t,n){let r=QS(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pw(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function mw(e,t){for(let n=0;n<nw;n++){let n=cw(e,t);if(!n)break;let r=lw(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=uw(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&fw(e,a,i),pw(e,r,n)}}function hw(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gw(e,t){e._appendCommentNode(t,e.openElements.items[0])}function _w(e,t){e._appendCommentNode(t,e.document)}function vw(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function yw(e,t){e._setDocumentType(t);let n=t.forceQuirks?XS.QUIRKS:zC(t);RC(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function bw(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,XS.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function xw(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):Cw(e,t)}function Sw(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&Cw(e,t)}function Cw(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function ww(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:Ew(e,t)}}function Tw(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?Ew(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function Ew(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function Dw(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,tC.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,tC.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,tC.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,tC.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:Aw(e,t)}}function Ow(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:Aw(e,t);break;case X.TEMPLATE:kw(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function kw(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function Aw(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function jw(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:Dw(e,t);break;case X.NOSCRIPT:e._err(t,q.nestedNoscriptInHead);break;default:Nw(e,t)}}function Mw(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:Nw(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Nw(e,t){let n=t.type===NS.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function Pw(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),Dw(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:Iw(e,t)}}function Fw(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:Iw(e,t);break;case X.TEMPLATE:kw(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Iw(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,Lw(e,t)}function Lw(e,t){switch(t.type){case NS.CHARACTER:zw(e,t);break;case NS.WHITESPACE_CHARACTER:Rw(e,t);break;case NS.COMMENT:hw(e,t);break;case NS.START_TAG:vT(e,t);break;case NS.END_TAG:AT(e,t);break;case NS.EOF:jT(e,t);break;default:}}function Rw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bw(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Vw(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Hw(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function Uw(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Ww(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&eC.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function Gw(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Kw(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function qw(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Jw(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=tC.PLAINTEXT}function Yw(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function Xw(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(mw(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Zw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Qw(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(mw(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $w(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function eT(e,t){e.treeAdapter.getDocumentMode(e.document)!==XS.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function tT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nT(e){let t=PS(e,YS.TYPE);return t!=null&&t.toLowerCase()===tw}function rT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),nT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function iT(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function aT(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oT(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,tT(e,t)}function sT(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=tC.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function cT(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,tC.RAWTEXT)}function lT(e,t){e.framesetOk=!1,e._switchToTextParsing(t,tC.RAWTEXT)}function uT(e,t){e._switchToTextParsing(t,tC.RAWTEXT)}function dT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function fT(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function pT(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function mT(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function hT(e,t){e._reconstructActiveFormattingElements(),JC(t),XC(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function gT(e,t){e._reconstructActiveFormattingElements(),YC(t),XC(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function _T(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function vT(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:Zw(e,t);break;case X.A:Xw(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:Ww(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:Uw(e,t);break;case X.LI:case X.DD:case X.DT:qw(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:tT(e,t);break;case X.HR:aT(e,t);break;case X.RB:case X.RTC:pT(e,t);break;case X.RT:case X.RP:mT(e,t);break;case X.PRE:case X.LISTING:Gw(e,t);break;case X.XMP:cT(e,t);break;case X.SVG:gT(e,t);break;case X.HTML:Bw(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:Dw(e,t);break;case X.BODY:Vw(e,t);break;case X.FORM:Kw(e,t);break;case X.NOBR:Qw(e,t);break;case X.MATH:hT(e,t);break;case X.TABLE:eT(e,t);break;case X.INPUT:rT(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:iT(e,t);break;case X.IMAGE:oT(e,t);break;case X.BUTTON:Yw(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:$w(e,t);break;case X.IFRAME:lT(e,t);break;case X.SELECT:dT(e,t);break;case X.OPTION:case X.OPTGROUP:fT(e,t);break;case X.NOEMBED:case X.NOFRAMES:uT(e,t);break;case X.FRAMESET:Hw(e,t);break;case X.TEXTAREA:sT(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?uT(e,t):_T(e,t);break;case X.PLAINTEXT:Jw(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:_T(e,t)}}function yT(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function bT(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,hE(e,t))}function xT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ST(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function CT(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function wT(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function TT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ET(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function DT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function OT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function kT(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==X.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function AT(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:mw(e,t);break;case X.P:CT(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:xT(e,t);break;case X.LI:wT(e);break;case X.DD:case X.DT:TT(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:ET(e);break;case X.BR:OT(e);break;case X.BODY:yT(e,t);break;case X.HTML:bT(e,t);break;case X.FORM:ST(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:DT(e,t);break;case X.TEMPLATE:kw(e,t);break;default:kT(e,t)}}function jT(e,t){e.tmplInsertionModeStack.length>0?pE(e,t):vw(e,t)}function MT(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function NT(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function PT(e,t){if(e.openElements.currentTagId!==void 0&&aw.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case NS.CHARACTER:qT(e,t);break;case NS.WHITESPACE_CHARACTER:KT(e,t);break}else GT(e,t)}function FT(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function IT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function LT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,QT(e,t)}function RT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function zT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,tE(e,t)}function BT(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VT(e,t){nT(t)?e._appendElement(t,J.HTML):GT(e,t),t.ackSelfClosing=!0}function HT(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function UT(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:zT(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:Dw(e,t);break;case X.COL:LT(e,t);break;case X.FORM:HT(e,t);break;case X.TABLE:BT(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:RT(e,t);break;case X.INPUT:VT(e,t);break;case X.CAPTION:FT(e,t);break;case X.COLGROUP:IT(e,t);break;default:GT(e,t)}}function WT(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:kw(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:GT(e,t)}}function GT(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Lw(e,t),e.fosterParentingEnabled=n}function KT(e,t){e.pendingCharacterTokens.push(t)}function qT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function JT(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)GT(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var YT=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function XT(e,t){let n=t.tagID;YT.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,UT(e,t)):vT(e,t)}function ZT(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&WT(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:AT(e,t)}}function QT(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:Dw(e,t);break;default:eE(e,t)}}function $T(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:kw(e,t);break;case X.COL:break;default:eE(e,t)}}function eE(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function tE(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,rE(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,UT(e,t));break;default:UT(e,t)}}function nE(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,WT(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:WT(e,t)}}function rE(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,tE(e,t));break;default:UT(e,t)}}function iE(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,nE(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,nE(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:WT(e,t)}}function aE(e,t){let n=t.tagID;YT.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),rE(e,t)):vT(e,t)}function oE(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),iE(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:AT(e,t)}}function sE(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:Dw(e,t);break;default:}}function cE(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:kw(e,t);break;default:}}function lE(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):sE(e,t)}function uE(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):cE(e,t)}function dE(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:Dw(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,UT(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,QT(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,tE(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,rE(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,vT(e,t)}}function fE(e,t){t.tagID===X.TEMPLATE&&kw(e,t)}function pE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):vw(e,t)}function mE(e,t){t.tagID===X.HTML?vT(e,t):gE(e,t)}function hE(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else gE(e,t)}function gE(e,t){e.insertionMode=$.IN_BODY,Lw(e,t)}function _E(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:Dw(e,t);break;default:}}function vE(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function yE(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.NOFRAMES:Dw(e,t);break;default:}}function bE(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function xE(e,t){t.tagID===X.HTML?vT(e,t):SE(e,t)}function SE(e,t){e.insertionMode=$.IN_BODY,Lw(e,t)}function CE(e,t){switch(t.tagID){case X.HTML:vT(e,t);break;case X.NOFRAMES:Dw(e,t);break;default:}}function wE(e,t){t.chars=`�`,e._insertCharacters(t)}function TE(e,t){e._insertCharacters(t),e.framesetOk=!1}function EE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function DE(e,t){if(qC(t))EE(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?JC(t):r===J.SVG&&(ZC(t),YC(t)),XC(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function OE(e,t){if(t.tagID===X.P||t.tagID===X.BR){EE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var kE=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,AE=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),jE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ME(e,t){let n=KE(e),r=lS(`type`,{handlers:{root:PE,element:FE,text:IE,comment:zE,doctype:LE,raw:BE},unknown:VE}),i={parser:n?new sw(jE):sw.getFragmentParser(void 0,jE),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),HE(i,Gh());let a=eS(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&Pb(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function NE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function PE(e,t){NE(e.children,t)}function FE(e,t){WE(e,t),NE(e.children,t),GE(e,t)}function IE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:NS.CHARACTER,chars:e.value,location:qE(e)};HE(t,Gh(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function LE(e,t){let n={type:NS.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:qE(e)};HE(t,Gh(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function RE(e,t){t.stitches=!0;let n=JE(e);`children`in e&&`children`in n&&(n.children=ME({type:`root`,children:e.children},t.options).children),zE({type:`comment`,value:{stitch:n}},t)}function zE(e,t){let n=e.value,r={type:NS.COMMENT,data:n,location:qE(e)};HE(t,Gh(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function BE(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,UE(t,Gh(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kE,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function VE(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))RE(n,t);else{let e=``;throw AE.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function HE(e,t){UE(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=tC.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function UE(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function WE(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===tC.PLAINTEXT)return;HE(t,Gh(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Zx.html;i===Zx.html&&n===`svg`&&(i=Zx.svg);let a=pS({...e,children:[]},{space:i===Zx.svg?`svg`:`html`}),o={type:NS.START_TAG,tagName:n,tagID:QS(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:qE(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function GE(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&CS.includes(n)||t.parser.tokenizer.state===tC.PLAINTEXT)return;HE(t,Wh(e));let r={type:NS.END_TAG,tagName:n,tagID:QS(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:qE(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===tC.RCDATA||t.parser.tokenizer.state===tC.RAWTEXT||t.parser.tokenizer.state===tC.SCRIPT_DATA)&&(t.parser.tokenizer.state=tC.DATA)}function KE(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function qE(e){let t=Gh(e)||{line:void 0,column:void 0,offset:void 0},n=Wh(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function JE(e){return`children`in e?yb({...e,children:[]}):yb(e)}function YE(e){return function(t,n){return ME(t,{...e,file:n})}}var XE=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],ZE={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...XE,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...XE],h2:[[`className`,`sr-only`]],img:[...XE,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...XE,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...XE],table:[...XE],ul:[...XE,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},QE={}.hasOwnProperty;function $E(e,t){let n={type:`root`,children:[]},r=eD({schema:t?{...ZE,...t}:ZE,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function eD(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return tD(e,n);case`doctype`:return nD(e,n);case`element`:return rD(e,n);case`root`:return iD(e,n);case`text`:return aD(e,n);default:}}}function tD(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return fD(r,t),r}}function nD(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return fD(e,t),e}}function rD(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=oD(e,t.children),i=sD(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&QE.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return fD(o,t),o}function iD(e,t){let n={type:`root`,children:oD(e,t.children)};return fD(n,t),n}function aD(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return fD(n,t),n}function oD(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=eD(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function sD(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&QE.call(r,n)?r[n]:void 0,o=r&&QE.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(QE.call(s,l)){let t=s[l],n=cD(e,pD(a,l),l,t);n??=cD(e,pD(o,l),l,t),n!=null&&(c[l]=n)}if(i&&QE.call(i,n)){let e=i[n];for(l in e)QE.call(e,l)&&!QE.call(c,l)&&(c[l]=e[l])}return c}function cD(e,t,n,r){return t?Array.isArray(r)?lD(e,t,n,r):uD(e,t,n,r):void 0}function lD(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=uD(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function uD(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&dD(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function dD(e,t,n){let r=e.schema.protocols&&QE.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function fD(e,t){let n=qh(t);t.data&&(e.data=yb(t.data)),n&&(e.position=n)}function pD(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function mD(e){return function(t){return $E(t,e)}}function hD(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function gD(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function _D(e,t,n){let r=Cb((n||{}).ignore||[]),i=vD(t),a=-1;for(;++a<i.length;)Mb(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function vD(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([yD(e[0]),bD(e[1])])}return t}function yD(e){return typeof e==`string`?new RegExp(gD(e),`g`):e}function bD(e){return typeof e==`function`?e:function(){return e}}var xD=`phrasing`,SD=[`autolink`,`link`,`image`,`label`];function CD(){return{transforms:[jD],enter:{literalAutolink:TD,literalAutolinkEmail:ED,literalAutolinkHttp:ED,literalAutolinkWww:ED},exit:{literalAutolink:AD,literalAutolinkEmail:kD,literalAutolinkHttp:DD,literalAutolinkWww:OD}}}function wD(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:xD,notInConstruct:SD},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:xD,notInConstruct:SD},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:xD,notInConstruct:SD}]}}function TD(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function ED(e){this.config.enter.autolinkProtocol.call(this,e)}function DD(e){this.config.exit.autolinkProtocol.call(this,e)}function OD(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function kD(e){this.config.exit.autolinkEmail.call(this,e)}function AD(e){this.exit(e)}function jD(e){_D(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MD],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ND]],{ignore:[`link`,`linkReference`]})}function MD(e,t,n,r,i){let a=``;if(!ID(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!PD(n)))return!1;let o=FD(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ND(e,t,n,r){return!ID(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function PD(e){let 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 FD(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=hD(e,`(`),a=hD(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ID(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||t_(n)||e_(n))&&(!t||n!==47)}KD.peek=GD;function LD(){this.buffer()}function RD(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function zD(){this.buffer()}function BD(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function VD(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HD(e){this.exit(e)}function UD(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wg(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WD(e){this.exit(e)}function GD(){return`[`}function KD(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function qD(){return{enter:{gfmFootnoteCallString:LD,gfmFootnoteCall:RD,gfmFootnoteDefinitionLabelString:zD,gfmFootnoteDefinition:BD},exit:{gfmFootnoteCallString:VD,gfmFootnoteCall:HD,gfmFootnoteDefinitionLabelString:UD,gfmFootnoteDefinition:WD}}}function JD(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:KD},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
32
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?XD:YD))),s(),o}}function YD(e,t,n){return t===0?e:XD(e,t,n)}function XD(e,t,n){return(n?``:` `)+e}var ZD=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];nO.peek=rO;function QD(){return{canContainEols:[`delete`],enter:{strikethrough:eO},exit:{strikethrough:tO}}}function $D(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:ZD}],handlers:{delete:nO}}}function eO(e){this.enter({type:`delete`,children:[]},e)}function tO(e){this.exit(e)}function nO(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function rO(){return`~`}function iO(e){return e.length}function aO(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||iO,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=oO(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=sO(r[d]);else{let e=sO(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
33
|
+
`)}function oO(e){return e==null?``:String(e)}function sO(e){let 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 cO(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),lO);return i(),o}function lO(e,t,n){return`>`+(n?``:` `)+e}function uO(e,t){return dO(e,t.inConstruct,!0)&&!dO(e,t.notInConstruct,!1)}function dO(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function fO(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
34
|
+
`&&uO(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
35
|
+
`}function pO(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function mO(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 hO(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function gO(e,t,n,r){let i=hO(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(mO(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,_O);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(pO(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
36
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
37
|
+
`),a&&(u+=s.move(a+`
|
|
38
|
+
`)),u+=s.move(c),l(),u}function _O(e,t,n){return(n?``:` `)+e}function vO(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yO(e,t,n,r){let i=vO(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
39
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function bO(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xO(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function SO(e,t,n){let r=d_(e),i=d_(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}CO.peek=wO;function CO(e,t,n,r){let i=bO(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=SO(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=xO(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SO(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+xO(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function wO(e,t,n){return n.options.emphasis||`*`}function TO(e,t){let n=!1;return Pb(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ag(e)&&(t.options.setext||n))}function EO(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(TO(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
40
|
+
`,after:`
|
|
41
|
+
`});return r(),t(),o+`
|
|
42
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
43
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
44
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=xO(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}DO.peek=OO;function DO(e){return e.value||``}function OO(){return`<`}kO.peek=AO;function kO(e,t,n,r){let i=vO(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function AO(){return`!`}jO.peek=MO;function jO(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function MO(){return`!`}NO.peek=PO;function NO(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function PO(){return"`"}function FO(e,t){let n=Ag(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))}IO.peek=LO;function IO(e,t,n,r){let i=vO(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(FO(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function LO(e,t,n){return FO(e,n)?`<`:`[`}RO.peek=zO;function RO(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function zO(){return`[`}function BO(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VO(e){let t=BO(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function HO(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function UO(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function WO(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?HO(n):BO(n),s=e.ordered?o===`.`?`)`:`.`:VO(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),UO(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function GO(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function KO(e,t,n,r){let i=GO(n),a=n.bulletCurrent||BO(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 o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function qO(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var JO=Cb([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function YO(e,t,n,r){return(e.children.some(function(e){return JO(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function XO(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ZO.peek=QO;function ZO(e,t,n,r){let i=XO(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=SO(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=xO(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SO(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+xO(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function QO(e,t,n){return n.options.strong||`*`}function $O(e,t,n,r){return n.safe(e.value,r)}function ek(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function tk(e,t,n){let r=(UO(n)+(n.options.ruleSpaces?` `:``)).repeat(ek(n));return n.options.ruleSpaces?r.slice(0,-1):r}var nk={blockquote:cO,break:fO,code:gO,definition:yO,emphasis:CO,hardBreak:fO,heading:EO,html:DO,image:kO,imageReference:jO,inlineCode:NO,link:IO,linkReference:RO,list:WO,listItem:KO,paragraph:qO,root:YO,strong:ZO,text:$O,thematicBreak:tk};function rk(){return{enter:{table:ik,tableData:ck,tableHeader:ck,tableRow:ok},exit:{codeText:lk,table:ak,tableData:sk,tableHeader:sk,tableRow:sk}}}function ik(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function ak(e){this.exit(e),this.data.inTable=void 0}function ok(e){this.enter({type:`tableRow`,children:[]},e)}function sk(e){this.exit(e)}function ck(e){this.enter({type:`tableCell`,children:[]},e)}function lk(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uk));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function uk(e,t){return t===`|`?t:e}function dk(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
45
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
46
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return aO(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=nk.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function fk(){return{exit:{taskListCheckValueChecked:mk,taskListCheckValueUnchecked:mk,paragraph:hk}}}function pk(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:gk}}}function mk(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function hk(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function gk(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=nk.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function _k(){return[CD(),qD(),QD(),rk(),fk()]}function vk(e){return{extensions:[wD(),JD(e),$D(),dk(e),pk()]}}var yk={tokenize:Nk,partial:!0},bk={tokenize:Pk,partial:!0},xk={tokenize:Fk,partial:!0},Sk={tokenize:Ik,partial:!0},Ck={tokenize:Lk,partial:!0},wk={name:`wwwAutolink`,tokenize:jk,previous:Rk},Tk={name:`protocolAutolink`,tokenize:Mk,previous:zk},Ek={name:`emailAutolink`,tokenize:Ak,previous:Bk},Dk={};function Ok(){return{text:Dk}}for(var kk=48;kk<123;)Dk[kk]=Ek,kk++,kk===58?kk=65:kk===91&&(kk=97);Dk[43]=Ek,Dk[45]=Ek,Dk[46]=Ek,Dk[95]=Ek,Dk[72]=[Ek,Tk],Dk[104]=[Ek,Tk],Dk[87]=[Ek,wk],Dk[119]=[Ek,wk];function Ak(e,t,n){let r=this,i,a;return o;function o(t){return!Vk(t)||!Bk.call(r,r.previous)||Hk(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Vk(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Ck,u,l)(t):t===45||t===95||Kg(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Gg(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function jk(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Rk.call(r,r.previous)||Hk(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(yk,e.attempt(bk,e.attempt(xk,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Mk(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&zk.call(r,r.previous)&&!Hk(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Gg(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Jg(t)||Qg(t)||t_(t)||e_(t)?n(t):e.attempt(bk,e.attempt(xk,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Nk(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Pk(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Sk,c,s)(t):t===null||Qg(t)||t_(t)||t!==45&&e_(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Fk(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Sk,t,a)(o):o===null||Qg(o)||t_(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Ik(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Qg(o)||t_(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Qg(e)||t_(e)?t(e):r(e)}function a(e){return Gg(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Gg(t)?(e.consume(t),o):n(t)}}function Lk(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Kg(e)?n(e):t(e)}}function Rk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qg(e)}function zk(e){return!Gg(e)}function Bk(e){return!(e===47||Vk(e))}function Vk(e){return e===43||e===45||e===46||e===95||Kg(e)}function Hk(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Uk={tokenize:Zk,partial:!0};function Wk(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Jk,continuation:{tokenize:Yk},exit:Xk}},text:{91:{name:`gfmFootnoteCall`,tokenize:qk},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Gk,resolveTo:Kk}}}}function Gk(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Wg(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Kk(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function qk(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Qg(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Wg(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Qg(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Jk(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Qg(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Wg(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Qg(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),i_(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Yk(e,t,n){return e.check(y_,t,e.attempt(Uk,t,n))}function Xk(e){e.exit(`gfmFootnoteDefinition`)}function Zk(e,t,n){let r=this;return i_(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Qk(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Lg(o,o.length,0,f_(s,e.slice(r+1,n),t)),Lg(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Lg(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=d_(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=d_(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var $k=class{constructor(){this.map=[]}add(e,t,n){eA(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function eA(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function tA(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function nA(){return{flow:{null:{name:`table`,tokenize:rA,resolveAll:iA}}}}function rA(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):G(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$g(t)?i_(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Qg(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$g(t)?i_(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $g(t)?i_(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||G(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $g(t)?i_(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||G(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||G(n)?(e.exit(`tableRow`),t(n)):$g(n)?i_(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Qg(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function iA(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new $k;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(oA(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=aA(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=aA(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=aA(f,t,o,i,n,d)):(o[0]=o[1],d=aA(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&oA(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=tA(t.events,n))}return e}function aA(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},sA(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=sA(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=sA(t.events,n[2]),a=sA(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},sA(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function oA(e,t,n,r,i){let a=[],o=sA(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function sA(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var cA={name:`tasklistCheck`,tokenize:uA};function lA(){return{text:{91:cA}}}function uA(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Qg(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return G(r)?t(r):$g(r)?e.check({tokenize:dA},t,n)(r):n(r)}}function dA(e,t,n){return i_(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function fA(e){return Bg([Ok(),Wk(),Qk(e),nA(),lA()])}var pA={};function mA(e){let t=this,n=e||pA,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(fA(n)),a.push(_k()),o.push(vk(n))}function hA(e){try{return decodeURIComponent(e)}catch{return e}}function gA(e){if(!/^[0-9]+$/u.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)&&t>0?t:null}function _A(e){let t=e.match(/#L([0-9]+)$/u);if(t){let n=gA(t[1]??``);return n===null?null:{lineNumber:n,path:e.slice(0,t.index)}}let n=e.indexOf(`#`);if(n!==-1){let t=e.slice(n+1);return t.length===0||t.includes(`/`)||t.includes(`#`)?null:{lineNumber:null,path:e.slice(0,n)}}let r=e.match(/:([0-9]+):[0-9]+$/u);if(r){let t=gA(r[1]??``);return t===null?null:{lineNumber:t,path:e.slice(0,r.index)}}let i=e.match(/:([0-9]+)$/u);if(i){let t=gA(i[1]??``);return t===null?null:{lineNumber:t,path:e.slice(0,i.index)}}return{lineNumber:null,path:e}}function vA(e){let t=e.split(`/`),n=t[t.length-1]??``;return n.startsWith(`.`)||n.includes(`.`)}function yA(e){for(let t of e){let e=t.codePointAt(0);if(e!==void 0&&e<32)return!0}return!1}function bA({path:e,requireLikelyFileBasename:t}){return e.startsWith(`/`)&&!e.startsWith(`//`)&&e!==`/`&&!e.endsWith(`/`)&&!e.includes(`
|
|
47
|
+
`)&&!e.includes(`\r`)&&!e.includes(`?`)&&!e.includes(`#`)&&!yA(e)&&(!t||vA(e))}function xA(e,t){if(e.length===0||e.trim()!==e||!e.startsWith(`/`)||e.startsWith(`//`))return null;let n=_A(hA(e));return!n||!bA({path:n.path,requireLikelyFileBasename:t})?null:n}function SA(e){if(!e)return null;if(e.startsWith(`file://`))try{let t=new URL(e);return t.host.length>0||t.search.length>0?null:xA(t.pathname+t.hash,!1)}catch{return null}return xA(e,!0)}function CA(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function wA(e){if(!e)return null;let t;if(e.startsWith(`file://`))try{t=new URL(e).hash}catch{return null}else{let n=e.indexOf(`#`);if(n===-1)return null;t=e.slice(n)}let n=hA(t);return n.length<=1||/^#L[0-9]+$/u.test(n)||n.includes(`
|
|
48
|
+
`)||n.includes(`\r`)?null:n.slice(1)}function TA(e){return encodeURIComponent(e)}function EA(e,t){if(!e||!e.path.startsWith(`/`))return t;let n=e.lineNumber===null?wA(t):null;return`file://${CA(e.path)}${e.lineNumber===null?n===null?``:`#${TA(n)}`:`#L${e.lineNumber}`}`}var DA=/^( {0,3})(`{3,}|~{3,})/u,OA=/^(?: {4}|\t)/u,kA=`](`,AA=/[ \t]/u,jA=/^[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]$/u;function MA(e){let t=[],n=0;for(;n<e.length;){let r=e.indexOf(`
|
|
49
|
+
`,n);if(r===-1)return t.push(e.slice(n)),t;t.push(e.slice(n,r+1)),n=r+1}return t}function NA(e){let t=DA.exec(e)?.[2];if(!t)return null;let n=t[0];return n!=="`"&&n!==`~`?null:{character:n,length:t.length}}function PA(e,t){let n=e.replace(/\r?\n$/u,``),r=/^( {0,3})/u.exec(n)?.[0].length??0,i=0;for(let e=r;e<n.length&&n[e]===t.character;e+=1)i+=1;return i<t.length?!1:n.slice(r+i).trim().length===0}function FA({character:e,startIndex:t,value:n}){let r=0;for(let i=t;i<n.length&&n[i]===e;i+=1)r+=1;return r}function IA(e,t){let n=FA({character:"`",startIndex:t,value:e}),r="`".repeat(n),i=e.indexOf(r,t+n);return i===-1?null:i+n}function LA(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;--r)n+=1;return n%2==1}function RA(e,t){for(let n=t-1;n>=0;--n)if(e[n]===`[`)return!LA(e,n);return!1}function zA(e,t){let n=0;for(let r=t;r<e.length;r+=1){let t=e[r];if(t===`
|
|
50
|
+
`||t===`\r`)return null;if(t===`\\`&&r+1<e.length){r+=1;continue}if(t===`(`){n+=1;continue}if(t===`)`){if(n===0)return r;--n}}return null}function BA(e){return e===` `||e===` `}function VA(e){let t=e.length;for(;t>0&&BA(e[t-1]);)--t;return t}function HA(e){let t=0;for(;t<e.length&&BA(e[t]);)t+=1;return t}function UA(e,t){if(e.length<2||e[0]!==t)return!1;for(let n=1;n<e.length;n+=1){let r=e[n];if(r===`\\`&&n+1<e.length){n+=1;continue}if(r===t)return n===e.length-1}return!1}function WA(e){if(e.length<2||e[0]!==`(`)return!1;let t=1;for(let n=1;n<e.length;n+=1){let r=e[n];if(r===`\\`&&n+1<e.length){n+=1;continue}if(r===`(`){t+=1;continue}if(r===`)`&&(--t,t===0))return n===e.length-1}return!1}function GA(e){let t=e[0];return t===`"`||t===`'`?UA(e,t):WA(e)}function KA(e){for(let t=0;t<e.length-1;t+=1){if(!BA(e[t]))continue;let n=e[t+1];if(!(n!==`"`&&n!==`'`)&&!UA(e.slice(t+1),n))return!0}return!1}function qA(e){let t=null;for(let n=0;n<e.length-1;n+=1){if(!BA(e[n]))continue;let r=e[n+1];r!==`"`&&r!==`'`&&r!==`(`||GA(e.slice(n+1))&&(t=n)}return t}function JA(e){let t=HA(e),n=VA(e),r=e.slice(0,t),i=e.slice(n),a=e.slice(t,n),o=qA(a);return o===null?KA(a)?null:{destination:a,leadingWhitespace:r,suffix:i}:{destination:a.slice(0,o),leadingWhitespace:r,suffix:`${a.slice(o)}${i}`}}function YA(e){let t=``,n=0;for(let r=0;r<e.length-1;r+=1){if(e[r]!==`\\`)continue;let i=e[r+1]??``;jA.test(i)&&(t+=e.slice(n,r),t+=i,n=r+2,r+=1)}return n===0?e:t+e.slice(n)}function XA(e){return e.startsWith(`/`)||e.startsWith(`file://`)}function ZA(e,t){if(e.slice(t,t+2)!==kA||!RA(e,t))return null;let n=t+2;if(e[n]===`<`)return null;let r=zA(e,n);if(r===null)return null;let i=JA(e.slice(n,r));if(i===null)return null;let a=YA(i.destination);return!AA.test(a)||a.includes(`<`)||a.includes(`>`)||!XA(a)||!SA(a)?null:{endIndex:r,replacement:`${i.leadingWhitespace}<${a}>${i.suffix}`}}function QA(e){let t=``,n=0,r=0;for(;r<e.length;){if(e[r]==="`"){r=IA(e,r)??r+1;continue}let i=ZA(e,r);if(!i){r+=1;continue}t+=e.slice(n,r+2),t+=i.replacement,n=i.endIndex,r=i.endIndex}return n===0?e:t+e.slice(n)}function $A(e){if(!e.includes(kA))return e;let t=MA(e),n=null,r=``;for(let e of t){if(n){r+=e,PA(e,n)&&(n=null);continue}let t=NA(e);if(t){r+=e,n=t;continue}if(OA.test(e)){r+=e;continue}r+=QA(e)}return r}var ej=`max(100%, min(1100px, 100cqw - 2rem))`,tj=`--md-content-w`,nj=/^\(\s*prefers-color-scheme\s*:\s*(dark|light)\s*\)$/iu,rj=[YE,mD],ij=(e,t)=>t===`href`&&SA(e)?e:Ix(e);function aj({children:e,href:t,onOpenLocalFileLink:n,...i}){let a=n?SA(t):null,o=EA(a,t),s=e=>{!a||!n||n(a)&&e.preventDefault()};return(0,V.jsxs)(`a`,{...i,href:o,className:R(`break-words underline underline-offset-2`,a&&`inline-flex items-baseline gap-1`),target:`_blank`,rel:`noopener noreferrer`,onClick:s,children:[e,a?(0,V.jsx)(r,{name:`ExternalLink`,"aria-hidden":!0,className:`size-3 shrink-0 self-center text-subtle-foreground`}):null]})}function oj({className:e,children:t,...n}){let r=String(t??``).replace(/\n$/,``),i=/language-(\w+)/u.exec(e||``)?.[1];return i!==void 0||r.includes(`
|
|
51
|
+
`)?(0,V.jsxs)(`div`,{className:`my-2 overflow-hidden rounded-md border border-border bg-surface-recessed`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between pl-3 pr-1.5 pt-1.5`,children:[(0,V.jsx)(`span`,{className:`font-mono text-xs uppercase text-muted-foreground`,children:i??``}),(0,V.jsx)(Hr,{text:r,label:`Copy code`})]}),(0,V.jsx)(`pre`,{className:`overflow-x-auto px-3 pb-3 pt-1`,children:(0,V.jsx)(`code`,{className:R(`font-mono text-xs`,i?`language-${i}`:``),...n,children:r})})]}):(0,V.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-xs`,...n,children:t})}function sj({children:e}){return(0,V.jsx)(V.Fragment,{children:e})}function cj({children:e}){return(0,V.jsx)(`h1`,{className:`mb-2 mt-4 text-lg font-semibold text-foreground first:mt-0`,children:e})}function lj({children:e}){return(0,V.jsx)(`h2`,{className:`mb-2 mt-4 text-base font-semibold text-foreground first:mt-0`,children:e})}function uj({children:e}){return(0,V.jsx)(`h3`,{className:`mb-2 mt-3 text-sm font-semibold text-foreground first:mt-0`,children:e})}function dj({children:e}){return(0,V.jsx)(`h4`,{className:`mb-1 mt-3 text-sm font-medium text-foreground first:mt-0`,children:e})}function fj({children:e}){return(0,V.jsx)(`h5`,{className:`mb-1 mt-2 text-sm font-semibold uppercase text-muted-foreground first:mt-0`,children:e})}function pj({children:e}){return(0,V.jsx)(`h6`,{className:`mb-1 mt-2 text-xs font-semibold uppercase text-muted-foreground first:mt-0`,children:e})}function mj({children:e,className:t,node:n,...r}){return(0,V.jsx)(`p`,{...r,className:`mb-2 text-foreground last:mb-0`,children:e})}function hj({children:e}){return(0,V.jsx)(`ul`,{className:`mb-2 list-disc pl-5 text-foreground`,children:e})}function gj({children:e}){return(0,V.jsx)(`ol`,{className:`mb-2 list-decimal pl-5 text-foreground`,children:e})}function _j({children:e}){return(0,V.jsx)(`li`,{className:`mb-1 text-foreground`,children:e})}function vj({children:e}){return(0,V.jsx)(`blockquote`,{className:`my-2 border-l-2 border-border pl-3 italic text-muted-foreground`,children:e})}function yj({children:e}){return(0,V.jsx)(`div`,{className:`my-2 flex justify-center`,style:{width:ej,marginInline:`calc((100% - ${ej}) / 2)`},children:(0,V.jsx)(`div`,{className:`w-max max-w-full overflow-x-auto`,style:{minWidth:`min(var(${tj}), 100%)`},children:(0,V.jsx)(`table`,{className:`border border-border`,children:e})})})}function bj({children:e}){return(0,V.jsx)(`thead`,{className:`bg-surface-recessed`,children:e})}function xj({children:e}){return(0,V.jsx)(`th`,{className:`border border-border px-2 py-1 text-left font-medium`,children:e})}function Sj({children:e}){return(0,V.jsx)(`td`,{className:`border border-border px-2 py-1`,children:e})}function Cj({alt:e,imageAttributes:t,setExpandedImageUrl:n,src:r}){let i=typeof r==`string`?r:``;return i?(0,V.jsx)(`img`,{...t,src:i,alt:typeof e==`string`?e:`Image`,className:`my-2 max-h-96 max-w-full cursor-zoom-in object-contain`,loading:`lazy`,onClick:()=>n(i)}):null}function wj(e){return(0,V.jsx)(`hr`,{className:`my-4 border-t border-border`})}function Tj(e){let t=nj.exec(e)?.[1];return t===`dark`||t===`light`?t:null}function Ej({media:e,preferredTheme:t}){if(!e)return e;let n=Tj(e);return n?n===t?`all`:`not all`:e}function Dj({onOpenLocalFileLink:e,preferredTheme:t,setExpandedImageUrl:n}){function r(t){return(0,V.jsx)(aj,{...t,onOpenLocalFileLink:e})}function i({src:e,alt:t,className:r,node:i,...a}){return Cj({alt:t,imageAttributes:a,setExpandedImageUrl:n,src:e})}function a({media:e,node:n,...r}){return(0,V.jsx)(`source`,{...r,media:Ej({media:e,preferredTheme:t})})}return{a:r,blockquote:vj,code:oj,h1:cj,h2:lj,h3:uj,h4:dj,h5:fj,h6:pj,hr:wj,img:i,li:_j,ol:gj,p:mj,pre:sj,source:a,table:yj,td:Sj,th:xj,thead:bj,ul:hj}}function Oj({element:e,width:t}){t<=0||e.style.setProperty(tj,`${t}px`)}function kj(){let e=(0,B.useRef)(null);return(0,B.useLayoutEffect)(()=>{let t=e.current;if(!t||(Oj({element:t,width:t.getBoundingClientRect().width}),typeof ResizeObserver>`u`))return;let n=new ResizeObserver(e=>{let n=e[0];n&&Oj({element:t,width:n.contentRect.width})});return n.observe(t),()=>n.disconnect()},[]),e}function Aj({allowHtml:e=!1,className:t,content:n,expandedImageAlt:r=`Expanded image`,imageLightboxTitle:i=`Expanded image preview`,normalizeLocalFileLinks:a=!1,onOpenLocalFileLink:o,urlTransform:s}){let c=Yr(),l=kj(),[u,d]=(0,B.useState)(null),f=(0,B.useMemo)(()=>a?$A(n):n,[n,a]),p=(0,B.useMemo)(()=>Dj({onOpenLocalFileLink:o,preferredTheme:c,setExpandedImageUrl:d}),[o,c]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{ref:l,className:R(`max-w-none break-words text-sm leading-relaxed text-foreground`,t),children:(0,V.jsx)(Mx,{rehypePlugins:e?rj:void 0,remarkPlugins:[mA],components:p,urlTransform:o?ij:s,children:f})}),(0,V.jsx)(Jm,{imageSrc:u,imageAlt:r,title:i,onClose:()=>d(null)})]})}var jj=(0,B.memo)(Aj);jj.displayName=`MarkdownPreview`;function Mj(e,t){if(e===`user`||!t.startsWith(`[bb`))return 0;let n=t.indexOf(`]`);if(n===-1)return 0;let r=n+1;for(;r<t.length&&/\s/.test(t.charAt(r));)r+=1;return r}var Nj=/^[a-zA-Z]:[\\/]/u,Pj=/^[a-zA-Z][a-zA-Z0-9+.-]*:/u;function Fj({path:e}){return e.startsWith(`/`)||Nj.test(e)}function Ij({path:e}){return e.length>0&&!e.startsWith(`\\`)&&!Fj({path:e})&&!Pj.test(e)}function Lj({path:e,projectId:t}){return!t||!Ij({path:e})?null:Ze(t,e)}function Rj(e){return e.kind===`steer`?e.status===`pending`?`steer pending`:`steer`:null}function zj({attachments:e,projectId:t,resolveUserAttachmentImageSrc:n}){if(!e)return{filePaths:[],imageItems:[]};let r=[...e.imageUrls.map(e=>({alt:Yf(e),src:e})),...e.localImagePaths.map(e=>({alt:Yf(e),src:n?n(e,t):e}))];return{filePaths:e.localFilePaths,imageItems:r}}function Bj({align:e=`start`,filePaths:t,imageItems:n,onOpenLocalFileLink:r,projectId:i}){let[a,o]=(0,B.useState)(null),s=a===null?null:n[a]??null,c=n.length>1,l=e===`end`?`justify-end`:`justify-start`;return(0,B.useEffect)(()=>{a===null||a<n.length||o(null)},[a,n.length]),t.length===0&&n.length===0?null:(0,V.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[n.length>0?(0,V.jsx)(`div`,{className:R(`flex flex-wrap gap-2`,l),children:n.map((t,n)=>(0,V.jsx)(`button`,{type:`button`,className:R(`cursor-zoom-in overflow-hidden rounded-md border`,e===`end`?`border-surface-selected-border bg-surface-raised`:`border-border bg-surface-recessed`),onClick:()=>o(n),title:t.alt,children:(0,V.jsx)(`img`,{src:t.src,alt:t.alt,className:R(`object-cover`,e===`end`?`h-20 max-w-36`:`h-16 w-24`),loading:`lazy`})},`${t.src}-${n}`))}):null,t.length>0?(0,V.jsx)(`div`,{className:R(`flex flex-wrap gap-1.5`,l),children:t.map(t=>{let n=R(`inline-flex max-w-full items-center rounded-full border px-2 py-0.5 text-xs text-muted-foreground`,e===`end`?`border-surface-selected-border bg-surface-raised`:`border-border bg-surface-recessed`),a=(0,V.jsx)(`span`,{className:`truncate`,children:Yf(t)}),o=Lj({path:t,projectId:i});return o?(0,V.jsx)(`a`,{href:o,target:`_blank`,rel:`noreferrer`,className:R(n,`hover:bg-state-hover`),children:a},t):!r||!Fj({path:t})?(0,V.jsx)(`span`,{className:R(n,`cursor-default`),children:a},t):(0,V.jsx)(`button`,{type:`button`,className:R(n,`hover:bg-state-hover`),onClick:()=>{r({lineNumber:null,path:t})},children:a},t)})}):null,(0,V.jsx)(Jm,{title:`Attached image preview`,imageSrc:s?.src??null,imageAlt:s?.alt??`Attached image`,hasMultipleImages:c,onPrevious:()=>{o(a===null||n.length<=1?a:qm({currentIndex:a,direction:`previous`,itemCount:n.length}))},onNext:()=>{o(a===null||n.length<=1?a:qm({currentIndex:a,direction:`next`,itemCount:n.length}))},onClose:()=>o(null)})]})}var Vj=15,Hj=4096;function Uj(e){return e.split(/\r\n|\r|\n/u)}function Wj(e,t,n){let[r,i]=(0,B.useState)(!1);return(0,B.useLayoutEffect)(()=>{if(!t){i(!1);return}let n=e.current;if(!n)return;let r=()=>{i(n.scrollHeight>n.clientHeight+1)};if(r(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(r);return a.observe(n),()=>a.disconnect()},[e,t,n]),r}function Gj({text:e,mutePrefixLength:t}){let n=typeof t==`number`&&t>0&&t<e.length,r=n?e.slice(0,t):null,i=n?e.slice(t):e,[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(null),c=i.length>Hj,l=c?i.slice(0,Hj):i,u=Uj(l),d=u.length>Vj,f=a||!d?l:u.slice(0,Vj).join(`
|
|
52
|
+
`),p=Wj(s,!a,f),m=a||d||p;return(0,V.jsxs)(V.Fragment,{children:[r===null?null:(0,V.jsx)(`span`,{className:`line-clamp-1 text-muted-foreground`,title:r.trimEnd(),children:r}),(0,V.jsxs)(`p`,{ref:s,className:R(`whitespace-pre-wrap break-words`,!a&&`line-clamp-[15]`),children:[f,a&&c?(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:` [truncated]`}):null]}),m?(0,V.jsx)(`div`,{className:`mt-1 flex justify-end`,children:(0,V.jsx)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`text-xs font-medium text-muted-foreground hover:text-foreground`,"aria-expanded":a,children:a?`Show less`:`Show more`})}):null]})}function Kj({attachmentItems:e,initiator:t,onOpenLocalFileLink:n,projectId:i,text:a,turnRequest:o}){let s=(0,B.useMemo)(()=>Mj(t,a),[t,a]),c=a.trim(),l=Rj(o),u=o.kind===`steer`&&o.status===`pending`,d=l!==null||c.length>0;return(0,V.jsx)(`div`,{className:`w-full`,children:(0,V.jsxs)(`div`,{className:`ml-auto w-fit max-w-[80%]`,children:[(0,V.jsxs)(`div`,{className:`rounded-md bg-surface-selected p-2 text-sm leading-relaxed text-foreground`,children:[c?(0,V.jsx)(Gj,{text:a,mutePrefixLength:s||void 0}):(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:`Sent attachments`}),(0,V.jsx)(Bj,{align:`end`,filePaths:e.filePaths,imageItems:e.imageItems,onOpenLocalFileLink:n,projectId:i})]}),d?(0,V.jsxs)(`div`,{className:`mt-1 flex items-center justify-end gap-2`,children:[l?(0,V.jsxs)(`span`,{className:R(`shrink-0 whitespace-nowrap text-xs leading-none text-muted-foreground`,u&&`animate-shine`),children:[(0,V.jsx)(r,{name:`CornerDownRight`,className:`mr-1 inline-block size-3 align-middle`}),l]}):null,c?(0,V.jsx)(Hr,{text:a,label:`Copy message`}):null]}):null]})})}function qj({attachmentItems:e,onOpenLocalFileLink:t,projectId:n,text:r}){return(0,V.jsxs)(`div`,{className:`group w-full px-2 text-sm leading-relaxed`,children:[(0,V.jsx)(jj,{content:r,normalizeLocalFileLinks:t!==void 0,onOpenLocalFileLink:t}),(0,V.jsx)(Bj,{filePaths:e.filePaths,imageItems:e.imageItems,onOpenLocalFileLink:t,projectId:n})]})}function Jj(e){let{attachments:t,onOpenLocalFileLink:n,projectId:r,resolveUserAttachmentImageSrc:i,text:a}=e,o=(0,B.useMemo)(()=>zj({attachments:t,projectId:r,resolveUserAttachmentImageSrc:i}),[t,r,i]);return e.role===`user`?(0,V.jsx)(Kj,{attachmentItems:o,attachments:t,initiator:e.initiator,onOpenLocalFileLink:n,projectId:r,resolveUserAttachmentImageSrc:i,text:a,turnRequest:e.turnRequest}):(0,V.jsx)(qj,{attachmentItems:o,attachments:t,onOpenLocalFileLink:n,projectId:r,resolveUserAttachmentImageSrc:i,text:a,turnRequest:e.turnRequest})}var Yj=Fr(0),Xj=200,Zj=typeof window>`u`?B.useEffect:B.useLayoutEffect,Qj=`text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground`,$j=`text-foreground`,eM=`text-muted-foreground`,tM=`inline-flex max-w-full items-center gap-1 overflow-hidden py-0.5 text-left text-sm`;function nM({className:e}){return(0,V.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,className:R(`lucide lucide-chevron-right`,e),"aria-hidden":`true`,children:(0,V.jsx)(`path`,{d:`M6 4l4 4-4 4`})})}function rM(e){return e?$j:Qj}function iM({summaryContent:e,toneClassName:t,summaryClassName:n,className:r,isExpanded:i=!1,onToggle:a}){let o=R(tM,t,a?`group/toggle`:null,r),s=n??`min-w-0 truncate`;return a?(0,V.jsxs)(`button`,{type:`button`,"aria-expanded":i,onClick:a,className:o,children:[(0,V.jsx)(`span`,{className:s,children:e}),(0,V.jsx)(nM,{className:R(`pointer-events-none size-4 shrink-0 origin-center transition-[opacity,rotate] duration-200 ease-out`,i?`rotate-90`:`opacity-0 group-hover/toggle:opacity-100 group-focus-visible/toggle:opacity-100 max-md:pointer-coarse:opacity-100`)})]}):(0,V.jsx)(`div`,{className:o,children:(0,V.jsx)(`span`,{className:s,children:e})})}function aM({isExpanded:e,summaryContent:t,headerToneClass:n,onToggle:r,headerButtonClassName:i,summaryContentClassName:a,children:o,renderBody:s,className:c,headerClassName:l,bodyClassName:u,contentClassName:d}){let f=R(`px-2 py-1`,l,i),[p,m]=(0,B.useState)(!1),h=(0,B.useRef)(null),g=(0,B.useMemo)(()=>e?s?s():o:null,[o,e,s]),_=Cr(Yj),v=(0,B.useRef)(!0);Zj(()=>{if(v.current){v.current=!1;return}_(e=>e+1);let e=!1,t=()=>{e||(e=!0,_(e=>Math.max(0,e-1)))},n=window.setTimeout(t,Xj);return()=>{window.clearTimeout(n),t()}},[e,_]),Zj(()=>{e&&(h.current=g)},[g,e]),Zj(()=>{if(e||h.current===null)return;m(!0);let t=setTimeout(()=>{h.current=null,m(!1)},Xj);return()=>clearTimeout(t)},[e]);let y=e?g:p?h.current:null;return(0,V.jsxs)(`div`,{className:R(`rounded-md text-muted-foreground`,c),children:[(0,V.jsx)(iM,{isExpanded:e,onToggle:r,toneClassName:n,className:f,summaryClassName:a??`min-w-0 truncate`,summaryContent:t}),(0,V.jsx)(`div`,{"aria-hidden":!e,className:R(`grid transition-[grid-template-rows,opacity] duration-200 ease-out`,e?`pointer-events-auto grid-rows-[1fr] opacity-100`:`pointer-events-none grid-rows-[0fr] opacity-0`,u),children:(0,V.jsx)(`div`,{className:`overflow-hidden`,children:(0,V.jsx)(`div`,{className:R(`px-2 pb-1 pt-0 transition-[transform,opacity] duration-200 ease-out will-change-transform`,e?`translate-y-0 opacity-100`:`-translate-y-1 opacity-0`,d),children:y})})})]})}var oM=`min-w-0 max-w-full`,sM=`timeline-row-header flex w-full max-w-full justify-start py-0 leading-5`;function cM(e){switch(e){case`default`:return`px-2`;case`flush`:return`px-0`}}function lM(e){return R(cM(e),sM)}function uM({children:e,className:t,horizontalPadding:n=`default`}){return(0,V.jsx)(`div`,{className:R(`w-full rounded-md text-muted-foreground`,t),children:(0,V.jsx)(iM,{toneClassName:eM,className:lM(n),summaryClassName:oM,summaryContent:e})})}function dM({insertions:e,deletions:t,hideZero:n=!1,className:r}){let i=!n||e>0,a=!n||t>0;return(0,V.jsxs)(`span`,{className:R(`whitespace-nowrap`,r),children:[i?(0,V.jsxs)(`span`,{className:`text-diff-added`,children:[`+`,lp(e)]}):null,i&&a?` `:null,a?(0,V.jsxs)(`span`,{className:`text-diff-removed`,children:[`-`,lp(t)]}):null]})}function fM(e){switch(e){case`default`:return`font-semibold text-foreground`;case`summary`:return`text-subtle-foreground`;default:return H(e)}}function pM(e){switch(e){case`default`:return`text-muted-foreground`;case`summary`:return`text-subtle-foreground`;default:return H(e)}}function mM(e){switch(e){case`default`:return`text-muted-foreground`;case`summary`:return`text-subtle-foreground`;default:return H(e)}}function hM(e,t,n,r){let i=R(e.truncate?`min-w-0 truncate whitespace-pre`:`shrink-0 whitespace-pre`,e.em?fM(n):pM(n),e.shimmer?`animate-shine`:null);if(r.linkHref!==null){let n=r.linkHref;return(0,V.jsx)(`a`,{href:n,className:R(i,`cursor-pointer text-left underline underline-offset-2 focus-visible:outline-none`),onClick:e=>{e.stopPropagation()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},children:e.text},t)}if(e.em&&r.onClick){let n=r.onClick;return(0,V.jsx)(`span`,{role:`link`,tabIndex:0,className:R(i,`cursor-pointer text-left underline-offset-2 hover:underline focus-visible:underline focus-visible:outline-none`),onClick:e=>{e.stopPropagation(),n()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),n())},children:e.text},t)}return(0,V.jsx)(`span`,{className:i,children:e.text},t)}function gM({startedAt:e}){let[t,n]=(0,B.useState)(()=>Date.now()-e);return(0,B.useEffect)(()=>{n(Date.now()-e);let t=window.setInterval(()=>{n(Date.now()-e)},1e3);return()=>window.clearInterval(t)},[e]),t<=1e3?null:(0,V.jsx)(V.Fragment,{children:op(t)})}function _M(e,t,n){let r=R(`shrink-0 whitespace-pre`,mM(n));switch(e.kind){case`duration`:return(0,V.jsx)(`span`,{className:e.em?R(`shrink-0 whitespace-pre`,fM(n)):r,children:e.completedAt===null?(0,V.jsx)(gM,{startedAt:e.startedAt}):op(e.completedAt-e.startedAt)},t);case`status`:case`summary-status`:{let r=lm(e);return r.length===0?null:(0,V.jsx)(`span`,{className:R(`shrink-0 whitespace-pre`,e.kind===`status`&&e.emphasis?`text-destructive`:mM(n)),children:r},t)}case`diff-stats`:if(n===`summary`){let n=up({added:e.added,removed:e.removed,hideZero:!0});return n.length===0?null:(0,V.jsx)(`span`,{className:r,children:n},t)}return(0,V.jsx)(dM,{insertions:e.added,deletions:e.removed,hideZero:!0,className:`shrink-0`},t);default:return H(e)}}function vM({title:e,className:t,onTitleAction:n,resolveSegmentLinkHref:r}){let i=e.action&&n?n(e.action):null;return(0,V.jsxs)(`span`,{className:R(`inline-flex min-w-0 max-w-full items-baseline gap-1 overflow-hidden whitespace-nowrap text-sm leading-5`,t),title:e.plain,children:[e.segments.map((t,n)=>{let a=t.link&&r?r(t.link):null;return(0,V.jsxs)(B.Fragment,{children:[n>0?` `:null,hM(t,n,e.tone,{onClick:i,linkHref:a})]},`segment-${n}`)}),e.decorations.map((t,n)=>(0,V.jsxs)(B.Fragment,{children:[` `,_M(t,n,e.tone)]},`decoration-${n}`))]})}function yM(e,t){return e.tone===`summary`?`text-subtle-foreground transition-colors hover:text-muted-foreground focus-visible:text-muted-foreground`:rM(t)}function bM({autoExpanded:e=!1,className:t,horizontalPadding:n=`default`,onBeforeExpand:r,onTitleAction:i,renderBody:a,resolveSegmentLinkHref:o,title:s}){let[c,l]=(0,B.useState)(null),u=c??e,d=cM(n);return(0,V.jsx)(aM,{isExpanded:u,onToggle:(0,B.useCallback)(()=>{u||r?.(),l(!u)},[u,r]),headerToneClass:yM(s,u),summaryContent:(0,V.jsx)(vM,{title:s,onTitleAction:i,resolveSegmentLinkHref:o}),summaryContentClassName:oM,className:R(`w-full`,t),headerClassName:lM(n),contentClassName:R(d,`pb-1 pt-0.5`),renderBody:a})}var xM=(0,B.memo)(bM);function SM({children:e,className:t,tone:n=`default`}){return(0,V.jsx)(`pre`,{className:R(`whitespace-pre-wrap break-words rounded-md px-2 py-1.5 font-mono text-xs leading-tight`,n===`danger`?`text-destructive`:`border border-border bg-surface-raised text-muted-foreground`,t),children:e})}var CM=N({AElig:()=>`Æ`,AMP:()=>`&`,Aacute:()=>`Á`,Abreve:()=>`Ă`,Acirc:()=>`Â`,Acy:()=>`А`,Afr:()=>TM,Agrave:()=>`À`,Alpha:()=>`Α`,Amacr:()=>`Ā`,And:()=>`⩓`,Aogon:()=>`Ą`,Aopf:()=>DM,ApplyFunction:()=>``,Aring:()=>`Å`,Ascr:()=>kM,Assign:()=>`≔`,Atilde:()=>`Ã`,Auml:()=>`Ä`,Backslash:()=>`∖`,Barv:()=>`⫧`,Barwed:()=>`⌆`,Bcy:()=>`Б`,Because:()=>`∵`,Bernoullis:()=>`ℬ`,Beta:()=>`Β`,Bfr:()=>jM,Bopf:()=>FM,Breve:()=>`˘`,Bscr:()=>`ℬ`,Bumpeq:()=>`≎`,CHcy:()=>`Ч`,COPY:()=>`©`,Cacute:()=>`Ć`,Cap:()=>`⋒`,CapitalDifferentialD:()=>`ⅅ`,Cayleys:()=>`ℭ`,Ccaron:()=>`Č`,Ccedil:()=>`Ç`,Ccirc:()=>`Ĉ`,Cconint:()=>`∰`,Cdot:()=>`Ċ`,Cedilla:()=>`¸`,CenterDot:()=>`·`,Cfr:()=>`ℭ`,Chi:()=>`Χ`,CircleDot:()=>`⊙`,CircleMinus:()=>`⊖`,CirclePlus:()=>`⊕`,CircleTimes:()=>`⊗`,ClockwiseContourIntegral:()=>`∲`,CloseCurlyDoubleQuote:()=>`”`,CloseCurlyQuote:()=>`’`,Colon:()=>`∷`,Colone:()=>`⩴`,Congruent:()=>`≡`,Conint:()=>`∯`,ContourIntegral:()=>`∮`,Copf:()=>`ℂ`,Coproduct:()=>`∐`,CounterClockwiseContourIntegral:()=>`∳`,Cross:()=>`⨯`,Cscr:()=>VM,Cup:()=>`⋓`,CupCap:()=>`≍`,DD:()=>`ⅅ`,DDotrahd:()=>`⤑`,DJcy:()=>`Ђ`,DScy:()=>`Ѕ`,DZcy:()=>`Џ`,Dagger:()=>`‡`,Darr:()=>`↡`,Dashv:()=>`⫤`,Dcaron:()=>`Ď`,Dcy:()=>`Д`,Del:()=>`∇`,Delta:()=>`Δ`,Dfr:()=>WM,DiacriticalAcute:()=>`´`,DiacriticalDot:()=>`˙`,DiacriticalDoubleAcute:()=>`˝`,DiacriticalGrave:()=>"`",DiacriticalTilde:()=>`˜`,Diamond:()=>`⋄`,DifferentialD:()=>`ⅆ`,Dopf:()=>KM,Dot:()=>`¨`,DotDot:()=>`⃜`,DotEqual:()=>`≐`,DoubleContourIntegral:()=>`∯`,DoubleDot:()=>`¨`,DoubleDownArrow:()=>`⇓`,DoubleLeftArrow:()=>`⇐`,DoubleLeftRightArrow:()=>`⇔`,DoubleLeftTee:()=>`⫤`,DoubleLongLeftArrow:()=>`⟸`,DoubleLongLeftRightArrow:()=>`⟺`,DoubleLongRightArrow:()=>`⟹`,DoubleRightArrow:()=>`⇒`,DoubleRightTee:()=>`⊨`,DoubleUpArrow:()=>`⇑`,DoubleUpDownArrow:()=>`⇕`,DoubleVerticalBar:()=>`∥`,DownArrow:()=>`↓`,DownArrowBar:()=>`⤓`,DownArrowUpArrow:()=>`⇵`,DownBreve:()=>`̑`,DownLeftRightVector:()=>`⥐`,DownLeftTeeVector:()=>`⥞`,DownLeftVector:()=>`↽`,DownLeftVectorBar:()=>`⥖`,DownRightTeeVector:()=>`⥟`,DownRightVector:()=>`⇁`,DownRightVectorBar:()=>`⥗`,DownTee:()=>`⊤`,DownTeeArrow:()=>`↧`,Downarrow:()=>`⇓`,Dscr:()=>JM,Dstrok:()=>`Đ`,ENG:()=>`Ŋ`,ETH:()=>`Ð`,Eacute:()=>`É`,Ecaron:()=>`Ě`,Ecirc:()=>`Ê`,Ecy:()=>`Э`,Edot:()=>`Ė`,Efr:()=>XM,Egrave:()=>`È`,Element:()=>`∈`,Emacr:()=>`Ē`,EmptySmallSquare:()=>`◻`,EmptyVerySmallSquare:()=>`▫`,Eogon:()=>`Ę`,Eopf:()=>QM,Epsilon:()=>`Ε`,Equal:()=>`⩵`,EqualTilde:()=>`≂`,Equilibrium:()=>`⇌`,Escr:()=>`ℰ`,Esim:()=>`⩳`,Eta:()=>`Η`,Euml:()=>`Ë`,Exists:()=>`∃`,ExponentialE:()=>`ⅇ`,Fcy:()=>`Ф`,Ffr:()=>eN,FilledSmallSquare:()=>`◼`,FilledVerySmallSquare:()=>`▪`,Fopf:()=>nN,ForAll:()=>`∀`,Fouriertrf:()=>`ℱ`,Fscr:()=>`ℱ`,GJcy:()=>`Ѓ`,GT:()=>`>`,Gamma:()=>`Γ`,Gammad:()=>`Ϝ`,Gbreve:()=>`Ğ`,Gcedil:()=>`Ģ`,Gcirc:()=>`Ĝ`,Gcy:()=>`Г`,Gdot:()=>`Ġ`,Gfr:()=>oN,Gg:()=>`⋙`,Gopf:()=>cN,GreaterEqual:()=>`≥`,GreaterEqualLess:()=>`⋛`,GreaterFullEqual:()=>`≧`,GreaterGreater:()=>`⪢`,GreaterLess:()=>`≷`,GreaterSlantEqual:()=>`⩾`,GreaterTilde:()=>`≳`,Gscr:()=>uN,Gt:()=>`≫`,HARDcy:()=>`Ъ`,Hacek:()=>`ˇ`,Hat:()=>`^`,Hcirc:()=>`Ĥ`,Hfr:()=>`ℌ`,HilbertSpace:()=>`ℋ`,Hopf:()=>`ℍ`,HorizontalLine:()=>`─`,Hscr:()=>`ℋ`,Hstrok:()=>`Ħ`,HumpDownHump:()=>`≎`,HumpEqual:()=>`≏`,IEcy:()=>`Е`,IJlig:()=>`IJ`,IOcy:()=>`Ё`,Iacute:()=>`Í`,Icirc:()=>`Î`,Icy:()=>`И`,Idot:()=>`İ`,Ifr:()=>`ℑ`,Igrave:()=>`Ì`,Im:()=>`ℑ`,Imacr:()=>`Ī`,ImaginaryI:()=>`ⅈ`,Implies:()=>`⇒`,Int:()=>`∬`,Integral:()=>`∫`,Intersection:()=>`⋂`,InvisibleComma:()=>``,InvisibleTimes:()=>``,Iogon:()=>`Į`,Iopf:()=>_N,Iota:()=>`Ι`,Iscr:()=>`ℐ`,Itilde:()=>`Ĩ`,Iukcy:()=>`І`,Iuml:()=>`Ï`,Jcirc:()=>`Ĵ`,Jcy:()=>`Й`,Jfr:()=>bN,Jopf:()=>SN,Jscr:()=>wN,Jsercy:()=>`Ј`,Jukcy:()=>`Є`,KHcy:()=>`Х`,KJcy:()=>`Ќ`,Kappa:()=>`Κ`,Kcedil:()=>`Ķ`,Kcy:()=>`К`,Kfr:()=>EN,Kopf:()=>ON,Kscr:()=>AN,LJcy:()=>`Љ`,LT:()=>`<`,Lacute:()=>`Ĺ`,Lambda:()=>`Λ`,Lang:()=>`⟪`,Laplacetrf:()=>`ℒ`,Larr:()=>`↞`,Lcaron:()=>`Ľ`,Lcedil:()=>`Ļ`,Lcy:()=>`Л`,LeftAngleBracket:()=>`⟨`,LeftArrow:()=>`←`,LeftArrowBar:()=>`⇤`,LeftArrowRightArrow:()=>`⇆`,LeftCeiling:()=>`⌈`,LeftDoubleBracket:()=>`⟦`,LeftDownTeeVector:()=>`⥡`,LeftDownVector:()=>`⇃`,LeftDownVectorBar:()=>`⥙`,LeftFloor:()=>`⌊`,LeftRightArrow:()=>`↔`,LeftRightVector:()=>`⥎`,LeftTee:()=>`⊣`,LeftTeeArrow:()=>`↤`,LeftTeeVector:()=>`⥚`,LeftTriangle:()=>`⊲`,LeftTriangleBar:()=>`⧏`,LeftTriangleEqual:()=>`⊴`,LeftUpDownVector:()=>`⥑`,LeftUpTeeVector:()=>`⥠`,LeftUpVector:()=>`↿`,LeftUpVectorBar:()=>`⥘`,LeftVector:()=>`↼`,LeftVectorBar:()=>`⥒`,Leftarrow:()=>`⇐`,Leftrightarrow:()=>`⇔`,LessEqualGreater:()=>`⋚`,LessFullEqual:()=>`≦`,LessGreater:()=>`≶`,LessLess:()=>`⪡`,LessSlantEqual:()=>`⩽`,LessTilde:()=>`≲`,Lfr:()=>PN,Ll:()=>`⋘`,Lleftarrow:()=>`⇚`,Lmidot:()=>`Ŀ`,LongLeftArrow:()=>`⟵`,LongLeftRightArrow:()=>`⟷`,LongRightArrow:()=>`⟶`,Longleftarrow:()=>`⟸`,Longleftrightarrow:()=>`⟺`,Longrightarrow:()=>`⟹`,Lopf:()=>IN,LowerLeftArrow:()=>`↙`,LowerRightArrow:()=>`↘`,Lscr:()=>`ℒ`,Lsh:()=>`↰`,Lstrok:()=>`Ł`,Lt:()=>`≪`,Map:()=>`⤅`,Mcy:()=>`М`,MediumSpace:()=>` `,Mellintrf:()=>`ℳ`,Mfr:()=>VN,MinusPlus:()=>`∓`,Mopf:()=>UN,Mscr:()=>`ℳ`,Mu:()=>`Μ`,NJcy:()=>`Њ`,Nacute:()=>`Ń`,Ncaron:()=>`Ň`,Ncedil:()=>`Ņ`,Ncy:()=>`Н`,NegativeMediumSpace:()=>``,NegativeThickSpace:()=>``,NegativeThinSpace:()=>``,NegativeVeryThinSpace:()=>``,NestedGreaterGreater:()=>`≫`,NestedLessLess:()=>`≪`,NewLine:()=>`
|
|
53
|
+
`,Nfr:()=>eP,NoBreak:()=>``,NonBreakingSpace:()=>`\xA0`,Nopf:()=>`ℕ`,Not:()=>`⫬`,NotCongruent:()=>`≢`,NotCupCap:()=>`≭`,NotDoubleVerticalBar:()=>`∦`,NotElement:()=>`∉`,NotEqual:()=>`≠`,NotEqualTilde:()=>_P,NotExists:()=>`∄`,NotGreater:()=>`≯`,NotGreaterEqual:()=>`≱`,NotGreaterFullEqual:()=>vP,NotGreaterGreater:()=>yP,NotGreaterLess:()=>`≹`,NotGreaterSlantEqual:()=>bP,NotGreaterTilde:()=>`≵`,NotHumpDownHump:()=>xP,NotHumpEqual:()=>SP,NotLeftTriangle:()=>`⋪`,NotLeftTriangleBar:()=>TP,NotLeftTriangleEqual:()=>`⋬`,NotLess:()=>`≮`,NotLessEqual:()=>`≰`,NotLessGreater:()=>`≸`,NotLessLess:()=>EP,NotLessSlantEqual:()=>DP,NotLessTilde:()=>`≴`,NotNestedGreaterGreater:()=>OP,NotNestedLessLess:()=>kP,NotPrecedes:()=>`⊀`,NotPrecedesEqual:()=>AP,NotPrecedesSlantEqual:()=>`⋠`,NotReverseElement:()=>`∌`,NotRightTriangle:()=>`⋫`,NotRightTriangleBar:()=>jP,NotRightTriangleEqual:()=>`⋭`,NotSquareSubset:()=>MP,NotSquareSubsetEqual:()=>`⋢`,NotSquareSuperset:()=>NP,NotSquareSupersetEqual:()=>`⋣`,NotSubset:()=>PP,NotSubsetEqual:()=>`⊈`,NotSucceeds:()=>`⊁`,NotSucceedsEqual:()=>FP,NotSucceedsSlantEqual:()=>`⋡`,NotSucceedsTilde:()=>IP,NotSuperset:()=>LP,NotSupersetEqual:()=>`⊉`,NotTilde:()=>`≁`,NotTildeEqual:()=>`≄`,NotTildeFullEqual:()=>`≇`,NotTildeTilde:()=>`≉`,NotVerticalBar:()=>`∤`,Nscr:()=>GP,Ntilde:()=>`Ñ`,Nu:()=>`Ν`,OElig:()=>`Œ`,Oacute:()=>`Ó`,Ocirc:()=>`Ô`,Ocy:()=>`О`,Odblac:()=>`Ő`,Ofr:()=>cF,Ograve:()=>`Ò`,Omacr:()=>`Ō`,Omega:()=>`Ω`,Omicron:()=>`Ο`,Oopf:()=>uF,OpenCurlyDoubleQuote:()=>`“`,OpenCurlyQuote:()=>`‘`,Or:()=>`⩔`,Oscr:()=>fF,Oslash:()=>`Ø`,Otilde:()=>`Õ`,Otimes:()=>`⨷`,Ouml:()=>`Ö`,OverBar:()=>`‾`,OverBrace:()=>`⏞`,OverBracket:()=>`⎴`,OverParenthesis:()=>`⏜`,PartialD:()=>`∂`,Pcy:()=>`П`,Pfr:()=>pF,Phi:()=>`Φ`,Pi:()=>`Π`,PlusMinus:()=>`±`,Poincareplane:()=>`ℌ`,Popf:()=>`ℙ`,Pr:()=>`⪻`,Precedes:()=>`≺`,PrecedesEqual:()=>`⪯`,PrecedesSlantEqual:()=>`≼`,PrecedesTilde:()=>`≾`,Prime:()=>`″`,Product:()=>`∏`,Proportion:()=>`∷`,Proportional:()=>`∝`,Pscr:()=>gF,Psi:()=>`Ψ`,QUOT:()=>`"`,Qfr:()=>vF,Qopf:()=>`ℚ`,Qscr:()=>xF,RBarr:()=>`⤐`,REG:()=>`®`,Racute:()=>`Ŕ`,Rang:()=>`⟫`,Rarr:()=>`↠`,Rarrtl:()=>`⤖`,Rcaron:()=>`Ř`,Rcedil:()=>`Ŗ`,Rcy:()=>`Р`,Re:()=>`ℜ`,ReverseElement:()=>`∋`,ReverseEquilibrium:()=>`⇋`,ReverseUpEquilibrium:()=>`⥯`,Rfr:()=>`ℜ`,Rho:()=>`Ρ`,RightAngleBracket:()=>`⟩`,RightArrow:()=>`→`,RightArrowBar:()=>`⇥`,RightArrowLeftArrow:()=>`⇄`,RightCeiling:()=>`⌉`,RightDoubleBracket:()=>`⟧`,RightDownTeeVector:()=>`⥝`,RightDownVector:()=>`⇂`,RightDownVectorBar:()=>`⥕`,RightFloor:()=>`⌋`,RightTee:()=>`⊢`,RightTeeArrow:()=>`↦`,RightTeeVector:()=>`⥛`,RightTriangle:()=>`⊳`,RightTriangleBar:()=>`⧐`,RightTriangleEqual:()=>`⊵`,RightUpDownVector:()=>`⥏`,RightUpTeeVector:()=>`⥜`,RightUpVector:()=>`↾`,RightUpVectorBar:()=>`⥔`,RightVector:()=>`⇀`,RightVectorBar:()=>`⥓`,Rightarrow:()=>`⇒`,Ropf:()=>`ℝ`,RoundImplies:()=>`⥰`,Rrightarrow:()=>`⇛`,Rscr:()=>`ℛ`,Rsh:()=>`↱`,RuleDelayed:()=>`⧴`,SHCHcy:()=>`Щ`,SHcy:()=>`Ш`,SOFTcy:()=>`Ь`,Sacute:()=>`Ś`,Sc:()=>`⪼`,Scaron:()=>`Š`,Scedil:()=>`Ş`,Scirc:()=>`Ŝ`,Scy:()=>`С`,Sfr:()=>DF,ShortDownArrow:()=>`↓`,ShortLeftArrow:()=>`←`,ShortRightArrow:()=>`→`,ShortUpArrow:()=>`↑`,Sigma:()=>`Σ`,SmallCircle:()=>`∘`,Sopf:()=>AF,Sqrt:()=>`√`,Square:()=>`□`,SquareIntersection:()=>`⊓`,SquareSubset:()=>`⊏`,SquareSubsetEqual:()=>`⊑`,SquareSuperset:()=>`⊐`,SquareSupersetEqual:()=>`⊒`,SquareUnion:()=>`⊔`,Sscr:()=>PF,Star:()=>`⋆`,Sub:()=>`⋐`,Subset:()=>`⋐`,SubsetEqual:()=>`⊆`,Succeeds:()=>`≻`,SucceedsEqual:()=>`⪰`,SucceedsSlantEqual:()=>`≽`,SucceedsTilde:()=>`≿`,SuchThat:()=>`∋`,Sum:()=>`∑`,Sup:()=>`⋑`,Superset:()=>`⊃`,SupersetEqual:()=>`⊇`,Supset:()=>`⋑`,THORN:()=>`Þ`,TRADE:()=>`™`,TSHcy:()=>`Ћ`,TScy:()=>`Ц`,Tab:()=>` `,Tau:()=>`Τ`,Tcaron:()=>`Ť`,Tcedil:()=>`Ţ`,Tcy:()=>`Т`,Tfr:()=>IF,Therefore:()=>`∴`,Theta:()=>`Θ`,ThickSpace:()=>RF,ThinSpace:()=>` `,Tilde:()=>`∼`,TildeEqual:()=>`≃`,TildeFullEqual:()=>`≅`,TildeTilde:()=>`≈`,Topf:()=>zF,TripleDot:()=>`⃛`,Tscr:()=>VF,Tstrok:()=>`Ŧ`,Uacute:()=>`Ú`,Uarr:()=>`↟`,Uarrocir:()=>`⥉`,Ubrcy:()=>`Ў`,Ubreve:()=>`Ŭ`,Ucirc:()=>`Û`,Ucy:()=>`У`,Udblac:()=>`Ű`,Ufr:()=>UF,Ugrave:()=>`Ù`,Umacr:()=>`Ū`,UnderBar:()=>`_`,UnderBrace:()=>`⏟`,UnderBracket:()=>`⎵`,UnderParenthesis:()=>`⏝`,Union:()=>`⋃`,UnionPlus:()=>`⊎`,Uogon:()=>`Ų`,Uopf:()=>GF,UpArrow:()=>`↑`,UpArrowBar:()=>`⤒`,UpArrowDownArrow:()=>`⇅`,UpDownArrow:()=>`↕`,UpEquilibrium:()=>`⥮`,UpTee:()=>`⊥`,UpTeeArrow:()=>`↥`,Uparrow:()=>`⇑`,Updownarrow:()=>`⇕`,UpperLeftArrow:()=>`↖`,UpperRightArrow:()=>`↗`,Upsi:()=>`ϒ`,Upsilon:()=>`Υ`,Uring:()=>`Ů`,Uscr:()=>qF,Utilde:()=>`Ũ`,Uuml:()=>`Ü`,VDash:()=>`⊫`,Vbar:()=>`⫫`,Vcy:()=>`В`,Vdash:()=>`⊩`,Vdashl:()=>`⫦`,Vee:()=>`⋁`,Verbar:()=>`‖`,Vert:()=>`‖`,VerticalBar:()=>`∣`,VerticalLine:()=>`|`,VerticalSeparator:()=>`❘`,VerticalTilde:()=>`≀`,VeryThinSpace:()=>` `,Vfr:()=>$F,Vopf:()=>rI,Vscr:()=>aI,Vvdash:()=>`⊪`,Wcirc:()=>`Ŵ`,Wedge:()=>`⋀`,Wfr:()=>dI,Wopf:()=>pI,Wscr:()=>hI,Xfr:()=>_I,Xi:()=>`Ξ`,Xopf:()=>yI,Xscr:()=>xI,YAcy:()=>`Я`,YIcy:()=>`Ї`,YUcy:()=>`Ю`,Yacute:()=>`Ý`,Ycirc:()=>`Ŷ`,Ycy:()=>`Ы`,Yfr:()=>CI,Yopf:()=>TI,Yscr:()=>DI,Yuml:()=>`Ÿ`,ZHcy:()=>`Ж`,Zacute:()=>`Ź`,Zcaron:()=>`Ž`,Zcy:()=>`З`,Zdot:()=>`Ż`,ZeroWidthSpace:()=>``,Zeta:()=>`Ζ`,Zfr:()=>`ℨ`,Zopf:()=>`ℤ`,Zscr:()=>jI,aacute:()=>`á`,abreve:()=>`ă`,ac:()=>`∾`,acE:()=>wM,acd:()=>`∿`,acirc:()=>`â`,acute:()=>`´`,acy:()=>`а`,aelig:()=>`æ`,af:()=>``,afr:()=>EM,agrave:()=>`à`,alefsym:()=>`ℵ`,aleph:()=>`ℵ`,alpha:()=>`α`,amacr:()=>`ā`,amalg:()=>`⨿`,amp:()=>`&`,and:()=>`∧`,andand:()=>`⩕`,andd:()=>`⩜`,andslope:()=>`⩘`,andv:()=>`⩚`,ang:()=>`∠`,ange:()=>`⦤`,angle:()=>`∠`,angmsd:()=>`∡`,angmsdaa:()=>`⦨`,angmsdab:()=>`⦩`,angmsdac:()=>`⦪`,angmsdad:()=>`⦫`,angmsdae:()=>`⦬`,angmsdaf:()=>`⦭`,angmsdag:()=>`⦮`,angmsdah:()=>`⦯`,angrt:()=>`∟`,angrtvb:()=>`⊾`,angrtvbd:()=>`⦝`,angsph:()=>`∢`,angst:()=>`Å`,angzarr:()=>`⍼`,aogon:()=>`ą`,aopf:()=>OM,ap:()=>`≈`,apE:()=>`⩰`,apacir:()=>`⩯`,ape:()=>`≊`,apid:()=>`≋`,apos:()=>`'`,approx:()=>`≈`,approxeq:()=>`≊`,aring:()=>`å`,ascr:()=>AM,ast:()=>`*`,asymp:()=>`≈`,asympeq:()=>`≍`,atilde:()=>`ã`,auml:()=>`ä`,awconint:()=>`∳`,awint:()=>`⨑`,bNot:()=>`⫭`,backcong:()=>`≌`,backepsilon:()=>`϶`,backprime:()=>`‵`,backsim:()=>`∽`,backsimeq:()=>`⋍`,barvee:()=>`⊽`,barwed:()=>`⌅`,barwedge:()=>`⌅`,bbrk:()=>`⎵`,bbrktbrk:()=>`⎶`,bcong:()=>`≌`,bcy:()=>`б`,bdquo:()=>`„`,becaus:()=>`∵`,because:()=>`∵`,bemptyv:()=>`⦰`,bepsi:()=>`϶`,bernou:()=>`ℬ`,beta:()=>`β`,beth:()=>`ℶ`,between:()=>`≬`,bfr:()=>MM,bigcap:()=>`⋂`,bigcirc:()=>`◯`,bigcup:()=>`⋃`,bigodot:()=>`⨀`,bigoplus:()=>`⨁`,bigotimes:()=>`⨂`,bigsqcup:()=>`⨆`,bigstar:()=>`★`,bigtriangledown:()=>`▽`,bigtriangleup:()=>`△`,biguplus:()=>`⨄`,bigvee:()=>`⋁`,bigwedge:()=>`⋀`,bkarow:()=>`⤍`,blacklozenge:()=>`⧫`,blacksquare:()=>`▪`,blacktriangle:()=>`▴`,blacktriangledown:()=>`▾`,blacktriangleleft:()=>`◂`,blacktriangleright:()=>`▸`,blank:()=>`␣`,blk12:()=>`▒`,blk14:()=>`░`,blk34:()=>`▓`,block:()=>`█`,bne:()=>NM,bnequiv:()=>PM,bnot:()=>`⌐`,bopf:()=>IM,bot:()=>`⊥`,bottom:()=>`⊥`,bowtie:()=>`⋈`,boxDL:()=>`╗`,boxDR:()=>`╔`,boxDl:()=>`╖`,boxDr:()=>`╓`,boxH:()=>`═`,boxHD:()=>`╦`,boxHU:()=>`╩`,boxHd:()=>`╤`,boxHu:()=>`╧`,boxUL:()=>`╝`,boxUR:()=>`╚`,boxUl:()=>`╜`,boxUr:()=>`╙`,boxV:()=>`║`,boxVH:()=>`╬`,boxVL:()=>`╣`,boxVR:()=>`╠`,boxVh:()=>`╫`,boxVl:()=>`╢`,boxVr:()=>`╟`,boxbox:()=>`⧉`,boxdL:()=>`╕`,boxdR:()=>`╒`,boxdl:()=>`┐`,boxdr:()=>`┌`,boxh:()=>`─`,boxhD:()=>`╥`,boxhU:()=>`╨`,boxhd:()=>`┬`,boxhu:()=>`┴`,boxminus:()=>`⊟`,boxplus:()=>`⊞`,boxtimes:()=>`⊠`,boxuL:()=>`╛`,boxuR:()=>`╘`,boxul:()=>`┘`,boxur:()=>`└`,boxv:()=>`│`,boxvH:()=>`╪`,boxvL:()=>`╡`,boxvR:()=>`╞`,boxvh:()=>`┼`,boxvl:()=>`┤`,boxvr:()=>`├`,bprime:()=>`‵`,breve:()=>`˘`,brvbar:()=>`¦`,bscr:()=>LM,bsemi:()=>`⁏`,bsim:()=>`∽`,bsime:()=>`⋍`,bsol:()=>`\\`,bsolb:()=>`⧅`,bsolhsub:()=>`⟈`,bull:()=>`•`,bullet:()=>`•`,bump:()=>`≎`,bumpE:()=>`⪮`,bumpe:()=>`≏`,bumpeq:()=>`≏`,cacute:()=>`ć`,cap:()=>`∩`,capand:()=>`⩄`,capbrcup:()=>`⩉`,capcap:()=>`⩋`,capcup:()=>`⩇`,capdot:()=>`⩀`,caps:()=>RM,caret:()=>`⁁`,caron:()=>`ˇ`,ccaps:()=>`⩍`,ccaron:()=>`č`,ccedil:()=>`ç`,ccirc:()=>`ĉ`,ccups:()=>`⩌`,ccupssm:()=>`⩐`,cdot:()=>`ċ`,cedil:()=>`¸`,cemptyv:()=>`⦲`,cent:()=>`¢`,centerdot:()=>`·`,cfr:()=>zM,chcy:()=>`ч`,check:()=>`✓`,checkmark:()=>`✓`,chi:()=>`χ`,cir:()=>`○`,cirE:()=>`⧃`,circ:()=>`ˆ`,circeq:()=>`≗`,circlearrowleft:()=>`↺`,circlearrowright:()=>`↻`,circledR:()=>`®`,circledS:()=>`Ⓢ`,circledast:()=>`⊛`,circledcirc:()=>`⊚`,circleddash:()=>`⊝`,cire:()=>`≗`,cirfnint:()=>`⨐`,cirmid:()=>`⫯`,cirscir:()=>`⧂`,clubs:()=>`♣`,clubsuit:()=>`♣`,colon:()=>`:`,colone:()=>`≔`,coloneq:()=>`≔`,comma:()=>`,`,commat:()=>`@`,comp:()=>`∁`,compfn:()=>`∘`,complement:()=>`∁`,complexes:()=>`ℂ`,cong:()=>`≅`,congdot:()=>`⩭`,conint:()=>`∮`,copf:()=>BM,coprod:()=>`∐`,copy:()=>`©`,copysr:()=>`℗`,crarr:()=>`↵`,cross:()=>`✗`,cscr:()=>HM,csub:()=>`⫏`,csube:()=>`⫑`,csup:()=>`⫐`,csupe:()=>`⫒`,ctdot:()=>`⋯`,cudarrl:()=>`⤸`,cudarrr:()=>`⤵`,cuepr:()=>`⋞`,cuesc:()=>`⋟`,cularr:()=>`↶`,cularrp:()=>`⤽`,cup:()=>`∪`,cupbrcap:()=>`⩈`,cupcap:()=>`⩆`,cupcup:()=>`⩊`,cupdot:()=>`⊍`,cupor:()=>`⩅`,cups:()=>UM,curarr:()=>`↷`,curarrm:()=>`⤼`,curlyeqprec:()=>`⋞`,curlyeqsucc:()=>`⋟`,curlyvee:()=>`⋎`,curlywedge:()=>`⋏`,curren:()=>`¤`,curvearrowleft:()=>`↶`,curvearrowright:()=>`↷`,cuvee:()=>`⋎`,cuwed:()=>`⋏`,cwconint:()=>`∲`,cwint:()=>`∱`,cylcty:()=>`⌭`,dArr:()=>`⇓`,dHar:()=>`⥥`,dagger:()=>`†`,daleth:()=>`ℸ`,darr:()=>`↓`,dash:()=>`‐`,dashv:()=>`⊣`,dbkarow:()=>`⤏`,dblac:()=>`˝`,dcaron:()=>`ď`,dcy:()=>`д`,dd:()=>`ⅆ`,ddagger:()=>`‡`,ddarr:()=>`⇊`,ddotseq:()=>`⩷`,default:()=>NI,deg:()=>`°`,delta:()=>`δ`,demptyv:()=>`⦱`,dfisht:()=>`⥿`,dfr:()=>GM,dharl:()=>`⇃`,dharr:()=>`⇂`,diam:()=>`⋄`,diamond:()=>`⋄`,diamondsuit:()=>`♦`,diams:()=>`♦`,die:()=>`¨`,digamma:()=>`ϝ`,disin:()=>`⋲`,div:()=>`÷`,divide:()=>`÷`,divideontimes:()=>`⋇`,divonx:()=>`⋇`,djcy:()=>`ђ`,dlcorn:()=>`⌞`,dlcrop:()=>`⌍`,dollar:()=>`$`,dopf:()=>qM,dot:()=>`˙`,doteq:()=>`≐`,doteqdot:()=>`≑`,dotminus:()=>`∸`,dotplus:()=>`∔`,dotsquare:()=>`⊡`,doublebarwedge:()=>`⌆`,downarrow:()=>`↓`,downdownarrows:()=>`⇊`,downharpoonleft:()=>`⇃`,downharpoonright:()=>`⇂`,drbkarow:()=>`⤐`,drcorn:()=>`⌟`,drcrop:()=>`⌌`,dscr:()=>YM,dscy:()=>`ѕ`,dsol:()=>`⧶`,dstrok:()=>`đ`,dtdot:()=>`⋱`,dtri:()=>`▿`,dtrif:()=>`▾`,duarr:()=>`⇵`,duhar:()=>`⥯`,dwangle:()=>`⦦`,dzcy:()=>`џ`,dzigrarr:()=>`⟿`,eDDot:()=>`⩷`,eDot:()=>`≑`,eacute:()=>`é`,easter:()=>`⩮`,ecaron:()=>`ě`,ecir:()=>`≖`,ecirc:()=>`ê`,ecolon:()=>`≕`,ecy:()=>`э`,edot:()=>`ė`,ee:()=>`ⅇ`,efDot:()=>`≒`,efr:()=>ZM,eg:()=>`⪚`,egrave:()=>`è`,egs:()=>`⪖`,egsdot:()=>`⪘`,el:()=>`⪙`,elinters:()=>`⏧`,ell:()=>`ℓ`,els:()=>`⪕`,elsdot:()=>`⪗`,emacr:()=>`ē`,empty:()=>`∅`,emptyset:()=>`∅`,emptyv:()=>`∅`,emsp:()=>` `,emsp13:()=>` `,emsp14:()=>` `,eng:()=>`ŋ`,ensp:()=>` `,eogon:()=>`ę`,eopf:()=>$M,epar:()=>`⋕`,eparsl:()=>`⧣`,eplus:()=>`⩱`,epsi:()=>`ε`,epsilon:()=>`ε`,epsiv:()=>`ϵ`,eqcirc:()=>`≖`,eqcolon:()=>`≕`,eqsim:()=>`≂`,eqslantgtr:()=>`⪖`,eqslantless:()=>`⪕`,equals:()=>`=`,equest:()=>`≟`,equiv:()=>`≡`,equivDD:()=>`⩸`,eqvparsl:()=>`⧥`,erDot:()=>`≓`,erarr:()=>`⥱`,escr:()=>`ℯ`,esdot:()=>`≐`,esim:()=>`≂`,eta:()=>`η`,eth:()=>`ð`,euml:()=>`ë`,euro:()=>`€`,excl:()=>`!`,exist:()=>`∃`,expectation:()=>`ℰ`,exponentiale:()=>`ⅇ`,fallingdotseq:()=>`≒`,fcy:()=>`ф`,female:()=>`♀`,ffilig:()=>`ffi`,fflig:()=>`ff`,ffllig:()=>`ffl`,ffr:()=>tN,filig:()=>`fi`,fjlig:()=>`fj`,flat:()=>`♭`,fllig:()=>`fl`,fltns:()=>`▱`,fnof:()=>`ƒ`,fopf:()=>rN,forall:()=>`∀`,fork:()=>`⋔`,forkv:()=>`⫙`,fpartint:()=>`⨍`,frac12:()=>`½`,frac13:()=>`⅓`,frac14:()=>`¼`,frac15:()=>`⅕`,frac16:()=>`⅙`,frac18:()=>`⅛`,frac23:()=>`⅔`,frac25:()=>`⅖`,frac34:()=>`¾`,frac35:()=>`⅗`,frac38:()=>`⅜`,frac45:()=>`⅘`,frac56:()=>`⅚`,frac58:()=>`⅝`,frac78:()=>`⅞`,frasl:()=>`⁄`,frown:()=>`⌢`,fscr:()=>iN,gE:()=>`≧`,gEl:()=>`⪌`,gacute:()=>`ǵ`,gamma:()=>`γ`,gammad:()=>`ϝ`,gap:()=>`⪆`,gbreve:()=>`ğ`,gcirc:()=>`ĝ`,gcy:()=>`г`,gdot:()=>`ġ`,ge:()=>`≥`,gel:()=>`⋛`,geq:()=>`≥`,geqq:()=>`≧`,geqslant:()=>`⩾`,ges:()=>`⩾`,gescc:()=>`⪩`,gesdot:()=>`⪀`,gesdoto:()=>`⪂`,gesdotol:()=>`⪄`,gesl:()=>aN,gesles:()=>`⪔`,gfr:()=>sN,gg:()=>`≫`,ggg:()=>`⋙`,gimel:()=>`ℷ`,gjcy:()=>`ѓ`,gl:()=>`≷`,glE:()=>`⪒`,gla:()=>`⪥`,glj:()=>`⪤`,gnE:()=>`≩`,gnap:()=>`⪊`,gnapprox:()=>`⪊`,gne:()=>`⪈`,gneq:()=>`⪈`,gneqq:()=>`≩`,gnsim:()=>`⋧`,gopf:()=>lN,grave:()=>"`",gscr:()=>`ℊ`,gsim:()=>`≳`,gsime:()=>`⪎`,gsiml:()=>`⪐`,gt:()=>`>`,gtcc:()=>`⪧`,gtcir:()=>`⩺`,gtdot:()=>`⋗`,gtlPar:()=>`⦕`,gtquest:()=>`⩼`,gtrapprox:()=>`⪆`,gtrarr:()=>`⥸`,gtrdot:()=>`⋗`,gtreqless:()=>`⋛`,gtreqqless:()=>`⪌`,gtrless:()=>`≷`,gtrsim:()=>`≳`,gvertneqq:()=>dN,gvnE:()=>fN,hArr:()=>`⇔`,hairsp:()=>` `,half:()=>`½`,hamilt:()=>`ℋ`,hardcy:()=>`ъ`,harr:()=>`↔`,harrcir:()=>`⥈`,harrw:()=>`↭`,hbar:()=>`ℏ`,hcirc:()=>`ĥ`,hearts:()=>`♥`,heartsuit:()=>`♥`,hellip:()=>`…`,hercon:()=>`⊹`,hfr:()=>pN,hksearow:()=>`⤥`,hkswarow:()=>`⤦`,hoarr:()=>`⇿`,homtht:()=>`∻`,hookleftarrow:()=>`↩`,hookrightarrow:()=>`↪`,hopf:()=>mN,horbar:()=>`―`,hscr:()=>hN,hslash:()=>`ℏ`,hstrok:()=>`ħ`,hybull:()=>`⁃`,hyphen:()=>`‐`,iacute:()=>`í`,ic:()=>``,icirc:()=>`î`,icy:()=>`и`,iecy:()=>`е`,iexcl:()=>`¡`,iff:()=>`⇔`,ifr:()=>gN,igrave:()=>`ì`,ii:()=>`ⅈ`,iiiint:()=>`⨌`,iiint:()=>`∭`,iinfin:()=>`⧜`,iiota:()=>`℩`,ijlig:()=>`ij`,imacr:()=>`ī`,image:()=>`ℑ`,imagline:()=>`ℐ`,imagpart:()=>`ℑ`,imath:()=>`ı`,imof:()=>`⊷`,imped:()=>`Ƶ`,incare:()=>`℅`,infin:()=>`∞`,infintie:()=>`⧝`,inodot:()=>`ı`,int:()=>`∫`,intcal:()=>`⊺`,integers:()=>`ℤ`,intercal:()=>`⊺`,intlarhk:()=>`⨗`,intprod:()=>`⨼`,iocy:()=>`ё`,iogon:()=>`į`,iopf:()=>vN,iota:()=>`ι`,iprod:()=>`⨼`,iquest:()=>`¿`,iscr:()=>yN,isin:()=>`∈`,isinE:()=>`⋹`,isindot:()=>`⋵`,isins:()=>`⋴`,isinsv:()=>`⋳`,isinv:()=>`∈`,it:()=>``,itilde:()=>`ĩ`,iukcy:()=>`і`,iuml:()=>`ï`,jcirc:()=>`ĵ`,jcy:()=>`й`,jfr:()=>xN,jmath:()=>`ȷ`,jopf:()=>CN,jscr:()=>TN,jsercy:()=>`ј`,jukcy:()=>`є`,kappa:()=>`κ`,kappav:()=>`ϰ`,kcedil:()=>`ķ`,kcy:()=>`к`,kfr:()=>DN,kgreen:()=>`ĸ`,khcy:()=>`х`,kjcy:()=>`ќ`,kopf:()=>kN,kscr:()=>jN,lAarr:()=>`⇚`,lArr:()=>`⇐`,lAtail:()=>`⤛`,lBarr:()=>`⤎`,lE:()=>`≦`,lEg:()=>`⪋`,lHar:()=>`⥢`,lacute:()=>`ĺ`,laemptyv:()=>`⦴`,lagran:()=>`ℒ`,lambda:()=>`λ`,lang:()=>`⟨`,langd:()=>`⦑`,langle:()=>`⟨`,lap:()=>`⪅`,laquo:()=>`«`,larr:()=>`←`,larrb:()=>`⇤`,larrbfs:()=>`⤟`,larrfs:()=>`⤝`,larrhk:()=>`↩`,larrlp:()=>`↫`,larrpl:()=>`⤹`,larrsim:()=>`⥳`,larrtl:()=>`↢`,lat:()=>`⪫`,latail:()=>`⤙`,late:()=>`⪭`,lates:()=>MN,lbarr:()=>`⤌`,lbbrk:()=>`❲`,lbrace:()=>`{`,lbrack:()=>`[`,lbrke:()=>`⦋`,lbrksld:()=>`⦏`,lbrkslu:()=>`⦍`,lcaron:()=>`ľ`,lcedil:()=>`ļ`,lceil:()=>`⌈`,lcub:()=>`{`,lcy:()=>`л`,ldca:()=>`⤶`,ldquo:()=>`“`,ldquor:()=>`„`,ldrdhar:()=>`⥧`,ldrushar:()=>`⥋`,ldsh:()=>`↲`,le:()=>`≤`,leftarrow:()=>`←`,leftarrowtail:()=>`↢`,leftharpoondown:()=>`↽`,leftharpoonup:()=>`↼`,leftleftarrows:()=>`⇇`,leftrightarrow:()=>`↔`,leftrightarrows:()=>`⇆`,leftrightharpoons:()=>`⇋`,leftrightsquigarrow:()=>`↭`,leftthreetimes:()=>`⋋`,leg:()=>`⋚`,leq:()=>`≤`,leqq:()=>`≦`,leqslant:()=>`⩽`,les:()=>`⩽`,lescc:()=>`⪨`,lesdot:()=>`⩿`,lesdoto:()=>`⪁`,lesdotor:()=>`⪃`,lesg:()=>NN,lesges:()=>`⪓`,lessapprox:()=>`⪅`,lessdot:()=>`⋖`,lesseqgtr:()=>`⋚`,lesseqqgtr:()=>`⪋`,lessgtr:()=>`≶`,lesssim:()=>`≲`,lfisht:()=>`⥼`,lfloor:()=>`⌊`,lfr:()=>FN,lg:()=>`≶`,lgE:()=>`⪑`,lhard:()=>`↽`,lharu:()=>`↼`,lharul:()=>`⥪`,lhblk:()=>`▄`,ljcy:()=>`љ`,ll:()=>`≪`,llarr:()=>`⇇`,llcorner:()=>`⌞`,llhard:()=>`⥫`,lltri:()=>`◺`,lmidot:()=>`ŀ`,lmoust:()=>`⎰`,lmoustache:()=>`⎰`,lnE:()=>`≨`,lnap:()=>`⪉`,lnapprox:()=>`⪉`,lne:()=>`⪇`,lneq:()=>`⪇`,lneqq:()=>`≨`,lnsim:()=>`⋦`,loang:()=>`⟬`,loarr:()=>`⇽`,lobrk:()=>`⟦`,longleftarrow:()=>`⟵`,longleftrightarrow:()=>`⟷`,longmapsto:()=>`⟼`,longrightarrow:()=>`⟶`,looparrowleft:()=>`↫`,looparrowright:()=>`↬`,lopar:()=>`⦅`,lopf:()=>LN,loplus:()=>`⨭`,lotimes:()=>`⨴`,lowast:()=>`∗`,lowbar:()=>`_`,loz:()=>`◊`,lozenge:()=>`◊`,lozf:()=>`⧫`,lpar:()=>`(`,lparlt:()=>`⦓`,lrarr:()=>`⇆`,lrcorner:()=>`⌟`,lrhar:()=>`⇋`,lrhard:()=>`⥭`,lrm:()=>``,lrtri:()=>`⊿`,lsaquo:()=>`‹`,lscr:()=>RN,lsh:()=>`↰`,lsim:()=>`≲`,lsime:()=>`⪍`,lsimg:()=>`⪏`,lsqb:()=>`[`,lsquo:()=>`‘`,lsquor:()=>`‚`,lstrok:()=>`ł`,lt:()=>`<`,ltcc:()=>`⪦`,ltcir:()=>`⩹`,ltdot:()=>`⋖`,lthree:()=>`⋋`,ltimes:()=>`⋉`,ltlarr:()=>`⥶`,ltquest:()=>`⩻`,ltrPar:()=>`⦖`,ltri:()=>`◃`,ltrie:()=>`⊴`,ltrif:()=>`◂`,lurdshar:()=>`⥊`,luruhar:()=>`⥦`,lvertneqq:()=>zN,lvnE:()=>BN,mDDot:()=>`∺`,macr:()=>`¯`,male:()=>`♂`,malt:()=>`✠`,maltese:()=>`✠`,map:()=>`↦`,mapsto:()=>`↦`,mapstodown:()=>`↧`,mapstoleft:()=>`↤`,mapstoup:()=>`↥`,marker:()=>`▮`,mcomma:()=>`⨩`,mcy:()=>`м`,mdash:()=>`—`,measuredangle:()=>`∡`,mfr:()=>HN,mho:()=>`℧`,micro:()=>`µ`,mid:()=>`∣`,midast:()=>`*`,midcir:()=>`⫰`,middot:()=>`·`,minus:()=>`−`,minusb:()=>`⊟`,minusd:()=>`∸`,minusdu:()=>`⨪`,mlcp:()=>`⫛`,mldr:()=>`…`,mnplus:()=>`∓`,models:()=>`⊧`,mopf:()=>WN,mp:()=>`∓`,mscr:()=>GN,mstpos:()=>`∾`,mu:()=>`μ`,multimap:()=>`⊸`,mumap:()=>`⊸`,nGg:()=>oP,nGt:()=>sP,nGtv:()=>cP,nLeftarrow:()=>`⇍`,nLeftrightarrow:()=>`⇎`,nLl:()=>pP,nLt:()=>mP,nLtv:()=>hP,nRightarrow:()=>`⇏`,nVDash:()=>`⊯`,nVdash:()=>`⊮`,nabla:()=>`∇`,nacute:()=>`ń`,nang:()=>KN,nap:()=>`≉`,napE:()=>qN,napid:()=>JN,napos:()=>`ʼn`,napprox:()=>`≉`,natur:()=>`♮`,natural:()=>`♮`,naturals:()=>`ℕ`,nbsp:()=>`\xA0`,nbump:()=>YN,nbumpe:()=>XN,ncap:()=>`⩃`,ncaron:()=>`ň`,ncedil:()=>`ņ`,ncong:()=>`≇`,ncongdot:()=>ZN,ncup:()=>`⩂`,ncy:()=>`н`,ndash:()=>`–`,ne:()=>`≠`,neArr:()=>`⇗`,nearhk:()=>`⤤`,nearr:()=>`↗`,nearrow:()=>`↗`,nedot:()=>QN,nequiv:()=>`≢`,nesear:()=>`⤨`,nesim:()=>$N,nexist:()=>`∄`,nexists:()=>`∄`,nfr:()=>tP,ngE:()=>nP,nge:()=>`≱`,ngeq:()=>`≱`,ngeqq:()=>rP,ngeqslant:()=>iP,nges:()=>aP,ngsim:()=>`≵`,ngt:()=>`≯`,ngtr:()=>`≯`,nhArr:()=>`⇎`,nharr:()=>`↮`,nhpar:()=>`⫲`,ni:()=>`∋`,nis:()=>`⋼`,nisd:()=>`⋺`,niv:()=>`∋`,njcy:()=>`њ`,nlArr:()=>`⇍`,nlE:()=>lP,nlarr:()=>`↚`,nldr:()=>`‥`,nle:()=>`≰`,nleftarrow:()=>`↚`,nleftrightarrow:()=>`↮`,nleq:()=>`≰`,nleqq:()=>uP,nleqslant:()=>dP,nles:()=>fP,nless:()=>`≮`,nlsim:()=>`≴`,nlt:()=>`≮`,nltri:()=>`⋪`,nltrie:()=>`⋬`,nmid:()=>`∤`,nopf:()=>gP,not:()=>`¬`,notin:()=>`∉`,notinE:()=>wP,notindot:()=>CP,notinva:()=>`∉`,notinvb:()=>`⋷`,notinvc:()=>`⋶`,notni:()=>`∌`,notniva:()=>`∌`,notnivb:()=>`⋾`,notnivc:()=>`⋽`,npar:()=>`∦`,nparallel:()=>`∦`,nparsl:()=>RP,npart:()=>zP,npolint:()=>`⨔`,npr:()=>`⊀`,nprcue:()=>`⋠`,npre:()=>VP,nprec:()=>`⊀`,npreceq:()=>BP,nrArr:()=>`⇏`,nrarr:()=>`↛`,nrarrc:()=>HP,nrarrw:()=>UP,nrightarrow:()=>`↛`,nrtri:()=>`⋫`,nrtrie:()=>`⋭`,nsc:()=>`⊁`,nsccue:()=>`⋡`,nsce:()=>WP,nscr:()=>KP,nshortmid:()=>`∤`,nshortparallel:()=>`∦`,nsim:()=>`≁`,nsime:()=>`≄`,nsimeq:()=>`≄`,nsmid:()=>`∤`,nspar:()=>`∦`,nsqsube:()=>`⋢`,nsqsupe:()=>`⋣`,nsub:()=>`⊄`,nsubE:()=>qP,nsube:()=>`⊈`,nsubset:()=>JP,nsubseteq:()=>`⊈`,nsubseteqq:()=>YP,nsucc:()=>`⊁`,nsucceq:()=>XP,nsup:()=>`⊅`,nsupE:()=>ZP,nsupe:()=>`⊉`,nsupset:()=>QP,nsupseteq:()=>`⊉`,nsupseteqq:()=>$P,ntgl:()=>`≹`,ntilde:()=>`ñ`,ntlg:()=>`≸`,ntriangleleft:()=>`⋪`,ntrianglelefteq:()=>`⋬`,ntriangleright:()=>`⋫`,ntrianglerighteq:()=>`⋭`,nu:()=>`ν`,num:()=>`#`,numero:()=>`№`,numsp:()=>` `,nvDash:()=>`⊭`,nvHarr:()=>`⤄`,nvap:()=>eF,nvdash:()=>`⊬`,nvge:()=>tF,nvgt:()=>nF,nvinfin:()=>`⧞`,nvlArr:()=>`⤂`,nvle:()=>rF,nvlt:()=>iF,nvltrie:()=>aF,nvrArr:()=>`⤃`,nvrtrie:()=>oF,nvsim:()=>sF,nwArr:()=>`⇖`,nwarhk:()=>`⤣`,nwarr:()=>`↖`,nwarrow:()=>`↖`,nwnear:()=>`⤧`,oS:()=>`Ⓢ`,oacute:()=>`ó`,oast:()=>`⊛`,ocir:()=>`⊚`,ocirc:()=>`ô`,ocy:()=>`о`,odash:()=>`⊝`,odblac:()=>`ő`,odiv:()=>`⨸`,odot:()=>`⊙`,odsold:()=>`⦼`,oelig:()=>`œ`,ofcir:()=>`⦿`,ofr:()=>lF,ogon:()=>`˛`,ograve:()=>`ò`,ogt:()=>`⧁`,ohbar:()=>`⦵`,ohm:()=>`Ω`,oint:()=>`∮`,olarr:()=>`↺`,olcir:()=>`⦾`,olcross:()=>`⦻`,oline:()=>`‾`,olt:()=>`⧀`,omacr:()=>`ō`,omega:()=>`ω`,omicron:()=>`ο`,omid:()=>`⦶`,ominus:()=>`⊖`,oopf:()=>dF,opar:()=>`⦷`,operp:()=>`⦹`,oplus:()=>`⊕`,or:()=>`∨`,orarr:()=>`↻`,ord:()=>`⩝`,order:()=>`ℴ`,orderof:()=>`ℴ`,ordf:()=>`ª`,ordm:()=>`º`,origof:()=>`⊶`,oror:()=>`⩖`,orslope:()=>`⩗`,orv:()=>`⩛`,oscr:()=>`ℴ`,oslash:()=>`ø`,osol:()=>`⊘`,otilde:()=>`õ`,otimes:()=>`⊗`,otimesas:()=>`⨶`,ouml:()=>`ö`,ovbar:()=>`⌽`,par:()=>`∥`,para:()=>`¶`,parallel:()=>`∥`,parsim:()=>`⫳`,parsl:()=>`⫽`,part:()=>`∂`,pcy:()=>`п`,percnt:()=>`%`,period:()=>`.`,permil:()=>`‰`,perp:()=>`⊥`,pertenk:()=>`‱`,pfr:()=>mF,phi:()=>`φ`,phiv:()=>`ϕ`,phmmat:()=>`ℳ`,phone:()=>`☎`,pi:()=>`π`,pitchfork:()=>`⋔`,piv:()=>`ϖ`,planck:()=>`ℏ`,planckh:()=>`ℎ`,plankv:()=>`ℏ`,plus:()=>`+`,plusacir:()=>`⨣`,plusb:()=>`⊞`,pluscir:()=>`⨢`,plusdo:()=>`∔`,plusdu:()=>`⨥`,pluse:()=>`⩲`,plusmn:()=>`±`,plussim:()=>`⨦`,plustwo:()=>`⨧`,pm:()=>`±`,pointint:()=>`⨕`,popf:()=>hF,pound:()=>`£`,pr:()=>`≺`,prE:()=>`⪳`,prap:()=>`⪷`,prcue:()=>`≼`,pre:()=>`⪯`,prec:()=>`≺`,precapprox:()=>`⪷`,preccurlyeq:()=>`≼`,preceq:()=>`⪯`,precnapprox:()=>`⪹`,precneqq:()=>`⪵`,precnsim:()=>`⋨`,precsim:()=>`≾`,prime:()=>`′`,primes:()=>`ℙ`,prnE:()=>`⪵`,prnap:()=>`⪹`,prnsim:()=>`⋨`,prod:()=>`∏`,profalar:()=>`⌮`,profline:()=>`⌒`,profsurf:()=>`⌓`,prop:()=>`∝`,propto:()=>`∝`,prsim:()=>`≾`,prurel:()=>`⊰`,pscr:()=>_F,psi:()=>`ψ`,puncsp:()=>` `,qfr:()=>yF,qint:()=>`⨌`,qopf:()=>bF,qprime:()=>`⁗`,qscr:()=>SF,quaternions:()=>`ℍ`,quatint:()=>`⨖`,quest:()=>`?`,questeq:()=>`≟`,quot:()=>`"`,rAarr:()=>`⇛`,rArr:()=>`⇒`,rAtail:()=>`⤜`,rBarr:()=>`⤏`,rHar:()=>`⥤`,race:()=>CF,racute:()=>`ŕ`,radic:()=>`√`,raemptyv:()=>`⦳`,rang:()=>`⟩`,rangd:()=>`⦒`,range:()=>`⦥`,rangle:()=>`⟩`,raquo:()=>`»`,rarr:()=>`→`,rarrap:()=>`⥵`,rarrb:()=>`⇥`,rarrbfs:()=>`⤠`,rarrc:()=>`⤳`,rarrfs:()=>`⤞`,rarrhk:()=>`↪`,rarrlp:()=>`↬`,rarrpl:()=>`⥅`,rarrsim:()=>`⥴`,rarrtl:()=>`↣`,rarrw:()=>`↝`,ratail:()=>`⤚`,ratio:()=>`∶`,rationals:()=>`ℚ`,rbarr:()=>`⤍`,rbbrk:()=>`❳`,rbrace:()=>`}`,rbrack:()=>`]`,rbrke:()=>`⦌`,rbrksld:()=>`⦎`,rbrkslu:()=>`⦐`,rcaron:()=>`ř`,rcedil:()=>`ŗ`,rceil:()=>`⌉`,rcub:()=>`}`,rcy:()=>`р`,rdca:()=>`⤷`,rdldhar:()=>`⥩`,rdquo:()=>`”`,rdquor:()=>`”`,rdsh:()=>`↳`,real:()=>`ℜ`,realine:()=>`ℛ`,realpart:()=>`ℜ`,reals:()=>`ℝ`,rect:()=>`▭`,reg:()=>`®`,rfisht:()=>`⥽`,rfloor:()=>`⌋`,rfr:()=>wF,rhard:()=>`⇁`,rharu:()=>`⇀`,rharul:()=>`⥬`,rho:()=>`ρ`,rhov:()=>`ϱ`,rightarrow:()=>`→`,rightarrowtail:()=>`↣`,rightharpoondown:()=>`⇁`,rightharpoonup:()=>`⇀`,rightleftarrows:()=>`⇄`,rightleftharpoons:()=>`⇌`,rightrightarrows:()=>`⇉`,rightsquigarrow:()=>`↝`,rightthreetimes:()=>`⋌`,ring:()=>`˚`,risingdotseq:()=>`≓`,rlarr:()=>`⇄`,rlhar:()=>`⇌`,rlm:()=>``,rmoust:()=>`⎱`,rmoustache:()=>`⎱`,rnmid:()=>`⫮`,roang:()=>`⟭`,roarr:()=>`⇾`,robrk:()=>`⟧`,ropar:()=>`⦆`,ropf:()=>TF,roplus:()=>`⨮`,rotimes:()=>`⨵`,rpar:()=>`)`,rpargt:()=>`⦔`,rppolint:()=>`⨒`,rrarr:()=>`⇉`,rsaquo:()=>`›`,rscr:()=>EF,rsh:()=>`↱`,rsqb:()=>`]`,rsquo:()=>`’`,rsquor:()=>`’`,rthree:()=>`⋌`,rtimes:()=>`⋊`,rtri:()=>`▹`,rtrie:()=>`⊵`,rtrif:()=>`▸`,rtriltri:()=>`⧎`,ruluhar:()=>`⥨`,rx:()=>`℞`,sacute:()=>`ś`,sbquo:()=>`‚`,sc:()=>`≻`,scE:()=>`⪴`,scap:()=>`⪸`,scaron:()=>`š`,sccue:()=>`≽`,sce:()=>`⪰`,scedil:()=>`ş`,scirc:()=>`ŝ`,scnE:()=>`⪶`,scnap:()=>`⪺`,scnsim:()=>`⋩`,scpolint:()=>`⨓`,scsim:()=>`≿`,scy:()=>`с`,sdot:()=>`⋅`,sdotb:()=>`⊡`,sdote:()=>`⩦`,seArr:()=>`⇘`,searhk:()=>`⤥`,searr:()=>`↘`,searrow:()=>`↘`,sect:()=>`§`,semi:()=>`;`,seswar:()=>`⤩`,setminus:()=>`∖`,setmn:()=>`∖`,sext:()=>`✶`,sfr:()=>OF,sfrown:()=>`⌢`,sharp:()=>`♯`,shchcy:()=>`щ`,shcy:()=>`ш`,shortmid:()=>`∣`,shortparallel:()=>`∥`,shy:()=>``,sigma:()=>`σ`,sigmaf:()=>`ς`,sigmav:()=>`ς`,sim:()=>`∼`,simdot:()=>`⩪`,sime:()=>`≃`,simeq:()=>`≃`,simg:()=>`⪞`,simgE:()=>`⪠`,siml:()=>`⪝`,simlE:()=>`⪟`,simne:()=>`≆`,simplus:()=>`⨤`,simrarr:()=>`⥲`,slarr:()=>`←`,smallsetminus:()=>`∖`,smashp:()=>`⨳`,smeparsl:()=>`⧤`,smid:()=>`∣`,smile:()=>`⌣`,smt:()=>`⪪`,smte:()=>`⪬`,smtes:()=>kF,softcy:()=>`ь`,sol:()=>`/`,solb:()=>`⧄`,solbar:()=>`⌿`,sopf:()=>jF,spades:()=>`♠`,spadesuit:()=>`♠`,spar:()=>`∥`,sqcap:()=>`⊓`,sqcaps:()=>MF,sqcup:()=>`⊔`,sqcups:()=>NF,sqsub:()=>`⊏`,sqsube:()=>`⊑`,sqsubset:()=>`⊏`,sqsubseteq:()=>`⊑`,sqsup:()=>`⊐`,sqsupe:()=>`⊒`,sqsupset:()=>`⊐`,sqsupseteq:()=>`⊒`,squ:()=>`□`,square:()=>`□`,squarf:()=>`▪`,squf:()=>`▪`,srarr:()=>`→`,sscr:()=>FF,ssetmn:()=>`∖`,ssmile:()=>`⌣`,sstarf:()=>`⋆`,star:()=>`☆`,starf:()=>`★`,straightepsilon:()=>`ϵ`,straightphi:()=>`ϕ`,strns:()=>`¯`,sub:()=>`⊂`,subE:()=>`⫅`,subdot:()=>`⪽`,sube:()=>`⊆`,subedot:()=>`⫃`,submult:()=>`⫁`,subnE:()=>`⫋`,subne:()=>`⊊`,subplus:()=>`⪿`,subrarr:()=>`⥹`,subset:()=>`⊂`,subseteq:()=>`⊆`,subseteqq:()=>`⫅`,subsetneq:()=>`⊊`,subsetneqq:()=>`⫋`,subsim:()=>`⫇`,subsub:()=>`⫕`,subsup:()=>`⫓`,succ:()=>`≻`,succapprox:()=>`⪸`,succcurlyeq:()=>`≽`,succeq:()=>`⪰`,succnapprox:()=>`⪺`,succneqq:()=>`⪶`,succnsim:()=>`⋩`,succsim:()=>`≿`,sum:()=>`∑`,sung:()=>`♪`,sup:()=>`⊃`,sup1:()=>`¹`,sup2:()=>`²`,sup3:()=>`³`,supE:()=>`⫆`,supdot:()=>`⪾`,supdsub:()=>`⫘`,supe:()=>`⊇`,supedot:()=>`⫄`,suphsol:()=>`⟉`,suphsub:()=>`⫗`,suplarr:()=>`⥻`,supmult:()=>`⫂`,supnE:()=>`⫌`,supne:()=>`⊋`,supplus:()=>`⫀`,supset:()=>`⊃`,supseteq:()=>`⊇`,supseteqq:()=>`⫆`,supsetneq:()=>`⊋`,supsetneqq:()=>`⫌`,supsim:()=>`⫈`,supsub:()=>`⫔`,supsup:()=>`⫖`,swArr:()=>`⇙`,swarhk:()=>`⤦`,swarr:()=>`↙`,swarrow:()=>`↙`,swnwar:()=>`⤪`,szlig:()=>`ß`,target:()=>`⌖`,tau:()=>`τ`,tbrk:()=>`⎴`,tcaron:()=>`ť`,tcedil:()=>`ţ`,tcy:()=>`т`,tdot:()=>`⃛`,telrec:()=>`⌕`,tfr:()=>LF,there4:()=>`∴`,therefore:()=>`∴`,theta:()=>`θ`,thetasym:()=>`ϑ`,thetav:()=>`ϑ`,thickapprox:()=>`≈`,thicksim:()=>`∼`,thinsp:()=>` `,thkap:()=>`≈`,thksim:()=>`∼`,thorn:()=>`þ`,tilde:()=>`˜`,times:()=>`×`,timesb:()=>`⊠`,timesbar:()=>`⨱`,timesd:()=>`⨰`,tint:()=>`∭`,toea:()=>`⤨`,top:()=>`⊤`,topbot:()=>`⌶`,topcir:()=>`⫱`,topf:()=>BF,topfork:()=>`⫚`,tosa:()=>`⤩`,tprime:()=>`‴`,trade:()=>`™`,triangle:()=>`▵`,triangledown:()=>`▿`,triangleleft:()=>`◃`,trianglelefteq:()=>`⊴`,triangleq:()=>`≜`,triangleright:()=>`▹`,trianglerighteq:()=>`⊵`,tridot:()=>`◬`,trie:()=>`≜`,triminus:()=>`⨺`,triplus:()=>`⨹`,trisb:()=>`⧍`,tritime:()=>`⨻`,trpezium:()=>`⏢`,tscr:()=>HF,tscy:()=>`ц`,tshcy:()=>`ћ`,tstrok:()=>`ŧ`,twixt:()=>`≬`,twoheadleftarrow:()=>`↞`,twoheadrightarrow:()=>`↠`,uArr:()=>`⇑`,uHar:()=>`⥣`,uacute:()=>`ú`,uarr:()=>`↑`,ubrcy:()=>`ў`,ubreve:()=>`ŭ`,ucirc:()=>`û`,ucy:()=>`у`,udarr:()=>`⇅`,udblac:()=>`ű`,udhar:()=>`⥮`,ufisht:()=>`⥾`,ufr:()=>WF,ugrave:()=>`ù`,uharl:()=>`↿`,uharr:()=>`↾`,uhblk:()=>`▀`,ulcorn:()=>`⌜`,ulcorner:()=>`⌜`,ulcrop:()=>`⌏`,ultri:()=>`◸`,umacr:()=>`ū`,uml:()=>`¨`,uogon:()=>`ų`,uopf:()=>KF,uparrow:()=>`↑`,updownarrow:()=>`↕`,upharpoonleft:()=>`↿`,upharpoonright:()=>`↾`,uplus:()=>`⊎`,upsi:()=>`υ`,upsih:()=>`ϒ`,upsilon:()=>`υ`,upuparrows:()=>`⇈`,urcorn:()=>`⌝`,urcorner:()=>`⌝`,urcrop:()=>`⌎`,uring:()=>`ů`,urtri:()=>`◹`,uscr:()=>JF,utdot:()=>`⋰`,utilde:()=>`ũ`,utri:()=>`▵`,utrif:()=>`▴`,uuarr:()=>`⇈`,uuml:()=>`ü`,uwangle:()=>`⦧`,vArr:()=>`⇕`,vBar:()=>`⫨`,vBarv:()=>`⫩`,vDash:()=>`⊨`,vangrt:()=>`⦜`,varepsilon:()=>`ϵ`,varkappa:()=>`ϰ`,varnothing:()=>`∅`,varphi:()=>`ϕ`,varpi:()=>`ϖ`,varpropto:()=>`∝`,varr:()=>`↕`,varrho:()=>`ϱ`,varsigma:()=>`ς`,varsubsetneq:()=>YF,varsubsetneqq:()=>XF,varsupsetneq:()=>ZF,varsupsetneqq:()=>QF,vartheta:()=>`ϑ`,vartriangleleft:()=>`⊲`,vartriangleright:()=>`⊳`,vcy:()=>`в`,vdash:()=>`⊢`,vee:()=>`∨`,veebar:()=>`⊻`,veeeq:()=>`≚`,vellip:()=>`⋮`,verbar:()=>`|`,vert:()=>`|`,vfr:()=>eI,vltri:()=>`⊲`,vnsub:()=>tI,vnsup:()=>nI,vopf:()=>iI,vprop:()=>`∝`,vrtri:()=>`⊳`,vscr:()=>oI,vsubnE:()=>sI,vsubne:()=>cI,vsupnE:()=>lI,vsupne:()=>uI,vzigzag:()=>`⦚`,wcirc:()=>`ŵ`,wedbar:()=>`⩟`,wedge:()=>`∧`,wedgeq:()=>`≙`,weierp:()=>`℘`,wfr:()=>fI,wopf:()=>mI,wp:()=>`℘`,wr:()=>`≀`,wreath:()=>`≀`,wscr:()=>gI,xcap:()=>`⋂`,xcirc:()=>`◯`,xcup:()=>`⋃`,xdtri:()=>`▽`,xfr:()=>vI,xhArr:()=>`⟺`,xharr:()=>`⟷`,xi:()=>`ξ`,xlArr:()=>`⟸`,xlarr:()=>`⟵`,xmap:()=>`⟼`,xnis:()=>`⋻`,xodot:()=>`⨀`,xopf:()=>bI,xoplus:()=>`⨁`,xotime:()=>`⨂`,xrArr:()=>`⟹`,xrarr:()=>`⟶`,xscr:()=>SI,xsqcup:()=>`⨆`,xuplus:()=>`⨄`,xutri:()=>`△`,xvee:()=>`⋁`,xwedge:()=>`⋀`,yacute:()=>`ý`,yacy:()=>`я`,ycirc:()=>`ŷ`,ycy:()=>`ы`,yen:()=>`¥`,yfr:()=>wI,yicy:()=>`ї`,yopf:()=>EI,yscr:()=>OI,yucy:()=>`ю`,yuml:()=>`ÿ`,zacute:()=>`ź`,zcaron:()=>`ž`,zcy:()=>`з`,zdot:()=>`ż`,zeetrf:()=>`ℨ`,zeta:()=>`ζ`,zfr:()=>kI,zhcy:()=>`ж`,zigrarr:()=>`⇝`,zopf:()=>AI,zscr:()=>MI,zwj:()=>``,zwnj:()=>``}),wM,TM,EM,DM,OM,kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,zM,BM,VM,HM,UM,WM,GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,bN,xN,SN,CN,wN,TN,EN,DN,ON,kN,AN,jN,MN,NN,PN,FN,IN,LN,RN,zN,BN,VN,HN,UN,WN,GN,KN,qN,JN,YN,XN,ZN,QN,$N,eP,tP,nP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,hP,gP,_P,vP,yP,bP,xP,SP,CP,wP,TP,EP,DP,OP,kP,AP,jP,MP,NP,PP,FP,IP,LP,RP,zP,BP,VP,HP,UP,WP,GP,KP,qP,JP,YP,XP,ZP,QP,$P,eF,tF,nF,rF,iF,aF,oF,sF,cF,lF,uF,dF,fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF,CF,wF,TF,EF,DF,OF,kF,AF,jF,MF,NF,PF,FF,IF,LF,RF,zF,BF,VF,HF,UF,WF,GF,KF,qF,JF,YF,XF,ZF,QF,$F,eI,tI,nI,rI,iI,aI,oI,sI,cI,lI,uI,dI,fI,pI,mI,hI,gI,_I,vI,yI,bI,xI,SI,CI,wI,TI,EI,DI,OI,kI,AI,jI,MI,NI,PI=l((()=>{wM=`∾̳`,TM=`𝔄`,EM=`𝔞`,DM=`𝔸`,OM=`𝕒`,kM=`𝒜`,AM=`𝒶`,jM=`𝔅`,MM=`𝔟`,NM=`=⃥`,PM=`≡⃥`,FM=`𝔹`,IM=`𝕓`,LM=`𝒷`,RM=`∩︀`,zM=`𝔠`,BM=`𝕔`,VM=`𝒞`,HM=`𝒸`,UM=`∪︀`,WM=`𝔇`,GM=`𝔡`,KM=`𝔻`,qM=`𝕕`,JM=`𝒟`,YM=`𝒹`,XM=`𝔈`,ZM=`𝔢`,QM=`𝔼`,$M=`𝕖`,eN=`𝔉`,tN=`𝔣`,nN=`𝔽`,rN=`𝕗`,iN=`𝒻`,aN=`⋛︀`,oN=`𝔊`,sN=`𝔤`,cN=`𝔾`,lN=`𝕘`,uN=`𝒢`,dN=`≩︀`,fN=`≩︀`,pN=`𝔥`,mN=`𝕙`,hN=`𝒽`,gN=`𝔦`,_N=`𝕀`,vN=`𝕚`,yN=`𝒾`,bN=`𝔍`,xN=`𝔧`,SN=`𝕁`,CN=`𝕛`,wN=`𝒥`,TN=`𝒿`,EN=`𝔎`,DN=`𝔨`,ON=`𝕂`,kN=`𝕜`,AN=`𝒦`,jN=`𝓀`,MN=`⪭︀`,NN=`⋚︀`,PN=`𝔏`,FN=`𝔩`,IN=`𝕃`,LN=`𝕝`,RN=`𝓁`,zN=`≨︀`,BN=`≨︀`,VN=`𝔐`,HN=`𝔪`,UN=`𝕄`,WN=`𝕞`,GN=`𝓂`,KN=`∠⃒`,qN=`⩰̸`,JN=`≋̸`,YN=`≎̸`,XN=`≏̸`,ZN=`⩭̸`,QN=`≐̸`,$N=`≂̸`,eP=`𝔑`,tP=`𝔫`,nP=`≧̸`,rP=`≧̸`,iP=`⩾̸`,aP=`⩾̸`,oP=`⋙̸`,sP=`≫⃒`,cP=`≫̸`,lP=`≦̸`,uP=`≦̸`,dP=`⩽̸`,fP=`⩽̸`,pP=`⋘̸`,mP=`≪⃒`,hP=`≪̸`,gP=`𝕟`,_P=`≂̸`,vP=`≧̸`,yP=`≫̸`,bP=`⩾̸`,xP=`≎̸`,SP=`≏̸`,CP=`⋵̸`,wP=`⋹̸`,TP=`⧏̸`,EP=`≪̸`,DP=`⩽̸`,OP=`⪢̸`,kP=`⪡̸`,AP=`⪯̸`,jP=`⧐̸`,MP=`⊏̸`,NP=`⊐̸`,PP=`⊂⃒`,FP=`⪰̸`,IP=`≿̸`,LP=`⊃⃒`,RP=`⫽⃥`,zP=`∂̸`,BP=`⪯̸`,VP=`⪯̸`,HP=`⤳̸`,UP=`↝̸`,WP=`⪰̸`,GP=`𝒩`,KP=`𝓃`,qP=`⫅̸`,JP=`⊂⃒`,YP=`⫅̸`,XP=`⪰̸`,ZP=`⫆̸`,QP=`⊃⃒`,$P=`⫆̸`,eF=`≍⃒`,tF=`≥⃒`,nF=`>⃒`,rF=`≤⃒`,iF=`<⃒`,aF=`⊴⃒`,oF=`⊵⃒`,sF=`∼⃒`,cF=`𝔒`,lF=`𝔬`,uF=`𝕆`,dF=`𝕠`,fF=`𝒪`,pF=`𝔓`,mF=`𝔭`,hF=`𝕡`,gF=`𝒫`,_F=`𝓅`,vF=`𝔔`,yF=`𝔮`,bF=`𝕢`,xF=`𝒬`,SF=`𝓆`,CF=`∽̱`,wF=`𝔯`,TF=`𝕣`,EF=`𝓇`,DF=`𝔖`,OF=`𝔰`,kF=`⪬︀`,AF=`𝕊`,jF=`𝕤`,MF=`⊓︀`,NF=`⊔︀`,PF=`𝒮`,FF=`𝓈`,IF=`𝔗`,LF=`𝔱`,RF=` `,zF=`𝕋`,BF=`𝕥`,VF=`𝒯`,HF=`𝓉`,UF=`𝔘`,WF=`𝔲`,GF=`𝕌`,KF=`𝕦`,qF=`𝒰`,JF=`𝓊`,YF=`⊊︀`,XF=`⫋︀`,ZF=`⊋︀`,QF=`⫌︀`,$F=`𝔙`,eI=`𝔳`,tI=`⊂⃒`,nI=`⊃⃒`,rI=`𝕍`,iI=`𝕧`,aI=`𝒱`,oI=`𝓋`,sI=`⫋︀`,cI=`⊊︀`,lI=`⫌︀`,uI=`⊋︀`,dI=`𝔚`,fI=`𝔴`,pI=`𝕎`,mI=`𝕨`,hI=`𝒲`,gI=`𝓌`,_I=`𝔛`,vI=`𝔵`,yI=`𝕏`,bI=`𝕩`,xI=`𝒳`,SI=`𝓍`,CI=`𝔜`,wI=`𝔶`,TI=`𝕐`,EI=`𝕪`,DI=`𝒴`,OI=`𝓎`,kI=`𝔷`,AI=`𝕫`,jI=`𝒵`,MI=`𝓏`,NI={Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:wM,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:``,Afr:TM,afr:EM,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,amp:`&`,AMP:`&`,andand:`⩕`,And:`⩓`,and:`∧`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angmsd:`∡`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:DM,aopf:OM,apacir:`⩯`,ap:`≈`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:``,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:kM,ascr:AM,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,barwed:`⌅`,Barwed:`⌆`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,Because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:jM,bfr:MM,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:NM,bnequiv:PM,bNot:`⫭`,bnot:`⌐`,Bopf:FM,bopf:IM,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxdl:`┐`,boxdL:`╕`,boxDl:`╖`,boxDL:`╗`,boxdr:`┌`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxh:`─`,boxH:`═`,boxhd:`┬`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxhu:`┴`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxuL:`╛`,boxUl:`╜`,boxUL:`╝`,boxur:`└`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxv:`│`,boxV:`║`,boxvh:`┼`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`,boxvl:`┤`,boxvL:`╡`,boxVl:`╢`,boxVL:`╣`,boxvr:`├`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,bprime:`‵`,breve:`˘`,Breve:`˘`,brvbar:`¦`,bscr:LM,Bscr:`ℬ`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsolb:`⧅`,bsol:`\\`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,cap:`∩`,Cap:`⋒`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:RM,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,CenterDot:`·`,cfr:zM,Cfr:`ℭ`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cir:`○`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,colon:`:`,Colon:`∷`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,conint:`∮`,Conint:`∯`,ContourIntegral:`∮`,copf:BM,Copf:`ℂ`,coprod:`∐`,Coproduct:`∐`,copy:`©`,COPY:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,cross:`✗`,Cross:`⨯`,Cscr:VM,cscr:HM,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cupbrcap:`⩈`,cupcap:`⩆`,CupCap:`≍`,cup:`∪`,Cup:`⋓`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:UM,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dagger:`†`,Dagger:`‡`,daleth:`ℸ`,darr:`↓`,Darr:`↡`,dArr:`⇓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,ddagger:`‡`,ddarr:`⇊`,DD:`ⅅ`,dd:`ⅆ`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:WM,dfr:GM,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,diamond:`⋄`,Diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:KM,dopf:qM,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrowBar:`⤓`,downarrow:`↓`,DownArrow:`↓`,Downarrow:`⇓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVectorBar:`⥖`,DownLeftVector:`↽`,DownRightTeeVector:`⥟`,DownRightVectorBar:`⥗`,DownRightVector:`⇁`,DownTeeArrow:`↧`,DownTee:`⊤`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:JM,dscr:YM,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,Ecirc:`Ê`,ecirc:`ê`,ecir:`≖`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,edot:`ė`,eDot:`≑`,ee:`ⅇ`,efDot:`≒`,Efr:XM,efr:ZM,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp13:` `,emsp14:` `,emsp:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:QM,eopf:$M,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,escr:`ℯ`,Escr:`ℰ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,ExponentialE:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:eN,ffr:tN,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:nN,fopf:rN,forall:`∀`,ForAll:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:iN,Fscr:`ℱ`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,ge:`≥`,gE:`≧`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,gescc:`⪩`,ges:`⩾`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:aN,gesles:`⪔`,Gfr:oN,gfr:sN,gg:`≫`,Gg:`⋙`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gla:`⪥`,gl:`≷`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gnE:`≩`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:cN,gopf:lN,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:uN,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gtcc:`⪧`,gtcir:`⩺`,gt:`>`,GT:`>`,Gt:`≫`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:dN,gvnE:fN,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,harrcir:`⥈`,harr:`↔`,hArr:`⇔`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:pN,Hfr:`ℌ`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:mN,Hopf:`ℍ`,horbar:`―`,HorizontalLine:`─`,hscr:hN,Hscr:`ℋ`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:``,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:gN,Ifr:`ℑ`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,Im:`ℑ`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,incare:`℅`,in:`∈`,infin:`∞`,infintie:`⧝`,inodot:`ı`,intcal:`⊺`,int:`∫`,Int:`∬`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:``,InvisibleTimes:``,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:_N,iopf:vN,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:yN,Iscr:`ℐ`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:bN,jfr:xN,jmath:`ȷ`,Jopf:SN,jopf:CN,Jscr:wN,jscr:TN,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:EN,kfr:DN,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:ON,kopf:kN,Kscr:AN,kscr:jN,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,lang:`⟨`,Lang:`⟪`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,larrb:`⇤`,larrbfs:`⤟`,larr:`←`,Larr:`↞`,lArr:`⇐`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,latail:`⤙`,lAtail:`⤛`,lat:`⪫`,late:`⪭`,lates:MN,lbarr:`⤌`,lBarr:`⤎`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,lE:`≦`,LeftAngleBracket:`⟨`,LeftArrowBar:`⇤`,leftarrow:`←`,LeftArrow:`←`,Leftarrow:`⇐`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVectorBar:`⥙`,LeftDownVector:`⇃`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTeeArrow:`↤`,LeftTee:`⊣`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangleBar:`⧏`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVectorBar:`⥘`,LeftUpVector:`↿`,LeftVectorBar:`⥒`,LeftVector:`↼`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,lescc:`⪨`,les:`⩽`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:NN,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:PN,lfr:FN,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,llarr:`⇇`,ll:`≪`,Ll:`⋘`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoustache:`⎰`,lmoust:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lnE:`≨`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftrightarrow:`⟷`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longmapsto:`⟼`,longrightarrow:`⟶`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:IN,lopf:LN,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,lscr:RN,Lscr:`ℒ`,lsh:`↰`,Lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,ltcc:`⪦`,ltcir:`⩹`,lt:`<`,LT:`<`,Lt:`≪`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:zN,lvnE:BN,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:VN,mfr:HN,mho:`℧`,micro:`µ`,midast:`*`,midcir:`⫰`,mid:`∣`,middot:`·`,minusb:`⊟`,minus:`−`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:UN,mopf:WN,mp:`∓`,mscr:GN,Mscr:`ℳ`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:KN,nap:`≉`,napE:qN,napid:JN,napos:`ʼn`,napprox:`≉`,natural:`♮`,naturals:`ℕ`,natur:`♮`,nbsp:`\xA0`,nbump:YN,nbumpe:XN,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:ZN,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,nearhk:`⤤`,nearr:`↗`,neArr:`⇗`,nearrow:`↗`,ne:`≠`,nedot:QN,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,nequiv:`≢`,nesear:`⤨`,nesim:$N,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
54
|
+
`,nexist:`∄`,nexists:`∄`,Nfr:eP,nfr:tP,ngE:nP,nge:`≱`,ngeq:`≱`,ngeqq:rP,ngeqslant:iP,nges:aP,nGg:oP,ngsim:`≵`,nGt:sP,ngt:`≯`,ngtr:`≯`,nGtv:cP,nharr:`↮`,nhArr:`⇎`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlarr:`↚`,nlArr:`⇍`,nldr:`‥`,nlE:lP,nle:`≰`,nleftarrow:`↚`,nLeftarrow:`⇍`,nleftrightarrow:`↮`,nLeftrightarrow:`⇎`,nleq:`≰`,nleqq:uP,nleqslant:dP,nles:fP,nless:`≮`,nLl:pP,nlsim:`≴`,nLt:mP,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:hP,nmid:`∤`,NoBreak:``,NonBreakingSpace:`\xA0`,nopf:gP,Nopf:`ℕ`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:_P,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:vP,NotGreaterGreater:yP,NotGreaterLess:`≹`,NotGreaterSlantEqual:bP,NotGreaterTilde:`≵`,NotHumpDownHump:xP,NotHumpEqual:SP,notin:`∉`,notindot:CP,notinE:wP,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangleBar:TP,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:EP,NotLessSlantEqual:DP,NotLessTilde:`≴`,NotNestedGreaterGreater:OP,NotNestedLessLess:kP,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:AP,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangleBar:jP,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSquareSubset:MP,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:NP,NotSquareSupersetEqual:`⋣`,NotSubset:PP,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:FP,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:IP,NotSuperset:LP,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,nparallel:`∦`,npar:`∦`,nparsl:RP,npart:zP,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,nprec:`⊀`,npreceq:BP,npre:VP,nrarrc:HP,nrarr:`↛`,nrArr:`⇏`,nrarrw:UP,nrightarrow:`↛`,nRightarrow:`⇏`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:WP,Nscr:GP,nscr:KP,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:qP,nsube:`⊈`,nsubset:JP,nsubseteq:`⊈`,nsubseteqq:YP,nsucc:`⊁`,nsucceq:XP,nsup:`⊅`,nsupE:ZP,nsupe:`⊉`,nsupset:QP,nsupseteq:`⊉`,nsupseteqq:$P,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:eF,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`,nvge:tF,nvgt:nF,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:rF,nvlt:iF,nvltrie:aF,nvrArr:`⤃`,nvrtrie:oF,nvsim:sF,nwarhk:`⤣`,nwarr:`↖`,nwArr:`⇖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,Ocirc:`Ô`,ocirc:`ô`,ocir:`⊚`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:cF,ofr:lF,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:uF,oopf:dF,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,orarr:`↻`,Or:`⩔`,or:`∨`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:fF,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,otimesas:`⨶`,Otimes:`⨷`,otimes:`⊗`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,para:`¶`,parallel:`∥`,par:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:pF,pfr:mF,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plus:`+`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,popf:hF,Popf:`ℙ`,pound:`£`,prap:`⪷`,Pr:`⪻`,pr:`≺`,prcue:`≼`,precapprox:`⪷`,prec:`≺`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,pre:`⪯`,prE:`⪳`,precsim:`≾`,prime:`′`,Prime:`″`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportional:`∝`,Proportion:`∷`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:gF,pscr:_F,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:vF,qfr:yF,qint:`⨌`,qopf:bF,Qopf:`ℚ`,qprime:`⁗`,Qscr:xF,qscr:SF,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,QUOT:`"`,rAarr:`⇛`,race:CF,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,Rang:`⟫`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarr:`→`,Rarr:`↠`,rArr:`⇒`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,rAtail:`⤜`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rBarr:`⤏`,RBarr:`⤐`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,Re:`ℜ`,rect:`▭`,reg:`®`,REG:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,rfr:wF,Rfr:`ℜ`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrowBar:`⇥`,rightarrow:`→`,RightArrow:`→`,Rightarrow:`⇒`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVectorBar:`⥕`,RightDownVector:`⇂`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTeeArrow:`↦`,RightTee:`⊢`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangleBar:`⧐`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVectorBar:`⥔`,RightUpVector:`↾`,RightVectorBar:`⥓`,RightVector:`⇀`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoustache:`⎱`,rmoust:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:TF,Ropf:`ℝ`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,rscr:EF,Rscr:`ℛ`,rsh:`↱`,Rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,scap:`⪸`,Scaron:`Š`,scaron:`š`,Sc:`⪼`,sc:`≻`,sccue:`≽`,sce:`⪰`,scE:`⪴`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdotb:`⊡`,sdot:`⋅`,sdote:`⩦`,searhk:`⤥`,searr:`↘`,seArr:`⇘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:DF,sfr:OF,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:``,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:kF,SOFTcy:`Ь`,softcy:`ь`,solbar:`⌿`,solb:`⧄`,sol:`/`,Sopf:AF,sopf:jF,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:MF,sqcup:`⊔`,sqcups:NF,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,square:`□`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squ:`□`,squf:`▪`,srarr:`→`,Sscr:PF,sscr:FF,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,Sub:`⋐`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,Subset:`⋐`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succapprox:`⪸`,succ:`≻`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,sum:`∑`,Sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,Sup:`⋑`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,Supset:`⋑`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swarr:`↙`,swArr:`⇙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:IF,tfr:LF,there4:`∴`,therefore:`∴`,Therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:RF,ThinSpace:` `,thinsp:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,tilde:`˜`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,timesbar:`⨱`,timesb:`⊠`,times:`×`,timesd:`⨰`,tint:`∭`,toea:`⤨`,topbot:`⌶`,topcir:`⫱`,top:`⊤`,Topf:zF,topf:BF,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,TRADE:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:VF,tscr:HF,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,uarr:`↑`,Uarr:`↟`,uArr:`⇑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:UF,ufr:WF,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:GF,uopf:KF,UpArrowBar:`⤒`,uparrow:`↑`,UpArrow:`↑`,Uparrow:`⇑`,UpArrowDownArrow:`⇅`,updownarrow:`↕`,UpDownArrow:`↕`,Updownarrow:`⇕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTeeArrow:`↥`,UpTee:`⊥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:qF,uscr:JF,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,vArr:`⇕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:YF,varsubsetneqq:XF,varsupsetneq:ZF,varsupsetneqq:QF,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vBar:`⫨`,Vbar:`⫫`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,vdash:`⊢`,vDash:`⊨`,Vdash:`⊩`,VDash:`⊫`,Vdashl:`⫦`,veebar:`⊻`,vee:`∨`,Vee:`⋁`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,Verbar:`‖`,vert:`|`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:$F,vfr:eI,vltri:`⊲`,vnsub:tI,vnsup:nI,Vopf:rI,vopf:iI,vprop:`∝`,vrtri:`⊳`,Vscr:aI,vscr:oI,vsubnE:sI,vsubne:cI,vsupnE:lI,vsupne:uI,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,Wedge:`⋀`,wedgeq:`≙`,weierp:`℘`,Wfr:dI,wfr:fI,Wopf:pI,wopf:mI,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:hI,wscr:gI,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:_I,xfr:vI,xharr:`⟷`,xhArr:`⟺`,Xi:`Ξ`,xi:`ξ`,xlarr:`⟵`,xlArr:`⟸`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:yI,xopf:bI,xoplus:`⨁`,xotime:`⨂`,xrarr:`⟶`,xrArr:`⟹`,Xscr:xI,xscr:SI,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:CI,yfr:wI,YIcy:`Ї`,yicy:`ї`,Yopf:TI,yopf:EI,Yscr:DI,yscr:OI,YUcy:`Ю`,yucy:`ю`,yuml:`ÿ`,Yuml:`Ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:``,Zeta:`Ζ`,zeta:`ζ`,zfr:kI,Zfr:`ℨ`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,zopf:AI,Zopf:`ℤ`,Zscr:jI,zscr:MI,zwj:``,zwnj:``}})),FI=N({AElig:()=>`Æ`,AMP:()=>`&`,Aacute:()=>`Á`,Acirc:()=>`Â`,Agrave:()=>`À`,Aring:()=>`Å`,Atilde:()=>`Ã`,Auml:()=>`Ä`,COPY:()=>`©`,Ccedil:()=>`Ç`,ETH:()=>`Ð`,Eacute:()=>`É`,Ecirc:()=>`Ê`,Egrave:()=>`È`,Euml:()=>`Ë`,GT:()=>`>`,Iacute:()=>`Í`,Icirc:()=>`Î`,Igrave:()=>`Ì`,Iuml:()=>`Ï`,LT:()=>`<`,Ntilde:()=>`Ñ`,Oacute:()=>`Ó`,Ocirc:()=>`Ô`,Ograve:()=>`Ò`,Oslash:()=>`Ø`,Otilde:()=>`Õ`,Ouml:()=>`Ö`,QUOT:()=>`"`,REG:()=>`®`,THORN:()=>`Þ`,Uacute:()=>`Ú`,Ucirc:()=>`Û`,Ugrave:()=>`Ù`,Uuml:()=>`Ü`,Yacute:()=>`Ý`,aacute:()=>`á`,acirc:()=>`â`,acute:()=>`´`,aelig:()=>`æ`,agrave:()=>`à`,amp:()=>`&`,aring:()=>`å`,atilde:()=>`ã`,auml:()=>`ä`,brvbar:()=>`¦`,ccedil:()=>`ç`,cedil:()=>`¸`,cent:()=>`¢`,copy:()=>`©`,curren:()=>`¤`,default:()=>II,deg:()=>`°`,divide:()=>`÷`,eacute:()=>`é`,ecirc:()=>`ê`,egrave:()=>`è`,eth:()=>`ð`,euml:()=>`ë`,frac12:()=>`½`,frac14:()=>`¼`,frac34:()=>`¾`,gt:()=>`>`,iacute:()=>`í`,icirc:()=>`î`,iexcl:()=>`¡`,igrave:()=>`ì`,iquest:()=>`¿`,iuml:()=>`ï`,laquo:()=>`«`,lt:()=>`<`,macr:()=>`¯`,micro:()=>`µ`,middot:()=>`·`,nbsp:()=>`\xA0`,not:()=>`¬`,ntilde:()=>`ñ`,oacute:()=>`ó`,ocirc:()=>`ô`,ograve:()=>`ò`,ordf:()=>`ª`,ordm:()=>`º`,oslash:()=>`ø`,otilde:()=>`õ`,ouml:()=>`ö`,para:()=>`¶`,plusmn:()=>`±`,pound:()=>`£`,quot:()=>`"`,raquo:()=>`»`,reg:()=>`®`,sect:()=>`§`,shy:()=>``,sup1:()=>`¹`,sup2:()=>`²`,sup3:()=>`³`,szlig:()=>`ß`,thorn:()=>`þ`,times:()=>`×`,uacute:()=>`ú`,ucirc:()=>`û`,ugrave:()=>`ù`,uml:()=>`¨`,uuml:()=>`ü`,yacute:()=>`ý`,yen:()=>`¥`,yuml:()=>`ÿ`}),II,LI=l((()=>{II={Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,acute:`´`,AElig:`Æ`,aelig:`æ`,Agrave:`À`,agrave:`à`,amp:`&`,AMP:`&`,Aring:`Å`,aring:`å`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,brvbar:`¦`,Ccedil:`Ç`,ccedil:`ç`,cedil:`¸`,cent:`¢`,copy:`©`,COPY:`©`,curren:`¤`,deg:`°`,divide:`÷`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Egrave:`È`,egrave:`è`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,frac12:`½`,frac14:`¼`,frac34:`¾`,gt:`>`,GT:`>`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,iexcl:`¡`,Igrave:`Ì`,igrave:`ì`,iquest:`¿`,Iuml:`Ï`,iuml:`ï`,laquo:`«`,lt:`<`,LT:`<`,macr:`¯`,micro:`µ`,middot:`·`,nbsp:`\xA0`,not:`¬`,Ntilde:`Ñ`,ntilde:`ñ`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Ograve:`Ò`,ograve:`ò`,ordf:`ª`,ordm:`º`,Oslash:`Ø`,oslash:`ø`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,para:`¶`,plusmn:`±`,pound:`£`,quot:`"`,QUOT:`"`,raquo:`»`,reg:`®`,REG:`®`,sect:`§`,shy:``,sup1:`¹`,sup2:`²`,sup3:`³`,szlig:`ß`,THORN:`Þ`,thorn:`þ`,times:`×`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Ugrave:`Ù`,ugrave:`ù`,uml:`¨`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,yen:`¥`,yuml:`ÿ`}})),RI=N({amp:()=>`&`,apos:()=>`'`,default:()=>zI,gt:()=>`>`,lt:()=>`<`,quot:()=>`"`}),zI,BI=l((()=>{zI={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}})),VI=N({default:()=>HI}),HI,UI=l((()=>{HI={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),WI=d((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=t((UI(),n(VI).default)),i=String.fromCodePoint||function(e){var t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function a(e){return e>=55296&&e<=57343||e>1114111?`�`:(e in r.default&&(e=r.default[e]),i(e))}e.default=a})),GI=d((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var r=t((PI(),n(CM).default)),i=t((LI(),n(FI).default)),a=t((BI(),n(RI).default)),o=t(WI()),s=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;e.decodeXML=c(a.default),e.decodeHTMLStrict=c(r.default);function c(e){var t=u(e);return function(e){return String(e).replace(s,t)}}var l=function(e,t){return e<t?1:-1};e.decodeHTML=(function(){for(var e=Object.keys(i.default).sort(l),t=Object.keys(r.default).sort(l),n=0,a=0;n<t.length;n++)e[a]===t[n]?(t[n]+=`;?`,a++):t[n]+=`;`;var o=RegExp(`&(?:`+t.join(`|`)+`|#[xX][\\da-fA-F]+;?|#\\d+;?)`,`g`),s=u(r.default);function c(e){return e.substr(-1)!==`;`&&(e+=`;`),s(e)}return function(e){return String(e).replace(o,c)}})();function u(e){return function(t){if(t.charAt(1)===`#`){var n=t.charAt(2);return n===`X`||n===`x`?o.default(parseInt(t.substr(3),16)):o.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}})),KI=d((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=void 0;var r=o(t((BI(),n(RI).default)).default),i=s(r);e.encodeXML=h(r);var a=o(t((PI(),n(CM).default)).default);e.encodeHTML=d(a,s(a)),e.encodeNonAsciiHTML=h(a);function o(e){return Object.keys(e).sort().reduce(function(t,n){return t[e[n]]=`&`+n+`;`,t},{})}function s(e){for(var t=[],n=[],r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];a.length===1?t.push(`\\`+a):n.push(a)}t.sort();for(var o=0;o<t.length-1;o++){for(var s=o;s<t.length-1&&t[s].charCodeAt(1)+1===t[s+1].charCodeAt(1);)s+=1;var c=1+s-o;c<3||t.splice(o,c,t[o]+`-`+t[s])}return n.unshift(`[`+t.join(``)+`]`),new RegExp(n.join(`|`),`g`)}var c=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,l=String.prototype.codePointAt==null?function(e){return(e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536}:function(e){return e.codePointAt(0)};function u(e){return`&#x`+(e.length>1?l(e):e.charCodeAt(0)).toString(16).toUpperCase()+`;`}function d(e,t){return function(n){return n.replace(t,function(t){return e[t]}).replace(c,u)}}var f=RegExp(i.source+`|`+c.source,`g`);function p(e){return e.replace(f,u)}e.escape=p;function m(e){return e.replace(i,u)}e.escapeUTF8=m;function h(e){return function(t){return t.replace(f,function(t){return e[t]||u(t)})}}})),qI=d((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=GI(),n=KI();function r(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTML)(e)}e.decode=r;function i(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTMLStrict)(e)}e.decodeStrict=i;function a(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)}e.encode=a;var o=KI();Object.defineProperty(e,`encodeXML`,{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(e,`encodeHTML`,{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,`encodeNonAsciiHTML`,{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,`escapeUTF8`,{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(e,`encodeHTML4`,{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,`encodeHTML5`,{enumerable:!0,get:function(){return o.encodeHTML}});var s=GI();Object.defineProperty(e,`decodeXML`,{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(e,`decodeHTML`,{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,`decodeHTMLStrict`,{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,`decodeHTML4`,{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,`decodeHTML5`,{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,`decodeHTML4Strict`,{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,`decodeHTML5Strict`,{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,`decodeXMLStrict`,{enumerable:!0,get:function(){return s.decodeXML}})})),JI=Ve(d(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function a(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw c}}}}function o(e,t){if(e){if(typeof e==`string`)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=qI(),l={fg:`#FFF`,bg:`#000`,newline:!1,escapeXML:!1,stream:!1,colors:u()};function u(){var e={0:`#000`,1:`#A00`,2:`#0A0`,3:`#A50`,4:`#00A`,5:`#A0A`,6:`#0AA`,7:`#AAA`,8:`#555`,9:`#F55`,10:`#5F5`,11:`#FF5`,12:`#55F`,13:`#F5F`,14:`#5FF`,15:`#FFF`};return v(0,5).forEach(function(t){v(0,5).forEach(function(n){v(0,5).forEach(function(r){return d(t,n,r,e)})})}),v(0,23).forEach(function(t){var n=t+232,r=f(t*10+8);e[n]=`#`+r+r+r}),e}function d(e,t,n,r){var i=16+e*36+t*6+n;r[i]=p([e>0?e*40+55:0,t>0?t*40+55:0,n>0?n*40+55:0])}function f(e){for(var t=e.toString(16);t.length<2;)t=`0`+t;return t}function p(e){var t=[],n=a(e),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;t.push(f(i))}}catch(e){n.e(e)}finally{n.f()}return`#`+t.join(``)}function m(e,t,n,r){var i;return t===`text`?i=x(n,r):t===`display`?i=g(e,n,r):t===`xterm256Foreground`?i=w(e,r.colors[n]):t===`xterm256Background`?i=T(e,r.colors[n]):t===`rgb`&&(i=h(e,n)),i}function h(e,t){t=t.substring(2).slice(0,-1);var n=+t.substr(0,2),r=t.substring(5).split(`;`).map(function(e){return(`0`+Number(e).toString(16)).substr(-2)}).join(``);return C(e,(n===38?`color:#`:`background-color:#`)+r)}function g(e,t,n){t=parseInt(t,10);var r={"-1":function(){return`<br/>`},0:function(){return e.length&&_(e)},1:function(){return S(e,`b`)},3:function(){return S(e,`i`)},4:function(){return S(e,`u`)},8:function(){return C(e,`display:none`)},9:function(){return S(e,`strike`)},22:function(){return C(e,`font-weight:normal;text-decoration:none;font-style:normal`)},23:function(){return E(e,`i`)},24:function(){return E(e,`u`)},39:function(){return w(e,n.fg)},49:function(){return T(e,n.bg)},53:function(){return C(e,`text-decoration:overline`)}},i;return r[t]?i=r[t]():4<t&&t<7?i=S(e,`blink`):29<t&&t<38?i=w(e,n.colors[t-30]):39<t&&t<48?i=T(e,n.colors[t-40]):89<t&&t<98?i=w(e,n.colors[8+(t-90)]):99<t&&t<108&&(i=T(e,n.colors[8+(t-100)])),i}function _(e){var t=e.slice(0);return e.length=0,t.reverse().map(function(e){return`</`+e+`>`}).join(``)}function v(e,t){for(var n=[],r=e;r<=t;r++)n.push(r);return n}function y(e){return function(t){return(e===null||t.category!==e)&&e!==`all`}}function b(e){e=parseInt(e,10);var t=null;return e===0?t=`all`:e===1?t=`bold`:2<e&&e<5?t=`underline`:4<e&&e<7?t=`blink`:e===8?t=`hide`:e===9?t=`strike`:29<e&&e<38||e===39||89<e&&e<98?t=`foreground-color`:(39<e&&e<48||e===49||99<e&&e<108)&&(t=`background-color`),t}function x(e,t){return t.escapeXML?c.encodeXML(e):e}function S(e,t,n){return n||=``,e.push(t),`<${t}${n?` style="${n}"`:``}>`}function C(e,t){return S(e,`span`,t)}function w(e,t){return S(e,`span`,`color:`+t)}function T(e,t){return S(e,`span`,`background-color:`+t)}function E(e,t){var n;if(e.slice(-1)[0]===t&&(n=e.pop()),n)return`</`+t+`>`}function D(e,t,n){var r=!1,i=3;function o(){return``}function s(e,t){return n(`xterm256Foreground`,t),``}function c(e,t){return n(`xterm256Background`,t),``}function l(e){return t.newline?n(`display`,-1):n(`text`,e),``}function u(e,t){r=!0,t.trim().length===0&&(t=`0`),t=t.trimRight(`;`).split(`;`);var i=a(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;n(`display`,s)}}catch(e){i.e(e)}finally{i.f()}return``}function d(e){return n(`text`,e),``}function f(e){return n(`rgb`,e),``}var p=[{pattern:/^\x08+/,sub:o},{pattern:/^\x1b\[[012]?K/,sub:o},{pattern:/^\x1b\[\(B/,sub:o},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:f},{pattern:/^\x1b\[38;5;(\d+)m/,sub:s},{pattern:/^\x1b\[48;5;(\d+)m/,sub:c},{pattern:/^\n/,sub:l},{pattern:/^\r+\n/,sub:l},{pattern:/^\r/,sub:l},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:u},{pattern:/^\x1b\[\d?J/,sub:o},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:o},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:o},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:d}];function m(t,n){n>i&&r||(r=!1,e=e.replace(t.pattern,t.sub))}var h=[],g=e.length;outer:for(;g>0;){for(var _=0,v=0,y=p.length;v<y;_=++v){var b=p[_];if(m(b,_),e.length!==g){g=e.length;continue outer}}if(e.length===g)break;h.push(0),g=e.length}return h}function O(e,t,n){return t!==`text`&&(e=e.filter(y(b(n))),e.push({token:t,data:n,category:b(n)})),e}t.exports=function(){function e(t){n(this,e),t||={},t.colors&&=Object.assign({},l.colors,t.colors),this.options=Object.assign({},l,t),this.stack=[],this.stickyStack=[]}return i(e,[{key:`toHtml`,value:function(e){var t=this;e=typeof e==`string`?[e]:e;var n=this.stack,r=this.options,i=[];return this.stickyStack.forEach(function(e){var t=m(n,e.token,e.data,r);t&&i.push(t)}),D(e.join(``),r,function(e,a){var o=m(n,e,a,r);o&&i.push(o),r.stream&&(t.stickyStack=O(t.stickyStack,e,a))}),n.length&&i.push(_(n)),i.join(``)}}]),e}()}))(),1),YI={summary:`max-h-[240px]`,base:`max-h-[288px]`,delegation:`max-h-[768px]`};function XI(e){return YI[e]}var ZI=`whitespace-pre-wrap break-words`;function QI({fullText:e,children:t,className:n,collapsedClassName:r,collapsedStyle:i,expandedClassName:a=ZI}){let[o,s]=(0,B.useState)(!1),c=(0,B.useRef)(null);return(0,V.jsx)(`button`,{ref:c,type:`button`,onClick:()=>{let e=typeof window>`u`?null:window.getSelection();e&&e.toString().length>0||(o&&c.current&&c.current.scrollTo({top:0,behavior:`auto`}),s(e=>!e))},className:[`block w-full cursor-pointer select-text text-left leading-tight transition-[max-height] duration-200 ease-out`,o?a:r,n].filter(Boolean).join(` `),style:o?void 0:i,title:o?`Click to collapse`:e,"aria-expanded":o,children:t})}var $I=4,eL=350,tL=250;function nL(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function rL(e){return nL(e)-e.scrollTop<=$I}function iL(e,t){let n=nL(e);t?e.scrollTo({top:n,behavior:`smooth`}):e.scrollTop=n}function aL({contentKey:e,streaming:t}){let n=(0,B.useRef)(null),r=(0,B.useRef)(!0),i=(0,B.useRef)(!1),a=(0,B.useRef)(0),o=(0,B.useRef)(0),s=(0,B.useRef)(!0),c=(0,B.useRef)(t);(0,B.useEffect)(()=>{let e=c.current;if(c.current=t,!t&&!e)return;let i=n.current;if(!i||!r.current)return;let a=window.performance.now();iL(i,!s.current&&a-o.current>=tL),o.current=a,s.current=!1},[e,t]);let l=(0,B.useCallback)(()=>{a.current=window.performance.now()+eL},[]),u=(0,B.useCallback)(()=>{i.current=!0},[]),d=(0,B.useCallback)(()=>{i.current=!1},[]),f=(0,B.useCallback)(e=>{if(rL(e.currentTarget)){r.current=!0;return}(i.current||window.performance.now()<=a.current)&&(r.current=!1)},[]);return(0,B.useEffect)(()=>{if(t)return window.addEventListener(`pointerup`,d),window.addEventListener(`pointercancel`,d),()=>{window.removeEventListener(`pointerup`,d),window.removeEventListener(`pointercancel`,d)}},[d,t]),{onPointerDown:u,onScroll:f,onTouchMove:l,onTouchStart:l,onWheel:l,ref:n}}function oL(){let e=(0,B.useRef)(null),t=(0,B.useRef)(null),n=(0,B.useRef)(null),[r,i]=(0,B.useState)({above:!1,below:!1}),a=(0,B.useCallback)(e=>{i(t=>t.above===e.above&&t.below===e.below?t:e)},[]);return(0,B.useEffect)(()=>{let r=e.current,i=t.current,o=n.current;if(!r||!i||!o||typeof IntersectionObserver>`u`)return;let s=!0,c=!0,l=new IntersectionObserver(e=>{for(let t of e)t.target===i?s=t.isIntersecting:t.target===o&&(c=t.isIntersecting);a({above:!s,below:!c})},{root:r,threshold:0});return l.observe(i),l.observe(o),()=>{l.disconnect()}},[a]),{scrollRef:e,topSentinelRef:t,bottomSentinelRef:n,aboveOverflow:r.above,belowOverflow:r.below}}function sL({size:e,streaming:t=!1,contentKey:n,className:r,scrollClassName:i,children:a}){let o=aL({contentKey:n,streaming:t}),s=oL(),c=XI(e),{aboveOverflow:l,belowOverflow:u}=s,d=(0,B.useCallback)(e=>{o.onScroll(e)},[o]),f=vt(o.ref,s.scrollRef);return(0,V.jsxs)(`div`,{className:R(`relative isolate min-w-0`,r),"data-detail-scroll":e,children:[(0,V.jsxs)(`div`,{ref:f,onScroll:d,onPointerDown:o.onPointerDown,onTouchMove:o.onTouchMove,onTouchStart:o.onTouchStart,onWheel:o.onWheel,"data-detail-scroll-area":e,className:R(`min-w-0 overflow-auto`,c,i),children:[(0,V.jsx)(`div`,{ref:s.topSentinelRef,"aria-hidden":!0,className:`h-px w-full`}),a,(0,V.jsx)(`div`,{ref:s.bottomSentinelRef,"aria-hidden":!0,className:`h-px w-full`})]}),l?(0,V.jsx)(`div`,{"aria-hidden":!0,"data-detail-scroll-fade":`above`,className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-6 bg-gradient-to-b from-background to-transparent`}):null,u?(0,V.jsx)(`div`,{"aria-hidden":!0,"data-detail-scroll-fade":`below`,className:`pointer-events-none absolute inset-x-0 bottom-0 z-10 h-6 bg-gradient-to-t from-background to-transparent`}):null]})}var cL={display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:2},lL={0:`var(--ansi-0)`,1:`var(--ansi-1)`,2:`var(--ansi-2)`,3:`var(--ansi-3)`,4:`var(--ansi-4)`,5:`var(--ansi-5)`,6:`var(--ansi-6)`,7:`var(--ansi-7)`,8:`var(--ansi-8)`,9:`var(--ansi-9)`,10:`var(--ansi-10)`,11:`var(--ansi-11)`,12:`var(--ansi-12)`,13:`var(--ansi-13)`,14:`var(--ansi-14)`,15:`var(--ansi-15)`},uL=Object.keys(lL).map(Number),dL=`background-color:var(--background)`,fL=`${dL};color:var(--foreground)`;function pL(e){let t=e;for(let e of uL){let n=`background-color:var(--ansi-${e})`;t=t.replaceAll(n,`${n};color:var(--ansi-bg-fg-${e})`)}return t.replaceAll(dL,fL)}var mL=new JI.default({escapeXML:!0,newline:!1,stream:!1,fg:`var(--foreground)`,bg:`var(--background)`,colors:lL});function hL(e){let t=0;for(let n of e)t+=n.length;return t}function gL({commandLine:e,exitCode:t,metadataLines:n,output:r}){return[e?.length??0,hL(n),r.length,t??``].join(`:`)}function _L({commandLine:e,exitCode:t=null,metadataLines:n=[],output:r,streaming:i=!1}){let a=(0,B.useMemo)(()=>r.length>0?pL(mL.toHtml(r)):null,[r]),o=t!==null,s=gL({commandLine:e,exitCode:t,metadataLines:n,output:r});return(0,V.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,V.jsxs)(`div`,{className:`px-4 py-3 font-mono text-xs leading-tight text-foreground`,children:[e?(0,V.jsx)(QI,{fullText:e,collapsedClassName:`max-h-[2lh] overflow-hidden whitespace-pre-wrap break-words`,collapsedStyle:cL,expandedClassName:R(`overflow-auto whitespace-pre-wrap break-words`,XI(`base`)),children:e}):null,n.map((e,t)=>(0,V.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:e},`${t}:${e}`)),a?(0,V.jsx)(sL,{size:`base`,streaming:i,contentKey:s,className:R(e||n.length>0?`mt-1.5`:null),scrollClassName:`whitespace-pre leading-tight text-foreground`,children:(0,V.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a}})}):null,o?(0,V.jsxs)(`div`,{className:R(a||e?`mt-1.5`:null,`font-mono text-xs leading-tight text-muted-foreground`),children:[`exit code `,t]}):null]})})}var vL=`diffs-container`,yL=/(?=^From [a-f0-9]+ .+$)/m,bL=/(?=^diff --git)/gm,xL=/(?=^---\s+\S)/gm,SL=/(?=^@@ )/gm,CL=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,wL=/(?<=\n)/,TL=/^(---|\+\+\+)\s+([^\t\r\n]+)/,EL=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,DL=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,OL=/^index (?:[0-9a-f]+)\.\.(?:[0-9a-f]+)(?: (\d+))?/,kL=`header-metadata`,AL={dark:`pierre-dark`,light:`pierre-light`},jL=`data-unsafe-css`;function ML(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}var NL=class{pre;selectedRange=null;renderedSelectionRange;anchor;_queuedRender;constructor(e={}){this.options=e}setOptions(e){this.options={...this.options,...e},this.removeEventListeners(),this.options.enableLineSelection===!0&&this.attachEventListeners()}cleanUp(){this.removeEventListeners(),this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre!=null&&delete this.pre.dataset.interactiveLineNumbers,this.pre=void 0}setup(e){this.setDirty(),this.pre!==e&&this.cleanUp(),this.pre=e;let{enableLineSelection:t=!1}=this.options;t?(this.pre.dataset.interactiveLineNumbers=``,this.attachEventListeners()):(this.removeEventListeners(),delete this.pre.dataset.interactiveLineNumbers),this.setSelection(this.selectedRange)}setDirty(){this.renderedSelectionRange=void 0}isDirty(){return this.renderedSelectionRange===void 0}setSelection(e){let t=!(e===this.selectedRange||ML(e??void 0,this.selectedRange??void 0));!this.isDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionChange())}getSelection(){return this.selectedRange}attachEventListeners(){this.pre!=null&&(this.removeEventListeners(),this.pre.addEventListener(`pointerdown`,this.handleMouseDown))}removeEventListeners(){this.pre!=null&&(this.pre.removeEventListener(`pointerdown`,this.handleMouseDown),document.removeEventListener(`pointermove`,this.handleMouseMove),document.removeEventListener(`pointerup`,this.handleMouseUp))}handleMouseDown=e=>{let t=e.button===0?this.getMouseEventDataForPath(e.composedPath(),`click`):void 0;if(t==null)return;e.preventDefault();let{lineNumber:n,eventSide:r,lineIndex:i}=t;if(e.shiftKey&&this.selectedRange!=null){let e=this.deriveRowRangeFromDOM(this.selectedRange,this.pre?.dataset.type===`split`);if(e==null)return;let t=e.start<=e.end?i>=e.start:i<=e.end;this.anchor={line:t?this.selectedRange.start:this.selectedRange.end,side:(t?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side)??`additions`},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}else{if(this.selectedRange?.start===n&&this.selectedRange?.end===n){this.updateSelection(null),this.notifySelectionEnd(null),this.notifySelectionChange();return}this.selectedRange=null,this.anchor={line:n,side:r},this.updateSelection(n,r),this.notifySelectionStart(this.selectedRange)}document.addEventListener(`pointermove`,this.handleMouseMove),document.addEventListener(`pointerup`,this.handleMouseUp)};handleMouseMove=e=>{let t=this.getMouseEventDataForPath(e.composedPath(),`move`);if(t==null||this.anchor==null)return;let{lineNumber:n,eventSide:r}=t;this.updateSelection(n,r)};handleMouseUp=()=>{this.anchor=void 0,document.removeEventListener(`pointermove`,this.handleMouseMove),document.removeEventListener(`pointerup`,this.handleMouseUp),this.notifySelectionEnd(this.selectedRange),this.notifySelectionChange()};updateSelection(e,t){if(e==null)this.selectedRange=null;else{let n=this.anchor?.side??t;this.selectedRange={start:this.anchor?.line??e,end:e,side:n,endSide:n===t?void 0:t}}this._queuedRender??=requestAnimationFrame(this.renderSelection)}renderSelection=()=>{if(this._queuedRender!=null&&(cancelAnimationFrame(this._queuedRender),this._queuedRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let t=this.pre.querySelectorAll(`[data-code]`);if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`LineSelectionManager.applySelectionToDOM: Somehow there are more than 2 code elements...`);let n=this.pre.dataset.type===`split`,r=this.deriveRowRangeFromDOM(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`LineSelectionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t)for(let t of e.children){if(!(t instanceof HTMLElement))continue;let e=this.getLineIndex(t,n);if((e??0)>o)break;if(e==null||e<a)continue;let r=i?`single`:e===a?`first`:e===o?`last`:``;t.setAttribute(`data-selected-line`,r),t.nextSibling instanceof HTMLElement&&t.nextSibling.hasAttribute(`data-line-annotation`)&&(i?(r=`last`,t.setAttribute(`data-selected-line`,`first`)):e===a?r=``:e===o&&t.setAttribute(`data-selected-line`,``),t.nextSibling.setAttribute(`data-selected-line`,r))}};deriveRowRangeFromDOM(e,t){if(e==null)return;let n=this.findRowIndexForLineNumber(e.start,e.side,t),r=e.end===e.start&&(e.endSide==null||e.endSide===e.side)?n:this.findRowIndexForLineNumber(e.end,e.endSide??e.side,t);return n!=null&&r!=null?{start:n,end:r}:void 0}findRowIndexForLineNumber(e,t=`additions`,n){if(this.pre==null)return;let r=Array.from(this.pre.querySelectorAll(`[data-line="${e}"]`));if(r.push(...Array.from(this.pre.querySelectorAll(`[data-alt-line="${e}"]`))),r.length!==0){for(let i of r)if(i instanceof HTMLElement&&(this.getLineSideFromElement(i)===t||parseInt(i.dataset.altLine??``)===e))return this.getLineIndex(i,n);console.error(`LineSelectionManager.findRowIndexForLineNumber: Invalid selection`,e,t)}}notifySelectionChange(){let{onLineSelected:e}=this.options;e?.(this.selectedRange??null)}notifySelectionStart(e){let{onLineSelectionStart:t}=this.options;t?.(e)}notifySelectionEnd(e){let{onLineSelectionEnd:t}=this.options;t?.(e)}getMouseEventDataForPath(e,t){let n,r,i=!1,a;for(let t of e)if(t instanceof HTMLElement){if(t.hasAttribute(`data-column-number`)){i=!0;continue}if(t.hasAttribute(`data-line`)){if(n=this.getLineNumber(t),r=this.getLineIndex(t,this.pre?.dataset.type===`split`),t.dataset.lineType===`change-deletion`?a=`deletions`:t.dataset.lineType===`change-additions`&&(a=`additions`),r==null||n==null){r=void 0,n=void 0;break}if(a!=null)break;continue}if(t.hasAttribute(`data-code`)){a??=t.hasAttribute(`data-deletions`)?`deletions`:`additions`;break}}if(!(t===`click`&&!i||r==null||n==null))return{lineIndex:r,lineNumber:n,eventSide:a??`additions`}}getLineNumber(e){let t=parseInt(e.dataset.line??``,10);return Number.isNaN(t)?void 0:t}getLineIndex(e,t){let n=(e.dataset.lineIndex??``).split(`,`).map(e=>parseInt(e)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}getLineSideFromElement(e){if(e.dataset.lineType===`change-deletion`)return`deletions`;if(e.dataset.lineType===`change-addition`)return`additions`;let t=e.closest(`[data-code]`);return t instanceof HTMLElement&&t.hasAttribute(`data-deletions`)?`deletions`:`additions`}};function PL({enableLineSelection:e,onLineSelected:t,onLineSelectionStart:n,onLineSelectionEnd:r}){return{enableLineSelection:e,onLineSelected:t,onLineSelectionStart:n,onLineSelectionEnd:r}}function FL(e,t){return e==null?!1:t===`file`?e.type===`line`:e.type===`diff-line`}function IL(e){return e?.type===`line-info`}var LL=class{hoveredLine;pre;hoverSlot;constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handleMouseClick),this.pre?.removeEventListener(`pointermove`,this.handleMouseMove),this.pre?.removeEventListener(`pointerout`,this.handleMouseLeave),delete this.pre?.dataset.interactiveLines,delete this.pre?.dataset.interactiveLineNumbers,this.pre=void 0}setup(e){let{__debugMouseEvents:t,onLineClick:n,onLineNumberClick:r,onLineEnter:i,onLineLeave:a,onHunkExpand:o,enableHoverUtility:s=!1}=this.options;if(this.cleanUp(),this.pre=e,s&&this.hoverSlot==null){this.hoverSlot=document.createElement(`div`),this.hoverSlot.dataset.hoverSlot=``;let e=document.createElement(`slot`);e.name=`hover-slot`,this.hoverSlot.appendChild(e)}else !s&&this.hoverSlot!=null&&(this.hoverSlot.parentNode?.removeChild(this.hoverSlot),this.hoverSlot=void 0);(n!=null||r!=null||o!=null)&&(e.addEventListener(`click`,this.handleMouseClick),n==null?r!=null&&(e.dataset.interactiveLineNumbers=``):e.dataset.interactiveLines=``,RL(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(n!=null&&e.push(`onLineClick`),r!=null&&e.push(`onLineNumberClick`),o!=null&&e.push(`expandable hunk separators`)),e})())),(i!=null||a!=null||s)&&(e.addEventListener(`pointermove`,this.handleMouseMove),RL(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),e.addEventListener(`pointerleave`,this.handleMouseLeave),RL(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`))}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode===`diff`&&this.hoveredLine.type===`diff-line`)return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode===`file`&&this.hoveredLine.type===`line`)return{lineNumber:this.hoveredLine.lineNumber}}};handleMouseClick=e=>{RL(this.options.__debugMouseEvents,`click`,`FileDiff.DEBUG.handleMouseClick:`,e),this.handleMouseEvent({eventType:`click`,event:e})};handleMouseMove=e=>{RL(this.options.__debugMouseEvents,`move`,`FileDiff.DEBUG.handleMouseMove:`,e),this.handleMouseEvent({eventType:`move`,event:e})};handleMouseLeave=e=>{let{__debugMouseEvents:t}=this.options;if(RL(t,`move`,`FileDiff.DEBUG.handleMouseLeave: no event`),this.hoveredLine==null){RL(t,`move`,`FileDiff.DEBUG.handleMouseLeave: returned early, no .hoveredLine`);return}this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.hoveredLine=void 0};handleMouseEvent({eventType:e,event:t}){let{__debugMouseEvents:n}=this.options,r=t.composedPath();RL(n,e,`FileDiff.DEBUG.handleMouseEvent:`,{eventType:e,composedPath:r});let i=this.getLineData(r);RL(n,e,`FileDiff.DEBUG.handleMouseEvent: getLineData result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onHunkExpand:l}=this.options;switch(e){case`move`:if(FL(i,this.mode)&&this.hoveredLine?.lineElement===i.lineElement){RL(n,`move`,`FileDiff.DEBUG.handleMouseEvent: switch, 'move', returned early because same line`);break}this.hoveredLine!=null&&(RL(n,`move`,`FileDiff.DEBUG.handleMouseEvent: switch, 'move', clearing an existing hovered line and firing onLineLeave`),this.hoverSlot?.parentElement?.removeChild(this.hoverSlot),c?.({...this.hoveredLine,event:t}),this.hoveredLine=void 0),FL(i,this.mode)&&(RL(n,`move`,`FileDiff.DEBUG.handleMouseEvent: switch, 'move', setting up a new hoveredLine and firing onLineEnter`),this.hoveredLine=i,this.hoverSlot!=null&&i.numberElement?.appendChild(this.hoverSlot),s?.({...this.hoveredLine,event:t}));break;case`click`:if(RL(n,`click`,`FileDiff.DEBUG.handleMouseEvent: switch, 'click', with data:`,i),i==null)break;if(IL(i)&&l!=null){RL(n,`click`,`FileDiff.DEBUG.handleMouseEvent: switch, 'click', expanding a hunk`),l(i.hunkIndex,i.direction);break}FL(i,this.mode)&&(o!=null&&i.numberColumn?(RL(n,`click`,`FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineNumberClick'`),o({...i,event:t})):a==null?RL(n,`click`,`FileDiff.DEBUG.handleMouseEvent: switch, 'click', fell through, no event to fire`):(RL(n,`click`,`FileDiff.DEBUG.handleMouseEvent: switch, 'click', firing 'onLineClick'`),a({...i,event:t})));break}}getLineData(e){let t=!1,n=e.find(e=>e instanceof HTMLElement?(t||=`columnNumber`in e.dataset,`line`in e.dataset||`expandIndex`in e.dataset):!1);if(!(n instanceof HTMLElement))return;if(n.dataset.expandIndex!=null){let t=parseInt(n.dataset.expandIndex);if(isNaN(t))return;let r;for(let t of e)if(t===n||t instanceof HTMLElement&&(r=r??(`expandUp`in t.dataset?`up`:void 0)??(`expandDown`in t.dataset?`down`:void 0)??(`expandBoth`in t.dataset?`both`:void 0),r!=null))break;return r==null?void 0:{type:`line-info`,hunkIndex:t,direction:r}}let r=parseInt(n.dataset.line??``);if(isNaN(r))return;let i=n.dataset.lineType;if(i!==`context`&&i!==`context-expanded`&&i!==`change-deletion`&&i!==`change-addition`)return;let a=(()=>{let e=n.children[0];return e instanceof HTMLElement&&e.dataset.columnNumber!=null?e:void 0})();return this.mode===`file`?{type:`line`,lineElement:n,lineNumber:r,numberElement:a,numberColumn:t}:{type:`diff-line`,annotationSide:(()=>{if(i===`change-deletion`)return`deletions`;if(i===`change-addition`)return`additions`;let e=n.closest(`[data-code]`);return e instanceof HTMLElement&&`deletions`in e.dataset?`deletions`:`additions`})(),lineType:i,lineElement:n,numberElement:a,lineNumber:r,numberColumn:t}}};function RL(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return;break}console.log(...n)}function zL({onLineClick:e,onLineNumberClick:t,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:a},o){return{onLineClick:e,onLineNumberClick:t,onLineEnter:n,onLineLeave:r,enableHoverUtility:i,__debugMouseEvents:a,onHunkExpand:o}}var BL=class{observedNodes=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear()}resizeObserver;setup(e){this.cleanUp();let t=e.querySelectorAll(`[data-line-annotation*=","]`);this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);let n=e.querySelectorAll(`code`);for(let e of n){let t=e.querySelector(`[data-column-number]`);t instanceof HTMLElement||(t=null);let n={type:`code`,codeElement:e,numberElement:t,codeWidth:`auto`,numberWidth:0};this.observedNodes.set(e,n),this.resizeObserver.observe(e),t!=null&&(this.observedNodes.set(t,n),this.resizeObserver.observe(t))}if(n.length<=1)return;let r=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let{lineAnnotation:t=``}=e.dataset;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,r]=t,i=n.firstElementChild,a=r.firstElementChild;if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement))continue;let o={type:`annotations`,column1:{container:n,child:i,childHeight:0},column2:{container:r,child:a,childHeight:0},currentHeight:`auto`};this.observedNodes.set(i,o),this.observedNodes.set(a,o),this.resizeObserver.observe(i),this.resizeObserver.observe(a)}}handleResizeObserver=e=>{for(let t of e){let{target:e,borderBoxSize:n}=t;if(!(e instanceof HTMLElement)){console.error(`FileDiff.handleResizeObserver: Invalid element for ResizeObserver`,t);continue}let r=this.observedNodes.get(e);if(r==null){console.error(`FileDiff.handleResizeObserver: Not a valid observed node`,t);continue}let i=n[0];if(r.type===`annotations`){let t=(()=>{if(e===r.column1.child)return r.column1;if(e===r.column2.child)return r.column2})();if(t==null){console.error(`FileDiff.handleResizeObserver: Couldn't find a column for`,{item:r,target:e});continue}t.childHeight=i.blockSize;let n=Math.max(r.column1.childHeight,r.column2.childHeight);n!==r.currentHeight&&(r.currentHeight=Math.max(n,0),r.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${r.currentHeight}px`),r.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${r.currentHeight}px`))}else r.type===`code`&&(e===r.codeElement?i.inlineSize!==r.codeWidth&&(r.codeWidth=i.inlineSize,r.codeElement.style.setProperty(`--diffs-column-content-width`,`${Math.max(r.codeWidth-r.numberWidth,0)}px`),r.codeElement.style.setProperty(`--diffs-column-width`,`${r.codeWidth}px`)):e===r.numberElement&&i.inlineSize!==r.numberWidth&&(r.numberWidth=i.inlineSize,r.codeElement.style.setProperty(`--diffs-column-number-width`,`${r.numberWidth}px`),r.codeWidth!==`auto`&&r.codeElement.style.setProperty(`--diffs-column-content-width`,`${Math.max(r.codeWidth-r.numberWidth,0)}px`)))}}},VL=new Map,HL=new Map,UL=new Set;function WL(e){for(let t of Array.isArray(e)?e:[e])if(!UL.has(t))return!1;return!0}function GL(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(UL.has(n.name))continue;let e=VL.get(n.name);e??(e=n,VL.set(n.name,e)),UL.add(e.name),t.loadLanguageSync(e.data)}}function KL(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var qL=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function JL(e){return YL(e)}function YL(e){return Array.isArray(e)?XL(e):e instanceof RegExp?e:typeof e==`object`?ZL(e):e}function XL(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=YL(e[n]);return t}function ZL(e){let t={};for(let n in e)t[n]=YL(e[n]);return t}function QL(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function $L(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?$L(e.substring(0,e.length-1)):e.substr(~t+1)}var eR=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,tR=class{static hasCaptures(e){return e===null?!1:(eR.lastIndex=0,eR.test(e))}static replaceCaptures(e,t,n){return e.replace(eR,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function nR(e,t){return e<t?-1:+(e>t)}function rR(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=nR(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function iR(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function aR(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var oR=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},sR=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(fR(e),t)}static createFromParsedTheme(e,t){return hR(e,t)}_cachedMatchRoot=new oR(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>lR(e.parent,t.parentScopes));return n?new dR(n.fontStyle,n.foreground,n.background):null}},cR=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function lR(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!uR(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function uR(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var dR=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function fR(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&iR(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&iR(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new pR(l,u,e,o,s,c)}}return n}var pR=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},mR=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(mR||{});function hR(e,t){e.sort((e,t)=>{let n=nR(e.scope,t.scope);return n!==0||(n=rR(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new gR(t),o=new dR(n,a.getId(r),a.getId(i)),s=new yR(new vR(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new sR(a,o,s)}var gR=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},_R=Object.freeze([]),vR=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||_R,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},yR=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),vR.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(rR(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new vR(e,t,n,r,i))}},bR=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=SR(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function xR(e){return e}function SR(e){return e}function CR(e,t){let n=[],r=TR(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(wR(i)){let e=[];do e.push(i),i=r.next();while(wR(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function wR(e){return!!e&&!!e.match(/[\w\.:]+/)}function TR(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ER(e){typeof e.dispose==`function`&&e.dispose()}var DR=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},OR=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},kR=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},AR=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new DR(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new kR;for(let n of e)jR(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof DR){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function jR(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof DR?NR({baseGrammar:a,selfGrammar:i},r):MR(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new DR(e))}function MR(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];PR([r],t,n)}}function NR(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&PR(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&PR(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function PR(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?QL({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&PR(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=BR(i);switch(a.kind){case 0:NR({...t,selfGrammar:t.baseGrammar},n);break;case 1:NR(t,n);break;case 2:MR(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?MR(a.ruleName,i,n):NR(i,n)}else a.kind===4?n.add(new OR(a.scopeName,a.ruleName)):n.add(new DR(a.scopeName));break}}}var FR=class{kind=0},IR=class{kind=1},LR=class{constructor(e){this.ruleName=e}kind=2},RR=class{constructor(e){this.scopeName=e}kind=3},zR=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function BR(e){if(e===`$base`)return new FR;if(e===`$self`)return new IR;let t=e.indexOf(`#`);return t===-1?new RR(e):t===0?new LR(e.substring(1)):new zR(e.substring(0,t),e.substring(t+1))}var VR=/\\(\d+)/,HR=/\\(\d+)/g,UR=-1,WR=-2;function GR(e){return e}function KR(e){return e}var qR=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=tR.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=tR.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${$L(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:tR.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:tR.replaceCaptures(this._contentName,e,t)}},JR=class extends qR{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},YR=class extends qR{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ez(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new tz,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},XR=class extends qR{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new tz,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ZR=class extends qR{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new ez(i,this.id),this.beginCaptures=a,this._end=new ez(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new tz;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},QR=class extends qR{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new ez(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new ez(o,WR),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new tz;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new tz,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},$R=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new JR(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new YR(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=QL({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new XR(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new QR(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ZR(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=BR(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof XR||e instanceof ZR||e instanceof QR)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ez=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=VR.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return HR.lastIndex=0,this.source.replace(HR,(e,t)=>aR(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},tz=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new nz(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new nz(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},nz=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
56
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},rz=class{constructor(e,t){this.languageId=e,this.tokenType=t}},iz=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new rz(e,8),this._embeddedLanguagesMatcher=new az(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new rz(0,0);_getBasicScopeAttributes=new oR(e=>new rz(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},az=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>aR(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var oz=!1,sz=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function cz(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=lz(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new sz(i,!0);f()}return new sz(i,!1);function f(){let o=uz(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===UR){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),gz(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof ZR){let r=o;gz(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof QR){let r=o;gz(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(gz(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function lz(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof QR&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=mz(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==WR){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),gz(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function uz(e,t,n,r,i,a){let o=dz(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=fz(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function dz(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=pz(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function fz(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=pz(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function pz(e,t,n,r,i){return oz?{ruleScanner:e.compile(t,n),findOptions:hz(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function mz(e,t,n,r,i){return oz?{ruleScanner:e.compileWhile(t,n),findOptions:hz(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function hz(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function gz(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));cz(e,p,n&&d.start===0,d.start,f,i,!1,0),ER(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new _z(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var _z=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function vz(e,t,n,r,i,a,o,s){return new Sz(e,t,n,r,i,a,o,s)}function yz(e,t,n,r,i){let a=CR(t,bz),o=$R.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function bz(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(xz(t[r],e))return n=r+1,!0;return!1})}function xz(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Sz=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new iz(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Cz(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=CR(e,bz);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)yz(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&yz(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(GR(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[KR(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Cz(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=$R.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Tz.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=bR.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?wz.createRootAndLookUpScopeName(a,r,this):wz.createRoot(`unknown`,r),t=new Tz(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
57
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new Dz(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=cz(this,a,i,0,t,s,!0,r);return ER(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Cz(e,t){return e=JL(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var wz=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=cR.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new cR(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new cR(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),bR.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Tz=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?wz.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:KR(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=wz.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,GR(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,wz.fromExtension(r,n.contentNameScopesList))}},Ez=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):CR(e,bz).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>CR(e,bz).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Dz=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=bR.set(n,0,xR(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=bR.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Oz=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,vz(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},kz=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Oz(sR.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(sR.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Ez(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new AR(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Az=Tz.NULL,jz=/["&'<>`]/g,Mz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nz=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pz=/[|\\{}()[\]^$+*?.]/g,Fz=new WeakMap;function Iz(e,t){if(e=e.replace(t.subset?Lz(t.subset):jz,r),t.subset||t.escapeOnly)return e;return e.replace(Mz,n).replace(Nz,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Lz(e){let t=Fz.get(e);return t||(t=Rz(e),Fz.set(e,t)),t}function Rz(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Pz,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var zz=/[\dA-Fa-f]/;function Bz(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!zz.test(String.fromCharCode(t))?r:r+`;`}var Vz=/\d/;function Hz(e,t,n){let r=`&#`+String(e);return n&&t&&!Vz.test(String.fromCharCode(t))?r:r+`;`}var Uz=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Wz={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Gz=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Kz={}.hasOwnProperty,qz={},Jz;for(Jz in Wz)Kz.call(Wz,Jz)&&(qz[Wz[Jz]]=Jz);var Yz=/[^\dA-Za-z]/;function Xz(e,t,n,r){let i=String.fromCharCode(e);if(Kz.call(qz,i)){let e=qz[i],a=`&`+e;return n&&Uz.includes(e)&&!Gz.includes(e)&&(!r||t&&t!==61&&Yz.test(String.fromCharCode(t)))?a:a+`;`}return``}function Zz(e,t,n){let r=Bz(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Xz(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Hz(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Qz(e,t){return Iz(e,Object.assign({format:Zz},t))}var $z=/^>|^->|<!--|-->|--!>|<!-$/g,eB=[`>`],tB=[`<`,`>`];function nB(e,t,n,r){return r.settings.bogusComments?`<?`+Qz(e.value,Object.assign({},r.settings.characterReferences,{subset:eB}))+`>`:`<!--`+e.value.replace($z,i)+`-->`;function i(e){return Qz(e,Object.assign({},r.settings.characterReferences,{subset:tB}))}}function rB(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var iB=sB(1),aB=sB(-1),oB=[];function sB(e){return t;function t(t,n,r){let i=t?t.children:oB,a=(n||0)+e,o=i[a];if(!r)for(;o&&nh(o);)a+=e,o=i[a];return o}}var cB={}.hasOwnProperty;function lB(e){return t;function t(t,n,r){return cB.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var uB=lB({body:pB,caption:dB,colgroup:dB,dd:_B,dt:gB,head:dB,html:fB,li:hB,optgroup:yB,option:bB,p:mB,rp:vB,rt:vB,tbody:SB,td:TB,tfoot:CB,th:TB,thead:xB,tr:wB});function dB(e,t,n){let r=iB(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&nh(r.value.charAt(0)))}function fB(e,t,n){let r=iB(n,t);return!r||r.type!==`comment`}function pB(e,t,n){let r=iB(n,t);return!r||r.type!==`comment`}function mB(e,t,n){let r=iB(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function hB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&r.tagName===`li`}function gB(e,t,n){let r=iB(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function _B(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function vB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function yB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function bB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function xB(e,t,n){let r=iB(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function SB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function CB(e,t,n){return!iB(n,t)}function wB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function TB(e,t,n){let r=iB(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var EB=lB({body:kB,colgroup:AB,head:OB,html:DB,tbody:jB});function DB(e){let t=iB(e,-1);return!t||t.type!==`comment`}function OB(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function kB(e){let t=iB(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&nh(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function AB(e,t,n){let r=aB(n,t),i=iB(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&uB(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function jB(e,t,n){let r=aB(n,t),i=iB(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&uB(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var MB={name:[[`
|
|
58
|
+
\f\r &/=>`.split(``),`
|
|
59
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
60
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
61
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
62
|
+
\f\r &>`.split(``),`\0
|
|
63
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
64
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
65
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function NB(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Lh);let l=PB(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!EB(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!uB(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function PB(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=FB(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function FB(e,t,n){let r=Nh(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Qz(r.attribute,Object.assign({},e.settings.characterReferences,{subset:MB.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Xm:zh)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Qz(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:MB.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&hD(n,o)>hD(n,e.alternative)&&(o=e.alternative),s=o+Qz(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?MB.single:MB.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var IB=[`<`,`&`];function LB(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Qz(e.value,Object.assign({},r.settings.characterReferences,{subset:IB}))}function RB(e,t,n,r){return r.settings.allowDangerousHtml?e.value:LB(e,t,n,r)}function zB(e,t,n,r){return r.all(e)}var BB=lS(`type`,{invalid:VB,unknown:HB,handlers:{comment:nB,doctype:rB,element:NB,raw:RB,root:zB,text:LB}});function VB(e){throw Error("Expected node, not `"+e+"`")}function HB(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var UB={},WB={},GB=[];function KB(e,t){let n=t||UB,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qB,all:JB,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||CS,characterReferences:n.characterReferences||WB,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Lh:Ih,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function qB(e,t,n){return BB(e,t,n,this)}function JB(e){let t=[],n=e&&e.children||GB,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function YB(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function XB(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function ZB(e){return Array.isArray(e)?e:[e]}async function QB(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function $B(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function eV(e){return e===`ansi`||$B(e)}function tV(e){return e===`none`}function nV(e){return tV(e)}function rV(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function iV(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function aV(e){let t=iV(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function oV(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var sV=`light-dark()`,cV=[`color`,`background-color`];function lV(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function uV(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?lV(e,t):e})):e}function dV(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>fV(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&cV.includes(a))if(r===sV&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new qL('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function fV(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&mR.Italic&&(t[`font-style`]=`italic`),e.fontStyle&mR.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&mR.Underline&&n.push(`underline`),e.fontStyle&mR.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function pV(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var mV=new WeakMap;function hV(e,t){mV.set(e,t)}function gV(e){return mV.get(e)}var _V=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(ZB(n).map(e=>[e,Az])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return vV(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function vV(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function yV(e,t){if(!(e instanceof _V))throw new qL(`Invalid grammar state`);return e.getInternalStack(t)}function bV(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new qL(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new qL(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new qL(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=aV(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));xV(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return uV(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new qL(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=SV(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new qL(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new qL(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&rV(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function xV(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new qL(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new qL(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function SV(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(SV).join(``):``}var CV=[bV()];function wV(e){let t=TV(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...CV]}function TV(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var EV=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],DV={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function OV(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function kV(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function AV(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)DV[r]&&t.push({type:`setDecoration`,value:DV[r]});else if(r<=29){let e=DV[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:EV[r-30]}});else if(r===38){let n=kV(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:EV[r-40]}});else if(r===48){let n=kV(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:EV[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:EV[r-100+8]}})}return t}function jV(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=OV(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=AV(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var MV={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function NV(e=MV){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<EV.length;e++)r.push(t(EV[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var PV={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function FV(e,t,n){let r=YB(e,n),i=iV(t),a=NV(Object.fromEntries(EV.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||PV[t]]}))),o=jV();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=XB(i,r),o=XB(o,r),n.decorations.has(`dim`)&&(i=IV(i));let s=mR.None;return n.decorations.has(`bold`)&&(s|=mR.Bold),n.decorations.has(`italic`)&&(s|=mR.Italic),n.decorations.has(`underline`)&&(s|=mR.Underline),n.decorations.has(`strikethrough`)&&(s|=mR.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function IV(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function LV(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if($B(i)||tV(r))return iV(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return FV(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new qL(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new qL(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return zV(t,s,a,o,n)}function RV(...e){if(e.length===2)return gV(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if($B(i)||tV(a))throw new qL(`Plain language does not have grammar state`);if(i===`ansi`)throw new qL(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new _V(BV(n,c,o,s,r).stateStack,c.name,o.name)}function zV(e,t,n,r,i){let a=BV(e,t,n,r,i),o=new _V(a.stateStack,t.name,n.name);return hV(a.tokens,o),a.tokens}function BV(e,t,n,r,i){let a=YB(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=iV(e),l=i.grammarState?yV(i.grammarState,n.name)??Az:i.grammarContextCode==null?Az:BV(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=XB(r[bR.getForeground(s)],a),l=bR.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?VV(t.scopes):HV(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function VV(e){return e.map(e=>({scopeName:e}))}function HV(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:GV(e,i,t.slice(0,r))}}return n}function UV(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function WV(e,t,n){if(!UV(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)UV(e[r],n[i])&&--r,--i;return r===-1}function GV(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(WV(e,t,n)){r.push(a);break}return r}function KV(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=LV(e,t,{...n,theme:r.theme});return{tokens:i,state:gV(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=qV(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new _V(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&hV(o,s),o}function qV(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function JV(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new qL("`themes` option must not be empty");let p=KV(e,t,n);if(c=gV(p),l&&sV!==l&&!f.find(e=>e.color===l))throw new qL(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>dV(e,h,u,l,d))),c&&hV(a,c);let g=f.map(e=>YB(e.theme,n));i=YV(f,m,g,u,l,`fg`,d),r=YV(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=YB(n.theme,n);a=LV(e,t,n);let l=e.getTheme(n.theme);r=XB(l.bg,s),i=XB(l.fg,s),o=l.name,c=gV(a)}else throw new qL("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function YV(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=XB(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===sV&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new qL('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${XB(t[r][a],n[r])||`inherit`}, ${XB(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function XV(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>XV(e,t,n),codeToTokens:(t,n)=>JV(e,t,n)}){let i=t;for(let e of wV(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=JV(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=QV(a):d===`never`&&(a=$V(a)),f&&(a=eH(a));let p={...r,get source(){return i}};for(let e of wV(n))a=e.tokens?.call(p,a)||a;return ZV(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function ZV(e,t,n,r=gV(e)){let i=wV(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:rV,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
66
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=pV(a.htmlStyle||fV(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&hV(m,r),m}function QV(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&mR.Underline||i.fontStyle&mR.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function $V(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function eH(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=pV(e.htmlStyle||fV(e)),i=pV(n.htmlStyle||fV(n)),a=e.fontStyle&&(e.fontStyle&mR.Underline||e.fontStyle&mR.Strikethrough),o=n.fontStyle&&(n.fontStyle&mR.Underline||n.fontStyle&mR.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var tH=KB;function nH(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>XV(e,t,n),codeToTokens:(t,n)=>JV(e,t,n)},i=tH(XV(e,t,n,r));for(let e of wV(n))i=e.postprocess?.call(r,i,n)||i;return i}var rH={light:`#333333`,dark:`#bbbbbb`},iH={light:`#fffffe`,dark:`#1e1e1e`},aH=`__shiki_resolved`;function oH(e){if(e?.[aH])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?rH.light:rH.dark,n||=t.type===`light`?iH.light:iH.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,aH,{enumerable:!1,writable:!1,value:!0}),t}async function sH(e){return Array.from(new Set((await Promise.all(e.filter(e=>!eV(e)).map(async e=>await QB(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function cH(e){return(await Promise.all(e.map(async e=>nV(e)?null:oH(await QB(e))))).filter(e=>!!e)}var lH=3,uH=!1;function dH(e,t=3){if(lH&&!(typeof lH==`number`&&t>lH)){if(uH)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var fH=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function pH(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new fH(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var mH=class extends kz{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=oH(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=sR.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=pH(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new fH(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},hH=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},gH=0;function _H(e){gH+=1,e.warnings!==!1&&gH>=10&&gH%10==0&&console.warn(`[Shiki] ${gH} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new fH("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(oH),i=new mH(new hH(e.engine,n),r,n,e.langAlias),a;function o(t){return pH(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new fH(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new fH(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await sH(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await cH(e))}function g(){if(t)throw new fH(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--gH)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function vH(e){e.engine||dH("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([cH(e.themes||[]),sH(e.langs||[]),e.engine]);return _H({...e,themes:t,langs:n,engine:r})}async function yH(e){let t=await vH(e);return{getLastGrammarState:(...e)=>RV(t,...e),codeToTokensBase:(e,n)=>LV(t,e,n),codeToTokensWithThemes:(e,n)=>KV(t,e,n),codeToTokens:(e,n)=>JV(t,e,n),codeToHast:(e,n)=>XV(t,e,n),codeToHtml:(e,n)=>nH(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function bH(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,eV(n))return[];let r=t[n];if(!r)throw new qL(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(nV(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new qL(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await yH({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function xH(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function SH(e,t){let n=xH(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var CH=[{id:`abap`,name:`ABAP`,import:(()=>z(()=>import(`./abap-B7RnWQOG.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>z(()=>import(`./actionscript-3-CRl2BRXz.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>z(()=>import(`./ada-CySgk42_.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>z(()=>import(`./angular-html-CN4B7z8Z.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>z(()=>import(`./angular-ts-Be9rCyh7.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>z(()=>import(`./apache-CQgWNR0K.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>z(()=>import(`./apex-CFa_x2c9.js`),[]))},{id:`apl`,name:`APL`,import:(()=>z(()=>import(`./apl-C-09mkOY.js`),__vite__mapDeps([7,3,1,2,4,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>z(()=>import(`./applescript-CCGt--QU.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>z(()=>import(`./ara-CJYv1XlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>z(()=>import(`./asciidoc-DxgPoKvx.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>z(()=>import(`./asm-2LyQSByb.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>z(()=>import(`./astro-DQR04HMP.js`),__vite__mapDeps([11,3,1,4,8,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>z(()=>import(`./awk-adfNbTQc.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>z(()=>import(`./ballerina-G1jH5Moz.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>z(()=>import(`./bat-CHXtPpft.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>z(()=>import(`./beancount-EfboDiXG.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>z(()=>import(`./berry-DAhQzFBm.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>z(()=>import(`./bibtex-CanpD3m2.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>z(()=>import(`./bicep-Cc0u08ve.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>z(()=>import(`./bird2-BmGSmafQ.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>z(()=>import(`./blade-CHOb28s9.js`),__vite__mapDeps([15,3,1,16,2,4,8,17,9,10])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>z(()=>import(`./bsl-9Rfj8X2G.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>z(()=>import(`./c-Czi5ZOPg.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>z(()=>import(`./c3-Bld9q8eN.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>z(()=>import(`./cadence-_3OaglmQ.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>z(()=>import(`./cairo-B8t0-PSB.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>z(()=>import(`./clarity-CVKtZWJu.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>z(()=>import(`./clojure-C4w8xKrn.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>z(()=>import(`./cmake-DuxpWyxB.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>z(()=>import(`./cobol-C0UrcShI.js`),__vite__mapDeps([23,2,1,3,4,10])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>z(()=>import(`./codeowners-BYgLRiPG.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>z(()=>import(`./codeql-DmJo4bmm.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>z(()=>import(`./coffee-DLCACHKU.js`),__vite__mapDeps([24,4,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>z(()=>import(`./common-lisp-xmwdM7sj.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>z(()=>import(`./coq-D004aLp-.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>z(()=>import(`./cpp-CKRDyJLk.js`).then(e=>e.n),__vite__mapDeps([25,1,26,20,27,17])))},{id:`crystal`,name:`Crystal`,import:(()=>z(()=>import(`./crystal-DzdlwfxO.js`),__vite__mapDeps([28,20,1,3,2,4,29,17])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>z(()=>import(`./csharp-BJRWJrkS.js`),[]))},{id:`css`,name:`CSS`,import:(()=>z(()=>import(`./css-J88DqgyO.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`csv`,name:`CSV`,import:(()=>z(()=>import(`./csv-Cx2EO4hN.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>z(()=>import(`./cue-BFvpulfw.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>z(()=>import(`./cypher-CloxltJj.js`),[]))},{id:`d`,name:`D`,import:(()=>z(()=>import(`./d-ByN-nCZx.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>z(()=>import(`./dart-jaYeqpH7.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>z(()=>import(`./dax-CQDoOssZ.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>z(()=>import(`./desktop-DssJfs2S.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>z(()=>import(`./diff-DGLbp6Xl.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>z(()=>import(`./docker-B7aZDRTU.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>z(()=>import(`./dotenv-D3KyAIK0.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>z(()=>import(`./dream-maker-CjPuR0vx.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>z(()=>import(`./edge-BiusF5O8.js`),__vite__mapDeps([30,16,2,1,3,4,14])))},{id:`elixir`,name:`Elixir`,import:(()=>z(()=>import(`./elixir-DVV1N8WB.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>z(()=>import(`./elm-ZwoouJdM.js`),__vite__mapDeps([32,26,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>z(()=>import(`./emacs-lisp-BHg7FqFZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>z(()=>import(`./erb-6WVNn8lP.js`),__vite__mapDeps([33,2,1,3,4,34,20,25,26,27,17,35,36,13,14,37,38,29,9,10,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>z(()=>import(`./erlang-CdOz9ruD.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>z(()=>import(`./fennel-DG6hK7z2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>z(()=>import(`./fish-_zY__9L4.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>z(()=>import(`./fluent-BBz3hVA9.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>z(()=>import(`./fortran-fixed-form-BmD2L0UY.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>z(()=>import(`./fortran-free-form-Db24aQuN.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>z(()=>import(`./fsharp-DgKUr7h2.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>z(()=>import(`./gdresource-BqgTfeIa.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>z(()=>import(`./gdscript-CxxY7zMa.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>z(()=>import(`./gdshader-W85lNgcx.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>z(()=>import(`./genie-2WOhOayX.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>z(()=>import(`./gherkin-BsQJenZD.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>z(()=>import(`./git-commit-CPnaL3nl.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>z(()=>import(`./git-rebase-CI6iVcd4.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>z(()=>import(`./gleam-BjFNd70h.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>z(()=>import(`./glimmer-js-MU0okVIL.js`),__vite__mapDeps([51,3,1,2,4,14])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>z(()=>import(`./glimmer-ts-BXJcqrHb.js`),__vite__mapDeps([52,3,1,2,4,14])))},{id:`glsl`,name:`GLSL`,import:(()=>z(()=>import(`./glsl-CthKK13_.js`).then(e=>e.n),__vite__mapDeps([26,1,20])))},{id:`gn`,name:`GN`,import:(()=>z(()=>import(`./gn-MXj_EEiV.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>z(()=>import(`./gnuplot-C40vWoS_.js`),[]))},{id:`go`,name:`Go`,import:(()=>z(()=>import(`./go-B2Qj-jpc.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>z(()=>import(`./graphql-Cfx6sMIN.js`).then(e=>e.n),__vite__mapDeps([35,1,4,36,13,14])))},{id:`groovy`,name:`Groovy`,import:(()=>z(()=>import(`./groovy-42TXi0JD.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>z(()=>import(`./hack-Cfn0L20S.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>z(()=>import(`./haml-DpOUW3De.js`).then(e=>e.n),__vite__mapDeps([37,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>z(()=>import(`./handlebars-Dq6TUqDg.js`),__vite__mapDeps([54,3,1,2,4,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>z(()=>import(`./haskell-C5VEzHiR.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>z(()=>import(`./haxe-DxCG7g2C.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>z(()=>import(`./hcl-B-KEcm-b.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>z(()=>import(`./hjson-KcqWy6wG.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>z(()=>import(`./hlsl-CU9ay1Rj.js`),[]))},{id:`html`,name:`HTML`,import:(()=>z(()=>import(`./html-CrFhd97J.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>z(()=>import(`./html-derivative-SXrZiT2S.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>z(()=>import(`./http-BxRXAeum.js`),__vite__mapDeps([55,35,1,4,36,13,14,8,29,9,10])))},{id:`hurl`,name:`Hurl`,import:(()=>z(()=>import(`./hurl-BsAa903H.js`),__vite__mapDeps([56,57,35,1,4,36,13,14,9,10])))},{id:`hxml`,name:`HXML`,import:(()=>z(()=>import(`./hxml-DlOl0PEf.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>z(()=>import(`./hy-9kqolRdI.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>z(()=>import(`./imba-AWBATAYY.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>z(()=>import(`./ini-P5JLg6LV.js`),[]))},{id:`java`,name:`Java`,import:(()=>z(()=>import(`./java-BZRe3u16.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>z(()=>import(`./javascript-YzZUmjcN.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`jinja`,name:`Jinja`,import:(()=>z(()=>import(`./jinja-CkL9mgnB.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>z(()=>import(`./jison-DY01LEsx.js`),__vite__mapDeps([61,4,1])))},{id:`json`,name:`JSON`,import:(()=>z(()=>import(`./json-DeVTS63Q.js`).then(e=>e.n),__vite__mapDeps([8,1])))},{id:`json5`,name:`JSON5`,import:(()=>z(()=>import(`./json5-Cj9weIvR.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>z(()=>import(`./jsonc-CwVZHrLL.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>z(()=>import(`./jsonl-CfYcxfNz.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>z(()=>import(`./jsonnet-B351KcBZ.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>z(()=>import(`./jssm-CVNVxyp8.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>z(()=>import(`./jsx-B73xjEBK.js`).then(e=>e.n),__vite__mapDeps([36,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>z(()=>import(`./julia-D5UCqxaX.js`),__vite__mapDeps([62,25,1,26,20,27,17,4,22,63])))},{id:`just`,name:`Just`,import:(()=>z(()=>import(`./just-BfeKX4XX.js`),__vite__mapDeps([64,4,1,65,3,2,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39])))},{id:`kdl`,name:`KDL`,import:(()=>z(()=>import(`./kdl-B2a5Hdo5.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>z(()=>import(`./kotlin-CwntYu9G.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>z(()=>import(`./kusto-DzqQhEgS.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>z(()=>import(`./latex-CllT7gYn.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>z(()=>import(`./lean-CLemLjY9.js`),[]))},{id:`less`,name:`Less`,import:(()=>z(()=>import(`./less-Dycz37IB.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>z(()=>import(`./liquid-Bgz2sjbj.js`),__vite__mapDeps([68,3,1,2,4,8])))},{id:`llvm`,name:`LLVM IR`,import:(()=>z(()=>import(`./llvm-B3vA1z1w.js`),[]))},{id:`log`,name:`Log file`,import:(()=>z(()=>import(`./log-CM4eTPwH.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>z(()=>import(`./logo-DCYIDlXZ.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>z(()=>import(`./lua-CKg4_5Yw.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>z(()=>import(`./luau-B3LrvOEt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>z(()=>import(`./make-Bep3F-fA.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>z(()=>import(`./markdown-BObkjWCp.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>z(()=>import(`./marko-CSplXaxm.js`),__vite__mapDeps([69,3,1,70,6,14])))},{id:`matlab`,name:`MATLAB`,import:(()=>z(()=>import(`./matlab-BjvFQgI4.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>z(()=>import(`./mdc-CR1bPJlt.js`),__vite__mapDeps([71,16,2,1,3,4,41,39])))},{id:`mdx`,name:`MDX`,import:(()=>z(()=>import(`./mdx-DnKU9cqA.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>z(()=>import(`./mermaid-CH8Qvaqo.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>z(()=>import(`./mipsasm-OAAwCDEg.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>z(()=>import(`./mojo-COx3BOEA.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>z(()=>import(`./moonbit-ChOfdbnC.js`),[]))},{id:`move`,name:`Move`,import:(()=>z(()=>import(`./move-jwG4QUY4.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>z(()=>import(`./narrat-Bv3slmdi.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>z(()=>import(`./nextflow-CK5HLJvq.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>z(()=>import(`./nextflow-groovy-CYeLXiaP.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>z(()=>import(`./nginx-Chba8emm.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>z(()=>import(`./nim-BJOCNxTB.js`),__vite__mapDeps([75,20,1,3,26,2,4,41,9,10])))},{id:`nix`,name:`Nix`,import:(()=>z(()=>import(`./nix-CcOD1khX.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>z(()=>import(`./nushell-GFe6C8D1.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>z(()=>import(`./objective-c-Da4gtNmU.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>z(()=>import(`./objective-cpp-Du3a_PKx.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>z(()=>import(`./ocaml-4v1g0DKj.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>z(()=>import(`./odin-C2CG6fMn.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>z(()=>import(`./openscad-Bs2SxlcB.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>z(()=>import(`./pascal-B6AuHgs_.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>z(()=>import(`./perl-DtYnB2VK.js`),__vite__mapDeps([65,3,1,2,4,17,9,10])))},{id:`php`,name:`PHP`,import:(()=>z(()=>import(`./php-Cm6MwVxd.js`),__vite__mapDeps([76,3,1,2,4,8,17,9,10])))},{id:`pkl`,name:`Pkl`,import:(()=>z(()=>import(`./pkl-BuPFXprX.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>z(()=>import(`./plsql-DQ_z5ed2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>z(()=>import(`./po-BvHij3iO.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>z(()=>import(`./polar-p_EVOYp2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>z(()=>import(`./postcss-BVVH-mhK.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>z(()=>import(`./powerquery-D2htabf9.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>z(()=>import(`./powershell-NfY3J8Uu.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>z(()=>import(`./prisma-CMeP8UTm.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>z(()=>import(`./prolog-Cc9yvHML.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>z(()=>import(`./proto-CNBX21YV.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>z(()=>import(`./pug-Cs95QZUY.js`),__vite__mapDeps([77,3,1,2,4])))},{id:`puppet`,name:`Puppet`,import:(()=>z(()=>import(`./puppet-ZnM2F-kY.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>z(()=>import(`./purescript-nyLIIaTP.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>z(()=>import(`./python-Dt6SBvxD.js`),[]))},{id:`qml`,name:`QML`,import:(()=>z(()=>import(`./qml-DV4H8TeV.js`),__vite__mapDeps([78,4,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>z(()=>import(`./qmldir-BDEiw2QJ.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>z(()=>import(`./qss-B8ZOZZRM.js`),[]))},{id:`r`,name:`R`,import:(()=>z(()=>import(`./r-BOwNWtkP.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>z(()=>import(`./racket-emNFhxM0.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>z(()=>import(`./raku-M_VGm79k.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>z(()=>import(`./razor-rzD3KE0N.js`),__vite__mapDeps([79,80,2,1,3,4])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>z(()=>import(`./reg-rRGLqGjW.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>z(()=>import(`./regexp-D5UpjLq1.js`).then(e=>e.n),__vite__mapDeps([27,1])))},{id:`rel`,name:`Rel`,import:(()=>z(()=>import(`./rel-DqcQFa7Q.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>z(()=>import(`./riscv-CanSyeO8.js`),[]))},{id:`ron`,name:`RON`,import:(()=>z(()=>import(`./ron-BQ46iNCb.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>z(()=>import(`./rosmsg-Bw0HfGe_.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>z(()=>import(`./rst-nRBldbnW.js`),__vite__mapDeps([81,82,25,1,26,20,27,17,16,2,3,4,22,34,35,36,13,14,37,38,29,9,10,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>z(()=>import(`./ruby-DK9_UnsF.js`),__vite__mapDeps([34,20,1,25,26,27,17,3,35,4,36,13,14,37,2,38,29,9,10,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>z(()=>import(`./rust-D83UuV7F.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>z(()=>import(`./sas-BxxScrc4.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>z(()=>import(`./sass-CE2YZJdE.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>z(()=>import(`./scala-CyYhociv.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>z(()=>import(`./scheme-BrRWQ1yX.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>z(()=>import(`./scss-dYaO_Ssw.js`).then(e=>e.n),__vite__mapDeps([6,1,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>z(()=>import(`./sdbl-CtZR2I6R.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>z(()=>import(`./shaderlab-jhHUXThs.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>z(()=>import(`./shellscript-BGY92qaj.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>z(()=>import(`./shellsession-DHio1RBs.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>z(()=>import(`./smalltalk-DGeW9hbd.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>z(()=>import(`./solidity-46G7JVSr.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>z(()=>import(`./soy-CWnh82_C.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>z(()=>import(`./sparql-D050l-1j.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>z(()=>import(`./splunk-DKgoBk9o.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>z(()=>import(`./sql-BgOSYFXh.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>z(()=>import(`./ssh-config-JoXpWa3y.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>z(()=>import(`./stata-Di5c1EGu.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>z(()=>import(`./stylus-BPw8WnNN.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>z(()=>import(`./surrealql-CKgBuPai.js`),__vite__mapDeps([91,4,1])))},{id:`svelte`,name:`Svelte`,import:(()=>z(()=>import(`./svelte-DGNSQgHP.js`),__vite__mapDeps([92,3,1,4,12,14])))},{id:`swift`,name:`Swift`,import:(()=>z(()=>import(`./swift-Ce2Nlw8Q.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>z(()=>import(`./system-verilog-Dkc37EdI.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>z(()=>import(`./systemd-CcJTFvpw.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>z(()=>import(`./talonscript-CHxC2PG4.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>z(()=>import(`./tasl-woKXKJkx.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>z(()=>import(`./tcl-6FTtarFH.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>z(()=>import(`./templ--mBJoDNy.js`),__vite__mapDeps([93,3,1,94,4])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>z(()=>import(`./terraform-DHx5Kdyi.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>z(()=>import(`./tex-Drg-gBC1.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>z(()=>import(`./toml-BCbG8Uu3.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>z(()=>import(`./ts-tags-_EoiaFc_.js`),__vite__mapDeps([95,3,1,26,20,2,4,17,14,9,10])))},{id:`tsv`,name:`TSV`,import:(()=>z(()=>import(`./tsv-Bfk0YRxN.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>z(()=>import(`./tsx-C3E3ZPo7.js`).then(e=>e.n),__vite__mapDeps([13,1])))},{id:`turtle`,name:`Turtle`,import:(()=>z(()=>import(`./turtle-DsCF_r1D.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>z(()=>import(`./twig-BkmJOmf1.js`),__vite__mapDeps([96,3,1,4,76,2,8,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39,6])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>z(()=>import(`./typescript-zC8doK3K.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>z(()=>import(`./typespec-tsneGPKg.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>z(()=>import(`./typst-BcQNhVIE.js`),[]))},{id:`v`,name:`V`,import:(()=>z(()=>import(`./v-CPbK5D5K.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>z(()=>import(`./vala-CTmcnleK.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>z(()=>import(`./vb-iQRhK9Tp.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>z(()=>import(`./verilog-BxRFSB3_.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>z(()=>import(`./vhdl-D4h06VsC.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>z(()=>import(`./viml-DMcwh6Y2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>z(()=>import(`./vue-Dqnq1uw7.js`),__vite__mapDeps([97,3,1,16,2,4,8,14])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>z(()=>import(`./vue-html-CZNe_SnY.js`),__vite__mapDeps([98,4,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>z(()=>import(`./vue-vine-ChEJZJ0Y.js`),__vite__mapDeps([99,3,1,4,70,12,6,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>z(()=>import(`./vyper-DfAPtbtc.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>z(()=>import(`./wasm-ByDQ9GrP.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>z(()=>import(`./wenyan-DNkN8oQc.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>z(()=>import(`./wgsl-Bggw1Yhv.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>z(()=>import(`./wikitext-zXy-4mpr.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>z(()=>import(`./wit--vc2X9vR.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>z(()=>import(`./wolfram-Dr60-Zy4.js`),[]))},{id:`xml`,name:`XML`,import:(()=>z(()=>import(`./xml-DHqUJISw.js`).then(e=>e.n),__vite__mapDeps([9,1,10])))},{id:`xsl`,name:`XSL`,import:(()=>z(()=>import(`./xsl-B_xW8s_z.js`),__vite__mapDeps([101,9,1,10])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>z(()=>import(`./yaml-CHAY15k-.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>z(()=>import(`./zenscript-Cf2Qp-oj.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>z(()=>import(`./zig-DgUQodsP.js`),[]))}],wH=Object.fromEntries(CH.map(e=>[e.id,e.import])),TH=Object.fromEntries(CH.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),EH={...wH,...TH},DH=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>z(()=>import(`./andromeeda-Bnm9WW1a.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>z(()=>import(`./aurora-x-DfOR6O80.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>z(()=>import(`./ayu-dark-ADZF52JZ.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>z(()=>import(`./ayu-light-CMMeLqXc.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>z(()=>import(`./ayu-mirage-BZvrYN67.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-frappe-Dn0XJ8jj.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>z(()=>import(`./catppuccin-latte-D25Kwd8S.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-macchiato-Bc6w_RYC.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>z(()=>import(`./catppuccin-mocha-Di4PH8Ri.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>z(()=>import(`./dark-plus-BRQ4k4kr.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>z(()=>import(`./dracula-6-t2eOMW.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>z(()=>import(`./dracula-soft-B4TZzIlp.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>z(()=>import(`./everforest-dark-B4IVVaS6.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>z(()=>import(`./everforest-light-CNoEiPUu.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>z(()=>import(`./github-dark-DH2_Q6FX.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>z(()=>import(`./github-dark-default-DTF8deNx.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>z(()=>import(`./github-dark-dimmed-BvtnYOMy.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>z(()=>import(`./github-dark-high-contrast-CQhqa0EF.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>z(()=>import(`./github-light-t2gQwbnC.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>z(()=>import(`./github-light-default-9rPElOua.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>z(()=>import(`./github-light-high-contrast-Drx2T_ea.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-hard-DaxQoAo9.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-medium-CR6ynfxn.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>z(()=>import(`./gruvbox-dark-soft-QoKQNR_B.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-hard-C3-JuKAe.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-medium-676URJw_.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>z(()=>import(`./gruvbox-light-soft-BGpHIYJO.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>z(()=>import(`./horizon-BDDUNMOh.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>z(()=>import(`./horizon-bright-Km86OX7k.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>z(()=>import(`./houston-CnK3oLKP.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-dragon-Bg-BKRuP.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>z(()=>import(`./kanagawa-lotus-CVGoMXw8.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>z(()=>import(`./kanagawa-wave-CuNbEAGB.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>z(()=>import(`./laserwave-Bf5KiZGG.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>z(()=>import(`./light-plus-BISup5vO.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>z(()=>import(`./material-theme-jZt3rhQh.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>z(()=>import(`./material-theme-darker-DM1OIivA.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>z(()=>import(`./material-theme-lighter-HtgpH1FU.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>z(()=>import(`./material-theme-ocean-CeFuXoRG.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>z(()=>import(`./material-theme-palenight-BMg4YxS6.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>z(()=>import(`./min-dark-B95jFnY0.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>z(()=>import(`./min-light-CqwYUont.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>z(()=>import(`./monokai-C988KBom.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>z(()=>import(`./night-owl-SjOLjRtB.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>z(()=>import(`./night-owl-light-DHrEzBAj.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>z(()=>import(`./nord-BGjNHkRW.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>z(()=>import(`./one-dark-pro-BwcbXd-T.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>z(()=>import(`./one-light-BOQW5zin.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>z(()=>import(`./plastic-BiAROaFC.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>z(()=>import(`./poimandres-BbdNMHGS.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>z(()=>import(`./red-BcYVa2Jk.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-BuTm62Vj.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>z(()=>import(`./rose-pine-dawn-B670NuiP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>z(()=>import(`./rose-pine-moon-6KoQonQX.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>z(()=>import(`./slack-dark-nxsbRL6U.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>z(()=>import(`./slack-ochin-Cx2HX71B.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>z(()=>import(`./snazzy-light-508iEJO_.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>z(()=>import(`./solarized-dark-TCkigWjM.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>z(()=>import(`./solarized-light-R2Rcjqww.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>z(()=>import(`./synthwave-84-Br2i7yYN.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>z(()=>import(`./tokyo-night-BQsIhA-A.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>z(()=>import(`./vesper-D_U9vezF.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>z(()=>import(`./vitesse-black-Dk8H62LF.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>z(()=>import(`./vitesse-dark-BuiSS132.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>z(()=>import(`./vitesse-light-DfdaVJLv.js`),[]))}].map(e=>[e.id,e.import])),OH=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function kH(){return 2147483648}function AH(){return typeof performance<`u`?performance.now():Date.now()}var jH=(e,t)=>e+(t-e%t)%t;async function MH(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=kH();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,jH(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:AH,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var NH=Object.defineProperty,PH=(e,t,n)=>t in e?NH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FH=(e,t,n)=>PH(e,typeof t==`symbol`?t:t+``,n),IH=null;function LH(e){throw new OH(e.UTF8ToString(e.getLastOnigError()))}var RH=class e{constructor(t){FH(this,`utf16Length`),FH(this,`utf8Length`),FH(this,`utf16Value`),FH(this,`utf8Value`),FH(this,`utf16OffsetToUtf8`),FH(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},zH=class e{constructor(t){if(FH(this,`id`,++e.LAST_ID),FH(this,`_onigBinding`),FH(this,`content`),FH(this,`utf16Length`),FH(this,`utf8Length`),FH(this,`utf16OffsetToUtf8`),FH(this,`utf8OffsetToUtf16`),FH(this,`ptr`),!IH)throw new OH(`Must invoke loadWasm first.`);this._onigBinding=IH,this.content=t;let n=new RH(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=IH.omalloc(1e4),e._sharedPtrInUse=!0,IH.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(IH)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};FH(zH,`LAST_ID`,0),FH(zH,`_sharedPtr`,0),FH(zH,`_sharedPtrInUse`,!1);var BH=zH,VH=class{constructor(e){if(FH(this,`_onigBinding`),FH(this,`_ptr`),!IH)throw new OH(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new RH(e[r]);t[r]=i.createString(IH),n[r]=i.utf8Length}let r=IH.omalloc(4*e.length);IH.HEAPU32.set(t,r/4);let i=IH.omalloc(4*e.length);IH.HEAPU32.set(n,i/4);let a=IH.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)IH.ofree(t[n]);IH.ofree(i),IH.ofree(r),a===0&&LH(IH),this._onigBinding=IH,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new BH(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function HH(e){return typeof e.instantiator==`function`}function UH(e){return typeof e.default==`function`}function WH(e){return e.data!==void 0}function GH(e){return typeof Response<`u`&&e instanceof Response}function KH(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var qH;function JH(e){if(qH)return qH;async function t(){IH=await MH(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),HH(n)?n=await n.instantiator(t):UH(n)?n=await n.default(t):(WH(n)&&(n=n.data),GH(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await XH(n)(t):await ZH(n)(t):KH(n)||n instanceof WebAssembly.Module?n=await YH(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await YH(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return qH=t(),qH}function YH(e){return t=>WebAssembly.instantiate(e,t)}function XH(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ZH(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function QH(e){return e&&await JH(e),{createScanner(e){return new VH(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new BH(e)}}}var $H=bH({langs:EH,themes:DH,engine:()=>QH(z(()=>import(`./wasm-CfmxG3B2.js`),[]))}),{codeToHtml:eU,codeToHast:tU,codeToTokens:nU,codeToTokensBase:rU,codeToTokensWithThemes:iU,getSingletonHighlighter:aU,getLastGrammarState:oU}=SH($H,{guessEmbeddedLanguages:oV});function sU(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function cU(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var lU=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),uU=String.raw;function dU(e,t){if(e==null)throw Error(t??`Value expected`);return e}var fU=uU`\[\^?`,pU=`c.? | C(?:-.?)?|${uU`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${uU`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${uU`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${uU`o\{[^\}]*\}?`}|${uU`\d{1,3}`}`,mU=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,hU=new RegExp(uU`
|
|
67
|
+
\\ (?:
|
|
68
|
+
${pU}
|
|
69
|
+
| [gk]<[^>]*>?
|
|
70
|
+
| [gk]'[^']*'?
|
|
71
|
+
| .
|
|
72
|
+
)
|
|
73
|
+
| \( (?:
|
|
74
|
+
\? (?:
|
|
75
|
+
[:=!>({]
|
|
76
|
+
| <[=!]
|
|
77
|
+
| <[^>]*>
|
|
78
|
+
| '[^']*'
|
|
79
|
+
| ~\|?
|
|
80
|
+
| #(?:[^)\\]|\\.?)*
|
|
81
|
+
| [^:)]*[:)]
|
|
82
|
+
)?
|
|
83
|
+
| \*[^\)]*\)?
|
|
84
|
+
)?
|
|
85
|
+
| (?:${mU.source})+
|
|
86
|
+
| ${fU}
|
|
87
|
+
| .
|
|
88
|
+
`.replace(/\s+/g,``),`gsu`),gU=new RegExp(uU`
|
|
89
|
+
\\ (?:
|
|
90
|
+
${pU}
|
|
91
|
+
| .
|
|
92
|
+
)
|
|
93
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
94
|
+
| ${fU}
|
|
95
|
+
| &&
|
|
96
|
+
| .
|
|
97
|
+
`.replace(/\s+/g,``),`gsu`);function _U(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=qU(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(hU.lastIndex=0;s=hU.exec(e);){let t=vU(a,e,s[0],hU.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(hU.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?YU(e,u):e).flat(),flags:r}}function vU(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=yU(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:CU(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:LU(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:wU(n)}}if(a===`K`)return{token:jU(`keep`,n)};if(a===`N`||a===`R`)return{token:AU(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:AU(`any`,n)};if(a===`X`)return{token:AU(`text_segment`,n)};let e=xU(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:HU(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:VU(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:PU(`group`,n)};if(n===`(?>`)return{token:PU(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:PU(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:PU(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:PU(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:NU(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
98
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:AU(`dot`,n)}:n===`^`||n===`$`?{token:CU(e.singleline?{"^":uU`\A`,$:uU`\Z`}[n]:n,n)}:n===`|`?{token:SU(n)}:mU.test(n)?{tokens:XU(n)}:{token:TU(sU(n),n)}}function yU(e,t,n){let r=[kU(t[1]===`^`,t)],i=1,a;for(gU.lastIndex=n;a=gU.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(kU(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(TU(93,e));else if(i--,r.push(EU(e)),!i)break}else{let t=bU(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:gU.lastIndex||e.length}}function bU(e){if(e[0]===`\\`)return xU(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!lU.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return AU(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?DU(e):e===`&&`?OU(e):TU(sU(e),e)}function xU(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return BU(e);if(`dDhHsSwW`.includes(n))return WU(e);if(e.startsWith(uU`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return GU(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return TU(sU(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return TU(JU(e),e);if(zU.has(n))return TU(zU.get(n),e);if(/\d/.test(n))return MU(t,e);if(e===`\\`)throw Error(uU`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return TU(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function SU(e){return{type:`Alternator`,raw:e}}function CU(e,t){return{type:`Assertion`,kind:e,raw:t}}function wU(e){return{type:`Backreference`,raw:e}}function TU(e,t){return{type:`Character`,value:e,raw:t}}function EU(e){return{type:`CharacterClassClose`,raw:e}}function DU(e){return{type:`CharacterClassHyphen`,raw:e}}function OU(e){return{type:`CharacterClassIntersector`,raw:e}}function kU(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function AU(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function jU(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:dU(n.flags),raw:t}}function MU(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function NU(e){return{type:`GroupClose`,raw:e}}function PU(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function FU(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function IU(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function LU(e){return{type:`Subroutine`,raw:e}}var RU=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),zU=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function BU(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return TU(sU(t.toUpperCase())-64,e)}function VU(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=KU(n),o=KU(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),jU(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,PU(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function HU(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=RU.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return FU(l,r??null,i?.split(`,`)??null,e)}function UU(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return IU(t,n,r,e)}function WU(e){let t=e[1].toLowerCase();return AU({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function GU(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return AU(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function KU(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function qU(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function JU(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function YU(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[wU(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(uU`Octal encoded byte above 177 unsupported "${n}"`)}else r=sU(t);a.push(TU(r,(e===0?`\\`:``)+t))}return a}function XU(e){let t=[],n=new RegExp(mU,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(UU(e.slice(0,-1)));continue}}}t.push(UU(e))}return t}function ZU(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function QU(e){return $U.has(e.type)}var $U=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function eW(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=_U(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return uW();case`Assertion`:return tW(n);case`Backreference`:return nW(n,a);case`Character`:return mW(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return rW(n,a,t);case`CharacterClassOpen`:return iW(n,a,t);case`CharacterSet`:return aW(n,a);case`Directive`:return vW(n.kind,{flags:n.flags});case`GroupOpen`:return oW(n,a,t);case`NamedCallout`:return SW(n.kind,n.tag,n.arguments);case`Quantifier`:return sW(n,a);case`Subroutine`:return cW(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=TW(yW(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(uU`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(uU`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function tW({kind:e}){return dW(dU({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===uU`\B`||e===uU`\Y`})}function nW({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,fW(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return fW(r)}return i(+r)}function rW(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),gW(o,e);throw Error(`Invalid character class range`)}return mW(sU(`-`))}function iW({negate:e},t,n){let{tokens:r,walk:i}=t,a=r[t.nextIndex],o=[hW()],s=IW(a);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)o.push(hW()),t.nextIndex++;else{let e=o.at(-1);e.body.push(i(e,n))}s=IW(r[t.nextIndex],a)}let c=hW({negate:e});return o.length===1?c.body=o[0].body:(c.kind=`intersection`,c.body=o.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function aW({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=FW(n);if(lU.has(r)&&!o?.has(r))e=`posix`,n=r;else return DW(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?CW(n,{negate:t}):_W(e,{negate:t})}function oW(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=OW(e),l=c.type===`AbsenceFunction`,u=MW(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&cU(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=LW(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(uW()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(jW(t)||t.type===`CapturingGroup`)throw Error(e)}else if(jW(t)||MW(t)&&t.negate)throw Error(e)}}f=LW(r[t.nextIndex])}return t.nextIndex++,c}function sW({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!QU(a))throw Error(`Quantifier requires a repeatable token`);let o=wW(e,t,n,a);return i.body.pop(),o}function cW({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=EW(i);return r.push(o),o}function lW(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:kW(t?.body)}}function uW(e){return{type:`Alternative`,body:AW(e?.body)}}function dW(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function fW(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function pW(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!NW(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:kW(t?.body)}}function mW(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function hW(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:AW(e?.body)}}function gW(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function _W(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function vW(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:dU(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function yW(e){return{type:`Flags`,...e}}function bW(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:kW(e?.body)}}function xW(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:kW(e?.body)}}function SW(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function CW(e,t){let n=!!t?.negate;if(!lU.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function wW(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function TW(e,t){return{type:`Regex`,body:kW(t?.body),flags:e}}function EW(e){return{type:`Subroutine`,ref:e}}function DW(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(FW(e));if(!r){if(n.normalizeUnknownPropertyNames)r=PW(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(uU`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function OW({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return lW(`repeater`);case`atomic`:return bW({atomic:!0});case`capturing`:return pW(i,{name:n});case`group`:return bW({flags:e});case`lookahead`:case`lookbehind`:return xW({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function kW(e){if(e===void 0)e=[uW()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function AW(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function jW(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function MW(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function NW(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function PW(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function FW(e){return e.replace(/[- _]+/g,``).toLowerCase()}function IW(e,t){return dU(e,`${t?.type===`Character`&&t.value===93?`Empty`:`Unclosed`} character class`)}function LW(e){return dU(e,`Unclosed group`)}function RW(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){zW(c).splice(Math.max(0,BW(s)+l),1),l--,u=!0},removeAllNextSiblings(){return zW(c).splice(BW(s)+1)},removeAllPrevSiblings(){let e=BW(s)+l;return l-=e,zW(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,BW(s)+l)]=e:dU(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(zW(c).splice(Math.max(0,BW(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,BW(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`CapturingGroup`:case`Group`:r(a.body,a);break;case`Alternative`:case`CharacterClass`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`LookaroundAssertion`:r(a.body,a);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function zW(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function BW(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var VW=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function HW(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function UW(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var WW=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function GW(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===WW.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?WW.CHAR_CLASS:WW.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function KW(e,t,n,r){GW(e,t,n,r)}function qW(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===WW.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function JW(e,t,n){return!!qW(e,t,0,n)}function YW(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var XW=new RegExp(String.raw`(?<noncapturingStart>${VW})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function ZW(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(XW.lastIndex=Number.isNaN(c)?0:c+7;f=XW.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),HW(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=GW(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},WW.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var QW=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,$W=new RegExp(String.raw`
|
|
99
|
+
\\(?: \d+
|
|
100
|
+
| c[A-Za-z]
|
|
101
|
+
| [gk]<[^>]+>
|
|
102
|
+
| [pPu]\{[^\}]+\}
|
|
103
|
+
| u[A-Fa-f\d]{4}
|
|
104
|
+
| x[A-Fa-f\d]{2}
|
|
105
|
+
)
|
|
106
|
+
| \((?: \? (?: [:=!>]
|
|
107
|
+
| <(?:[=!]|[^>]+>)
|
|
108
|
+
| [A-Za-z\-]+:
|
|
109
|
+
| \(DEFINE\)
|
|
110
|
+
))?
|
|
111
|
+
| (?<qBase>${QW})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
112
|
+
| \\?.
|
|
113
|
+
`.replace(/\s+/g,``),`gsu`);function eG(e){if(!RegExp(`${QW}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for($W.lastIndex=0;o=$W.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=UW(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}$W.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var tG=String.raw,nG=tG`\(\?R=(?<rDepth>[^\)]+)\)|${tG`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,rG=tG`\(\?<(?![=!])(?<captureName>[^>]+)>`,iG=tG`${rG}|(?<unnamed>\()(?!\?)`,aG=new RegExp(tG`${rG}|${nG}|\(\?|\\?.`,`gsu`),oG=`Cannot use multiple overlapping recursions`;function sG(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(nG,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&JW(e,tG`\(\?\(DEFINE\)`,WW.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=JW(e,tG`\\[1-9]`,WW.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(aG.lastIndex=0;f=aG.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(cG(m),l)throw Error(oG);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(aG.lastIndex);if(JW(s,nG,WW.DEFAULT))throw Error(oG);let c=m-1;e=lG(t,s,c,!1,n,a,d),i=fG(i,t,c,a.length,0,d);break}else if(h){cG(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(oG);break}if(!u)throw Error(tG`Recursive \g cannot be used outside the referenced group "${r===`external`?h:tG`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=YW(e,p);if(o&&JW(m,tG`${rG}|\((?!\?)`,WW.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=lG(_,v,b,!0,n,a,d);i=fG(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,aG.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),aG.lastIndex),s.set(p,aG.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),aG.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function cG(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function lG(e,t,n,r,i,a,o){let s=new Set;r&&KW(e+t,rG,({groups:{captureName:e}})=>{s.add(e)},WW.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${uG(`(?:${e}`,`forward`,...c)}(?:)${uG(`${t})`,`backward`,...c)}${t}`}function uG(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=GW(e,tG`${iG}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),dG(i,n),s?e:`(?<${t}${l}>`}return tG`\k<${c}${l}>`},WW.DEFAULT)}return c}function dG(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function fG(e,t,n,r,i,a){if(e.size&&r){let o=0;KW(t,iG,()=>o++,WW.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var pG=String.fromCodePoint,mG=String.raw,hG={flagGroups:!0,unicodeSets:!0};hG.bugFlagVLiteralHyphenIsRange=hG.unicodeSets?(()=>{try{new RegExp(mG`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,hG.bugNestedClassIgnoresNegation=hG.unicodeSets&&RegExp(`[[^a]]`,`v`).test(`a`);function gG(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function _G(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function vG(e,t){return bG[e]>=bG[t]}function yG(e,t){if(e==null)throw Error(t??`Value expected`);return e}var bG={ES2025:2025,ES2024:2024,ES2018:2018},xG={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function SG(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!xG[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=hG.flagGroups?`ES2025`:hG.unicodeSets?`ES2024`:`ES2018`),t}var CG=`[ -\r ]`,wG=new Set([pG(304),pG(305)]),TG=mG`[\p{L}\p{M}\p{N}\p{Pc}]`;function EG(e){if(wG.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=AG.get(n),a=OG.get(n),o=kG.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var DG=new Map(`C Other
|
|
114
|
+
Cc Control cntrl
|
|
115
|
+
Cf Format
|
|
116
|
+
Cn Unassigned
|
|
117
|
+
Co Private_Use
|
|
118
|
+
Cs Surrogate
|
|
119
|
+
L Letter
|
|
120
|
+
LC Cased_Letter
|
|
121
|
+
Ll Lowercase_Letter
|
|
122
|
+
Lm Modifier_Letter
|
|
123
|
+
Lo Other_Letter
|
|
124
|
+
Lt Titlecase_Letter
|
|
125
|
+
Lu Uppercase_Letter
|
|
126
|
+
M Mark Combining_Mark
|
|
127
|
+
Mc Spacing_Mark
|
|
128
|
+
Me Enclosing_Mark
|
|
129
|
+
Mn Nonspacing_Mark
|
|
130
|
+
N Number
|
|
131
|
+
Nd Decimal_Number digit
|
|
132
|
+
Nl Letter_Number
|
|
133
|
+
No Other_Number
|
|
134
|
+
P Punctuation punct
|
|
135
|
+
Pc Connector_Punctuation
|
|
136
|
+
Pd Dash_Punctuation
|
|
137
|
+
Pe Close_Punctuation
|
|
138
|
+
Pf Final_Punctuation
|
|
139
|
+
Pi Initial_Punctuation
|
|
140
|
+
Po Other_Punctuation
|
|
141
|
+
Ps Open_Punctuation
|
|
142
|
+
S Symbol
|
|
143
|
+
Sc Currency_Symbol
|
|
144
|
+
Sk Modifier_Symbol
|
|
145
|
+
Sm Math_Symbol
|
|
146
|
+
So Other_Symbol
|
|
147
|
+
Z Separator
|
|
148
|
+
Zl Line_Separator
|
|
149
|
+
Zp Paragraph_Separator
|
|
150
|
+
Zs Space_Separator
|
|
151
|
+
ASCII
|
|
152
|
+
ASCII_Hex_Digit AHex
|
|
153
|
+
Alphabetic Alpha
|
|
154
|
+
Any
|
|
155
|
+
Assigned
|
|
156
|
+
Bidi_Control Bidi_C
|
|
157
|
+
Bidi_Mirrored Bidi_M
|
|
158
|
+
Case_Ignorable CI
|
|
159
|
+
Cased
|
|
160
|
+
Changes_When_Casefolded CWCF
|
|
161
|
+
Changes_When_Casemapped CWCM
|
|
162
|
+
Changes_When_Lowercased CWL
|
|
163
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
164
|
+
Changes_When_Titlecased CWT
|
|
165
|
+
Changes_When_Uppercased CWU
|
|
166
|
+
Dash
|
|
167
|
+
Default_Ignorable_Code_Point DI
|
|
168
|
+
Deprecated Dep
|
|
169
|
+
Diacritic Dia
|
|
170
|
+
Emoji
|
|
171
|
+
Emoji_Component EComp
|
|
172
|
+
Emoji_Modifier EMod
|
|
173
|
+
Emoji_Modifier_Base EBase
|
|
174
|
+
Emoji_Presentation EPres
|
|
175
|
+
Extended_Pictographic ExtPict
|
|
176
|
+
Extender Ext
|
|
177
|
+
Grapheme_Base Gr_Base
|
|
178
|
+
Grapheme_Extend Gr_Ext
|
|
179
|
+
Hex_Digit Hex
|
|
180
|
+
IDS_Binary_Operator IDSB
|
|
181
|
+
IDS_Trinary_Operator IDST
|
|
182
|
+
ID_Continue IDC
|
|
183
|
+
ID_Start IDS
|
|
184
|
+
Ideographic Ideo
|
|
185
|
+
Join_Control Join_C
|
|
186
|
+
Logical_Order_Exception LOE
|
|
187
|
+
Lowercase Lower
|
|
188
|
+
Math
|
|
189
|
+
Noncharacter_Code_Point NChar
|
|
190
|
+
Pattern_Syntax Pat_Syn
|
|
191
|
+
Pattern_White_Space Pat_WS
|
|
192
|
+
Quotation_Mark QMark
|
|
193
|
+
Radical
|
|
194
|
+
Regional_Indicator RI
|
|
195
|
+
Sentence_Terminal STerm
|
|
196
|
+
Soft_Dotted SD
|
|
197
|
+
Terminal_Punctuation Term
|
|
198
|
+
Unified_Ideograph UIdeo
|
|
199
|
+
Uppercase Upper
|
|
200
|
+
Variation_Selector VS
|
|
201
|
+
White_Space space
|
|
202
|
+
XID_Continue XIDC
|
|
203
|
+
XID_Start XIDS`.split(/\s/).map(e=>[FW(e),e])),OG=new Map([[`s`,pG(383)],[pG(383),`s`]]),kG=new Map([[pG(223),pG(7838)],[pG(107),pG(8490)],[pG(229),pG(8491)],[pG(969),pG(8486)]]),AG=new Map([NG(453),NG(456),NG(459),NG(498),...PG(8072,8079),...PG(8088,8095),...PG(8104,8111),NG(8124),NG(8140),NG(8188)]),jG=new Map([[`alnum`,mG`[\p{Alpha}\p{Nd}]`],[`alpha`,mG`\p{Alpha}`],[`ascii`,mG`\p{ASCII}`],[`blank`,mG`[\p{Zs}\t]`],[`cntrl`,mG`\p{Cc}`],[`digit`,mG`\p{Nd}`],[`graph`,mG`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,mG`\p{Lower}`],[`print`,mG`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,mG`[\p{P}\p{S}]`],[`space`,mG`\p{space}`],[`upper`,mG`\p{Upper}`],[`word`,mG`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,mG`\p{AHex}`]]);function MG(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function NG(e){let t=pG(e);return[t.toLowerCase(),t]}function PG(e,t){return MG(e,t).map(e=>NG(e))}var FG=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function IG(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};BG(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:vG(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};RW(e,LG,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return RW(e,RG,a),RW(e,zG,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var LG={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=bW();e.body[0].body.push(xW({negate:!0,body:r}),DW(`Any`));let i=bW();i.body[0].body.push(wW(`greedy`,0,1/0,e)),n(aK(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];_G(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=qG(t.get(e));if(n){let t=bW({flags:n});t.body[0].body=e.body,e.body=[aK(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(aK(xW({body:[uW({body:[dW(`string_end`)]}),uW({body:[mW(10)]})]}),t));else if(c===`line_start`)o(aK(nK(mG`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&$G(e))o(aK(xW({negate:!0}),t));else if(d)throw Error(mG`Uses "\G" in a way that requires a subclass`);else o(iK(dW(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(aK(nK(mG`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${TG})(?!${TG})|(?<!${TG})(?=${TG}))`,n=`(?:(?<=${TG})(?=${TG})|(?<!${TG})(?!${TG}))`;o(aK(nK(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!tK(n)&&(n=KG(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!tK(r)&&(r=KG(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(aK(hW({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(iK(_W(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(aK(rK(nK(CG),l),t));return}if(s&&(c===`word`||u===`word`)){n(iK(_W(`word`,{negate:l}),t));return}if(c===`any`)n(iK(DW(`Any`),t));else if(c===`digit`)n(iK(DW(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(mG`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=mG`\p{RI}{2}|${e}(?:\u200D${e})*`;n(aK(nK(mG`(?>\r\n|${i?mG`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(iK(DW(`AHex`,{negate:l}),t));else if(c===`newline`)n(aK(nK(l?`[^
|
|
204
|
+
]`:`(?>\r
|
|
205
|
+
?|[
|
|
206
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${pG(e.codePointAt(0)-1)}${pG(e.codePointAt(2)+1)}-\u{10FFFF}`),n(aK(nK(`[${e}]`),t))}else n(aK(rK(nK(jG.get(u)),l),t));else if(c===`property`)DG.has(FW(u))||(e.key=`sc`);else if(c===`space`)n(iK(DW(`space`,{negate:l}),t));else if(c===`word`)n(aK(rK(nK(TG),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=bW({flags:c});e.body[0].body=o(),i(aK(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&ZU(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(mG`Uses "\K" in a way that's unsupported`);let o=xW({behind:!0});o.body[0].body=a(),i(aK(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(aK(xW({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=bW();t.body[0].body.push(e.body),e.body=aK(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=XG(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(mG`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!tK(n)&&(n=KG(n,t),e.ref=n)}},RG={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=iK(WG(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&_G(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=_G(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=gG(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?WG(0):UG(o,r.groupOriginByCopy,null),l=c;if(!s){let e=qG(GG(o,e=>e.type===`Group`&&!!e.flags)),t=e?gG(r.globalFlags,e):r.globalFlags;VG(t,r.currentFlags)||(l=bW({flags:JG(t)}),l.body[0].body.push(c))}n(aK(l,t),{traverse:!s})}},zG={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>HG(t,e));i.length?i.length>1?n(aK(bW({atomic:!0,body:i.reverse().map(e=>uW({body:[fW(e.number)]}))}),t)):e.ref=i[0].number:n(aK(xW({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=pW();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function BG(e){RW(e,{"*"({node:e,parent:t}){e.parent=t}})}function VG(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function HG(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=YG(n.parent);for(let r of t){if(r===n)break;if(r===e||ZG(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function UG(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=UG(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function WG(e){let t=EW(e);return t.isRecursive=!0,t}function GG(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function KG(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function qG(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function JG({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function YG(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function XG(e){let t=e.find(e=>e.kind===`search_start`||eK(e,{negate:!1})||!QG(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=XG(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function ZG(e,t){let n=YG(e)??[];for(let e of n)if(e===t||ZG(e,t))return!0;return!1}function QG({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function $G(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function eK(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&ZU(e.body[0],{type:`Assertion`,kind:`search_start`})}function tK(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function nK(e,t){let n=eW(e,{...t,unicodePropertyMap:DG}).body;return n.length>1||n[0].body.length>1?bW({body:n}):n[0].body[0]}function rK(e,t){return e.negate=t,e}function iK(e,t){return e.parent=t,e}function aK(e,t){return BG(e),e.parent=t,e}function oK(e,t){let n=SG(t),r=vG(n.target,`ES2024`),i=vG(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];RW(e,sK,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,yG(cK[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&_G(f._captureTransfers,e.transferTo,[]).push(t)}),f}var sK={"*":{enter({node:e},t){if(bK(e)){let n=t.getCurrentModI();t.pushModI(e.flags?gG({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){bK(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){mK(pG(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),hK(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&FG.has(e.value)&&t.setHasCasedChar()}},cK={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?mG`\B`:mG`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=pG(e),r=gK(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&mK(n)){let e=EG(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);hG.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(SK)&&(o=[mW(45),...o.filter(e=>!SK(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||hG.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=bW(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=uW({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(hG.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=gK(n,i),o=gK(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&_K(hK(e)).forEach(e=>{s.add(Array.isArray(e)?`${gK(e[0],i)}-${gK(e[1],i)}`:gK(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:mG`[^\n]`;if(e===`digit`)return t?mG`\D`:mG`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&FG.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?mG`\P`:mG`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?mG`\W`:mG`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=gG(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${vK(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+yK(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:mG`\g<${t}&R=${r}>`}},lK=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),uK=new Set([`-`,`\\`,`]`,`^`,`[`]),dK=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),fK=new Map([[9,mG`\t`],[10,mG`\n`],[11,mG`\v`],[12,mG`\f`],[13,mG`\r`],[8232,mG`\u2028`],[8233,mG`\u2029`],[65279,mG`\uFEFF`]]),pK=/^\p{Cased}$/u;function mK(e){return pK.test(e)}function hK(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=pG(e);if(!mK(t))continue;let o=EG(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function gK(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(fK.has(e))return fK.get(e);if(e<32||e>126&&e<160||e>262143||t&&xK(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?dK:uK:lK,a=pG(e);return(i.has(a)?`\\`:``)+a}function _K(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function vK(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function yK({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function bK({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function xK(e){return e>47&&e<58}function SK({type:e,value:t}){return e===`Character`&&t===45}var CK=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=TK(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(wK(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=EK(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function wK(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function TK(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)_G(n,t,{}).transferTo=e;return n}function EK(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function DK(e,t){let n=OK(e,t);return n.options?new CK(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function OK(e,t){let n=SG(t),r=IG(eW(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:DG}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=oK(r,n),a=sG(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=ZW(eG(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var kK=4294967295,AK=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:kK,end:kK,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function jK(e,t){return DK(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function MK(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>jK(e,{target:t.target}),{createScanner(e){return new AK(e,t)},createString(e){return{content:e}}}}async function NK(e){if(KL())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=HL.get(e);if(t!=null)return t;try{let t=EH[e];if(t==null)throw Error(`resolveLanguage: "${e}" not found in bundled languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return VL.has(e)||VL.set(e,n),n});return HL.set(e,n),await n}finally{HL.delete(e)}}function PK(e){return VL.get(e)??NK(e)}var FK=new Map,IK=new Map,LK=new Map,RK=new Set;function zK(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=FK.get(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,FK.has(n)||FK.set(n,e);RK.has(n)||(RK.add(n),t.loadThemeSync(e))}}async function BK(e){if(KL())throw Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=IK.get(e);if(t!=null)return t;try{let t=LK.get(e)??DH[e];if(t==null)throw Error(`resolveTheme: No valid loader for ${e}`);let n=t().then(t=>VK(e,`default`in t?t.default:t));IK.set(e,n);let r=await n;if(r.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${r.name}`);return FK.set(r.name,r),r}finally{IK.delete(e)}}function VK(e,t){return FK.get(e)??(t=oH(t),FK.set(e,t),t)}function HK(e){return FK.get(e)??BK(e)}function UK(e,t){if(LK.has(e)){console.error(`SharedHighlight.registerCustomTheme: theme name already registered`,e);return}LK.set(e,t)}var WK;async function GK({themes:e,langs:t}){WK??=$H({themes:[],langs:[`text`],engine:MK()});let n=qK(WK)?await WK:WK;WK=n;let r=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=PK(e);`then`in t?r.push(t):GL(t,n)}let i=[];for(let t of e){let e=HK(t);`then`in e?i.push(e):zK(e,WK)}return(r.length>0||i.length>0)&&await Promise.all([Promise.all(r).then(e=>{GL(e,n)}),Promise.all(i).then(e=>{zK(e,n)})]),n}function KK(){if(WK!=null&&!(`then`in WK))return WK}function qK(e=WK){return e!=null&&`then`in e}UK(`pierre-dark`,()=>z(()=>import(`./pierre-dark-CRPkZhl3.js`),[])),UK(`pierre-light`,()=>z(()=>import(`./pierre-light-BT7AHM04.js`),[]));function JK(e=AL){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function YK(e){for(let t of JK(e))if(!RK.has(t))return!1;return!0}function XK(e){for(let t of e)if(!FK.has(t))return!1;return!0}function ZK(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function QK(e){return{type:`text`,value:e}}function $K({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function eq({name:e,width:t=16,height:n=16,properties:r}){return $K({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[$K({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function tq(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function nq(e){return $K({tagName:`div`,children:[$K({tagName:`div`,children:e.annotations?.map(e=>$K({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function rq(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function iq({fileOrDiff:e,themeStyles:t,themeType:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":``,"data-change-type":r?.type,"data-theme-type":n===`system`?void 0:n,style:t};return $K({tagName:`div`,children:[aq({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),oq(r)],properties:i})}function aq({name:e,prevName:t,iconType:n}){let r=[eq({name:rq(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push($K({tagName:`div`,children:[QK(t)],properties:{"data-prev-name":``}})),r.push(eq({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push($K({tagName:`div`,children:[QK(e)],properties:{"data-title":``}})),$K({tagName:`div`,children:r,properties:{"data-header-content":``}})}function oq(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push($K({tagName:`span`,children:[QK(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push($K({tagName:`span`,children:[QK(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push($K({tagName:`slot`,properties:{name:kL}})),$K({tagName:`div`,children:t,properties:{"data-metadata":``}})}function sq(e){return $K({tagName:`pre`,properties:cq(e)})}function cq({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,themeType:a,themeStyles:o,totalLines:s}){let c={"data-diffs":``,"data-type":i?`split`:`file`,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,"data-theme-type":a===`system`?void 0:a,style:o,tabIndex:0};return c.style+=`--diffs-min-number-column-width-default:${`${s}`.length}ch;`,c}var lq={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function uq(e){if(lq[e]!=null)return lq[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);return t!=null&&lq[t[1]]!=null?lq[t[1]]??`text`:lq[e.match(/\.([^.]+)$/)?.[1]??``]??`text`}function dq(e,t){return{langs:[e??`text`],themes:JK(t.theme)}}function fq(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function pq(e){return e.replace(/\n$|\r\n$/,``)}function mq(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t];if(r==null)throw console.error({node:e,line:t,state:n}),Error(`processLine: line ${t}, contains no state.lineInfo`);return e.tagName=`span`,e.properties[`data-column-content`]=``,e.children.length===0&&e.children.push(QK(`
|
|
207
|
+
`)),$K({tagName:`div`,children:[$K({tagName:`span`,children:[$K({tagName:`span`,children:[{type:`text`,value:`${r.lineNumber}`}],properties:{"data-line-number-content":``}})],properties:{"data-column-number":``}}),e],properties:{"data-line":r.lineNumber,"data-alt-line":r.altLineNumber,"data-line-type":r.type,"data-line-index":r.lineIndex}})}function hq(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+gq(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function gq(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function _q(e=!1){let t={lineInfo:{}},n=[{line(e){return delete e.properties.class,e},pre(e){let n=tq(e),r=[];if(n!=null){let e=1;for(let i of n.children)i.type===`element`&&(r.push(mq(i,e,t)),e++);n.children=r}return e}}];return e&&n.push(yq,vq),{state:t,transformers:n,toClass:vq}}var vq=hq({classPrefix:`hl-`}),yq={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function bq(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}function xq({theme:e=AL,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e);r+=`color:${i.fg};`,r+=`background-color:${i.bg};`,r+=`${bq(`global`)}fg:${i.fg};`,r+=`${bq(`global`)}bg:${i.bg};`,r+=Sq(i,n)}else{let n=t.getTheme(e.dark);r+=`${bq(`global`)}dark:${n.fg};`,r+=`${bq(`global`)}dark-bg:${n.bg};`,r+=Sq(n,`dark`),n=t.getTheme(e.light),r+=`${bq(`global`)}light:${n.fg};`,r+=`${bq(`global`)}light-bg:${n.bg};`,r+=Sq(n,`light`)}return r}function Sq(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${bq(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${bq(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${bq(`global`)}${t}modified-color:${a};`),n}function Cq(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function wq(e,t,{theme:n=AL,tokenizeMaxLineLength:r},i=!1){let{state:a,transformers:o}=_q(),s=i?`text`:e.lang??uq(e.name),c=(()=>{if(typeof n==`string`)return t.getTheme(n).type})(),l=xq({theme:n,highlighter:t});a.lineInfo=e=>({type:`context`,lineIndex:e-1,lineNumber:e});let u=typeof n==`string`?{lang:s,theme:n,transformers:o,defaultColor:!1,cssVariablePrefix:bq(`token`),tokenizeMaxLineLength:r}:{lang:s,themes:n,transformers:o,defaultColor:!1,cssVariablePrefix:bq(`token`),tokenizeMaxLineLength:r};return{code:Cq(t.codeToHast(pq(e.contents),u)),themeStyles:l,baseThemeType:c}}var Tq=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
208
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
209
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
210
|
+
</symbol>
|
|
211
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
212
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
213
|
+
</symbol>
|
|
214
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
215
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
216
|
+
</symbol>
|
|
217
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
218
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
219
|
+
</symbol>
|
|
220
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
221
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
222
|
+
</symbol>
|
|
223
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
224
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
225
|
+
</symbol>
|
|
226
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
227
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
228
|
+
</symbol>
|
|
229
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
230
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
231
|
+
</symbol>
|
|
232
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
233
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
234
|
+
</symbol>
|
|
235
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
236
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
237
|
+
</symbol>
|
|
238
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
239
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
240
|
+
</symbol>
|
|
241
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
242
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
243
|
+
</symbol>
|
|
244
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
245
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
246
|
+
</symbol>
|
|
247
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
248
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
249
|
+
</symbol>
|
|
250
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
251
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
252
|
+
</symbol>
|
|
253
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
254
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
255
|
+
</symbol>
|
|
256
|
+
</svg>`;function Eq(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Dq(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Oq({pre:e,columnType:t}={}){let n=document.createElement(`code`);return n.dataset.code=``,t!=null&&(n.dataset[t]=``),e?.appendChild(n),n}function kq(){let e=document.createElement(`div`);return e.slot=`hover-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e}function Aq(){let e=document.createElement(`style`);return e.setAttribute(jL,``),e}var jq=`@layer base, theme, unsafe;
|
|
257
|
+
|
|
258
|
+
@layer base {
|
|
259
|
+
:host {
|
|
260
|
+
--diffs-bg: #fff;
|
|
261
|
+
--diffs-fg: #000;
|
|
262
|
+
--diffs-font-fallback:
|
|
263
|
+
'SF Mono', Monaco, Consolas, 'Ubuntu Mono', 'Liberation Mono',
|
|
264
|
+
'Courier New', monospace;
|
|
265
|
+
--diffs-header-font-fallback:
|
|
266
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
267
|
+
'Noto Sans', 'Liberation Sans', Arial, sans-serif;
|
|
268
|
+
|
|
269
|
+
--diffs-mixer: light-dark(black, white);
|
|
270
|
+
--diffs-gap-fallback: 8px;
|
|
271
|
+
|
|
272
|
+
/*
|
|
273
|
+
// Available CSS Color Overrides
|
|
274
|
+
--diffs-bg-buffer-override
|
|
275
|
+
--diffs-bg-hover-override
|
|
276
|
+
--diffs-bg-context-override
|
|
277
|
+
--diffs-bg-separator-override
|
|
278
|
+
|
|
279
|
+
--diffs-fg-number-override
|
|
280
|
+
--diffs-fg-number-addition-override
|
|
281
|
+
--diffs-fg-number-deletion-override
|
|
282
|
+
|
|
283
|
+
--diffs-deletion-color-override
|
|
284
|
+
--diffs-addition-color-override
|
|
285
|
+
--diffs-modified-color-override
|
|
286
|
+
|
|
287
|
+
--diffs-bg-deletion-override
|
|
288
|
+
--diffs-bg-deletion-number-override
|
|
289
|
+
--diffs-bg-deletion-hover-override
|
|
290
|
+
--diffs-bg-deletion-emphasis-override
|
|
291
|
+
|
|
292
|
+
--diffs-bg-addition-override
|
|
293
|
+
--diffs-bg-addition-number-override
|
|
294
|
+
--diffs-bg-addition-hover-override
|
|
295
|
+
--diffs-bg-addition-emphasis-override
|
|
296
|
+
|
|
297
|
+
// Line Selection Color Overrides (for enableLineSelection)
|
|
298
|
+
--diffs-selection-color-override
|
|
299
|
+
--diffs-bg-selection-override
|
|
300
|
+
--diffs-bg-selection-number-override
|
|
301
|
+
--diffs-bg-selection-background-override
|
|
302
|
+
--diffs-bg-selection-number-background-override
|
|
303
|
+
|
|
304
|
+
// Available CSS Layout Overrides
|
|
305
|
+
--diffs-gap-inline
|
|
306
|
+
--diffs-gap-block
|
|
307
|
+
--diffs-gap-style
|
|
308
|
+
--diffs-tab-size
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
color-scheme: light dark;
|
|
312
|
+
display: block;
|
|
313
|
+
font-family: var(
|
|
314
|
+
--diffs-header-font-family,
|
|
315
|
+
var(--diffs-header-font-fallback)
|
|
316
|
+
);
|
|
317
|
+
font-size: var(--diffs-font-size, 13px);
|
|
318
|
+
line-height: var(--diffs-line-height, 20px);
|
|
319
|
+
font-feature-settings: var(--diffs-font-features);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default
|
|
323
|
+
* user-agent styles. These must be overridden to use our custom styles. */
|
|
324
|
+
pre,
|
|
325
|
+
code,
|
|
326
|
+
[data-error-wrapper] {
|
|
327
|
+
margin: 0;
|
|
328
|
+
padding: 0;
|
|
329
|
+
display: block;
|
|
330
|
+
outline: none;
|
|
331
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
*,
|
|
335
|
+
*::before,
|
|
336
|
+
*::after {
|
|
337
|
+
box-sizing: border-box;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
[data-icon-sprite] {
|
|
341
|
+
display: none;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* NOTE(mdo): Headers and separators are within pre/code, so we need to reset
|
|
345
|
+
* their font-family explicitly. */
|
|
346
|
+
[data-diffs-header],
|
|
347
|
+
[data-separator] {
|
|
348
|
+
font-family: var(
|
|
349
|
+
--diffs-header-font-family,
|
|
350
|
+
var(--diffs-header-font-fallback)
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
[data-file-info] {
|
|
355
|
+
padding: 10px;
|
|
356
|
+
font-weight: 700;
|
|
357
|
+
color: var(--fg);
|
|
358
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
359
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
360
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
361
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
362
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
[data-diffs-header],
|
|
366
|
+
[data-diffs],
|
|
367
|
+
[data-error-wrapper] {
|
|
368
|
+
--diffs-bg: light-dark(var(--diffs-light-bg), var(--diffs-dark-bg));
|
|
369
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
370
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
371
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
372
|
+
--diffs-bg-buffer: var(
|
|
373
|
+
--diffs-bg-buffer-override,
|
|
374
|
+
light-dark(
|
|
375
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),
|
|
376
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))
|
|
377
|
+
)
|
|
378
|
+
);
|
|
379
|
+
--diffs-bg-hover: var(
|
|
380
|
+
--diffs-bg-hover-override,
|
|
381
|
+
light-dark(
|
|
382
|
+
color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)),
|
|
383
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))
|
|
384
|
+
)
|
|
385
|
+
);
|
|
386
|
+
--diffs-bg-context: var(
|
|
387
|
+
--diffs-bg-context-override,
|
|
388
|
+
light-dark(
|
|
389
|
+
color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),
|
|
390
|
+
color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))
|
|
391
|
+
)
|
|
392
|
+
);
|
|
393
|
+
--diffs-bg-separator: var(
|
|
394
|
+
--diffs-bg-separator-override,
|
|
395
|
+
light-dark(
|
|
396
|
+
color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),
|
|
397
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))
|
|
398
|
+
)
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
--diffs-fg: light-dark(var(--diffs-light), var(--diffs-dark));
|
|
402
|
+
--diffs-fg-number: var(
|
|
403
|
+
--diffs-fg-number-override,
|
|
404
|
+
light-dark(
|
|
405
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),
|
|
406
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))
|
|
407
|
+
)
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
--diffs-deletion-base: var(
|
|
411
|
+
--diffs-deletion-color-override,
|
|
412
|
+
light-dark(
|
|
413
|
+
var(
|
|
414
|
+
--diffs-light-deletion-color,
|
|
415
|
+
var(--diffs-deletion-color, rgb(255, 0, 0))
|
|
416
|
+
),
|
|
417
|
+
var(
|
|
418
|
+
--diffs-dark-deletion-color,
|
|
419
|
+
var(--diffs-deletion-color, rgb(255, 0, 0))
|
|
420
|
+
)
|
|
421
|
+
)
|
|
422
|
+
);
|
|
423
|
+
--diffs-addition-base: var(
|
|
424
|
+
--diffs-addition-color-override,
|
|
425
|
+
light-dark(
|
|
426
|
+
var(
|
|
427
|
+
--diffs-light-addition-color,
|
|
428
|
+
var(--diffs-addition-color, rgb(0, 255, 0))
|
|
429
|
+
),
|
|
430
|
+
var(
|
|
431
|
+
--diffs-dark-addition-color,
|
|
432
|
+
var(--diffs-addition-color, rgb(0, 255, 0))
|
|
433
|
+
)
|
|
434
|
+
)
|
|
435
|
+
);
|
|
436
|
+
--diffs-modified-base: var(
|
|
437
|
+
--diffs-modified-color-override,
|
|
438
|
+
light-dark(
|
|
439
|
+
var(
|
|
440
|
+
--diffs-light-modified-color,
|
|
441
|
+
var(--diffs-modified-color, rgb(0, 0, 255))
|
|
442
|
+
),
|
|
443
|
+
var(
|
|
444
|
+
--diffs-dark-modified-color,
|
|
445
|
+
var(--diffs-modified-color, rgb(0, 0, 255))
|
|
446
|
+
)
|
|
447
|
+
)
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
451
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
452
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
453
|
+
--diffs-bg-deletion: var(
|
|
454
|
+
--diffs-bg-deletion-override,
|
|
455
|
+
light-dark(
|
|
456
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),
|
|
457
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))
|
|
458
|
+
)
|
|
459
|
+
);
|
|
460
|
+
--diffs-bg-deletion-number: var(
|
|
461
|
+
--diffs-bg-deletion-number-override,
|
|
462
|
+
light-dark(
|
|
463
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)),
|
|
464
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))
|
|
465
|
+
)
|
|
466
|
+
);
|
|
467
|
+
--diffs-bg-deletion-hover: var(
|
|
468
|
+
--diffs-bg-deletion-hover-override,
|
|
469
|
+
light-dark(
|
|
470
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)),
|
|
471
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-deletion-base))
|
|
472
|
+
)
|
|
473
|
+
);
|
|
474
|
+
--diffs-bg-deletion-emphasis: var(
|
|
475
|
+
--diffs-bg-deletion-emphasis-override,
|
|
476
|
+
light-dark(
|
|
477
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.15),
|
|
478
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.2)
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
|
|
482
|
+
--diffs-bg-addition: var(
|
|
483
|
+
--diffs-bg-addition-override,
|
|
484
|
+
light-dark(
|
|
485
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),
|
|
486
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))
|
|
487
|
+
)
|
|
488
|
+
);
|
|
489
|
+
--diffs-bg-addition-number: var(
|
|
490
|
+
--diffs-bg-addition-number-override,
|
|
491
|
+
light-dark(
|
|
492
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)),
|
|
493
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))
|
|
494
|
+
)
|
|
495
|
+
);
|
|
496
|
+
--diffs-bg-addition-hover: var(
|
|
497
|
+
--diffs-bg-addition-hover-override,
|
|
498
|
+
light-dark(
|
|
499
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)),
|
|
500
|
+
color-mix(in lab, var(--diffs-bg) 70%, var(--diffs-addition-base))
|
|
501
|
+
)
|
|
502
|
+
);
|
|
503
|
+
--diffs-bg-addition-emphasis: var(
|
|
504
|
+
--diffs-bg-addition-emphasis-override,
|
|
505
|
+
light-dark(
|
|
506
|
+
rgb(from var(--diffs-addition-base) r g b / 0.15),
|
|
507
|
+
rgb(from var(--diffs-addition-base) r g b / 0.2)
|
|
508
|
+
)
|
|
509
|
+
);
|
|
510
|
+
|
|
511
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
512
|
+
--diffs-selection-number-fg: light-dark(
|
|
513
|
+
color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),
|
|
514
|
+
color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))
|
|
515
|
+
);
|
|
516
|
+
--diffs-bg-selection: var(
|
|
517
|
+
--diffs-bg-selection-override,
|
|
518
|
+
light-dark(
|
|
519
|
+
color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)),
|
|
520
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base))
|
|
521
|
+
)
|
|
522
|
+
);
|
|
523
|
+
--diffs-bg-selection-number: var(
|
|
524
|
+
--diffs-bg-selection-number-override,
|
|
525
|
+
light-dark(
|
|
526
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)),
|
|
527
|
+
color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base))
|
|
528
|
+
)
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
background-color: var(--diffs-bg);
|
|
532
|
+
color: var(--diffs-fg);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
[data-diffs] {
|
|
536
|
+
--diffs-code-grid: minmax(min-content, max-content) 1fr;
|
|
537
|
+
|
|
538
|
+
[data-column-content] span {
|
|
539
|
+
color: light-dark(
|
|
540
|
+
var(--diffs-token-light, var(--diffs-light)),
|
|
541
|
+
var(--diffs-token-dark, var(--diffs-dark))
|
|
542
|
+
);
|
|
543
|
+
font-weight: var(--diffs-token-light-font-weight, inherit);
|
|
544
|
+
font-style: var(--diffs-token-light-font-style, inherit);
|
|
545
|
+
-webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
546
|
+
text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* Since span is a pretty innocuous selector, we need to make sure we don't
|
|
551
|
+
* apply tokenized BG colors to diff-spans */
|
|
552
|
+
[data-column-content] span:not([data-diff-span]) {
|
|
553
|
+
background-color: light-dark(
|
|
554
|
+
var(--diffs-token-light-bg, inherit),
|
|
555
|
+
var(--diffs-token-dark-bg, inherit)
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
[data-column-content] {
|
|
560
|
+
background-color: var(--diffs-line-bg, 'transparent');
|
|
561
|
+
grid-column: 2 / 3;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
[data-diffs][data-dehydrated] {
|
|
565
|
+
--diffs-code-grid: minmax(min-content, max-content) minmax(0, 1fr);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
@media (prefers-color-scheme: dark) {
|
|
569
|
+
[data-diffs-header],
|
|
570
|
+
[data-diffs] {
|
|
571
|
+
color-scheme: dark;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
[data-diffs] [data-column-content] span {
|
|
575
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
576
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
577
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
578
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
[data-diffs-header][data-theme-type='light'],
|
|
583
|
+
[data-diffs][data-theme-type='light'] {
|
|
584
|
+
color-scheme: light;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
[data-diffs][data-theme-type='light'] [data-column-content] span {
|
|
588
|
+
font-weight: var(--diffs-token-light-font-weight, inherit);
|
|
589
|
+
font-style: var(--diffs-token-light-font-style, inherit);
|
|
590
|
+
-webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
591
|
+
text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
[data-diffs-header][data-theme-type='dark'],
|
|
595
|
+
[data-diffs][data-theme-type='dark'] {
|
|
596
|
+
color-scheme: dark;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
[data-diffs][data-theme-type='dark'] [data-column-content] span {
|
|
600
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
601
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
602
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
603
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
[data-type='split'][data-overflow='wrap'] {
|
|
607
|
+
display: grid;
|
|
608
|
+
grid-auto-flow: dense;
|
|
609
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
[data-type='split'][data-overflow='scroll'] {
|
|
613
|
+
display: grid;
|
|
614
|
+
grid-template-columns: 1fr 1fr;
|
|
615
|
+
gap: 2px;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
[data-code] {
|
|
619
|
+
display: block;
|
|
620
|
+
display: grid;
|
|
621
|
+
grid-auto-flow: dense;
|
|
622
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
623
|
+
overflow: scroll clip;
|
|
624
|
+
overscroll-behavior-x: none;
|
|
625
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
626
|
+
align-self: flex-start;
|
|
627
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
628
|
+
padding-bottom: max(
|
|
629
|
+
0px,
|
|
630
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px)
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
[data-code]::-webkit-scrollbar {
|
|
635
|
+
width: 0;
|
|
636
|
+
height: 6px;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
[data-code]::-webkit-scrollbar-track {
|
|
640
|
+
background: transparent;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
644
|
+
background-color: transparent;
|
|
645
|
+
border: 1px solid transparent;
|
|
646
|
+
background-clip: content-box;
|
|
647
|
+
border-radius: 3px;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
[data-diffs]:hover [data-code]::-webkit-scrollbar-thumb {
|
|
651
|
+
background-color: var(--diffs-bg-context);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
655
|
+
background-color: transparent;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/*
|
|
659
|
+
* If we apply these rules globally it will mean that webkit will opt into the
|
|
660
|
+
* standards compliant version of custom css scrollbars, which we do not want
|
|
661
|
+
* because the custom stuff will look better
|
|
662
|
+
*/
|
|
663
|
+
@supports (-moz-appearance: none) {
|
|
664
|
+
[data-code] {
|
|
665
|
+
scrollbar-width: thin;
|
|
666
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
667
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
[data-diffs][data-type='split'][data-overflow='wrap'] {
|
|
672
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
[data-diffs-header] ~ [data-diffs] [data-code],
|
|
676
|
+
[data-diffs-header] ~ [data-diffs][data-overflow='wrap'] {
|
|
677
|
+
padding-top: 0;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
[data-type='split'][data-overflow='wrap'] [data-code] {
|
|
681
|
+
display: contents;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
[data-line-annotation],
|
|
685
|
+
[data-no-newline],
|
|
686
|
+
[data-line] {
|
|
687
|
+
position: relative;
|
|
688
|
+
display: grid;
|
|
689
|
+
grid-template-columns: subgrid;
|
|
690
|
+
grid-column: 1 / 3;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
[data-line-annotation][data-selected-line] {
|
|
694
|
+
background-color: unset;
|
|
695
|
+
|
|
696
|
+
&::before {
|
|
697
|
+
content: '';
|
|
698
|
+
position: sticky;
|
|
699
|
+
top: 0;
|
|
700
|
+
left: 0;
|
|
701
|
+
display: block;
|
|
702
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
703
|
+
background-color: var(--diffs-bg-selection-number);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
[data-annotation-content] {
|
|
707
|
+
background-color: var(--diffs-bg-selection);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
[data-interactive-lines] [data-line] {
|
|
712
|
+
cursor: pointer;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
[data-buffer] {
|
|
716
|
+
position: sticky;
|
|
717
|
+
left: 0;
|
|
718
|
+
grid-column: 1 / 3;
|
|
719
|
+
-webkit-user-select: none;
|
|
720
|
+
user-select: none;
|
|
721
|
+
/* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */
|
|
722
|
+
background-image: repeating-linear-gradient(
|
|
723
|
+
-45deg,
|
|
724
|
+
transparent,
|
|
725
|
+
transparent calc(3px * 1.414),
|
|
726
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
727
|
+
var(--diffs-bg-buffer) calc(4px * 1.414)
|
|
728
|
+
);
|
|
729
|
+
min-height: 1lh;
|
|
730
|
+
width: var(--diffs-column-width, auto);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
[data-separator] {
|
|
734
|
+
grid-column: span 2;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
[data-separator='metadata'],
|
|
738
|
+
[data-separator]:empty {
|
|
739
|
+
min-height: 4px;
|
|
740
|
+
background-color: var(--diffs-bg-separator);
|
|
741
|
+
display: grid;
|
|
742
|
+
grid-template-columns: subgrid;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
[data-separator-wrapper] {
|
|
746
|
+
-webkit-user-select: none;
|
|
747
|
+
user-select: none;
|
|
748
|
+
fill: currentColor;
|
|
749
|
+
overflow: hidden;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
[data-separator='metadata'] [data-separator-wrapper] {
|
|
753
|
+
grid-column: 2 / 3;
|
|
754
|
+
width: var(--diffs-column-content-width);
|
|
755
|
+
position: sticky;
|
|
756
|
+
left: var(--diffs-column-number-width);
|
|
757
|
+
padding: 4px 1ch;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
[data-separator='line-info'] {
|
|
761
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
[data-separator='line-info'][data-separator-first] {
|
|
765
|
+
margin-top: 0;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
[data-separator='line-info'][data-separator-last] {
|
|
769
|
+
margin-bottom: 0;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
773
|
+
position: sticky;
|
|
774
|
+
display: flex;
|
|
775
|
+
align-items: center;
|
|
776
|
+
gap: 2px;
|
|
777
|
+
width: auto;
|
|
778
|
+
width: calc(var(--diffs-column-width) - var(--diffs-gap-fallback));
|
|
779
|
+
border-radius: 6px;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
@media (pointer: fine) {
|
|
783
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
784
|
+
display: grid;
|
|
785
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
786
|
+
grid-template-rows: 15px 15px;
|
|
787
|
+
|
|
788
|
+
[data-expand-button] {
|
|
789
|
+
height: 15px;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
[data-type='split']
|
|
794
|
+
[data-additions]
|
|
795
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
796
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
[data-type='split'] [data-additions] [data-expand-button] {
|
|
800
|
+
grid-column: 2;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
[data-type='split'] [data-additions] [data-separator-content] {
|
|
804
|
+
grid-column: 1;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
[data-expand-button],
|
|
809
|
+
[data-separator-content] {
|
|
810
|
+
display: flex;
|
|
811
|
+
align-items: center;
|
|
812
|
+
background-color: var(--diffs-bg-separator);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
[data-expand-button] {
|
|
816
|
+
justify-content: center;
|
|
817
|
+
flex-shrink: 0;
|
|
818
|
+
cursor: pointer;
|
|
819
|
+
width: 32px;
|
|
820
|
+
height: 32px;
|
|
821
|
+
opacity: 0.65;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
[data-hover-slot] {
|
|
825
|
+
position: absolute;
|
|
826
|
+
top: 0;
|
|
827
|
+
bottom: 0;
|
|
828
|
+
right: 0;
|
|
829
|
+
display: flex;
|
|
830
|
+
justify-content: flex-end;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
@media (pointer: fine) {
|
|
834
|
+
[data-expand-button]:hover {
|
|
835
|
+
opacity: 1;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
[data-line]:hover {
|
|
839
|
+
z-index: 2;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
[data-expand-down] [data-icon] {
|
|
844
|
+
transform: scaleY(-1);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
[data-separator-content] {
|
|
848
|
+
flex: 1 1 auto;
|
|
849
|
+
padding: 0 1ch;
|
|
850
|
+
height: 32px;
|
|
851
|
+
opacity: 0.65;
|
|
852
|
+
overflow: hidden;
|
|
853
|
+
justify-content: flex-start;
|
|
854
|
+
|
|
855
|
+
grid-column: 2;
|
|
856
|
+
grid-row: 1 / -1;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
[data-unmodified-lines] {
|
|
860
|
+
display: block;
|
|
861
|
+
overflow: hidden;
|
|
862
|
+
min-width: 0;
|
|
863
|
+
text-overflow: ellipsis;
|
|
864
|
+
white-space: nowrap;
|
|
865
|
+
flex: 0 1 auto;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
[data-type='split'] [data-additions] [data-separator-content] {
|
|
869
|
+
justify-content: flex-end;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
[data-type='file']
|
|
873
|
+
[data-code]
|
|
874
|
+
[data-separator='line-info']
|
|
875
|
+
[data-separator-wrapper] {
|
|
876
|
+
left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
877
|
+
margin-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
878
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
879
|
+
width: calc(
|
|
880
|
+
var(--diffs-column-width) -
|
|
881
|
+
(var(--diffs-gap-inline, var(--diffs-gap-fallback)) * 2)
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
[data-type='split']
|
|
886
|
+
[data-deletions]
|
|
887
|
+
[data-separator='line-info']
|
|
888
|
+
[data-separator-wrapper] {
|
|
889
|
+
left: var(--diffs-gap-fallback);
|
|
890
|
+
margin-left: var(--diffs-gap-fallback);
|
|
891
|
+
border-top-right-radius: 0;
|
|
892
|
+
border-bottom-right-radius: 0;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
[data-type='split']
|
|
896
|
+
[data-additions]
|
|
897
|
+
[data-separator='line-info']
|
|
898
|
+
[data-separator-wrapper] {
|
|
899
|
+
left: 0;
|
|
900
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
901
|
+
border-top-left-radius: 0;
|
|
902
|
+
border-bottom-left-radius: 0;
|
|
903
|
+
flex-direction: row-reverse;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
[data-line] {
|
|
907
|
+
background-color: var(--diffs-bg);
|
|
908
|
+
color: var(--diffs-fg);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
[data-type='split'][data-overflow='wrap'] [data-deletions] {
|
|
912
|
+
[data-line-annotation],
|
|
913
|
+
[data-buffer],
|
|
914
|
+
[data-line],
|
|
915
|
+
[data-separator] {
|
|
916
|
+
grid-column: 1 / 3;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
[data-line-annotation] {
|
|
921
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
922
|
+
background-color: var(--diffs-bg-context);
|
|
923
|
+
z-index: 3;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
[data-type='split'][data-overflow='wrap'] [data-additions] {
|
|
927
|
+
[data-line-annotation],
|
|
928
|
+
[data-buffer],
|
|
929
|
+
[data-line],
|
|
930
|
+
[data-separator] {
|
|
931
|
+
margin-left: 2px;
|
|
932
|
+
grid-column: 3 / 5;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
[data-separator='custom'] {
|
|
937
|
+
display: grid;
|
|
938
|
+
grid-template-columns: subgrid;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
[data-column-content],
|
|
942
|
+
[data-column-number] {
|
|
943
|
+
position: relative;
|
|
944
|
+
padding-inline: 1ch;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
[data-indicators='classic'] [data-column-content] {
|
|
948
|
+
padding-inline-start: 2ch;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
[data-indicators='classic'] {
|
|
952
|
+
[data-line-type='change-addition'] [data-column-content]::before,
|
|
953
|
+
[data-line-type='change-deletion'] [data-column-content]::before {
|
|
954
|
+
display: inline-block;
|
|
955
|
+
width: 1ch;
|
|
956
|
+
height: 1lh;
|
|
957
|
+
position: absolute;
|
|
958
|
+
top: 0;
|
|
959
|
+
left: 0;
|
|
960
|
+
-webkit-user-select: none;
|
|
961
|
+
user-select: none;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
[data-line-type='change-addition'] [data-column-content]::before {
|
|
965
|
+
content: '+';
|
|
966
|
+
color: var(--diffs-addition-base);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
[data-line-type='change-deletion'] [data-column-content]::before {
|
|
970
|
+
content: '-';
|
|
971
|
+
color: var(--diffs-deletion-base);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
[data-indicators='bars'] {
|
|
976
|
+
[data-line-type='change-deletion'] [data-column-number]::before,
|
|
977
|
+
[data-line-type='change-addition'] [data-column-number]::before {
|
|
978
|
+
content: '';
|
|
979
|
+
display: block;
|
|
980
|
+
width: 4px;
|
|
981
|
+
height: 100%;
|
|
982
|
+
position: absolute;
|
|
983
|
+
top: 0;
|
|
984
|
+
left: 0;
|
|
985
|
+
-webkit-user-select: none;
|
|
986
|
+
user-select: none;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
[data-line-type='change-deletion'] [data-column-number]::before {
|
|
990
|
+
background-image: linear-gradient(
|
|
991
|
+
0deg,
|
|
992
|
+
var(--diffs-bg-deletion) 50%,
|
|
993
|
+
var(--diffs-deletion-base) 50%
|
|
994
|
+
);
|
|
995
|
+
background-repeat: repeat;
|
|
996
|
+
background-size: 2px 2px;
|
|
997
|
+
background-size: calc(1lh / round(1lh / 2px)) calc(1lh / round(1lh / 2px));
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
[data-line-type='change-addition'] [data-column-number]::before {
|
|
1001
|
+
background-color: var(--diffs-addition-base);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
[data-overflow='wrap'] [data-column-content],
|
|
1006
|
+
[data-overflow='wrap'] [data-annotation-content] {
|
|
1007
|
+
white-space: pre-wrap;
|
|
1008
|
+
word-break: break-word;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[data-overflow='scroll'] [data-column-content] {
|
|
1012
|
+
white-space: pre;
|
|
1013
|
+
min-height: 1lh;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
[data-column-number] {
|
|
1017
|
+
grid-column: 1 / 2;
|
|
1018
|
+
box-sizing: content-box;
|
|
1019
|
+
text-align: right;
|
|
1020
|
+
position: sticky;
|
|
1021
|
+
left: 0;
|
|
1022
|
+
-webkit-user-select: none;
|
|
1023
|
+
user-select: none;
|
|
1024
|
+
background-color: var(--diffs-bg);
|
|
1025
|
+
color: var(--diffs-fg-number);
|
|
1026
|
+
z-index: 1;
|
|
1027
|
+
min-width: var(
|
|
1028
|
+
--diffs-min-number-column-width,
|
|
1029
|
+
var(--diffs-min-number-column-width-default, 3ch)
|
|
1030
|
+
);
|
|
1031
|
+
padding-left: 2ch;
|
|
1032
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
[data-disable-line-numbers] {
|
|
1036
|
+
&[data-indicators='bars'] [data-column-number] {
|
|
1037
|
+
min-width: 4px;
|
|
1038
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
[data-column-number] {
|
|
1042
|
+
border-right: none;
|
|
1043
|
+
min-width: 0;
|
|
1044
|
+
padding: 0;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
[data-line-number-content] {
|
|
1048
|
+
display: none;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
[data-hover-slot] {
|
|
1052
|
+
right: unset;
|
|
1053
|
+
left: 0;
|
|
1054
|
+
justify-content: flex-start;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
&[data-indicators='bars'] [data-hover-slot] {
|
|
1058
|
+
/* Using 5px here because theres a 1px separator after the bar */
|
|
1059
|
+
left: 5px;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
1064
|
+
cursor: pointer;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
[data-diff-span] {
|
|
1068
|
+
border-radius: 3px;
|
|
1069
|
+
-webkit-box-decoration-break: clone;
|
|
1070
|
+
box-decoration-break: clone;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
[data-line-type='change-addition'] {
|
|
1074
|
+
[data-column-number] {
|
|
1075
|
+
color: var(
|
|
1076
|
+
--diffs-fg-number-addition-override,
|
|
1077
|
+
var(--diffs-addition-base)
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
[data-diff-span] {
|
|
1082
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
[data-line-type='change-deletion'] {
|
|
1087
|
+
[data-column-number] {
|
|
1088
|
+
color: var(
|
|
1089
|
+
--diffs-fg-number-deletion-override,
|
|
1090
|
+
var(--diffs-deletion-base)
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
[data-diff-span] {
|
|
1095
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
[data-background] [data-line-type='change-addition'] {
|
|
1100
|
+
--diffs-line-bg: var(--diffs-bg-addition);
|
|
1101
|
+
|
|
1102
|
+
[data-column-number] {
|
|
1103
|
+
background-color: var(--diffs-bg-addition-number);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
[data-background] [data-line-type='change-deletion'] {
|
|
1108
|
+
--diffs-line-bg: var(--diffs-bg-deletion);
|
|
1109
|
+
|
|
1110
|
+
[data-column-number] {
|
|
1111
|
+
background-color: var(--diffs-bg-deletion-number);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
[data-line-type='context-expanded'] {
|
|
1116
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
1117
|
+
|
|
1118
|
+
[data-column-number] {
|
|
1119
|
+
background-color: var(--diffs-bg-context);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/* By wrapping hovers in a pointer: fine, we ensure that mobile devices don't
|
|
1124
|
+
* require a double click */
|
|
1125
|
+
@media (pointer: fine) {
|
|
1126
|
+
[data-line]:hover:not([data-selected-line]) {
|
|
1127
|
+
[data-column-number],
|
|
1128
|
+
[data-column-content] {
|
|
1129
|
+
background-color: var(--diffs-bg-hover);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
[data-background] [data-line]:hover:not([data-selected-line]) {
|
|
1134
|
+
&[data-line-type='change-deletion'] [data-column-number],
|
|
1135
|
+
&[data-line-type='change-deletion'] [data-column-content] {
|
|
1136
|
+
background-color: var(--diffs-bg-deletion-hover);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
&[data-line-type='change-addition'] [data-column-number],
|
|
1140
|
+
&[data-line-type='change-addition'] [data-column-content] {
|
|
1141
|
+
background-color: var(--diffs-bg-addition-hover);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
[data-diffs-header] {
|
|
1147
|
+
display: flex;
|
|
1148
|
+
flex-direction: row;
|
|
1149
|
+
justify-content: space-between;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1152
|
+
min-height: calc(
|
|
1153
|
+
1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)
|
|
1154
|
+
);
|
|
1155
|
+
padding-inline: 16px;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
[data-header-content] {
|
|
1159
|
+
display: flex;
|
|
1160
|
+
flex-direction: row;
|
|
1161
|
+
align-items: center;
|
|
1162
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1163
|
+
min-width: 0;
|
|
1164
|
+
white-space: nowrap;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
[data-header-content] [data-prev-name],
|
|
1168
|
+
[data-header-content] [data-title] {
|
|
1169
|
+
direction: rtl;
|
|
1170
|
+
overflow: hidden;
|
|
1171
|
+
text-overflow: ellipsis;
|
|
1172
|
+
min-width: 0;
|
|
1173
|
+
white-space: nowrap;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
[data-prev-name] {
|
|
1177
|
+
opacity: 0.7;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
[data-rename-icon] {
|
|
1181
|
+
fill: currentColor;
|
|
1182
|
+
flex-shrink: 0;
|
|
1183
|
+
flex-grow: 0;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
[data-diffs-header] [data-metadata] {
|
|
1187
|
+
display: flex;
|
|
1188
|
+
align-items: center;
|
|
1189
|
+
gap: 1ch;
|
|
1190
|
+
white-space: nowrap;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
[data-diffs-header] [data-additions-count] {
|
|
1194
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1195
|
+
color: var(--diffs-addition-base);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
[data-diffs-header] [data-deletions-count] {
|
|
1199
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1200
|
+
color: var(--diffs-deletion-base);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
[data-no-newline] {
|
|
1204
|
+
-webkit-user-select: none;
|
|
1205
|
+
user-select: none;
|
|
1206
|
+
|
|
1207
|
+
[data-column-content] {
|
|
1208
|
+
opacity: 0.6;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
[data-annotation-content] {
|
|
1213
|
+
position: sticky;
|
|
1214
|
+
left: var(--diffs-column-number-width, 0);
|
|
1215
|
+
grid-column: 2 / -1;
|
|
1216
|
+
width: var(--diffs-column-content-width, auto);
|
|
1217
|
+
align-self: flex-start;
|
|
1218
|
+
z-index: 2;
|
|
1219
|
+
height: 100%;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/* Undo some of the stuff that the 'pre' tag does */
|
|
1223
|
+
[data-annotation-slot] {
|
|
1224
|
+
text-wrap-mode: wrap;
|
|
1225
|
+
word-break: normal;
|
|
1226
|
+
white-space-collapse: collapse;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
[data-change-icon] {
|
|
1230
|
+
fill: currentColor;
|
|
1231
|
+
flex-shrink: 0;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
[data-change-icon='change'],
|
|
1235
|
+
[data-change-icon='rename-pure'],
|
|
1236
|
+
[data-change-icon='rename-changed'] {
|
|
1237
|
+
color: var(--diffs-modified-base);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
[data-change-icon='new'] {
|
|
1241
|
+
color: var(--diffs-addition-base);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
[data-change-icon='deleted'] {
|
|
1245
|
+
color: var(--diffs-deletion-base);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
[data-change-icon='file'] {
|
|
1249
|
+
opacity: 0.6;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/* Line selection highlighting */
|
|
1253
|
+
[data-line-type='context'][data-selected-line] {
|
|
1254
|
+
[data-column-number] {
|
|
1255
|
+
color: var(--diffs-selection-number-fg);
|
|
1256
|
+
background-color: var(--diffs-bg-selection-number);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
[data-column-content] {
|
|
1260
|
+
background-color: var(--diffs-bg-selection);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
[data-line-type='context-expanded'],
|
|
1265
|
+
[data-line-type='change-addition'],
|
|
1266
|
+
[data-line-type='change-deletion'] {
|
|
1267
|
+
&[data-selected-line] {
|
|
1268
|
+
[data-column-content] {
|
|
1269
|
+
background-color: light-dark(
|
|
1270
|
+
color-mix(
|
|
1271
|
+
in lab,
|
|
1272
|
+
var(--diffs-line-bg, var(--diffs-bg)) 82%,
|
|
1273
|
+
var(--diffs-selection-base)
|
|
1274
|
+
),
|
|
1275
|
+
color-mix(
|
|
1276
|
+
in lab,
|
|
1277
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1278
|
+
var(--diffs-selection-base)
|
|
1279
|
+
)
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
[data-column-number] {
|
|
1284
|
+
color: var(--diffs-selection-number-fg);
|
|
1285
|
+
background-color: light-dark(
|
|
1286
|
+
color-mix(
|
|
1287
|
+
in lab,
|
|
1288
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1289
|
+
var(--diffs-selection-base)
|
|
1290
|
+
),
|
|
1291
|
+
color-mix(
|
|
1292
|
+
in lab,
|
|
1293
|
+
var(--diffs-line-bg, var(--diffs-bg)) 60%,
|
|
1294
|
+
var(--diffs-selection-base)
|
|
1295
|
+
)
|
|
1296
|
+
);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
[data-error-wrapper] {
|
|
1302
|
+
overflow: auto;
|
|
1303
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1304
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1305
|
+
max-height: 400px;
|
|
1306
|
+
scrollbar-width: none;
|
|
1307
|
+
|
|
1308
|
+
[data-error-message] {
|
|
1309
|
+
font-weight: bold;
|
|
1310
|
+
font-size: 18px;
|
|
1311
|
+
color: var(--diffs-deletion-base);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
[data-error-stack] {
|
|
1315
|
+
color: var(--diffs-fg-number);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
`,Mq=`@layer base, theme, unsafe;`;function Nq(e){return`${Mq}
|
|
1320
|
+
@layer unsafe {
|
|
1321
|
+
${e}
|
|
1322
|
+
}`}function Pq(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function Fq({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,pre:i,split:a,themeStyles:o,themeType:s,totalLines:c}){switch(s===`system`?delete i.dataset.themeType:i.dataset.themeType=s,e){case`bars`:case`classic`:i.dataset.indicators=e;break;case`none`:delete i.dataset.indicators;break}return n?i.dataset.disableLineNumbers=``:delete i.dataset.disableLineNumbers,t?delete i.dataset.background:i.dataset.background=``,i.dataset.type=a?`split`:`file`,i.dataset.overflow=r,i.dataset.diffs=``,i.tabIndex=0,i.style=o,i.style.setProperty(`--diffs-min-number-column-width-default`,`${`${c}`.length}ch`),i}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(jq)),t.adoptedStyleSheets=[e]}}customElements.define(vL,t)}var Iq=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Lq(e){return $K({tagName:`div`,properties:{"data-buffer":``,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Rq(e){return $K({tagName:`div`,children:[$K({tagName:`span`,properties:{"data-column-number":``}}),$K({tagName:`span`,children:[QK(`No newline at end of file`)],properties:{"data-column-content":``}})],properties:{"data-no-newline":``,"data-line-type":e}})}function zq(e){return $K({tagName:`div`,children:[eq({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function Bq({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=[];if(e===`metadata`&&t!=null&&s.push($K({tagName:`div`,children:[QK(t)],properties:{"data-separator-wrapper":``}})),e===`line-info`&&t!=null){let e=[];n!=null&&(r?(a||e.push(zq(`up`)),o||e.push(zq(`down`))):e.push(zq(!a&&!o?`both`:a?`down`:`up`))),e.push($K({tagName:`div`,children:[$K({tagName:`span`,children:[QK(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),s.push($K({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":e.length>2?``:void 0}}))}return e===`custom`&&i!=null&&s.push($K({tagName:`slot`,properties:{name:i}})),$K({tagName:`div`,children:s,properties:{"data-separator":s.length===0?``:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function Vq(e,t){return`hunk-separator-${e}-${t}`}function Hq(e){let t=e[e.length-1];return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}var Uq=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Wq=new class extends Uq{};function Gq(e,t,n){return Wq.diff(e,t,n)}function Kq(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function qq(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Jq(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Yq(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Xq(e,t){return Jq(e,t,``)}function Zq(e,t){return Yq(e,t,``)}function Qq(e,t){return t.slice(0,$q(e,t))}function $q(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function eJ(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function tJ(e){let t=e.match(/^\s*/);return t?t[0]:``}var nJ=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,rJ=RegExp(`[${nJ}]+|\\s+|[^${nJ}]`,`ug`);new class extends Uq{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(rJ)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&iJ(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&iJ(n,i,r,null),e}};function iJ(e,t,n,r){if(t&&n){let i=tJ(t.value),a=eJ(t.value),o=tJ(n.value),s=eJ(n.value);if(e){let r=Kq(i,o);e.value=Yq(e.value,o,r),t.value=Xq(t.value,r),n.value=Xq(n.value,r)}if(r){let e=qq(a,s);r.value=Jq(r.value,s,e),t.value=Zq(t.value,e),n.value=Zq(n.value,e)}}else if(n){if(e){let e=tJ(n.value);n.value=n.value.substring(e.length)}if(r){let e=tJ(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=tJ(r.value),i=tJ(t.value),a=eJ(t.value),o=Kq(n,i);t.value=Xq(t.value,o);let s=qq(Xq(n,o),a);t.value=Zq(t.value,s),r.value=Jq(r.value,n,s),e.value=Yq(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=tJ(r.value),n=Qq(eJ(t.value),e);t.value=Zq(t.value,n)}else if(e){let n=Qq(eJ(e.value),tJ(t.value));t.value=Xq(t.value,n)}}var aJ=new class extends Uq{tokenize(e){let t=RegExp(`(\\r?\\n)|[${nJ}]+|[^\\S\\n\\r]+|[^${nJ}]`,`ug`);return e.match(t)||[]}};function oJ(e,t,n){return aJ.diff(e,t,n)}var sJ=new class extends Uq{constructor(){super(...arguments),this.tokenize=lJ}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
1323
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
1324
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
1325
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
1326
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function cJ(e,t,n){return sJ.diff(e,t,n)}function lJ(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1327
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function uJ(e){return e==`.`||e==`!`||e==`?`}new class extends Uq{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(uJ(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Uq{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Uq{constructor(){super(...arguments),this.tokenize=lJ}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(dJ(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function dJ(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=dJ(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=dJ(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Uq{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var fJ={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function pJ(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;cJ(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(cJ(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||gJ(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
1328
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function mJ(e,t){if(t||=fJ,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>mJ(e,t)).join(`
|
|
1329
|
+
`)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
1330
|
+
`)+`
|
|
1331
|
+
`}function hJ(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;pJ(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?mJ(e,o.headerOptions):void 0)}}))}else{let s=pJ(e,t,n,r,i,a,o);return s?mJ(s,o?.headerOptions):void 0}}function gJ(e){let t=e.endsWith(`
|
|
1332
|
+
`),n=e.split(`
|
|
1333
|
+
`).map(e=>e+`
|
|
1334
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function _J({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function vJ({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function yJ(e,t,n,r=!1){let i=(()=>{let e=n.theme??AL;if(typeof e==`string`)return t.getTheme(e).type})(),a=xq({theme:n.theme,highlighter:t});if(e.newLines!=null&&e.oldLines!=null){let{oldContent:o,newContent:s,oldInfo:c,newInfo:l,oldDecorations:u,newDecorations:d}=xJ({hunks:e.hunks,oldLines:e.oldLines,newLines:e.newLines,lineDiffType:n.lineDiffType});return{code:SJ({oldFile:{name:e.prevName??e.name,contents:o},oldInfo:c,oldDecorations:u,newFile:{name:e.name,contents:s},newInfo:l,newDecorations:d,highlighter:t,options:n,languageOverride:r?`text`:e.lang}),themeStyles:a,baseThemeType:i}}let o=[],s=0,c=0;for(let i of e.hunks){let{oldContent:a,newContent:l,oldInfo:u,newInfo:d,oldDecorations:f,newDecorations:p,splitLineIndex:m,unifiedLineIndex:h}=xJ({hunks:[i],splitLineIndex:s,unifiedLineIndex:c,lineDiffType:n.lineDiffType}),g={name:e.prevName??e.name,contents:a},_={name:e.name,contents:l};o.push(SJ({oldFile:g,oldInfo:u,oldDecorations:f,newFile:_,newInfo:d,newDecorations:p,highlighter:t,options:n,languageOverride:r?`text`:e.lang})),s=m,c=h}return{code:(()=>{if(o.length<=1){let e=o[0]??{oldLines:[],newLines:[]};if(e.newLines.length===0||e.oldLines.length===0)return e}return{hunks:o}})(),themeStyles:a,baseThemeType:i}}function bJ({oldLine:e,newLine:t,oldLineIndex:n,newLineIndex:r,oldDecorations:i,newDecorations:a,lineDiffType:o}){if(e==null||t==null||o===`none`)return;e=pq(e),t=pq(t);let s=o===`char`?Gq(e,t):oJ(e,t),c=[],l=[],u=o===`word-alt`;for(let e of s){let t=e===s[s.length-1];!e.added&&!e.removed?(vJ({item:e,arr:c,enableJoin:u,isNeutral:!0,isLastItem:t}),vJ({item:e,arr:l,enableJoin:u,isNeutral:!0,isLastItem:t})):e.removed?vJ({item:e,arr:c,enableJoin:u,isLastItem:t}):vJ({item:e,arr:l,enableJoin:u,isLastItem:t})}let d=0;for(let e of c)e[0]===1&&i.push(_J({line:n-1,spanStart:d,spanLength:e[1].length})),d+=e[1].length;d=0;for(let e of l)e[0]===1&&a.push(_J({line:r-1,spanStart:d,spanLength:e[1].length})),d+=e[1].length}function xJ({hunks:e,oldLines:t,newLines:n,splitLineIndex:r=0,unifiedLineIndex:i=0,lineDiffType:a}){let o={},s={},c=[],l=[],u=1,d=1,f=1,p=1,m=``,h=``;for(let g of e){for(;t!=null&&n!=null&&u<g.additionStart&&d<g.deletionStart;)o[d]={type:`context-expanded`,lineNumber:p,altLineNumber:f,lineIndex:`${i},${r}`},s[u]={type:`context-expanded`,lineNumber:f,altLineNumber:p,lineIndex:`${i},${r}`},m+=t[d-1],h+=n[u-1],d++,u++,p++,f++,r++,i++;p=g.deletionStart,f=g.additionStart;for(let e of g.hunkContent)if(e.type===`context`)for(let t of e.lines)o[d]={type:`context`,lineNumber:p,altLineNumber:f,lineIndex:`${i},${r}`},s[u]={type:`context`,lineNumber:f,altLineNumber:p,lineIndex:`${i},${r}`},m+=t,h+=t,d++,u++,f++,p++,r++,i++;else{let t=Math.max(e.additions.length,e.deletions.length),n=0,g=i;for(;n<t;){let t=e.deletions[n],i=e.additions[n];bJ({newLine:i,oldLine:t,oldLineIndex:d,newLineIndex:u,oldDecorations:c,newDecorations:l,lineDiffType:a}),t!=null&&(o[d]={type:`change-deletion`,lineNumber:p,lineIndex:`${g},${r}`},m+=t,d++,p++),i!=null&&(s[u]={type:`change-addition`,lineNumber:f,lineIndex:`${g+e.deletions.length},${r}`},h+=i,u++,f++),r++,g++,n++}i+=e.additions.length+e.deletions.length}if(!(t==null||n==null||g!==e[e.length-1]))for(;d<=t.length||u<=t.length;){let e=t[d-1],a=n[u-1];if(e==null&&a==null)break;e!=null&&(o[d]={type:`context-expanded`,lineNumber:p,altLineNumber:f,lineIndex:`${i},${r}`},m+=e,d++,p++),a!=null&&(s[u]={type:`context-expanded`,lineNumber:f,altLineNumber:p,lineIndex:`${i},${r}`},h+=a,u++,f++),r++,i++}}return{oldContent:m,newContent:h,oldInfo:o,newInfo:s,oldDecorations:c,newDecorations:l,splitLineIndex:r,unifiedLineIndex:i}}function SJ({oldFile:e,newFile:t,oldInfo:n,newInfo:r,highlighter:i,oldDecorations:a,newDecorations:o,languageOverride:s,options:{theme:c=AL,...l}}){let u=s??uq(e.name),d=s??uq(t.name),{state:f,transformers:p}=_q(),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:bq(`token`)}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:bq(`token`)};return{oldLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,Cq(i.codeToHast(pq(e.contents),m))),newLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,Cq(i.codeToHast(pq(t.contents),m)))}}var CJ={fromStart:0,fromEnd:0},wJ=class{highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:AL},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=YK(e.theme??AL)?KK():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager=void 0,this.onRenderUpdate=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){this.getOptionsWithDefaults().themeType!==e&&this.mergeOptions({themeType:e})}expandHunk(e,t){let{expansionLineCount:n}=this.getOptionsWithDefaults(),r=this.expandedHunks.get(e)??{fromStart:0,fromEnd:0};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.expandedHunks.set(e,r)}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,expandUnchanged:a=!1,expansionLineCount:o=100,hunkSeparators:s=`line-info`,lineDiffType:c=`word-alt`,maxLineDiffLength:l=1e3,overflow:u=`scroll`,theme:d=AL,themeType:f=`system`,tokenizeMaxLineLength:p=1e3,useCSSClasses:m=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,expandUnchanged:a,expansionLineCount:o,hunkSeparators:s,lineDiffType:c,maxLineDiffLength:l,overflow:u,theme:this.workerManager?.getDiffRenderOptions().theme??d,themeType:f,tokenizeMaxLineLength:p,useCSSClasses:m}}async initializeHighlighter(){return this.highlighter=await GK(dq(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=this.workerManager?.getDiffResultCache(e);n!=null&&!TJ(t,n.options)&&(n=void 0),this.renderCache??={diff:e,highlighted:!0,options:t,result:n?.result},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightDiffAST(this,this.diff):this.asyncHighlight(e).then(({result:t,options:n})=>{this.onHighlightSuccess(e,t,n)})}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n}=this.getOptionsWithDefaults();return{theme:e,tokenizeMaxLineLength:t,lineDiffType:n}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||e!==n.diff||!TJ(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff){if(e==null)return;let t=this.workerManager?.getDiffResultCache(e);t!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,...t});let{options:n,forceRender:r}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:n,result:void 0},this.workerManager?.isWorkingPool()===!0)this.renderCache.result??=this.workerManager.getPlainDiffAST(e),(!this.renderCache.highlighted||r)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??uq(e.name);let t=this.highlighter!=null&&YK(n.theme),i=this.highlighter!=null&&WL(this.computedLang);if(this.highlighter!=null&&t&&(r||!this.renderCache.highlighted&&i||this.renderCache.result==null)){let{result:t,options:n}=this.renderDiffWithHighlighter(e,this.highlighter,!i);this.renderCache={diff:e,options:n,highlighted:i,result:t}}(!t||!i)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.onHighlightSuccess(e,t,n)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,this.renderCache.result)}async asyncRender(e){let{result:t}=await this.asyncHighlight(e);return this.processDiffResult(e,t)}createPreElement(e,t,n,r){let{diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,themeType:c}=this.getOptionsWithDefaults();return sq({diffIndicators:i,disableBackground:a,disableLineNumbers:o,overflow:s,themeStyles:n,split:e,themeType:r??c,totalLines:t})}async asyncHighlight(e){this.computedLang=e.lang??uq(e.name);let t=this.highlighter!=null&&YK(this.options.theme??AL),n=this.highlighter!=null&&WL(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e);return{result:yJ(e,t,r,n),options:r}}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;let r=this.renderCache.diff!==e||!this.renderCache.highlighted||!TJ(this.renderCache.options,n);this.renderCache={diff:e,options:n,highlighted:!0,result:t},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,{code:t,themeStyles:n,baseThemeType:r}){let{diffStyle:i,disableFileHeader:a}=this.getOptionsWithDefaults();this.diff=e;let o=i===`unified`,s=[],c=[],l=[],u=0,d=[],f,p=0;for(let n of e.hunks)p+=n.collapsedBefore,p=this.renderHunks({ast:t,hunk:n,prevHunk:f,hunkIndex:u,isLastHunk:u===e.hunks.length-1,additionsAST:s,deletionsAST:c,unifiedAST:l,hunkData:d,lineIndex:p}),u++,f=n;let m=Math.max(Hq(e.hunks),e.newLines?.length??0,e.oldLines?.length??0);s=!o&&(t.hunks!=null||t.newLines.length>0)?s:void 0,c=!o&&(t.hunks!=null||t.oldLines.length>0)?c:void 0,l=l.length>0?l:void 0;let h=this.createPreElement(c!=null&&s!=null,m,n,r);return{additionsAST:s,deletionsAST:c,unifiedAST:l,hunkData:d,preNode:h,themeStyles:n,baseThemeType:r,headerElement:a?void 0:this.renderHeader(this.diff,n,r),totalLines:m,css:``}}renderFullAST(e,t=[]){return e.unifiedAST!=null&&t.push($K({tagName:`code`,children:e.unifiedAST,properties:{"data-code":``,"data-unified":``}})),e.deletionsAST!=null&&t.push($K({tagName:`code`,children:e.deletionsAST,properties:{"data-code":``,"data-deletions":``}})),e.additionsAST!=null&&t.push($K({tagName:`code`,children:e.additionsAST,properties:{"data-code":``,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return KB(this.renderFullAST(e,t))}renderPartialHTML(e,t){return KB(t==null?e:$K({tagName:`code`,children:e,properties:{"data-code":``,[`data-${t}`]:``}}))}renderCollapsedHunks({ast:e,hunkData:t,hunkIndex:n,hunkSpecs:r,isFirstHunk:i,isLastHunk:a,rangeSize:o,lineIndex:s,additionLineNumber:c,deletionLineNumber:l,unifiedAST:u,deletionsAST:d,additionsAST:f}){if(o<=0)return;let{hunkSeparators:p,expandUnchanged:m,diffStyle:h,expansionLineCount:g}=this.getOptionsWithDefaults(),_=e.hunks==null&&e.newLines.length>0&&e.oldLines.length>0,v=this.expandedHunks.get(n)??CJ,y=o>g,b=Math.max(m?0:o-(v.fromEnd+v.fromStart),0),x=({type:e,linesAST:o})=>{if(p===`line-info`||p===`custom`){let r=Vq(e,n);o.push(Bq({type:p,content:EJ(b),expandIndex:_?n:void 0,chunked:y,slotName:r,isFirstHunk:i,isLastHunk:a})),t.push({slotName:r,hunkIndex:n,lines:b,type:e,expandable:_?{up:_&&!i,down:_,chunked:y}:void 0})}else p===`metadata`&&r!=null?o.push(Bq({type:`metadata`,content:r,isFirstHunk:i,isLastHunk:a})):p===`simple`&&n>0&&o.push(Bq({type:`simple`,isFirstHunk:i,isLastHunk:!1}))},S=({rangeLen:t,fromStart:r})=>{if(e.newLines==null||e.oldLines==null)return;let i=a?0:r?o:t,p=l-i,m=c-i,g=s-i;for(let r=0;r<t;r++){let t=e.oldLines[p],r=e.newLines[m];if(t==null||r==null)throw console.error({aLineNumber:m,dLineNumber:p,ast:e}),Error(`DiffHunksRenderer.renderHunks prefill context invalid. Must include data for old and new lines`);p++,m++,h===`unified`?this.pushLineWithAnnotation({newLine:r,unifiedAST:u,unifiedSpan:this.getAnnotations(`unified`,p,m,n,g)}):this.pushLineWithAnnotation({newLine:r,oldLine:t,additionsAST:f,deletionsAST:d,...this.getAnnotations(`split`,p,m,n,g)}),g++}};_&&S({rangeLen:Math.min(b===0||m?o:v.fromStart,o),fromStart:!0}),b>0&&(h===`unified`?x({type:`unified`,linesAST:u}):(x({type:`deletions`,linesAST:d}),x({type:`additions`,linesAST:f}))),b>0&&v.fromEnd>0&&!a&&S({rangeLen:Math.min(v.fromEnd,o),fromStart:!1})}renderHunks({hunk:e,hunkData:t,hunkIndex:n,lineIndex:r,isLastHunk:i,prevHunk:a,ast:o,deletionsAST:s,additionsAST:c,unifiedAST:l}){let{diffStyle:u}=this.getOptionsWithDefaults(),d=u===`unified`,f=e.additionStart-1,p=e.deletionStart-1;this.renderCollapsedHunks({additionLineNumber:f,additionsAST:c,ast:o,deletionLineNumber:p,deletionsAST:s,hunkData:t,hunkIndex:n,hunkSpecs:e.hunkSpecs,isFirstHunk:a==null,isLastHunk:!1,lineIndex:r,rangeSize:Math.max(e.collapsedBefore,0),unifiedAST:l});let{oldLines:m,newLines:h,oldIndex:g,newIndex:_}=(()=>{if(o.hunks!=null){let e=o.hunks[n];if(e==null)throw console.error({ast:o,hunkIndex:n}),Error(`DiffHunksRenderer.renderHunks: lineHunk doesn't exist`);return{oldLines:e.oldLines,newLines:e.newLines,oldIndex:0,newIndex:0}}return{oldLines:o.oldLines,newLines:o.newLines,oldIndex:p,newIndex:f}})();for(let t of e.hunkContent)if(t.type===`context`){let{length:e}=t.lines;for(let t=0;t<e;t++){let e=m[g],t=h[_];if(g++,_++,f++,p++,d){if(t==null)throw Error(`DiffHunksRenderer.renderHunks: newLine doesnt exist for context...`);this.pushLineWithAnnotation({newLine:t,unifiedAST:l,unifiedSpan:this.getAnnotations(`unified`,p,f,n,r)})}else{if(t==null||e==null)throw Error(`DiffHunksRenderer.renderHunks: newLine or oldLine doesnt exist for context...`);this.pushLineWithAnnotation({oldLine:e,newLine:t,deletionsAST:s,additionsAST:c,...this.getAnnotations(`split`,p,f,n,r)})}r++}if(t.noEOFCR){let e=Rq(`context`);d?l.push(e):(s.push(e),c.push(e))}}else{let{length:e}=t.deletions,{length:i}=t.additions,a=d?e+i:Math.max(e,i),u=0;for(let v=0;v<a;v++){let{oldLine:y,newLine:b}=(()=>{let n=m[g],r=h[_];if(d?v<e?r=void 0:n=void 0:(v>=e&&(n=void 0),v>=i&&(r=void 0)),n==null&&r==null)throw console.error({i:v,len:a,ast:o,hunkContent:t}),Error(`renderHunks: oldLine and newLine are null, something is wrong`);return{oldLine:n,newLine:r}})();if(y!=null&&(g++,p++),b!=null&&(_++,f++),d)this.pushLineWithAnnotation({oldLine:y,newLine:b,unifiedAST:l,unifiedSpan:this.getAnnotations(`unified`,y==null?void 0:p,b==null?void 0:f,n,r)}),r++;else{(y==null||b==null)&&u++;let t=this.getAnnotations(`split`,y==null?void 0:p,b==null?void 0:f,n,r);t!=null&&u>0&&(i>e?s.push(Lq(u)):c.push(Lq(u)),u=0),this.pushLineWithAnnotation({newLine:b,oldLine:y,deletionsAST:s,additionsAST:c,...t}),r++}}d||(u>0&&(i>e?s.push(Lq(u)):c.push(Lq(u)),u=0),t.noEOFCRDeletions&&(s.push(Rq(`change-deletion`)),t.noEOFCRAdditions||c.push(Lq(1))),t.noEOFCRAdditions&&(c.push(Rq(`change-addition`)),t.noEOFCRDeletions||s.push(Lq(1))))}return i&&o.newLines!=null&&o.newLines.length>0&&this.renderCollapsedHunks({additionLineNumber:f,additionsAST:c,ast:o,deletionLineNumber:p,deletionsAST:s,hunkData:t,hunkIndex:n+1,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,lineIndex:r,rangeSize:Math.max(o.newLines.length-Math.max(e.additionStart+e.additionCount-1,0),0),unifiedAST:l}),r}pushLineWithAnnotation({newLine:e,oldLine:t,unifiedAST:n,additionsAST:r,deletionsAST:i,unifiedSpan:a,deletionSpan:o,additionSpan:s}){n==null?i!=null&&r!=null&&(t!=null&&i.push(t),e!=null&&r.push(e),o!=null&&i.push(nq(o)),s!=null&&r.push(nq(s))):(t==null?e!=null&&n.push(e):n.push(t),a!=null&&n.push(nq(a)))}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(fq(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(fq(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(!(o.annotations.length===0&&a.annotations.length===0))return{deletionSpan:a,additionSpan:o}}renderHeader(e,t,n){let{themeType:r}=this.getOptionsWithDefaults();return iq({fileOrDiff:e,themeStyles:t,themeType:n??r})}};function TJ(e,t){return ZK(e.theme,t.theme)&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType}function EJ(e){return`${e} unmodified line${e>1?`s`:``}`}function DJ(e){let t=e[0];if(t!==`+`&&t!==`-`&&t!==` `&&t!==`\\`){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}let n=e.substring(1);return{line:n===``?`
|
|
1335
|
+
`:n,type:t===` `?`context`:t===`\\`?`metadata`:t===`+`?`addition`:`deletion`}}function OJ(e,t){let n=bL.test(e),r=e.split(n?bL:xL),i,a=[],o;for(let e of r){if(n&&!bL.test(e)){i==null?i=e:console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!n&&!xL.test(e)){i==null?i=e:console.error(`parsePatchContent: unknown file blob:`,e);continue}let r=0,s=e.split(SL);o=void 0;for(let e of s){let i=e.split(wL),s=i.shift();if(s==null){console.error(`parsePatchContent: invalid hunk`,e);continue}let c=s.match(CL),l=[],u=0,d=0;if(c==null||o==null){if(o!=null){console.error(`parsePatchContent: Invalid hunk`,e);continue}o={name:``,prevName:void 0,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,cacheKey:t==null?void 0:`${t}-${a.length}`},i.unshift(s);for(let e of i){let t=e.match(n?EL:TL);if(e.startsWith(`diff --git`)){let[,,t,,n]=e.trim().match(DL)??[];o.name=n.trim(),t!==n&&(o.prevName=t.trim())}else if(t!=null){let[,e,n]=t;e===`---`&&n!==`/dev/null`?(o.prevName=n.trim(),o.name=n.trim()):e===`+++`&&n!==`/dev/null`&&(o.name=n.trim())}else if(n){if(e.startsWith(`new mode `)&&(o.mode=e.replace(`new mode`,``).trim()),e.startsWith(`old mode `)&&(o.oldMode=e.replace(`old mode`,``).trim()),e.startsWith(`new file mode`)&&(o.type=`new`,o.mode=e.replace(`new file mode`,``).trim()),e.startsWith(`deleted file mode`)&&(o.type=`deleted`,o.mode=e.replace(`deleted file mode`,``).trim()),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?o.type=`rename-pure`:o.type=`rename-changed`),e.startsWith(`index `)){let[,t]=e.trim().match(OL)??[];t!=null&&(o.mode=t)}e.startsWith(`rename from `)&&(o.prevName=e.replace(`rename from `,``)),e.startsWith(`rename to `)&&(o.name=e.replace(`rename to `,``).trim())}}continue}else{let e,t;for(;i.length>0&&(i[i.length-1]===`
|
|
1336
|
+
`||i[i.length-1]===``);)i.pop();for(let n of i){let r=DJ(n);if(r==null)continue;let{type:i,line:a}=r;if(i===`addition`)(e==null||e.type!==`change`)&&(e=AJ(`change`),l.push(e)),e.additions.push(a),u++,t=`addition`;else if(i===`deletion`)(e==null||e.type!==`change`)&&(e=AJ(`change`),l.push(e)),e.deletions.push(a),d++,t=`deletion`;else if(i===`context`)(e==null||e.type!==`context`)&&(e=AJ(`context`),l.push(e)),e.lines.push(a),t=`context`;else if(i===`metadata`&&e!=null){if(e.type===`context`)e.noEOFCR=!0;else if(t===`deletion`){e.noEOFCRDeletions=!0;let t=e.deletions.length-1;t>=0&&(e.deletions[t]=pq(e.deletions[t]))}else if(t===`addition`){e.noEOFCRAdditions=!0;let t=e.additions.length-1;t>=0&&(e.additions[t]=pq(e.additions[t]))}}}}let f={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(c[4]??`1`),additionStart:parseInt(c[3]),additionLines:u,deletionCount:parseInt(c[2]??`1`),deletionStart:parseInt(c[1]),deletionLines:d,hunkContent:l,hunkContext:c[5],hunkSpecs:s};if(isNaN(f.additionCount)||isNaN(f.deletionCount)||isNaN(f.additionStart)||isNaN(f.deletionStart)){console.error(`parsePatchContent: invalid hunk metadata`,f);continue}f.collapsedBefore=Math.max(f.additionStart-1-r,0),o.hunks.push(f),r=f.additionStart+f.additionCount-1;for(let e of l)e.type===`context`?(f.splitLineCount+=e.lines.length,f.unifiedLineCount+=e.lines.length):(f.splitLineCount+=Math.max(e.additions.length,e.deletions.length),f.unifiedLineCount+=e.deletions.length+e.additions.length);f.splitLineStart=o.splitLineCount,f.unifiedLineStart=o.unifiedLineCount,o.splitLineCount+=f.splitLineCount,o.unifiedLineCount+=f.unifiedLineCount}o!=null&&(!n&&o.prevName!=null&&o.name!==o.prevName&&(o.hunks.length>0?o.type=`rename-changed`:o.type=`rename-pure`),o.type!==`rename-pure`&&o.type!==`rename-changed`&&(o.prevName=void 0),a.push(o))}return{patchMetadata:i,files:a}}function kJ(e,t){let n=[];for(let r of e.split(yL))try{n.push(OJ(r,t==null?void 0:`${t}-${n.length}`))}catch(e){console.error(e)}return n}function AJ(e){return e===`change`?{type:`change`,additions:[],deletions:[],noEOFCRAdditions:!1,noEOFCRDeletions:!1}:{type:`context`,lines:[],noEOFCR:!1}}function jJ(e,t,n){let r=kJ(hJ(e.name,t.name,e.contents,t.contents,e.header,t.header,n))[0]?.files[0];if(r==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return r.oldLines=e.contents.split(wL),r.newLines=t.contents.split(wL),e.cacheKey!=null&&t.cacheKey!=null&&(r.cacheKey=`${e.cacheKey}:${t.cacheKey}`),r}var MJ=-1,NJ=class{static LoadedCustomComponent=!0;__id=++MJ;fileContainer;spriteSVG;pre;unsafeCSSStyle;hoverContent;headerElement;headerMetadata;customHunkElements=[];errorWrapper;hunksRenderer;resizeManager;scrollSyncManager;mouseEventManager;lineSelectionManager;annotationElements=[];lineAnnotations=[];oldFile;newFile;fileDiff;constructor(e={theme:AL},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=new wJ({...e,hunkSeparators:typeof e.hunkSeparators==`function`?`custom`:e.hunkSeparators},this.handleHighlightRender,this.workerManager),this.resizeManager=new BL,this.scrollSyncManager=new Iq,this.mouseEventManager=new LL(`diff`,zL(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`?this.handleExpandHunk:void 0)),this.lineSelectionManager=new NL(PL(e)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};setOptions(e){e!=null&&(this.options=e,this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof e.hunkSeparators==`function`?`custom`:e.hunkSeparators}),this.mouseEventManager.setOptions(zL(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`?this.handleExpandHunk:void 0)),this.lineSelectionManager.setOptions(PL(e)))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){if((this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.hunksRenderer.setThemeType(e),this.headerElement!=null&&(e===`system`?delete this.headerElement.dataset.themeType:this.headerElement.dataset.themeType=e),this.pre!=null))switch(e){case`system`:delete this.pre.dataset.themeType;break;case`light`:case`dark`:this.pre.dataset.themeType=e;break}}getHoveredLine=()=>this.mouseEventManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}setSelectedLines(e){this.lineSelectionManager.setSelection(e)}cleanUp(){this.hunksRenderer.cleanUp(),this.resizeManager.cleanUp(),this.mouseEventManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.lineSelectionManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.workerManager=void 0,this.fileDiff=void 0,this.oldFile=void 0,this.newFile=void 0,this.isContainerManaged||this.fileContainer?.parentNode?.removeChild(this.fileContainer),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=``),this.fileContainer=void 0,this.pre=void 0,this.headerElement=void 0,this.errorWrapper=void 0}hydrate(e){let{fileContainer:t,prerenderedHTML:n}=e;Pq(t,n);for(let e of Array.from(t.shadowRoot?.children??[])){if(e instanceof SVGElement){this.spriteSVG=e;continue}if(e instanceof HTMLElement){if(e instanceof HTMLPreElement){this.pre=e;continue}if(`diffsHeader`in e.dataset){this.headerElement=e;continue}if(e instanceof HTMLStyleElement&&e.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=e;continue}}}if(this.pre==null)this.render(e);else{let{lineAnnotations:n,oldFile:r,newFile:i,fileDiff:a}=e;this.fileContainer=t,delete this.pre.dataset.dehydrated,this.lineAnnotations=n??this.lineAnnotations,this.newFile=i,this.oldFile=r,this.fileDiff=a??(r!=null&&i!=null?jJ(r,i):void 0),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderHoverUtility(),this.injectUnsafeCSS(),this.mouseEventManager.setup(this.pre),this.lineSelectionManager.setup(this.pre),(this.options.overflow??`scroll`)===`scroll`&&(this.resizeManager.setup(this.pre),(this.options.diffStyle??`split`)===`split`&&this.scrollSyncManager.setup(this.pre))}}rerender(){this.fileDiff==null&&this.newFile==null&&this.oldFile==null||this.render({oldFile:this.oldFile,newFile:this.newFile,fileDiff:this.fileDiff,forceRender:!0})}handleExpandHunk=(e,t)=>{this.expandHunk(e,t)};expandHunk(e,t){this.hunksRenderer.expandHunk(e,t),this.rerender()}render({oldFile:e,newFile:t,fileDiff:n,forceRender:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o}){let s=e!=null&&t!=null&&(!Eq(e,this.oldFile)||!Eq(t,this.newFile)),c=i!=null&&(i.length>0||this.lineAnnotations.length>0)?i!==this.lineAnnotations:!1;if(!r&&!c&&(n!=null&&n===this.fileDiff||n==null&&!s)||(this.oldFile=e,this.newFile=t,n==null?e!=null&&t!=null&&s&&(this.fileDiff=jJ(e,t)):this.fileDiff=n,i!=null&&this.setLineAnnotations(i),this.fileDiff==null))return;this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof this.options.hunkSeparators==`function`?`custom`:this.options.hunkSeparators}),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableFileHeader:l=!1,disableErrorHandling:u=!1}=this.options;l&&this.headerElement!=null&&(this.headerElement.parentNode?.removeChild(this.headerElement),this.headerElement=void 0),a=this.getOrCreateFileContainer(a,o);try{let e=this.hunksRenderer.renderDiff(this.fileDiff);if(e==null){this.workerManager!=null&&!this.workerManager.isInitialized()&&this.workerManager.initialize().then(()=>this.rerender());return}e.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a);let t=this.getOrCreatePreNode(a);this.applyHunksToDOM(t,e),this.renderSeparators(e.hunkData),this.renderAnnotations(),this.renderHoverUtility()}catch(e){if(u)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}}renderSeparators(e){let{hunkSeparators:t}=this.options;if(!(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`)){for(let e of this.customHunkElements)e.parentNode?.removeChild(e);this.customHunkElements.length=0;for(let n of e){let e=document.createElement(`div`);e.style.display=`contents`,e.slot=n.slotName,e.appendChild(t(n,this)),this.fileContainer.appendChild(e),this.customHunkElements.push(e)}}}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null)return;for(let e of this.annotationElements)e.parentNode?.removeChild(e);this.annotationElements.length=0;let{renderAnnotation:e}=this.options;if(e!=null&&this.lineAnnotations.length>0)for(let t of this.lineAnnotations){let n=e(t);if(n==null)continue;let r=Dq(fq(t));r.appendChild(n),this.annotationElements.push(r),this.fileContainer.appendChild(r)}}renderHoverUtility(){let{renderHoverUtility:e}=this.options;if(this.fileContainer==null||e==null)return;this.hoverContent??(this.hoverContent=kq(),this.fileContainer.appendChild(this.hoverContent));let t=e(this.mouseEventManager.getHoveredLine);this.hoverContent.innerHTML=``,t!=null&&this.hoverContent.appendChild(t)}getOrCreateFileContainer(e,t){if(this.fileContainer=e??this.fileContainer??document.createElement(`diffs-container`),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=Tq;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(e){return this.pre==null?(this.pre=document.createElement(`pre`),e.shadowRoot?.appendChild(this.pre)):this.pre.parentNode!==e&&e.shadowRoot?.appendChild(this.pre),this.pre}applyHeaderToDOM(e,t){this.cleanupErrorWrapper();let n=document.createElement(`div`);n.innerHTML=KB(e);let r=n.firstElementChild;if(!(r instanceof HTMLElement)||(this.headerElement==null?t.shadowRoot?.prepend(r):t.shadowRoot?.replaceChild(r,this.headerElement),this.headerElement=r,this.isContainerManaged))return;let{renderHeaderMetadata:i}=this.options;this.headerMetadata!=null&&this.headerMetadata.parentNode?.removeChild(this.headerMetadata);let a=i?.({oldFile:this.oldFile,newFile:this.newFile,fileDiff:this.fileDiff})??void 0;a!=null&&(this.headerMetadata=document.createElement(`div`),this.headerMetadata.slot=kL,a instanceof Element?this.headerMetadata.appendChild(a):this.headerMetadata.innerText=`${a}`,t.appendChild(this.headerMetadata))}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;let{unsafeCSS:e}=this.options;e==null||e===``||(this.unsafeCSSStyle??(this.unsafeCSSStyle=Aq(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=Nq(e))}applyHunksToDOM(e,t){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t),e.innerHTML=``;let n,r;if(t.unifiedAST!=null){let n=Oq({columnType:`unified`});n.innerHTML=this.hunksRenderer.renderPartialHTML(t.unifiedAST),e.appendChild(n)}else t.deletionsAST!=null&&(n=Oq({columnType:`deletions`}),n.innerHTML=this.hunksRenderer.renderPartialHTML(t.deletionsAST),e.appendChild(n)),t.additionsAST!=null&&(r=Oq({columnType:`additions`}),r.innerHTML=this.hunksRenderer.renderPartialHTML(t.additionsAST),e.appendChild(r));this.injectUnsafeCSS(),this.mouseEventManager.setup(e),this.lineSelectionManager.setup(e),(this.options.overflow??`scroll`)===`scroll`?(this.resizeManager.setup(e),(this.options.diffStyle??`split`)===`split`?this.scrollSyncManager.setup(e,n,r):this.scrollSyncManager.cleanUp()):(this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp())}applyPreNodeAttributes(e,{themeStyles:t,baseThemeType:n,additionsAST:r,deletionsAST:i,totalLines:a}){let{diffIndicators:o=`bars`,disableBackground:s=!1,disableLineNumbers:c=!1,overflow:l=`scroll`,themeType:u=`system`,diffStyle:d=`split`}=this.options;Fq({pre:e,diffIndicators:o,disableBackground:s,disableLineNumbers:c,overflow:l,split:d===`unified`?!1:r!=null&&i!=null,themeStyles:t,themeType:n??u,totalLines:a})}applyErrorToDOM(e,t){this.cleanupErrorWrapper();let n=this.getOrCreatePreNode(t);n.innerHTML=``,n.parentNode?.removeChild(n),this.pre=void 0;let r=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.innerHTML=``,r.appendChild(this.errorWrapper);let i=document.createElement(`div`);i.dataset.errorMessage=``,i.innerText=e.message,this.errorWrapper.appendChild(i);let a=document.createElement(`pre`);a.dataset.errorStack=``,a.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(a)}cleanupErrorWrapper(){this.errorWrapper?.parentNode?.removeChild(this.errorWrapper),this.errorWrapper=void 0}};function PJ(e){let t=[];for(let n of e){let e=VL.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function FJ(e){for(let t of Array.isArray(e)?e:[e])if(!VL.has(t))return!1;return!0}async function IJ(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=PK(r)??NK(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function LJ(e){let t=[];for(let n of e){let e=FK.get(n);if(e==null)throw Error(`getAllResolvedThemes: ${n} is unresolved, you must resolve all necessary themes before calling this function`);t.push(e)}return t}async function RJ(e){let t=[],n=[];for(let r of e){let e=HK(r)??BK(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e)n!=null&&t.push(n)}),t}function zJ(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function BJ(e,t){return ZK(e?.theme??AL,t?.theme??AL)&&zJ(e,t,[`theme`])}var VJ={position:`absolute`,top:0,bottom:0,textAlign:`center`};function HJ(e,t){return typeof window>`u`&&t!=null?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,V.jsx)(V.Fragment,{children:e})}var UJ=Ve(d(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),WJ=Symbol(`IGNORE_RESPONSE`),GJ=class{highlighter;renderOptions;initialized=!1;workers=[];taskQueue=[];pendingTasks=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;instanceRequestMap=new Map;fileCache;diffCache;constructor(e,{langs:t,theme:n=AL,lineDiffType:r=`word-alt`,tokenizeMaxLineLength:i=1e3}){this.options=e,this.renderOptions={theme:n,lineDiffType:r,tokenizeMaxLineLength:i},this.fileCache=new UJ.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new UJ.default.LRUMap(e.totalASTLRUCacheSize??100),this.initialize(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){return this.fileCache.delete(e)!==void 0}evictDiffFromCache(e){return this.diffCache.delete(e)!==void 0}async setRenderOptions({theme:e=AL,lineDiffType:t=`word-alt`,tokenizeMaxLineLength:n=1e3}){let r={theme:e,lineDiffType:t,tokenizeMaxLineLength:n};this.isInitialized()||await this.initialize();let i=ZK(r.theme,this.renderOptions.theme);if(i&&r.lineDiffType===this.renderOptions.lineDiffType&&r.tokenizeMaxLineLength===this.renderOptions.tokenizeMaxLineLength)return;let a=JK(e),o=[];if(i||(o=XK(a)?LJ(a):await RJ(a)),this.highlighter!=null)zK(o,this.highlighter),await this.setRenderOptionsOnWorkers(r,o);else{let[e]=await Promise.all([GK({themes:a,langs:[`text`]}),this.setRenderOptionsOnWorkers(r,o)]);this.highlighter=e}this.renderOptions=r,this.diffCache.clear(),this.fileCache.clear();for(let e of this.themeSubscribers)e.rerender()}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t}=this.renderOptions;return{theme:t,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.pendingTasks.set(a,o),r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),()=>{this.unsubscribeToThemeChanges(e)}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e)}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1)this.initialized=new Promise((t,n)=>{(async()=>{try{let r=JK(this.renderOptions.theme),i=[];i=XK(r)?LJ(r):await RJ(r);let a=[];a=FJ(e)?PJ(e):await IJ(e);let[o]=await Promise.all([GK({themes:r,langs:[`text`,...e]}),this.initializeWorkers(i,a)]);if(this.initialized===!1){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),t()}catch(e){this.initialized=!1,this.workersFailed=!0,n(e)}})()});else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;let n=[];this.workers.length>0&&this.terminateWorkers();for(let r=0;r<(this.options.poolSize??8);r++){let r=this.options.workerFactory(),i={worker:r,busy:!1,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)])};r.addEventListener(`message`,e=>{this.handleWorkerMessage(i,e.data)}),r.addEventListener(`error`,e=>console.error(`Worker error:`,e,i)),this.workers.push(i),n.push(new Promise((n,r)=>{let a=this.generateRequestId(),o={type:`initialize`,id:a,request:{type:`initialize`,id:a,renderOptions:this.renderOptions,resolvedThemes:e,resolvedLanguages:t},resolve(){i.initialized=!0,n()},reject:r,requestStart:Date.now()};this.pendingTasks.set(a,o),this.executeTask(i,o)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.taskQueue.length===0))for(;this.taskQueue.length>0;){let e=this.taskQueue[0],t=KJ(e),n=this.getAvailableWorker(t);if(n==null)break;this.taskQueue.shift(),this.resolveLanguagesAndExecuteTask(n,e,t)}};highlightFileAST(e,t){this.submitTask(e,{type:`file`,file:t})}getPlainFileAST(e){if(this.highlighter==null){this.initialize();return}return wq(e,this.highlighter,this.renderOptions,!0)}highlightDiffAST(e,t){this.submitTask(e,{type:`diff`,diff:t})}getPlainDiffAST(e){return this.highlighter==null?void 0:yJ(e,this.highlighter,this.renderOptions,!0)}terminate(){this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.instanceRequestMap.clear(),this.taskQueue.length=0,this.pendingTasks.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{totalWorkers:this.workers.length,busyWorkers:this.workers.filter(e=>e.busy).length,queuedTasks:this.taskQueue.length,pendingTasks:this.pendingTasks.size}}submitTask(e,t){this.initialized===!1&&this.initialize();let n=this.generateRequestId(),r=Date.now(),i=(()=>{switch(t.type){case`file`:return{type:`file`,id:n,request:{...t,id:n},instance:e,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...t,id:n},instance:e,requestStart:r}}})();this.instanceRequestMap.set(e,n),this.taskQueue.push(i),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){if(t.type===`file`||t.type===`diff`){let r=n.filter(t=>!e.langs.has(t));r.length>0&&(FJ(r)?t.request.resolvedLanguages=PJ(r):t.request.resolvedLanguages=await IJ(r))}this.executeTask(e,t)}handleWorkerMessage(e,t){let n=this.pendingTasks.get(t.id);try{if(n==null)throw Error(`handleWorkerMessage: Received response for unknown task`);if(t.type===`error`){let e=Error(t.error);throw t.stack&&(e.stack=t.stack),`reject`in n?n.reject(e):n.instance.onHighlightError(e),e}else{if(`instance`in n&&this.instanceRequestMap.get(n.instance)!==t.id)throw WJ;switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:e,options:r}=t,{instance:i,request:a}=n;a.file.cacheKey!=null&&this.fileCache.set(a.file.cacheKey,{result:e,options:r}),i.onHighlightSuccess(a.file,e,r);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:e,options:r}=t,{instance:i,request:a}=n;a.diff.cacheKey!=null&&this.diffCache.set(a.diff.cacheKey,{result:e,options:r}),i.onHighlightSuccess(a.diff,e,r);break}}}}catch(e){e!==WJ&&console.error(e,n,t)}n!=null&&`instance`in n&&this.instanceRequestMap.get(n.instance)===t.id&&this.instanceRequestMap.delete(n.instance),this.pendingTasks.delete(t.id),e.busy=!1,this.taskQueue.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??=Promise.resolve().then(this.drainQueue)}executeTask(e,t){e.busy=!0,this.pendingTasks.set(t.id,t);for(let n of KJ(t))e.langs.add(n);e.worker.postMessage(t.request)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.busy||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}generateRequestId(){return`req_${++this.nextRequestId}`}};function KJ(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??uq(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??uq(e.request.diff.name)),t.add(e.request.diff.lang??uq(e.request.diff.prevName??`-`));break}return t.delete(`text`),Array.from(t)}var qJ;function JJ({poolOptions:e,highlighterOptions:t}){return qJ??(qJ=new GJ(e,t),qJ.initialize()),qJ}function YJ(){qJ!=null&&(qJ.terminate(),qJ=void 0)}var XJ=(0,B.createContext)(void 0),ZJ=0;function QJ({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,B.useState)(()=>{if(!(typeof window>`u`))return JJ({poolOptions:t,highlighterOptions:n})});return(0,B.useInsertionEffect)(()=>(ZJ++,()=>{ZJ--}),[]),(0,B.useEffect)(()=>()=>{ZJ===0&&YJ()},[]),(0,V.jsx)(XJ.Provider,{value:r,children:e})}function $J(e){let t=(0,B.useRef)(e);return(0,B.useInsertionEffect)(()=>void(t.current=e)),(0,B.useCallback)((...e)=>t.current(...e),[])}function eY({fileDiff:e,oldFile:t,newFile:n,renderHeaderMetadata:r,renderAnnotation:i,renderHoverUtility:a,lineAnnotations:o,getHoveredLine:s}){let c=r?.({fileDiff:e,oldFile:t,newFile:n});return(0,V.jsxs)(V.Fragment,{children:[c!=null&&(0,V.jsx)(`div`,{slot:`header-metadata`,children:c}),i!=null&&o?.map((e,t)=>(0,V.jsx)(`div`,{slot:fq(e),children:i(e)},t)),a!=null&&(0,V.jsx)(`div`,{slot:`hover-slot`,style:VJ,children:a(s)})]})}var tY=typeof window>`u`?B.useEffect:B.useLayoutEffect;function nY({oldFile:e,newFile:t,fileDiff:n,options:r,lineAnnotations:i,selectedLines:a,prerenderedHTML:o}){let s=(0,B.useContext)(XJ),c=(0,B.useRef)(null),l=$J(a=>{if(a!=null){if(c.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);c.current=new NJ(r,s,!0),c.current.hydrate({fileDiff:n,oldFile:e,newFile:t,fileContainer:a,lineAnnotations:i,prerenderedHTML:o})}else{if(c.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);c.current.cleanUp(),c.current=null}});return tY(()=>{if(c.current==null)return;let o=c.current,s=!BJ(o.options,r);o.setOptions(r),o.render({forceRender:s,fileDiff:n,oldFile:e,newFile:t,lineAnnotations:i}),a!==void 0&&o.setSelectedLines(a)}),{ref:l,getHoveredLine:(0,B.useCallback)(()=>c.current?.getHoveredLine(),[])}}function rY({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,className:i,style:a,prerenderedHTML:o,renderAnnotation:s,renderHeaderMetadata:c,renderHoverUtility:l}){let{ref:u,getHoveredLine:d}=nY({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:o});return(0,V.jsx)(vL,{ref:u,className:i,style:a,children:HJ(eY({fileDiff:e,renderHeaderMetadata:c,renderAnnotation:s,lineAnnotations:n,renderHoverUtility:l,getHoveredLine:d}),o)})}var iY=Ve(d(((e,t)=>{var n=`Expected a function`,r=NaN,i=`[object Symbol]`,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u=typeof global==`object`&&global&&global.Object===Object&&global,d=typeof self==`object`&&self&&self.Object===Object&&self,f=u||d||Function(`return this`)(),p=Object.prototype.toString,m=Math.max,h=Math.min,g=function(){return f.Date.now()};function _(e,t,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(n);t=x(t)||0,v(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?m(x(r.maxWait)||0,t):o,p=`trailing`in r?!!r.trailing:p);function _(t){var n=i,r=a;return i=a=void 0,u=t,s=e.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,t),d?_(e):s}function b(e){var n=e-l,r=e-u,i=t-n;return f?h(i,o-r):i}function S(e){var n=e-l,r=e-u;return l===void 0||n>=t||n<0||f&&r>=o}function C(){var e=g();if(S(e))return w(e);c=setTimeout(C,b(e))}function w(e){return c=void 0,p&&i?_(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(g())}function D(){var e=g(),n=S(e);if(i=arguments,a=this,l=e,n){if(c===void 0)return y(l);if(f)return c=setTimeout(C,t),_(l)}return c===void 0&&(c=setTimeout(C,t)),s}return D.cancel=T,D.flush=E,D}function v(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function y(e){return!!e&&typeof e==`object`}function b(e){return typeof e==`symbol`||y(e)&&p.call(e)==i}function x(e){if(typeof e==`number`)return e;if(b(e))return r;if(v(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(a,``);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?r:+e}t.exports=_}))(),1);function aY(e){let t=(0,B.useRef)(e);t.current=e,(0,B.useEffect)(()=>()=>{t.current()},[])}function oY(e,t=500,n){let r=(0,B.useRef)();aY(()=>{r.current&&r.current.cancel()});let i=(0,B.useMemo)(()=>{let i=(0,iY.default)(e,t,n),a=(...e)=>i(...e);return a.cancel=()=>{i.cancel()},a.isPending=()=>!!r.current,a.flush=()=>i.flush(),a},[e,t,n]);return(0,B.useEffect)(()=>{r.current=(0,iY.default)(e,t,n)},[e,t,n]),i}function sY(e,t,n){let r=n?.equalityFn??((e,t)=>e===t),i=e instanceof Function?e():e,[a,o]=(0,B.useState)(i),s=(0,B.useRef)(i),c=oY(o,t,n);return r(s.current,i)||(c(i),s.current=i),[a,c]}function cY({threshold:e=0,root:t=null,rootMargin:n=`0%`,freezeOnceVisible:r=!1,initialIsIntersecting:i=!1,onChange:a}={}){let[o,s]=(0,B.useState)(null),[c,l]=(0,B.useState)(()=>({isIntersecting:i,entry:void 0})),u=(0,B.useRef)();u.current=a;let d=c.entry?.isIntersecting&&r;(0,B.useEffect)(()=>{if(!o||!(`IntersectionObserver`in window)||d)return;let i,a=new IntersectionObserver(e=>{let t=Array.isArray(a.thresholds)?a.thresholds:[a.thresholds];e.forEach(e=>{let n=e.isIntersecting&&t.some(t=>e.intersectionRatio>=t);l({isIntersecting:n,entry:e}),u.current&&u.current(n,e),n&&r&&i&&(i(),i=void 0)})},{threshold:e,root:t,rootMargin:n});return a.observe(o),()=>{a.disconnect()}},[o,JSON.stringify(e),t,n,d,r]);let f=(0,B.useRef)(null);(0,B.useEffect)(()=>{!o&&c.entry?.target&&!r&&!d&&f.current!==c.entry.target&&(f.current=c.entry.target,l({isIntersecting:i,entry:void 0}))},[o,c.entry,r,d,i]);let p=[s,!!c.isIntersecting,c.entry];return p.ref=p[0],p.isIntersecting=p[1],p.entry=p[2],p}function lY(){let e=(0,B.useRef)(!1);return(0,B.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,B.useCallback)(()=>e.current,[])}var uY={width:void 0,height:void 0};function dY(e){let{ref:t,box:n=`content-box`}=e,[{width:r,height:i},a]=(0,B.useState)(uY),o=lY(),s=(0,B.useRef)({...uY}),c=(0,B.useRef)(void 0);return c.current=e.onResize,(0,B.useEffect)(()=>{if(!t.current||typeof window>`u`||!(`ResizeObserver`in window))return;let e=new ResizeObserver(([e])=>{let t=n===`border-box`?`borderBoxSize`:n===`device-pixel-content-box`?`devicePixelContentBoxSize`:`contentBoxSize`,r=fY(e,t,`inlineSize`),i=fY(e,t,`blockSize`);if(s.current.width!==r||s.current.height!==i){let e={width:r,height:i};s.current.width=r,s.current.height=i,c.current?c.current(e):o()&&a(e)}});return e.observe(t.current,{box:n}),()=>{e.disconnect()}},[n,t,o]),{width:r,height:i}}function fY(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t===`contentBoxSize`?e.contentRect[n===`inlineSize`?`width`:`height`]:void 0}function pY({children:e,className:t,...n}){return(0,V.jsx)(`span`,{...n,dir:`rtl`,className:R(`block w-min max-w-full truncate`,t),children:`${e}`})}function mY({path:e,displayName:t,onClick:n,variant:i,className:a}){let o=`min-w-0 text-left text-xs leading-5`,s=t??e;return n?(0,V.jsxs)(`button`,{type:`button`,className:R(o,`inline-flex items-center gap-1 underline-offset-2 hover:underline`,a),title:e,onClick:n,children:[(0,V.jsx)(pY,{children:s}),i===`external`?(0,V.jsx)(r,{name:`ExternalLink`,className:`size-3 shrink-0 text-subtle-foreground`}):null]}):(0,V.jsx)(pY,{className:R(o,a),title:e,children:s})}function hY(e){return e===`/`?e:e.replace(/\/+$/u,``)}function gY(e){return e.replace(/^\/+/u,``)}function _Y(e){return e.startsWith(`/`)}function vY({path:e,rootPath:t}){if(_Y(e))return e;let n=hY(t),r=gY(e);return n===`/`?`/${r}`:`${n}/${r}`}function yY({path:e,rootPath:t}){return _Y(e)?e:t?vY({path:e,rootPath:t}):null}function bY(e){if(e.trim().length===0)return[];try{return kJ(e).flatMap(e=>e.files)}catch{return[]}}function xY(e){if(e.trim().length===0)return[];let t=e.split(`
|
|
1337
|
+
`),n=[],r=[],i=!1;for(let e of t){let t=e.startsWith(`diff --git `);if(t&&(i=!0),t&&r.length>0){n.push(r.join(`
|
|
1338
|
+
`)),r=[e];continue}r.push(e)}return r.length>0&&n.push(r.join(`
|
|
1339
|
+
`)),i?n.filter(e=>e.trim().length>0):[e]}function SY(e){let t=[];for(let n of e)t.push(...bY(n));return t}function CY(e){return`${e.length}:${e.slice(0,120)}:${e.slice(-120)}`}function wY(e,t){if(e.length>0){let t=0,n=0;for(let r of e){let e=TY(r);t+=e.insertions,n+=e.deletions}return{filesCount:e.length,insertions:t,deletions:n}}let n=0,r=0,i=0;for(let e of t.split(`
|
|
1340
|
+
`)){if(e.startsWith(`diff --git `)){i+=1;continue}if(!e.startsWith(`+++ `)&&!e.startsWith(`--- `)){if(e.startsWith(`+`)){n+=1;continue}e.startsWith(`-`)&&(r+=1)}}return{filesCount:i>0?i:+(n>0||r>0),insertions:n,deletions:r}}function TY(e){let t=0,n=0;for(let r of e.hunks)t+=r.additionLines,n+=r.deletionLines;return{insertions:t,deletions:n}}function EY(e){switch(e.type){case`new`:return`added`;case`deleted`:return`deleted`;case`rename-pure`:case`rename-changed`:return`renamed`;case`change`:return`modified`;default:return e.type}}function DY(e){let t=AY(e.name)??e.name,n=AY(e.prevName);return n&&n!==t?`${n} -> ${t}`:t}function OY(e){return`${EY(e)}:${AY(e.name)??``}:${AY(e.prevName)??``}`}function kY(e){let t=new Map;return e.map(e=>{let n=OY(e),r=t.get(n)??0;return t.set(n,r+1),{key:r===0?n:`${n}:${r+1}`,fileDiff:e}})}function AY(e){let t=e?.trim();return t&&t.length>0?t:void 0}function jY(e){let t=AY(e);if(!t||t===`/dev/null`)return[];let n=t.startsWith(`./`)?t.slice(2):t;if(n.length===0)return[];let r=[n];return(n.startsWith(`a/`)||n.startsWith(`b/`))&&r.push(n.slice(2)),Array.from(new Set(r.filter(e=>e.length>0)))}function MY(e,t){let n=new Set(jY(t));if(n.size===0)return!1;for(let t of[e.name,e.prevName])for(let e of jY(t))if(n.has(e))return!0;return!1}function NY(e){for(let t of[e.name,e.prevName]){let e=jY(t);if(e.length>0)return e[e.length-1]??null}return null}var PY={overflow:`scroll`,disableFileHeader:!1,expansionLineCount:30},FY={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},IY={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`},LY=/(?<=\n)/u;function RY(e,t){let n=AY(e.name)??e.name,r=AY(e.prevName)??n,i=t===`added`?{kind:`empty`,path:n}:{kind:`request`,path:t===`renamed`?r:n,side:`old`},a=t===`deleted`?{kind:`empty`,path:n}:{kind:`request`,path:n,side:`new`},o=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,zY(i),zY(a),o].join(`:`),old:i,new:a}}function zY(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function BY(e,t){return e.kind===`empty`?Promise.resolve({name:e.path,contents:``}):t(e.path,e.side)}function VY(e){return e.contents.length===0?[]:e.contents.split(LY)}var HY=(0,B.memo)(function({fileDiff:e,diffViewOptions:t,filePathRoot:n,onOpenFileInEditor:i,onOpenFilePreview:a,isCollapsed:o,onToggleCollapsed:s,stickyHeader:c=!1,isRendering:l=!1,cardRef:u,onRequestFileContents:d}){let f=(0,B.useMemo)(()=>TY(e),[e]),p=(0,B.useMemo)(()=>DY(e),[e]),m=(0,B.useMemo)(()=>EY(e),[e]),h=m===`added`,g=m===`deleted`,_=g?0:f.insertions,v=h?0:f.deletions,y=h||g,b=(0,B.useMemo)(()=>{let t=AY(e.name)??e.name,n=AY(e.prevName);return n&&n!==t?{from:n,to:t}:null},[e]),x=(0,B.useMemo)(()=>NY(e),[e]),S=x?yY({path:x,rootPath:n}):null,C=!!x,w=e.hunks.length>0,T=o!==void 0&&s!==void 0,E=!w||T&&o,D=(0,B.useMemo)(()=>({...t,disableFileHeader:!0}),[t]),{ref:O,isIntersecting:ee}=cY({initialIsIntersecting:!0,threshold:1}),te=c&&!ee,k=(0,B.useMemo)(()=>RY(e,m),[e,m]),{ref:A,isIntersecting:j}=cY({initialIsIntersecting:!1,rootMargin:`200px`}),ne=(0,B.useRef)(d);(0,B.useEffect)(()=>{ne.current=d});let[N,re]=(0,B.useState)({status:`idle`}),ie=(0,B.useRef)(`idle`),[ae,P]=(0,B.useState)(!1),[F,oe]=(0,B.useState)(!1);(0,B.useEffect)(()=>{ie.current=`idle`,re({status:`idle`}),oe(!1)},[k.identity]),(0,B.useEffect)(()=>{!E&&j&&P(!0)},[E,j]);let se=g&&!F,I=ae&&!l&&!se;(0,B.useEffect)(()=>{if(!I||ie.current!==`idle`)return;let e=ne.current;if(!e)return;let t=!1;return ie.current=`loading`,re({status:`loading`}),Promise.all([BY(k.old,e),BY(k.new,e)]).then(([e,n])=>{if(!t){if(!e||!n){ie.current=`unavailable`,re({status:`unavailable`});return}ie.current=`ready`,re({status:`ready`,oldLines:VY(e),newLines:VY(n)})}}).catch(()=>{t||(ie.current=`error`,re({status:`error`}))}),()=>{t=!0,ie.current===`loading`&&(ie.current=`idle`)}},[k,I]);let L=(0,B.useMemo)(()=>N.status===`ready`?{...e,oldLines:N.oldLines,newLines:N.newLines}:e,[e,N]);return(0,V.jsxs)(`div`,{ref:u,className:`rounded-lg border border-border bg-background`,children:[c?(0,V.jsx)(`div`,{ref:O,className:`h-0`}):null,(0,V.jsx)(`div`,{className:R(`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`,c&&`sticky top-0 z-30`,!E&&`rounded-b-none`,te&&`rounded-t-none border-t border-border`),children:(0,V.jsxs)(`div`,{className:`flex w-full min-w-0 items-center justify-between gap-2`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center`,children:[T?(0,V.jsx)(`button`,{type:`button`,className:R(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,w?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:w?s:void 0,disabled:!w,"aria-label":w?`${o?`Expand`:`Collapse`} ${p}`:`${p} has no changes to expand`,"aria-expanded":w?!o:void 0,children:(0,V.jsx)(r,{name:`ChevronRight`,className:R(`size-3.5 shrink-0 transition-transform duration-150`,w&&!o&&`rotate-90`)})}):null,(0,V.jsxs)(`span`,{className:R(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),children:[b?(0,V.jsx)(pY,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:b.from,children:b.from}):null,b?(0,V.jsx)(r,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,(0,V.jsx)(mY,{path:x??e.name,displayName:b?b.to:p,onClick:C&&x&&a?()=>a(x):void 0,className:`font-mono font-medium text-foreground`}),S?(0,V.jsx)(Hr,{text:S,label:`Copy path for ${p}`,className:`rounded-md hover:bg-state-hover`}):null,C&&x&&i?(0,V.jsx)(`button`,{type:`button`,onClick:()=>i(x),"aria-label":`Open ${p} in editor`,title:`Open in editor`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,V.jsx)(r,{name:`ExternalLink`,"aria-hidden":!0,className:`size-3`})}):null]})]}),(0,V.jsx)(`span`,{className:`flex shrink-0 items-center gap-1`,children:(0,V.jsx)(dM,{insertions:_,deletions:v,hideZero:y,className:`text-xs`})})]})}),E?null:(0,V.jsx)(`div`,{ref:A,className:`overflow-hidden rounded-b-lg bg-background`,style:IY,children:se?(0,V.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[T?(0,V.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,V.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,V.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,V.jsx)(M,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:()=>{oe(!0),P(!0)},children:`Load diff`})]})]}):I?(0,V.jsx)(`div`,{className:`overflow-x-auto`,children:(0,V.jsx)(`div`,{className:`w-full max-w-full`,style:FY,children:(0,V.jsx)(rY,{fileDiff:L,options:D})})}):(0,V.jsxs)(`div`,{className:`space-y-1.5 px-3 py-3`,children:[(0,V.jsx)(pa,{className:`h-3 w-full rounded-sm`}),(0,V.jsx)(pa,{className:`h-3 w-[96%] rounded-sm`}),(0,V.jsx)(pa,{className:`h-3 w-[93%] rounded-sm`}),(0,V.jsx)(pa,{className:`h-3 w-[90%] rounded-sm`}),(0,V.jsx)(pa,{className:`h-3 w-[87%] rounded-sm`}),(0,V.jsx)(pa,{className:`h-3 w-[84%] rounded-sm`})]})})]})}),UY={overflow:`scroll`,diffStyle:`unified`},WY=new WeakMap;function GY(e){let t=e.replaceAll(`\r
|
|
1341
|
+
`,`
|
|
1342
|
+
`);if(t.length===0)return[];let n=t.split(`
|
|
1343
|
+
`);return n[n.length-1]===``&&n.pop(),n}function KY(e){return e?GY(e).filter(e=>!Qf(e)):[]}function qY(e){return e.replaceAll(`\\`,`/`).replace(/^\/+/u,``)}function JY(e,t){if(!e||!t)return e;let n=t.replace(/\/+$/u,``);return n.length===0||e===n?e:e.startsWith(`${n}/`)?e.slice(n.length+1):e}function YY(e,t){if(!t)return e;let n=JY(e.path,t)??e.path,r=JY(e.movePath,t);return n===e.path&&r===e.movePath?e:{...e,path:n,movePath:r}}function XY(e,t){let n=t===`created`?`+`:`-`,r=t===`created`?`-`:`+`,i=[];for(let t of e){if(t.startsWith(n)){i.push(t);continue}t.startsWith(r)||t.startsWith(` `)||i.push(`${n}${t}`)}return i}function ZY(e,t){let n=KY(e.diff);if(n.length===0)return null;let r=qY(e.path),i=t===`created`?`/dev/null`:`a/${r}`,a=t===`created`?`b/${r}`:`/dev/null`,o=XY(n,t);return o.length===0?null:`diff --git a/${r} b/${r}\n--- ${i}\n+++ ${a}\n@@ -1,${t===`created`?0:o.length} +1,${t===`created`?o.length:0} @@\n${o.join(`
|
|
1344
|
+
`)}\n`}function QY(e){let t=KY(e.diff);if(t.length===0||!t.some(e=>e.startsWith(`+`)||e.startsWith(`-`)))return null;let n=qY(e.movePath??e.path),r=t.filter(e=>e.startsWith(`-`)).length,i=t.filter(e=>e.startsWith(`+`)).length;return`diff --git a/${n} b/${n}\n--- a/${n}\n+++ b/${n}\n@@ -1,${Math.max(r,1)} +1,${Math.max(i,1)} @@\n${t.join(`
|
|
1345
|
+
`)}\n`}function $Y(e){let t=e.diff;if(t&&t.trim().length>0){let n=t.trimEnd();if(n.startsWith(`diff --git`)||n.includes(`--- `)&&n.includes(`+++ `)&&n.includes(`@@`))return{patch:t,disableLineNumbers:!1};if(t.includes(`@@`)){let n=qY(e.movePath??e.path);return{patch:`diff --git a/${n} b/${n}\n--- a/${n}\n+++ b/${n}\n${t.trimEnd()}\n`,disableLineNumbers:!1}}}let n=ep(e),r=(n===`created`?ZY(e,`created`):n===`deleted`?ZY(e,`deleted`):null)??QY(e);return r?{patch:r,disableLineNumbers:!0}:null}function eX(e){try{let t=kJ(e.patch);if(t.length!==1)return null;let n=t[0];if(!n||n.files.length!==1)return null;let r=n.files[0];return r?{disableLineNumbers:e.disableLineNumbers,fileDiff:r}:null}catch{return null}}function tX(e,t){if(t)return null;let n=e.diff?.trimEnd();return n&&n.length>0?n:null}function nX(e){let t=WY.get(e);if(t)return t;let n=$Y(e),r=n===null?null:eX(n),i={renderablePatch:r,plainDiff:tX(e,r!==null)};return WY.set(e,i),i}var rX=(0,B.memo)(function({change:e,themeType:t,workspaceRootPath:n}){let r=(0,B.useMemo)(()=>YY(e,n),[e,n]),i=(0,B.useMemo)(()=>nX(r),[r]),a=i.renderablePatch,o=(0,B.useMemo)(()=>a?{...UY,themeType:t,disableLineNumbers:a.disableLineNumbers}:null,[a,t]);if(a===null&&i.plainDiff===null)return(0,V.jsx)(`div`,{className:`rounded-md border border-border bg-surface-raised px-2 py-1.5 text-xs text-muted-foreground`,children:`No diff available.`});let s=`${a?`p`:`n`}:${i.plainDiff?.length??0}`;return a&&o?(0,V.jsx)(sL,{size:`base`,contentKey:s,className:`mt-1`,children:(0,V.jsx)(`div`,{"data-timeline-file-diff":``,children:(0,V.jsx)(HY,{fileDiff:a.fileDiff,diffViewOptions:o,filePathRoot:n,stickyHeader:!0})})}):(0,V.jsx)(sL,{size:`base`,contentKey:s,className:`mt-1 rounded-md border border-border bg-surface-raised`,children:(0,V.jsx)(`div`,{className:`min-w-fit`,children:(0,V.jsx)(SM,{className:`rounded-none border-0 bg-transparent`,children:i.plainDiff})})})});function iX(e){return typeof e==`string`?e:e===null?`null`:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e,null,2)}function aX({toolName:e,argEntries:t}){let[n,r]=(0,B.useState)(!1),[i,a]=(0,B.useState)(!1),o=(0,B.useRef)(null);return(0,B.useEffect)(()=>{if(n)return;let e=o.current;if(!e)return;let t=()=>{a(e.scrollHeight>e.clientHeight+1)};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{ref:n?null:o,className:R(`relative whitespace-pre-wrap break-words leading-tight`,n?null:`line-clamp-3`),children:[(0,V.jsx)(`span`,{className:`font-semibold`,children:e}),t.map(([e,t])=>(0,V.jsxs)(B.Fragment,{children:[`
|
|
1346
|
+
`,(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[e,`: `]}),(0,V.jsx)(`span`,{children:iX(t)})]},e)),i&&!n?(0,V.jsxs)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-0 flex h-[1lh] items-stretch justify-end`,"aria-hidden":!0,children:[(0,V.jsx)(`div`,{className:`w-24 bg-gradient-to-l from-card to-transparent`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>r(!0),"aria-expanded":!1,"aria-hidden":!1,className:`pointer-events-auto cursor-pointer bg-card pl-2 text-muted-foreground hover:text-foreground`,children:`Show more`})]}):null]}),n?(0,V.jsx)(`div`,{className:`mt-1 flex justify-end`,children:(0,V.jsx)(`button`,{type:`button`,onClick:()=>r(!1),className:`text-muted-foreground hover:text-foreground`,"aria-expanded":!0,children:`Show less`})}):null]})}function oX({toolName:e,args:t,output:n,streaming:r=!1}){let i=t?Object.entries(t):[],a=n.trim().length>0;return(0,V.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,V.jsxs)(sL,{size:`base`,streaming:r,contentKey:n,scrollClassName:`px-4 py-3 font-mono text-xs leading-tight text-foreground`,children:[(0,V.jsx)(aX,{toolName:e,argEntries:i}),a?(0,V.jsx)(`div`,{className:`mt-2 whitespace-pre border-t border-border pt-2`,children:n}):null]})})}function sX({row:e}){return e.lifecycle!==`answered`&&e.lifecycle!==`resolving`?null:(0,V.jsx)(`div`,{className:`space-y-2 text-xs leading-snug`,children:e.questions.map(t=>(0,V.jsx)(cX,{question:t,answer:e.answers?.[t.id]??null},t.id))})}function cX({question:e,answer:t}){let n=t?.selected.map(t=>Ce({question:e,value:t}))??[],r=t?.freeText??null,i=n.length>0||r!==null;return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:e.prompt}),i?(0,V.jsxs)(`div`,{className:`mt-0.5 text-foreground`,children:[n.length>0?(0,V.jsx)(`div`,{children:n.join(`, `)}):null,r?(0,V.jsx)(`div`,{className:`whitespace-pre-wrap`,children:r}):null]}):(0,V.jsx)(`div`,{className:`mt-0.5 text-muted-foreground`,children:`No answer`})]})}function lX(e){let t=[];for(let n of e)n!==null&&t.push(n);return t}function uX({row:e,themeType:t,workspaceRootPath:n}){switch(e.workKind){case`command`:return(0,V.jsx)(_L,{commandLine:`$ ${e.command}`,metadataLines:lX([e.source?`source: ${e.source}`:null]),output:e.output,exitCode:e.exitCode,streaming:e.status===`pending`});case`tool`:return(0,V.jsx)(oX,{toolName:e.toolName,args:e.toolArgs,output:e.output,streaming:e.status===`pending`});case`file-change`:return(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(rX,{change:e.change,themeType:t,workspaceRootPath:n}),e.stderr?(0,V.jsx)(sL,{size:`base`,contentKey:e.stderr,className:`rounded-md`,children:(0,V.jsx)(SM,{tone:`danger`,className:`rounded-none border-0 px-2 py-1.5`,children:e.stderr})}):null]});case`delegation`:return null;case`question`:return(0,V.jsx)(sX,{row:e});case`approval`:case`web-search`:case`web-fetch`:return null;default:return H(e)}}var dX=`cubic-bezier(0.16, 1, 0.3, 1)`;function fX(e,t){t.savedDuration===null&&(t.savedDuration=e.style.transitionDuration),e.style.transitionDuration=`0s`}function pX(e,t){t.restoreFrame!==null&&cancelAnimationFrame(t.restoreFrame),t.restoreFrame=requestAnimationFrame(()=>{t.restoreFrame=null,t.savedDuration!==null&&(e.style.transitionDuration=t.savedDuration,t.savedDuration=null)})}function mX(e,t,n,r){let i=parseFloat(e.style.height),a=parseFloat(t);(n||Number.isFinite(i)&&Number.isFinite(a)&&a<i)&&(fX(e,r),pX(e,r)),e.style.height=t}function hX(e,t){t.restoreFrame!==null&&(cancelAnimationFrame(t.restoreFrame),t.restoreFrame=null),t.savedDuration!==null&&e&&(e.style.transitionDuration=t.savedDuration,t.savedDuration=null)}function gX({visible:e,children:t,durationMs:n=180,className:r}){let i=(0,B.useRef)(null),a=(0,B.useRef)(null),o=br();return(0,B.useLayoutEffect)(()=>{let t=i.current,n=a.current;if(!t||!n||(t.style.height=e?`${n.offsetHeight}px`:`0px`,typeof ResizeObserver>`u`))return;let r=null,s=!1,c={savedDuration:null,restoreFrame:null},l=new ResizeObserver(n=>{let i=n[0];if(!i)return;let{width:a,height:l}=i.contentRect,u=r!==null&&a!==r,d=o.get(Yj)>0,f=u||s||d;s=!1,r=a,mX(t,e?`${l}px`:`0px`,f,c)});l.observe(n);let u=()=>{document.visibilityState===`visible`&&(s=!0,mX(t,e?`${n.offsetHeight}px`:`0px`,!0,c))};return document.addEventListener(`visibilitychange`,u),()=>{l.disconnect(),document.removeEventListener(`visibilitychange`,u),hX(t,c)}},[e,o]),(0,V.jsx)(`div`,{ref:i,className:r,style:{overflowX:`visible`,overflowY:`clip`,opacity:+!!e,transition:`height ${n}ms ${dX}, opacity ${n}ms ${dX}`},children:(0,V.jsx)(`div`,{ref:a,style:{display:`flow-root`},children:t})})}var _X=250;function vX({children:e,className:t,durationMs:n=180}){let r=(0,B.useRef)(null),i=(0,B.useRef)(null),a=br();return(0,B.useLayoutEffect)(()=>{let e=r.current,t=i.current;if(!e||!t||typeof ResizeObserver>`u`)return;e.style.height=`${t.offsetHeight}px`;let n=null,o=!1,s=!1,c=window.setTimeout(()=>{s=!0},_X),l={savedDuration:null,restoreFrame:null},u=new ResizeObserver(t=>{let r=t[0];if(!r)return;let{width:i,height:u}=r.contentRect,d=n!==null&&i!==n,f=a.get(Yj)>0,p=d||o||!s||f;o=!1,n=i,mX(e,`${u}px`,p,l),s||(window.clearTimeout(c),c=window.setTimeout(()=>{s=!0},_X))});u.observe(t);let d=()=>{document.visibilityState===`visible`&&(o=!0,mX(e,`${t.offsetHeight}px`,!0,l))};return document.addEventListener(`visibilitychange`,d),()=>{u.disconnect(),document.removeEventListener(`visibilitychange`,d),window.clearTimeout(c),hX(e,l)}},[a]),(0,V.jsx)(`div`,{ref:r,className:t,style:{overflowX:`visible`,overflowY:`clip`,transition:`height ${n}ms ${dX}`},children:(0,V.jsx)(`div`,{ref:i,style:{display:`flow-root`},children:e})})}function yX(e){return e===null?`<null>`:e===void 0?`<undefined>`:String(e)}function bX(e){return e.map(yX).join(``)}function xX(e){switch(e.type){case`read`:return bX([e.type,e.command,e.name,e.path]);case`list_files`:return bX([e.type,e.command,e.path]);case`search`:return bX([e.type,e.command,e.query,e.path]);case`unknown`:return bX([e.type,e.command]);default:return H(e)}}function SX(e){return e.map(xX).join(``)}var CX=new WeakMap,wX=new WeakMap;function TX(e){let t=wX.get(e);if(t!==void 0)return t;let n=e.map(OX).join(``);return wX.set(e,n),n}function EX(e){return bX([e.kind,e.id,e.threadId,e.turnId,e.sourceSeqStart,e.sourceSeqEnd,e.startedAt,e.createdAt])}function DX(e){let t=[EX(e),e.status,e.workKind,e.inClosedStep];switch(e.workKind){case`command`:return bX([...t,e.callId,e.command,e.source,e.exitCode,e.completedAt,e.approvalStatus,SX(e.activityIntents)]);case`tool`:return bX([...t,e.callId,e.toolName,e.completedAt,e.approvalStatus,SX(e.activityIntents)]);case`file-change`:return bX([...t,e.callId,e.approvalStatus,e.change.kind,e.change.path,e.change.movePath,e.change.diffStats.added,e.change.diffStats.removed]);case`web-search`:return bX([...t,e.callId,e.queries.join(``),e.completedAt]);case`web-fetch`:return bX([...t,e.callId,e.url,e.prompt,e.pattern,e.completedAt]);case`delegation`:return bX([...t,e.callId,e.toolName,e.subagentType,e.description,e.completedAt,TX(e.childRows)]);case`approval`:return bX([...t,e.interactionId,e.approvalKind,e.lifecycle,e.approvalKind===`permission-grant`?e.grantScope:null,e.approvalKind===`permission-grant`?e.statusReason:null,e.target.itemId,e.target.toolName]);case`question`:return bX([...t,e.interactionId,e.lifecycle,e.statusReason,e.questions.map(e=>bX([e.id,e.prompt,e.shortLabel,e.multiSelect,e.allowFreeText,e.options?.map(e=>bX([e.value,e.label,e.description])).join(``)])).join(``),e.answers?Object.entries(e.answers).map(([e,t])=>bX([e,t.selected.join(``),t.freeText])).join(``):null]);default:return H(e)}}function OX(e){let t=CX.get(e);if(t!==void 0)return t;let n=kX(e);return CX.set(e,n),n}function kX(e){let t=EX(e);switch(e.kind){case`conversation`:return bX([t,e.role,e.turnRequest?.kind,e.turnRequest?.status,e.attachments?.localFiles,e.attachments?.localImages,e.attachments?.webImages]);case`system`:return e.systemKind===`operation`?bX([t,e.status,e.systemKind,e.operationKind,e.operationKind===`manager-assignment`?e.managerAssignment.action:null,e.operationKind===`manager-assignment`?e.managerAssignment.previousManagerThreadId:null,e.operationKind===`manager-assignment`?e.managerAssignment.previousManagerThreadTitle:null,e.operationKind===`manager-assignment`?e.managerAssignment.nextManagerThreadId:null,e.operationKind===`manager-assignment`?e.managerAssignment.nextManagerThreadTitle:null,e.title,e.detail]):bX([t,e.status,e.systemKind,e.title,e.detail]);case`bundle-summary`:case`step-summary`:return bX([t,e.status,TX(e.children)]);case`turn`:return bX([t,e.status,e.summaryCount,e.completedAt,e.children?TX(e.children):null]);case`work`:return DX(e);default:return H(e)}}var AX=`relative my-1 pl-3 pr-2 before:pointer-events-none before:absolute before:bottom-1 before:left-1.5 before:top-0 before:w-px before:bg-border-hairline before:content-['']`,jX=(0,B.createContext)(null),MX=(0,B.createContext)(null);function NX(){let e=(0,B.useContext)(jX);if(!e)throw Error(`Thread timeline renderer context is missing`);return e}function PX(){let e=(0,B.useContext)(MX);if(!e)throw Error(`Thread timeline turn-state context is missing`);return e}function FX({activeLatestBundleId:e,compactActivityIntents:t,row:n,scopeActive:r}){return bX([OX(n),t,r,e===n.id])}function IX({activeLatestBundleId:e,compactActivityIntents:t,row:n,scopeActive:r,spacing:i}){if(t&&GX(n)){let e=Fm(n);if(e.length>0)return{kind:`compact-activity-intents`,titles:e}}return{kind:`row-title`,title:zm(n,qX({activeLatestBundleId:e,row:n,scopeActive:r}))}}function LX(e){let t=(0,B.useRef)(null),n=FX(e),r=t.current;if(r?.key===n)return r.state;let i=IX(e);return t.current={key:n,state:i},i}function RX(e,t){return e.compactActivityIntents===t.compactActivityIntents&&e.scopeActive===t.scopeActive&&e.spacing===t.spacing&&e.activeLatestBundleId===t.activeLatestBundleId&&(e.row===t.row||OX(e.row)===OX(t.row))}function zX(e,t){return e.activeLatestBundleId===t.activeLatestBundleId&&e.compactActivityIntents===t.compactActivityIntents&&e.title===t.title&&e.horizontalPadding===t.horizontalPadding&&(e.row===t.row||OX(e.row)===OX(t.row))}function BX(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function VX(e){let t=(0,B.useRef)(e);return BX(t.current,e)||(t.current=e),t.current}function HX(e){return{id:e.id,threadId:e.threadId,turnId:e.turnId,sourceSeqStart:e.sourceSeqStart,sourceSeqEnd:e.sourceSeqEnd,startedAt:e.startedAt,createdAt:e.createdAt,kind:`turn`,status:e.status,summaryCount:e.summaryCount,completedAt:e.completedAt,children:null}}function UX({onLoadTurnSummaryRows:e,row:t}){e(HX(t))}function WX(){let e=(0,B.useRef)(Kp());return(0,B.useCallback)((t,n)=>Yp(t,{...n,cache:e.current}),[])}function GX(e){return e.kind===`work`&&(e.workKind===`command`||e.workKind===`tool`)&&e.approvalStatus===null}function KX({activeLatestBundleId:e,row:t,scopeActive:n}){return t.kind===`bundle-summary`&&n&&t.id===e}function qX({activeLatestBundleId:e,row:t,scopeActive:n}){let r=KX({activeLatestBundleId:e,row:t,scopeActive:n});return{summaryStyle:t.kind===`step-summary`?`background`:`bundle`,workStyle:t.kind===`work`&&t.inClosedStep?`summary`:`default`,isActiveLatestBundle:r}}function JX(e){switch(e){case`top-level`:case`nested`:return`default`;case`bundle`:return`flush`}}function YX({children:e,className:t,horizontalPadding:n=`default`}){return(0,V.jsx)(uM,{horizontalPadding:n,className:t,children:e})}function XX(e){switch(e){case`top-level`:return`gap-4`;case`nested`:return`gap-3`;case`bundle`:return`gap-0`}}function ZX({row:e}){let{onOpenLocalFileLink:t,projectId:n,resolveUserAttachmentImageSrc:r}=NX();return e.role===`user`?(0,V.jsx)(Jj,{attachments:e.attachments,initiator:e.initiator,onOpenLocalFileLink:t,projectId:n,resolveUserAttachmentImageSrc:r,role:`user`,text:e.text,turnRequest:e.turnRequest}):(0,V.jsx)(Jj,{attachments:e.attachments,onOpenLocalFileLink:t,projectId:n,resolveUserAttachmentImageSrc:r,role:`assistant`,text:e.text,turnRequest:e.turnRequest})}function QX({autoScroll:e}){let t=Je(),n=(0,B.useRef)(null),r=(0,B.useRef)(!1);return(0,B.useEffect)(()=>{if(!e||!t||r.current)return;let i=window.setTimeout(()=>{let e=n.current;e&&(r.current=!0,t.scrollElementIntoViewClampedToMaxScroll({element:e}))},0);return()=>window.clearTimeout(i)},[e,t]),(0,V.jsxs)(`div`,{ref:n,role:`separator`,"aria-label":`New messages`,className:`flex items-center gap-2 px-2 py-1 text-[10px] font-medium uppercase tracking-wider text-foreground`,"data-testid":`thread-unread-divider`,children:[(0,V.jsx)(`span`,{className:`shrink-0`,children:`New`}),(0,V.jsx)(`span`,{className:`h-px min-w-0 flex-1 bg-border`,"aria-hidden":!0})]})}function $X({detail:e,streaming:t}){return(0,V.jsx)(sL,{size:`base`,streaming:t,contentKey:e,className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,V.jsx)(`pre`,{className:`whitespace-pre-wrap break-words px-4 py-3 font-mono text-xs leading-tight text-foreground`,children:e})})}function eZ({activeLatestBundleId:e,compactActivityIntents:t,row:n}){let{onOpenLocalFileLink:r,projectId:i,resolveUserAttachmentImageSrc:a,themeType:o,workspaceRootPath:s}=NX();switch(n.kind){case`bundle-summary`:case`step-summary`:{let t=(0,V.jsx)(uZ,{rows:n.children,scopeActive:!1,compactActivityIntents:!0,spacing:`bundle`,unreadDividerAutoScroll:!1,unreadDividerPlacement:null});return Hm(n.children)?(0,V.jsx)(sL,{size:`summary`,streaming:n.kind===`bundle-summary`&&n.id===e,contentKey:TX(n.children),children:t}):t}case`turn`:return(0,V.jsx)(tZ,{row:n,compactActivityIntents:t});case`work`:if(n.workKind===`delegation`){let e=n.status===`pending`;return(0,V.jsx)(sL,{size:`delegation`,streaming:e,contentKey:`${TX(n.childRows)}|${n.output.length}`,className:AX,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n.childRows.length>0?(0,V.jsx)(uZ,{rows:n.childRows,scopeActive:e,compactActivityIntents:!1,spacing:`nested`,unreadDividerAutoScroll:!1,unreadDividerPlacement:null}):null,n.output.trim().length>0?(0,V.jsx)(Jj,{attachments:null,onOpenLocalFileLink:r,projectId:i,resolveUserAttachmentImageSrc:a,role:`assistant`,text:n.output,turnRequest:null}):null]})})}return(0,V.jsx)(uX,{row:n,themeType:o,workspaceRootPath:s});case`system`:return n.detail?(0,V.jsx)($X,{detail:n.detail,streaming:n.status===`pending`}):null;case`conversation`:return null;default:return H(n)}}function tZ({compactActivityIntents:e,row:t}){let{getViewRows:n,onLoadTurnSummaryRows:i}=NX(),{loadingTurnSummaryIds:a,erroredTurnSummaryIds:o,turnSummaryRowsById:s}=PX(),c=s[t.id],l=t.children!==null,u=c!==void 0,d=l?t.children:c?n(c,{closedScope:!0}):null,f=a.has(t.id),p=o.has(t.id),m=(0,B.useCallback)(()=>{UX({onLoadTurnSummaryRows:i,row:t})},[i,t]);return(0,B.useEffect)(()=>{l||u||f||p||UX({onLoadTurnSummaryRows:i,row:t})},[u,l,p,f,i,t]),p?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,V.jsx)(`span`,{children:`Failed to load turn details.`}),(0,V.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:m,className:`h-7 border-destructive px-2 text-destructive hover:text-destructive`,children:[(0,V.jsx)(r,{name:`RotateCcw`}),`Retry`]})]}):d?(0,V.jsx)(uZ,{rows:d,scopeActive:!1,compactActivityIntents:e,spacing:`nested`,className:AX,unreadDividerAutoScroll:!1,unreadDividerPlacement:null}):(0,V.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Loading turn details...`})}function nZ({activeLatestBundleId:e,compactActivityIntents:t,row:n,scopeActive:r,spacing:i}){let{onTitleAction:a,resolveSegmentLinkHref:o}=NX(),s=JX(i),c=LX({activeLatestBundleId:e,compactActivityIntents:t,row:n,scopeActive:r,spacing:i});return n.kind===`conversation`?(0,V.jsx)(ZX,{row:n}):c.kind===`compact-activity-intents`?(0,V.jsx)(V.Fragment,{children:c.titles.map(e=>(0,V.jsx)(YX,{horizontalPadding:s,children:(0,V.jsx)(vM,{title:e.title,onTitleAction:a,resolveSegmentLinkHref:o})},e.id))}):Vm(n)?(0,V.jsx)(aZ,{activeLatestBundleId:e,row:n,title:c.title,horizontalPadding:s,compactActivityIntents:t}):(0,V.jsx)(YX,{horizontalPadding:s,children:(0,V.jsx)(vM,{title:c.title,onTitleAction:a,resolveSegmentLinkHref:o})})}var rZ=(0,B.memo)(nZ,RX);function iZ({activeLatestBundleId:e,compactActivityIntents:t,title:n,horizontalPadding:r,row:i}){let{onLoadTurnSummaryRows:a,onTitleAction:o,resolveSegmentLinkHref:s}=NX(),{autoExpandedRowIds:c,loadingTurnSummaryIds:l,erroredTurnSummaryIds:u,turnSummaryRowsById:d}=PX(),f=(0,B.useCallback)(()=>{i.kind===`turn`&&i.children===null&&!d[i.id]&&!l.has(i.id)&&!u.has(i.id)&&UX({onLoadTurnSummaryRows:a,row:i})},[u,l,a,i,d]),p=(0,B.useCallback)(()=>(0,V.jsx)(eZ,{activeLatestBundleId:e,row:i,compactActivityIntents:t}),[e,t,i]);return(0,V.jsx)(xM,{title:n,horizontalPadding:r,autoExpanded:c.has(i.id),onBeforeExpand:f,onTitleAction:o,resolveSegmentLinkHref:s,renderBody:p})}var aZ=(0,B.memo)(iZ,zX);function oZ({rows:e,unreadDividerPlacement:t}){if(t===null)return-1;switch(t.kind){case`before-first`:return e.length>0?0:-1;case`after-cutoff`:return e.findIndex(e=>cZ({cutoffAt:t.cutoffAt,row:e}));default:H(t)}}function sZ(e){return e.kind===`conversation`&&e.role===`user`&&e.initiator===`user`}function cZ({cutoffAt:e,row:t}){return t.createdAt<=e?!1:!sZ(t)}function lZ({rows:e,unreadDividerPlacement:t}){let n=[],r=oZ({rows:e,unreadDividerPlacement:t});for(let[t,i]of e.entries())t===r&&n.push({kind:`unread-divider`,id:`thread-unread-divider`}),n.push({kind:`row`,row:i});return n}function uZ({compactActivityIntents:e,rows:t,scopeActive:n,spacing:r,className:i,unreadDividerAutoScroll:a,unreadDividerPlacement:o}){let s=(0,B.useMemo)(()=>Rm(t),[t]),c=(0,B.useMemo)(()=>lZ({rows:t,unreadDividerPlacement:o}),[t,o]);return(0,V.jsx)(`div`,{className:R(`flex min-w-0 flex-col`,XX(r),i),"data-timeline-row-list":r,children:c.map(t=>t.kind===`unread-divider`?(0,V.jsx)(QX,{autoScroll:a},t.id):(0,V.jsx)(`div`,{"data-timeline-row-id":t.row.id,children:(0,V.jsx)(rZ,{activeLatestBundleId:s,row:t.row,scopeActive:n,spacing:r,compactActivityIntents:e})},t.row.id))})}function dZ(e){return(0,V.jsx)(fZ,{...e},e.turnSummaryRowsIdentity)}function fZ(e){let t=WX(),n=(0,B.useMemo)(()=>t(e.timelineRows),[t,e.timelineRows]),r=Jf(e.threadRuntimeDisplayStatus),i=e.themeType??`light`,a=VX((0,B.useMemo)(()=>{let t=new Set(Gm({rows:n,scopeActive:r}));if(e.initialExpanded)for(let n of e.initialExpanded)t.add(n);return t},[n,r,e.initialExpanded])),o=VX(e.loadingTurnSummaryIds),s=VX(e.erroredTurnSummaryIds),c=e.onLoadTurnSummaryRows,l=(0,B.useRef)(new Set);(0,B.useEffect)(()=>{for(let e of s)l.current.delete(e)},[s]);let u=(0,B.useCallback)(e=>{l.current.has(e.id)||(l.current.add(e.id),c(e))},[c]),d=e.projectId,f=(0,B.useMemo)(()=>{if(d!==void 0)return e=>{switch(e.kind){case`thread`:return zu({projectId:d,threadId:e.threadId});default:return H(e.kind)}}},[d]),p=(0,B.useMemo)(()=>({getViewRows:t,onLoadTurnSummaryRows:u,onOpenLocalFileLink:e.onOpenLocalFileLink,onTitleAction:e.onTitleAction,projectId:d,resolveSegmentLinkHref:f,resolveUserAttachmentImageSrc:e.resolveUserAttachmentImageSrc,themeType:i,workspaceRootPath:e.workspaceRootPath}),[t,u,e.onOpenLocalFileLink,e.onTitleAction,d,f,e.resolveUserAttachmentImageSrc,e.workspaceRootPath,i]),m=(0,B.useMemo)(()=>({autoExpandedRowIds:a,erroredTurnSummaryIds:s,loadingTurnSummaryIds:o,turnSummaryRowsById:e.turnSummaryRowsById}),[a,s,o,e.turnSummaryRowsById]);return(0,V.jsx)(jX.Provider,{value:p,children:(0,V.jsx)(MX.Provider,{value:m,children:(0,V.jsx)(vX,{children:(0,V.jsx)(uZ,{rows:n,scopeActive:r,compactActivityIntents:!1,spacing:`top-level`,unreadDividerAutoScroll:e.unreadDividerAutoScroll??!0,unreadDividerPlacement:e.unreadDividerPlacement??null})})})})}var pZ=(0,B.memo)(dZ);pZ.displayName=`ThreadTimelineRows`;function mZ({label:e,className:t}){return(0,V.jsx)(`div`,{className:R(`px-2 text-sm text-muted-foreground`,t),children:e})}function hZ({label:e,isThinking:t=!1,details:n,className:r}){let[i,a]=(0,B.useState)(!1),o=e??(t?`Thinking...`:`Working...`);return(n?.trim()??``).length>0?(0,V.jsx)(`div`,{className:R(`mt-4`,r),children:(0,V.jsx)(aM,{isExpanded:i,summaryContent:(0,V.jsx)(`span`,{className:`animate-shine`,children:o}),headerToneClass:rM(i),onToggle:()=>a(e=>!e),children:(0,V.jsx)(`div`,{className:`max-h-80 overflow-auto whitespace-pre-wrap text-sm italic leading-relaxed text-muted-foreground`,children:n})})}):(0,V.jsx)(mZ,{label:(0,V.jsx)(`span`,{className:`animate-shine`,children:o}),className:R(`mt-4`,r)})}var gZ=`Popover`,[_Z,vZ]=Zt(gZ,[xn]),yZ=xn(),[bZ,xZ]=_Z(gZ),SZ=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=yZ(t),c=B.useRef(null),[l,u]=B.useState(!1),[d,f]=pn({prop:r,defaultProp:i??!1,onChange:a,caller:gZ});return(0,V.jsx)(On,{...s,children:(0,V.jsx)(bZ,{scope:t,contentId:yn(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:B.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:B.useCallback(()=>u(!0),[]),onCustomAnchorRemove:B.useCallback(()=>u(!1),[]),modal:o,children:n})})};SZ.displayName=gZ;var CZ=`PopoverAnchor`,wZ=B.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=xZ(CZ,n),a=yZ(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return B.useEffect(()=>(o(),()=>s()),[o,s]),(0,V.jsx)(hn,{...a,...r,ref:t})});wZ.displayName=CZ;var TZ=`PopoverTrigger`,EZ=B.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=xZ(TZ,n),a=yZ(n),o=vt(t,i.triggerRef),s=(0,V.jsx)(Kn.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":VZ(i.open),...r,ref:o,onClick:Tt(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,V.jsx)(hn,{asChild:!0,...a,children:s})});EZ.displayName=TZ;var DZ=`PopoverPortal`,[OZ,kZ]=_Z(DZ,{forceMount:void 0}),AZ=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=xZ(DZ,t);return(0,V.jsx)(OZ,{scope:t,forceMount:n,children:(0,V.jsx)(En,{present:n||a.open,children:(0,V.jsx)(Bn,{asChild:!0,container:i,children:r})})})};AZ.displayName=DZ;var jZ=`PopoverContent`,MZ=B.forwardRef((e,t)=>{let n=kZ(jZ,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=xZ(jZ,e.__scopePopover);return(0,V.jsx)(En,{present:r||a.open,children:a.modal?(0,V.jsx)(PZ,{...i,ref:t}):(0,V.jsx)(FZ,{...i,ref:t})})});MZ.displayName=jZ;var NZ=dn(`PopoverContent.RemoveScroll`),PZ=B.forwardRef((e,t)=>{let n=xZ(jZ,e.__scopePopover),r=B.useRef(null),i=vt(t,r),a=B.useRef(!1);return B.useEffect(()=>{let e=r.current;if(e)return an(e)},[]),(0,V.jsx)(on,{as:NZ,allowPinchZoom:!0,children:(0,V.jsx)(IZ,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tt(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Tt(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:Tt(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),FZ=B.forwardRef((e,t)=>{let n=xZ(jZ,e.__scopePopover),r=B.useRef(!1),i=B.useRef(!1);return(0,V.jsx)(IZ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),IZ=B.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=xZ(jZ,n),p=yZ(n);return qt(),(0,V.jsx)(sn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,V.jsx)(ln,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,V.jsx)(Pn,{"data-state":VZ(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),LZ=`PopoverClose`,RZ=B.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=xZ(LZ,n);return(0,V.jsx)(Kn.button,{type:`button`,...r,ref:t,onClick:Tt(e.onClick,()=>i.onOpenChange(!1))})});RZ.displayName=LZ;var zZ=`PopoverArrow`,BZ=B.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=yZ(n);return(0,V.jsx)(_n,{...i,...r,ref:t})});BZ.displayName=zZ;function VZ(e){return e?`open`:`closed`}var HZ=SZ,UZ=wZ,WZ=EZ,GZ=AZ,KZ=MZ,qZ=B.createContext({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});function JZ(){return B.useContext(qZ)}function YZ({children:e,open:t,onOpenChange:n,defaultOpen:r,...i}){let a=Gn(t,n,r);return a.isCompactViewport?(0,V.jsx)(qZ.Provider,{value:a,children:e}):(0,V.jsx)(HZ,{open:a.open,onOpenChange:a.onOpenChange,...i,children:(0,V.jsx)(qZ.Provider,{value:a,children:e})})}var XZ=B.forwardRef(({asChild:e,children:t,className:n,...r},i)=>{let{isCompactViewport:a,open:o,onOpenChange:s}=JZ();return a?(0,V.jsx)(vn,{ref:i,asChild:e,open:o,onOpenChange:s,haspopup:`dialog`,className:n,...r,children:t}):(0,V.jsx)(WZ,{ref:i,asChild:e,className:Xt(n),onMouseDown:wt,...r,children:t})});XZ.displayName=`PopoverTrigger`;var ZZ=B.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,children:r,mobileTitle:i,mobileClassName:a,...o},s)=>{let{isCompactViewport:c,open:l,onOpenChange:u}=JZ();if(c){let t=Vn(o);return(0,V.jsx)(cn,{open:l,onOpenChange:u,srLabel:i??`Options`,contentClassName:a,children:(0,V.jsx)(`div`,{ref:s,className:R(`overflow-y-auto px-4 pt-2 pb-[max(1rem,env(safe-area-inset-bottom))]`,e),...t,children:r})})}return(0,V.jsx)(GZ,{children:(0,V.jsx)(KZ,{ref:s,align:t,sideOffset:n,className:R(`z-50 w-96 rounded-md border bg-background p-4 text-foreground shadow-md outline-none 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`,e),...o,children:r})})});ZZ.displayName=`PopoverContent`;var QZ=B.forwardRef(({children:e,...t},n)=>{let{isCompactViewport:r}=JZ();return r?(0,V.jsx)(V.Fragment,{children:e}):(0,V.jsx)(UZ,{ref:n,...t,children:e})});QZ.displayName=`PopoverAnchor`;var $Z=`(pointer: coarse)`;function eQ(){return jt($Z)}var tQ=160,nQ=()=>void 0,rQ={onPointerEnter:nQ,onPointerLeave:nQ};function iQ({closeDelayMs:e=tQ}={}){let t=eQ(),[n,r]=(0,B.useState)(!1),[i,a]=(0,B.useState)(!1),[o,s]=(0,B.useState)(!1),c=(0,B.useRef)(null),l=(0,B.useCallback)(()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},[]);(0,B.useEffect)(()=>{if(!t){if(l(),i||o){r(!0);return}return c.current=window.setTimeout(()=>{r(!1),c.current=null},e),l}},[l,e,t,o,i]),(0,B.useEffect)(()=>l,[l]);let u=(0,B.useCallback)(e=>{if(e){l(),r(!0);return}a(!1),s(!1),l(),r(!1)},[l]);return{open:n,triggerHoverProps:t?rQ:{onPointerEnter:()=>{a(!0)},onPointerLeave:()=>{a(!1)}},contentHoverProps:t?rQ:{onPointerEnter:()=>{s(!0)},onPointerLeave:()=>{s(!1)},onOpenAutoFocus:e=>{e.preventDefault()},onCloseAutoFocus:e=>{e.preventDefault()}},handleOpenChange:u}}var aQ=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:0});function oQ(e){if(e.modelContextWindow<=0)return 0;let t=e.usedTokens/e.modelContextWindow;return Math.round(Math.min(Math.max(t,0),1)*100)}function sQ(e){let t=Math.max(0,Math.round(e));return aQ.format(t).toLowerCase()}function cQ({usage:e,className:t}){let{open:n,triggerHoverProps:r,contentHoverProps:i,handleOpenChange:a}=iQ(),o=oQ(e),s=Math.max(0,100-o),c=Math.min(Math.max(o,0),100),l=6.5,u=2*Math.PI*l,d=u*(1-c/100),f=o>=90?`text-destructive`:o>=75?`text-warning-text`:`text-muted-foreground`,p=sQ(e.usedTokens),m=sQ(e.modelContextWindow),h=e.estimated?`Estimated context window usage`:`Context window usage`;return(0,V.jsxs)(YZ,{open:n,onOpenChange:a,children:[(0,V.jsx)(XZ,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,...r,className:R(`inline-flex size-6 items-center justify-center rounded-full transition-colors hover:bg-state-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,t),"aria-label":`Context window ${o}% used`,title:h,children:(0,V.jsxs)(`svg`,{viewBox:`0 0 16 16`,className:R(`size-4`,f),"aria-hidden":`true`,children:[(0,V.jsx)(`circle`,{cx:`8`,cy:`8`,r:l,fill:`none`,strokeWidth:`3`,className:`stroke-border-hairline`}),(0,V.jsx)(`circle`,{cx:`8`,cy:`8`,r:l,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeDasharray:u,strokeDashoffset:d,transform:`rotate(-90 8 8)`})]})})}),(0,V.jsx)(ZZ,{side:`top`,align:`end`,sideOffset:8,...i,className:`w-auto max-w-[240px] border-border bg-surface-scrim px-3 py-2 text-sm shadow-lg backdrop-blur-sm`,children:(0,V.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:e.estimated?`Estimated context window:`:`Context window:`}),(0,V.jsxs)(`p`,{className:`font-medium`,children:[o,`% used (`,s,`% left)`]}),(0,V.jsxs)(`p`,{className:`font-medium`,children:[p,` / `,m,` tokens used`]})]})})]})}function lQ(e){return(e.lastReadAt??0)>=e.latestAttentionAt}function uQ(e){return Jf(e.runtime.displayStatus)}var dQ={pending:!1,working:!1,unread:!1};function fQ(e){let t=!1,n=!1,r=!1;for(let i of e){if(i.hasPendingInteraction){t=!0;continue}uQ(i)?n=!0:pQ(i)&&(r=!0)}return{pending:t,working:n,unread:r}}function pQ(e){if(e.parentThreadId!=null)return!1;switch(e.status){case`error`:case`idle`:return!lQ(e);case`active`:case`created`:case`provisioning`:return!1;default:return pt(e.status)}}function mQ(e){switch(e){case`managed-worktree`:return`GitBranch`;case`unmanaged-worktree`:return`GitBranch`;case`other`:return null}}function hQ(e){return mQ(e)??`Laptop`}function gQ(e){switch(e){case`managed-worktree`:return`Managed worktree environment`;case`unmanaged-worktree`:return`Git worktree environment`;case`other`:return null}}function _Q({target:e,pending:t=!1,onOpenChange:n,onRename:r}){return(0,V.jsx)(Nr,{open:e!==null,onOpenChange:n,children:(0,V.jsx)(jr,{children:e?(0,V.jsx)(vQ,{target:e,pending:t,onRename:r},e.id):null})})}function vQ({target:e,pending:t,onRename:n}){let r=(0,B.useId)(),[i,a]=(0,B.useState)(e.currentTitle),[o,s]=(0,B.useState)(null),c=r=>{if(r.preventDefault(),t)return;let a=i.trim();if(!a){s(`${l.charAt(0).toUpperCase()+l.slice(1)} name cannot be empty.`);return}n(e.id,a)},l=rr(e.threadType??`standard`);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsxs)(Mr,{children:[`Rename `,l]}),(0,V.jsxs)(Tr,{children:[`Choose a new name for this `,l,`.`]})]}),(0,V.jsxs)(`form`,{className:`space-y-4`,onSubmit:c,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(Ar,{id:r,"aria-label":`${l.charAt(0).toUpperCase()+l.slice(1)} name`,value:i,autoFocus:!0,autoCapitalize:`sentences`,autoCorrect:`off`,spellCheck:!1,disabled:t,onChange:e=>{a(e.target.value),o&&s(null)}}),o?(0,V.jsx)(`p`,{className:`text-sm text-destructive`,children:o}):null]}),(0,V.jsx)(xr,{children:(0,V.jsxs)(M,{type:`submit`,disabled:t,children:[`Rename `,l]})})]})]})}function yQ({target:e,pending:t,onOpenChange:n,onDelete:r}){return(0,V.jsx)(Nr,{open:e!==null,onOpenChange:n,children:(0,V.jsx)(jr,{children:e?(0,V.jsx)(bQ,{target:e,pending:t,onOpenChange:n,onDelete:r}):null})})}function bQ({target:e,pending:t,onOpenChange:n,onDelete:r}){let i=rr(e.thread.type),a=[e.assignedChildCount?`Assigned threads will be unassigned.`:null,`This action cannot be undone.`].filter(e=>e!==null);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsxs)(Mr,{children:[`Delete `,i,`?`]}),(0,V.jsx)(Tr,{children:a.join(` `)})]}),(0,V.jsxs)(xr,{children:[(0,V.jsx)(M,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),children:`Cancel`}),(0,V.jsxs)(M,{type:`button`,variant:`destructive`,disabled:t,onClick:()=>r(e),children:[`Delete `,i]})]})]})}function xQ(e){return lQ(e)?`mark_unread`:`mark_read`}var SQ=(0,B.createContext)(null);function CQ(){let e=(0,B.useContext)(SQ);if(!e)throw Error(`useThreadActions must be used within a <ThreadActionsProvider>`);return e}function wQ({children:e}){let t=yr(),n=Qu(),{threadId:r}=mu(),i=sr(),a=$n(),o=Zn(),s=Xn(),c=er(),l=ir(),u=(0,B.useRef)(null),{mutate:d}=i,{mutate:f}=a,{mutate:p}=o,{mutate:m}=s,{mutate:h}=c,{mutate:g}=l,_=Di(),v=Di(),{onClose:y,onOpen:b}=_,{onClose:x,onOpen:S}=v;(0,B.useEffect)(()=>()=>{u.current?.abort(),u.current=null},[]);let C=(0,B.useCallback)(e=>{r===e.id&&(n(e.projectId),t(Fu()))},[t,n,r]),w=(0,B.useCallback)(e=>{b({id:e.id,currentTitle:Yn(e),threadType:e.type})},[b]),T=(0,B.useCallback)((e,t)=>{g({id:e,title:t},{onSuccess:()=>{y()}})},[y,g]),E=(0,B.useCallback)(async(e,t)=>{try{let n=e.type===`manager`?await Le(e.id,t):null;return t.aborted?null:{assignedChildCount:n?.nonDeletedAssignedChildCount??0}}catch(e){return t.aborted||qr(e)&&Wr.error(Jr({error:e,fallbackMessage:`Failed to check thread state`})),null}},[]),D=(0,B.useCallback)(()=>{u.current?.abort();let e=new AbortController;return u.current=e,e},[]);function O(e,t){return{...e,...t.assignedChildCount>0?{assignedChildCount:t.assignedChildCount}:{}}}let ee=(0,B.useCallback)(({closeDialog:e,managerChildThreadsConfirmed:t,thread:n})=>{h({id:n.id,managerChildThreadsConfirmed:t},{onSuccess:()=>{e(),C(n)}})},[h,C]),te=(0,B.useCallback)(async e=>{let t=D(),n=await E(e,t.signal);n===null||t.signal.aborted||(u.current===t&&(u.current=null),S(O({thread:e},n)))},[D,E,S]),k=(0,B.useCallback)(e=>{ee({closeDialog:x,managerChildThreadsConfirmed:e.assignedChildCount!==void 0,thread:e.thread})},[x,ee]),A=(0,B.useCallback)((e,t)=>{Wr.error(Jr({error:t,fallbackMessage:`Failed to archive ${rr(e.type)}`,lifecycleOperation:`archive_thread`}))},[]),j=(0,B.useCallback)(e=>{d({id:e.id},{onSuccess:()=>{C(e),Wr.success(`Thread archived`,{cancel:{label:`Undo`,onClick:()=>{f({id:e.id})}}})},onError:t=>{A(e,t)}})},[d,C,A,f]),M=(0,B.useCallback)(e=>{if(e.archivedAt!=null){f({id:e.id});return}j(e)},[j,f]),ne=(0,B.useCallback)(e=>{if(xQ(e)===`mark_unread`){m(e.id,{onError:e=>{Wr.error(Jr({error:e,fallbackMessage:`Failed to mark thread unread`}))}});return}p(e.id,{onError:e=>{Wr.error(Jr({error:e,fallbackMessage:`Failed to mark thread read`}))}})},[p,m]),N=(0,B.useMemo)(()=>({requestRename:w,requestDelete:te,toggleArchive:M,toggleRead:ne}),[w,te,M,ne]);return(0,V.jsxs)(SQ.Provider,{value:N,children:[e,(0,V.jsx)(_Q,{target:_.target,pending:l.isPending,onOpenChange:_.onOpenChange,onRename:T}),(0,V.jsx)(yQ,{target:v.target,pending:c.isPending,onOpenChange:v.onOpenChange,onDelete:k})]})}function TQ({children:e,className:t,onSelect:n,surface:r}){return r===`context`?(0,V.jsx)(ff,{className:t,onSelect:n,children:e}):(0,V.jsx)(gn,{className:t,onSelect:n,children:e})}function EQ({checked:e,children:t,onCheckedChange:n,onSelect:r,surface:i}){return i===`context`?(0,V.jsx)(pf,{checked:e,onCheckedChange:n,onSelect:r,children:t}):(0,V.jsx)(Tn,{checked:e,onCheckedChange:n,onSelect:r,children:t})}function DQ({surface:e}){return e===`context`?(0,V.jsx)(gf,{}):(0,V.jsx)(Dn,{})}function OQ({thread:e,canDelete:t=!0,viewerToggleLabel:n,viewerToggleChecked:r,onViewerToggleCheckedChange:i,surface:a}){let{requestRename:o,requestDelete:s,toggleArchive:c,toggleRead:l}=CQ(),u=lQ(e),d=e.archivedAt!=null;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(TQ,{surface:a,onSelect:t=>{a===`dropdown`&&t.preventDefault(),l(e)},children:u?`Mark as unread`:`Mark as read`}),(0,V.jsx)(TQ,{surface:a,onSelect:()=>{window.setTimeout(()=>{o(e)},0)},children:`Rename`}),(0,V.jsx)(TQ,{surface:a,onSelect:t=>{a===`dropdown`&&t.preventDefault(),c(e)},children:d?`Unarchive`:`Archive`}),t?(0,V.jsx)(TQ,{surface:a,className:`text-destructive focus:text-destructive`,onSelect:()=>{window.setTimeout(()=>{s(e)},0)},children:`Delete`}):null,n&&i?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(DQ,{surface:a}),(0,V.jsx)(EQ,{surface:a,checked:r,onCheckedChange:e=>{i(e===!0)},onSelect:e=>{a===`dropdown`&&e.preventDefault()},children:n})]}):null]})}function kQ({thread:e,canDelete:t=!0,viewerToggleLabel:n,viewerToggleChecked:i,onViewerToggleCheckedChange:a,onOpenChange:o,triggerClassName:s,align:c=`end`}){let l=rr(e.type),u=l.charAt(0).toUpperCase()+l.slice(1);return(0,V.jsxs)(fn,{onOpenChange:o,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:R(`rounded-md p-0`,s),"aria-label":`${u} actions`,title:`${u} actions`,onClick:e=>{e.stopPropagation()},children:(0,V.jsx)(r,{name:`MoreHorizontal`,className:Ht})})}),(0,V.jsx)(zn,{align:c,className:`w-44`,children:(0,V.jsx)(OQ,{thread:e,canDelete:t,viewerToggleLabel:n,viewerToggleChecked:i,onViewerToggleCheckedChange:a,surface:`dropdown`})})]})}function AQ({children:e,thread:t,canDelete:n=!0,viewerToggleLabel:r,viewerToggleChecked:i,onViewerToggleCheckedChange:a,onOpenChange:o}){let s=rr(t.type),c=s.charAt(0).toUpperCase()+s.slice(1);return(0,V.jsxs)(sf,{onOpenChange:o,children:[(0,V.jsx)(cf,{asChild:!0,children:e}),(0,V.jsx)(df,{"aria-label":`${c} actions`,className:`w-44`,children:(0,V.jsx)(OQ,{thread:t,canDelete:n,viewerToggleLabel:r,viewerToggleChecked:i,onViewerToggleCheckedChange:a,surface:`context`})})]})}var jQ=`flex w-full items-center gap-2 rounded-md pr-0 text-sm transition-colors`,MQ=`rounded-full bg-primary ${wn}`,NQ=`pl-2`,PQ=`pl-8`,FQ=`pl-8`,IQ=`pl-14`,LQ=`pl-20`;function RQ(e){return e===`root`?NQ:e===`project-child`?PQ:e===`nested-child`?IQ:LQ}var zQ=`text-sidebar-foreground/85 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,BQ=`before:pointer-events-none before:absolute before:bottom-0 before:left-4 before:top-0 before:z-[45] before:w-px before:bg-border-hairline before:content-[''] max-md:pointer-coarse:before:left-5`,VQ=`before:pointer-events-none before:absolute before:bottom-0 before:left-4 before:top-0 before:z-30 before:w-px before:bg-border-hairline before:content-[''] max-md:pointer-coarse:before:left-5`,HQ=`before:pointer-events-none before:absolute before:bottom-0 before:left-10 before:top-0 before:z-30 before:w-px before:bg-border-hairline before:content-['']`,UQ=`before:pointer-events-none before:absolute before:bottom-0 before:left-16 before:top-0 before:z-30 before:w-px before:bg-border-hairline before:content-['']`,WQ=`pointer-events-none absolute -bottom-0.5 left-10 top-0 z-[1] w-px bg-border-hairline`,GQ=`pointer-events-none absolute -bottom-0.5 left-4 top-0 z-[1] w-px bg-border-hairline max-md:pointer-coarse:left-5`,KQ=`inline-flex shrink-0 items-center justify-center text-subtle-foreground`;function qQ({isCollapsed:e,onToggle:t,threadTitle:n}){return(0,V.jsx)(`button`,{type:`button`,"aria-expanded":!e,"aria-label":e?`Expand ${n} threads`:`Collapse ${n} threads`,title:e?`Expand managed threads`:`Collapse managed threads`,onClick:e=>{e.preventDefault(),e.stopPropagation(),t()},className:R(`relative z-10 rounded-md outline-none ring-sidebar-ring transition-colors hover:text-sidebar-foreground focus-visible:ring-2`,KQ,xt),children:(0,V.jsxs)(`span`,{className:R(`relative inline-flex items-center justify-center`,Ht),children:[(0,V.jsx)(`span`,{"data-manager-leading-icon":``,className:R(`absolute inline-flex items-center justify-center opacity-100 transition-opacity duration-150 group-hover/thread-row:opacity-0 group-has-[:focus-visible]/thread-row:opacity-0`,Ht),"aria-hidden":`true`,children:(0,V.jsx)(r,{name:`UserRound`,className:Ht,"aria-hidden":`true`})}),(0,V.jsx)(`span`,{"data-manager-collapse-indicator":``,className:R(`absolute inline-flex items-center justify-center opacity-0 transition-all duration-150 group-hover/thread-row:opacity-100 group-has-[:focus-visible]/thread-row:opacity-100`,Ht,!e&&`rotate-90`),"aria-hidden":`true`,children:(0,V.jsx)(r,{name:`ChevronRight`,className:Ht,"aria-hidden":`true`})})]})})}function JQ(){return(0,V.jsx)(`span`,{"data-manager-leading-icon":``,className:R(KQ,xt),"aria-hidden":`true`,children:(0,V.jsx)(r,{name:`UserRound`,className:Ht,"aria-hidden":`true`})})}function YQ({hasPendingInteraction:e,isBusy:t,showUnreadBadge:n}){return e?(0,V.jsx)(`span`,{className:R(`rounded-full bg-attention`,wn),"aria-label":`Pending interaction requires attention`,title:`Pending interaction`}):t?(0,V.jsx)(r,{name:`CircleDashed`,className:R(`animate-spin text-muted-foreground`,Ht),"aria-label":`Thread working`}):n?(0,V.jsx)(`span`,{className:MQ,"aria-label":`Unread thread requires attention`,title:`Unread thread requires attention`}):null}function XQ({environmentIcon:e,environmentIconLabel:t,hasPendingInteraction:n,isBusy:r,showUnreadBadge:i}){return n||r||i?(0,V.jsx)(`span`,{className:R(KQ,xt),children:(0,V.jsx)(YQ,{hasPendingInteraction:n,isBusy:r,showUnreadBadge:i})}):(0,V.jsx)(ZQ,{environmentIcon:e,environmentIconLabel:t})}function ZQ({environmentIcon:e,environmentIconLabel:t}){return e?(0,V.jsx)(r,{name:e,className:R(`text-muted-foreground`,Ht),"aria-label":t??void 0}):null}function QQ({projectId:e,thread:t,isActive:n,onProjectSelect:r,options:i}){let[a,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(!1),l=t.hasPendingInteraction,u=uQ(t)&&!l,d=!l&&pQ(t),f=Yn(t),p=i.kind===`manager`?i:null,m=p!==null,h=i.kind===`managed-child`,g=i.kind===`env-grouped-child`,_=i.kind===`env-grouped-managed-child`,v=h||g||_,y=g||_,b=p?.isCollapsed??!1,x=p?.managedChildCount??0,S=p?.managedChildActivity??dQ,C=x>0,w=m&&b&&C,T=w?S.pending:l,E=w?S.working:u,D=w?S.unread:d,O=y?null:mQ(t.environmentWorkspaceDisplayKind),ee=y?null:gQ(t.environmentWorkspaceDisplayKind),te=R(Gf,`group/thread-row`,jQ,!m&&`relative`,v?Gt:Ct,RQ(i.indent),n?`bg-sidebar-border text-sidebar-foreground`:zQ),k=a||s,A=p?.dragBindings,j=(0,B.useCallback)(e=>{p?.consumeClickSuppression?.()&&(e.preventDefault(),e.stopPropagation())},[p]),M=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_r,{to:zu({projectId:e,threadId:t.id}),onClick:()=>{r?.()},"aria-label":`Open ${f}`,title:`Open ${f}`,className:`absolute inset-0 rounded-md outline-none ring-sidebar-ring focus-visible:ring-2`}),p&&C?(0,V.jsx)(qQ,{isCollapsed:b,onToggle:()=>{p.onToggleCollapsed(t.id)},threadTitle:f}):m?(0,V.jsx)(JQ,{}):null,(0,V.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:f})}),(0,V.jsx)(`span`,{className:R(`flex shrink-0 items-center justify-end`,Gt),children:(0,V.jsxs)(`span`,{className:R(`relative shrink-0`,Jn),children:[(0,V.jsx)(`span`,{"data-sidebar-hover-actions-open":k?`true`:void 0,className:R(qf,`absolute inset-0 flex items-center justify-center`),children:(0,V.jsx)(XQ,{environmentIcon:O,environmentIconLabel:ee,hasPendingInteraction:T,isBusy:E,showUnreadBadge:D})}),(0,V.jsx)(`div`,{"data-sidebar-hover-actions-open":k?`true`:void 0,className:R(Kf,`absolute inset-0 z-10 flex items-center justify-end`),children:(0,V.jsx)(kQ,{thread:t,triggerClassName:R(`text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground`,Jn),onOpenChange:o})})]})})]});return(0,V.jsx)(AQ,{thread:t,onOpenChange:c,children:m?(0,V.jsx)(Mo,{ref:A?.setActivatorNodeRef,tier:`manager`,className:R(te,A&&!A.disabled&&`select-none cursor-grab active:cursor-grabbing`),...A?.attributes,...A?.listeners??{},onClickCapture:j,children:M}):(0,V.jsx)(`div`,{className:te,children:M})})}var $Q=(0,B.memo)(QQ);function e$(e){return e===`managed-worktree`||e===`unmanaged-worktree`}function t$(e,t){let n=t.createdAt-e.createdAt;return n===0?e.id.localeCompare(t.id):n}function n$(e,t){let n=t.latestAttentionAt-e.latestAttentionAt;return n===0?t$(e,t):n}function r$(e,t){let n=e.status===`active`;return n===(t.status===`active`)?n?t$(e,t):n$(e,t):n?-1:1}function i$(e){return e.kind===`thread`?e.thread:e.group.threads[0]}function a$(e,t){return r$(i$(e),i$(t))}function o$(e){let{environmentThreadGroups:t,looseThreads:n}=l$(e),r=[...n.map(e=>({kind:`thread`,thread:e})),...t.map(e=>({kind:`environment`,group:e}))];return r.sort(a$),r}function s$({managerThreadIds:e,thread:t}){return t.type!==`standard`||t.parentThreadId===null||!e.has(t.parentThreadId)?null:t.parentThreadId}function c$(e){let t=e.filter(e=>e.type===`manager`),n=new Set(t.map(e=>e.id)),r=new Map,i=[];for(let e of t)r.set(e.id,[]);for(let t of e){if(t.type!==`standard`)continue;let e=s$({managerThreadIds:n,thread:t});if(e===null){i.push(t);continue}r.get(e)?.push(t)}return{managerThreadGroups:t.map(e=>{let t=r.get(e.id)??[];return{managerThread:e,managedItems:o$(t),stats:{managedChildCount:t.length,managedChildActivity:fQ(t)}}}),unmanagedItems:o$(i)}}function l$(e){let t=new Map;for(let n of e){if(n.environmentId===null||!e$(n.environmentWorkspaceDisplayKind))continue;let e=t.get(n.environmentId);e||(e=[],t.set(n.environmentId,e)),e.push(n)}let n=new Set,r=[];for(let[e,i]of t)i.length<2||(i.sort(r$),n.add(e),r.push({environmentId:e,threads:i}));let i=e.filter(e=>e.environmentId===null||!n.has(e.environmentId));return i.sort(r$),{environmentThreadGroups:r,looseThreads:i}}var u$={duration:160,easing:`cubic-bezier(0.2, 0, 0, 1)`},d$=350;function f$(){let e=(0,B.useRef)(!1),t=(0,B.useRef)(null),n=(0,B.useCallback)(()=>{t.current!==null&&(window.clearTimeout(t.current),t.current=null)},[]),r=(0,B.useCallback)(()=>{n(),e.current=!1},[n]),i=(0,B.useCallback)(()=>{n(),e.current=!0},[n]),a=(0,B.useCallback)(()=>{n(),t.current=window.setTimeout(()=>{t.current=null,e.current=!1},d$)},[n]),o=(0,B.useCallback)(()=>e.current?(r(),!0):!1,[r]);return(0,B.useEffect)(()=>{let e=e=>{o()&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())};return document.addEventListener(`click`,e,!0),()=>{document.removeEventListener(`click`,e,!0)}},[o]),(0,B.useEffect)(()=>n,[n]),{beginDragClickSuppression:i,clearDragClickSuppressionSoon:a,consumeDragClickSuppression:o}}var p$={kind:`default`,indent:`project-child`},m$={kind:`default`,indent:`root`},h$={kind:`managed-child`,indent:`nested-child`},g$={kind:`managed-child`,indent:`project-child`},_$={kind:`env-grouped-child`,indent:`nested-child`},v$={kind:`env-grouped-child`,indent:`project-child`},y$={kind:`env-grouped-managed-child`,indent:`deep-child`},b$={kind:`env-grouped-managed-child`,indent:`nested-child`},x$=[],S$=`h-7 w-8 max-md:pointer-coarse:h-10 max-md:pointer-coarse:w-10`;function C$(e){return e.managerThread.id}function w$(e,t){return e.length===t.length?e.every((e,n)=>e.id===t[n]?.managerThread.id):!1}function T$(e){if(e===`section`)return`MessageSquare`}function E$(e){return R(`py-0.5`,e===`section`?`px-2`:`pl-8 pr-2`,`group-data-[collapsible=icon]:hidden`)}function D$(e){return R(`text-xs leading-4`,e===`project`?`font-medium text-sidebar-foreground/85`:`text-muted-foreground`)}function O$(e){if(e===`project`)return BQ}function k$(e){return e===`section`?NQ:FQ}function A$(e){return e===`section`?m$:p$}function j$(e){return e===`section`?g$:h$}function M$(e){return e===`section`?v$:_$}function N$(e){return e===`section`?b$:y$}function P$(e){return e===`section`?PQ:IQ}function F$(e){return e===`section`?VQ:HQ}function I$(e){return e===`section`?HQ:UQ}function L$(e){return e===`section`?GQ:WQ}function R$({children:e,variant:t,onClickCapture:n}){return(0,V.jsx)(`div`,{className:R(`relative space-y-0.5 group-data-[collapsible=icon]:hidden`,O$(t)),onClickCapture:n,children:e})}function z$(e){return e===1?`Archived 1 worktree thread`:`Archived ${e} worktree threads`}function B$({environmentId:e,projectId:t,selectedThreadId:n}){let r=yr(),{isPending:i,mutate:a,variables:o}=cd();return{archiveThreadsPending:i&&o?.id===e,onArchiveThreads:(0,B.useCallback)(()=>{a({id:e},{onSuccess:e=>{Wr.success(z$(e.archivedThreadIds.length)),n&&e.archivedThreadIds.includes(n)&&r(`/projects/${t}`)}})},[a,e,r,t,n])}}function V$({archiveThreadsPending:e,onArchiveThreads:t,onCreateNewThread:n,onOpenChange:i}){return!n&&!t?null:(0,V.jsx)(`span`,{className:`inline-flex shrink-0 items-center`,children:(0,V.jsxs)(fn,{onOpenChange:i,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Worktree actions`,title:`Worktree actions`,className:R(`rounded-md p-0 text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-foreground`,Jn),children:(0,V.jsx)(r,{name:`MoreHorizontal`,className:Ht})})}),(0,V.jsxs)(zn,{align:`end`,className:`w-44`,children:[n?(0,V.jsx)(gn,{onSelect:n,children:`New thread`}):null,t?(0,V.jsx)(gn,{disabled:e,onSelect:n=>{if(e){n.preventDefault();return}t()},children:`Archive worktree`}):null]})]})})}function H$({environmentId:e,representativeThread:t,paddingClass:n,stickyTier:i,parentLineClass:a,childCount:o,childActivity:s,isCollapsed:c,archiveThreadsPending:l=!1,onArchiveThreads:u,onCreateNewThread:d,onToggleCollapsed:f}){let[p,m]=(0,B.useState)(!1),h=t.environmentBranchName,g=h?`Worktree: ${h}`:`Worktree`,_=hQ(t.environmentWorkspaceDisplayKind),v=c&&(s.pending||s.working||s.unread);return(0,V.jsxs)(Mo,{tier:i,className:R(Gf,`group/env-row`,jQ,n,Gt,zQ),title:g,children:[a?(0,V.jsx)(`span`,{className:a,"aria-hidden":`true`}):null,(0,V.jsx)(`button`,{type:`button`,"aria-expanded":!c,"aria-label":c?`Expand ${g} threads`:`Collapse ${g} threads`,title:c?`Expand worktree threads`:`Collapse worktree threads`,onClick:()=>{f(e)},className:`absolute inset-0 rounded-md outline-none ring-sidebar-ring focus-visible:ring-2`}),(0,V.jsxs)(`span`,{className:R(`pointer-events-none relative z-10 inline-flex shrink-0 items-center justify-center text-subtle-foreground`,xt),"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{className:R(`absolute inline-flex items-center justify-center opacity-100 transition-opacity duration-150 group-hover/env-row:opacity-0 group-has-[:focus-visible]/env-row:opacity-0`,Ht),children:(0,V.jsx)(r,{name:_,className:Ht,"aria-hidden":`true`})}),(0,V.jsx)(`span`,{className:R(`absolute inline-flex items-center justify-center opacity-0 transition-all duration-150 group-hover/env-row:opacity-100 group-has-[:focus-visible]/env-row:opacity-100`,Ht,!c&&`rotate-90`),children:(0,V.jsx)(r,{name:`ChevronRight`,className:Ht,"aria-hidden":`true`})})]}),(0,V.jsxs)(`span`,{className:`pointer-events-none relative z-10 min-w-0 flex-1 truncate text-left`,children:[(0,V.jsx)(`span`,{children:`Worktree`}),h?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{children:`:`}),` `,(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:h})]}):null]}),(0,V.jsxs)(`span`,{className:R(`relative z-10 shrink-0`,Jn),children:[v?(0,V.jsx)(`span`,{"data-sidebar-hover-actions-open":p?`true`:void 0,className:R(qf,`pointer-events-none absolute inset-0 flex items-center justify-center text-subtle-foreground`),children:(0,V.jsx)(YQ,{hasPendingInteraction:s.pending,isBusy:s.working,showUnreadBadge:s.unread})}):null,(0,V.jsx)(`div`,{"data-sidebar-hover-actions-open":p?`true`:void 0,className:R(Kf,`absolute inset-0 flex items-center justify-end`),children:(0,V.jsx)(V$,{archiveThreadsPending:l,onArchiveThreads:u,onCreateNewThread:d,onOpenChange:m})})]})]})}var U$=(0,B.memo)(function({projectId:e,environmentThreadGroup:t,selectedThreadId:n,isCollapsed:r,variant:i,onProjectSelect:a,onToggleEnvironmentCollapsed:o}){let{environmentId:s,threads:c}=t,l=rd({projectId:e,environmentId:s}),{archiveThreadsPending:u,onArchiveThreads:d}=B$({environmentId:s,projectId:e,selectedThreadId:n}),f=(0,B.useCallback)(()=>{a?.(),l()},[l,a]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H$,{environmentId:s,representativeThread:c[0],paddingClass:k$(i),stickyTier:`manager`,childCount:c.length,childActivity:fQ(c),isCollapsed:r,archiveThreadsPending:u,onArchiveThreads:d,onCreateNewThread:f,onToggleCollapsed:o}),r?null:(0,V.jsx)(`div`,{className:R(`relative space-y-px`,F$(i)),children:c.map(t=>(0,V.jsx)($Q,{projectId:e,thread:t,isActive:n===t.id,onProjectSelect:a,options:M$(i)},t.id))})]})});function W$({projectId:e,environmentThreadGroup:t,selectedThreadId:n,isCollapsed:r,variant:i,onProjectSelect:a,onToggleEnvironmentCollapsed:o}){let{environmentId:s,threads:c}=t,l=rd({projectId:e,environmentId:s}),{archiveThreadsPending:u,onArchiveThreads:d}=B$({environmentId:s,projectId:e,selectedThreadId:n}),f=(0,B.useCallback)(()=>{a?.(),l()},[l,a]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H$,{environmentId:s,representativeThread:c[0],paddingClass:P$(i),stickyTier:`environment`,parentLineClass:L$(i),childCount:c.length,childActivity:fQ(c),isCollapsed:r,archiveThreadsPending:u,onArchiveThreads:d,onCreateNewThread:f,onToggleCollapsed:o}),r?null:(0,V.jsx)(`div`,{className:R(`relative space-y-px`,I$(i)),children:c.map(t=>(0,V.jsx)($Q,{projectId:e,thread:t,isActive:n===t.id,onProjectSelect:a,options:N$(i)},t.id))})]})}var G$=(0,B.memo)(function({projectId:e,managerThreadGroup:t,selectedThreadId:n,isManagerCollapsed:r,collapsedEnvironmentIds:i,variant:a,onProjectSelect:o,onToggleManagerCollapsed:s,onToggleEnvironmentCollapsed:c,consumeClickSuppression:l,isDragging:u=!1,dragBindings:d,sortableRef:f,sortableStyle:p}){let{managerThread:m,managedItems:h,stats:g}=t,_=(0,B.useMemo)(()=>({kind:`manager`,indent:a===`section`?`root`:`project-child`,isCollapsed:r,managedChildCount:g.managedChildCount,managedChildActivity:g.managedChildActivity,onToggleCollapsed:s,...l?{consumeClickSuppression:l}:{},...d?{dragBindings:d}:{}}),[l,d,r,s,g.managedChildCount,g.managedChildActivity,a]),v=!r&&h.length>0;return(0,V.jsxs)(`div`,{ref:f,style:p,className:R(`space-y-0.5`,u&&`relative z-20`),children:[(0,V.jsx)($Q,{projectId:e,thread:m,isActive:n===m.id,onProjectSelect:o,options:_}),v?(0,V.jsx)(`div`,{className:R(`relative space-y-px`,F$(a)),children:h.map(t=>t.kind===`thread`?(0,V.jsx)($Q,{projectId:e,thread:t.thread,isActive:n===t.thread.id,onProjectSelect:o,options:j$(a)},`thread:${t.thread.id}`):(0,V.jsx)(W$,{projectId:e,environmentThreadGroup:t.group,selectedThreadId:n,isCollapsed:i.has(t.group.environmentId),variant:a,onProjectSelect:o,onToggleEnvironmentCollapsed:c},`env:${t.group.environmentId}`))}):null]})}),K$=(0,B.memo)(function({disabled:e,managerThreadGroup:t,...n}){let r=t.managerThread.id,{attributes:i,isDragging:a,listeners:o,setActivatorNodeRef:s,setNodeRef:c,transform:l,transition:u}=su({id:r,disabled:e,transition:u$}),d=(0,B.useMemo)(()=>({transform:gs.Transform.toString(l),transition:u}),[l,u]);return(0,V.jsx)(G$,{...n,managerThreadGroup:t,isDragging:a,dragBindings:{attributes:i,disabled:e,listeners:o,setActivatorNodeRef:s},sortableRef:c,sortableStyle:d})}),q$=(0,B.memo)(function({projectId:e,threadListState:t,selectedThreadId:n,collapsedManagerIds:r,collapsedEnvironmentIds:i,variant:a,onProjectSelect:o,onToggleManagerCollapsed:s,onToggleEnvironmentCollapsed:c,isManagerReorderPending:l=!1,onReorderManager:u}){let d=t.status===`ready`?t.threads:x$,{managerThreadGroups:f,unmanagedItems:p}=(0,B.useMemo)(()=>c$(d),[d]),[m,h]=(0,B.useState)(null),g=(0,B.useMemo)(()=>{if(!m)return f;let e=new Map(f.map(e=>[C$(e),e])),t=[];for(let n of m){let r=e.get(n.id);if(!r)return f;t.push(r)}return t},[f,m]),_=(0,B.useMemo)(()=>g.map(C$),[g]),v=l||!u||g.length<2,{beginDragClickSuppression:y,clearDragClickSuppressionSoon:b,consumeDragClickSuppression:x}=f$(),S=Ms(js(zc,{activationConstraint:{distance:4}}),js(Vc,{activationConstraint:{delay:200,tolerance:6}}),js(jc,{coordinateGetter:du})),C=(0,B.useCallback)(e=>{y()},[y]),w=(0,B.useCallback)(()=>{b()},[b]),T=(0,B.useCallback)(t=>{if(b(),l)return;let{active:n,over:r}=t;if(!r||typeof n.id!=`string`||typeof r.id!=`string`)return;let i=ji({activeId:n.id,overId:r.id,items:g.map(e=>e.managerThread)});if(!i)return;let a=Mi({items:g.map(e=>({id:e.managerThread.id})),request:i});(0,ia.flushSync)(()=>{h(a)}),u?.(e,i,{onSettled:()=>{h(null)}})},[b,l,u,e,g]);(0,B.useEffect)(()=>{m&&w$(m,f)&&h(null)},[f,m]);let E=(0,B.useCallback)(e=>{x()&&(e.preventDefault(),e.stopPropagation())},[x]);if(t.status===`loading`)return(0,V.jsx)(`div`,{className:`group-data-[collapsible=icon]:hidden`,children:(0,V.jsx)(Vo,{})});if(d.length===0){let e=(0,V.jsx)(nd,{message:t.status===`unavailable`?`Threads unavailable`:`No threads`,icon:T$(a),className:E$(a),iconClassName:`size-3.5`,messageClassName:D$(a)});return a===`section`?e:(0,V.jsx)(R$,{variant:a,children:e})}return(0,V.jsxs)(R$,{variant:a,onClickCapture:E,children:[g.length>1?(0,V.jsx)(Nl,{sensors:S,collisionDetection:Bs,onDragStart:C,onDragCancel:w,onDragEnd:T,children:(0,V.jsx)($l,{items:_,strategy:Yl,children:g.map(t=>(0,V.jsx)(K$,{disabled:v,projectId:e,managerThreadGroup:t,selectedThreadId:n,variant:a,isManagerCollapsed:r.has(t.managerThread.id),collapsedEnvironmentIds:i,onProjectSelect:o,onToggleManagerCollapsed:s,onToggleEnvironmentCollapsed:c,consumeClickSuppression:x},t.managerThread.id))})}):g.map(t=>(0,V.jsx)(G$,{projectId:e,managerThreadGroup:t,selectedThreadId:n,variant:a,isManagerCollapsed:r.has(t.managerThread.id),collapsedEnvironmentIds:i,onProjectSelect:o,onToggleManagerCollapsed:s,onToggleEnvironmentCollapsed:c,consumeClickSuppression:x},t.managerThread.id)),p.map(t=>t.kind===`thread`?(0,V.jsx)($Q,{projectId:e,thread:t.thread,isActive:n===t.thread.id,onProjectSelect:o,options:A$(a)},`thread:${t.thread.id}`):(0,V.jsx)(U$,{projectId:e,environmentThreadGroup:t.group,selectedThreadId:n,isCollapsed:i.has(t.group.environmentId),variant:a,onProjectSelect:o,onToggleEnvironmentCollapsed:c},`env:${t.group.environmentId}`))]})});function J$({project:e,threadListState:t,selectedThreadId:n,isActive:i,isCollapsed:a,collapsedManagerIds:o,collapsedEnvironmentIds:s,isLocalPathInvalid:c,onProjectSelect:l,onCreateProjectThread:u,onCreateProjectManager:d,onToggleProjectCollapsed:f,onToggleManagerCollapsed:p,onToggleEnvironmentCollapsed:m,isManagerReorderPending:h=!1,isProjectDragging:g=!1,onReorderManager:_,consumeProjectClickSuppression:v,projectDragBindings:y,projectRowRef:b,projectRowStyle:x}){let[S,C]=(0,B.useState)(!1),[w,T]=(0,B.useState)(!1),E=S||w,D=(0,B.useCallback)(e=>{v?.()&&(e.preventDefault(),e.stopPropagation())},[v]),O=(0,B.useCallback)(()=>{f(e.id)},[f,e.id]),ee=(0,B.useCallback)(()=>{d?.(e.id)},[d,e.id]),te=(0,B.useCallback)(()=>{u?.(e.id)},[u,e.id]);return(0,V.jsxs)(Io,{ref:b,style:x,"data-sidebar-sticky-project-item":``,className:R(g&&`relative z-30`),onClickCapture:D,children:[(0,V.jsx)(Wf,{project:e,onOpenChange:T,children:(0,V.jsxs)(Mo,{ref:y?.setActivatorNodeRef,tier:`project`,className:R(Gf,`group/project-row flex w-full items-center rounded-md text-sm transition-colors`,i?`bg-sidebar-border text-sidebar-foreground`:`text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,y&&!y.disabled&&`select-none cursor-grab active:cursor-grabbing`),title:e.name,...y?.attributes,...y?.listeners??{},children:[(0,V.jsx)(`button`,{type:`button`,"aria-expanded":!a,"aria-label":a?`Expand ${e.name}`:`Collapse ${e.name}`,title:a?`Expand project threads`:`Collapse project threads`,onClick:O,className:`absolute inset-0 rounded-md outline-none ring-sidebar-ring focus-visible:ring-2`}),(0,V.jsx)(`span`,{className:R(`pointer-events-none relative z-10 flex shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors group-hover/project-row:text-sidebar-foreground`,S$),"aria-hidden":!0,children:(0,V.jsxs)(`span`,{className:R(`relative inline-flex items-center justify-center`,Ht),children:[(0,V.jsx)(r,{name:`ChevronRight`,className:R(`absolute opacity-0 transition-all duration-150 group-hover/project-row:opacity-100`,Ht,!a&&`rotate-90`)}),a?(0,V.jsx)(r,{name:`Folder`,className:R(`absolute opacity-100 transition-opacity duration-150 group-hover/project-row:opacity-0`,Ht)}):(0,V.jsx)(r,{name:`FolderOpen`,className:R(`absolute opacity-100 transition-opacity duration-150 group-hover/project-row:opacity-0`,Ht)})]})}),(0,V.jsx)(`span`,{className:`pointer-events-none relative z-10 min-w-0 flex-1 truncate text-left`,children:e.name}),c?(0,V.jsx)(_r,{to:Lu(e.id),onClick:e=>{e.stopPropagation(),l?.()},title:`Project folder not found. Open project settings to fix.`,"aria-label":`Project folder not found`,className:R(`relative z-10 inline-flex shrink-0 items-center justify-center rounded-md text-destructive outline-none ring-sidebar-ring transition-colors hover:bg-destructive/10 hover:text-destructive focus-visible:ring-2`,Jn),children:(0,V.jsx)(r,{name:`AlertTriangle`,className:Ht})}):null,(0,V.jsxs)(`span`,{"data-sidebar-hover-actions-open":E?`true`:void 0,className:R(Kf,`relative z-10 inline-flex shrink-0 items-center`),children:[(0,V.jsx)(Uf,{project:e,onOpenChange:C,triggerClassName:R(`relative z-10 text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-foreground`,Jn)}),(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`New manager in ${e.name}`,title:`New manager`,disabled:!d,onClick:e=>{e.stopPropagation(),ee()},className:R(`rounded-md p-0 text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground`,Jn),children:(0,V.jsx)(r,{name:`UserRoundPlus`,className:Ht})}),(0,V.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`New thread in ${e.name}`,title:`New thread`,disabled:!u,onClick:e=>{e.stopPropagation(),te()},className:R(`rounded-md p-0 text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-foreground`,Jn),children:(0,V.jsx)(r,{name:`MessageSquarePlus`,className:Ht})})]})]})}),a?null:(0,V.jsx)(q$,{projectId:e.id,threadListState:t,selectedThreadId:n,collapsedManagerIds:o,collapsedEnvironmentIds:s,variant:`project`,onProjectSelect:l,onToggleManagerCollapsed:p,onToggleEnvironmentCollapsed:m,isManagerReorderPending:h,onReorderManager:_})]})}function Y$({prev:e,next:t}){if(e.collapsedManagerIds===t.collapsedManagerIds||e.threadListState.status!==`ready`)return!1;for(let n of e.threadListState.threads)if(n.type===`manager`&&e.collapsedManagerIds.has(n.id)!==t.collapsedManagerIds.has(n.id))return!0;return!1}function X$({prev:e,next:t}){if(e.collapsedEnvironmentIds===t.collapsedEnvironmentIds||e.threadListState.status!==`ready`)return!1;for(let n of e.threadListState.threads)if(n.environmentId!==null&&e.collapsedEnvironmentIds.has(n.environmentId)!==t.collapsedEnvironmentIds.has(n.environmentId))return!0;return!1}function Z$(e,t){if(e.project!==t.project||e.threadListState!==t.threadListState||e.isActive!==t.isActive||e.isCollapsed!==t.isCollapsed||e.isLocalPathInvalid!==t.isLocalPathInvalid||e.onProjectSelect!==t.onProjectSelect||e.onCreateProjectThread!==t.onCreateProjectThread||e.onCreateProjectManager!==t.onCreateProjectManager||e.onToggleProjectCollapsed!==t.onToggleProjectCollapsed||e.onToggleManagerCollapsed!==t.onToggleManagerCollapsed||e.onToggleEnvironmentCollapsed!==t.onToggleEnvironmentCollapsed||e.isManagerReorderPending!==t.isManagerReorderPending||e.isProjectDragging!==t.isProjectDragging||e.onReorderManager!==t.onReorderManager||e.consumeProjectClickSuppression!==t.consumeProjectClickSuppression||e.projectDragBindings!==t.projectDragBindings||e.projectRowRef!==t.projectRowRef||e.projectRowStyle!==t.projectRowStyle)return!1;if(e.selectedThreadId!==t.selectedThreadId){if(e.threadListState.status!==`ready`)return!1;for(let n of e.threadListState.threads)if(n.id===e.selectedThreadId||n.id===t.selectedThreadId)return!1}return e.threadListState.status===`ready`?!Y$({prev:e,next:t})&&!X$({prev:e,next:t}):!0}var Q$=(0,B.memo)(J$,Z$),$$=R(jQ,NQ,zQ,Ct,`min-w-0 justify-start overflow-hidden font-normal ring-sidebar-ring focus-visible:ring-2 disabled:opacity-70 max-md:pointer-coarse:[&_svg]:size-5`),e1=R(`inline-flex shrink-0 items-center justify-center`,Jn),t1=R(`inline-flex items-center justify-center rounded-md text-muted-foreground outline-none ring-sidebar-ring transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 disabled:opacity-50`,`h-6 w-7`);function n1(e,t){return e.length===t.length?e.every((e,n)=>e.id===t[n]?.id):!1}function r1(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function i1(e){return e===`projects`||e===`threads`}function a1(e){let t=new Set,n=[];for(let r of e)!i1(r)||t.has(r)||(t.add(r),n.push(r));for(let e of Mf)t.has(e)||n.push(e);return n}function o1({projectIds:e,queryResults:t,serverConnectionState:n,connectionGracePeriodElapsed:r}){let i=[],a=new Map;for(let o=0;o<t.length;o+=1){let s=e[o],c=t[o];!s||!c||(c.data!==void 0&&i.push(...c.data),a.set(s,{status:gu({hasResolvedData:c.data!==void 0,isFetching:c.isFetching,isLoadingError:c.isLoadingError,serverConnectionState:n,connectionGracePeriodElapsed:r}).status}))}return{threads:i,threadStatesByProjectId:a}}var s1={status:`loading`};function c1({status:e,threads:t}){switch(e){case`ready`:return{status:`ready`,threads:t??[]};case`unavailable`:return{status:`unavailable`};case`loading`:case void 0:return s1}}function l1({current:e,id:t}){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),Array.from(n)}function u1({ariaLabel:e,disabled:t=!1,iconName:n,onClick:i,title:a}){return(0,V.jsx)(`button`,{type:`button`,title:a,"aria-label":e,disabled:t,className:t1,onClick:(0,B.useCallback)(e=>{e.stopPropagation(),i()},[i]),children:(0,V.jsx)(r,{name:n,className:Ht})})}function d1({isCreatingProject:e,onNewProject:t}){return(0,V.jsx)(u1,{ariaLabel:`New project`,title:`New project`,disabled:e,iconName:`FolderPlus`,onClick:t})}function f1({onNewManager:e,onNewThread:t}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(u1,{ariaLabel:`New manager`,title:`New manager`,iconName:`UserRoundPlus`,onClick:e}),(0,V.jsx)(u1,{ariaLabel:`New thread`,title:`New thread`,iconName:`MessageSquarePlus`,onClick:t})]})}function p1({label:e,children:t,actions:n,actionsAlwaysVisible:r=!1,dragBindings:i,sectionRef:a,sectionStyle:o,consumeClickSuppression:s}){return(0,V.jsxs)(`div`,{ref:a,style:o,className:`group/sidebar-section min-w-0`,onClickCapture:(0,B.useCallback)(e=>{s?.()&&(e.preventDefault(),e.stopPropagation())},[s]),children:[(0,V.jsxs)(Mo,{ref:i?.setActivatorNodeRef,tier:`label`,className:R(Gf,`rounded-md pr-1 text-muted-foreground transition-colors`,i&&!i.disabled&&`select-none cursor-grab active:cursor-grabbing`),title:e,...i?.attributes,...i?.listeners??{},children:[(0,V.jsx)(`span`,{className:R(`relative z-10 min-w-0 flex-1 truncate text-left`,n&&`pr-14`),children:e}),n?(0,V.jsx)(`span`,{className:`absolute right-0 top-1/2 z-20 inline-flex -translate-y-1/2 items-center`,children:(0,V.jsx)(`span`,{className:R(`inline-flex shrink-0 items-center`,!r&&`bb-sidebar-hover-actions`),children:n})}):null]}),(0,V.jsx)(`div`,{className:`mt-1`,children:t})]})}var m1=e=>{let t=Gs(e);return t.length>0?t:Bs(e)},h1=(0,B.memo)(function({id:e,disabled:t,...n}){let{attributes:r,isDragging:i,listeners:a,setActivatorNodeRef:o,setNodeRef:s,transform:c,transition:l}=su({id:e,disabled:t,transition:u$}),u=(0,B.useMemo)(()=>({transform:gs.Translate.toString(c),transition:l,position:i?`relative`:void 0,zIndex:i?20:void 0}),[i,c,l]),d=(0,B.useMemo)(()=>({attributes:r,disabled:t,listeners:a,setActivatorNodeRef:o}),[r,t,a,o]);return(0,V.jsx)(p1,{...n,dragBindings:d,sectionRef:s,sectionStyle:u})}),g1=(0,B.memo)(function({project:e,reorderDisabled:t,...n}){let{attributes:r,isDragging:i,listeners:a,setActivatorNodeRef:o,setNodeRef:s,transform:c,transition:l}=su({id:e.id,disabled:t,transition:u$}),u=(0,B.useMemo)(()=>({transform:gs.Translate.toString(c),transition:l,position:i?`relative`:void 0,zIndex:i?20:void 0}),[i,c,l]),d=(0,B.useMemo)(()=>({attributes:r,disabled:t,listeners:a,setActivatorNodeRef:o}),[r,a,t,o]);return(0,V.jsx)(Q$,{...n,project:e,isProjectDragging:i,projectDragBindings:d,projectRowRef:s,projectRowStyle:u})});function _1({onNewChat:e,onNewManager:t}){let n=!e,i=!t;return(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsxs)(M,{type:`button`,size:`sm`,variant:`ghost`,className:$$,onClick:e,disabled:n,title:n?`Start a new thread`:`New thread`,children:[(0,V.jsx)(r,{name:`MessageSquarePlus`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:`New thread`}),(0,V.jsx)(`span`,{className:e1,"aria-hidden":`true`})]}),(0,V.jsxs)(M,{type:`button`,size:`sm`,variant:`ghost`,className:$$,onClick:t,disabled:i,title:i?`Hire a new manager`:`New manager`,children:[(0,V.jsx)(r,{name:`UserRoundPlus`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:`New manager`}),(0,V.jsx)(`span`,{className:e1,"aria-hidden":`true`})]})]})}function v1({children:e}){return(0,V.jsx)(jo,{"data-sidebar-sticky-density":`compact-actions`,children:(0,V.jsx)(Po,{children:e})})}function y1({onNewProject:e,onProjectSelect:t,isCreatingProject:n=!1}){let r=yr(),i=Qu(),a=ed(),o=wi(),s=o.isSuccess||o.isError,{data:c,isFetching:l,isLoadingError:u}=Ti({enabled:s}),d=Mn(),f=_u(),p=vu({hasResolvedData:c!==void 0,isFetching:o.isFetching||l,isLoadingError:u}),m=(0,B.useMemo)(()=>(c??[]).map(e=>e.id),[c]),h=(0,B.useMemo)(()=>s?[...m,de]:m,[s,m]),{threads:g,threadStatesByProjectId:_}=na({queries:(0,B.useMemo)(()=>h.map(e=>({enabled:s,queryKey:mt({projectId:e,archived:!1}),queryFn:({signal:t})=>ee({projectId:e,archived:!1},t),staleTime:1e4})),[s,h]),combine:(0,B.useCallback)(e=>o1({projectIds:h,queryResults:e,serverConnectionState:d,connectionGracePeriodElapsed:f}),[h,d,f])}),{localHostId:v}=Sr(),{threadId:b}=mu(),x=(0,B.useMemo)(()=>{if(!v||!c)return[];let e=[];for(let t of c){let n=y(t.sources,v);n&&e.push({path:n.path,projectId:t.id})}return e},[v,c]),S=(0,B.useMemo)(()=>{let e=new Map;for(let t of x)e.set(t.projectId,t.path);return e},[x]),C=Tu((0,B.useMemo)(()=>v?x.map(e=>e.path):[],[v,x])),{isPending:w,mutate:T}=Vi(),{isPending:E,mutate:D}=Ai(),[O,te]=(0,B.useState)(null),k=O??c,A=(0,B.useMemo)(()=>(k??[]).map(e=>e.id),[k]),j=w||(k?.length??0)<2,{beginDragClickSuppression:M,clearDragClickSuppressionSoon:ne,consumeDragClickSuppression:N}=f$(),{beginDragClickSuppression:re,clearDragClickSuppressionSoon:ie,consumeDragClickSuppression:ae}=f$(),P=Ms(js(zc,{activationConstraint:{distance:4}}),js(Vc,{activationConstraint:{delay:200,tolerance:6}}),js(jc,{coordinateGetter:du})),F=(0,B.useCallback)(e=>{M()},[M]),oe=(0,B.useCallback)(()=>{ne()},[ne]),se=(0,B.useCallback)(e=>{if(ne(),!k||w)return;let{active:t,over:n}=e;if(!n||typeof t.id!=`string`||typeof n.id!=`string`)return;let r=ji({activeId:t.id,overId:n.id,items:k});if(!r)return;let i=Mi({items:k,request:r});(0,ia.flushSync)(()=>{te(i)}),T({projectId:r.itemId,previousProjectId:r.previousItemId,nextProjectId:r.nextItemId},{onSettled:()=>{te(null)}})},[ne,w,k,T]),I=(0,B.useCallback)((e,t,n)=>{D({projectId:e,threadId:t.itemId,previousThreadId:t.previousItemId,nextThreadId:t.nextItemId},{onSettled:n.onSettled})},[D]),L=(0,B.useCallback)(({projectId:e,mode:n})=>{i(e),a(n),t?.(),r(Fu(),{state:{focusPrompt:!0}})},[r,t,a,i]),ce=(0,B.useCallback)(e=>{L({projectId:e,mode:`thread`})},[L]),le=(0,B.useCallback)(e=>{L({projectId:e,mode:`manager`})},[L]),ue=(0,B.useCallback)(()=>{L({projectId:de,mode:`thread`})},[L]),R=(0,B.useCallback)(()=>{L({projectId:de,mode:`manager`})},[L]);(0,B.useEffect)(()=>{!O||!c||n1(O,c)&&te(null)},[O,c]);let[fe,pe]=Dr(Nf),[me,he]=Dr(Pf),[ge,_e]=Dr(Ff),[ve,ye]=Dr(If),be=(0,B.useMemo)(()=>new Set(fe),[fe]),xe=(0,B.useMemo)(()=>new Set(me),[me]),Se=(0,B.useMemo)(()=>new Set(ge),[ge]),Ce=(0,B.useMemo)(()=>a1(ve),[ve]);(0,B.useEffect)(()=>{r1(ve,Ce)||ye(Ce)},[ye,Ce,ve]);let we=(0,B.useMemo)(()=>{let e=new Map;for(let t of g){let n=e.get(t.projectId);n?n.push(t):e.set(t.projectId,[t])}return e},[g]),Te=(0,B.useMemo)(()=>{let e=new Map;for(let t of k??[]){let n=_.get(t.id)?.status,r=we.get(t.id);e.set(t.id,c1({status:n,threads:r}))}return e},[k,_,we]),Ee=(0,B.useCallback)(e=>{pe(t=>l1({current:t,id:e}))},[pe]),De=(0,B.useCallback)(e=>{he(t=>l1({current:t,id:e}))},[he]),Oe=(0,B.useCallback)(e=>{_e(t=>l1({current:t,id:e}))},[_e]),ke=Ms(js(zc,{activationConstraint:{distance:4}}),js(Vc,{activationConstraint:{delay:200,tolerance:6}}),js(jc,{coordinateGetter:du})),Ae=(0,B.useCallback)(e=>{re()},[re]),je=(0,B.useCallback)(()=>{ie()},[ie]),Me=(0,B.useCallback)(e=>{ie();let{active:t,over:n}=e;if(!n||typeof t.id!=`string`||typeof n.id!=`string`||!i1(t.id)||!i1(n.id))return;let r=ji({activeId:t.id,overId:n.id,items:Ce.map(e=>({id:e}))});r&&ye(Mi({items:Ce.map(e=>({id:e})),request:r}).map(e=>e.id).filter(i1))},[ie,ye,Ce]),Ne=c1({status:_.get(de)?.status,threads:we.get(de)}),Pe=(0,V.jsx)(Fo,{className:`gap-1`,children:p.status===`loading`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Vo,{}),(0,V.jsx)(Vo,{})]}):k&&k.length>1?(0,V.jsx)(Nl,{sensors:P,collisionDetection:Bs,onDragStart:F,onDragCancel:oe,onDragEnd:se,children:(0,V.jsx)($l,{items:A,strategy:Yl,children:k.map(e=>{let n=Te.get(e.id)??s1,r=Eu(C,S.get(e.id));return(0,V.jsx)(g1,{project:e,reorderDisabled:j,threadListState:n,selectedThreadId:b,isActive:!1,isCollapsed:be.has(e.id),collapsedManagerIds:xe,collapsedEnvironmentIds:Se,isLocalPathInvalid:r,onProjectSelect:t,onCreateProjectThread:ce,onCreateProjectManager:le,onToggleProjectCollapsed:Ee,onToggleManagerCollapsed:De,onToggleEnvironmentCollapsed:Oe,isManagerReorderPending:E,onReorderManager:I,consumeProjectClickSuppression:N},e.id)})})}):k&&k.length>0?k.map(e=>{let n=Te.get(e.id)??s1,r=Eu(C,S.get(e.id));return(0,V.jsx)(Q$,{project:e,threadListState:n,selectedThreadId:b,isActive:!1,isCollapsed:be.has(e.id),collapsedManagerIds:xe,collapsedEnvironmentIds:Se,isLocalPathInvalid:r,onProjectSelect:t,onCreateProjectThread:ce,onCreateProjectManager:le,onToggleProjectCollapsed:Ee,onToggleManagerCollapsed:De,onToggleEnvironmentCollapsed:Oe,isManagerReorderPending:E,onReorderManager:I},e.id)}):(0,V.jsx)(Io,{children:(0,V.jsx)(nd,{message:p.status===`unavailable`?`Projects unavailable`:`No projects`,icon:`Folder`,className:`px-2 py-1.5`,iconClassName:`size-3.5 text-sidebar-foreground/75`,messageClassName:`text-xs font-medium text-sidebar-foreground/85`})})}),Fe=(0,V.jsx)(q$,{projectId:de,threadListState:Ne,selectedThreadId:b,collapsedManagerIds:xe,collapsedEnvironmentIds:Se,variant:`section`,onProjectSelect:t,onToggleManagerCollapsed:De,onToggleEnvironmentCollapsed:Oe,isManagerReorderPending:E,onReorderManager:I}),Ie=e?(0,V.jsx)(d1,{onNewProject:e,isCreatingProject:n}):void 0,Le=p.status===`ready`&&(k?.length??0)===0,Re=(0,V.jsx)(f1,{onNewThread:ue,onNewManager:R});return(0,V.jsx)(v1,{children:(0,V.jsx)(Nl,{sensors:ke,collisionDetection:m1,onDragStart:Ae,onDragCancel:je,onDragEnd:Me,children:(0,V.jsx)($l,{items:Ce,strategy:Yl,children:(0,V.jsx)(`div`,{className:`space-y-4`,children:Ce.map(e=>e===`projects`?(0,V.jsx)(h1,{id:e,label:`Projects`,disabled:Ce.length<2,actions:Ie,actionsAlwaysVisible:Le,consumeClickSuppression:ae,children:Pe},e):(0,V.jsx)(h1,{id:e,label:`Threads`,disabled:Ce.length<2,actions:Re,consumeClickSuppression:ae,children:Fe},e))})})})})}var b1=(0,B.memo)(y1),x1=(0,B.createContext)(null);function S1(){let{mutate:e,isPending:t}=zi(),n=yr(),r=ur(),i=Qu(),a=r.pathname===`/`,o=vf({isPending:t,submit:(0,B.useCallback)(({path:t,hostId:r,target:o,closeDialog:s})=>{if(o.kind!==`create`)return;let c=P(t).trim();c&&e({name:c,source:{type:`local_path`,hostId:r,path:t}},{onSuccess:e=>{s(),i(e.id),n(Fu(),{replace:a})}})},[e,n,i,a])}),s=(0,B.useCallback)(()=>{o.openPicker({kind:`create`})},[o]);return(0,B.useMemo)(()=>({isAvailable:o.isAvailable,isCreating:t,openCreateDialog:s,platform:o.platform,projectPathDialog:o.projectPathDialog,submitProjectPath:o.submitProjectPath}),[o,t,s])}function C1({children:e}){let t=S1();return(0,V.jsx)(x1.Provider,{value:t,children:e})}function w1(){let e=(0,B.useContext)(x1);if(!e)throw Error(`QuickCreateProjectProvider is required`);return e}var T1=`left-20`,E1=`select-none [app-region:drag] [-webkit-app-region:drag]`,D1=`relative z-50 [app-region:no-drag] [-webkit-app-region:no-drag]`,O1=`mt-px`;function k1(){return typeof window>`u`?null:window.bbDesktop??null}function A1(e){return e?.platform===`macos`}function j1({onResizeMouseDown:e,isResizing:t,showInlineTrigger:n}){let i=w1(),a=yr(),o=ed(),{isCompactViewport:s,setOpenMobile:c}=_o(),[l]=(0,B.useState)(k1),u=A1(l),d=(0,B.useRef)(s);d.current=s;let f=(0,B.useCallback)(()=>{d.current&&c(!1)},[c]),p=(0,B.useCallback)(()=>{f(),o(`thread`),a(Fu(),{state:{focusPrompt:!0}})},[f,a,o]),m=(0,B.useCallback)(()=>{f(),o(`manager`),a(Fu(),{state:{focusPrompt:!0}})},[f,a,o]);return(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(bo,{children:[n?(0,V.jsx)(`div`,{"data-testid":`app-sidebar-inline-trigger-row`,className:R(`flex h-12 shrink-0 items-center`,u?E1:`px-2`),children:u?null:(0,V.jsx)(xo,{})}):null,(0,V.jsx)(`div`,{"data-testid":`app-sidebar-primary-actions`,className:`shrink-0 px-2 py-2 group-data-[collapsible=icon]:hidden`,children:(0,V.jsx)(_1,{onNewChat:p,onNewManager:m})}),(0,V.jsx)(Oo,{children:(0,V.jsx)(b1,{onNewProject:i.isAvailable?i.openCreateDialog:void 0,onProjectSelect:f,isCreatingProject:i.isCreating})}),(0,V.jsxs)(Eo,{className:`relative`,children:[(0,V.jsx)(j,{placement:`above`,tone:`sidebar`,size:`sm`}),(0,V.jsx)(Fo,{className:`flex-row items-center`,children:(0,V.jsx)(Io,{children:(0,V.jsx)(Ro,{asChild:!0,className:Qt,tooltip:`App settings`,"aria-label":`App settings`,children:(0,V.jsx)(hr,{to:`/settings`,children:(0,V.jsx)(r,{name:`Settings`})})})})})]}),(0,V.jsx)(`div`,{className:R(`absolute -right-1.5 top-0 z-30 hidden h-full w-3 cursor-col-resize md:block`,`before:absolute before:inset-y-0 before:left-1/2 before:w-px before:-translate-x-1/2 before:bg-transparent before:transition-colors hover:before:bg-sidebar-border`,`group-data-[collapsible=icon]:hidden`,t&&`before:bg-sidebar-border`),onMouseDown:e})]})})}var M1=Cn;function N1({center:e,actions:t,bordered:n=!0,className:r}){let i=vo(),[a]=(0,B.useState)(k1),o=A1(a),s=!i;return(0,V.jsx)(`header`,{className:R(`relative h-12 shrink-0 bg-surface-scrim px-4 backdrop-blur-sm`,o&&`select-none [app-region:drag] [-webkit-app-region:drag]`,n&&`border-b border-border`,r),children:(0,V.jsxs)(`div`,{"data-testid":`app-page-header-content-row`,className:R(`flex h-full items-center gap-1 md:gap-2`,o&&!i&&`pl-16`),children:[s?o?(0,V.jsx)(`div`,{"aria-hidden":!0,"data-testid":`app-page-header-trigger-spacer`,className:R(`shrink-0`,M1)}):(0,V.jsx)(xo,{className:`-ml-2 shrink-0 md:ml-0`}):null,e?(0,V.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center`,children:(0,V.jsx)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:e})}):(0,V.jsx)(`div`,{className:`min-w-0 flex-1`}),t?(0,V.jsx)(`div`,{className:R(`flex shrink-0 items-center gap-1`,o&&D1),children:t}):null]})})}var P1=`bb.thread.useStandardManagerTimeline`,F1=`bb.thread.showAllEvents`;function I1(){return typeof window>`u`?null:window.localStorage}function L1(e,t){return e===`true`?!0:e===`false`?!1:t}function R1({currentValue:e,initialValue:t,legacyValue:n}){return L1(e===null?n:e,t)}var z1=Qr({parse:L1,serialize:e=>String(e)}),B1=Lr(P1,!1,{getItem:(e,t)=>{let n=I1();return R1({currentValue:n?.getItem(e)??null,legacyValue:n?.getItem(F1)??null,initialValue:t})},removeItem:e=>{z1.removeItem(e)},setItem:(e,t)=>{z1.setItem(e,t)},subscribe:z1.subscribe},{getOnInit:!0});function V1(){return Dr(B1)}var H1=`bb.sidebar.width`,U1=`bb.sidebar.open`,W1=240,G1=460,K1=320;function q1(e){return Math.min(G1,Math.max(W1,e))}var J1=Lr(H1,K1,Qr({parse:(e,t)=>{if(e===null)return t;let n=Number(e);return Number.isFinite(n)?q1(n):t},serialize:e=>String(q1(e))}),{getOnInit:!0}),Y1=Lr(U1,!0,Qr({parse:(e,t)=>e===`true`?!0:e===`false`?!1:t,serialize:e=>String(e)}),{getOnInit:!0});function X1({providerRef:e,style:t,children:n}){let[r,i]=Dr(Y1);return(0,V.jsx)(yo,{ref:e,style:t,open:r,onOpenChange:i,children:n})}function Z1(){return vo()?null:(0,V.jsx)(`div`,{className:`absolute left-3 top-3.5 z-20`,children:(0,V.jsx)(xo,{className:`h-5 w-5 rounded-md p-0`})})}function Q1(){return(0,V.jsx)(`div`,{"data-testid":`app-desktop-sidebar-trigger`,className:R(`fixed top-0 z-50 flex h-12 items-center`,T1,E1),children:(0,V.jsx)(xo,{className:R(D1,O1)})})}var $1={"/":{title:`Threads`},"/settings":{title:`Settings`},"/development-only/replay":{title:`Replay threads`}};function e0({usesProjectChromeStyle:e,usesDesktopChrome:t,isArchivedView:n,isSettingsView:i,projectId:a,project:o,meta:s}){let c=s.breadcrumbs,l=c||e?void 0:s.title,u=c||l||s.subtitle?(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[c?(0,V.jsx)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-sm font-semibold`,children:c.map((e,n)=>{let i=n===c.length-1;return(0,V.jsxs)(B.Fragment,{children:[n>0?(0,V.jsx)(r,{name:`ChevronRight`,className:`size-3.5 shrink-0 text-subtle-foreground`}):null,!i&&e.to?(0,V.jsx)(hr,{to:e.to,className:R(`shrink-0 text-muted-foreground transition-colors hover:text-foreground`,t&&D1),children:e.label}):(0,V.jsx)(`span`,{className:i?`min-w-0 truncate`:`shrink-0 text-muted-foreground`,children:e.label})]},`${e.label}-${n}`)})}):null,l?(0,V.jsx)(`p`,{className:`truncate text-sm font-semibold`,children:l}):null,s.subtitle?(0,V.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s.subtitle}):null]}):null,d=e&&a?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(hr,{to:Lu(a),className:R(M1,`inline-flex items-center justify-center transition-colors`,i?`bg-state-active text-foreground`:`text-muted-foreground hover:bg-state-hover hover:text-foreground`),"aria-label":`Project settings`,"aria-current":i?`page`:void 0,title:`Project settings`,children:(0,V.jsx)(r,{name:`Settings`})}),(0,V.jsx)(hr,{to:Ru(a),className:R(M1,`inline-flex items-center justify-center transition-colors`,n?`bg-state-active text-foreground`:`text-muted-foreground hover:bg-state-hover hover:text-foreground`),"aria-label":`Archived threads`,"aria-current":n?`page`:void 0,title:`Archived threads`,children:(0,V.jsx)(r,{name:`Archive`})}),o?(0,V.jsx)(Uf,{project:o,triggerClassName:M1}):null]}):null;return(0,V.jsx)(N1,{bordered:!e,center:u,actions:d})}function t0({children:e}){let t=w1(),n=ur(),{projectId:r,threadId:i,isThreadView:a,isArchivedView:o,isSettingsView:s,isRootView:c}=mu(),l=wi(),u=Ti({enabled:l.isSuccess||l.isError}),d=(0,B.useMemo)(()=>l.data?.projects.map(Ei),[l.data]),f=u.data??d,[p]=V1(),m=or(i??``,{composerBootstrapPrefetch:a&&!!i,enabled:a&&!!i,timelinePrefetch:a&&i?{managerTimelineView:p?`standard`:void 0}:void 0}),h=m.isSuccess||m.isError,[g,_]=Dr(J1),[v,y]=(0,B.useState)(!1),b=Qu(),x=(0,B.useRef)(null),S=(0,B.useRef)(0),C=(0,B.useRef)(0),w=(0,B.useRef)(g),T=(0,B.useRef)(null),E=!a,[D]=(0,B.useState)(k1),O=A1(D),ee=!E&&c&&!O,te={"--sidebar-width":`${g}px`},k=r?f?.find(e=>e.id===r):void 0,A=(r?k?.name:void 0)??(r||void 0),{data:j}=nr(i??``,{enabled:!!i&&(!a||h),refetchOnMount:a&&m.isSuccess?!0:`always`}),M=j?Yn(j):i?`Thread ${i.slice(0,8)}`:`Thread`;(0,B.useEffect)(()=>{j?.projectId&&b(j.projectId)},[b,j?.projectId]);let ne=a?{title:j?Yn(j):`Thread`,subtitle:void 0}:o&&r?{title:``,subtitle:void 0,breadcrumbs:[{label:A??r,to:Iu(r)},{label:`Archived`}]}:s&&r?{title:``,subtitle:void 0,breadcrumbs:[{label:A??r,to:Iu(r)},{label:`Settings`}]}:r?{title:A??r,subtitle:void 0}:$1[n.pathname]??{title:``},N=(()=>{if(a)return M;if(o&&r)return`${A??r} · Archived`;if(s&&r)return`${A??r} · Settings`;if(r)return A??r;let e=$1[n.pathname]?.title;return e&&e.length>0?e:`BB`})(),re=(0,B.useCallback)(e=>{e.preventDefault(),y(!0),S.current=e.clientX,C.current=w.current,document.body.classList.add(`sidebar-resizing`),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]);return(0,B.useEffect)(()=>{if(!v)return;let e=()=>{T.current=null,x.current?.style.setProperty(`--sidebar-width`,`${w.current}px`)},t=t=>{let n=t.clientX-S.current;w.current=q1(C.current+n),T.current===null&&(T.current=window.requestAnimationFrame(e))},n=()=>{T.current!==null&&(window.cancelAnimationFrame(T.current),T.current=null),x.current?.style.setProperty(`--sidebar-width`,`${w.current}px`),_(w.current),y(!1),document.body.classList.remove(`sidebar-resizing`),document.body.style.cursor=``,document.body.style.userSelect=``};return window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,n),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,n),T.current!==null&&(window.cancelAnimationFrame(T.current),T.current=null),document.body.classList.remove(`sidebar-resizing`),document.body.style.cursor=``,document.body.style.userSelect=``}},[v,_]),(0,B.useEffect)(()=>{w.current=g},[g]),(0,B.useEffect)(()=>{typeof document>`u`||(document.title=N)},[N]),(0,V.jsx)(zf,{children:(0,V.jsxs)(wQ,{children:[(0,V.jsxs)(X1,{providerRef:x,style:te,children:[(0,V.jsx)(j1,{onResizeMouseDown:re,isResizing:v,showInlineTrigger:!0}),(0,V.jsx)(Co,{children:(0,V.jsxs)(`div`,{"data-testid":`app-layout-content-shell`,className:`relative flex h-[100dvh] min-w-0 w-full flex-col`,children:[ee?(0,V.jsx)(Z1,{}):null,E?(0,V.jsx)(e0,{usesDesktopChrome:O,usesProjectChromeStyle:c||o||s,isArchivedView:o,isSettingsView:s,projectId:r,project:k,meta:ne}):null,(0,V.jsx)(`main`,{className:`flex min-h-0 flex-1 flex-col p-4 md:p-5`,children:e})]})}),O?(0,V.jsx)(Q1,{}):null]}),(0,V.jsx)(yf,{target:t.projectPathDialog.target,pending:t.isCreating,platform:t.platform,onOpenChange:t.projectPathDialog.onOpenChange,onSubmit:t.submitProjectPath})]})})}var n0={success:{title:`Authentication completed`,message:`You can close this window.`},error:{title:`Authentication failed`,message:`Something went wrong. Please close this window and try again.`}};function r0(){let[e]=fr(),t=e.get(`status`)===`error`?`error`:`success`,n=n0[t];return(0,V.jsx)(`div`,{className:`flex justify-center bg-background px-4 pt-12`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border border-border bg-card px-4 py-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t===`error`?(0,V.jsx)(r,{name:`CircleX`,className:`size-4 shrink-0 text-destructive`}):(0,V.jsx)(r,{name:`CircleCheck`,className:`size-4 shrink-0`}),(0,V.jsx)(`h1`,{className:`text-sm font-semibold`,children:n.title})]}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n.message})]})})}var i0=`reuse`;function a0(e,t){return`host:${e}:${t}`}function o0(e){return`reuse:${e}`}function s0(e){if(e===`reuse`)return{type:`reuse`,environmentId:null};if(e.startsWith(`host:`)){let t=e.split(`:`),n=t[1],r=t[2];if(n&&(r===`local`||r===`worktree`))return{type:`host`,hostId:n,mode:r}}if(e.startsWith(`reuse:`)){let t=e.slice(6);if(t.length>0)return{type:`reuse`,environmentId:t}}return null}var c0=_t([`codex`,`claude-code`,`pi`]),l0=new Map([{info:{available:!0,capabilities:{supportsArchive:!0,supportsRename:!0,supportsServiceTier:!0,supportsUserQuestion:!1,supportedPermissionModes:[`full`,`workspace-write`,`readonly`]},displayName:`Codex`,id:`codex`}},{info:{available:!0,capabilities:{supportsArchive:!1,supportsRename:!1,supportsServiceTier:!1,supportsUserQuestion:!0,supportedPermissionModes:[`full`,`workspace-write`,`readonly`]},displayName:`Claude Code`,id:`claude-code`}},{info:{available:!0,capabilities:{supportsArchive:!1,supportsRename:!1,supportsServiceTier:!1,supportsUserQuestion:!1,supportedPermissionModes:[`full`]},displayName:`Pi`,id:`pi`}}].map(e=>[e.info.id,e]));function u0(e){return{supportsArchive:e.supportsArchive,supportsRename:e.supportsRename,supportsServiceTier:e.supportsServiceTier,supportsUserQuestion:e.supportsUserQuestion,supportedPermissionModes:[...e.supportedPermissionModes]}}function d0(e){return{available:e.available,capabilities:u0(e.capabilities),displayName:e.displayName,id:e.id}}function f0(e){return c0.safeParse(e).success}function p0(e){let t=l0.get(e);if(!t)throw Error(`Unsupported agent provider "${e}".`);return d0(t.info)}function m0({className:e}){return(0,V.jsxs)(`svg`,{fill:`currentColor`,viewBox:`0 0 149 149`,xmlns:`http://www.w3.org/2000/svg`,className:e,children:[(0,V.jsx)(`title`,{children:`Claude`}),(0,V.jsx)(`path`,{d:`M29.05 98.54L58.19 82.19L58.68 80.77L58.19 79.98H56.77L51.9 79.68L35.25 79.23L20.81 78.63L6.82 77.88L3.3 77.13L0 72.78L0.340004 70.61L3.3 68.62L7.54 68.99L16.91 69.63L30.97 70.6L41.17 71.2L56.28 72.77H58.68L59.02 71.8L58.2 71.2L57.56 70.6L43.01 60.74L27.26 50.32L19.01 44.32L14.55 41.28L12.3 38.43L11.33 32.21L15.38 27.75L20.82 28.12L22.21 28.49L27.72 32.73L39.49 41.84L54.86 53.16L57.11 55.03L58.01 54.39L58.12 53.94L57.11 52.25L48.75 37.14L39.83 21.77L35.86 15.4L34.81 11.58C34.44 10.01 34.17 8.69 34.17 7.08L38.78 0.820007L41.33 0L47.48 0.820007L50.07 3.07001L53.89 11.81L60.08 25.57L69.68 44.28L72.49 49.83L73.99 54.97L74.55 56.54H75.52V55.64L76.31 45.1L77.77 32.16L79.19 15.51L79.68 10.82L82 5.2L86.61 2.16L90.21 3.88L93.17 8.12L92.76 10.86L91 22.3L87.55 40.22L85.3 52.22H86.61L88.11 50.72L94.18 42.66L104.38 29.91L108.88 24.85L114.13 19.26L117.5 16.6H123.87L128.56 23.57L126.46 30.77L119.9 39.09L114.46 46.14L106.66 56.64L101.79 65.04L102.24 65.71L103.4 65.6L121.02 61.85L130.54 60.13L141.9 58.18L147.04 60.58L147.6 63.02L145.58 68.01L133.43 71.01L119.18 73.86L97.96 78.88L97.7 79.07L98 79.44L107.56 80.34L111.65 80.56H121.66L140.3 81.95L145.17 85.17L148.09 89.11L147.6 92.11L140.1 95.93L129.98 93.53L106.36 87.91L98.26 85.89H97.14V86.56L103.89 93.16L116.26 104.33L131.75 118.73L132.54 122.29L130.55 125.1L128.45 124.8L114.84 114.56L109.59 109.95L97.7 99.94H96.91V100.99L99.65 105L114.12 126.75L114.87 133.42L113.82 135.59L110.07 136.9L105.95 136.15L97.48 124.26L88.74 110.87L81.69 98.87L80.83 99.36L76.67 144.17L74.72 146.46L70.22 148.18L66.47 145.33L64.48 140.72L66.47 131.61L68.87 119.72L70.82 110.27L72.58 98.53L73.63 94.63L73.56 94.37L72.7 94.48L63.85 106.63L50.39 124.82L39.74 136.22L37.19 137.23L32.77 134.94L33.18 130.85L35.65 127.21L50.39 108.46L59.28 96.84L65.02 90.13L64.98 89.16H64.64L25.49 114.58L18.52 115.48L15.52 112.67L15.89 108.06L17.31 106.56L29.08 98.46L29.04 98.5L29.05 98.54Z`})]})}function h0({className:e}){return(0,V.jsxs)(`svg`,{fill:`currentColor`,fillRule:`evenodd`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,className:e,children:[(0,V.jsx)(`title`,{children:`OpenAI`}),(0,V.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`})]})}function g0({className:e}){return(0,V.jsxs)(`svg`,{fill:`currentColor`,fillRule:`evenodd`,viewBox:`100 100 600 600`,xmlns:`http://www.w3.org/2000/svg`,className:e,children:[(0,V.jsx)(`title`,{children:`Pi`}),(0,V.jsx)(`path`,{d:`
|
|
1347
|
+
M165.29 165.29
|
|
1348
|
+
H517.36
|
|
1349
|
+
V400
|
|
1350
|
+
H400
|
|
1351
|
+
V517.36
|
|
1352
|
+
H282.65
|
|
1353
|
+
V634.72
|
|
1354
|
+
H165.29
|
|
1355
|
+
Z
|
|
1356
|
+
M282.65 282.65
|
|
1357
|
+
V400
|
|
1358
|
+
H400
|
|
1359
|
+
V282.65
|
|
1360
|
+
Z
|
|
1361
|
+
`}),(0,V.jsx)(`path`,{d:`M517.36 400 H634.72 V634.72 H517.36 Z`})]})}function _0(e){let t=f0(e)?p0(e):null;if(t)switch(e){case`codex`:return{icon:h0,ariaLabel:t.displayName};case`claude-code`:return{icon:m0,ariaLabel:t.displayName};case`pi`:return{icon:g0,ariaLabel:t.displayName};default:return}}function v0(e,t){if(t.length===0)throw Error(`reconcileReasoningLevel requires at least one supported level`);if(t.includes(e))return e;let n=y0(e),r=t[0],i=Math.abs(y0(r)-n);for(let e of t.slice(1)){let t=Math.abs(y0(e)-n);if(t<i){r=e,i=t;continue}t===i&&y0(e)>y0(r)&&(r=e)}return r}function y0(e){return Se.indexOf(e)}var b0=`bb.promptbox.model`,x0=`bb.promptbox.service-tier`,S0=`bb.promptbox.reasoning`,C0=`bb.promptbox.permission-mode`,w0=`bb.promptbox.environment`,T0=`bb.promptbox.provider`,E0=[],D0={low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra High`,max:`Max`},O0=[{value:`full`,label:`Full Access`,tone:`warning`},{value:`workspace-write`,label:`Workspace Write`},{value:`readonly`,label:`Readonly`}],k0=[`full`],A0=null;function j0(e){return e===`low`||e===`medium`||e===`high`||e===`xhigh`||e===`max`}function M0(e){return e===`readonly`||e===`workspace-write`||e===`full`}function N0(e){return e===`fast`||e===`default`}function P0(e){return e===``||N0(e)}var F0=Xr(P0),I0=Xr(e=>j0(e)),L0=Xr(e=>M0(e)),R0=Zr(T0,``,Rr),z0=Zr(b0,``,Rr),B0=Zr(x0,``,F0),V0=Zr(S0,`medium`,I0),H0=Zr(C0,`full`,L0),U0=Zr(w0,``,Rr);function W0(e){return{selectedProviderId:e?.initialProviderId??``,selectedModel:e?.initialModel??``,serviceTier:e?.initialServiceTier,reasoningLevel:e?.initialReasoningLevel??`medium`,permissionMode:e?.initialPermissionMode??`full`,environmentSelectionValue:e?.initialEnvironmentSelectionValue??``}}function G0({currentSelections:e,nextSelections:t,touchedFields:n}){let r=!1,i={...e};return!n.has(`selectedProviderId`)&&e.selectedProviderId!==t.selectedProviderId&&(i.selectedProviderId=t.selectedProviderId,r=!0),!n.has(`selectedModel`)&&e.selectedModel!==t.selectedModel&&(i.selectedModel=t.selectedModel,r=!0),!n.has(`serviceTier`)&&e.serviceTier!==t.serviceTier&&(i.serviceTier=t.serviceTier,r=!0),!n.has(`reasoningLevel`)&&e.reasoningLevel!==t.reasoningLevel&&(i.reasoningLevel=t.reasoningLevel,r=!0),!n.has(`permissionMode`)&&e.permissionMode!==t.permissionMode&&(i.permissionMode=t.permissionMode,r=!0),!n.has(`environmentSelectionValue`)&&e.environmentSelectionValue!==t.environmentSelectionValue&&(i.environmentSelectionValue=t.environmentSelectionValue,r=!0),r?i:e}function K0({currentSelections:e,field:t,value:n}){return e[t]===n?e:{...e,[t]:n}}function q0({rawPermissionMode:e,supportedPermissionModes:t}){return t.includes(e)?e:t.includes(`full`)?`full`:t[0]??`full`}function J0(e){return e.split(`-`).map(e=>e.toLowerCase()===`gpt`?`GPT`:/^\d+(\.\d+)*$/.test(e)?e:/^[a-z]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(`-`)}function Y0(e){return!e||s0(e)?.type===`reuse`?``:e}function X0(e){let{enabled:t=!0,environmentId:n,initialEnvironmentSelectionValue:r,initialModel:i,initialProviderId:a,initialPermissionMode:o,initialReasoningLevel:s,initialServiceTier:c,projectId:l,resetKey:u,scope:d=`new-thread`}=e??{},[f,p]=Dr(R0(l)),[m,h]=Dr(z0(l)),[g,_]=Dr(B0(l)),[v,y]=Dr(V0(l)),[b,x]=Dr(H0(l)),[S,C]=Dr(U0(l)),[w,T]=td(),[E,D]=(0,B.useState)(()=>W0({initialEnvironmentSelectionValue:r,initialModel:i,initialProviderId:a,initialPermissionMode:o,initialReasoningLevel:s,initialServiceTier:c})),O=(0,B.useRef)(new Set),ee=(0,B.useRef)(u),te=d!==`new-thread`,k=(0,B.useMemo)(()=>W0({initialEnvironmentSelectionValue:r,initialModel:i,initialProviderId:a,initialPermissionMode:o,initialReasoningLevel:s,initialServiceTier:c}),[r,i,a,o,s,c]),A=(0,B.useMemo)(()=>te?ee.current===u?G0({currentSelections:E,nextSelections:k,touchedFields:O.current}):k:E,[k,u,E,te]),j=d===`new-thread`?f:A.selectedProviderId,M=d===`new-thread`?m:A.selectedModel,ne=d===`new-thread`?g||void 0:A.serviceTier,N=d===`new-thread`?v:A.reasoningLevel,re=d===`new-thread`?b:A.permissionMode,ie=d===`new-thread`?w??Y0(S):A.environmentSelectionValue,ae=d===`component-local`?n:void 0,P=jn({enabled:t&&(d!==`component-local`||ae!==void 0),environmentId:ae,providerId:j||void 0}),F=P.data?.providers??E0,oe=P.data?.modelLoadError??A0,se=F.length>=2,I=(0,B.useMemo)(()=>j&&F.some(e=>e.id===j)?j:F[0]?.id??``,[F,j]),L=(0,B.useMemo)(()=>F.find(e=>e.id===I),[I,F]),ce=(0,B.useMemo)(()=>F.map(e=>({value:e.id,label:e.displayName,icon:_0(e.id)?.icon})),[F]),le=L?.capabilities,ue=le?.supportsServiceTier??!1,R=le?.supportedPermissionModes??k0,de=R.length>1,fe=(0,B.useMemo)(()=>O0.filter(e=>R.includes(e.value)),[R]),pe=(0,B.useMemo)(()=>{let e={};for(let t of F)e[t.id]=t.capabilities.supportsServiceTier;return e},[F]),me=(0,B.useMemo)(()=>{let e=P.data?.models??[];if(!M||e.some(e=>e.model===M))return e;let t=(P.data?.selectedOnlyModels??[]).find(e=>e.model===M);return t?[t,...e]:e},[P.data?.models,P.data?.selectedOnlyModels,M]),he=(0,B.useMemo)(()=>me.length===0||me.some(e=>e.model===M)?M:me.find(e=>e.isDefault)?.model??me[0].model,[me,M]),ge=(0,B.useMemo)(()=>me.map(e=>({value:e.model,label:J0(e.displayName||e.model)})),[me]),_e=(0,B.useMemo)(()=>me.find(e=>e.model===he)??me.find(e=>e.isDefault)??me[0],[me,he]),ve=(0,B.useMemo)(()=>{if(!_e)return[];let e=[],t=new Set,n=_e.supportedReasoningEfforts;for(let r of n)t.has(r.reasoningEffort)||(t.add(r.reasoningEffort),e.push({value:r.reasoningEffort,label:D0[r.reasoningEffort]}));return e.length===0?[]:e},[_e]),ye=(0,B.useMemo)(()=>ue?ne:void 0,[ne,ue]),be=(0,B.useMemo)(()=>ve.length===0?N:v0(N,ve.map(e=>e.value)),[N,ve]),xe=q0({rawPermissionMode:re,supportedPermissionModes:R}),Se=ie;(0,B.useLayoutEffect)(()=>{if(te){if(ee.current!==u){ee.current=u,O.current=new Set,D(k);return}D(e=>G0({currentSelections:e,nextSelections:k,touchedFields:O.current}))}},[k,u,te]);let Ce=(0,B.useCallback)(e=>{if(d===`new-thread`){p(e);return}O.current.add(`selectedProviderId`),D(t=>K0({currentSelections:t,field:`selectedProviderId`,value:e}))},[d,p]),we=(0,B.useCallback)(e=>{if(d===`new-thread`){h(e);return}O.current.add(`selectedModel`),D(t=>K0({currentSelections:t,field:`selectedModel`,value:e}))},[d,h]),Te=(0,B.useCallback)(e=>{if(d===`new-thread`){_(e??``);return}O.current.add(`serviceTier`),D(t=>K0({currentSelections:t,field:`serviceTier`,value:e}))},[d,_]),Ee=(0,B.useCallback)(e=>{if(d===`new-thread`){y(e);return}O.current.add(`reasoningLevel`),D(t=>K0({currentSelections:t,field:`reasoningLevel`,value:e}))},[d,y]),De=(0,B.useCallback)(e=>{if(d===`new-thread`){x(e);return}O.current.add(`permissionMode`),D(t=>K0({currentSelections:t,field:`permissionMode`,value:e}))},[d,x]),Oe=(0,B.useCallback)(e=>{if(d===`new-thread`){if(s0(e)?.type===`reuse`){T(e);return}T(null),C(e);return}O.current.add(`environmentSelectionValue`),D(t=>K0({currentSelections:t,field:`environmentSelectionValue`,value:e}))},[d,T,C]),ke=(0,B.useCallback)(()=>{T(null)},[T]);return{selectedProviderId:I,setSelectedProviderId:Ce,providerOptions:ce,hasMultipleProviders:se,selectedProviderDisplayName:L?.displayName??I,selectedModel:he,setSelectedModel:we,serviceTier:ye,setServiceTier:Te,reasoningLevel:be,setReasoningLevel:Ee,permissionMode:xe,setPermissionMode:De,environmentSelectionValue:Se,setEnvironmentSelectionValue:Oe,clearReuseEnvironment:ke,activeModel:_e,modelOptions:ge,modelLoadError:oe,reasoningOptions:ve,permissionModeOptions:fe,supportsPermissionModeSelection:de,supportsServiceTier:ue,serviceTierSupportByProvider:pe}}var Z0={label:`Codex CLI`,url:`https://developers.openai.com/codex/cli`};function Q0({error:e,providerLabel:t}){return e.code===`timeout`?`Timed out loading models for ${t}.`:e.code===`missing_executable`&&e.providerId===`codex`?`Could not load models for ${t}. Please make sure the ${Z0.label} is installed.`:`Could not load models for ${t}.`}function $0({error:e,providerLabel:t}){return e.code===`missing_executable`&&e.providerId===`codex`?(0,V.jsxs)(V.Fragment,{children:[`Could not load models for `,t,`. Please make sure the`,` `,(0,V.jsx)(`a`,{href:Z0.url,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2 hover:text-foreground`,children:Z0.label}),` `,`is installed.`]}):Q0({error:e,providerLabel:t})}function e2(e,t){switch(t){case`claude-code`:return e.replace(/^Claude\s+/i,``);case`codex`:return e.replace(/^GPT-/i,``);default:return e}}var t2=B.forwardRef(({checked:e,className:t,disabled:n,onCheckedChange:r,onClick:i,...a},o)=>(0,V.jsx)(`button`,{...a,ref:o,type:`button`,role:`switch`,"aria-checked":e,disabled:n,"data-state":e?`checked`:`unchecked`,className:R(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input shadow-xs transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-foreground data-[state=unchecked]:bg-muted`,t),onClick:t=>{i?.(t),t.defaultPrevented||r?.(!e)},children:(0,V.jsx)(`span`,{"aria-hidden":!0,"data-state":e?`checked`:`unchecked`,className:`pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`})}));t2.displayName=`Switch`;var n2=`h-8 w-fit max-w-full min-w-0 items-center gap-1 px-1 text-xs leading-tight`,r2=`border-none bg-transparent shadow-none hover:bg-transparent data-[state=open]:bg-transparent data-[state=open]:hover:bg-transparent`,i2=`flex min-w-0 items-center gap-1.5`,a2=`text-muted-foreground hover:text-foreground`,o2=`text-warning-text`,s2=`hover:text-warning-text data-[state=open]:text-warning-text`,c2=`text-warning-text`;function l2({label:e,value:t,tone:n=`default`,icon:r,leading:i,className:a,title:o,muted:s}){let c=typeof t==`string`?`${e}: ${t}`:void 0;return(0,V.jsx)(`div`,{title:o??c,className:R(`inline-flex`,n2,s&&`text-muted-foreground hover:text-foreground`,n===`warning`&&o2,a),children:(0,V.jsxs)(`span`,{className:i2,children:[i??(r?(0,V.jsx)(r,{className:`size-4 shrink-0`}):null),(0,V.jsxs)(`span`,{className:`sr-only`,children:[e,`: `]}),(0,V.jsx)(`span`,{className:`truncate`,children:t})]})})}function u2({label:e,value:t,options:n,onChange:i,className:a,contentClassName:o,muted:s,defaultOpen:c,modal:l,align:u=`start`}){let d=n.find(e=>e.value===t),f=d?.tone===`warning`,p=d?.icon,m=d?.label??t;return(0,V.jsxs)(fn,{defaultOpen:c,modal:l,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":e,title:d?.description?`${e}: ${m} - ${d.description}`:`${e}: ${m}`,className:R(n2,r2,s&&`text-muted-foreground hover:text-foreground`,f&&o2,f&&s2,a),children:[(0,V.jsxs)(`span`,{className:i2,children:[p?(0,V.jsx)(p,{className:`size-3.5 shrink-0`}):null,(0,V.jsx)(`span`,{className:`truncate`,children:m})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:R(`size-3.5`,f?c2:`text-muted-foreground`)})]})}),(0,V.jsxs)(zn,{align:u,className:R(`min-w-52 max-w-96`,o),mobileTitle:e,children:[(0,V.jsx)(Nn,{children:e}),n.map(e=>{let n=e.icon;return(0,V.jsxs)(gn,{onSelect:()=>i(e.value),className:`flex items-start justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:R(`flex min-w-0 items-start gap-2`,e.tone===`warning`&&`text-warning-text`),children:[n?(0,V.jsx)(n,{className:`mt-0.5 size-4 shrink-0`}):null,(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block truncate`,title:e.label,children:e.label}),e.description?(0,V.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:e.description}):null]})]}),(0,V.jsx)(r,{name:`Check`,className:R(Ht,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function d2({providerOptions:e,selectedProviderId:t,onSelectedProviderChange:n,hasMultipleProviders:i,modelValue:a,modelOptions:o,modelLoadError:s,onModelChange:c,formatModelLabel:l,reasoningValue:u,reasoningOptions:d,onReasoningChange:f,fastModeEnabled:p,onFastModeChange:m,showFastModeToggle:h,serviceTierSupportByProvider:g,className:_,muted:v,defaultOpen:y=!1,modal:b=!0}){let x=rn(),[S,C]=(0,B.useState)(y),[w,T]=(0,B.useState)(null),E=w??t,D=e.find(e=>e.value===t),O=D?.icon,ee=o.find(e=>e.value===a)?.label??a,te=ee.trim().length>0,k=te?e2(ee,t):`Select model`,A=d.find(e=>e.value===u)?.label??null,j=i&&n!==void 0&&e.length>1,ne=w!==null&&w!==t,N=jn({enabled:ne,providerId:ne?w:void 0}),re=(0,B.useMemo)(()=>{if(!ne)return o;let e=N.data?.models;return!e||e.length===0?[]:e.map(e=>({value:e.model,label:l?l(e.displayName||e.model):e.displayName||e.model}))},[ne,o,N.data?.models,l]),ie=ne?N.data?.modelLoadError??null:s??null,ae=e.find(e=>e.value===E)?.label??E,P=ie?.providerId===E?Q0({error:ie,providerLabel:ae}):null,F=re,oe=F.length>0,se=oe&&(g?g[E]??!1:h),I=te&&p&&o.length>0,L=(0,B.useCallback)(e=>{C(e),e||T(null)},[]),ce=(0,B.useCallback)(e=>{ne&&n?.(w),c(e),C(!1),T(null)},[ne,c,n,w]),le=(0,B.useCallback)(e=>{f(e),C(!1),T(null)},[f]),ue=te?O:void 0;return(0,V.jsxs)(YZ,{open:S,onOpenChange:L,modal:b,children:[(0,V.jsx)(XZ,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Provider, model and reasoning`,title:[`${D?.label??t}: ${k}`,A?` · ${A} reasoning`:``,I?` (Fast mode)`:``].join(``),className:R(n2,r2,v&&`text-muted-foreground hover:text-foreground`,_),children:[(0,V.jsxs)(`span`,{className:i2,children:[I?(0,V.jsx)(r,{name:`Zap`,className:`size-3.5 shrink-0 fill-current text-subtle-foreground`}):ue?(0,V.jsx)(ue,{className:`size-3.5 shrink-0`}):null,(0,V.jsx)(`span`,{className:`truncate`,children:k}),A?(0,V.jsx)(`span`,{className:`text-subtle-foreground`,children:A}):null]}),(0,V.jsx)(r,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,V.jsxs)(ZZ,{align:`start`,mobileTitle:`Model`,className:`flex w-52 flex-col p-0 max-md:w-full max-md:max-w-none`,children:[j?(0,V.jsx)(`div`,{className:R(`flex items-center gap-0.5 border-b border-border px-2.5 pt-1`,x?`sticky top-0 z-10 bg-background`:`bg-surface-recessed`),children:e.map(e=>{let n=e.icon,r=e.value===E;return(0,V.jsx)(`button`,{type:`button`,title:e.label,onClick:()=>{e.value!==E&&T(e.value===t?null:e.value)},className:R(`flex items-center justify-center border-b-2 transition-colors focus-visible:outline-none`,Yt,r?`border-foreground text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:n?(0,V.jsx)(n,{className:Ht}):(0,V.jsx)(`span`,{className:R(`font-medium`,Nt),children:e.label.charAt(0)})},e.value)})}):null,(0,V.jsxs)(`div`,{className:R(`overflow-y-auto px-1 pb-1`,!x&&`max-h-[min(250px,var(--radix-popover-content-available-height,250px)-80px)]`),children:[(0,V.jsx)(f2,{children:`Model`}),ne&&N.isLoading?(0,V.jsx)(`div`,{className:R(`px-2 text-xs text-muted-foreground`,x?`py-2`:`py-[0.3125rem]`),children:`Loading models…`}):oe?F.map(e=>(0,V.jsx)(p2,{label:e2(e.label,E),selected:!ne&&e.value===a,onClick:()=>ce(e.value)},e.value)):(0,V.jsx)(`div`,{className:R(`px-2 text-xs text-muted-foreground`,x?`py-2`:`py-[0.3125rem]`),title:P??void 0,children:ie?.providerId===E?(0,V.jsx)($0,{error:ie,providerLabel:ae}):`No models available`})]}),d.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`border-t border-border`}),(0,V.jsxs)(`div`,{className:`p-1`,children:[(0,V.jsx)(f2,{children:`Reasoning`}),d.map(e=>(0,V.jsx)(p2,{label:e.label,selected:e.value===u,onClick:()=>le(e.value)},e.value))]})]}):null,se?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`border-t border-border`}),(0,V.jsx)(`div`,{className:`p-1`,children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(r,{name:`Zap`,className:`size-4 fill-current text-muted-foreground`}),(0,V.jsx)(`span`,{children:`Fast mode`})]}),(0,V.jsx)(t2,{checked:p,onCheckedChange:m,"aria-label":`Fast mode`})]})})]}):null]})]})}function f2({children:e}){return(0,V.jsx)(`div`,{className:`sticky top-0 z-10 flex h-7 items-center bg-background px-2 text-xs font-medium text-muted-foreground`,children:e})}function p2({label:e,selected:t,onClick:n}){return(0,V.jsxs)(`button`,{type:`button`,onClick:n,className:R(`relative flex w-full cursor-default select-none items-center justify-between gap-3 rounded-sm px-2 text-xs outline-none transition-colors hover:bg-state-hover hover:text-foreground`,rn()?`py-2`:`py-[0.3125rem]`),children:[(0,V.jsx)(`span`,{className:`truncate`,title:e,children:e}),(0,V.jsx)(r,{name:`Check`,className:R(Wt,t?`opacity-100`:`opacity-0`)})]})}var m2=(0,B.memo)(function({provider:e,model:t,serviceTier:n,reasoning:r}){let i=n?.onChange??(()=>{}),a=e.onChange===void 0,o=e.selectedId??``,s=e.options?.find(e=>e.value===o),c=e.displayName??s?.label??o,l=e.hasMultiple&&a&&e.displayName&&t.options.length===0,u=!!(e.hasMultiple&&e.onChange&&e.options&&e.options.length>1),d=t.options.length>0||u,f=t.loadError?.providerId===o?t.loadError:null,p=!d&&f!==null;return(0,V.jsxs)(V.Fragment,{children:[l?(0,V.jsx)(l2,{label:`Provider`,value:e.displayName,icon:s?.icon,muted:!0}):null,d?(0,V.jsx)(d2,{providerOptions:e.options??[],selectedProviderId:o,onSelectedProviderChange:e.onChange,hasMultipleProviders:e.hasMultiple??!1,modelValue:t.active?.model??t.selected,modelOptions:t.options,modelLoadError:t.loadError,onModelChange:t.onChange,formatModelLabel:J0,reasoningValue:r.value,reasoningOptions:r.options,onReasoningChange:r.onChange,fastModeEnabled:n?.value===`fast`,onFastModeChange:e=>i(e?`fast`:void 0),showFastModeToggle:n?.supported??!1,serviceTierSupportByProvider:n?.supportByProvider,muted:!0}):null,p?(0,V.jsx)(`span`,{className:`inline-flex min-w-0 items-center text-xs text-muted-foreground`,children:(0,V.jsx)($0,{error:f,providerLabel:c})}):null]})}),h2=60,g2=160;function _2(e,{minHeight:t=h2,maxHeight:n=g2}={}){return(0,B.useCallback)(r=>{let i=r??e.current;i&&(i.style.height=`auto`,i.style.height=`${Math.min(Math.max(i.scrollHeight,t),n)}px`)},[n,t,e])}var v2=f({text:re().default(``),attachments:De(He()).default([]).transform(e=>e.flatMap(e=>{let t=ce.safeParse(e);return t.success?[t.data]:[]}))});function y2(){return{text:``,attachments:[]}}function b2(e){return e.text.length===0&&e.attachments.length===0}function x2(e){if(!e)return y2();try{let t=JSON.parse(e),n=v2.safeParse(t);return n.success?n.data:y2()}catch{return y2()}}function S2(e){let t=e.text,n=e.attachments;return b2(e)?null:JSON.stringify({text:t,attachments:n})}function C2(e,t){return S2(e)===S2(t)}function w2(e){let t=e.trim();if(t.length===0)return`Attachment`;let n=t.split(`/`),r=n[n.length-1];return r&&r.length>0?r:t}function T2(e){let t=[],n=e.text.trim();n.length>0&&t.push({type:`text`,text:n});for(let n of e.attachments){if(n.type===`localImage`){t.push({type:`localImage`,path:n.path});continue}t.push({type:`localFile`,path:n.path,name:n.name,sizeBytes:n.sizeBytes,...n.mimeType?{mimeType:n.mimeType}:{}})}return t}function E2(e){let t=[],n=[];for(let r of e){if(r.type===`text`){r.text.trim().length>0&&t.push(r.text);continue}if(r.type===`localImage`){n.push({type:`localImage`,path:r.path,name:w2(r.path),sizeBytes:0});continue}r.type===`localFile`&&n.push({type:`localFile`,path:r.path,name:r.name??w2(r.path),sizeBytes:r.sizeBytes??0,...r.mimeType?{mimeType:r.mimeType}:{}})}return{text:t.join(`
|
|
1362
|
+
|
|
1363
|
+
`),attachments:n}}function D2(e,t){if(/^(https?:|data:|blob:)/i.test(e))return e;if(t)return Ze(t,e);if(/^file:/i.test(e))return e;let n=e.replaceAll(`\\`,`/`);return/^[a-zA-Z]:\//.test(n)?`file:///${encodeURI(n)}`:n.startsWith(`/`)?`file://${encodeURI(n)}`:e}function O2(e){return e.type===`localImage`||e.mimeType?.toLowerCase().startsWith(`image/`)===!0}function k2({attachments:e,attachmentProjectId:t,expandedImageIndex:n,onExpandedImageIndexChange:i,onRemoveAttachment:a}){let o=e.filter(O2),s=e.filter(e=>!O2(e)),c=o.map(e=>({alt:e.name,src:D2(e.path,t)})),l=o.length>1,u=n===null?null:c[n]??null;return(0,B.useEffect)(()=>{n!==null&&(n<o.length||i(null))},[n,o.length,i]),e.length===0?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mx-3 mb-1 mt-1`,children:[o.length>0?(0,V.jsx)(`div`,{className:`mb-1.5 flex flex-wrap gap-2`,children:o.map((e,n)=>(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(`button`,{type:`button`,className:`cursor-zoom-in overflow-hidden rounded-md border border-border bg-surface-recessed`,onClick:()=>i(n),title:e.name,children:(0,V.jsx)(`img`,{src:D2(e.path,t),alt:e.name,className:`h-16 w-24 object-cover`,loading:`lazy`})}),a?(0,V.jsx)(`button`,{type:`button`,onClick:()=>a(e.path),className:`absolute right-1 top-1 z-10 rounded-full bg-black/55 p-0.5 text-white transition-colors hover:bg-black/70`,title:`Remove ${e.name}`,"aria-label":`Remove ${e.name}`,children:(0,V.jsx)(r,{name:`X`,className:`size-3`})}):null]},`${e.path}-${n}`))}):null,s.length>0?(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:s.map(e=>(0,V.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-surface-recessed px-2 py-0.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:e.name}),a?(0,V.jsx)(`button`,{type:`button`,onClick:()=>a(e.path),className:`rounded p-0.5 hover:bg-state-hover`,title:`Remove ${e.name}`,children:(0,V.jsx)(r,{name:`X`,className:`size-3`})}):null]},e.path))}):null]}),(0,V.jsx)(Jm,{imageSrc:u?.src??null,imageAlt:u?.alt??`Attached image`,title:`Attached image preview`,hasMultipleImages:l,onPrevious:()=>{i(n===null||c.length<=1?n:qm({currentIndex:n,direction:`previous`,itemCount:c.length}))},onNext:()=>{i(n===null||c.length<=1?n:qm({currentIndex:n,direction:`next`,itemCount:c.length}))},onClose:()=>i(null)})]})}var A2=[`threads`,`workspace`,`manager-storage`];function j2(e){let t=e.lastIndexOf(`/`);return t===-1?{name:e,directory:``}:{name:e.slice(t+1),directory:e.slice(0,t)}}function M2(e,t){let n=new Map;for(let[r,i]of e.entries()){let e=N2(i),a=n.get(e);if(a){a.items.push({item:i,index:r});continue}n.set(e,{kind:e,label:F2(e,t),items:[{item:i,index:r}]})}return A2.flatMap(e=>{let t=n.get(e);return t?[t]:[]})}function N2(e){return e.kind===`thread`?`threads`:P2(e)}function P2(e){return e.source===`thread-storage`?`manager-storage`:`workspace`}function F2(e,t){return e===`threads`?I2(t):L2(e)}function I2(e){return e===`all`?`Managers & threads`:e===`managers`?`Managers`:`Threads`}function L2(e){return e===`manager-storage`?`Manager Storage`:`Workspace`}function R2(e){return e.kind===`thread`?e.threadType===`manager`?`UserRound`:`MessageSquare`:e.entryKind===`directory`?`Folder`:`File`}function z2(e){return e.kind===`thread`?e.title||e.path:`${L2(P2(e))}: ${e.path}`}function B2(e,t){return e.kind===`path`?`${e.kind}-${e.source}-${e.entryKind}-${e.path}-${t}`:`${e.kind}-${e.path}-${t}`}function V2({state:e,selectedIndex:t,onApply:n}){let i=(0,B.useRef)([]),a=e.kind===`results`?e.suggestions.length:0;(0,B.useEffect)(()=>{i.current=i.current.slice(0,a)},[a]),(0,B.useEffect)(()=>{if(e.kind!==`results`||e.suggestions.length===0)return;let n=i.current[t];n&&n.scrollIntoView({block:`nearest`})},[a,t,e.kind,e]);let o=(0,B.useMemo)(()=>e.kind===`results`?M2(e.suggestions,e.threadSectionMode):[],[e]);return(0,V.jsx)(`div`,{className:`overflow-hidden rounded-md border border-border bg-popover text-popover-foreground`,children:(0,V.jsx)(`div`,{className:`max-h-48 overflow-y-auto`,children:e.kind===`hint`?(0,V.jsx)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`Type to search mentions`}):e.kind===`loading`?(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground`,children:[(0,V.jsx)(r,{name:`Spinner`,className:`size-3.5 animate-spin`}),(0,V.jsx)(`span`,{children:`Searching mentions…`})]}):e.kind===`error`?(0,V.jsx)(`div`,{className:`px-3 py-2 text-xs text-destructive`,children:`Failed to load suggestions`}):o.length>0?(0,V.jsx)(`div`,{className:`pb-1`,children:o.map(e=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`sticky top-0 z-10 bg-popover px-3 pb-1 pt-1.5 text-xs text-muted-foreground`,children:e.label}),(0,V.jsx)(`div`,{className:`flex flex-col gap-px px-1`,children:e.items.map(({item:e,index:a})=>{let o=a===t,s,c=null,l=R2(e);if(e.kind===`thread`)s=e.title||`Untitled thread`;else{let{directory:t}=j2(e.path);s=e.name,c=t||null}return(0,V.jsx)(`button`,{ref:e=>{i.current[a]=e},type:`button`,onMouseDown:t=>{t.preventDefault(),n(e)},className:R(`w-full scroll-mt-7 rounded px-2 py-1.5 text-left text-xs`,o?`bg-state-active text-foreground`:`hover:bg-state-hover`),title:z2(e),children:(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,V.jsx)(r,{name:l,className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`truncate`,children:s}),c===null?null:(0,V.jsx)(pY,{className:`text-muted-foreground [flex-shrink:9999]`,children:c})]})},B2(e,a))})})]},e.kind))}):(0,V.jsx)(`div`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`No matching mentions`})})})}var H2=/(^|[\s([{])@([^\s@]*)$/;function U2(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t),r=H2.exec(n);if(!r)return null;let i=r[2]??``,a=n.length-i.length-1;return a<0||n[a]!==`@`?null:{query:i,start:a,end:t}}function W2(e,t,n){let r=n.trim();if(!r)return{value:e,caretPosition:t.end,insertedLength:0};let i=e.slice(t.end),a=/^\s/.test(i)?`@${r}`:`@${r} `;return{value:`${e.slice(0,t.start)}${a}${i}`,caretPosition:t.start+a.length,insertedLength:a.length}}var G2=68,K2=158,q2={thread:`bb.promptbox.zen-mode.thread`,"root-compose":`bb.promptbox.zen-mode.root-compose`},J2={thread:`h-[50dvh]`,"root-compose":`h-[70dvh]`};function Y2(){let e=Fr(!1);return Fr(t=>t(e),(t,n,r)=>{let i=t(e),a=typeof r==`function`?r(i):r;n(e,a===zr?!1:a)})}function X2({id:e,value:t,onChange:n,onSubmit:i,placeholder:a=`Ask anything. @ to mention files or folders`,className:o,header:s,footerStart:c,autoFocus:l=!1,submission:u={},minHeight:d=G2,mentions:f,mentionMenuPlacement:p,attachments:m={},zenMode:h={},history:g,voice:_,promptBoxRef:v}){let{isSubmitting:y=!1,disabled:b=!1,title:x=`Submit (Enter)`,mode:S=`enter`,isRunning:C=!1,onStop:w,onModifierSubmit:T,allowEmptyInput:E=!1}=u,{suggestions:D,threadSectionMode:O,isLoading:ee,isError:te,onQueryChange:k}=f,{items:A=[],isAttaching:j=!1,error:ne=null,onAttachFiles:N,onRemove:re,projectId:ie}=m,{layout:ae=`thread`,storageKey:P,resetKey:F,resetOnSubmit:oe=!1}=h,se=(0,B.useRef)(null),I=(0,B.useRef)(null),L=(0,B.useRef)(null),ce=(0,B.useRef)(null),le=(0,B.useRef)(t),ue=_2(L,{minHeight:d,maxHeight:K2}),de=(0,B.useRef)(``),fe=(0,B.useRef)(null),pe=(0,B.useRef)(!1),[me,he]=(0,B.useState)(null),[ge,_e]=(0,B.useState)(0),[ve,ye]=(0,B.useState)(null),[be,xe]=(0,B.useState)(null),[Se,Ce]=(0,B.useState)(null),[we,Te]=(0,B.useState)(null),Ee=P??q2[ae],[De,Oe]=Dr((0,B.useMemo)(()=>Ee?Lr(Ee,!1,Br(),{getOnInit:!0}):Y2(),[Ee])),ke=g?.resetKey;(0,B.useLayoutEffect)(()=>{if(!l)return;let e=L.current;if(!e)return;e.focus();let t=e.value.length;e.setSelectionRange(t,t)},[l,ke]),(0,B.useEffect)(()=>{if(L.current){if(De){L.current.style.height=`100%`;return}ue(L.current)}},[De,ue,t]),(0,B.useEffect)(()=>{le.current=t},[t]),(0,B.useEffect)(()=>{if(F!==void 0){if(Ee){Oe(zr);return}Oe(!1)}},[Ee,Oe,F]);let Ae=(0,B.useCallback)(()=>{xe(null),Ce(null),Te(null)},[]);(0,B.useEffect)(()=>{if(!g){Ae();return}if(g.entries.length===0){Ae();return}be!==null&&be>=g.entries.length&&Ae()},[be,g,Ae]),(0,B.useEffect)(()=>{Ae()},[g?.resetKey,Ae]),(0,B.useEffect)(()=>{if(!g||be===null||!we)return;let e=g.entries[be];if(!e||!C2(e,we)){Ae();return}C2(g.currentDraft,we)||Ae()},[be,g,we,Ae]),(0,B.useLayoutEffect)(()=>{let e=I.current,t=se.current;if(e===null||!t)return;I.current=null;let n=L.current;n&&(De?n.style.height=`100%`:ue(n));let r=t.style.transition,i=t.style.willChange;t.style.transition=`none`,t.style.height=``;let a=t.getBoundingClientRect().height;t.style.height=`${e}px`,t.getBoundingClientRect(),t.style.willChange=`height`,t.style.transition=`height 240ms cubic-bezier(0.22, 1, 0.36, 1)`,t.style.height=`${a}px`;let o=!1,s=()=>{o||(o=!0,t.style.transition=r,t.style.willChange=i,t.style.height=``,t.removeEventListener(`transitionend`,c),window.clearTimeout(l))},c=e=>{e.propertyName===`height`&&s()},l=window.setTimeout(s,320);return t.addEventListener(`transitionend`,c),s},[De,ue,ae]);let je=(0,B.useCallback)(e=>{let t=e.selectionStart??e.value.length,n=fe.current,r=pe.current&&n!==null;n&&!r&&(t>=n.start&&t<=n.end?n.hasLeftRange&&(fe.current=null):fe.current={...n,hasLeftRange:!0});let i=fe.current&&!fe.current.hasLeftRange&&(r||t>=fe.current.start&&t<=fe.current.end)?null:U2(e.value,t),a=i?`${i.start}:${i.end}:${i.query}`:``;a!==de.current&&(de.current=a,_e(0)),he(i),k(i?i.query:null)},[k]);(0,B.useEffect)(()=>{L.current&&je(L.current)},[je,t]);let Me=t.trim(),Ne=A.length>0,Pe=Me.length>0||Ne,Fe=me!==null,Ie=(me?.query.trim()??``).length===0?{kind:`hint`}:ee?{kind:`loading`}:te?{kind:`error`}:{kind:`results`,suggestions:D,threadSectionMode:O};(0,B.useEffect)(()=>{if(D.length===0){_e(0);return}ge>=D.length&&_e(0)},[D.length,ge]);let Le=(0,B.useCallback)(e=>{if(!L.current||!me)return;let r=me.start,i=W2(t,me,e.replacement);de.current=``,fe.current={start:r,end:r+i.insertedLength,hasLeftRange:!1},pe.current=!0,n(i.value),he(null),_e(0),k(null),requestAnimationFrame(()=>{let e=L.current;if(!e){pe.current=!1;return}e.focus(),e.setSelectionRange(i.caretPosition,i.caretPosition),De?e.style.height=`100%`:ue(e),je(e),pe.current=!1})},[me,De,n,k,ue,je,t]),Re=(0,B.useCallback)(e=>{let t=e.replace(/\s+/g,` `).trim();if(t.length===0)return;let r=L.current,i=le.current;if(!r){n(i.length===0||/\s$/.test(i)?`${i}${t}`:`${i} ${t}`);return}let a=r.selectionStart??i.length,o=r.selectionEnd??a,s=i.slice(0,a),c=i.slice(o),l=s.length>0&&!/\s$/.test(s),u=c.length>0&&!/^\s/.test(c),d=`${l?` `:``}${t}${u?` `:``}`,f=`${s}${d}${c}`,p=s.length+d.length;n(f),requestAnimationFrame(()=>{let e=L.current;e&&(e.focus(),e.setSelectionRange(p,p),De?e.style.height=`100%`:ue(e),je(e))})},[De,n,ue,je]),ze=(0,B.useCallback)(()=>{let e=le.current,t=L.current;if(!t){let t=e.trim();return t.length>0?t:void 0}let n=t.selectionStart??e.length,r=e.slice(0,n).trim();return r.length>0?r:void 0},[]);(0,B.useImperativeHandle)(v,()=>({insertTextAtCursor:Re,getTextBeforeCursor:ze}),[Re,ze]);let Be=_?.state===`recording`,Ve=_?.state===`transcribing`,He=Be||Ve,Ue=_?.state===`error`?_.errorMessage??`Voice input failed.`:null,We=Be||Ve,Ge=(Pe||E)&&!y&&!b&&!He,Ke=T!==void 0&&!y&&!b&&!He,qe=!!(C&&w&&!Ge&&!He),Je=_!==void 0&&_.isSupported&&!y,Ye=S,Xe=De?x.replace(/^Submit\s+/,``):x,Ze=(0,B.useCallback)(e=>{!N||e.length===0||N(e)},[N]),Qe=(0,B.useCallback)(()=>{if(!(!oe||!De)){if(Ee){Oe(zr);return}Oe(!1)}},[De,oe,Ee,Oe]),$e=(0,B.useCallback)(()=>{Ge&&(i(),Qe())},[Ge,i,Qe]),et=(0,B.useCallback)(()=>{!Ke||!T||(T(),Qe())},[Ke,T,Qe]),tt=(0,B.useCallback)(e=>{g&&(g.onSelectEntry(e),requestAnimationFrame(()=>{let e=L.current;if(!e)return;e.focus();let t=e.value.length;e.setSelectionRange(t,t),De?e.style.height=`100%`:ue(e),je(e)}))},[g,De,ue,je]),nt=(0,B.useCallback)(()=>{let e=L.current,t=se.current,n=e?.selectionStart??null,r=e?.selectionEnd??null,i=e?.scrollTop??null;I.current=t?.getBoundingClientRect().height??null,Oe(e=>!e),requestAnimationFrame(()=>{let e=L.current;e&&(e.focus(),n!==null&&r!==null&&e.setSelectionRange(n,r),i!==null&&(e.scrollTop=i))})},[Oe]),rt=(0,B.useCallback)(e=>{let t=e.target.files;!t||t.length===0||(Ze(Array.from(t)),e.target.value=``)},[Ze]);return(0,V.jsxs)(`form`,{ref:se,onSubmit:e=>{e.preventDefault(),$e()},onDragOver:e=>{N&&e.preventDefault()},onDrop:e=>{N&&(e.preventDefault(),!(!e.dataTransfer?.files||e.dataTransfer.files.length===0)&&Ze(Array.from(e.dataTransfer.files)))},className:R(`relative w-full rounded-lg border border-border bg-background pb-2`,De&&`flex flex-col`,De&&J2[ae],o),children:[(0,V.jsx)(`input`,{ref:ce,type:`file`,multiple:!0,className:`hidden`,onChange:rt}),s?(0,V.jsx)(`div`,{className:`pl-4 pr-14 pt-3`,children:s}):null,(0,V.jsxs)(`div`,{className:R(`relative`,De&&`flex flex-1 flex-col`),children:[(0,V.jsx)(M,{type:`button`,size:`icon`,variant:`ghost`,onMouseDown:e=>{e.preventDefault()},onClick:nt,title:De?`Exit zen mode`:`Enter zen mode`,"aria-label":De?`Exit zen mode`:`Enter zen mode`,"aria-pressed":De,className:`absolute right-2 top-2 z-20 size-auto h-6 px-1.5 text-subtle-foreground hover:text-muted-foreground aria-pressed:bg-transparent aria-pressed:text-subtle-foreground aria-pressed:hover:bg-transparent aria-pressed:hover:text-muted-foreground`,children:De?(0,V.jsx)(r,{name:`Minimize2`,className:`size-3`}):(0,V.jsx)(r,{name:`Maximize2`,className:`size-3`})}),(0,V.jsx)(`textarea`,{ref:L,id:e,value:t,onChange:e=>{n(e.target.value),De?e.target.style.height=`100%`:ue(e.target),je(e.target)},onClick:e=>{je(e.currentTarget)},onSelect:e=>{je(e.currentTarget)},onBlur:()=>{de.current=``,fe.current&&={...fe.current,hasLeftRange:!0},he(null),k(null)},onPaste:e=>{if(!N)return;let t=Array.from(e.clipboardData?.items??[]).filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e!==null);t.length!==0&&(e.preventDefault(),Ze(t))},onKeyDown:e=>{let t=e.currentTarget.selectionStart,n=e.currentTarget.selectionEnd,r=t!==null&&n!==null&&t===n,i=e.shiftKey||e.altKey||e.metaKey||e.ctrlKey,a=r&&t===e.currentTarget.value.length,o=g&&be!==null?g.entries[be]:null,s=!!(g&&o!=null&&C2(g.currentDraft,o)),c=g!==void 0&&!i&&a&&(b2(g.currentDraft)||s),l=Fe&&!i&&!c;if(Fe){if(e.key===`ArrowDown`&&l&&D.length>0){e.preventDefault(),_e(e=>(e+1)%D.length);return}if(e.key===`ArrowUp`&&l&&D.length>0){e.preventDefault(),_e(e=>(e+D.length-1)%D.length);return}if((e.key===`Enter`||e.key===`Tab`)&&D.length>0){e.preventDefault();let t=D[ge]??D[0];t&&Le(t);return}if(e.key===`Escape`){e.preventDefault(),de.current=``,he(null),k(null);return}}if(g){if(e.key===`ArrowUp`&&c&&g.entries.length>0){e.preventDefault();let t=be===null?0:Math.min(be+1,g.entries.length-1);be===null&&Ce(g.currentDraft),xe(t);let n=g.entries[t];Te(n),tt(n);return}if(e.key===`ArrowDown`&&c&&be!==null){if(e.preventDefault(),be===0){Se&&tt(Se),Ae();return}let t=be-1;xe(t);let n=g.entries[t];Te(n),tt(n);return}}if(e.key===`Enter`&&e.metaKey&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&T){e.preventDefault(),et();return}let u=e.metaKey||e.ctrlKey;De||(Ye===`mod-enter`?u&&e.key===`Enter`:e.key===`Enter`&&!e.shiftKey)&&(e.preventDefault(),$e())},placeholder:a,rows:1,autoFocus:l,"aria-keyshortcuts":T?`Meta+Enter`:void 0,enterKeyHint:`send`,className:R(`w-full resize-none overflow-y-auto bg-transparent px-4 pb-1 pr-14 pt-3 leading-relaxed outline-none placeholder:select-none placeholder:text-subtle-foreground`,tn,De&&`min-h-0 flex-1`),style:{minHeight:De?`0px`:`${d}px`,height:De?`100%`:void 0,maxHeight:De?`none`:`${K2}px`}})]}),Fe?(0,V.jsx)(`div`,{className:R(`absolute -left-px -right-px z-20`,De?`bottom-14 px-3`:p===`top`?`bottom-full mb-2`:`top-full mt-2`),children:(0,V.jsx)(V2,{state:Ie,selectedIndex:ge,onApply:Le})}):null,(0,V.jsx)(k2,{attachments:A,attachmentProjectId:ie,expandedImageIndex:ve,onExpandedImageIndexChange:ye,onRemoveAttachment:re}),ne?(0,V.jsx)(`div`,{className:`mx-3 mb-1 mt-1 text-xs text-destructive`,children:ne}):null,Ue?(0,V.jsx)(`div`,{className:`mx-3 mb-1 mt-1 rounded-md border border-surface-destructive-border bg-surface-destructive px-2 py-1 text-xs text-destructive`,children:(0,V.jsx)(`span`,{className:`block truncate`,title:Ue,children:Ue})}):null,(0,V.jsxs)(`div`,{className:`flex flex-row items-center gap-3 px-3.5 pt-1.5`,children:[(0,V.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-row items-center gap-1`,"aria-live":`polite`,children:c}),(0,V.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-1`,children:[(0,V.jsx)(M,{type:`button`,size:`icon`,variant:`ghost`,title:`Attach files`,disabled:!N||j,onClick:()=>ce.current?.click(),className:Bt,children:j?(0,V.jsx)(r,{name:`Spinner`,className:`size-4 animate-spin`}):(0,V.jsx)(r,{name:`Paperclip`,className:`size-4`})}),_&&!We?(0,V.jsx)(M,{type:`button`,size:`icon`,variant:`ghost`,title:_.isSupported?`Start voice input`:`Voice input is not supported in this browser`,disabled:!Je,onClick:_.start,className:Bt,children:(0,V.jsx)(r,{name:`Mic`,className:`size-4`})}):null,qe?(0,V.jsx)(M,{type:`button`,size:`icon`,variant:`secondary`,title:`Stop run`,onClick:w,className:Bt,children:(0,V.jsx)(r,{name:`Square`,className:`size-3.5 fill-current [&_*]:stroke-0`})}):_&&Be?(0,V.jsxs)(`div`,{className:`relative inline-flex`,children:[(0,V.jsx)(M,{type:`button`,size:`sm`,variant:`default`,title:`Stop and transcribe recording`,onClick:_.stop,className:R(`rounded-r-none`,kt),children:(0,V.jsx)(r,{name:`AudioLines`,className:`size-4 animate-pulse`})}),(0,V.jsx)(M,{type:`button`,size:`sm`,variant:`default`,title:`Cancel recording`,onClick:_.cancel,className:Ft,children:(0,V.jsx)(r,{name:`X`,className:`size-3.5`})})]}):_&&Ve?(0,V.jsxs)(`div`,{className:`relative inline-flex`,children:[(0,V.jsxs)(M,{type:`button`,size:`sm`,variant:`default`,title:`Transcribing voice input...`,disabled:!0,className:R(`rounded-r-none`,kt),children:[(0,V.jsx)(r,{name:`AudioLines`,className:`size-4`}),(0,V.jsx)(r,{name:`Spinner`,className:`size-4 animate-spin`})]}),(0,V.jsx)(M,{type:`button`,size:`sm`,variant:`default`,title:`Cancel transcription`,onClick:_.cancel,className:Ft,children:(0,V.jsx)(r,{name:`X`,className:`size-3.5`})})]}):(0,V.jsx)(M,{type:`submit`,size:`sm`,variant:`default`,title:Xe,disabled:!Ge,className:kt,children:y?(0,V.jsx)(r,{name:`Spinner`,className:`size-4 animate-spin`}):De?(0,V.jsx)(r,{name:`ArrowUp`,className:`size-4`}):(0,V.jsx)(r,{name:`CornerDownLeft`,className:`size-4`})})]})]})]})}var Z2=1e3,Q2=250,$2=180,e4=/<!doctype html|<html[\s>]/i;function t4(e){return e.replace(/\s+/g,` `).trim()}function n4(e){let t=e.replace(/\s+/g,` `).trim();if(t.length===0)return null;let n=t.search(e4);return n>=0&&(t=t.slice(0,n).trim()),t.length===0||(t=t.replace(/^HTTP\s+\d{3}:\s*/i,``).trim(),t.length===0)?null:t.length>$2?`${t.slice(0,$2-1)}...`:t}function r4(e){if(e instanceof DOMException)switch(e.name){case`NotAllowedError`:case`SecurityError`:return`Microphone permission denied`;case`NotFoundError`:case`DevicesNotFoundError`:return`No microphone was found`;case`NotReadableError`:case`TrackStartError`:return`Microphone is already in use`;case`AbortError`:return`Voice capture was aborted`;default:return`Failed to start voice recording`}if(e instanceof Error&&e.message.trim().length>0){let t=n4(e.message);if(t)return t}return`Voice input failed`}function i4(){if(typeof MediaRecorder>`u`)return null;for(let e of[`audio/webm`,`audio/mp4`,`audio/ogg`])if(MediaRecorder.isTypeSupported(e))return e;return null}function a4(e,t){let n=t.includes(`ogg`)?`ogg`:t.includes(`mp4`)?`mp4`:`webm`;return new File([e],`recording.${n}`,{type:t})}function o4(e){let t=(0,B.useRef)(null),n=(0,B.useRef)(null),r=(0,B.useRef)([]),i=(0,B.useRef)(null),a=(0,B.useRef)(void 0),o=(0,B.useRef)(!0),s=(0,B.useRef)(null),[c,l]=(0,B.useState)(`idle`),[u,d]=(0,B.useState)(void 0),[f,p]=(0,B.useState)(!1),m=(0,B.useCallback)(()=>{let e=n.current;e&&(e.getTracks().forEach(e=>e.stop()),n.current=null)},[]);(0,B.useEffect)(()=>{if(typeof window>`u`){p(!1);return}let e=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia,t=window.MediaRecorder!==void 0;p(e&&t)},[]),(0,B.useEffect)(()=>()=>{let e=t.current;if(e&&e.state===`recording`)try{e.stop()}catch{}t.current=null,r.current=[],i.current=null,a.current=void 0,o.current=!0,s.current&&=(s.current.abort(),null),m()},[m]);let h=(0,B.useCallback)(async()=>{if(!f){l(`error`),d(`Voice input is not supported in this browser`);return}if(!(c===`recording`||c===`transcribing`))try{let c=await navigator.mediaDevices.getUserMedia({audio:!0});n.current=c,r.current=[],i.current=Date.now(),a.current=e.getPromptContext?.(),o.current=!0;let u=i4(),f=u?new MediaRecorder(c,{mimeType:u}):new MediaRecorder(c);t.current=f,f.onstart=()=>{d(void 0),l(`recording`)},f.ondataavailable=e=>{e.data.size>0&&r.current.push(e.data)},f.onerror=()=>{l(`error`),d(`Voice recording failed`)},f.onstop=async()=>{if(m(),!o.current){o.current=!0,r.current=[],a.current=void 0,d(void 0),l(`idle`);return}let t=i.current??Date.now();if(i.current=null,Date.now()-t<Z2){l(`error`),d(`Recording too short (minimum 1 second)`),r.current=[],a.current=void 0;return}let n=r.current;if(r.current=[],n.length===0){l(`error`),d(`No audio was captured`),a.current=void 0;return}let c=f.mimeType||u||`audio/webm`,p=a4(new Blob(n,{type:c}),c),h=a.current;a.current=void 0,l(`transcribing`);let g=new AbortController;s.current=g;try{let t=t4(await e.onTranscribe({file:p,promptContext:h,signal:g.signal}));if(t.length===0)throw Error(`Voice transcription returned an empty result.`);e.onTranscript(t),d(void 0),l(`idle`)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`){d(void 0),l(`idle`);return}l(`error`),d(r4(e))}finally{s.current===g&&(s.current=null)}},f.start(Q2)}catch(e){m(),t.current=null,r.current=[],i.current=null,a.current=void 0,o.current=!0,s.current=null,l(`error`),d(r4(e))}},[f,e,c,m]),g=(0,B.useCallback)(()=>{if(c!==`recording`)return;let e=t.current;if(!(!e||e.state!==`recording`)){o.current=!0;try{e.stop()}catch(e){l(`error`),d(r4(e))}}},[c]),_=(0,B.useCallback)(()=>{if(c===`recording`){let e=t.current;if(e&&e.state===`recording`){o.current=!1;try{e.stop()}catch(e){l(`error`),d(r4(e))}}return}if(c===`transcribing`){let e=s.current;e&&(e.abort(),s.current=null),d(void 0),l(`idle`)}},[c]);return{state:c,statusLabel:(0,B.useMemo)(()=>{switch(c){case`recording`:return`Recording...`;case`transcribing`:return`Transcribing...`;case`error`:return u??`Voice input failed`;case`idle`:return null}return pt(c)},[u,c]),errorMessage:u,isSupported:f,isRecording:c===`recording`,isProcessing:c===`transcribing`,isListening:c===`recording`||c===`transcribing`,start:h,stop:g,cancel:_}}async function s4({file:e,promptContext:t,signal:n}){return(await ae(e,t,n)).text}function c4(e){let t=o4({onTranscript:(0,B.useCallback)(t=>{e.current?.insertTextAtCursor(t)},[e]),onTranscribe:s4,getPromptContext:(0,B.useCallback)(()=>e.current?.getTextBeforeCursor(),[e])});return(0,B.useMemo)(()=>({state:t.state,errorMessage:t.state===`error`?t.errorMessage:void 0,isSupported:t.isSupported,start:t.start,stop:t.stop,cancel:t.cancel}),[t.state,t.errorMessage,t.isSupported,t.start,t.stop,t.cancel])}function l4({mergeBaseBranch:e,mergeBaseBranchRef:t,mergeBaseBranchOptions:n,remoteMergeBaseBranchOptions:r}){let i=n??[],a=r??[],o=t?.name===e?t:null,s=o&&o.kind!==`missing`?o.kind:void 0;return!e||i.includes(e)||a.includes(e)?{options:i,remoteOptions:a,...s?{selectedOptionKind:s}:{}}:s===`remote`?{options:i,remoteOptions:[e,...a],selectedOptionKind:s}:s===`local`||o?.kind!==`missing`?{options:[e,...i],remoteOptions:a,...s?{selectedOptionKind:s}:{}}:{options:i,remoteOptions:a}}var u4=`New branch`,d4=[],f4=[`Start from:`,`Current:`,`Checkout:`,`New branch from:`,`Branch from:`],p4=`Current (`,m4=`Detached`,h4=`flex w-full min-w-0 items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-left text-xs outline-none transition-colors hover:bg-state-hover hover:text-foreground focus-visible:bg-state-hover focus-visible:text-foreground`,g4=`text-xs font-medium text-muted-foreground`,_4=`sticky top-0 z-20 -mx-1 bg-background px-3`,v4=120,y4={title:null,currentSectionLabel:`Current`,optionsSectionLabel:`Branches`,optionsUnavailableFallback:`Branch selection is unavailable right now.`},b4={title:`Start from:`,currentSectionLabel:null,optionsSectionLabel:`Checkout:`,optionsUnavailableFallback:`Branch checkout is unavailable right now.`},x4={title:`Branch from:`,currentSectionLabel:null,optionsSectionLabel:null,optionsUnavailableFallback:`Base branch selection is unavailable right now.`};function S4({title:e,reason:t,fallback:n}){return e??t??n}function C4(e){return e===null?u4:`New branch from: ${e}`}function w4(e){return e===null?u4:`Create a new branch from ${e}`}function T4(e){if(e.startsWith(p4)&&e.endsWith(`)`))return{kind:`parenthetical`,prefix:`Current`,value:e.slice(9,-1)};for(let t of f4){let n=`${t} `;if(e.startsWith(n))return{kind:`prefixed`,prefix:t,value:e.slice(n.length)}}let t=`${m4} `;return e.startsWith(t)?{kind:`prefixed`,prefix:m4,value:e.slice(t.length)}:{kind:`plain`,value:e}}function E4({label:e,emphasizePlainLabel:t=!1,className:n}){let r=T4(e);return r.kind===`plain`?(0,V.jsx)(`span`,{className:R(`min-w-0 truncate`,t&&`font-medium text-foreground`,n),children:r.value}):r.kind===`parenthetical`?(0,V.jsxs)(`span`,{className:R(`flex min-w-0 items-baseline`,n),children:[(0,V.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[r.prefix,` (`]}),(0,V.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:r.value}),(0,V.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`)`})]}):(0,V.jsxs)(`span`,{className:R(`flex min-w-0 items-baseline gap-1`,n),children:[(0,V.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:r.prefix}),(0,V.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:r.value})]})}function D4({label:e,subtitle:t,subtitleTitle:n,sticky:r=!0,className:i}){let a=r?_4:`px-2`;return t?(0,V.jsxs)(`div`,{className:R(g4,a,`py-[0.3125rem] pb-1.5`,i),title:n??t,children:[(0,V.jsx)(`div`,{children:e}),(0,V.jsx)(`div`,{className:`mt-1 text-xs font-normal leading-snug text-muted-foreground`,children:(0,V.jsx)(`span`,{className:`min-w-0`,children:t})})]}):(0,V.jsx)(`div`,{className:R(g4,a,`flex h-7 items-center`,i),children:e})}function O4({icon:e,label:t,description:n,title:i}){return(0,V.jsxs)(`div`,{role:`note`,title:i??n,className:`flex w-full min-w-0 items-start gap-2 rounded-sm px-2 py-[0.3125rem] text-left text-xs text-muted-foreground`,children:[(0,V.jsx)(r,{name:e,className:R(`mt-0.5 text-muted-foreground`,Et)}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:`truncate text-foreground/80`,children:t}),(0,V.jsx)(`span`,{className:`text-xs leading-snug`,children:n})]})]})}function k4({icon:e,label:t,title:n,selected:i,disabled:a=!1,emphasizeLabel:o=!1,onSelect:s}){return(0,V.jsxs)(`button`,{type:`button`,className:R(h4,a&&`cursor-not-allowed text-muted-foreground opacity-60 hover:bg-transparent hover:text-muted-foreground`),disabled:a,title:n??t,onClick:s,children:[(0,V.jsx)(r,{name:e,className:R(`text-muted-foreground`,Et)}),(0,V.jsx)(E4,{label:t,emphasizePlainLabel:o,className:`flex-1`}),(0,V.jsx)(r,{name:`Check`,className:R(i?`opacity-100`:`opacity-0`,Wt)})]})}function A4({inputRef:e,query:t,enterSelection:n,onEnterSelection:i,onQueryChange:a}){return(0,V.jsx)(`div`,{className:`shrink-0 border-b border-border p-1.5`,children:(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(r,{name:`Search`,className:`pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,V.jsx)(Ar,{ref:e,value:t,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),n&&i(n))},placeholder:`Search branches`,className:`h-8 border-0 bg-transparent pl-8 pr-2 text-xs shadow-none focus-visible:ring-0`})]})})}function j4({localOptions:e,remoteOptions:t,selectedValue:n,onSelect:r}){return(0,V.jsxs)(V.Fragment,{children:[e.map(e=>(0,V.jsx)(k4,{icon:`GitMerge`,label:e,title:e,selected:e===n,onSelect:()=>r(e)},e)),t.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(D4,{label:`Remote branches`,className:e.length>0?`mt-1`:void 0}),t.map(e=>(0,V.jsx)(k4,{icon:`GitMerge`,label:e,title:e,selected:e===n,onSelect:()=>r(e)},e))]}):null]})}function M4(e){switch(e){case`checkout`:return b4;case`base`:return x4;case void 0:return y4}}function N4({options:e,remoteOptions:t}){let n=[...e],r=new Set(n);return{local:n,remote:t.filter(e=>!r.has(e))}}function P4({normalizedQuery:e,options:t}){return e.length===0?[...t]:t.filter(t=>t.toLowerCase().includes(e))}function F4({options:e,value:t}){if(!t)return[...e];let n=e.indexOf(t);return n<=0?[...e]:[e[n],...e.slice(0,n),...e.slice(n+1)]}function I4({isCreatingNew:e,value:t}){return e?`new`:t===null?`current`:`checkout`}function L4({value:e,options:t,remoteOptions:n=d4,currentBranch:i,loading:a=!1,disabled:o,placeholder:s,triggerLabel:c,triggerTitle:l,menuKind:u,currentOptionLabel:d,currentOptionTitle:f,onChange:p,onClear:m,onCreateBaseChange:h,onSearchQueryChange:g,optionsTruncated:_=!1,optionDisabledReason:v,optionDisabledTitle:y,createDisabledReason:b,createDisabledTitle:x,onCreate:S,isCreatingNew:C=!1,onOpenChange:w,className:T,variant:E=`default`,selectedOptionKind:D,muted:O,defaultOpen:ee=!1,modal:te=!0,popoverAlign:k=`start`}){let[A,j]=(0,B.useState)(ee),[ne,N]=(0,B.useState)(``),re=I4({isCreatingNew:C,value:e}),[ie,ae]=(0,B.useState)(re),P=(0,B.useDeferredValue)(ne),F=(0,B.useRef)(null),oe=P.trim().toLowerCase(),[se]=sY(oe,v4),I=M4(u),L=u===`checkout`,ce=L?ie:re,le=!L||ce!==`current`,ue=ce===`new`?`Branch from:`:`Checkout:`,de=!!v,fe=!!b,pe=L&&ce===`new`?fe:de,me=(0,B.useMemo)(()=>N4({options:t,remoteOptions:n}),[t,n]),he=(0,B.useMemo)(()=>P4({normalizedQuery:oe,options:me.local}),[me.local,oe]),ge=(0,B.useMemo)(()=>P4({normalizedQuery:oe,options:me.remote}),[me.remote,oe]),_e=(0,B.useMemo)(()=>F4({options:he,value:e}),[he,e]),ve=(0,B.useMemo)(()=>e?D||(me.remote.includes(e)&&!me.local.includes(e)?`remote`:`local`):`local`,[me.local,me.remote,D,e]),ye=(0,B.useMemo)(()=>F4({options:he,value:ve===`local`?e:null}),[he,ve,e]),be=(0,B.useMemo)(()=>F4({options:ge,value:ve===`remote`?e:null}),[ge,ve,e]),xe=(0,B.useMemo)(()=>[...ye,...be],[ye,be]),Se=L&&ce===`checkout`?_e:xe,Ce=Se[0],we=pe?void 0:e?Se.find(t=>t===e)??Ce:Ce,Te=a?`Loading branches...`:s??`Select branch`,Ee=c??(C?C4(e):e??Te),De=c===void 0&&(C||e!==null),Oe=!!S,ke=S4({title:x,reason:b,fallback:`New branches are unavailable right now.`}),Ae=S4({title:y??x,reason:v??b,fallback:I.optionsUnavailableFallback}),je=L&&ce===`new`?ke:Ae,Me=L&&ce===`new`?x:y??x,Ne=d!=null&&m?d:null,Pe=Ne!==null,Fe=me.local.length>0||me.remote.length>0,Ie=a||Oe||Fe||(de||fe)&&t.length+n.length>0,Le=le&&Fe&&!pe,Re=pe,ze=I.optionsSectionLabel===null&&Re?je:void 0,Be=I.optionsSectionLabel===null?Me:void 0,Ve=e=>{L&&ce===`new`?(h??p)(e):p(e),j(!1)},He=e=>{p(e),j(!1)};return(0,B.useEffect)(()=>{A&&L&&ae(re)},[L,A,re]),(0,B.useEffect)(()=>{if(!A){N(``),g?.(``);return}se===oe&&g?.(se)},[se,oe,g,A]),(0,B.useEffect)(()=>{if(!A||!Le)return;let e=window.requestAnimationFrame(()=>{F.current?.focus(),F.current?.select()});return()=>{window.cancelAnimationFrame(e)}},[A,Le]),(0,V.jsxs)(YZ,{modal:te,open:A,onOpenChange:e=>{j(e),w?.(e)},children:[(0,V.jsx)(XZ,{asChild:!0,disabled:o,children:(0,V.jsxs)(M,{type:`button`,variant:E===`default`?`outline`:`ghost`,size:`sm`,disabled:o,"aria-label":`Branch`,title:l??(C?w4(e):e?`Branch: ${e}`:Te),className:R(E===`default`&&`h-8 w-full min-w-0 justify-between rounded-md border-border bg-background px-2.5 text-sm font-normal shadow-none hover:bg-state-hover`,E===`minimal`&&`h-5 w-auto min-w-0 justify-between gap-1 rounded-sm px-0 text-xs font-normal shadow-none hover:bg-transparent data-[state=open]:bg-transparent data-[state=open]:hover:bg-transparent`,E===`minimal`&&O&&`text-muted-foreground hover:text-foreground`,E===`option`&&R(`h-8 w-fit max-w-full min-w-0 items-center gap-1 px-1 text-xs leading-tight`,`border-none bg-transparent shadow-none hover:bg-transparent data-[state=open]:bg-transparent data-[state=open]:hover:bg-transparent`),E===`option`&&O&&`text-muted-foreground hover:text-foreground`,T),role:`combobox`,"aria-expanded":A,children:[E===`option`?(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:`GitMerge`,className:Et}),(0,V.jsx)(E4,{label:Ee,emphasizePlainLabel:De,className:`truncate`})]}):(0,V.jsx)(E4,{label:Ee,emphasizePlainLabel:De,className:`truncate text-left`}),(0,V.jsx)(r,{name:`ChevronDown`,className:R(`shrink-0 text-muted-foreground`,E===`default`&&`size-4`,E===`minimal`&&`size-3`,E===`option`&&`size-3.5 max-md:pointer-coarse:size-5`)})]})}),(0,V.jsxs)(ZZ,{align:k,sideOffset:6,collisionPadding:16,mobileTitle:I.title??`Branch`,className:`flex flex-col overflow-hidden p-0 md:max-h-[calc(100vh-6rem)] md:w-[18rem] md:min-w-[min(var(--radix-popover-trigger-width),18rem)] md:max-w-[min(18rem,calc(100vw-2rem))]`,children:[Le?(0,V.jsx)(A4,{inputRef:F,query:ne,enterSelection:we,onEnterSelection:e=>{if(L&&ce===`checkout`){He(e);return}Ve(e)},onQueryChange:N}):null,(0,V.jsxs)(`div`,{className:`min-h-0 max-h-[60vh] overflow-y-auto overscroll-contain px-1 pb-1 pt-0 md:max-h-80`,onWheel:e=>{e.stopPropagation()},children:[I.title?(0,V.jsx)(D4,{label:I.title,subtitle:ze,subtitleTitle:Be,sticky:!L}):null,L?(0,V.jsxs)(V.Fragment,{children:[Ne!==null&&m?(0,V.jsx)(k4,{icon:`GitMerge`,label:Ne,title:f??Ne,selected:ce===`current`,onSelect:()=>{ae(`current`),m(),j(!1)}}):null,Oe&&S?(0,V.jsx)(k4,{icon:`Plus`,label:u4,title:x??u4,selected:ce===`new`,disabled:fe,onSelect:()=>{ae(`new`),S()}}):null,(0,V.jsx)(k4,{icon:`GitMerge`,label:`Checkout`,title:y??`Checkout an existing branch`,selected:ce===`checkout`,disabled:de,onSelect:()=>{ae(`checkout`)}}),le?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`my-1 h-px bg-border/60`}),(0,V.jsx)(D4,{label:ue,subtitle:Re?je:void 0,subtitleTitle:Me}),Re?null:(0,V.jsxs)(V.Fragment,{children:[ce===`checkout`?(0,V.jsxs)(V.Fragment,{children:[_e.length>0?_e.map(t=>(0,V.jsx)(k4,{icon:`GitMerge`,label:t,title:t,selected:t===e,onSelect:()=>He(t)},t)):null,_e.length===0?(0,V.jsx)(`p`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:a?`Loading branches...`:`No local branches found.`}):null]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(j4,{localOptions:ye,remoteOptions:be,selectedValue:e,onSelect:Ve}),xe.length===0?(0,V.jsx)(`p`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:a?`Loading branches...`:`No branches found.`}):null]}),_?(0,V.jsx)(`p`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`Search to narrow branch results.`}):null]})]}):null]}):(0,V.jsxs)(V.Fragment,{children:[Pe?(0,V.jsxs)(V.Fragment,{children:[Ne!==null&&I.currentSectionLabel?(0,V.jsx)(D4,{label:I.currentSectionLabel}):null,Ne!==null&&m?(0,V.jsx)(k4,{icon:`GitMerge`,label:Ne,title:f??Ne,selected:!C&&e===null,onSelect:()=>{m(),j(!1)}}):null]}):null,Ie?(0,V.jsxs)(V.Fragment,{children:[I.optionsSectionLabel?(0,V.jsxs)(V.Fragment,{children:[Pe?(0,V.jsx)(`div`,{className:`my-1 h-px bg-border/60`}):null,(0,V.jsx)(D4,{label:I.optionsSectionLabel,subtitle:Re?je:void 0,subtitleTitle:Me})]}):null,Re?null:(0,V.jsxs)(V.Fragment,{children:[Oe&&S?fe?(0,V.jsx)(O4,{icon:`Plus`,label:u4,description:ke,title:x}):(0,V.jsx)(k4,{icon:`Plus`,label:u4,title:x,selected:C,onSelect:()=>{S(),j(!1)}}):null,(0,V.jsx)(j4,{localOptions:ye,remoteOptions:be,selectedValue:e,onSelect:Ve}),xe.length===0&&!Oe?(0,V.jsx)(`p`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:a?`Loading branches...`:`No branches found.`}):null,_?(0,V.jsx)(`p`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`Search to narrow branch results.`}):null]})]}):Pe?null:(0,V.jsx)(`p`,{className:`px-2 py-6 text-center text-xs text-muted-foreground`,children:a?`Loading branches...`:`No branches found.`})]})]})]})]})}function R4({className:e}){return(0,V.jsx)(`span`,{className:R(`inline-block size-1.5 shrink-0 rounded-full bg-success`,e),"aria-label":`Online`})}function z4({className:e}){return(0,V.jsx)(Ii,{variant:`muted`,className:R(`shrink-0`,e),children:`offline`})}function B4({connected:e,className:t}){return e?(0,V.jsx)(R4,{className:t}):(0,V.jsx)(z4,{className:t})}function V4(e,t,n){let r=e.map(e=>{let r=e.status===`connected`,i=y(t,e.id)!==void 0;return{host:e,isLocal:n(e.id),hasSource:i,isConnected:r}});return r.sort((e,t)=>{let n=(e.isConnected?2:0)+ +!!e.hasSource;return(t.isConnected?2:0)+ +!!t.hasSource-n}),r}function H4({value:e,onChange:t,sources:n,hosts:i,isLocalHost:a,reuseDisabled:o,muted:s,defaultOpen:c,modal:l}){let u=(0,B.useMemo)(()=>V4(i,n,a),[i,n,a]),d=(0,B.useMemo)(()=>s0(e),[e]),f=(0,B.useMemo)(()=>{if(!d)return{modeLabel:`Environment`,icon:`Laptop`};if(d.type===`reuse`)return{modeLabel:`Reuse worktree`,icon:hQ(`managed-worktree`)};let e=i.find(e=>e.id===d.hostId),t=a(d.hostId),n=d.mode===`worktree`?`New worktree`:t?`Work locally`:`Work remotely`,r=hQ(d.mode===`worktree`?`managed-worktree`:`other`);return t?{modeLabel:n,icon:r}:{modeLabel:n,hostLabel:e?.name??`Unknown`,icon:r,hostConnected:e?.status===`connected`}},[d,i,a]);return(0,V.jsxs)(fn,{defaultOpen:c,modal:l,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Environment`,title:`Environment: ${f.modeLabel}${f.hostLabel?` · ${f.hostLabel}`:``}`,className:R(n2,r2,s&&`text-muted-foreground hover:text-foreground`),children:[(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:f.icon,className:Et}),(0,V.jsxs)(`span`,{className:`truncate`,children:[f.modeLabel,f.hostLabel?(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`· `,f.hostLabel]}):null]}),f.hostConnected===void 0?null:(0,V.jsx)(B4,{connected:f.hostConnected})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:R(`text-muted-foreground`,Dt)})]})}),(0,V.jsxs)(zn,{align:`start`,className:`min-w-52 max-w-80 divide-y [&>*+*]:pt-2 [&>*:not(:last-child)]:pb-2`,mobileTitle:`Environment`,children:[u.map(n=>(0,V.jsx)(W4,{section:n,enabled:n.isConnected&&n.hasSource,value:e,onChange:t},n.host.id)),(0,V.jsx)(U4,{isReuseSelected:d?.type===`reuse`,disabled:!!o,onChange:t})]})]})}function U4({isReuseSelected:e,disabled:t,onChange:n}){return(0,V.jsxs)(mn,{children:[(0,V.jsx)(Nn,{children:`Reuse`}),(0,V.jsxs)(gn,{disabled:t,onSelect:()=>{t||n(i0)},className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(r,{name:hQ(`managed-worktree`),className:R(`text-muted-foreground`,Et)}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,V.jsx)(`span`,{className:`truncate text-xs`,children:`Existing worktree`}),t?(0,V.jsx)(`span`,{className:`text-xs`,children:`No worktrees in this project yet`}):null]})]}),(0,V.jsx)(r,{name:`Check`,className:R(Ht,e?`opacity-100`:`opacity-0`)})]})]})}function W4({section:e,enabled:t,value:n,onChange:r}){let i=a0(e.host.id,`local`),a=a0(e.host.id,`worktree`);return(0,V.jsxs)(mn,{children:[(0,V.jsxs)(Nn,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:e.host.name}),e.isLocal?(0,V.jsx)(Bi,{}):null,e.isConnected?(0,V.jsx)(R4,{}):null]}),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(G4,{label:e.isLocal?`Work locally`:`Work remotely`,icon:hQ(`other`),itemValue:i,selectedValue:n,onSelect:r}),(0,V.jsx)(G4,{label:`New worktree`,icon:hQ(`managed-worktree`),itemValue:a,selectedValue:n,onSelect:r})]}):(0,V.jsx)(gn,{disabled:!0,className:`text-xs text-muted-foreground`,children:e.isConnected?`Host not configured for project`:`Host is offline`})]})}function G4({label:e,icon:t,itemValue:n,selectedValue:i,onSelect:a,disabled:o}){return(0,V.jsxs)(gn,{disabled:o,onSelect:()=>a(n),className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(r,{name:t,className:R(`text-muted-foreground`,Et)}),(0,V.jsx)(`span`,{className:`truncate text-xs`,children:e})]}),(0,V.jsx)(r,{name:`Check`,className:R(Ht,n===i?`opacity-100`:`opacity-0`)})]})}function K4({hosts:e,eligibleHosts:t,selectedHostId:n,onChange:i,isLocalHost:a,muted:o,defaultOpen:s,modal:c}){let l=e.find(e=>e.id===n),u=l?.name??`Select host`,d=Ni(l),f=t.length<=1;return(0,V.jsxs)(fn,{defaultOpen:s,modal:c,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Host`,title:`Host: ${u}`,className:R(n2,r2,o&&`text-muted-foreground hover:text-foreground`),children:[(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:d,className:`size-3.5 shrink-0`}),f?null:(0,V.jsx)(`span`,{className:`truncate`,children:u})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`})]})}),(0,V.jsxs)(zn,{align:`start`,className:`min-w-44 max-w-80`,mobileTitle:`Host`,children:[(0,V.jsx)(Nn,{children:`Host`}),t.length>0?t.map(e=>(0,V.jsxs)(gn,{onSelect:()=>i(e.id),className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-xs`,children:[(0,V.jsx)(r,{name:Ni(e),className:`size-3.5 shrink-0`}),(0,V.jsx)(`span`,{className:`truncate`,children:e.name}),a(e.id)?(0,V.jsx)(Bi,{}):null,(0,V.jsx)(B4,{connected:e.status===`connected`})]}),(0,V.jsx)(r,{name:`Check`,className:R(Wt,e.id===n?`opacity-100`:`opacity-0`)})]},e.id)):(0,V.jsx)(gn,{disabled:!0,className:`text-xs text-muted-foreground`,children:`No hosts available for this project`})]})]})}function q4({templates:e,value:t,onChange:n,defaultOpen:r,modal:i}){return(0,V.jsx)(u2,{label:`Template`,value:t,options:(0,B.useMemo)(()=>e.map(e=>({value:e.name,label:e.name,...e.isActive?{description:`Active default`}:{}})),[e]),onChange:n,defaultOpen:r,modal:i})}function J4({value:e,options:t,onChange:n,supported:r,className:i,muted:a=!0,defaultOpen:o,modal:s}){return!r||e===void 0||t.length<=1?null:(0,V.jsx)(u2,{label:`Permission mode`,value:e,options:t,onChange:n,className:i,contentClassName:`max-w-72`,muted:a,defaultOpen:o,modal:s,align:`end`})}function Y4({projects:e,value:t,onChange:n,allowNoProject:i=!1,createProject:a,className:o,defaultOpen:s,modal:c}){let l=t===null?null:e.find(e=>e.id===t),u=!i&&!l?e[0]:null,d=l?.name??u?.name??`Work in a project`,f=l||u?`Folder`:`FolderPlus`,p=e.length===0?a:void 0,m=p?.isCreating?`Creating...`:`New project`;return(0,V.jsxs)(fn,{defaultOpen:s,modal:c,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Project`,title:`Project: ${d}`,className:R(n2,r2,a2,o),children:[(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:f,className:`size-3.5 shrink-0`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`truncate`,children:d})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`,"aria-hidden":!0})]})}),(0,V.jsxs)(zn,{align:`start`,side:`bottom`,className:`w-52`,children:[(0,V.jsx)(Nn,{children:`Project`}),e.map(e=>(0,V.jsxs)(gn,{onSelect:()=>n(e.id),children:[(0,V.jsx)(r,{name:`Folder`,className:`size-4 text-muted-foreground`,"aria-hidden":!0}),e.name,(0,V.jsx)(r,{name:`Check`,className:R(`ml-auto size-4`,e.id===t?`opacity-100`:`opacity-0`),"aria-hidden":!0})]},e.id)),p?(0,V.jsxs)(gn,{disabled:p.disabled,onSelect:()=>p.onCreate(),children:[(0,V.jsx)(r,{name:`FolderPlus`,className:`size-4 text-muted-foreground`,"aria-hidden":!0}),m]}):null,i&&(e.length>0||p)?(0,V.jsx)(Dn,{}):null,i?(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(gn,{onSelect:()=>n(null),children:[(0,V.jsx)(r,{name:`FolderMinus`,className:`size-4 text-muted-foreground`,"aria-hidden":!0}),`Don't work in a project`,(0,V.jsx)(r,{name:`Check`,className:R(`ml-auto size-4`,t===null?`opacity-100`:`opacity-0`),"aria-hidden":!0})]})}):null]})]})}var X4=2;function Z4({options:e,value:t,onChange:n,muted:i,defaultOpen:a,modal:o}){let s=hQ(`managed-worktree`),c=(0,B.useMemo)(()=>e.find(e=>e.environmentId===t)??null,[e,t])?.branchName??`Pick a worktree`;return(0,V.jsxs)(fn,{defaultOpen:a,modal:o,children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Worktree`,title:`Worktree: ${c}`,className:R(n2,r2,i&&`text-muted-foreground hover:text-foreground`),children:[(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:s,className:Et}),(0,V.jsx)(`span`,{className:`truncate`,children:c})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:R(`text-muted-foreground`,Dt)})]})}),(0,V.jsxs)(zn,{align:`start`,className:`min-w-52 max-w-80`,mobileTitle:`Worktree`,children:[(0,V.jsx)(Nn,{children:`Reuse existing worktree`}),e.length===0?(0,V.jsx)(`div`,{className:`px-2 py-2 text-xs text-muted-foreground`,children:`No worktrees in this project yet.`}):e.map(e=>(0,V.jsx)(Q4,{option:e,isSelected:e.environmentId===t,onSelect:n},e.environmentId))]})]})}function Q4({option:e,isSelected:t,onSelect:n}){let i=e.threads.slice(0,X4),a=e.threads.length-i.length;return(0,V.jsxs)(gn,{onSelect:()=>n(e.environmentId),className:`flex flex-col items-stretch gap-1 py-2`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(r,{name:hQ(`managed-worktree`),className:R(`shrink-0 text-muted-foreground`,Et)}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,children:e.branchName??`Worktree`}),(0,V.jsx)(r,{name:`Check`,className:R(Ht,t?`opacity-100`:`opacity-0`)})]}),i.length>0?(0,V.jsxs)(`span`,{className:`flex flex-col gap-0.5 pl-6 text-xs text-muted-foreground`,children:[i.map(e=>(0,V.jsx)(`span`,{className:`truncate`,children:e.title},e.id)),a>0?(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[`+`,a,` more`]}):null]}):null]})}var $4=80;function e3({parsedEnvironment:e}){if(e?.type===`host`)return e.mode===`worktree`?`base`:`checkout`}function t3({mode:e,isProjectless:t}){return e===`manager`?t?`Optional — instructions for the manager: what to work on, or how you like things done.`:`Optional — instructions for the manager: what to work on, or how you like things done. @ to mention threads, files, or folders`:t?`Ask anything.`:`Ask anything. @ to mention files or folders`}var n3=(0,B.memo)(function({id:e,value:t,onChange:n,onSubmit:r,isSubmitting:i,disabled:a,zenModeStorageKey:o,history:s,mentions:c,attachments:l,modeConfig:u,onModeChange:d,project:f,execution:p}){let m=(0,B.useRef)(null),h=c4(m),g=f?.value===null||u.mode===`thread`&&u.projectlessHost!==void 0,_=t3({mode:u.mode,isProjectless:g});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`mb-2 flex items-center px-3.5`,children:(0,V.jsx)(s3,{value:u.mode,onChange:d})}),(0,V.jsx)(X2,{id:e,promptBoxRef:m,value:t,onChange:n,onSubmit:r,autoFocus:!0,history:s,mentions:c,mentionMenuPlacement:`bottom`,attachments:l,voice:h,submission:{isSubmitting:i,disabled:a,title:i?`Submitting...`:`Submit (Enter)`,allowEmptyInput:u.mode===`manager`},zenMode:{layout:`root-compose`,storageKey:o},minHeight:$4,placeholder:_,header:u.mode===`thread`?u.header:void 0,footerStart:(0,V.jsx)(m2,{...p})}),(0,V.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-2 px-3.5`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[f?(0,V.jsx)(Y4,{projects:f.projects,value:f.value,onChange:f.onChange,allowNoProject:f.allowNoProject??!1,createProject:f.createProject}):null,u.mode===`manager`?(0,V.jsx)(r3,{host:u.host,template:u.template}):(0,V.jsx)(a3,{environment:u.environment,branch:u.branch,worktree:u.worktree,projectlessHost:u.projectlessHost})]}),u.mode===`thread`?(0,V.jsx)(J4,{value:u.permission.value,options:u.permission.options,onChange:u.permission.onChange,supported:u.permission.supported}):null]})]})});function r3({host:e,template:t}){let n=(t?.templates.length??0)>=2;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(i3,{host:e}),n&&t?(0,V.jsx)(q4,{templates:t.templates,value:t.value,onChange:t.onChange}):null]})}function i3({host:e}){return e.eligibleHosts.length<2?null:(0,V.jsx)(K4,{muted:!0,hosts:[...e.hosts],eligibleHosts:[...e.eligibleHosts],selectedHostId:e.value,onChange:e.onChange,isLocalHost:e.isLocalHost})}function a3({environment:e,branch:t,worktree:n,projectlessHost:r}){let i=(0,B.useMemo)(()=>s0(e.value),[e.value]),a=e3({parsedEnvironment:i});if(r)return(0,V.jsx)(i3,{host:r});let o=i?.type===`host`,s=i?.type===`reuse`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H4,{value:e.value,onChange:e.onChange,sources:e.sources,hosts:e.hosts,isLocalHost:e.isLocalHost,reuseDisabled:e.reuseDisabled,muted:!0}),o?(0,V.jsx)(L4,{variant:`option`,muted:!0,value:t.value,currentBranch:t.currentBranch,isCreatingNew:t.isNew,options:t.options,remoteOptions:t.remoteOptions,optionsTruncated:t.optionsTruncated,loading:t.loading,placeholder:t.placeholder,triggerLabel:t.triggerLabel,triggerTitle:t.triggerTitle,menuKind:a,currentOptionLabel:t.currentOptionLabel,currentOptionTitle:t.currentOptionTitle,optionDisabledReason:t.optionDisabledReason,optionDisabledTitle:t.optionDisabledTitle,createDisabledReason:t.createDisabledReason,createDisabledTitle:t.createDisabledTitle,onChange:t.onChange,onClear:t.onClear,onOpenChange:t.onOpenChange,onSearchQueryChange:t.onSearchQueryChange,onCreateBaseChange:t.onCreateBaseChange,onCreate:t.onCreate}):null,s?(0,V.jsx)(Z4,{muted:!0,options:n.options,value:n.value,onChange:n.onChange}):null]})}var o3=[{value:`thread`,icon:`MessageSquarePlus`,label:`New thread`},{value:`manager`,icon:`UserRoundPlus`,label:`New manager`}];function s3({value:e,onChange:t}){let n=o3.find(t=>t.value===e),i=n?.icon??`MessageSquarePlus`,a=n?.label??`New thread`;return(0,V.jsxs)(fn,{children:[(0,V.jsx)(bn,{asChild:!0,children:(0,V.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":`Thread creation mode`,className:R(n2,r2,`text-sm font-medium text-foreground hover:text-foreground`),children:[(0,V.jsxs)(`span`,{className:i2,children:[(0,V.jsx)(r,{name:i,className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,V.jsx)(`span`,{className:`truncate`,children:a})]}),(0,V.jsx)(r,{name:`ChevronDown`,className:`size-3.5 text-muted-foreground`,"aria-hidden":!0})]})}),(0,V.jsx)(zn,{align:`start`,side:`bottom`,className:`w-44`,children:o3.map(n=>(0,V.jsxs)(gn,{onSelect:()=>t(n.value),children:[(0,V.jsx)(r,{name:n.icon,className:`size-4 text-muted-foreground`,"aria-hidden":!0}),n.label,(0,V.jsx)(r,{name:`Check`,className:R(`ml-auto size-4`,n.value===e?`opacity-100`:`opacity-0`),"aria-hidden":!0})]},n.value))})]})}function c3({modeConfig:e,...t}){return e.mode===`manager`?(0,V.jsx)(n3,{...t,modeConfig:{mode:`manager`,host:e.host,template:e.template}}):(0,V.jsx)(l3,{...t,threadConfig:e})}function l3({threadConfig:e,...t}){let{isLocalHost:n}=Sr(),{data:r=[]}=kn(),i=s0(e.environment.value),a=i?.type===`host`&&i.mode===`local`,o=(0,B.useMemo)(()=>({...e.environment,hosts:r,isLocalHost:n}),[e.environment,r,n]),s=(0,B.useMemo)(()=>{let t=e.branch;return{value:t.value,currentBranch:t.currentBranch,isNew:a&&t.isNew,options:t.options,remoteOptions:t.remoteOptions,optionsTruncated:t.optionsTruncated,loading:t.loading,placeholder:t.placeholder,triggerLabel:t.triggerLabel,triggerTitle:t.triggerTitle,currentOptionLabel:t.currentOptionLabel,currentOptionTitle:t.currentOptionTitle,optionDisabledReason:t.optionDisabledReason,optionDisabledTitle:t.optionDisabledTitle,createDisabledReason:t.createDisabledReason,createDisabledTitle:t.createDisabledTitle,onChange:t.onChange,onClear:t.onClear,onOpenChange:t.onOpenChange,onSearchQueryChange:t.onSearchQueryChange,onCreateBaseChange:t.onCreateBaseChange,...a?{onCreate:t.onCreate}:{}}},[a,e.branch]);return(0,V.jsx)(n3,{...t,modeConfig:{mode:`thread`,environment:o,branch:s,worktree:e.worktree,permission:e.permission,header:e.header,projectlessHost:e.projectlessHost}})}var u3=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,d3=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=u3[n[e]&63];return t};function f3(e){let t=[];for(let n of e){let e=E2(n.input);if(b2(e))continue;let r=t[t.length-1];r&&C2(r,e)||t.push(e)}return t}function p3(e,t){return ke({entries:[t,...e??[]],limit:50})}function m3(e){let t=0,n=0,r=0,i=[],a=[],o=[];for(let s of e)switch(s.type){case`text`:break;case`image`:t+=1,i.push(s.url);break;case`localImage`:n+=1,a.push(s.path);break;case`localFile`:r+=1,o.push(s.path);break}if(!(t===0&&n===0&&r===0))return{webImages:t,localImages:n,localFiles:r,...i.length>0?{imageUrls:i}:{},...a.length>0?{localImagePaths:a}:{},...o.length>0?{localFilePaths:o}:{}}}function h3({activeId:e,overId:t,queuedMessages:n}){let r=ji({activeId:e,items:n,overId:t});return r?{queuedMessageId:r.itemId,previousQueuedMessageId:r.previousItemId,nextQueuedMessageId:r.nextItemId}:null}function g3({queuedMessages:e,request:t}){return Mi({items:e,request:{itemId:t.queuedMessageId,previousItemId:t.previousQueuedMessageId,nextItemId:t.nextQueuedMessageId}})}function _3(e){return{id:`optimistic-prompt-history:${d3()}`,createdAt:e.createdAt,input:e.input}}function v3(e){return{id:`queued-message:${e.id}`,createdAt:e.createdAt,input:e.content}}function y3(e,t,n){e.setQueryData(Be(t),e=>p3(e,n))}function b3(e,t,n){e.setQueryData(s(t),e=>p3(e,n))}function x3(e){return e.environment.type===`host`&&e.environment.workspace.type===`unmanaged`&&e.environment.workspace.branch!==void 0}function S3(e){return ci(e,{queryKey:F()})}function C3(e,t){for(let{queryKey:n,data:r}of t)e.setQueryData(n,r)}function w3({queryClient:e,requestedAt:t,threadId:n}){oi(e,n,e=>({...e,stopRequestedAt:e.stopRequestedAt??t,updatedAt:Math.max(e.updatedAt,t)})),si(e,{queryKey:F(),mapper:e=>e.map(e=>e.id===n?{...e,stopRequestedAt:e.stopRequestedAt??t,updatedAt:Math.max(e.updatedAt,t)}:e)})}function T3(){let e=ot();return v({meta:{errorMessage:`Failed to create thread.`,lifecycleOperation:`create_thread`},mutationFn:e=>T(e),onMutate:async()=>{await e.cancelQueries({queryKey:F()})},onSuccess:(t,n)=>{e.setQueryData(le(t.id),t),$r(e,t),y3(e,n.projectId,_3({createdAt:t.createdAt,input:n.input})),mi({queryClient:e,projectId:n.projectId}),x3(n)&&e.invalidateQueries({queryKey:it(n.projectId)}),fi({queryClient:e})}})}function E3({mode:e,threadStatus:t}){return e===`steer`||e===`auto`&&t===`active`?`steer`:`message`}function D3({createdAt:e,input:t,mode:n,threadId:r,threadStatus:i}){let a=`optimistic-user-${d3()}`,o=t.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
1364
|
+
|
|
1365
|
+
`),s=m3(t);return{id:a,kind:`conversation`,role:`user`,threadId:r,turnId:null,sourceSeqStart:0,sourceSeqEnd:0,startedAt:e,createdAt:e,text:o,attachments:s?{webImages:s.webImages,localImages:s.localImages,localFiles:s.localFiles,imageUrls:s.imageUrls??[],localImagePaths:s.localImagePaths??[],localFilePaths:s.localFilePaths??[]}:null,initiator:`user`,senderThreadId:null,turnRequest:{kind:E3({mode:n,threadStatus:i}),status:`pending`}}}function O3(){let e=ot();return v({meta:{errorMessage:`Failed to send message.`,lifecycleOperation:`send_message`,showErrorToast:!1},mutationFn:({id:e,input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a,mode:o})=>w(e,{input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a,mode:o}),onMutate:async t=>{await Promise.all([e.cancelQueries({queryKey:le(t.id)}),e.cancelQueries({queryKey:k(t.id)})]);let n=e.getQueryData(le(t.id)),r=Date.now();oi(e,t.id,e=>({...e,status:`active`,updatedAt:Math.max(e.updatedAt,r),runtime:{...e.runtime,displayStatus:e.runtime.displayStatus===`host-reconnecting`||e.runtime.displayStatus===`waiting-for-host`?e.runtime.displayStatus:`active`}}));let i=D3({createdAt:r,input:t.input,mode:t.mode,threadId:t.id,threadStatus:n?.status??null});return gi(e,t.id,i),{previousThread:n,optimisticCreatedAt:r,optimisticRowId:i.id}},onError:(t,n,r)=>{r?.optimisticRowId&&hi(e,n.id,r.optimisticRowId),r?.previousThread&&e.setQueryData(le(n.id),r.previousThread)},onSuccess:(t,n,r)=>{b3(e,n.id,_3({createdAt:r?.optimisticCreatedAt??Date.now(),input:n.input})),(Rn.getConnectionState()===`connected`?yi:di)({queryClient:e,threadId:n.id})}})}function k3(){let e=ot();return v({meta:{errorMessage:`Failed to queue message.`,lifecycleOperation:`queue_message`,showErrorToast:!1},mutationFn:({id:e,input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a})=>_e(e,{input:t,model:n,serviceTier:r,reasoningLevel:i,permissionMode:a}),onSuccess:(t,n)=>{b3(e,n.id,v3(t)),vi({queryClient:e,threadId:n.id})}})}function A3(){let e=ot();return v({meta:{errorMessage:`Failed to send queued message.`,lifecycleOperation:`send_queued_message`,showErrorToast:!1},mutationFn:({id:e,mode:t,queuedMessageId:n})=>ge(e,n,{mode:t}),onSuccess:(t,n)=>{_i({queryClient:e,threadId:n.id})}})}function j3(){let e=ot();return v({meta:{errorMessage:`Failed to reorder queued message.`,lifecycleOperation:`reorder_queued_message`,showErrorToast:!1},mutationFn:({id:e,nextQueuedMessageId:t,previousQueuedMessageId:n,queuedMessageId:r})=>fe(e,r,{previousQueuedMessageId:n,nextQueuedMessageId:t}),onMutate:async t=>{let n=p(t.id);await e.cancelQueries({queryKey:n});let r=e.getQueryData(n);return e.setQueryData(n,e=>e&&g3({queuedMessages:e,request:t})),{previousQueuedMessages:r}},onError:(t,n,r)=>{r?.previousQueuedMessages!==void 0&&e.setQueryData(p(n.id),r.previousQueuedMessages),vi({queryClient:e,threadId:n.id})},onSuccess:(t,n)=>{e.setQueryData(p(n.id),t),vi({queryClient:e,threadId:n.id})}})}function M3(){let e=ot();return v({meta:{errorMessage:`Failed to delete queued message.`,showErrorToast:!1},mutationFn:({id:e,queuedMessageId:t})=>st(e,t),onSuccess:(t,n)=>{vi({queryClient:e,threadId:n.id})}})}function N3(){let e=ot();return v({meta:{errorMessage:`Failed to stop thread.`,lifecycleOperation:`stop_thread`},mutationFn:e=>ye(e),onMutate:async t=>{await Promise.all([e.cancelQueries({queryKey:le(t)}),e.cancelQueries({queryKey:F()})]);let n=e.getQueryData(le(t)),r=S3(e);return w3({queryClient:e,requestedAt:Date.now(),threadId:t}),{previousThread:n,previousThreadLists:r}},onError:(t,n,r)=>{r&&(e.setQueryData(le(n),r.previousThread),C3(e,r.previousThreadLists))},onSettled:(t,n,r)=>{pi({queryClient:e,threadId:r})}})}var P3=`bb.promptbox.contents`,F3=`3`,I3=250,L3=y2(),R3=new Map,z3=new Map,B3=new Set,V3=new Map,H3=!1;function U3(e){return encodeURIComponent(e.trim())}function W3(e){if(!e||typeof window>`u`)return L3;if(B3.has(e))return R3.get(e)?.draft??L3;let t=window.localStorage.getItem(e),n=R3.get(e);if(n&&n.rawValue===t)return n.draft;let r=x2(t);return R3.set(e,{rawValue:t,draft:r}),r}function G3(e){let t=z3.get(e);if(!(!t||t.size===0))for(let e of t)e()}function K3(e){let t=V3.get(e);t===void 0||typeof window>`u`||(window.clearTimeout(t),V3.delete(e))}function q3(e){if(typeof window>`u`)return;K3(e),B3.delete(e);let t=R3.get(e);if(!t||t.rawValue===null){window.localStorage.removeItem(e);return}window.localStorage.setItem(e,t.rawValue)}function J3(e){if(typeof window>`u`)return;K3(e),B3.add(e);let t=window.setTimeout(()=>{q3(e)},I3);V3.set(e,t)}function Y3(){for(let e of Array.from(B3))q3(e)}function X3(){H3||typeof window>`u`||(H3=!0,window.addEventListener(`storage`,e=>{e.key&&(B3.has(e.key)||(R3.delete(e.key),G3(e.key)))}),window.addEventListener(`pagehide`,Y3),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&Y3()}))}function Z3(e,t){if(!e)return()=>{};X3();let n=z3.get(e);return n||(n=new Set,z3.set(e,n)),n.add(t),()=>{let n=z3.get(e);n&&(n.delete(t),n.size===0&&z3.delete(e))}}function Q3(e,t,n={persist:`immediate`}){if(!e||typeof window>`u`)return;let r=S2(t);if(!r){R3.set(e,{rawValue:null,draft:L3}),n.persist===`deferred`?J3(e):q3(e),G3(e);return}R3.set(e,{rawValue:r,draft:t}),n.persist===`deferred`?J3(e):q3(e),G3(e)}function $3(e,t){return!e||typeof window>`u`||b2(t)||!b2(W3(e))?!1:(Q3(e,t),!0)}function e6({projectId:e,threadId:t}){if(!e)return null;let n=U3(e);return t?`${P3}-${n}-${U3(t)}-${F3}`:`${P3}-${n}-draft-${F3}`}function t6(e){let t=(0,B.useMemo)(()=>e6({projectId:e.projectId,threadId:e.threadId}),[e.projectId,e.threadId]),n=(0,B.useSyncExternalStore)((0,B.useCallback)(e=>Z3(t,e),[t]),(0,B.useCallback)(()=>W3(t),[t]),()=>L3),r=(0,B.useCallback)(e=>{Q3(t,e)},[t]),i=(0,B.useCallback)(()=>W3(t),[t]),a=(0,B.useCallback)(e=>{Q3(t,{...W3(t),text:e},{persist:`deferred`})},[t]),o=(0,B.useCallback)(e=>{let n=e.replace(/\s+/g,` `).trim();if(n.length===0)return;let r=W3(t),i=r.text.trimEnd(),a=i.length===0?n:`${i} ${n}`;Q3(t,{...r,text:a})},[t]),s=(0,B.useCallback)(e=>{let n=W3(t);n.attachments.some(t=>t.path===e.path)||Q3(t,{...n,attachments:[...n.attachments,e]})},[t]),c=(0,B.useCallback)(e=>{let n=W3(t),r=n.attachments.filter(t=>t.path!==e);r.length!==n.attachments.length&&Q3(t,{...n,attachments:r})},[t]),l=(0,B.useCallback)(()=>{r(L3)},[r]),u=(0,B.useCallback)(e=>C2(W3(t),e)?(r(L3),!0):!1,[r,t]),d=(0,B.useCallback)(e=>{Q3(t,{...W3(t),attachments:e})},[t]),f=(0,B.useCallback)(e=>{$3(t,e)},[t]);return(0,B.useMemo)(()=>({storageKey:t,getCurrent:i,value:n.text,text:n.text,attachments:n.attachments,setDraft:r,setValue:a,setText:a,setAttachments:d,appendText:o,addAttachment:s,removeAttachment:c,clear:l,clearIfCurrentMatches:u,restoreIfEmpty:f}),[s,o,l,u,n.attachments,n.text,i,c,f,d,r,a,t])}function n6(e){return e.endsWith(`/`)?e:`${e}/`}function r6(e){let t=e.entryKind===`directory`?n6(e.path):e.path;return e.source===`thread-storage`?`thread-storage:${t}`:t}function i6(e){return e.paths.map(e=>({kind:`path`,source:e.source,entryKind:e.entryKind,path:e.path,name:e.name,replacement:r6(e)}))}var a6={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t`,383:`s`,384:`b`,385:`B`,387:`b`,390:`O`,392:`c`,393:`D`,394:`D`,396:`d`,398:`E`,400:`E`,402:`f`,403:`G`,407:`I`,409:`k`,410:`l`,412:`M`,413:`N`,414:`n`,415:`O`,421:`p`,427:`t`,429:`t`,430:`T`,434:`V`,436:`y`,438:`z`,477:`e`,485:`g`,544:`N`,545:`d`,549:`z`,564:`l`,565:`n`,566:`t`,567:`j`,570:`A`,571:`C`,572:`c`,573:`L`,574:`T`,575:`s`,576:`z`,579:`B`,580:`U`,581:`V`,582:`E`,583:`e`,584:`J`,585:`j`,586:`Q`,587:`q`,588:`R`,589:`r`,590:`Y`,591:`y`,592:`a`,593:`a`,595:`b`,596:`o`,597:`c`,598:`d`,599:`d`,600:`e`,603:`e`,604:`e`,605:`e`,606:`e`,607:`j`,608:`g`,609:`g`,610:`G`,613:`h`,614:`h`,616:`i`,618:`I`,619:`l`,620:`l`,621:`l`,623:`m`,624:`m`,625:`m`,626:`n`,627:`n`,628:`N`,629:`o`,633:`r`,634:`r`,635:`r`,636:`r`,637:`r`,638:`r`,639:`r`,640:`R`,641:`R`,642:`s`,647:`t`,648:`t`,649:`u`,651:`v`,652:`v`,653:`w`,654:`y`,655:`Y`,656:`z`,657:`z`,663:`c`,665:`B`,666:`e`,667:`G`,668:`H`,669:`j`,670:`k`,671:`L`,672:`q`,686:`h`,867:`a`,868:`e`,869:`i`,870:`o`,871:`u`,872:`c`,873:`d`,874:`h`,875:`m`,876:`r`,877:`t`,878:`v`,879:`x`,7424:`A`,7427:`B`,7428:`C`,7429:`D`,7431:`E`,7432:`e`,7433:`i`,7434:`J`,7435:`K`,7436:`L`,7437:`M`,7438:`N`,7439:`O`,7440:`O`,7441:`o`,7442:`o`,7443:`o`,7446:`o`,7447:`o`,7448:`P`,7449:`R`,7450:`R`,7451:`T`,7452:`U`,7453:`u`,7454:`u`,7455:`m`,7456:`V`,7457:`W`,7458:`Z`,7522:`i`,7523:`r`,7524:`u`,7525:`v`,7834:`a`,7835:`s`,8305:`i`,8341:`h`,8342:`k`,8343:`l`,8344:`m`,8345:`n`,8346:`p`,8347:`s`,8348:`t`,8580:`c`};for(let e=`̀`.codePointAt(0);e<=`ͯ`.codePointAt(0);++e){let t=String.fromCodePoint(e);for(let e of`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`){let n=(e+t).normalize().codePointAt(0);n>126&&(a6[n]=e)}}var o6={a:[7844,7863],e:[7870,7879],o:[7888,7907],u:[7912,7921]};for(let e of Object.keys(o6)){let t=e.toUpperCase();for(let n=o6[e][0];n<=o6[e][1];++n)a6[n]=n%2==0?t:e}function s6(e){if(e<192||e>8580)return e;let t=a6[e];return t===void 0?e:t.codePointAt(0)}function c6(e){return e}function l6(e){return e}function u6(e,t){return e>t?e:t}var d6=e=>e.split(``).map(e=>e.codePointAt(0)),f6=new Set(` \f
|
|
1366
|
+
\r \v\xA0 \u2028\u2029 `.split(``).map(e=>e.codePointAt(0)));for(let e=` `.codePointAt(0);e<=` `.codePointAt(0);e++)f6.add(e);var p6=``.codePointAt(0),m6=`A`.codePointAt(0),h6=`Z`.codePointAt(0),g6=`a`.codePointAt(0),_6=`z`.codePointAt(0),v6=`0`.codePointAt(0),y6=`9`.codePointAt(0);function b6(e,t,n){return n?e:t-e-1}var x6=16,S6=-3,C6=-1,w6=x6/2,T6=x6/2,E6=w6+C6,D6=-(S6+C6),O6=2;function k6(e){return e?new Set:null}function A6(e,t,n){if(t!==null&&t.i16.length>e+n){let r=t.i16.subarray(e,e+n);return[e+n,r]}return[e,new Int16Array(n)]}function j6(e,t,n){if(t!==null&&t.i32.length>e+n){let r=t.i32.subarray(e,e+n);return[e+n,r]}return[e,new Int32Array(n)]}function M6(e){return e>=g6&&e<=_6?1:e>=m6&&e<=h6?2:e>=v6&&e<=y6?4:0}function N6(e){let t=String.fromCodePoint(e);return t===t.toUpperCase()?t===t.toLowerCase()?t.match(/\p{Number}/gu)===null?t.match(/\p{Letter}/gu)===null?0:3:4:2:1}function P6(e){return e<=p6?M6(e):N6(e)}function F6(e,t){return e===0&&t!==0?w6:e===1&&t===2||e!==4&&t===4?E6:t===0?T6:0}function I6(e,t){return t===0?w6:F6(P6(e[t-1]),P6(e[t]))}function L6(e,t,n,r){let i=e.slice(r),a=i.indexOf(n);if(a===0)return r;if(!t&&n>=g6&&n<=_6){a>0&&(i=i.slice(0,a));let e=i.indexOf(n-32);e>=0&&(a=e)}return a<0?-1:r+a}function R6(e){for(let t of e)if(t>=128)return!1;return!0}function z6(e,t,n){if(!R6(e))return 0;if(!R6(t))return-1;let r=0,i=0;for(let a=0;a<t.length;a++){if(i=L6(e,n,t[a],i),i<0)return-1;a===0&&i>0&&(r=i-1),i++}return r}var B6=(e,t,n,r,i,a,o)=>{let s=i.length;if(s===0)return[{start:0,end:0,score:0},k6(a)];let c=r.length;if(o!==null&&c*s>o.i16.length)return H6(e,t,n,r,i,a);let l=z6(r,i,e);if(l<0)return[{start:-1,end:-1,score:0},null];let u=0,d=0,f=null,p=null,m=null,h=null;[u,f]=A6(u,o,c),[u,p]=A6(u,o,c),[u,m]=A6(u,o,c),[d,h]=j6(d,o,s);let[,g]=j6(d,o,c);for(let e=0;e<g.length;e++)g[e]=r[e];let _=c6(0),v=0,y=0,b=0,x=i[0],S=i[0],C=c6(0),w=0,T=!1,E=g.subarray(l),D=f.subarray(l).subarray(0,E.length),O=p.subarray(l).subarray(0,E.length),ee=m.subarray(l).subarray(0,E.length);for(let[r,a]of E.entries()){let o=null;a<=p6?(o=M6(a),!e&&o===2&&(a+=32)):(o=N6(a),!e&&o===2&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)),t&&(a=s6(a))),E[r]=a;let c=F6(w,o);if(ee[r]=c,w=o,a===S&&(y<s&&(h[y]=l6(l+r),y++,S=i[Math.min(y,s-1)]),b=l+r),a===x){let e=x6+c*O6;if(D[r]=e,O[r]=1,s===1&&(n&&e>_||!n&&e>=_)&&(_=e,v=l+r,n&&c===w6))break;T=!1}else T?D[r]=u6(C+C6,0):D[r]=u6(C+S6,0),O[r]=0,T=!0;C=D[r]}if(y!==s)return[{start:-1,end:-1,score:0},null];if(s===1){let e={start:v,end:v+1,score:_};if(!a)return[e,null];let t=new Set;return t.add(v),[e,t]}let te=h[0],k=b-te+1,A=null;[u,A]=A6(u,o,k*s);{let e=f.subarray(te,b+1);for(let[t,n]of e.entries())A[t]=n}let[,j]=A6(u,o,k*s);{let e=p.subarray(te,b+1);for(let[t,n]of e.entries())j[t]=n}let M=h.subarray(1),ne=i.slice(1).slice(0,M.length);for(let[e,t]of M.entries()){let r=!1,i=ne[e],a=e+1,o=a*k,c=g.subarray(t,b+1),l=m.subarray(t).subarray(0,c.length),u=j.subarray(o+t-te).subarray(0,c.length),d=j.subarray(o+t-te-1-k).subarray(0,c.length),f=A.subarray(o+t-te).subarray(0,c.length),p=A.subarray(o+t-te-1-k).subarray(0,c.length),h=A.subarray(o+t-te-1).subarray(0,c.length);h[0]=0;for(let[e,o]of c.entries()){let c=e+t,g=0,y=0,b=0;if(y=r?h[e]+C6:h[e]+S6,i===o){g=p[e]+x6;let t=l[e];b=d[e]+1,t===w6?b=1:b>1&&(t=u6(t,u6(D6,m[c-b+1]))),g+t<y?(g+=l[e],b=0):g+=t}u[e]=b,r=g<y;let x=u6(u6(g,y),0);a===s-1&&(n&&x>_||!n&&x>=_)&&(_=x,v=c),f[e]=x}}let N=k6(a),re=te;if(a&&N!==null){let e=s-1;re=v;let t=!0;for(;;){let n=e*k,r=re-te,i=A[n+r],a=0,o=0;if(e>0&&re>=h[e]&&(a=A[n-k+r-1]),re>h[e]&&(o=A[n+r-1]),i>a&&(i>o||i===o&&t)){if(N.add(re),e===0)break;e--}t=j[n+r]>1||n+k+r+1<j.length&&j[n+k+r+1]>0,re--}}return[{start:re,end:v+1,score:_},N]};function V6(e,t,n,r,i,a,o){let s=0,c=0,l=!1,u=0,d=c6(0),f=k6(o),p=0;i>0&&(p=P6(n[i-1]));for(let m=i;m<a;m++){let i=n[m],a=P6(i);if(e||(i>=m6&&i<=h6?i+=32:i>p6&&(i=String.fromCodePoint(i).toLowerCase().codePointAt(0))),t&&(i=s6(i)),i===r[s]){o&&f!==null&&f.add(m),c+=x6;let e=F6(p,a);u===0?d=e:(e===w6&&(d=e),e=u6(u6(e,d),D6)),s===0?c+=e*O6:c+=e,l=!1,u++,s++}else l?c+=C6:c+=S6,l=!0,u=0,d=0;p=a}return[c,f]}var H6=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];if(z6(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let s=0,c=-1,l=-1,u=r.length,d=i.length;for(let a=0;a<u;a++){let o=r[b6(a,u,n)];e||(o>=m6&&o<=h6?o+=32:o>p6&&(o=String.fromCodePoint(o).toLowerCase().codePointAt(0))),t&&(o=s6(o));let f=i[b6(s,d,n)];if(o===f&&(c<0&&(c=a),s++,s===d)){l=a+1;break}}if(c>=0&&l>=0){s--;for(let t=l-1;t>=c;t--){let a=r[b6(t,u,n)];e||(a>=m6&&a<=h6?a+=32:a>p6&&(a=String.fromCodePoint(a).toLowerCase().codePointAt(0)));let o=i[b6(s,d,n)];if(a===o&&(s--,s<0)){c=t;break}}if(!n){let e=c;c=u-l,l=u-e}let[o,f]=V6(e,t,r,i,c,l,a);return[{start:c,end:l,score:o},f]}return[{start:-1,end:-1,score:0},null]},U6=(e,t,n,r,i,a,o)=>{if(i.length===0)return[{start:0,end:0,score:0},null];let s=r.length,c=i.length;if(s<c||z6(r,i,e)<0)return[{start:-1,end:-1,score:0},null];let l=0,u=-1,d=c6(0),f=c6(-1);for(let a=0;a<s;a++){let o=b6(a,s,n),p=r[o];e||(p>=m6&&p<=h6?p+=32:p>p6&&(p=String.fromCodePoint(p).toLowerCase().codePointAt(0))),t&&(p=s6(p));let m=b6(l,c,n);if(i[m]===p){if(m===0&&(d=I6(r,o)),l++,l===c){if(d>f&&(u=a,f=d),d===w6)break;a-=l-1,l=0,d=0}}else a-=l,l=0,d=0}if(u>=0){let a=0,o=0;n?(a=u-c+1,o=u+1):(a=s-(u+1),o=s-(u-c+1));let[l]=V6(e,t,r,i,a,o,!1);return[{start:a,end:o,score:l},null]}return[{start:-1,end:-1,score:0},null]},W6=100*1024,G6=2048;function K6(e,t){return{i16:new Int16Array(e),i32:new Int32Array(t)}}var q6=K6(W6,G6),J6=(e,t,n)=>{let r=!1;switch(t){case`smart-case`:e.toLowerCase()!==e&&(r=!0);break;case`case-sensitive`:r=!0;break;case`case-insensitive`:e=e.toLowerCase(),r=!1;break}let i=d6(e);return n&&(i=i.map(s6)),{queryRunes:i,caseSensitive:r}};function Y6(e,t){let n=Object.keys(e).map(e=>parseInt(e,10)).sort((e,t)=>t-e),r=[];for(let i of n)if(r=r.concat(e[i]),r.length>=t)break;return r}function X6(e,t,n){return r=>{let i=this.runesList[r];if(t.length>i.length)return;let[a,o]=this.algoFn(n,this.opts.normalize,this.opts.forward,i,t,!0,q6);if(a.start===-1)return;if(this.opts.fuzzy===!1){o=new Set;for(let e=a.start;e<a.end;++e)o.add(e)}let s=this.opts.sort?a.score:0;e[s]===void 0&&(e[s]=[]),e[s].push({item:this.items[r],...a,positions:o??new Set})}}function Z6(e){let{queryRunes:t,caseSensitive:n}=J6(e,this.opts.casing,this.opts.normalize),r={},i=X6.bind(this)(r,t,n);for(let e=0,t=this.runesList.length;e<t;++e)i(e);return Y6(r,this.opts.limit)}var Q6={limit:1/0,selector:e=>e,casing:`smart-case`,normalize:!0,fuzzy:`v2`,tiebreakers:[],sort:!0,forward:!0},$6=class{constructor(e,...t){switch(this.opts={...Q6,...t[0]},this.items=e,this.runesList=e.map(e=>d6(this.opts.selector(e).normalize())),this.algoFn=U6,this.opts.fuzzy){case`v2`:this.algoFn=B6;break;case`v1`:this.algoFn=H6;break}}},e8={...Q6,match:Z6},t8=class extends $6{constructor(e,...t){super(e,...t),this.opts={...e8,...t[0]}}find(e){return e.length===0||this.items.length===0?this.items.slice(0,this.opts.limit).map(n8):(e=e.normalize(),r8(this.opts.match.bind(this)(e),this.opts))}};({...Q6});var n8=e=>({item:e,start:-1,end:-1,score:0,positions:new Set});function r8(e,t){if(t.sort){let{selector:n}=t;e.sort((e,r)=>{if(e.score===r.score)for(let i of t.tiebreakers){let t=i(e,r,n);if(t!==0)return t}return 0})}return Number.isFinite(t.limit)&&e.splice(t.limit),e}var i8=class{constructor(e,...t){this.finder=new t8(e,...t),this.find=this.finder.find.bind(this.finder)}},a8={exact:2e4,prefix:15e3,contains:1e4,subsequence:5e3};function o8(e,t){return e.start-t.start}function s8(e,t,n){return n(e.item).length-n(t.item).length}function c8(e,t){return e===e.toLowerCase()?{query:e,value:t.toLowerCase()}:{query:e,value:t}}function l8(e,t){let n=0;for(let r of t)if(r===e[n]&&(n+=1),n===e.length)return!0;return e.length===0}function u8(e,t){let n=c8(t,e);return n.value===n.query?a8.exact:n.value.startsWith(n.query)?a8.prefix:n.value.includes(n.query)?a8.contains:l8(n.query,n.value)?a8.subsequence:0}function d8(e,t){let n=t(e);return typeof n==`string`?n.length>0?[n]:[]:n.filter(e=>e.length>0)}function f8(e,t){let n=[],r=0;for(let i of e){let e=d8(i,t),a=0;for(let t of e)n.push({item:i,itemIndex:r,text:t,textIndex:a}),a+=1;r+=1}return n}function p8(e,t){return e.score===t.score?e.start===t.start?e.textIndex===t.textIndex?e.text.length===t.text.length?e.text<t.text?-1:e.text>t.text?1:e.itemIndex-t.itemIndex:e.text.length-t.text.length:e.textIndex-t.textIndex:e.start-t.start:t.score-e.score}function m8(e,t){return new i8(e,{selector:e=>e.text,casing:`smart-case`,forward:!0,tiebreakers:[o8,s8]}).find(t).map(e=>({item:e.item.item,itemIndex:e.item.itemIndex,text:e.item.text,textIndex:e.item.textIndex,positions:[...e.positions].sort((e,t)=>e-t),score:e.score+u8(e.item.text,t),start:e.start})).sort(p8)}function h8(e){let t=new Map;for(let n of e){let e=t.get(n.itemIndex);(!e||p8(n,e)<0)&&t.set(n.itemIndex,n)}return[...t.values()].sort(p8)}function g8(e,t){return e.slice(0,t).map(e=>({item:e.item,score:e.score,positions:e.positions}))}function _8(e){return e.limit<=0?[]:e.query?e.query.length>256?[]:g8(h8(m8(f8(e.items,e.getText),e.query)),e.limit):e.items.slice(0,e.limit).map(e=>({item:e,score:0,positions:[]}))}function v8(e){return e===`none`?`threads`:e}function y8(e){return e.title?.trim()||e.titleFallback?.trim()||void 0}function b8(e){let t=y8(e);return t?[t,e.id]:[e.id]}function x8(e,t){return e.id===t.currentThreadId?!1:t.mode===`managers`?e.type===`manager`:!0}function S8(e){return{kind:`thread`,path:`thread:${e.id}`,replacement:`thread:${e.id}`,threadId:e.id,title:y8(e),threadType:e.type}}function C8(e,t){if(e.score!==t.score)return t.score-e.score;if(e.suggestion.threadType!==t.suggestion.threadType)return e.suggestion.threadType===`manager`?-1:1;let n=e.suggestion.title??``,r=t.suggestion.title??``;return n.localeCompare(r)||e.suggestion.threadId.localeCompare(t.suggestion.threadId)}function w8(e){let t=e.query.trim();if(e.mode===`none`||t.length===0||e.limit<=0)return[];let n=e.threads.filter(t=>x8(t,e));return _8({items:n,query:t,getText:b8,limit:n.length}).map(e=>({suggestion:S8(e.item),score:e.score})).sort(C8).slice(0,e.limit).map(e=>e.suggestion)}var T8=8,E8=2;function D8(e){return e===`workspace`?0:1}function O8(e,t){return e.score===t.score?e.sourceRank===t.sourceRank?e.entryKind===t.entryKind?e.path.localeCompare(t.path):e.entryKind===`directory`?-1:1:e.sourceRank-t.sourceRank:t.score-e.score}function k8(e){return{source:e.source,entryKind:e.entryKind,path:e.path,name:e.name,score:e.score,positions:e.positions}}function A8(e){let t=e.limit??T8,n=t*E8,[r]=sY(e.query,120),i=e.query===null?null:r,a=e.query?.trim()??``,o=a.length>0,s=i?.trim()??``,c=o&&a!==s,l=e.currentThreadType===`manager`&&!!e.currentThreadId,u=(0,B.useMemo)(()=>({limit:n,query:i,includeFiles:!0,includeDirectories:e.includeDirectories}),[e.includeDirectories,i,n]),d=Wi({projectId:e.projectId,query:i,limit:n,environmentId:e.environmentId,includeFiles:!0,includeDirectories:e.includeDirectories}),f=tr(e.currentThreadId??``,u,{enabled:l&&s.length>0}),p=(0,B.useMemo)(()=>{if(!o)return[];let e=[];for(let t of d.data?.paths??[])e.push({source:`workspace`,sourceRank:D8(`workspace`),entryKind:t.kind,path:t.path,name:t.name,score:t.score,positions:t.positions});for(let t of f.data?.paths??[])e.push({source:`thread-storage`,sourceRank:D8(`thread-storage`),entryKind:t.kind,path:t.path,name:t.name,score:t.score,positions:t.positions});return e.sort(O8).slice(0,t).map(k8)},[o,t,f.data?.paths,d.data?.paths]),m=d.isFetching||l&&f.isFetching,h=d.isPending||l&&f.isPending;return{suggestions:p,isLoading:o&&p.length===0&&(c||h||m),isError:o&&(d.isError||l&&f.isError),isDebouncing:c}}var j8=8,M8={},N8={type:`manager`};function P8(e,t){let[n,r]=(0,B.useState)(null),i=A8({projectId:e,query:n,limit:j8,environmentId:t.environmentId,currentThreadId:t.currentThreadId,currentThreadType:t.currentThreadType,includeDirectories:!0}),a=t.threadSuggestionMode??`none`,o=v8(a),s=ar({enabled:a!==`none`,filters:a===`managers`?N8:M8,projectId:e}),c=(n?.trim().length??0)>0,l=n?.trim()??``,u=t.currentThreadId,d=(0,B.useMemo)(()=>i6({paths:i.suggestions}),[i.suggestions]),f=(0,B.useMemo)(()=>w8({threads:s.data??[],query:l,mode:a,currentThreadId:u,limit:j8}),[u,a,s.data,l]),p=(0,B.useMemo)(()=>c?[...f,...d].slice(0,j8):[],[c,d,f]);return{query:n,setQuery:r,suggestions:p,threadSectionMode:o,isLoading:c&&p.length===0&&(i.isDebouncing||i.isLoading),isError:i.isError}}function F8(e){switch(e.kind){case`merge`:return`Merge`;case`rebase`:return`Rebase`;case`cherry-pick`:return`Cherry-pick`;case`revert`:return`Revert`;case`unknown`:return`Operation`;case`none`:return``}}function I8(e){return e?.kind===`branch`?e.branchName:null}function L8(e){return e.kind!==`none`&&e.hasConflicts}function R8(e){switch(e?.kind){case`branch`:return`Current: ${e.branchName}`;case`detached`:return`Current (detached)`;case`unborn`:return`Current (empty repo)`;case`unknown`:return`Unknown checkout`;case void 0:return`Checking checkout`}}function z8(e){switch(e?.kind){case`branch`:return`Current (${e.branchName})`;case`detached`:return`Current (detached)`;case`unborn`:return`Current (empty repo)`;case`unknown`:case void 0:return R8(e)}}function B8(e){return e??`default`}function V8(e){return`Branch from: ${e??`default`}`}function H8(e){return`New branch from: ${e}`}function U8(e){return`Checkout: ${e}`}function W8(e){return`Checkout branch: ${e}`}function G8(e){if(e.kind===`none`)return null;let t=F8(e);return L8(e)?{label:`Conflicts`,title:`Checkout blocked by unresolved conflicts`}:{label:t,title:`Checkout blocked by an in-progress ${t.toLowerCase()}`}}function K8(e){if(e.mode!==`local`)return null;if(e.isLoading||e.isFetching&&!e.checkout)return{label:`Checking`,title:`Checking checkout state`};if(!e.checkout)return{label:`Unknown`,title:`Checkout state is unavailable`};let t=G8(e.checkout.operation);if(t)return t;if(e.checkout.hasUncommittedChanges)return{label:`Dirty`,title:`Checkout blocked by uncommitted changes`};switch(e.checkout.checkout.kind){case`branch`:return null;case`detached`:return{label:`Detached`,title:`Checkout blocked while HEAD is detached`};case`unborn`:return{label:`Empty repo`,title:`Checkout blocked before the first commit`};case`unknown`:return{label:`Unknown`,title:`Checkout state is unavailable`}}}function q8(e){let t=e.checkout?.defaultBranch,n=B8(t),r=V8(t);return e.selectedBranch?{currentBranch:t??null,currentOptionLabel:n,mutationBlocker:null,placeholder:`Branch from: default`,triggerLabel:`Branch from: ${e.selectedBranch.name}`,triggerTitle:`Branch from: ${e.selectedBranch.name}`}:{currentBranch:t??null,currentOptionLabel:n,mutationBlocker:null,placeholder:`Branch from: default`,triggerLabel:r,triggerTitle:r}}function J8(e){if(e.mode===`worktree`)return q8(e);if(e.mode!==`local`)return{currentBranch:null,currentOptionLabel:null,mutationBlocker:null,placeholder:`Select branch`,triggerLabel:`Select branch`,triggerTitle:`Select branch`};let t=K8(e),n=I8(e.checkout?.checkout),r=R8(e.checkout?.checkout);return e.selectedBranch?.isNew?{currentBranch:n,currentOptionLabel:r,mutationBlocker:t,placeholder:`Current checkout`,triggerLabel:H8(e.selectedBranch.name),triggerTitle:t?.title??`Create a new branch from ${e.selectedBranch.name}`}:e.selectedBranch?{currentBranch:n,currentOptionLabel:r,mutationBlocker:t,placeholder:`Current checkout`,triggerLabel:U8(e.selectedBranch.name),triggerTitle:t?.title??W8(e.selectedBranch.name)}:{currentBranch:n,currentOptionLabel:r,mutationBlocker:t,placeholder:`Current checkout`,triggerLabel:z8(e.checkout?.checkout),triggerTitle:r}}function Y8(e){return e.selectedBranch?{kind:`named`,name:e.selectedBranch.name}:{kind:`default`}}function X8(e){if(!e.projectId)return null;let t=s0(e.environmentValue);return t?t.type===`reuse`?t.environmentId===null?null:{type:`reuse`,environmentId:t.environmentId}:t.type===`host`?e.projectId===`proj_personal`?{type:`host`,hostId:t.hostId,workspace:{type:`personal`}}:t.mode===`worktree`?{type:`host`,hostId:t.hostId,workspace:{type:`managed-worktree`,baseBranch:Y8(e)}}:e.selectedBranch?.isNew?{type:`host`,hostId:t.hostId,workspace:{type:`unmanaged`,path:null,branch:{kind:`new`,baseBranch:e.selectedBranch.name}}}:{type:`host`,hostId:t.hostId,workspace:{type:`unmanaged`,path:null,...e.selectedBranch?{branch:{kind:`existing`,name:e.selectedBranch.name}}:{}}}:null:null}function Z8(e){return!e.projectId||!e.environmentValue?null:{environmentValue:e.environmentValue,projectId:e.projectId}}function Q8(e,t){return e!==void 0&&t!==null&&e.projectId===t.projectId&&e.environmentValue===t.environmentValue}function $8(e){let[t,n]=(0,B.useState)(null),r=(0,B.useMemo)(()=>Z8({environmentValue:e.environmentValue,projectId:e.projectId}),[e.environmentValue,e.projectId]),i=t!==null&&Q8(t.scope,r)?t.branch:null,a=(0,B.useCallback)(e=>{r&&n({scope:r,branch:{name:e,isNew:!1}})},[r]),o=(0,B.useCallback)(e=>{r&&n(t=>{let n=(Q8(t?.scope,r)?t?.branch:null)?.name??e;return n?{scope:r,branch:{name:n,isNew:!0}}:Q8(t?.scope,r)?null:t})},[r]),s=(0,B.useCallback)(e=>{r&&n({scope:r,branch:{name:e,isNew:!0}})},[r]);return{onBranchChange:a,onClearBranch:(0,B.useCallback)(()=>{r&&n(e=>Q8(e?.scope,r)?null:e)},[r]),onCreateBranch:o,onCreateBranchFrom:s,selectedBranch:i}}var e5=`bb.promptbox.zen-mode.root-compose`,t5=`pt-2`;function n5(e){if(!e||typeof e!=`object`)return null;let t=e.reuseEnvironmentId;return typeof t==`string`&&t.length>0?t:null}function r5(e){if(!e||typeof e!=`object`)return null;let t=e.mode;return t===`manager`||t===`thread`?t:null}function i5(e){return e.environmentId===null?!1:e.environmentWorkspaceDisplayKind===`managed-worktree`||e.environmentWorkspaceDisplayKind===`unmanaged-worktree`}function a5(e){let t=new Map,n=new Map;for(let r of e){if(!i5(r)||r.environmentId===null)continue;let e=t.get(r.environmentId);e||(e=[],t.set(r.environmentId,e),n.set(r.environmentId,r.environmentBranchName)),e.push(r)}let r=[];for(let[e,i]of t)i.sort((e,t)=>t.latestAttentionAt-e.latestAttentionAt),r.push({environmentId:e,branchName:n.get(e)??null,threads:i.map(e=>({id:e.id,title:Yn(e)}))});return r.sort((e,t)=>e.branchName&&t.branchName?e.branchName.localeCompare(t.branchName):e.environmentId.localeCompare(t.environmentId)),r}function o5({projectId:e}){let t=ur(),n=yr(),r=Qu();return(0,B.useEffect)(()=>{r(e),n(Fu(),{replace:!0,state:t.state})},[t.state,n,e,r]),(0,V.jsx)(at,{contentClassName:`min-h-full items-center justify-center`,children:(0,V.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Loading…`})})}function s5(){let{projectId:e}=dr();return e?(0,V.jsx)(o5,{projectId:e}):(0,V.jsx)(c5,{})}function c5(){let[e,t]=Zu(),n=ur(),i=yr(),a=w1(),o=wi(),s=o.isSuccess||o.isError,c=Ti({enabled:s}),l=(0,B.useMemo)(()=>o.data?.projects.map(Ei),[o.data]),u=c.data??l,d=(0,B.useMemo)(()=>Pu(e)?de:u?u.some(t=>t.id===e)?e:de:e,[u,e]),f=Pu(d);(0,B.useEffect)(()=>{u&&d!==e&&t(d)},[d,u,e,t]);let p=T3(),m=Pi(),{isLocalHost:h,localHostId:g}=Sr(),_=kn(),v=(0,B.useMemo)(()=>_.data??[],[_.data]),b=Sn(),x=(0,B.useMemo)(()=>b.data?.templates??[],[b.data?.templates]),S=b.data?.activeName??null,C=Fi(),w=t6({projectId:d,threadId:null}),{data:T=[]}=Oi(d),E=P8(f?void 0:d,{environmentId:null}),[D,O]=(0,B.useState)(null),[ee,te]=$u(),[k,A]=(0,B.useState)(``),[j,M]=(0,B.useState)(``),ne=w.text,N=(0,B.useMemo)(()=>T2({text:w.text,attachments:w.attachments}),[w.attachments,w.text]),re=(0,B.useMemo)(()=>Ir(e5,d),[d]),ie=(0,B.useMemo)(()=>f3(T),[T]),ae=(0,B.useMemo)(()=>f?o.data?.personalProject:u?.find(e=>e.id===d),[f,d,u,o.data]),P=(0,B.useMemo)(()=>ae?.sources??[],[ae?.sources]),F=Hi({projectId:d,threadType:`manager`},{enabled:ee===`manager`&&ae!==void 0}),oe=F.data??void 0,se=X0({scope:`new-thread`,projectId:d}),I=X0({enabled:ee===`manager`,initialModel:oe?.model,initialPermissionMode:oe?.permissionMode,initialProviderId:oe?.providerId,initialReasoningLevel:oe?.reasoningLevel,initialServiceTier:oe?.serviceTier,projectId:d,resetKey:d,scope:`new-manager`}),{selectedProviderId:L,setSelectedProviderId:ce,providerOptions:le,hasMultipleProviders:ue,selectedModel:R,setSelectedModel:fe,serviceTier:pe,setServiceTier:me,reasoningLevel:he,setReasoningLevel:ge,permissionMode:_e,setPermissionMode:ve,environmentSelectionValue:ye,setEnvironmentSelectionValue:be,clearReuseEnvironment:xe,activeModel:Se,modelOptions:Ce,modelLoadError:we,reasoningOptions:Te,permissionModeOptions:Ee,supportsPermissionModeSelection:De,supportsServiceTier:Oe,serviceTierSupportByProvider:ke}=ee===`manager`?I:se;(0,B.useEffect)(()=>{let e=n5(n.state),t=r5(n.state);e===null&&t===null||(e!==null&&be(o0(e)),t!==null&&te(t),i(Fu()+n.search,{replace:!0,state:null}))},[n.search,n.state,i,be,te]);let Ae=cr({projectId:d,archived:!1},{enabled:!!d}),je=(0,B.useMemo)(()=>a5(Ae.data??[]),[Ae.data]),Me=(0,B.useMemo)(()=>v.filter(e=>e.status===`connected`&&(f||y(P,e.id)!==void 0)),[v,f,P]),Ne=(0,B.useMemo)(()=>Me.find(e=>h(e.id))?.id??Me[0]?.id??``,[Me,h]),Pe=(0,B.useMemo)(()=>{let e=Me.some(e=>e.id===k);return k&&e?k:Ne},[Ne,Me,k]),Fe=(0,B.useMemo)(()=>v.filter(e=>e.status===`connected`),[v]),Ie=(0,B.useMemo)(()=>Fe.find(e=>h(e.id))?.id??Fe[0]?.id??g??``,[Fe,h,g]),Le=(0,B.useMemo)(()=>S!==null&&x.some(e=>e.name===S)?S:x[0]?.name??``,[S,x]),Re=(0,B.useMemo)(()=>{let e=x.some(e=>e.name===j);return j&&e?j:Le},[Le,j,x]),ze=(0,B.useMemo)(()=>{let e=s0(ye);return f?e?.type===`host`&&(Fe.length===0||Fe.some(t=>t.id===e.hostId))?a0(e.hostId,`local`):Ie?a0(Ie,`local`):``:ye&&e?ye:g?a0(g,`local`):``},[Ie,Fe,ye,f,g]),Be=(0,B.useMemo)(()=>s0(ze),[ze]),[Ve,He]=(0,B.useState)(``);(0,B.useEffect)(()=>{He(``)},[ze,d]);let Ue=Be?.type===`host`,{selectedBranch:We,onBranchChange:Ge,onClearBranch:Ke,onCreateBranch:qe,onCreateBranchFrom:Je}=$8({environmentValue:ze,projectId:d}),Ye=We?.name??``,Xe=Ui(d,Ue?Be.hostId:null,{enabled:Ue&&!f,query:Ve,selectedBranch:Ye}),Ze=(0,B.useMemo)(()=>{let e=Xe.data?.branches??[],t=Xe.data?.selectedBranch;return t?.kind===`local`&&!e.includes(t.name)?[t.name,...e]:e},[Xe.data?.branches,Xe.data?.selectedBranch]),Qe=Ue&&Be.mode===`local`,$e=f?`other`:Qe?`local`:Ue&&Be.mode===`worktree`?`worktree`:`other`,et=(0,B.useMemo)(()=>{if($e!==`local`&&$e!==`worktree`)return[];let e=Xe.data?.remoteBranches??[],t=Xe.data?.selectedBranch;return t?.kind===`remote`&&!e.includes(t.name)?[t.name,...e]:e},[Xe.data?.remoteBranches,Xe.data?.selectedBranch,$e]),tt=!!(Xe.data?.branchesTruncated||($e===`local`||$e===`worktree`)&&Xe.data?.remoteBranchesTruncated),nt=$e===`local`&&Xe.data?.checkout.kind===`branch`?Xe.data.checkout.branchName:$e===`worktree`?Xe.data?.defaultBranch??null:null,rt=(0,B.useCallback)(()=>{qe(nt)},[nt,qe]),it=(0,B.useMemo)(()=>J8({checkout:Xe.data,isFetching:Xe.isFetching,isLoading:Xe.isLoading,mode:$e,selectedBranch:We}),[Xe.data,Xe.isFetching,Xe.isLoading,$e,We]),ot=Xe.refetch,st=(0,B.useCallback)(e=>{e&&ot()},[ot]),ct=(0,B.useMemo)(()=>X8({environmentValue:ze,projectId:d,selectedBranch:We}),[ze,d,We]),lt=(0,B.useMemo)(()=>u?.map(e=>({id:e.id,name:e.name}))??[],[u]),ut=Se?.model??R,dt=(0,B.useCallback)(e=>{let n=e??`proj_personal`;n!==d&&t(n)},[d,t]),ft=(0,B.useCallback)(e=>{be(a0(e,`local`))},[be]),pt=typeof n.state==`object`&&n.state!==null&&`focusPrompt`in n.state&&n.state.focusPrompt===!0;(0,B.useEffect)(()=>{if(!pt)return;let e=window.requestAnimationFrame(()=>{let e=document.getElementById(`root-compose-prompt`);if(!(e instanceof HTMLTextAreaElement))return;e.focus();let t=e.value.length;e.setSelectionRange(t,t)});return()=>window.cancelAnimationFrame(e)},[n.key,pt]);let mt=(0,B.useCallback)(async e=>{if(!(!d||e.length===0)){O(null);for(let t of e)try{let e=await C.mutateAsync({projectId:d,file:t});w.addAttachment(e)}catch(e){O(Jr({error:e,fallbackMessage:`Attachment upload failed`}));break}}},[d,w,C]),ht=(0,B.useCallback)(async()=>{let e={text:w.text,attachments:w.attachments},t=T2(e);if(!(!d||!L||!ut)){if(O(null),ee===`manager`){if(m.isPending||F.isLoading||!Pe)return;try{await m.mutateAsync({projectId:d,providerId:L,model:ut,...Oe&&pe?{serviceTier:pe}:{},reasoningLevel:he,environment:{type:`host`,hostId:Pe},...Re?{templateName:Re}:{},...t.length>0?{input:t}:{}}),w.clearIfCurrentMatches(e)}catch{}return}if(!(t.length===0||p.isPending||!ct))try{await p.mutateAsync({input:t,projectId:d,providerId:L,model:ut,...Oe&&pe?{serviceTier:pe}:{},reasoningLevel:he,permissionMode:_e,environment:ct}),w.clearIfCurrentMatches(e)}catch{}}},[p,Pe,Re,m,F.isLoading,ee,_e,d,w,he,ct,L,ut,pe,Oe]),gt=!L||!ut||(ee===`manager`?m.isPending||F.isLoading||!Pe:p.isPending||N.length===0||!ct||$e===`local`&&We!==null&&it.mutationBlocker!==null),_t=(0,B.useMemo)(()=>({text:w.text,attachments:w.attachments}),[w.attachments,w.text]),vt=(0,B.useMemo)(()=>({currentDraft:_t,entries:ie,onSelectEntry:w.setDraft,resetKey:d}),[_t,d,w.setDraft,ie]),yt=(0,B.useMemo)(()=>({suggestions:E.suggestions,threadSectionMode:E.threadSectionMode,isLoading:E.isLoading,isError:E.isError,onQueryChange:E.setQuery}),[E.isError,E.isLoading,E.setQuery,E.suggestions,E.threadSectionMode]),bt=(0,B.useMemo)(()=>({items:w.attachments,projectId:d??``,onAttachFiles:mt,onRemove:w.removeAttachment,isAttaching:C.isPending,error:D}),[D,mt,d,w.attachments,w.removeAttachment,C.isPending]),xt=(0,B.useMemo)(()=>({provider:{options:le,selectedId:L,onChange:ce,hasMultiple:ue},model:{active:Se,selected:R,options:Ce,loadError:we,onChange:fe},serviceTier:{value:pe,onChange:me,supported:Oe,supportByProvider:ke},reasoning:{value:he,options:Te,onChange:ge}}),[Se,ue,we,Ce,le,he,Te,R,L,pe,ke,ge,fe,ce,me,Oe]),St=(0,B.useMemo)(()=>({value:ze,onChange:be,sources:P,reuseDisabled:je.length===0}),[ze,P,je.length,be]),Ct=(0,B.useMemo)(()=>({hosts:v,eligibleHosts:Fe,value:Be?.type===`host`?Be.hostId:Ie,onChange:ft,isLocalHost:h}),[Ie,Fe,ft,v,h,Be]),wt=(0,B.useMemo)(()=>({options:je,value:Be?.type===`reuse`?Be.environmentId:null,onChange:e=>{be(o0(e))}}),[Be,je,be]),Tt=(0,B.useMemo)(()=>({value:We?.name??($e===`worktree`?it.currentBranch:null),currentBranch:it.currentBranch,isNew:We?.isNew??!1,options:Ze,remoteOptions:et,optionsTruncated:tt,loading:Xe.isFetching,placeholder:it.placeholder,triggerLabel:it.triggerLabel,triggerTitle:it.triggerTitle,currentOptionLabel:$e===`local`?it.currentOptionLabel:null,currentOptionTitle:$e===`local`?it.currentOptionLabel??void 0:void 0,optionDisabledReason:it.mutationBlocker?.label,optionDisabledTitle:it.mutationBlocker?.title,createDisabledReason:it.mutationBlocker?.label,createDisabledTitle:it.mutationBlocker?.title,onChange:Ge,onClear:Ke,onCreate:rt,onCreateBaseChange:Je,onOpenChange:st,onSearchQueryChange:He}),[Xe.isFetching,tt,Ze,$e,et,it.currentBranch,it.currentOptionLabel,it.mutationBlocker,it.placeholder,it.triggerLabel,it.triggerTitle,Ge,st,Ke,rt,Je,He,We?.isNew,We?.name]),Et=(0,B.useMemo)(()=>({value:_e,options:Ee,onChange:ve,supported:De}),[_e,Ee,ve,De]),Dt=(0,B.useMemo)(()=>Be?.type===`reuse`?(0,V.jsx)(`div`,{className:`flex`,children:(0,V.jsxs)(`button`,{type:`button`,onClick:xe,title:`Stop reusing and start a regular new thread`,"aria-label":`Stop reusing worktree`,className:`group -ml-1.5 inline-flex h-7 items-center gap-1.5 rounded-full bg-primary/10 px-2.5 text-xs font-medium text-primary transition-colors hover:bg-primary/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1`,children:[(0,V.jsxs)(`span`,{className:`relative inline-flex size-3.5 shrink-0 items-center justify-center`,children:[(0,V.jsx)(r,{name:`GitBranch`,className:`size-3.5 transition-opacity group-hover:opacity-0`,"aria-hidden":!0}),(0,V.jsx)(r,{name:`X`,className:`absolute size-3.5 opacity-0 transition-opacity group-hover:opacity-100`,"aria-hidden":!0})]}),`Reusing existing worktree`]})}):null,[xe,Be]);return s?!u&&(o.isError||c.isError)?(0,V.jsx)(at,{contentClassName:`min-h-full items-center justify-center`,children:(0,V.jsx)(`p`,{className:`py-12 text-center text-sm text-destructive`,children:`Failed to load projects.`})}):(0,V.jsx)(at,{contentClassName:t5,children:(0,V.jsx)(c3,{id:`root-compose-prompt`,value:ne,onChange:w.setText,onSubmit:ht,isSubmitting:ee===`manager`?m.isPending:p.isPending,disabled:gt,zenModeStorageKey:re,history:vt,mentions:yt,attachments:bt,modeConfig:ee===`manager`?{mode:`manager`,host:{hosts:v,eligibleHosts:Me,value:Pe,onChange:A,isLocalHost:h},...x.length>0?{template:{templates:x,value:Re,onChange:M}}:{}}:{mode:`thread`,environment:St,branch:Tt,worktree:wt,permission:Et,header:Dt,...f?{projectlessHost:Ct}:{}},onModeChange:te,project:{projects:lt,value:f?null:d,onChange:dt,allowNoProject:!0,createProject:{onCreate:a.openCreateDialog,disabled:!a.isAvailable||a.isCreating,isCreating:a.isCreating}},execution:xt})}):(0,V.jsx)(at,{contentClassName:`min-h-full items-center justify-center`,children:(0,V.jsx)(`p`,{className:`py-12 text-center text-sm text-muted-foreground`,children:`Loading…`})})}var l5=7;function u5({command:e}){return(0,V.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-1 overflow-hidden whitespace-nowrap leading-5`,title:`Running ${e}`,children:[(0,V.jsx)(`span`,{className:`shrink-0 whitespace-pre text-muted-foreground`,children:`Running`}),` `,(0,V.jsx)(`span`,{className:`min-w-0 truncate whitespace-pre font-semibold text-foreground`,children:e})]})}function d5({commitSha:e,commitSubject:t}){let n=e.slice(0,l5);return(0,V.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1 overflow-hidden whitespace-nowrap leading-5`,title:`${n} · ${t}`,children:[(0,V.jsx)(`span`,{className:`shrink-0 whitespace-pre font-mono text-foreground`,children:n}),(0,V.jsx)(`span`,{className:`shrink-0 whitespace-pre text-muted-foreground`,children:`·`}),(0,V.jsx)(`span`,{className:`min-w-0 truncate whitespace-pre text-muted-foreground`,children:t})]})}function f5({state:e,onClose:t}){let n=(0,B.useRef)(e),r=e!==null;e!==null&&(n.current=e);let i=e??n.current;return(0,V.jsx)(Nr,{open:r,onOpenChange:e=>{e||t()},children:(0,V.jsx)(jr,{children:i?(0,V.jsx)(p5,{state:i}):null})})}function p5({state:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(kr,{children:[(0,V.jsx)(Mr,{children:e.title}),(0,V.jsx)(Tr,{children:e.message})]}),(0,V.jsxs)(`div`,{className:`relative overflow-hidden rounded-md border bg-background`,children:[(0,V.jsx)(Hr,{text:e.log,label:`Copy setup log`,successMessage:`${e.displayName} setup log copied`,className:`absolute right-2 top-2 z-10 opacity-70 transition-opacity hover:opacity-100 focus-visible:opacity-100`,iconClassName:`size-3`}),(0,V.jsx)(`pre`,{className:`max-h-80 min-h-32 overflow-auto p-3 pr-12 text-xs whitespace-pre-wrap break-words text-foreground`,children:e.log})]})]})}var m5=`bb:provider-cli-toast:dismissed-v2:`,h5={progress:{install:e=>`Installing ${e}`,update:e=>`Updating ${e}`},success:{install:e=>`${e} installed`,update:e=>`${e} is up to date`},failure:{install:e=>`${e} install failed`,update:e=>`${e} update failed`},log:{install:e=>`${e} install log`,update:e=>`${e} update log`}};function g5(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function _5(e){return`${m5}${e}`}function v5(e){let t=g5();if(t===null)return!1;try{return t.getItem(_5(e))===`true`}catch{return!1}}function y5(e){let t=g5();if(t!==null)try{t.setItem(_5(e),`true`)}catch{}}function b5(e){let t=g5();if(t!==null)try{t.removeItem(_5(e))}catch{}}function x5(e){return[{provider:`codex`,status:e.codex},{provider:`claudeCode`,status:e.claudeCode}]}function S5(e){let{provider:t,status:n}=e,r=`provider-cli-health:${t}`;if(!n.installed)return{provider:t,status:n,action:n.installAction,title:`${n.displayName} CLI not installed`,description:`Install ${n.displayName} so bb can start ${n.displayName} sessions.`,fingerprint:`${t}:missing:${n.latestVersion??`latest`}`,toastId:r};if(n.needsUpdate){if(n.installAction===null)return null;let e=`${n.currentVersion??`Installed version unknown`} -> ${n.latestVersion??`latest`}`,i=[t,`outdated`,n.installSource,n.currentVersion??`unknown`,n.latestVersion??`unknown`,n.executablePath??n.executableName].join(`:`);return{provider:t,status:n,action:n.installAction,title:`${n.displayName} update available`,description:e,fingerprint:i,toastId:r}}return null}function C5(e){return e!==null}function w5(e){return e.action!==null}function T5(e){return e.exitCode===null?`Command exited after signal ${e.signal??`unknown`}`:`Command exited with code ${e.exitCode}`}function E5(e){return`provider-cli-health-run:${e}`}function D5({issue:e,phase:t}){return h5[t][e.action.kind](e.status.displayName)}function O5({issue:e,log:t,message:n,onViewLog:r,toastId:i}){let a={displayName:e.status.displayName,log:t,message:n,title:D5({issue:e,phase:`log`})};Wr.error(D5({issue:e,phase:`failure`}),{id:i,description:n,action:{label:`View log`,onClick:()=>r(a)}})}function k5(){let e=un().data?.hostDaemonPort??null,t=In({daemonPort:e,enabled:e!==null}),n=t.refetch,r=(0,B.useRef)(new Set),i=(0,B.useRef)(new Set),a=(0,B.useRef)(new Map),o=(0,B.useRef)(null),[s,c]=(0,B.useState)(null),l=(0,B.useCallback)(e=>{r.current.add(e.fingerprint),y5(e.fingerprint)},[]),u=(0,B.useCallback)(e=>{r.current.delete(e.fingerprint),b5(e.fingerprint)},[]),d=(0,B.useCallback)(e=>{l(e),Wr.dismiss(e.toastId)},[l]),f=(0,B.useCallback)(()=>{c(null)},[]),p=(0,B.useCallback)(t=>{let r=t.action;if(e===null){Wr.error(`Host daemon unavailable`,{description:`Start bb again and retry the provider CLI setup.`});return}if(o.current!==null){Wr.warning(`Provider CLI setup already running`,{description:`Wait for the current install or update to finish.`});return}o.current=t.provider,Wr.dismiss(t.toastId);let i=E5(t.provider),a=[`$ ${r.command}\n`],s=null,l=null;Wr.loading(D5({issue:t,phase:`progress`}),{id:i,description:(0,V.jsx)(u5,{command:r.command})}),An({port:e,request:{provider:t.provider,actionKind:r.kind},onEvent:e=>{if(e.provider===t.provider)switch(e.type){case`started`:a=[`$ ${e.command}\n`],Wr.loading(D5({issue:t,phase:`progress`}),{id:i,description:(0,V.jsx)(u5,{command:e.command})});break;case`output`:e.text.length>0&&a.push(e.text);break;case`completed`:s=e;break;case`error`:l=e.message,a.push(`\n${e.message}\n`);break}}}).then(()=>{if(s?.success){Wr.success(D5({issue:t,phase:`success`}),{id:i}),n();return}let e=l??(s?T5(s):`Command finished without reporting success.`);O5({issue:t,log:a.join(``),message:e,onViewLog:c,toastId:i})}).catch(e=>{let n=e instanceof Error?e.message:String(e);a.push(`\n${n}\n`),O5({issue:t,log:a.join(``),message:n,onViewLog:c,toastId:i})}).finally(()=>{o.current===t.provider&&(o.current=null)})},[e,n]);return(0,B.useEffect)(()=>{let e=t.data;if(!e)return;let n=x5(e).map(S5).filter(C5),o=new Map;for(let e of n)o.set(e.fingerprint,e);for(let e of a.current.values())o.has(e.fingerprint)||(Wr.dismiss(e.toastId),i.current.delete(e.fingerprint),u(e));a.current=o;for(let e of n){if(r.current.has(e.fingerprint)||v5(e.fingerprint)){r.current.add(e.fingerprint);continue}if(!i.current.has(e.fingerprint))if(i.current.add(e.fingerprint),w5(e)){let t=e.action.kind===`update`?{label:`Dismiss`,onClick:()=>d(e)}:void 0;Wr.warning(e.title,{id:e.toastId,description:e.description,duration:1/0,action:{label:e.action.label,onClick:()=>p(e)},...t?{cancel:t}:{}})}else Wr.warning(e.title,{id:e.toastId,description:e.description,duration:1/0,cancel:{label:`Dismiss`,onClick:()=>d(e)}})}},[u,d,t.data,p]),(0,V.jsx)(f5,{state:s,onClose:f})}var A5=`bb:update-toast:dismissed:`;function j5(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function M5(e){let t=j5();if(t===null)return!1;try{return t.getItem(`${e.storageKeyPrefix}${e.latestVersion}`)===`true`}catch{return!1}}function N5(e){let t=j5();if(t!==null)try{t.setItem(`${e.storageKeyPrefix}${e.latestVersion}`,`true`)}catch{}}function P5(e){return`${e} is available. Restart bb-app to update.`}function F5(e){return`bb desktop ${e} is ready to install.`}function I5(e){e.desktopApi.installUpdate().catch(()=>void 0),Wr.dismiss(`bb-desktop-update-ready:${e.latestVersion}`)}function L5(){let{data:e}=Ln(),t=(0,B.useRef)(null);(0,B.useEffect)(()=>{if(!e||k1()!==null||e.isDevelopment||!e.updateAvailable)return;let{latestVersion:n}=e;if(n!==null&&t.current!==n){if(M5({latestVersion:n,storageKeyPrefix:A5})){t.current=n;return}t.current=n,Wr.message(`bb-app update available`,{id:`bb-update-available:${n}`,description:P5(n),duration:1/0,cancel:{label:`Dismiss`,onClick:()=>{N5({latestVersion:n,storageKeyPrefix:A5}),Wr.dismiss(`bb-update-available:${n}`)}},onDismiss:()=>{N5({latestVersion:n,storageKeyPrefix:A5})}})}},[e])}function R5(){let[e,t]=(0,B.useState)(null),[n,r]=(0,B.useState)(null),i=(0,B.useRef)(null);(0,B.useEffect)(()=>{let e=k1();if(e===null)return;t(e);let n=!0;e.getInfo().then(e=>{n&&r(e)}).catch(()=>void 0);let i=e.onChange(e=>{r(e)});return()=>{n=!1,i()}},[]),(0,B.useEffect)(()=>{if(n===null||e===null||!n.updateDownloaded)return;let t=n.pendingVersion===null?n.latestVersion:n.pendingVersion;t!==null&&i.current!==t&&(i.current=t,Wr.message(`Desktop update ready`,{id:`bb-desktop-update-ready:${t}`,description:F5(t),duration:1/0,action:{label:`Relaunch`,onClick:()=>{I5({desktopApi:e,latestVersion:t})}}}))},[e,n])}function z5(e){let t=new Map,n=te({debounceMs:e.debounceMs,maxWaitMs:e.maxWaitMs,onFlush:()=>{t.size!==0&&(e.flushChangedEnvironmentIds(Array.from(t.entries()).map(([e,t])=>({changeKinds:Array.from(t),environmentId:e}))),t.clear())}});return{dispose:()=>{n.dispose(),t.clear()},markChanged:(e,r)=>{let i=t.get(e);i||(i=new Set,t.set(e,i));for(let e of r)i.add(e);n.schedule()}}}var B5=50,V5=200,H5=250,U5=500;function W5(e,t){return e?t?Array.from(new Set([...e,...t])):e:t}function G5(e,t){let n=W5(e?.eventTypes,t.eventTypes),r=t.hasPendingInteraction??e?.hasPendingInteraction,i=t.projectId??e?.projectId,a={};return n&&(a.eventTypes=n),r!==void 0&&(a.hasPendingInteraction=r),i!==void 0&&(a.projectId=i),a}function K5(){return{changedThreadKinds:new Map,globalChangeKinds:new Set,metadataByThreadId:new Map}}function q5(e){e.changedThreadKinds.clear(),e.globalChangeKinds.clear(),e.metadataByThreadId.clear()}function J5({environmentId:e,queryClient:t}){let n=new Set;for(let[,r]of t.getQueriesData({queryKey:u()}))r?.environmentId===e&&n.add(r.id);for(let{data:r}of ci(t,{queryKey:F()}))for(let t of ri(r))t.environmentId===e&&n.add(t.id);return Array.from(n)}function Y5({changes:e,state:t,threadId:n}){let r=t.changedThreadKinds.get(n);r||(r=new Set,t.changedThreadKinds.set(n,r));for(let t of e)r.add(t)}function X5(e,t){for(let n of t.globalChangeKinds)ni({context:{eventTypes:void 0,hasPendingInteraction:void 0,projectId:void 0,queryClient:e,threadId:void 0},handlers:ui[n].dirty});for(let[n,r]of t.changedThreadKinds){let i=t.metadataByThreadId.get(n);for(let t of r)ni({context:{hasPendingInteraction:i?.hasPendingInteraction,eventTypes:i?.eventTypes,projectId:i?.projectId,queryClient:e,threadId:n},handlers:ui[t].dirty})}q5(t)}function Z5(e,t){if(t.entity===`thread`){if(t.id){Y5({changes:t.changes,state:e,threadId:t.id}),t.metadata&&e.metadataByThreadId.set(t.id,G5(e.metadataByThreadId.get(t.id),t.metadata));return}for(let n of t.changes)e.globalChangeKinds.add(n)}}function Q5({changeKinds:e,environmentId:t,queryClient:n}){for(let r of e)ni({context:{environmentId:t,getCachedThreadIdsForEnvironment:()=>J5({environmentId:t,queryClient:n}),queryClient:n},handlers:Si[r].dirty})}function $5({queryClient:e}){let t=K5(),n=te({debounceMs:B5,maxWaitMs:V5,onFlush:()=>X5(e,t)}),r=z5({debounceMs:H5,flushChangedEnvironmentIds:t=>{for(let{changeKinds:n,environmentId:r}of t)Q5({changeKinds:n,environmentId:r,queryClient:e})},maxWaitMs:U5});return{dispose:()=>{n.dispose(),r.dispose(),q5(t)},handleChanged:i=>{switch(i.entity){case`thread`:Z5(t,i),ti(i.changes)?n.flush():n.schedule();break;case`environment`:i.id&&r.markChanged(i.id,i.changes);break;case`host`:for(let t of i.changes)ni({context:{queryClient:e},handlers:li[t].dirty});break;case`project`:for(let t of i.changes)ni({context:{projectId:i.id,queryClient:e},handlers:ei[t].dirty});break;case`system`:for(let t of i.changes)ni({context:{queryClient:e},handlers:xi[t].dirty});break;default:pt(i)}},handleConnected:({reconnected:t})=>{if(t){yu({queryClient:e});return}bu({queryClient:e})}}}function e7(){let e=ot();(0,B.useEffect)(()=>{let t=$5({queryClient:e}),n=Rn.onConnected(t.handleConnected),r=Rn.onChanged(t.handleChanged);return Rn.connect(),Rn.subscribe(`thread`),Rn.subscribe(`project`),Rn.subscribe(`environment`),Rn.subscribe(`host`),Rn.subscribe(`system`),()=>{t.dispose(),n(),r(),Rn.unsubscribe(`thread`),Rn.unsubscribe(`project`),Rn.unsubscribe(`environment`),Rn.unsubscribe(`host`),Rn.unsubscribe(`system`)}},[e])}var t7=(0,B.lazy)(()=>z(()=>import(`./ThreadDetailRoute-Caqz8odF.js`),__vite__mapDeps([102,1,103,104,105,106,107,108,109,110,111,112,113,114]))),n7=(0,B.lazy)(()=>z(()=>import(`./AppSettingsView-Dh4Od2M3.js`).then(e=>({default:e.AppSettingsView})),__vite__mapDeps([115,1,104,105,106,107,116]))),r7=(0,B.lazy)(()=>z(()=>import(`./ProjectSettingsView-BoH5a1hi.js`).then(e=>({default:e.ProjectSettingsView})),__vite__mapDeps([117,1,103,111,110,106,107,113,116]))),i7=(0,B.lazy)(()=>z(()=>import(`./ProjectArchivedThreadsView-o1R22xfj.js`).then(e=>({default:e.ProjectArchivedThreadsView})),__vite__mapDeps([118,1,103,108,109,110,113])));(0,B.lazy)(()=>z(()=>import(`./InternalReplayListView-BjzY8fhh.js`).then(e=>({default:e.InternalReplayListView})),__vite__mapDeps([119,1,103,106,112,113])));function a7(){return(0,V.jsx)(t0,{children:(0,V.jsx)(B.Suspense,{fallback:null,children:(0,V.jsxs)(gr,{children:[(0,V.jsx)(lr,{path:`/`,element:(0,V.jsx)(s5,{})}),(0,V.jsx)(lr,{path:Ou,element:(0,V.jsx)(n7,{})}),null,(0,V.jsx)(lr,{path:ku,element:(0,V.jsx)(s5,{})}),(0,V.jsx)(lr,{path:ju,element:(0,V.jsx)(r7,{})}),(0,V.jsx)(lr,{path:Mu,element:(0,V.jsx)(i7,{})}),(0,V.jsx)(lr,{path:Nu,element:(0,V.jsx)(t7,{})}),(0,V.jsx)(lr,{path:Au,element:(0,V.jsx)(t7,{})}),(0,V.jsx)(lr,{path:`*`,element:(0,V.jsx)(pr,{to:`/`,replace:!0})})]})})})}function o7(){return e7(),L5(),R5(),(0,V.jsxs)(C1,{children:[(0,V.jsx)(k5,{}),(0,V.jsxs)(gr,{children:[(0,V.jsx)(lr,{path:Du,element:(0,V.jsx)(r0,{})}),(0,V.jsx)(lr,{path:`*`,element:(0,V.jsx)(a7,{})})]})]})}function s7(e){return(0,V.jsx)(Ur,{...e})}function c7(e){return(0,V.jsx)(s7,{theme:Yr(),...e})}function l7(e={}){let t=e.defaultOptions,n=e.showMutationErrorToasts??!0;return new ta({mutationCache:new Yi({onError:(e,t,r,i)=>{if(!n)return;let a=Kr(i.meta);a.showErrorToast!==!1&&Gr({error:e,fallbackMessage:a.errorMessage??`Request failed.`,lifecycleOperation:a.lifecycleOperation})}}),defaultOptions:{...t,queries:{staleTime:2e3,refetchOnWindowFocus:!0,retry:0,...t?.queries}}})}var u7=l7();Vr(),(0,ra.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(B.StrictMode,{children:(0,V.jsxs)(je,{client:u7,children:[(0,V.jsx)(vr,{children:(0,V.jsx)(o7,{})}),(0,V.jsx)(c7,{position:`bottom-right`})]})}));export{yY as $,vf as $t,E1 as A,KK as At,pZ as B,vL as Bt,m2 as C,Ms as Cn,iq as Ct,V1 as D,XK as Dt,_0 as E,ZK as Et,hQ as F,LL as Ft,MY as G,dM as Gt,PY as H,jL as Ht,lQ as I,zL as It,bY as J,$p as Jt,EY as K,jj as Kt,cQ as L,NL as Lt,k1 as M,KB as Mt,A1 as N,WL as Nt,N1 as O,YK as Ot,kQ as P,BL as Pt,vY as Q,yf as Qt,hZ as R,PL as Rt,_2 as S,js as Sn,sq as St,X0 as T,pa as Tn,$K as Tt,HY as U,QI as Ut,gX as V,kL as Vt,kY as W,XI as Wt,xY as X,Yf as Xt,SY as Y,up as Yt,wY as Z,H as Zt,c4 as _,Yl as _n,Tq as _t,k3 as a,Iu as an,QJ as at,T2 as b,Ic as bn,dq as bt,O3 as c,Tu as cn,BJ as ct,h3 as d,Cu as dn,Nq as dt,sd as en,mY as et,f3 as f,vu as fn,Aq as ft,l4 as g,su as gn,Eq as gt,L4 as h,du as hn,Dq as ht,t6 as i,Bu as in,XJ as it,D1 as j,GK as jt,M1 as k,JK as kt,A3 as l,xu as ln,Fq as lt,B4 as m,$l as mn,Oq as mt,P8 as n,rd as nn,dY as nt,M3 as o,zu as on,HJ as ot,J4 as p,mu as pn,kq as pt,CY as q,Ix as qt,A8 as r,nd as rn,$J as rt,j3 as s,Eu as sn,VJ as st,d5 as t,ld as tn,pY as tt,N3 as u,Su as un,Pq as ut,X2 as v,Nl as vn,wq as vt,l2 as w,gs as wn,nq as wt,E2 as x,Bs as xn,uq as xt,D2 as y,jc as yn,fq as yt,mZ as z,AL as zt};
|