comprehende 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/cli/args.d.ts +20 -0
- package/dist/cli/args.js +89 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands.d.ts +12 -0
- package/dist/cli/commands.js +40 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +102 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/git/blame.d.ts +8 -0
- package/dist/git/blame.js +36 -0
- package/dist/git/blame.js.map +1 -0
- package/dist/git/diff.d.ts +13 -0
- package/dist/git/diff.js +332 -0
- package/dist/git/diff.js.map +1 -0
- package/dist/git/exec.d.ts +10 -0
- package/dist/git/exec.js +53 -0
- package/dist/git/exec.js.map +1 -0
- package/dist/git/log.d.ts +8 -0
- package/dist/git/log.js +26 -0
- package/dist/git/log.js.map +1 -0
- package/dist/git/repo.d.ts +7 -0
- package/dist/git/repo.js +45 -0
- package/dist/git/repo.js.map +1 -0
- package/dist/git/show.d.ts +2 -0
- package/dist/git/show.js +18 -0
- package/dist/git/show.js.map +1 -0
- package/dist/package-root.d.ts +2 -0
- package/dist/package-root.js +25 -0
- package/dist/package-root.js.map +1 -0
- package/dist/review/coverage.d.ts +20 -0
- package/dist/review/coverage.js +56 -0
- package/dist/review/coverage.js.map +1 -0
- package/dist/review/effort.d.ts +1 -0
- package/dist/review/effort.js +17 -0
- package/dist/review/effort.js.map +1 -0
- package/dist/review/generate.d.ts +20 -0
- package/dist/review/generate.js +290 -0
- package/dist/review/generate.js.map +1 -0
- package/dist/schema/blame-runs.d.ts +14 -0
- package/dist/schema/blame-runs.js +18 -0
- package/dist/schema/blame-runs.js.map +1 -0
- package/dist/schema/hunk-meta.d.ts +26 -0
- package/dist/schema/hunk-meta.js +107 -0
- package/dist/schema/hunk-meta.js.map +1 -0
- package/dist/schema/hunk-patch.d.ts +2 -0
- package/dist/schema/hunk-patch.js +49 -0
- package/dist/schema/hunk-patch.js.map +1 -0
- package/dist/schema/identity.d.ts +3 -0
- package/dist/schema/identity.js +7 -0
- package/dist/schema/identity.js.map +1 -0
- package/dist/schema/parse.d.ts +13 -0
- package/dist/schema/parse.js +258 -0
- package/dist/schema/parse.js.map +1 -0
- package/dist/schema/skill-paths.d.ts +7 -0
- package/dist/schema/skill-paths.js +11 -0
- package/dist/schema/skill-paths.js.map +1 -0
- package/dist/schema/types.d.ts +73 -0
- package/dist/schema/types.js +4 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/server/http.d.ts +12 -0
- package/dist/server/http.js +270 -0
- package/dist/server/http.js.map +1 -0
- package/dist/ui/assets/abap-BdImnpbu.js +1 -0
- package/dist/ui/assets/actionscript-3-B3316cI-.js +1 -0
- package/dist/ui/assets/ada-bCR0ucgS.js +1 -0
- package/dist/ui/assets/ahk-CsyLZFj1.js +1 -0
- package/dist/ui/assets/ahk2-8Zs4aa1G.js +1 -0
- package/dist/ui/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/ui/assets/angular-html-DA-rfuFy.js +1 -0
- package/dist/ui/assets/angular-ts-BrjP3tb8.js +1 -0
- package/dist/ui/assets/apache-Pmp26Uib.js +1 -0
- package/dist/ui/assets/apex-DhZFqWV2.js +1 -0
- package/dist/ui/assets/apl-CORt7UWP.js +1 -0
- package/dist/ui/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/ui/assets/ara-BRHolxvo.js +1 -0
- package/dist/ui/assets/asciidoc-CSVQ5wI8.js +1 -0
- package/dist/ui/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/ui/assets/astro-HNnZUWAn.js +1 -0
- package/dist/ui/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/ui/assets/awk-DMzUqQB5.js +1 -0
- package/dist/ui/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/ui/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/ui/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/ui/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/ui/assets/bat-CickPsom.js +1 -0
- package/dist/ui/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/ui/assets/berry-uYugtg8r.js +1 -0
- package/dist/ui/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/ui/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/ui/assets/bird2-Bx8U0n9b.js +1 -0
- package/dist/ui/assets/blade-2xfisSek.js +1 -0
- package/dist/ui/assets/bsl-DlhNcFeZ.js +1 -0
- package/dist/ui/assets/c-BIGW1oBm.js +1 -0
- package/dist/ui/assets/c3-Dp5svz6Z.js +1 -0
- package/dist/ui/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/ui/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/ui/assets/catppuccin-frappe-CZL1YF0i.js +1 -0
- package/dist/ui/assets/catppuccin-latte-DH-8KZSZ.js +1 -0
- package/dist/ui/assets/catppuccin-macchiato-B7yYVSCf.js +1 -0
- package/dist/ui/assets/catppuccin-mocha-Ct7hS0mc.js +1 -0
- package/dist/ui/assets/chapel-DTp_pixX.js +1 -0
- package/dist/ui/assets/clarity-Dn5IMItf.js +1 -0
- package/dist/ui/assets/clojure-P80f7IUj.js +1 -0
- package/dist/ui/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/ui/assets/cobol-nBiQ_Alo.js +1 -0
- package/dist/ui/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/ui/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/ui/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/ui/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/ui/assets/coq-C7JzOVbR.js +1 -0
- package/dist/ui/assets/cpp-BMRokrvK.js +1 -0
- package/dist/ui/assets/crystal-DGywbUpC.js +1 -0
- package/dist/ui/assets/csharp-DSvCPggb.js +1 -0
- package/dist/ui/assets/css-CLj8gQPS.js +1 -0
- package/dist/ui/assets/csv-fuZLfV_i.js +1 -0
- package/dist/ui/assets/cue-D82EKSYY.js +1 -0
- package/dist/ui/assets/cypher-COkxafJQ.js +1 -0
- package/dist/ui/assets/d-85-TOEBH.js +1 -0
- package/dist/ui/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/ui/assets/dart-bE4Kk8sk.js +1 -0
- package/dist/ui/assets/dax-CEL-wOlO.js +1 -0
- package/dist/ui/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/ui/assets/diff-D97Zzqfu.js +1 -0
- package/dist/ui/assets/docker-BcOcwvcX.js +1 -0
- package/dist/ui/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/ui/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/ui/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/ui/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/ui/assets/edge-FbVlp4U3.js +1 -0
- package/dist/ui/assets/elixir-CkH2-t6x.js +1 -0
- package/dist/ui/assets/elm-DbKCFpqz.js +1 -0
- package/dist/ui/assets/emacs-lisp-C_m_b--Z.js +1 -0
- package/dist/ui/assets/erb-DXfck5VN.js +1 -0
- package/dist/ui/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/ui/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/ui/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/ui/assets/fennel-BYunw83y.js +1 -0
- package/dist/ui/assets/fish-BvzEVeQv.js +1 -0
- package/dist/ui/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/ui/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/ui/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/ui/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/ui/assets/gdresource-TyuKm33G.js +1 -0
- package/dist/ui/assets/gdscript-DqcFQ5yU.js +1 -0
- package/dist/ui/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/ui/assets/genie-D0YGMca9.js +1 -0
- package/dist/ui/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/ui/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/ui/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/ui/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/ui/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/ui/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/ui/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/ui/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/ui/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/ui/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/ui/assets/gleam-BspZqrRM.js +1 -0
- package/dist/ui/assets/glimmer-js-ByusRIyA.js +1 -0
- package/dist/ui/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/dist/ui/assets/glsl-DplSGwfg.js +1 -0
- package/dist/ui/assets/gn-n2N0HUVH.js +1 -0
- package/dist/ui/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/ui/assets/go-C27-OAKa.js +1 -0
- package/dist/ui/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/ui/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/ui/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/ui/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/ui/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/ui/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/ui/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/ui/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/ui/assets/hack-BWmVpMyf.js +1 -0
- package/dist/ui/assets/haml-D5jkg6IW.js +1 -0
- package/dist/ui/assets/handlebars-BpdQsYii.js +1 -0
- package/dist/ui/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/ui/assets/haxe-CfZj7gIn.js +1 -0
- package/dist/ui/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/ui/assets/hjson-D5-asLiD.js +1 -0
- package/dist/ui/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/ui/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/ui/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/dist/ui/assets/houston-DnULxvSX.js +1 -0
- package/dist/ui/assets/html-derivative-DlHx6ybY.js +1 -0
- package/dist/ui/assets/html-pp8916En.js +1 -0
- package/dist/ui/assets/http-jrhK8wxY.js +1 -0
- package/dist/ui/assets/hurl-irOxFIW8.js +1 -0
- package/dist/ui/assets/hxml-2-FPmUDs.js +1 -0
- package/dist/ui/assets/hy-DFXneXwc.js +1 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/ui/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/ui/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/ui/assets/imba-DGztddWO.js +1 -0
- package/dist/ui/assets/index-BCZwzr3E.js +1585 -0
- package/dist/ui/assets/index-DsGDgUsX.css +1 -0
- package/dist/ui/assets/ini-BEwlwnbL.js +1 -0
- package/dist/ui/assets/java-CylS5w8V.js +1 -0
- package/dist/ui/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/ui/assets/jinja-f2NsQr07.js +1 -0
- package/dist/ui/assets/jison-wvAkD_A8.js +1 -0
- package/dist/ui/assets/json-Cp-IABpG.js +1 -0
- package/dist/ui/assets/json5-C9tS-k6U.js +1 -0
- package/dist/ui/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/ui/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/ui/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/ui/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/ui/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/ui/assets/julia-5Bft2YPA.js +1 -0
- package/dist/ui/assets/just-Cwhn7H3k.js +1 -0
- package/dist/ui/assets/kanagawa-dragon-BuwD2xS4.js +1 -0
- package/dist/ui/assets/kanagawa-lotus-C3DzagqV.js +1 -0
- package/dist/ui/assets/kanagawa-wave-DFGoQZhC.js +1 -0
- package/dist/ui/assets/kdl-DV7GczEv.js +1 -0
- package/dist/ui/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/ui/assets/kusto-wEQ09or8.js +1 -0
- package/dist/ui/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/ui/assets/latex-D5pSuvFb.js +1 -0
- package/dist/ui/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/ui/assets/less-B1dDrJ26.js +1 -0
- package/dist/ui/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/ui/assets/liquid-C0sCDyMI.js +1 -0
- package/dist/ui/assets/llvm-BZoOZj88.js +1 -0
- package/dist/ui/assets/log-2UxHyX5q.js +1 -0
- package/dist/ui/assets/logo-BtOb2qkB.js +1 -0
- package/dist/ui/assets/lua-BaeVxFsk.js +1 -0
- package/dist/ui/assets/luau-BnpPk5vE.js +1 -0
- package/dist/ui/assets/make-CHLpvVh8.js +1 -0
- package/dist/ui/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/ui/assets/marko-DjSrsDqO.js +1 -0
- package/dist/ui/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/ui/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/ui/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/ui/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/ui/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/ui/assets/matlab-D7o27uSR.js +1 -0
- package/dist/ui/assets/mdc-D1_yUvq7.js +1 -0
- package/dist/ui/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/ui/assets/mermaid-CQcHuHx7.js +1 -0
- package/dist/ui/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/ui/assets/min-light-CTRr51gU.js +1 -0
- package/dist/ui/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/ui/assets/mojo-DJz3ZmWd.js +1 -0
- package/dist/ui/assets/monokai-BRVnQi9A.js +1 -0
- package/dist/ui/assets/moonbit-CHtswR0a.js +1 -0
- package/dist/ui/assets/move-el3G9tDJ.js +1 -0
- package/dist/ui/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/ui/assets/nextflow-C-mBbutL.js +1 -0
- package/dist/ui/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/dist/ui/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/ui/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/ui/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/ui/assets/nim-BIad80T-.js +1 -0
- package/dist/ui/assets/nix-CwoSXNpI.js +1 -0
- package/dist/ui/assets/nord-Ddv68eIx.js +1 -0
- package/dist/ui/assets/nsis-BlV79W_Q.js +1 -0
- package/dist/ui/assets/nushell-D3jzshHO.js +1 -0
- package/dist/ui/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/ui/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/ui/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/ui/assets/odin-BBf5iR-q.js +1 -0
- package/dist/ui/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/ui/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/ui/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/ui/assets/org-DM6o9KBp.js +1 -0
- package/dist/ui/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/ui/assets/perl-B9cMNwum.js +1 -0
- package/dist/ui/assets/php-Csjmro_R.js +1 -0
- package/dist/ui/assets/pierre-dark-CyvmCCZW.js +1 -0
- package/dist/ui/assets/pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js +1 -0
- package/dist/ui/assets/pierre-dark-soft-BHGpRqa4.js +1 -0
- package/dist/ui/assets/pierre-dark-tritanopia-Beq2gCRQ.js +1 -0
- package/dist/ui/assets/pierre-dark-vibrant-BWBVywrn.js +1 -0
- package/dist/ui/assets/pierre-light-480U9XYS.js +1 -0
- package/dist/ui/assets/pierre-light-protanopia-deuteranopia-CaVOBURG.js +1 -0
- package/dist/ui/assets/pierre-light-soft-CVdyfjmI.js +1 -0
- package/dist/ui/assets/pierre-light-tritanopia-B4_gpKOM.js +1 -0
- package/dist/ui/assets/pierre-light-vibrant-DdTDNdfJ.js +1 -0
- package/dist/ui/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/ui/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/ui/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/ui/assets/po-BTJTHyun.js +1 -0
- package/dist/ui/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/ui/assets/polar-C0HS_06l.js +1 -0
- package/dist/ui/assets/postcss-CXtECtnM.js +1 -0
- package/dist/ui/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/ui/assets/powershell-BmBUJMz7.js +1 -0
- package/dist/ui/assets/prisma-Vru482bI.js +1 -0
- package/dist/ui/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/ui/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/ui/assets/pug-DKIMFp6K.js +1 -0
- package/dist/ui/assets/puppet-BMWR74SV.js +1 -0
- package/dist/ui/assets/purescript-CklMAg4u.js +1 -0
- package/dist/ui/assets/python-B6aJPvgy.js +1 -0
- package/dist/ui/assets/qml-3beO22l8.js +1 -0
- package/dist/ui/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/ui/assets/qss-IeuSbFQv.js +1 -0
- package/dist/ui/assets/r-Cf5RLm7j.js +1 -0
- package/dist/ui/assets/racket-BqYA7rlc.js +1 -0
- package/dist/ui/assets/raku-DXvB9xmW.js +1 -0
- package/dist/ui/assets/razor-BjBPvh-w.js +1 -0
- package/dist/ui/assets/rbs-CpoqiR4B.js +1 -0
- package/dist/ui/assets/red-hvxz__6c.js +1 -0
- package/dist/ui/assets/reg-C-SQnVFl.js +1 -0
- package/dist/ui/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/ui/assets/rel-C3B-1QV4.js +1 -0
- package/dist/ui/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/ui/assets/ron-D8l8udqQ.js +1 -0
- package/dist/ui/assets/rose-pine-5qJOZa0Y.js +1 -0
- package/dist/ui/assets/rose-pine-dawn-zx0QlTCp.js +1 -0
- package/dist/ui/assets/rose-pine-moon-C9pEdX9L.js +1 -0
- package/dist/ui/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/ui/assets/rst-bs7f0vWN.js +1 -0
- package/dist/ui/assets/ruby-C0TQ7zu5.js +1 -0
- package/dist/ui/assets/rust-B1yitclQ.js +1 -0
- package/dist/ui/assets/sas-DEy46yEz.js +1 -0
- package/dist/ui/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/ui/assets/scala-CqE71os6.js +1 -0
- package/dist/ui/assets/scheme-C98Dy4si.js +1 -0
- package/dist/ui/assets/scss-D5BDwBP9.js +1 -0
- package/dist/ui/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/ui/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/ui/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/ui/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/ui/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/ui/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/ui/assets/smalltalk-BOQMe2GC.js +1 -0
- package/dist/ui/assets/smithy-cds9vsN8.js +1 -0
- package/dist/ui/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/ui/assets/solarized-dark-CpvCGNkr.js +1 -0
- package/dist/ui/assets/solarized-light-Dlz6yCKv.js +1 -0
- package/dist/ui/assets/solidity-DijEV5ha.js +1 -0
- package/dist/ui/assets/source-serif-4-cyrillic-400-normal-B8Z6Jvzv.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-400-normal-C44pakCn.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-600-normal-BDP5YDHD.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-600-normal-DFnC3vAY.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-400-normal-CWV284fw.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-400-normal-DLkyKLvH.woff +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-600-normal-D_E8FDgP.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-cyrillic-ext-600-normal-DiT2IGQm.woff +0 -0
- package/dist/ui/assets/source-serif-4-greek-400-normal-BccYJ-vZ.woff +0 -0
- package/dist/ui/assets/source-serif-4-greek-400-normal-Cw5-AHNN.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-greek-600-normal-DdRkKr-1.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-greek-600-normal-DhXQw1Kl.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-400-normal-DJ5YJwmz.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-400-normal-Dn3IlU-Z.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-600-normal-DMD1h6_f.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-600-normal-DouSKlru.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-400-normal-CEpydyUl.woff +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-400-normal-Cp7z-ARB.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-600-normal-0sIUyHMO.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-latin-ext-600-normal-C6NNqpJh.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-400-normal-BbG3LG1A.woff2 +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-400-normal-DR1UuFon.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-600-normal-B0WJbuqT.woff +0 -0
- package/dist/ui/assets/source-serif-4-vietnamese-600-normal-CznyfUKR.woff2 +0 -0
- package/dist/ui/assets/soy-8wufbnw4.js +1 -0
- package/dist/ui/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/ui/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/ui/assets/sql-CRqJ_cUM.js +1 -0
- package/dist/ui/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/ui/assets/stata-DI20mbqo.js +1 -0
- package/dist/ui/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/ui/assets/surrealql-Cjom0U5J.js +1 -0
- package/dist/ui/assets/svelte-Cy7k_4gC.js +1 -0
- package/dist/ui/assets/swift-C2oV4EkX.js +1 -0
- package/dist/ui/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/ui/assets/system-verilog-0hqHdDBg.js +1 -0
- package/dist/ui/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/ui/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/ui/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/ui/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/ui/assets/templ-DhtptRzy.js +1 -0
- package/dist/ui/assets/terraform-BETggiCN.js +1 -0
- package/dist/ui/assets/tex-D96PA37w.js +1 -0
- package/dist/ui/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/ui/assets/toml-vGWfd6FD.js +1 -0
- package/dist/ui/assets/ts-tags-D351s5mN.js +1 -0
- package/dist/ui/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/ui/assets/tsx-COt5Ahok.js +1 -0
- package/dist/ui/assets/turtle-BsS91CYL.js +1 -0
- package/dist/ui/assets/twig-27uCiNez.js +1 -0
- package/dist/ui/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/ui/assets/typespec-CAFt9gP4.js +1 -0
- package/dist/ui/assets/typst-BUadGCkm.js +1 -0
- package/dist/ui/assets/v-BGw2Nkan.js +1 -0
- package/dist/ui/assets/vala-CsfeWuGM.js +1 -0
- package/dist/ui/assets/vb-Cu-pLBUe.js +1 -0
- package/dist/ui/assets/verilog-nZwndyjY.js +1 -0
- package/dist/ui/assets/vesper-DRje8inN.js +1 -0
- package/dist/ui/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/ui/assets/viml-CJc9bBzg.js +1 -0
- package/dist/ui/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/ui/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/ui/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/ui/assets/vue-BqiEGhQt.js +1 -0
- package/dist/ui/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/ui/assets/vue-vine-BoDAl6tE.js +1 -0
- package/dist/ui/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/ui/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/ui/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/ui/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/ui/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/ui/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/ui/assets/wit-5i3qLPDT.js +1 -0
- package/dist/ui/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/ui/assets/worker-DsKBD11i.js +156 -0
- package/dist/ui/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/ui/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/ui/assets/yaml-Buea-lGh.js +1 -0
- package/dist/ui/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/ui/assets/zig-VOosw3JB.js +1 -0
- package/dist/ui/index.html +13 -0
- package/package.json +74 -0
- package/skills/comprehende/SKILL.md +68 -0
- package/skills/comprehende/references/example.md +55 -0
- package/skills/comprehende/references/review.schema.json +92 -0
|
@@ -0,0 +1,1585 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function $L(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(r,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(a){if(a.ep)return;a.ep=!0;const l=n(a);fetch(a.href,l)}})();function Q_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bh={exports:{}},Ss={};var sb;function qL(){if(sb)return Ss;sb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,l){var u=null;if(l!==void 0&&(u=""+l),a.key!==void 0&&(u=""+a.key),"key"in a){l={};for(var d in a)d!=="key"&&(l[d]=a[d])}else l=a;return a=l.ref,{$$typeof:e,type:r,key:u,ref:a!==void 0?a:null,props:l}}return Ss.Fragment=t,Ss.jsx=n,Ss.jsxs=n,Ss}var lb;function WL(){return lb||(lb=1,bh.exports=qL()),bh.exports}var M=WL(),Sh={exports:{}},Se={};var ub;function YL(){if(ub)return Se;ub=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function x(O,q,oe){this.props=O,this.context=q,this.refs=w,this.updater=oe||S}x.prototype.isReactComponent={},x.prototype.setState=function(O,q){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,q,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=x.prototype;function L(O,q,oe){this.props=O,this.context=q,this.refs=w,this.updater=oe||S}var A=L.prototype=new E;A.constructor=L,_(A,x.prototype),A.isPureReactComponent=!0;var R=Array.isArray;function N(){}var H={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function Y(O,q,oe){var le=oe.ref;return{$$typeof:e,type:O,key:q,ref:le!==void 0?le:null,props:oe}}function te(O,q){return Y(O.type,q,O.props)}function J(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function K(O){var q={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(oe){return q[oe]})}var ie=/\/+/g;function Z(O,q){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):q.toString(36)}function se(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(N,N):(O.status="pending",O.then(function(q){O.status==="pending"&&(O.status="fulfilled",O.value=q)},function(q){O.status==="pending"&&(O.status="rejected",O.reason=q)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function I(O,q,oe,le,ce){var ue=typeof O;(ue==="undefined"||ue==="boolean")&&(O=null);var ge=!1;if(O===null)ge=!0;else switch(ue){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(O.$$typeof){case e:case t:ge=!0;break;case p:return ge=O._init,I(ge(O._payload),q,oe,le,ce)}}if(ge)return ce=ce(O),ge=le===""?"."+Z(O,0):le,R(ce)?(oe="",ge!=null&&(oe=ge.replace(ie,"$&/")+"/"),I(ce,q,oe,"",function(mt){return mt})):ce!=null&&(J(ce)&&(ce=te(ce,oe+(ce.key==null||O&&O.key===ce.key?"":(""+ce.key).replace(ie,"$&/")+"/")+ge)),q.push(ce)),1;ge=0;var Oe=le===""?".":le+":";if(R(O))for(var me=0;me<O.length;me++)le=O[me],ue=Oe+Z(le,me),ge+=I(le,q,oe,ue,ce);else if(me=b(O),typeof me=="function")for(O=me.call(O),me=0;!(le=O.next()).done;)le=le.value,ue=Oe+Z(le,me++),ge+=I(le,q,oe,ue,ce);else if(ue==="object"){if(typeof O.then=="function")return I(se(O),q,oe,le,ce);throw q=String(O),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ge}function $(O,q,oe){if(O==null)return O;var le=[],ce=0;return I(O,le,"","",function(ue){return q.call(oe,ue,ce++)}),le}function F(O){if(O._status===-1){var q=O._result;q=q(),q.then(function(oe){(O._status===0||O._status===-1)&&(O._status=1,O._result=oe)},function(oe){(O._status===0||O._status===-1)&&(O._status=2,O._result=oe)}),O._status===-1&&(O._status=0,O._result=q)}if(O._status===1)return O._result.default;throw O._result}var re=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},B={map:$,forEach:function(O,q,oe){$(O,function(){q.apply(this,arguments)},oe)},count:function(O){var q=0;return $(O,function(){q++}),q},toArray:function(O){return $(O,function(q){return q})||[]},only:function(O){if(!J(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Se.Activity=m,Se.Children=B,Se.Component=x,Se.Fragment=n,Se.Profiler=a,Se.PureComponent=L,Se.StrictMode=r,Se.Suspense=f,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Se.__COMPILER_RUNTIME={__proto__:null,c:function(O){return H.H.useMemoCache(O)}},Se.cache=function(O){return function(){return O.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(O,q,oe){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var le=_({},O.props),ce=O.key;if(q!=null)for(ue in q.key!==void 0&&(ce=""+q.key),q)!U.call(q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&q.ref===void 0||(le[ue]=q[ue]);var ue=arguments.length-2;if(ue===1)le.children=oe;else if(1<ue){for(var ge=Array(ue),Oe=0;Oe<ue;Oe++)ge[Oe]=arguments[Oe+2];le.children=ge}return Y(O.type,ce,le)},Se.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},Se.createElement=function(O,q,oe){var le,ce={},ue=null;if(q!=null)for(le in q.key!==void 0&&(ue=""+q.key),q)U.call(q,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ce[le]=q[le]);var ge=arguments.length-2;if(ge===1)ce.children=oe;else if(1<ge){for(var Oe=Array(ge),me=0;me<ge;me++)Oe[me]=arguments[me+2];ce.children=Oe}if(O&&O.defaultProps)for(le in ge=O.defaultProps,ge)ce[le]===void 0&&(ce[le]=ge[le]);return Y(O,ue,ce)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(O){return{$$typeof:d,render:O}},Se.isValidElement=J,Se.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:F}},Se.memo=function(O,q){return{$$typeof:h,type:O,compare:q===void 0?null:q}},Se.startTransition=function(O){var q=H.T,oe={};H.T=oe;try{var le=O(),ce=H.S;ce!==null&&ce(oe,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(N,re)}catch(ue){re(ue)}finally{q!==null&&oe.types!==null&&(q.types=oe.types),H.T=q}},Se.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Se.use=function(O){return H.H.use(O)},Se.useActionState=function(O,q,oe){return H.H.useActionState(O,q,oe)},Se.useCallback=function(O,q){return H.H.useCallback(O,q)},Se.useContext=function(O){return H.H.useContext(O)},Se.useDebugValue=function(){},Se.useDeferredValue=function(O,q){return H.H.useDeferredValue(O,q)},Se.useEffect=function(O,q){return H.H.useEffect(O,q)},Se.useEffectEvent=function(O){return H.H.useEffectEvent(O)},Se.useId=function(){return H.H.useId()},Se.useImperativeHandle=function(O,q,oe){return H.H.useImperativeHandle(O,q,oe)},Se.useInsertionEffect=function(O,q){return H.H.useInsertionEffect(O,q)},Se.useLayoutEffect=function(O,q){return H.H.useLayoutEffect(O,q)},Se.useMemo=function(O,q){return H.H.useMemo(O,q)},Se.useOptimistic=function(O,q){return H.H.useOptimistic(O,q)},Se.useReducer=function(O,q,oe){return H.H.useReducer(O,q,oe)},Se.useRef=function(O){return H.H.useRef(O)},Se.useState=function(O){return H.H.useState(O)},Se.useSyncExternalStore=function(O,q,oe){return H.H.useSyncExternalStore(O,q,oe)},Se.useTransition=function(){return H.H.useTransition()},Se.version="19.2.8",Se}var cb;function gm(){return cb||(cb=1,Sh.exports=YL()),Sh.exports}var D=gm();const XL=Q_(D),Ks=$L({__proto__:null,default:XL},[D]);var _h={exports:{}},_s={},Ch={exports:{}},xh={};var db;function KL(){return db||(db=1,(function(e){function t(I,$){var F=I.length;I.push($);e:for(;0<F;){var re=F-1>>>1,B=I[re];if(0<a(B,$))I[re]=$,I[F]=B,F=re;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var $=I[0],F=I.pop();if(F!==$){I[0]=F;e:for(var re=0,B=I.length,O=B>>>1;re<O;){var q=2*(re+1)-1,oe=I[q],le=q+1,ce=I[le];if(0>a(oe,F))le<B&&0>a(ce,oe)?(I[re]=ce,I[le]=F,re=le):(I[re]=oe,I[q]=F,re=q);else if(le<B&&0>a(ce,F))I[re]=ce,I[le]=F,re=le;else break e}}return $}function a(I,$){var F=I.sortIndex-$.sortIndex;return F!==0?F:I.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],p=1,m=null,y=3,b=!1,S=!1,_=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function A(I){for(var $=n(h);$!==null;){if($.callback===null)r(h);else if($.startTime<=I)r(h),$.sortIndex=$.expirationTime,t(f,$);else break;$=n(h)}}function R(I){if(_=!1,A(I),!S)if(n(f)!==null)S=!0,N||(N=!0,K());else{var $=n(h);$!==null&&se(R,$.startTime-I)}}var N=!1,H=-1,U=5,Y=-1;function te(){return w?!0:!(e.unstable_now()-Y<U)}function J(){if(w=!1,N){var I=e.unstable_now();Y=I;var $=!0;try{e:{S=!1,_&&(_=!1,E(H),H=-1),b=!0;var F=y;try{t:{for(A(I),m=n(f);m!==null&&!(m.expirationTime>I&&te());){var re=m.callback;if(typeof re=="function"){m.callback=null,y=m.priorityLevel;var B=re(m.expirationTime<=I);if(I=e.unstable_now(),typeof B=="function"){m.callback=B,A(I),$=!0;break t}m===n(f)&&r(f),A(I)}else r(f);m=n(f)}if(m!==null)$=!0;else{var O=n(h);O!==null&&se(R,O.startTime-I),$=!1}}break e}finally{m=null,y=F,b=!1}$=void 0}}finally{$?K():N=!1}}}var K;if(typeof L=="function")K=function(){L(J)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Z=ie.port2;ie.port1.onmessage=J,K=function(){Z.postMessage(null)}}else K=function(){x(J,0)};function se(I,$){H=x(function(){I(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(I){switch(y){case 1:case 2:case 3:var $=3;break;default:$=y}var F=y;y=$;try{return I()}finally{y=F}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(I,$){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var F=y;y=I;try{return $()}finally{y=F}},e.unstable_scheduleCallback=function(I,$,F){var re=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?re+F:re):F=re,I){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=F+B,I={id:p++,callback:$,priorityLevel:I,startTime:F,expirationTime:B,sortIndex:-1},F>re?(I.sortIndex=F,t(h,I),n(f)===null&&I===n(h)&&(_?(E(H),H=-1):_=!0,se(R,F-re))):(I.sortIndex=B,t(f,I),S||b||(S=!0,N||(N=!0,K()))),I},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(I){var $=y;return function(){var F=y;y=$;try{return I.apply(this,arguments)}finally{y=F}}}})(xh)),xh}var fb;function QL(){return fb||(fb=1,Ch.exports=KL()),Ch.exports}var Eh={exports:{}},Tt={};var hb;function ZL(){if(hb)return Tt;hb=1;var e=gm();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function l(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Tt.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},Tt.flushSync=function(f){var h=u.T,p=r.p;try{if(u.T=null,r.p=2,f)return f()}finally{u.T=h,r.p=p,r.d.f()}},Tt.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},Tt.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Tt.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=d(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:b}):p==="script"&&r.d.X(f,{crossOrigin:m,integrity:y,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tt.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},Tt.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=d(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Tt.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=d(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},Tt.requestFormReset=function(f){r.d.r(f)},Tt.unstable_batchedUpdates=function(f,h){return f(h)},Tt.useFormState=function(f,h,p){return u.H.useFormState(f,h,p)},Tt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Tt.version="19.2.8",Tt}var pb;function Z_(){if(pb)return Eh.exports;pb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=ZL(),Eh.exports}var mb;function JL(){if(mb)return _s;mb=1;var e=QL(),t=gm(),n=Z_();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var o=i,s=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(s=o.return),i=o.return;while(i)}return o.tag===3?s:null}function u(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function f(i){if(l(i)!==i)throw Error(r(188))}function h(i){var o=i.alternate;if(!o){if(o=l(i),o===null)throw Error(r(188));return o!==i?null:i}for(var s=i,c=o;;){var g=s.return;if(g===null)break;var v=g.alternate;if(v===null){if(c=g.return,c!==null){s=c;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===s)return f(g),i;if(v===c)return f(g),o;v=v.sibling}throw Error(r(188))}if(s.return!==c.return)s=g,c=v;else{for(var C=!1,T=g.child;T;){if(T===s){C=!0,s=g,c=v;break}if(T===c){C=!0,c=g,s=v;break}T=T.sibling}if(!C){for(T=v.child;T;){if(T===s){C=!0,s=v,c=g;break}if(T===c){C=!0,c=v,s=g;break}T=T.sibling}if(!C)throw Error(r(189))}}if(s.alternate!==c)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?i:o}function p(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=p(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),L=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function K(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var ie=Symbol.for("react.client.reference");function Z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ie?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList";case Y:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case L:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case A:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case H:return o=i.displayName||null,o!==null?o:Z(i.type)||"Memo";case U:o=i._payload,i=i._init;try{return Z(i(o))}catch{}}return null}var se=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},re=[],B=-1;function O(i){return{current:i}}function q(i){0>B||(i.current=re[B],re[B]=null,B--)}function oe(i,o){B++,re[B]=i.current,i.current=o}var le=O(null),ce=O(null),ue=O(null),ge=O(null);function Oe(i,o){switch(oe(ue,o),oe(ce,i),oe(le,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?Ry(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=Ry(o),i=Oy(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}q(le),oe(le,i)}function me(){q(le),q(ce),q(ue)}function mt(i){i.memoizedState!==null&&oe(ge,i);var o=le.current,s=Oy(o,i.type);o!==s&&(oe(ce,i),oe(le,s))}function Je(i){ce.current===i&&(q(le),q(ce)),ge.current===i&&(q(ge),gs._currentValue=F)}var Xe,Ne;function ze(i){if(Xe===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);Xe=o&&o[1]||"",Ne=-1<s.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Xe+i+Ne}var Ke=!1;function wn(i,o){if(!i||Ke)return"";Ke=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(o){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(X){var W=X}Reflect.construct(i,[],ne)}else{try{ne.call()}catch(X){W=X}i.call(ne.prototype)}}else{try{throw Error()}catch(X){W=X}(ne=i())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(X){if(X&&W&&typeof X.stack=="string")return[X.stack,W.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),C=v[0],T=v[1];if(C&&T){var z=C.split(`
|
|
5
|
+
`),G=T.split(`
|
|
6
|
+
`);for(g=c=0;c<z.length&&!z[c].includes("DetermineComponentFrameRoot");)c++;for(;g<G.length&&!G[g].includes("DetermineComponentFrameRoot");)g++;if(c===z.length||g===G.length)for(c=z.length-1,g=G.length-1;1<=c&&0<=g&&z[c]!==G[g];)g--;for(;1<=c&&0<=g;c--,g--)if(z[c]!==G[g]){if(c!==1||g!==1)do if(c--,g--,0>g||z[c]!==G[g]){var Q=`
|
|
7
|
+
`+z[c].replace(" at new "," at ");return i.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",i.displayName)),Q}while(1<=c&&0<=g);break}}}finally{Ke=!1,Error.prepareStackTrace=s}return(s=i?i.displayName||i.name:"")?ze(s):""}function Xt(i,o){switch(i.tag){case 26:case 27:case 5:return ze(i.type);case 16:return ze("Lazy");case 13:return i.child!==o&&o!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return wn(i.type,!1);case 11:return wn(i.type.render,!1);case 1:return wn(i.type,!0);case 31:return ze("Activity");default:return""}}function zt(i){try{var o="",s=null;do o+=Xt(i,s),s=i,i=i.return;while(i);return o}catch(c){return`
|
|
8
|
+
Error generating stack: `+c.message+`
|
|
9
|
+
`+c.stack}}var cn=Object.prototype.hasOwnProperty,gt=e.unstable_scheduleCallback,Hi=e.unstable_cancelCallback,x1=e.unstable_shouldYield,E1=e.unstable_requestPaint,Kt=e.unstable_now,w1=e.unstable_getCurrentPriorityLevel,lg=e.unstable_ImmediatePriority,ug=e.unstable_UserBlockingPriority,rl=e.unstable_NormalPriority,k1=e.unstable_LowPriority,cg=e.unstable_IdlePriority,L1=e.log,T1=e.unstable_setDisableYieldValue,Ta=null,Qt=null;function Pi(i){if(typeof L1=="function"&&T1(i),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Ta,i)}catch{}}var Zt=Math.clz32?Math.clz32:O1,A1=Math.log,R1=Math.LN2;function O1(i){return i>>>=0,i===0?32:31-(A1(i)/R1|0)|0}var ol=256,al=262144,sl=4194304;function wr(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function ll(i,o,s){var c=i.pendingLanes;if(c===0)return 0;var g=0,v=i.suspendedLanes,C=i.pingedLanes;i=i.warmLanes;var T=c&134217727;return T!==0?(c=T&~v,c!==0?g=wr(c):(C&=T,C!==0?g=wr(C):s||(s=T&~i,s!==0&&(g=wr(s))))):(T=c&~v,T!==0?g=wr(T):C!==0?g=wr(C):s||(s=c&~i,s!==0&&(g=wr(s)))),g===0?0:o!==0&&o!==g&&(o&v)===0&&(v=g&-g,s=o&-o,v>=s||v===32&&(s&4194048)!==0)?o:g}function Aa(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function D1(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dg(){var i=sl;return sl<<=1,(sl&62914560)===0&&(sl=4194304),i}function ad(i){for(var o=[],s=0;31>s;s++)o.push(i);return o}function Ra(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function M1(i,o,s,c,g,v){var C=i.pendingLanes;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=s,i.entangledLanes&=s,i.errorRecoveryDisabledLanes&=s,i.shellSuspendCounter=0;var T=i.entanglements,z=i.expirationTimes,G=i.hiddenUpdates;for(s=C&~s;0<s;){var Q=31-Zt(s),ne=1<<Q;T[Q]=0,z[Q]=-1;var W=G[Q];if(W!==null)for(G[Q]=null,Q=0;Q<W.length;Q++){var X=W[Q];X!==null&&(X.lane&=-536870913)}s&=~ne}c!==0&&fg(i,c,0),v!==0&&g===0&&i.tag!==0&&(i.suspendedLanes|=v&~(C&~o))}function fg(i,o,s){i.pendingLanes|=o,i.suspendedLanes&=~o;var c=31-Zt(o);i.entangledLanes|=o,i.entanglements[c]=i.entanglements[c]|1073741824|s&261930}function hg(i,o){var s=i.entangledLanes|=o;for(i=i.entanglements;s;){var c=31-Zt(s),g=1<<c;g&o|i[c]&o&&(i[c]|=o),s&=~g}}function pg(i,o){var s=o&-o;return s=(s&42)!==0?1:sd(s),(s&(i.suspendedLanes|o))!==0?0:s}function sd(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ld(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function mg(){var i=$.p;return i!==0?i:(i=window.event,i===void 0?32:eb(i.type))}function gg(i,o){var s=$.p;try{return $.p=i,o()}finally{$.p=s}}var Ui=Math.random().toString(36).slice(2),xt="__reactFiber$"+Ui,Ht="__reactProps$"+Ui,bo="__reactContainer$"+Ui,ud="__reactEvents$"+Ui,N1="__reactListeners$"+Ui,I1="__reactHandles$"+Ui,vg="__reactResources$"+Ui,Oa="__reactMarker$"+Ui;function cd(i){delete i[xt],delete i[Ht],delete i[ud],delete i[N1],delete i[I1]}function So(i){var o=i[xt];if(o)return o;for(var s=i.parentNode;s;){if(o=s[bo]||s[xt]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(i=Py(i);i!==null;){if(s=i[xt])return s;i=Py(i)}return o}i=s,s=i.parentNode}return null}function _o(i){if(i=i[xt]||i[bo]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function Da(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Co(i){var o=i[vg];return o||(o=i[vg]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function vt(i){i[Oa]=!0}var yg=new Set,bg={};function kr(i,o){xo(i,o),xo(i+"Capture",o)}function xo(i,o){for(bg[i]=o,i=0;i<o.length;i++)yg.add(o[i])}var z1=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]*$"),Sg={},_g={};function H1(i){return cn.call(_g,i)?!0:cn.call(Sg,i)?!1:z1.test(i)?_g[i]=!0:(Sg[i]=!0,!1)}function ul(i,o,s){if(H1(o))if(s===null)i.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+s)}}function cl(i,o,s){if(s===null)i.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+s)}}function ti(i,o,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttributeNS(o,s,""+c)}}function dn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Cg(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function P1(i,o,s){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var g=c.get,v=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return g.call(this)},set:function(C){s=""+C,v.call(this,C)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(C){s=""+C},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function dd(i){if(!i._valueTracker){var o=Cg(i)?"checked":"value";i._valueTracker=P1(i,o,""+i[o])}}function xg(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var s=o.getValue(),c="";return i&&(c=Cg(i)?i.checked?"true":"false":i.value),i=c,i!==s?(o.setValue(i),!0):!1}function dl(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var U1=/[\n"\\]/g;function fn(i){return i.replace(U1,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function fd(i,o,s,c,g,v,C,T){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),o!=null?C==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+dn(o)):i.value!==""+dn(o)&&(i.value=""+dn(o)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),o!=null?hd(i,C,dn(o)):s!=null?hd(i,C,dn(s)):c!=null&&i.removeAttribute("value"),g==null&&v!=null&&(i.defaultChecked=!!v),g!=null&&(i.checked=g&&typeof g!="function"&&typeof g!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?i.name=""+dn(T):i.removeAttribute("name")}function Eg(i,o,s,c,g,v,C,T){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(i.type=v),o!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||o!=null)){dd(i);return}s=s!=null?""+dn(s):"",o=o!=null?""+dn(o):s,T||o===i.value||(i.value=o),i.defaultValue=o}c=c??g,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=T?i.checked:!!c,i.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C),dd(i)}function hd(i,o,s){o==="number"&&dl(i.ownerDocument)===i||i.defaultValue===""+s||(i.defaultValue=""+s)}function Eo(i,o,s,c){if(i=i.options,o){o={};for(var g=0;g<s.length;g++)o["$"+s[g]]=!0;for(s=0;s<i.length;s++)g=o.hasOwnProperty("$"+i[s].value),i[s].selected!==g&&(i[s].selected=g),g&&c&&(i[s].defaultSelected=!0)}else{for(s=""+dn(s),o=null,g=0;g<i.length;g++){if(i[g].value===s){i[g].selected=!0,c&&(i[g].defaultSelected=!0);return}o!==null||i[g].disabled||(o=i[g])}o!==null&&(o.selected=!0)}}function wg(i,o,s){if(o!=null&&(o=""+dn(o),o!==i.value&&(i.value=o),s==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=s!=null?""+dn(s):""}function kg(i,o,s,c){if(o==null){if(c!=null){if(s!=null)throw Error(r(92));if(se(c)){if(1<c.length)throw Error(r(93));c=c[0]}s=c}s==null&&(s=""),o=s}s=dn(o),i.defaultValue=s,c=i.textContent,c===s&&c!==""&&c!==null&&(i.value=c),dd(i)}function wo(i,o){if(o){var s=i.firstChild;if(s&&s===i.lastChild&&s.nodeType===3){s.nodeValue=o;return}}i.textContent=o}var V1=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 Lg(i,o,s){var c=o.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":c?i.setProperty(o,s):typeof s!="number"||s===0||V1.has(o)?o==="float"?i.cssFloat=s:i[o]=(""+s).trim():i[o]=s+"px"}function Tg(i,o,s){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="");for(var g in o)c=o[g],o.hasOwnProperty(g)&&s[g]!==c&&Lg(i,g,c)}else for(var v in o)o.hasOwnProperty(v)&&Lg(i,v,o[v])}function pd(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B1=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"]]),j1=/^[\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 fl(i){return j1.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function ni(){}var md=null;function gd(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ko=null,Lo=null;function Ag(i){var o=_o(i);if(o&&(i=o.stateNode)){var s=i[Ht]||null;e:switch(i=o.stateNode,o.type){case"input":if(fd(i,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=i;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+fn(""+o)+'"][type="radio"]'),o=0;o<s.length;o++){var c=s[o];if(c!==i&&c.form===i.form){var g=c[Ht]||null;if(!g)throw Error(r(90));fd(c,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(o=0;o<s.length;o++)c=s[o],c.form===i.form&&xg(c)}break e;case"textarea":wg(i,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&Eo(i,!!s.multiple,o,!1)}}}var vd=!1;function Rg(i,o,s){if(vd)return i(o,s);vd=!0;try{var c=i(o);return c}finally{if(vd=!1,(ko!==null||Lo!==null)&&(Jl(),ko&&(o=ko,i=Lo,Lo=ko=null,Ag(o),i)))for(o=0;o<i.length;o++)Ag(i[o])}}function Ma(i,o){var s=i.stateNode;if(s===null)return null;var c=s[Ht]||null;if(c===null)return null;s=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break e;default:i=!1}if(i)return null;if(s&&typeof s!="function")throw Error(r(231,o,typeof s));return s}var ii=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yd=!1;if(ii)try{var Na={};Object.defineProperty(Na,"passive",{get:function(){yd=!0}}),window.addEventListener("test",Na,Na),window.removeEventListener("test",Na,Na)}catch{yd=!1}var Vi=null,bd=null,hl=null;function Og(){if(hl)return hl;var i,o=bd,s=o.length,c,g="value"in Vi?Vi.value:Vi.textContent,v=g.length;for(i=0;i<s&&o[i]===g[i];i++);var C=s-i;for(c=1;c<=C&&o[s-c]===g[v-c];c++);return hl=g.slice(i,1<c?1-c:void 0)}function pl(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function ml(){return!0}function Dg(){return!1}function Pt(i){function o(s,c,g,v,C){this._reactName=s,this._targetInst=g,this.type=c,this.nativeEvent=v,this.target=C,this.currentTarget=null;for(var T in i)i.hasOwnProperty(T)&&(s=i[T],this[T]=s?s(v):v[T]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?ml:Dg,this.isPropagationStopped=Dg,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ml)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ml)},persist:function(){},isPersistent:ml}),o}var Lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gl=Pt(Lr),Ia=m({},Lr,{view:0,detail:0}),F1=Pt(Ia),Sd,_d,za,vl=m({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xd,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==za&&(za&&i.type==="mousemove"?(Sd=i.screenX-za.screenX,_d=i.screenY-za.screenY):_d=Sd=0,za=i),Sd)},movementY:function(i){return"movementY"in i?i.movementY:_d}}),Mg=Pt(vl),G1=m({},vl,{dataTransfer:0}),$1=Pt(G1),q1=m({},Ia,{relatedTarget:0}),Cd=Pt(q1),W1=m({},Lr,{animationName:0,elapsedTime:0,pseudoElement:0}),Y1=Pt(W1),X1=m({},Lr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),K1=Pt(X1),Q1=m({},Lr,{data:0}),Ng=Pt(Q1),Z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J1={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"},ek={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tk(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=ek[i])?!!o[i]:!1}function xd(){return tk}var nk=m({},Ia,{key:function(i){if(i.key){var o=Z1[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=pl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?J1[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xd,charCode:function(i){return i.type==="keypress"?pl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?pl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),ik=Pt(nk),rk=m({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ig=Pt(rk),ok=m({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xd}),ak=Pt(ok),sk=m({},Lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),lk=Pt(sk),uk=m({},vl,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),ck=Pt(uk),dk=m({},Lr,{newState:0,oldState:0}),fk=Pt(dk),hk=[9,13,27,32],Ed=ii&&"CompositionEvent"in window,Ha=null;ii&&"documentMode"in document&&(Ha=document.documentMode);var pk=ii&&"TextEvent"in window&&!Ha,zg=ii&&(!Ed||Ha&&8<Ha&&11>=Ha),Hg=" ",Pg=!1;function Ug(i,o){switch(i){case"keyup":return hk.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var To=!1;function mk(i,o){switch(i){case"compositionend":return Vg(o);case"keypress":return o.which!==32?null:(Pg=!0,Hg);case"textInput":return i=o.data,i===Hg&&Pg?null:i;default:return null}}function gk(i,o){if(To)return i==="compositionend"||!Ed&&Ug(i,o)?(i=Og(),hl=bd=Vi=null,To=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return zg&&o.locale!=="ko"?null:o.data;default:return null}}var vk={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 Bg(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!vk[i.type]:o==="textarea"}function jg(i,o,s,c){ko?Lo?Lo.push(c):Lo=[c]:ko=c,o=au(o,"onChange"),0<o.length&&(s=new gl("onChange","change",null,s,c),i.push({event:s,listeners:o}))}var Pa=null,Ua=null;function yk(i){Ey(i,0)}function yl(i){var o=Da(i);if(xg(o))return i}function Fg(i,o){if(i==="change")return o}var Gg=!1;if(ii){var wd;if(ii){var kd="oninput"in document;if(!kd){var $g=document.createElement("div");$g.setAttribute("oninput","return;"),kd=typeof $g.oninput=="function"}wd=kd}else wd=!1;Gg=wd&&(!document.documentMode||9<document.documentMode)}function qg(){Pa&&(Pa.detachEvent("onpropertychange",Wg),Ua=Pa=null)}function Wg(i){if(i.propertyName==="value"&&yl(Ua)){var o=[];jg(o,Ua,i,gd(i)),Rg(yk,o)}}function bk(i,o,s){i==="focusin"?(qg(),Pa=o,Ua=s,Pa.attachEvent("onpropertychange",Wg)):i==="focusout"&&qg()}function Sk(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return yl(Ua)}function _k(i,o){if(i==="click")return yl(o)}function Ck(i,o){if(i==="input"||i==="change")return yl(o)}function xk(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Jt=typeof Object.is=="function"?Object.is:xk;function Va(i,o){if(Jt(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var s=Object.keys(i),c=Object.keys(o);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var g=s[c];if(!cn.call(o,g)||!Jt(i[g],o[g]))return!1}return!0}function Yg(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Xg(i,o){var s=Yg(i);i=0;for(var c;s;){if(s.nodeType===3){if(c=i+s.textContent.length,i<=o&&c>=o)return{node:s,offset:o-i};i=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Yg(s)}}function Kg(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Kg(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Qg(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=dl(i.document);o instanceof i.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)i=o.contentWindow;else break;o=dl(i.document)}return o}function Ld(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var Ek=ii&&"documentMode"in document&&11>=document.documentMode,Ao=null,Td=null,Ba=null,Ad=!1;function Zg(i,o,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ad||Ao==null||Ao!==dl(c)||(c=Ao,"selectionStart"in c&&Ld(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ba&&Va(Ba,c)||(Ba=c,c=au(Td,"onSelect"),0<c.length&&(o=new gl("onSelect","select",null,o,s),i.push({event:o,listeners:c}),o.target=Ao)))}function Tr(i,o){var s={};return s[i.toLowerCase()]=o.toLowerCase(),s["Webkit"+i]="webkit"+o,s["Moz"+i]="moz"+o,s}var Ro={animationend:Tr("Animation","AnimationEnd"),animationiteration:Tr("Animation","AnimationIteration"),animationstart:Tr("Animation","AnimationStart"),transitionrun:Tr("Transition","TransitionRun"),transitionstart:Tr("Transition","TransitionStart"),transitioncancel:Tr("Transition","TransitionCancel"),transitionend:Tr("Transition","TransitionEnd")},Rd={},Jg={};ii&&(Jg=document.createElement("div").style,"AnimationEvent"in window||(delete Ro.animationend.animation,delete Ro.animationiteration.animation,delete Ro.animationstart.animation),"TransitionEvent"in window||delete Ro.transitionend.transition);function Ar(i){if(Rd[i])return Rd[i];if(!Ro[i])return i;var o=Ro[i],s;for(s in o)if(o.hasOwnProperty(s)&&s in Jg)return Rd[i]=o[s];return i}var ev=Ar("animationend"),tv=Ar("animationiteration"),nv=Ar("animationstart"),wk=Ar("transitionrun"),kk=Ar("transitionstart"),Lk=Ar("transitioncancel"),iv=Ar("transitionend"),rv=new Map,Od="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(" ");Od.push("scrollEnd");function kn(i,o){rv.set(i,o),kr(o,[i])}var bl=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},hn=[],Oo=0,Dd=0;function Sl(){for(var i=Oo,o=Dd=Oo=0;o<i;){var s=hn[o];hn[o++]=null;var c=hn[o];hn[o++]=null;var g=hn[o];hn[o++]=null;var v=hn[o];if(hn[o++]=null,c!==null&&g!==null){var C=c.pending;C===null?g.next=g:(g.next=C.next,C.next=g),c.pending=g}v!==0&&ov(s,g,v)}}function _l(i,o,s,c){hn[Oo++]=i,hn[Oo++]=o,hn[Oo++]=s,hn[Oo++]=c,Dd|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function Md(i,o,s,c){return _l(i,o,s,c),Cl(i)}function Rr(i,o){return _l(i,null,null,o),Cl(i)}function ov(i,o,s){i.lanes|=s;var c=i.alternate;c!==null&&(c.lanes|=s);for(var g=!1,v=i.return;v!==null;)v.childLanes|=s,c=v.alternate,c!==null&&(c.childLanes|=s),v.tag===22&&(i=v.stateNode,i===null||i._visibility&1||(g=!0)),i=v,v=v.return;return i.tag===3?(v=i.stateNode,g&&o!==null&&(g=31-Zt(s),i=v.hiddenUpdates,c=i[g],c===null?i[g]=[o]:c.push(o),o.lane=s|536870912),v):null}function Cl(i){if(50<us)throw us=0,Ff=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Do={};function Tk(i,o,s,c){this.tag=i,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(i,o,s,c){return new Tk(i,o,s,c)}function Nd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ri(i,o){var s=i.alternate;return s===null?(s=en(i.tag,o,i.key,i.mode),s.elementType=i.elementType,s.type=i.type,s.stateNode=i.stateNode,s.alternate=i,i.alternate=s):(s.pendingProps=o,s.type=i.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=i.flags&65011712,s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,o=i.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=i.sibling,s.index=i.index,s.ref=i.ref,s.refCleanup=i.refCleanup,s}function av(i,o){i.flags&=65011714;var s=i.alternate;return s===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,o=s.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function xl(i,o,s,c,g,v){var C=0;if(c=i,typeof i=="function")Nd(i)&&(C=1);else if(typeof i=="string")C=ML(i,s,le.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case Y:return i=en(31,s,o,g),i.elementType=Y,i.lanes=v,i;case _:return Or(s.children,g,v,o);case w:C=8,g|=24;break;case x:return i=en(12,s,o,g|2),i.elementType=x,i.lanes=v,i;case R:return i=en(13,s,o,g),i.elementType=R,i.lanes=v,i;case N:return i=en(19,s,o,g),i.elementType=N,i.lanes=v,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case L:C=10;break e;case E:C=9;break e;case A:C=11;break e;case H:C=14;break e;case U:C=16,c=null;break e}C=29,s=Error(r(130,i===null?"null":typeof i,"")),c=null}return o=en(C,s,o,g),o.elementType=i,o.type=c,o.lanes=v,o}function Or(i,o,s,c){return i=en(7,i,c,o),i.lanes=s,i}function Id(i,o,s){return i=en(6,i,null,o),i.lanes=s,i}function sv(i){var o=en(18,null,null,0);return o.stateNode=i,o}function zd(i,o,s){return o=en(4,i.children!==null?i.children:[],i.key,o),o.lanes=s,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var lv=new WeakMap;function pn(i,o){if(typeof i=="object"&&i!==null){var s=lv.get(i);return s!==void 0?s:(o={value:i,source:o,stack:zt(o)},lv.set(i,o),o)}return{value:i,source:o,stack:zt(o)}}var Mo=[],No=0,El=null,ja=0,mn=[],gn=0,Bi=null,zn=1,Hn="";function oi(i,o){Mo[No++]=ja,Mo[No++]=El,El=i,ja=o}function uv(i,o,s){mn[gn++]=zn,mn[gn++]=Hn,mn[gn++]=Bi,Bi=i;var c=zn;i=Hn;var g=32-Zt(c)-1;c&=~(1<<g),s+=1;var v=32-Zt(o)+g;if(30<v){var C=g-g%5;v=(c&(1<<C)-1).toString(32),c>>=C,g-=C,zn=1<<32-Zt(o)+g|s<<g|c,Hn=v+i}else zn=1<<v|s<<g|c,Hn=i}function Hd(i){i.return!==null&&(oi(i,1),uv(i,1,0))}function Pd(i){for(;i===El;)El=Mo[--No],Mo[No]=null,ja=Mo[--No],Mo[No]=null;for(;i===Bi;)Bi=mn[--gn],mn[gn]=null,Hn=mn[--gn],mn[gn]=null,zn=mn[--gn],mn[gn]=null}function cv(i,o){mn[gn++]=zn,mn[gn++]=Hn,mn[gn++]=Bi,zn=o.id,Hn=o.overflow,Bi=i}var Et=null,qe=null,Re=!1,ji=null,vn=!1,Ud=Error(r(519));function Fi(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fa(pn(o,i)),Ud}function dv(i){var o=i.stateNode,s=i.type,c=i.memoizedProps;switch(o[xt]=i,o[Ht]=c,s){case"dialog":Le("cancel",o),Le("close",o);break;case"iframe":case"object":case"embed":Le("load",o);break;case"video":case"audio":for(s=0;s<ds.length;s++)Le(ds[s],o);break;case"source":Le("error",o);break;case"img":case"image":case"link":Le("error",o),Le("load",o);break;case"details":Le("toggle",o);break;case"input":Le("invalid",o),Eg(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Le("invalid",o);break;case"textarea":Le("invalid",o),kg(o,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||o.textContent===""+s||c.suppressHydrationWarning===!0||Ty(o.textContent,s)?(c.popover!=null&&(Le("beforetoggle",o),Le("toggle",o)),c.onScroll!=null&&Le("scroll",o),c.onScrollEnd!=null&&Le("scrollend",o),c.onClick!=null&&(o.onclick=ni),o=!0):o=!1,o||Fi(i,!0)}function fv(i){for(Et=i.return;Et;)switch(Et.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Et=Et.return}}function Io(i){if(i!==Et)return!1;if(!Re)return fv(i),Re=!0,!1;var o=i.tag,s;if((s=o!==3&&o!==27)&&((s=o===5)&&(s=i.type,s=!(s!=="form"&&s!=="button")||rh(i.type,i.memoizedProps)),s=!s),s&&qe&&Fi(i),fv(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));qe=Hy(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));qe=Hy(i)}else o===27?(o=qe,ir(i.type)?(i=uh,uh=null,qe=i):qe=o):qe=Et?bn(i.stateNode.nextSibling):null;return!0}function Dr(){qe=Et=null,Re=!1}function Vd(){var i=ji;return i!==null&&(jt===null?jt=i:jt.push.apply(jt,i),ji=null),i}function Fa(i){ji===null?ji=[i]:ji.push(i)}var Bd=O(null),Mr=null,ai=null;function Gi(i,o,s){oe(Bd,o._currentValue),o._currentValue=s}function si(i){i._currentValue=Bd.current,q(Bd)}function jd(i,o,s){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===s)break;i=i.return}}function Fd(i,o,s,c){var g=i.child;for(g!==null&&(g.return=i);g!==null;){var v=g.dependencies;if(v!==null){var C=g.child;v=v.firstContext;e:for(;v!==null;){var T=v;v=g;for(var z=0;z<o.length;z++)if(T.context===o[z]){v.lanes|=s,T=v.alternate,T!==null&&(T.lanes|=s),jd(v.return,s,i),c||(C=null);break e}v=T.next}}else if(g.tag===18){if(C=g.return,C===null)throw Error(r(341));C.lanes|=s,v=C.alternate,v!==null&&(v.lanes|=s),jd(C,s,i),C=null}else C=g.child;if(C!==null)C.return=g;else for(C=g;C!==null;){if(C===i){C=null;break}if(g=C.sibling,g!==null){g.return=C.return,C=g;break}C=C.return}g=C}}function zo(i,o,s,c){i=null;for(var g=o,v=!1;g!==null;){if(!v){if((g.flags&524288)!==0)v=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var C=g.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var T=g.type;Jt(g.pendingProps.value,C.value)||(i!==null?i.push(T):i=[T])}}else if(g===ge.current){if(C=g.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(i!==null?i.push(gs):i=[gs])}g=g.return}i!==null&&Fd(o,i,s,c),o.flags|=262144}function wl(i){for(i=i.firstContext;i!==null;){if(!Jt(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Nr(i){Mr=i,ai=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function wt(i){return hv(Mr,i)}function kl(i,o){return Mr===null&&Nr(i),hv(i,o)}function hv(i,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},ai===null){if(i===null)throw Error(r(308));ai=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else ai=ai.next=o;return s}var Ak=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(s,c){i.push(c)}};this.abort=function(){o.aborted=!0,i.forEach(function(s){return s()})}},Rk=e.unstable_scheduleCallback,Ok=e.unstable_NormalPriority,rt={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gd(){return{controller:new Ak,data:new Map,refCount:0}}function Ga(i){i.refCount--,i.refCount===0&&Rk(Ok,function(){i.controller.abort()})}var $a=null,$d=0,Ho=0,Po=null;function Dk(i,o){if($a===null){var s=$a=[];$d=0,Ho=Xf(),Po={status:"pending",value:void 0,then:function(c){s.push(c)}}}return $d++,o.then(pv,pv),o}function pv(){if(--$d===0&&$a!==null){Po!==null&&(Po.status="fulfilled");var i=$a;$a=null,Ho=0,Po=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function Mk(i,o){var s=[],c={status:"pending",value:null,reason:null,then:function(g){s.push(g)}};return i.then(function(){c.status="fulfilled",c.value=o;for(var g=0;g<s.length;g++)(0,s[g])(o)},function(g){for(c.status="rejected",c.reason=g,g=0;g<s.length;g++)(0,s[g])(void 0)}),c}var mv=I.S;I.S=function(i,o){Z0=Kt(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&Dk(i,o),mv!==null&&mv(i,o)};var Ir=O(null);function qd(){var i=Ir.current;return i!==null?i:Fe.pooledCache}function Ll(i,o){o===null?oe(Ir,Ir.current):oe(Ir,o.pool)}function gv(){var i=qd();return i===null?null:{parent:rt._currentValue,pool:i}}var Uo=Error(r(460)),Wd=Error(r(474)),Tl=Error(r(542)),Al={then:function(){}};function vv(i){return i=i.status,i==="fulfilled"||i==="rejected"}function yv(i,o,s){switch(s=i[s],s===void 0?i.push(o):s!==o&&(o.then(ni,ni),o=s),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Sv(i),i;default:if(typeof o.status=="string")o.then(ni,ni);else{if(i=Fe,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(c){if(o.status==="pending"){var g=o;g.status="fulfilled",g.value=c}},function(c){if(o.status==="pending"){var g=o;g.status="rejected",g.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Sv(i),i}throw Hr=o,Uo}}function zr(i){try{var o=i._init;return o(i._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Hr=s,Uo):s}}var Hr=null;function bv(){if(Hr===null)throw Error(r(459));var i=Hr;return Hr=null,i}function Sv(i){if(i===Uo||i===Tl)throw Error(r(483))}var Vo=null,qa=0;function Rl(i){var o=qa;return qa+=1,Vo===null&&(Vo=[]),yv(Vo,i,o)}function Wa(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Ol(i,o){throw o.$$typeof===y?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function _v(i){function o(V,P){if(i){var j=V.deletions;j===null?(V.deletions=[P],V.flags|=16):j.push(P)}}function s(V,P){if(!i)return null;for(;P!==null;)o(V,P),P=P.sibling;return null}function c(V){for(var P=new Map;V!==null;)V.key!==null?P.set(V.key,V):P.set(V.index,V),V=V.sibling;return P}function g(V,P){return V=ri(V,P),V.index=0,V.sibling=null,V}function v(V,P,j){return V.index=j,i?(j=V.alternate,j!==null?(j=j.index,j<P?(V.flags|=67108866,P):j):(V.flags|=67108866,P)):(V.flags|=1048576,P)}function C(V){return i&&V.alternate===null&&(V.flags|=67108866),V}function T(V,P,j,ee){return P===null||P.tag!==6?(P=Id(j,V.mode,ee),P.return=V,P):(P=g(P,j),P.return=V,P)}function z(V,P,j,ee){var ve=j.type;return ve===_?Q(V,P,j.props.children,ee,j.key):P!==null&&(P.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===U&&zr(ve)===P.type)?(P=g(P,j.props),Wa(P,j),P.return=V,P):(P=xl(j.type,j.key,j.props,null,V.mode,ee),Wa(P,j),P.return=V,P)}function G(V,P,j,ee){return P===null||P.tag!==4||P.stateNode.containerInfo!==j.containerInfo||P.stateNode.implementation!==j.implementation?(P=zd(j,V.mode,ee),P.return=V,P):(P=g(P,j.children||[]),P.return=V,P)}function Q(V,P,j,ee,ve){return P===null||P.tag!==7?(P=Or(j,V.mode,ee,ve),P.return=V,P):(P=g(P,j),P.return=V,P)}function ne(V,P,j){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Id(""+P,V.mode,j),P.return=V,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return j=xl(P.type,P.key,P.props,null,V.mode,j),Wa(j,P),j.return=V,j;case S:return P=zd(P,V.mode,j),P.return=V,P;case U:return P=zr(P),ne(V,P,j)}if(se(P)||K(P))return P=Or(P,V.mode,j,null),P.return=V,P;if(typeof P.then=="function")return ne(V,Rl(P),j);if(P.$$typeof===L)return ne(V,kl(V,P),j);Ol(V,P)}return null}function W(V,P,j,ee){var ve=P!==null?P.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return ve!==null?null:T(V,P,""+j,ee);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return j.key===ve?z(V,P,j,ee):null;case S:return j.key===ve?G(V,P,j,ee):null;case U:return j=zr(j),W(V,P,j,ee)}if(se(j)||K(j))return ve!==null?null:Q(V,P,j,ee,null);if(typeof j.then=="function")return W(V,P,Rl(j),ee);if(j.$$typeof===L)return W(V,P,kl(V,j),ee);Ol(V,j)}return null}function X(V,P,j,ee,ve){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return V=V.get(j)||null,T(P,V,""+ee,ve);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return V=V.get(ee.key===null?j:ee.key)||null,z(P,V,ee,ve);case S:return V=V.get(ee.key===null?j:ee.key)||null,G(P,V,ee,ve);case U:return ee=zr(ee),X(V,P,j,ee,ve)}if(se(ee)||K(ee))return V=V.get(j)||null,Q(P,V,ee,ve,null);if(typeof ee.then=="function")return X(V,P,j,Rl(ee),ve);if(ee.$$typeof===L)return X(V,P,j,kl(P,ee),ve);Ol(P,ee)}return null}function he(V,P,j,ee){for(var ve=null,De=null,pe=P,Ee=P=0,Ae=null;pe!==null&&Ee<j.length;Ee++){pe.index>Ee?(Ae=pe,pe=null):Ae=pe.sibling;var Me=W(V,pe,j[Ee],ee);if(Me===null){pe===null&&(pe=Ae);break}i&&pe&&Me.alternate===null&&o(V,pe),P=v(Me,P,Ee),De===null?ve=Me:De.sibling=Me,De=Me,pe=Ae}if(Ee===j.length)return s(V,pe),Re&&oi(V,Ee),ve;if(pe===null){for(;Ee<j.length;Ee++)pe=ne(V,j[Ee],ee),pe!==null&&(P=v(pe,P,Ee),De===null?ve=pe:De.sibling=pe,De=pe);return Re&&oi(V,Ee),ve}for(pe=c(pe);Ee<j.length;Ee++)Ae=X(pe,V,Ee,j[Ee],ee),Ae!==null&&(i&&Ae.alternate!==null&&pe.delete(Ae.key===null?Ee:Ae.key),P=v(Ae,P,Ee),De===null?ve=Ae:De.sibling=Ae,De=Ae);return i&&pe.forEach(function(lr){return o(V,lr)}),Re&&oi(V,Ee),ve}function ye(V,P,j,ee){if(j==null)throw Error(r(151));for(var ve=null,De=null,pe=P,Ee=P=0,Ae=null,Me=j.next();pe!==null&&!Me.done;Ee++,Me=j.next()){pe.index>Ee?(Ae=pe,pe=null):Ae=pe.sibling;var lr=W(V,pe,Me.value,ee);if(lr===null){pe===null&&(pe=Ae);break}i&&pe&&lr.alternate===null&&o(V,pe),P=v(lr,P,Ee),De===null?ve=lr:De.sibling=lr,De=lr,pe=Ae}if(Me.done)return s(V,pe),Re&&oi(V,Ee),ve;if(pe===null){for(;!Me.done;Ee++,Me=j.next())Me=ne(V,Me.value,ee),Me!==null&&(P=v(Me,P,Ee),De===null?ve=Me:De.sibling=Me,De=Me);return Re&&oi(V,Ee),ve}for(pe=c(pe);!Me.done;Ee++,Me=j.next())Me=X(pe,V,Ee,Me.value,ee),Me!==null&&(i&&Me.alternate!==null&&pe.delete(Me.key===null?Ee:Me.key),P=v(Me,P,Ee),De===null?ve=Me:De.sibling=Me,De=Me);return i&&pe.forEach(function(GL){return o(V,GL)}),Re&&oi(V,Ee),ve}function Be(V,P,j,ee){if(typeof j=="object"&&j!==null&&j.type===_&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case b:e:{for(var ve=j.key;P!==null;){if(P.key===ve){if(ve=j.type,ve===_){if(P.tag===7){s(V,P.sibling),ee=g(P,j.props.children),ee.return=V,V=ee;break e}}else if(P.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===U&&zr(ve)===P.type){s(V,P.sibling),ee=g(P,j.props),Wa(ee,j),ee.return=V,V=ee;break e}s(V,P);break}else o(V,P);P=P.sibling}j.type===_?(ee=Or(j.props.children,V.mode,ee,j.key),ee.return=V,V=ee):(ee=xl(j.type,j.key,j.props,null,V.mode,ee),Wa(ee,j),ee.return=V,V=ee)}return C(V);case S:e:{for(ve=j.key;P!==null;){if(P.key===ve)if(P.tag===4&&P.stateNode.containerInfo===j.containerInfo&&P.stateNode.implementation===j.implementation){s(V,P.sibling),ee=g(P,j.children||[]),ee.return=V,V=ee;break e}else{s(V,P);break}else o(V,P);P=P.sibling}ee=zd(j,V.mode,ee),ee.return=V,V=ee}return C(V);case U:return j=zr(j),Be(V,P,j,ee)}if(se(j))return he(V,P,j,ee);if(K(j)){if(ve=K(j),typeof ve!="function")throw Error(r(150));return j=ve.call(j),ye(V,P,j,ee)}if(typeof j.then=="function")return Be(V,P,Rl(j),ee);if(j.$$typeof===L)return Be(V,P,kl(V,j),ee);Ol(V,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,P!==null&&P.tag===6?(s(V,P.sibling),ee=g(P,j),ee.return=V,V=ee):(s(V,P),ee=Id(j,V.mode,ee),ee.return=V,V=ee),C(V)):s(V,P)}return function(V,P,j,ee){try{qa=0;var ve=Be(V,P,j,ee);return Vo=null,ve}catch(pe){if(pe===Uo||pe===Tl)throw pe;var De=en(29,pe,null,V.mode);return De.lanes=ee,De.return=V,De}}}var Pr=_v(!0),Cv=_v(!1),$i=!1;function Yd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xd(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Wi(i,o,s){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(Ie&2)!==0){var g=c.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),c.pending=o,o=Cl(i),ov(i,null,s),o}return _l(i,c,o,s),Cl(i)}function Ya(i,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var c=o.lanes;c&=i.pendingLanes,s|=c,o.lanes=s,hg(i,s)}}function Kd(i,o){var s=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var g=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var C={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?g=v=C:v=v.next=C,s=s.next}while(s!==null);v===null?g=v=o:v=v.next=o}else g=v=o;s={baseState:c.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},i.updateQueue=s;return}i=s.lastBaseUpdate,i===null?s.firstBaseUpdate=o:i.next=o,s.lastBaseUpdate=o}var Qd=!1;function Xa(){if(Qd){var i=Po;if(i!==null)throw i}}function Ka(i,o,s,c){Qd=!1;var g=i.updateQueue;$i=!1;var v=g.firstBaseUpdate,C=g.lastBaseUpdate,T=g.shared.pending;if(T!==null){g.shared.pending=null;var z=T,G=z.next;z.next=null,C===null?v=G:C.next=G,C=z;var Q=i.alternate;Q!==null&&(Q=Q.updateQueue,T=Q.lastBaseUpdate,T!==C&&(T===null?Q.firstBaseUpdate=G:T.next=G,Q.lastBaseUpdate=z))}if(v!==null){var ne=g.baseState;C=0,Q=G=z=null,T=v;do{var W=T.lane&-536870913,X=W!==T.lane;if(X?(Te&W)===W:(c&W)===W){W!==0&&W===Ho&&(Qd=!0),Q!==null&&(Q=Q.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var he=i,ye=T;W=o;var Be=s;switch(ye.tag){case 1:if(he=ye.payload,typeof he=="function"){ne=he.call(Be,ne,W);break e}ne=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ye.payload,W=typeof he=="function"?he.call(Be,ne,W):he,W==null)break e;ne=m({},ne,W);break e;case 2:$i=!0}}W=T.callback,W!==null&&(i.flags|=64,X&&(i.flags|=8192),X=g.callbacks,X===null?g.callbacks=[W]:X.push(W))}else X={lane:W,tag:T.tag,payload:T.payload,callback:T.callback,next:null},Q===null?(G=Q=X,z=ne):Q=Q.next=X,C|=W;if(T=T.next,T===null){if(T=g.shared.pending,T===null)break;X=T,T=X.next,X.next=null,g.lastBaseUpdate=X,g.shared.pending=null}}while(!0);Q===null&&(z=ne),g.baseState=z,g.firstBaseUpdate=G,g.lastBaseUpdate=Q,v===null&&(g.shared.lanes=0),Zi|=C,i.lanes=C,i.memoizedState=ne}}function xv(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Ev(i,o){var s=i.callbacks;if(s!==null)for(i.callbacks=null,i=0;i<s.length;i++)xv(s[i],o)}var Bo=O(null),Dl=O(0);function wv(i,o){i=gi,oe(Dl,i),oe(Bo,o),gi=i|o.baseLanes}function Zd(){oe(Dl,gi),oe(Bo,Bo.current)}function Jd(){gi=Dl.current,q(Bo),q(Dl)}var tn=O(null),yn=null;function Yi(i){var o=i.alternate;oe(et,et.current&1),oe(tn,i),yn===null&&(o===null||Bo.current!==null||o.memoizedState!==null)&&(yn=i)}function ef(i){oe(et,et.current),oe(tn,i),yn===null&&(yn=i)}function kv(i){i.tag===22?(oe(et,et.current),oe(tn,i),yn===null&&(yn=i)):Xi()}function Xi(){oe(et,et.current),oe(tn,tn.current)}function nn(i){q(tn),yn===i&&(yn=null),q(et)}var et=O(0);function Ml(i){for(var o=i;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||sh(s)||lh(s)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var li=0,xe=null,Ue=null,ot=null,Nl=!1,jo=!1,Ur=!1,Il=0,Qa=0,Fo=null,Nk=0;function Qe(){throw Error(r(321))}function tf(i,o){if(o===null)return!1;for(var s=0;s<o.length&&s<i.length;s++)if(!Jt(i[s],o[s]))return!1;return!0}function nf(i,o,s,c,g,v){return li=v,xe=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=i===null||i.memoizedState===null?u0:yf,Ur=!1,v=s(c,g),Ur=!1,jo&&(v=Tv(o,s,c,g)),Lv(i),v}function Lv(i){I.H=es;var o=Ue!==null&&Ue.next!==null;if(li=0,ot=Ue=xe=null,Nl=!1,Qa=0,Fo=null,o)throw Error(r(300));i===null||at||(i=i.dependencies,i!==null&&wl(i)&&(at=!0))}function Tv(i,o,s,c){xe=i;var g=0;do{if(jo&&(Fo=null),Qa=0,jo=!1,25<=g)throw Error(r(301));if(g+=1,ot=Ue=null,i.updateQueue!=null){var v=i.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}I.H=c0,v=o(s,c)}while(jo);return v}function Ik(){var i=I.H,o=i.useState()[0];return o=typeof o.then=="function"?Za(o):o,i=i.useState()[0],(Ue!==null?Ue.memoizedState:null)!==i&&(xe.flags|=1024),o}function rf(){var i=Il!==0;return Il=0,i}function of(i,o,s){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~s}function af(i){if(Nl){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Nl=!1}li=0,ot=Ue=xe=null,jo=!1,Qa=Il=0,Fo=null}function Dt(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?xe.memoizedState=ot=i:ot=ot.next=i,ot}function tt(){if(Ue===null){var i=xe.alternate;i=i!==null?i.memoizedState:null}else i=Ue.next;var o=ot===null?xe.memoizedState:ot.next;if(o!==null)ot=o,Ue=i;else{if(i===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Ue=i,i={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},ot===null?xe.memoizedState=ot=i:ot=ot.next=i}return ot}function zl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Za(i){var o=Qa;return Qa+=1,Fo===null&&(Fo=[]),i=yv(Fo,i,o),o=xe,(ot===null?o.memoizedState:ot.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?u0:yf),i}function Hl(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Za(i);if(i.$$typeof===L)return wt(i)}throw Error(r(438,String(i)))}function sf(i){var o=null,s=xe.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var c=xe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(g){return g.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=zl(),xe.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0)for(s=o.data[o.index]=Array(i),c=0;c<i;c++)s[c]=te;return o.index++,s}function ui(i,o){return typeof o=="function"?o(i):o}function Pl(i){var o=tt();return lf(o,Ue,i)}function lf(i,o,s){var c=i.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=s;var g=i.baseQueue,v=c.pending;if(v!==null){if(g!==null){var C=g.next;g.next=v.next,v.next=C}o.baseQueue=g=v,c.pending=null}if(v=i.baseState,g===null)i.memoizedState=v;else{o=g.next;var T=C=null,z=null,G=o,Q=!1;do{var ne=G.lane&-536870913;if(ne!==G.lane?(Te&ne)===ne:(li&ne)===ne){var W=G.revertLane;if(W===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ne===Ho&&(Q=!0);else if((li&W)===W){G=G.next,W===Ho&&(Q=!0);continue}else ne={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},z===null?(T=z=ne,C=v):z=z.next=ne,xe.lanes|=W,Zi|=W;ne=G.action,Ur&&s(v,ne),v=G.hasEagerState?G.eagerState:s(v,ne)}else W={lane:ne,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},z===null?(T=z=W,C=v):z=z.next=W,xe.lanes|=ne,Zi|=ne;G=G.next}while(G!==null&&G!==o);if(z===null?C=v:z.next=T,!Jt(v,i.memoizedState)&&(at=!0,Q&&(s=Po,s!==null)))throw s;i.memoizedState=v,i.baseState=C,i.baseQueue=z,c.lastRenderedState=v}return g===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function uf(i){var o=tt(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var c=s.dispatch,g=s.pending,v=o.memoizedState;if(g!==null){s.pending=null;var C=g=g.next;do v=i(v,C.action),C=C.next;while(C!==g);Jt(v,o.memoizedState)||(at=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),s.lastRenderedState=v}return[v,c]}function Av(i,o,s){var c=xe,g=tt(),v=Re;if(v){if(s===void 0)throw Error(r(407));s=s()}else s=o();var C=!Jt((Ue||g).memoizedState,s);if(C&&(g.memoizedState=s,at=!0),g=g.queue,ff(Dv.bind(null,c,g,i),[i]),g.getSnapshot!==o||C||ot!==null&&ot.memoizedState.tag&1){if(c.flags|=2048,Go(9,{destroy:void 0},Ov.bind(null,c,g,s,o),null),Fe===null)throw Error(r(349));v||(li&127)!==0||Rv(c,o,s)}return s}function Rv(i,o,s){i.flags|=16384,i={getSnapshot:o,value:s},o=xe.updateQueue,o===null?(o=zl(),xe.updateQueue=o,o.stores=[i]):(s=o.stores,s===null?o.stores=[i]:s.push(i))}function Ov(i,o,s,c){o.value=s,o.getSnapshot=c,Mv(o)&&Nv(i)}function Dv(i,o,s){return s(function(){Mv(o)&&Nv(i)})}function Mv(i){var o=i.getSnapshot;i=i.value;try{var s=o();return!Jt(i,s)}catch{return!0}}function Nv(i){var o=Rr(i,2);o!==null&&Ft(o,i,2)}function cf(i){var o=Dt();if(typeof i=="function"){var s=i;if(i=s(),Ur){Pi(!0);try{s()}finally{Pi(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:i},o}function Iv(i,o,s,c){return i.baseState=s,lf(i,Ue,typeof c=="function"?c:ui)}function zk(i,o,s,c,g){if(Bl(i))throw Error(r(485));if(i=o.action,i!==null){var v={payload:g,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};I.T!==null?s(!0):v.isTransition=!1,c(v),s=o.pending,s===null?(v.next=o.pending=v,zv(o,v)):(v.next=s.next,o.pending=s.next=v)}}function zv(i,o){var s=o.action,c=o.payload,g=i.state;if(o.isTransition){var v=I.T,C={};I.T=C;try{var T=s(g,c),z=I.S;z!==null&&z(C,T),Hv(i,o,T)}catch(G){df(i,o,G)}finally{v!==null&&C.types!==null&&(v.types=C.types),I.T=v}}else try{v=s(g,c),Hv(i,o,v)}catch(G){df(i,o,G)}}function Hv(i,o,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){Pv(i,o,c)},function(c){return df(i,o,c)}):Pv(i,o,s)}function Pv(i,o,s){o.status="fulfilled",o.value=s,Uv(o),i.state=s,o=i.pending,o!==null&&(s=o.next,s===o?i.pending=null:(s=s.next,o.next=s,zv(i,s)))}function df(i,o,s){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=s,Uv(o),o=o.next;while(o!==c)}i.action=null}function Uv(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Vv(i,o){return o}function Bv(i,o){if(Re){var s=Fe.formState;if(s!==null){e:{var c=xe;if(Re){if(qe){t:{for(var g=qe,v=vn;g.nodeType!==8;){if(!v){g=null;break t}if(g=bn(g.nextSibling),g===null){g=null;break t}}v=g.data,g=v==="F!"||v==="F"?g:null}if(g){qe=bn(g.nextSibling),c=g.data==="F!";break e}}Fi(c)}c=!1}c&&(o=s[0])}}return s=Dt(),s.memoizedState=s.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vv,lastRenderedState:o},s.queue=c,s=a0.bind(null,xe,c),c.dispatch=s,c=cf(!1),v=vf.bind(null,xe,!1,c.queue),c=Dt(),g={state:o,dispatch:null,action:i,pending:null},c.queue=g,s=zk.bind(null,xe,g,v,s),g.dispatch=s,c.memoizedState=i,[o,s,!1]}function jv(i){var o=tt();return Fv(o,Ue,i)}function Fv(i,o,s){if(o=lf(i,o,Vv)[0],i=Pl(ui)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=Za(o)}catch(C){throw C===Uo?Tl:C}else c=o;o=tt();var g=o.queue,v=g.dispatch;return s!==o.memoizedState&&(xe.flags|=2048,Go(9,{destroy:void 0},Hk.bind(null,g,s),null)),[c,v,i]}function Hk(i,o){i.action=o}function Gv(i){var o=tt(),s=Ue;if(s!==null)return Fv(o,s,i);tt(),o=o.memoizedState,s=tt();var c=s.queue.dispatch;return s.memoizedState=i,[o,c,!1]}function Go(i,o,s,c){return i={tag:i,create:s,deps:c,inst:o,next:null},o=xe.updateQueue,o===null&&(o=zl(),xe.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=i.next=i:(c=s.next,s.next=i,i.next=c,o.lastEffect=i),i}function $v(){return tt().memoizedState}function Ul(i,o,s,c){var g=Dt();xe.flags|=i,g.memoizedState=Go(1|o,{destroy:void 0},s,c===void 0?null:c)}function Vl(i,o,s,c){var g=tt();c=c===void 0?null:c;var v=g.memoizedState.inst;Ue!==null&&c!==null&&tf(c,Ue.memoizedState.deps)?g.memoizedState=Go(o,v,s,c):(xe.flags|=i,g.memoizedState=Go(1|o,v,s,c))}function qv(i,o){Ul(8390656,8,i,o)}function ff(i,o){Vl(2048,8,i,o)}function Pk(i){xe.flags|=4;var o=xe.updateQueue;if(o===null)o=zl(),xe.updateQueue=o,o.events=[i];else{var s=o.events;s===null?o.events=[i]:s.push(i)}}function Wv(i){var o=tt().memoizedState;return Pk({ref:o,nextImpl:i}),function(){if((Ie&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function Yv(i,o){return Vl(4,2,i,o)}function Xv(i,o){return Vl(4,4,i,o)}function Kv(i,o){if(typeof o=="function"){i=i();var s=o(i);return function(){typeof s=="function"?s():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Qv(i,o,s){s=s!=null?s.concat([i]):null,Vl(4,4,Kv.bind(null,o,i),s)}function hf(){}function Zv(i,o){var s=tt();o=o===void 0?null:o;var c=s.memoizedState;return o!==null&&tf(o,c[1])?c[0]:(s.memoizedState=[i,o],i)}function Jv(i,o){var s=tt();o=o===void 0?null:o;var c=s.memoizedState;if(o!==null&&tf(o,c[1]))return c[0];if(c=i(),Ur){Pi(!0);try{i()}finally{Pi(!1)}}return s.memoizedState=[c,o],c}function pf(i,o,s){return s===void 0||(li&1073741824)!==0&&(Te&261930)===0?i.memoizedState=o:(i.memoizedState=s,i=ey(),xe.lanes|=i,Zi|=i,s)}function e0(i,o,s,c){return Jt(s,o)?s:Bo.current!==null?(i=pf(i,s,c),Jt(i,o)||(at=!0),i):(li&42)===0||(li&1073741824)!==0&&(Te&261930)===0?(at=!0,i.memoizedState=s):(i=ey(),xe.lanes|=i,Zi|=i,o)}function t0(i,o,s,c,g){var v=$.p;$.p=v!==0&&8>v?v:8;var C=I.T,T={};I.T=T,vf(i,!1,o,s);try{var z=g(),G=I.S;if(G!==null&&G(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var Q=Mk(z,c);Ja(i,o,Q,an(i))}else Ja(i,o,c,an(i))}catch(ne){Ja(i,o,{then:function(){},status:"rejected",reason:ne},an())}finally{$.p=v,C!==null&&T.types!==null&&(C.types=T.types),I.T=C}}function Uk(){}function mf(i,o,s,c){if(i.tag!==5)throw Error(r(476));var g=n0(i).queue;t0(i,g,o,F,s===null?Uk:function(){return i0(i),s(c)})}function n0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:F},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:s},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function i0(i){var o=n0(i);o.next===null&&(o=i.alternate.memoizedState),Ja(i,o.next.queue,{},an())}function gf(){return wt(gs)}function r0(){return tt().memoizedState}function o0(){return tt().memoizedState}function Vk(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var s=an();i=qi(s);var c=Wi(o,i,s);c!==null&&(Ft(c,o,s),Ya(c,o,s)),o={cache:Gd()},i.payload=o;return}o=o.return}}function Bk(i,o,s){var c=an();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Bl(i)?s0(o,s):(s=Md(i,o,s,c),s!==null&&(Ft(s,i,c),l0(s,o,c)))}function a0(i,o,s){var c=an();Ja(i,o,s,c)}function Ja(i,o,s,c){var g={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Bl(i))s0(o,g);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var C=o.lastRenderedState,T=v(C,s);if(g.hasEagerState=!0,g.eagerState=T,Jt(T,C))return _l(i,o,g,0),Fe===null&&Sl(),!1}catch{}if(s=Md(i,o,g,c),s!==null)return Ft(s,i,c),l0(s,o,c),!0}return!1}function vf(i,o,s,c){if(c={lane:2,revertLane:Xf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Bl(i)){if(o)throw Error(r(479))}else o=Md(i,s,c,2),o!==null&&Ft(o,i,2)}function Bl(i){var o=i.alternate;return i===xe||o!==null&&o===xe}function s0(i,o){jo=Nl=!0;var s=i.pending;s===null?o.next=o:(o.next=s.next,s.next=o),i.pending=o}function l0(i,o,s){if((s&4194048)!==0){var c=o.lanes;c&=i.pendingLanes,s|=c,o.lanes=s,hg(i,s)}}var es={readContext:wt,use:Hl,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe};es.useEffectEvent=Qe;var u0={readContext:wt,use:Hl,useCallback:function(i,o){return Dt().memoizedState=[i,o===void 0?null:o],i},useContext:wt,useEffect:qv,useImperativeHandle:function(i,o,s){s=s!=null?s.concat([i]):null,Ul(4194308,4,Kv.bind(null,o,i),s)},useLayoutEffect:function(i,o){return Ul(4194308,4,i,o)},useInsertionEffect:function(i,o){Ul(4,2,i,o)},useMemo:function(i,o){var s=Dt();o=o===void 0?null:o;var c=i();if(Ur){Pi(!0);try{i()}finally{Pi(!1)}}return s.memoizedState=[c,o],c},useReducer:function(i,o,s){var c=Dt();if(s!==void 0){var g=s(o);if(Ur){Pi(!0);try{s(o)}finally{Pi(!1)}}}else g=o;return c.memoizedState=c.baseState=g,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:g},c.queue=i,i=i.dispatch=Bk.bind(null,xe,i),[c.memoizedState,i]},useRef:function(i){var o=Dt();return i={current:i},o.memoizedState=i},useState:function(i){i=cf(i);var o=i.queue,s=a0.bind(null,xe,o);return o.dispatch=s,[i.memoizedState,s]},useDebugValue:hf,useDeferredValue:function(i,o){var s=Dt();return pf(s,i,o)},useTransition:function(){var i=cf(!1);return i=t0.bind(null,xe,i.queue,!0,!1),Dt().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,s){var c=xe,g=Dt();if(Re){if(s===void 0)throw Error(r(407));s=s()}else{if(s=o(),Fe===null)throw Error(r(349));(Te&127)!==0||Rv(c,o,s)}g.memoizedState=s;var v={value:s,getSnapshot:o};return g.queue=v,qv(Dv.bind(null,c,v,i),[i]),c.flags|=2048,Go(9,{destroy:void 0},Ov.bind(null,c,v,s,o),null),s},useId:function(){var i=Dt(),o=Fe.identifierPrefix;if(Re){var s=Hn,c=zn;s=(c&~(1<<32-Zt(c)-1)).toString(32)+s,o="_"+o+"R_"+s,s=Il++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=Nk++,o="_"+o+"r_"+s.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:gf,useFormState:Bv,useActionState:Bv,useOptimistic:function(i){var o=Dt();o.memoizedState=o.baseState=i;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=vf.bind(null,xe,!0,s),s.dispatch=o,[i,o]},useMemoCache:sf,useCacheRefresh:function(){return Dt().memoizedState=Vk.bind(null,xe)},useEffectEvent:function(i){var o=Dt(),s={impl:i};return o.memoizedState=s,function(){if((Ie&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},yf={readContext:wt,use:Hl,useCallback:Zv,useContext:wt,useEffect:ff,useImperativeHandle:Qv,useInsertionEffect:Yv,useLayoutEffect:Xv,useMemo:Jv,useReducer:Pl,useRef:$v,useState:function(){return Pl(ui)},useDebugValue:hf,useDeferredValue:function(i,o){var s=tt();return e0(s,Ue.memoizedState,i,o)},useTransition:function(){var i=Pl(ui)[0],o=tt().memoizedState;return[typeof i=="boolean"?i:Za(i),o]},useSyncExternalStore:Av,useId:r0,useHostTransitionStatus:gf,useFormState:jv,useActionState:jv,useOptimistic:function(i,o){var s=tt();return Iv(s,Ue,i,o)},useMemoCache:sf,useCacheRefresh:o0};yf.useEffectEvent=Wv;var c0={readContext:wt,use:Hl,useCallback:Zv,useContext:wt,useEffect:ff,useImperativeHandle:Qv,useInsertionEffect:Yv,useLayoutEffect:Xv,useMemo:Jv,useReducer:uf,useRef:$v,useState:function(){return uf(ui)},useDebugValue:hf,useDeferredValue:function(i,o){var s=tt();return Ue===null?pf(s,i,o):e0(s,Ue.memoizedState,i,o)},useTransition:function(){var i=uf(ui)[0],o=tt().memoizedState;return[typeof i=="boolean"?i:Za(i),o]},useSyncExternalStore:Av,useId:r0,useHostTransitionStatus:gf,useFormState:Gv,useActionState:Gv,useOptimistic:function(i,o){var s=tt();return Ue!==null?Iv(s,Ue,i,o):(s.baseState=i,[i,s.queue.dispatch])},useMemoCache:sf,useCacheRefresh:o0};c0.useEffectEvent=Wv;function bf(i,o,s,c){o=i.memoizedState,s=s(c,o),s=s==null?o:m({},o,s),i.memoizedState=s,i.lanes===0&&(i.updateQueue.baseState=s)}var Sf={enqueueSetState:function(i,o,s){i=i._reactInternals;var c=an(),g=qi(c);g.payload=o,s!=null&&(g.callback=s),o=Wi(i,g,c),o!==null&&(Ft(o,i,c),Ya(o,i,c))},enqueueReplaceState:function(i,o,s){i=i._reactInternals;var c=an(),g=qi(c);g.tag=1,g.payload=o,s!=null&&(g.callback=s),o=Wi(i,g,c),o!==null&&(Ft(o,i,c),Ya(o,i,c))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var s=an(),c=qi(s);c.tag=2,o!=null&&(c.callback=o),o=Wi(i,c,s),o!==null&&(Ft(o,i,s),Ya(o,i,s))}};function d0(i,o,s,c,g,v,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,v,C):o.prototype&&o.prototype.isPureReactComponent?!Va(s,c)||!Va(g,v):!0}function f0(i,o,s,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,c),o.state!==i&&Sf.enqueueReplaceState(o,o.state,null)}function Vr(i,o){var s=o;if("ref"in o){s={};for(var c in o)c!=="ref"&&(s[c]=o[c])}if(i=i.defaultProps){s===o&&(s=m({},s));for(var g in i)s[g]===void 0&&(s[g]=i[g])}return s}function h0(i){bl(i)}function p0(i){console.error(i)}function m0(i){bl(i)}function jl(i,o){try{var s=i.onUncaughtError;s(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function g0(i,o,s){try{var c=i.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function _f(i,o,s){return s=qi(s),s.tag=3,s.payload={element:null},s.callback=function(){jl(i,o)},s}function v0(i){return i=qi(i),i.tag=3,i}function y0(i,o,s,c){var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var v=c.value;i.payload=function(){return g(v)},i.callback=function(){g0(o,s,c)}}var C=s.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){g0(o,s,c),typeof g!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function jk(i,o,s,c,g){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=s.alternate,o!==null&&zo(o,s,g,!0),s=tn.current,s!==null){switch(s.tag){case 31:case 13:return yn===null?eu():s.alternate===null&&Ze===0&&(Ze=3),s.flags&=-257,s.flags|=65536,s.lanes=g,c===Al?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([c]):o.add(c),qf(i,c,g)),!1;case 22:return s.flags|=65536,c===Al?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([c]):s.add(c)),qf(i,c,g)),!1}throw Error(r(435,s.tag))}return qf(i,c,g),eu(),!1}if(Re)return o=tn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=g,c!==Ud&&(i=Error(r(422),{cause:c}),Fa(pn(i,s)))):(c!==Ud&&(o=Error(r(423),{cause:c}),Fa(pn(o,s))),i=i.current.alternate,i.flags|=65536,g&=-g,i.lanes|=g,c=pn(c,s),g=_f(i.stateNode,c,g),Kd(i,g),Ze!==4&&(Ze=2)),!1;var v=Error(r(520),{cause:c});if(v=pn(v,s),ls===null?ls=[v]:ls.push(v),Ze!==4&&(Ze=2),o===null)return!0;c=pn(c,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,i=g&-g,s.lanes|=i,i=_f(s.stateNode,c,i),Kd(s,i),!1;case 1:if(o=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ji===null||!Ji.has(v))))return s.flags|=65536,g&=-g,s.lanes|=g,g=v0(g),y0(g,i,s,c),Kd(s,g),!1}s=s.return}while(s!==null);return!1}var Cf=Error(r(461)),at=!1;function kt(i,o,s,c){o.child=i===null?Cv(o,null,s,c):Pr(o,i.child,s,c)}function b0(i,o,s,c,g){s=s.render;var v=o.ref;if("ref"in c){var C={};for(var T in c)T!=="ref"&&(C[T]=c[T])}else C=c;return Nr(o),c=nf(i,o,s,C,v,g),T=rf(),i!==null&&!at?(of(i,o,g),ci(i,o,g)):(Re&&T&&Hd(o),o.flags|=1,kt(i,o,c,g),o.child)}function S0(i,o,s,c,g){if(i===null){var v=s.type;return typeof v=="function"&&!Nd(v)&&v.defaultProps===void 0&&s.compare===null?(o.tag=15,o.type=v,_0(i,o,v,c,g)):(i=xl(s.type,null,c,o,o.mode,g),i.ref=o.ref,i.return=o,o.child=i)}if(v=i.child,!Rf(i,g)){var C=v.memoizedProps;if(s=s.compare,s=s!==null?s:Va,s(C,c)&&i.ref===o.ref)return ci(i,o,g)}return o.flags|=1,i=ri(v,c),i.ref=o.ref,i.return=o,o.child=i}function _0(i,o,s,c,g){if(i!==null){var v=i.memoizedProps;if(Va(v,c)&&i.ref===o.ref)if(at=!1,o.pendingProps=c=v,Rf(i,g))(i.flags&131072)!==0&&(at=!0);else return o.lanes=i.lanes,ci(i,o,g)}return xf(i,o,s,c,g)}function C0(i,o,s,c){var g=c.children,v=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((o.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,i!==null){for(c=o.child=i.child,g=0;c!==null;)g=g|c.lanes|c.childLanes,c=c.sibling;c=g&~v}else c=0,o.child=null;return x0(i,o,v,s,c)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ll(o,v!==null?v.cachePool:null),v!==null?wv(o,v):Zd(),kv(o);else return c=o.lanes=536870912,x0(i,o,v!==null?v.baseLanes|s:s,s,c)}else v!==null?(Ll(o,v.cachePool),wv(o,v),Xi(),o.memoizedState=null):(i!==null&&Ll(o,null),Zd(),Xi());return kt(i,o,g,s),o.child}function ts(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function x0(i,o,s,c,g){var v=qd();return v=v===null?null:{parent:rt._currentValue,pool:v},o.memoizedState={baseLanes:s,cachePool:v},i!==null&&Ll(o,null),Zd(),kv(o),i!==null&&zo(i,o,c,!0),o.childLanes=g,null}function Fl(i,o){return o=$l({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function E0(i,o,s){return Pr(o,i.child,null,s),i=Fl(o,o.pendingProps),i.flags|=2,nn(o),o.memoizedState=null,i}function Fk(i,o,s){var c=o.pendingProps,g=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Re){if(c.mode==="hidden")return i=Fl(o,c),o.lanes=536870912,ts(null,i);if(ef(o),(i=qe)?(i=zy(i,vn),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Bi!==null?{id:zn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},s=sv(i),s.return=o,o.child=s,Et=o,qe=null)):i=null,i===null)throw Fi(o);return o.lanes=536870912,null}return Fl(o,c)}var v=i.memoizedState;if(v!==null){var C=v.dehydrated;if(ef(o),g)if(o.flags&256)o.flags&=-257,o=E0(i,o,s);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(at||zo(i,o,s,!1),g=(s&i.childLanes)!==0,at||g){if(c=Fe,c!==null&&(C=pg(c,s),C!==0&&C!==v.retryLane))throw v.retryLane=C,Rr(i,C),Ft(c,i,C),Cf;eu(),o=E0(i,o,s)}else i=v.treeContext,qe=bn(C.nextSibling),Et=o,Re=!0,ji=null,vn=!1,i!==null&&cv(o,i),o=Fl(o,c),o.flags|=4096;return o}return i=ri(i.child,{mode:c.mode,children:c.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Gl(i,o){var s=o.ref;if(s===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(i===null||i.ref!==s)&&(o.flags|=4194816)}}function xf(i,o,s,c,g){return Nr(o),s=nf(i,o,s,c,void 0,g),c=rf(),i!==null&&!at?(of(i,o,g),ci(i,o,g)):(Re&&c&&Hd(o),o.flags|=1,kt(i,o,s,g),o.child)}function w0(i,o,s,c,g,v){return Nr(o),o.updateQueue=null,s=Tv(o,c,s,g),Lv(i),c=rf(),i!==null&&!at?(of(i,o,v),ci(i,o,v)):(Re&&c&&Hd(o),o.flags|=1,kt(i,o,s,v),o.child)}function k0(i,o,s,c,g){if(Nr(o),o.stateNode===null){var v=Do,C=s.contextType;typeof C=="object"&&C!==null&&(v=wt(C)),v=new s(c,v),o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Sf,o.stateNode=v,v._reactInternals=o,v=o.stateNode,v.props=c,v.state=o.memoizedState,v.refs={},Yd(o),C=s.contextType,v.context=typeof C=="object"&&C!==null?wt(C):Do,v.state=o.memoizedState,C=s.getDerivedStateFromProps,typeof C=="function"&&(bf(o,s,C,c),v.state=o.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&Sf.enqueueReplaceState(v,v.state,null),Ka(o,c,v,g),Xa(),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(i===null){v=o.stateNode;var T=o.memoizedProps,z=Vr(s,T);v.props=z;var G=v.context,Q=s.contextType;C=Do,typeof Q=="object"&&Q!==null&&(C=wt(Q));var ne=s.getDerivedStateFromProps;Q=typeof ne=="function"||typeof v.getSnapshotBeforeUpdate=="function",T=o.pendingProps!==T,Q||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T||G!==C)&&f0(o,v,c,C),$i=!1;var W=o.memoizedState;v.state=W,Ka(o,c,v,g),Xa(),G=o.memoizedState,T||W!==G||$i?(typeof ne=="function"&&(bf(o,s,ne,c),G=o.memoizedState),(z=$i||d0(o,s,z,c,W,G,C))?(Q||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=G),v.props=c,v.state=G,v.context=C,c=z):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{v=o.stateNode,Xd(i,o),C=o.memoizedProps,Q=Vr(s,C),v.props=Q,ne=o.pendingProps,W=v.context,G=s.contextType,z=Do,typeof G=="object"&&G!==null&&(z=wt(G)),T=s.getDerivedStateFromProps,(G=typeof T=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==ne||W!==z)&&f0(o,v,c,z),$i=!1,W=o.memoizedState,v.state=W,Ka(o,c,v,g),Xa();var X=o.memoizedState;C!==ne||W!==X||$i||i!==null&&i.dependencies!==null&&wl(i.dependencies)?(typeof T=="function"&&(bf(o,s,T,c),X=o.memoizedState),(Q=$i||d0(o,s,Q,c,W,X,z)||i!==null&&i.dependencies!==null&&wl(i.dependencies))?(G||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,X,z),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,X,z)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===i.memoizedProps&&W===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&W===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=X),v.props=c,v.state=X,v.context=z,c=Q):(typeof v.componentDidUpdate!="function"||C===i.memoizedProps&&W===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&W===i.memoizedState||(o.flags|=1024),c=!1)}return v=c,Gl(i,o),c=(o.flags&128)!==0,v||c?(v=o.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:v.render(),o.flags|=1,i!==null&&c?(o.child=Pr(o,i.child,null,g),o.child=Pr(o,null,s,g)):kt(i,o,s,g),o.memoizedState=v.state,i=o.child):i=ci(i,o,g),i}function L0(i,o,s,c){return Dr(),o.flags|=256,kt(i,o,s,c),o.child}var Ef={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wf(i){return{baseLanes:i,cachePool:gv()}}function kf(i,o,s){return i=i!==null?i.childLanes&~s:0,o&&(i|=on),i}function T0(i,o,s){var c=o.pendingProps,g=!1,v=(o.flags&128)!==0,C;if((C=v)||(C=i!==null&&i.memoizedState===null?!1:(et.current&2)!==0),C&&(g=!0,o.flags&=-129),C=(o.flags&32)!==0,o.flags&=-33,i===null){if(Re){if(g?Yi(o):Xi(),(i=qe)?(i=zy(i,vn),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Bi!==null?{id:zn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},s=sv(i),s.return=o,o.child=s,Et=o,qe=null)):i=null,i===null)throw Fi(o);return lh(i)?o.lanes=32:o.lanes=536870912,null}var T=c.children;return c=c.fallback,g?(Xi(),g=o.mode,T=$l({mode:"hidden",children:T},g),c=Or(c,g,s,null),T.return=o,c.return=o,T.sibling=c,o.child=T,c=o.child,c.memoizedState=wf(s),c.childLanes=kf(i,C,s),o.memoizedState=Ef,ts(null,c)):(Yi(o),Lf(o,T))}var z=i.memoizedState;if(z!==null&&(T=z.dehydrated,T!==null)){if(v)o.flags&256?(Yi(o),o.flags&=-257,o=Tf(i,o,s)):o.memoizedState!==null?(Xi(),o.child=i.child,o.flags|=128,o=null):(Xi(),T=c.fallback,g=o.mode,c=$l({mode:"visible",children:c.children},g),T=Or(T,g,s,null),T.flags|=2,c.return=o,T.return=o,c.sibling=T,o.child=c,Pr(o,i.child,null,s),c=o.child,c.memoizedState=wf(s),c.childLanes=kf(i,C,s),o.memoizedState=Ef,o=ts(null,c));else if(Yi(o),lh(T)){if(C=T.nextSibling&&T.nextSibling.dataset,C)var G=C.dgst;C=G,c=Error(r(419)),c.stack="",c.digest=C,Fa({value:c,source:null,stack:null}),o=Tf(i,o,s)}else if(at||zo(i,o,s,!1),C=(s&i.childLanes)!==0,at||C){if(C=Fe,C!==null&&(c=pg(C,s),c!==0&&c!==z.retryLane))throw z.retryLane=c,Rr(i,c),Ft(C,i,c),Cf;sh(T)||eu(),o=Tf(i,o,s)}else sh(T)?(o.flags|=192,o.child=i.child,o=null):(i=z.treeContext,qe=bn(T.nextSibling),Et=o,Re=!0,ji=null,vn=!1,i!==null&&cv(o,i),o=Lf(o,c.children),o.flags|=4096);return o}return g?(Xi(),T=c.fallback,g=o.mode,z=i.child,G=z.sibling,c=ri(z,{mode:"hidden",children:c.children}),c.subtreeFlags=z.subtreeFlags&65011712,G!==null?T=ri(G,T):(T=Or(T,g,s,null),T.flags|=2),T.return=o,c.return=o,c.sibling=T,o.child=c,ts(null,c),c=o.child,T=i.child.memoizedState,T===null?T=wf(s):(g=T.cachePool,g!==null?(z=rt._currentValue,g=g.parent!==z?{parent:z,pool:z}:g):g=gv(),T={baseLanes:T.baseLanes|s,cachePool:g}),c.memoizedState=T,c.childLanes=kf(i,C,s),o.memoizedState=Ef,ts(i.child,c)):(Yi(o),s=i.child,i=s.sibling,s=ri(s,{mode:"visible",children:c.children}),s.return=o,s.sibling=null,i!==null&&(C=o.deletions,C===null?(o.deletions=[i],o.flags|=16):C.push(i)),o.child=s,o.memoizedState=null,s)}function Lf(i,o){return o=$l({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function $l(i,o){return i=en(22,i,null,o),i.lanes=0,i}function Tf(i,o,s){return Pr(o,i.child,null,s),i=Lf(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function A0(i,o,s){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),jd(i.return,o,s)}function Af(i,o,s,c,g,v){var C=i.memoizedState;C===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:g,treeForkCount:v}:(C.isBackwards=o,C.rendering=null,C.renderingStartTime=0,C.last=c,C.tail=s,C.tailMode=g,C.treeForkCount=v)}function R0(i,o,s){var c=o.pendingProps,g=c.revealOrder,v=c.tail;c=c.children;var C=et.current,T=(C&2)!==0;if(T?(C=C&1|2,o.flags|=128):C&=1,oe(et,C),kt(i,o,c,s),c=Re?ja:0,!T&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&A0(i,s,o);else if(i.tag===19)A0(i,s,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(g){case"forwards":for(s=o.child,g=null;s!==null;)i=s.alternate,i!==null&&Ml(i)===null&&(g=s),s=s.sibling;s=g,s===null?(g=o.child,o.child=null):(g=s.sibling,s.sibling=null),Af(o,!1,g,s,v,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,g=o.child,o.child=null;g!==null;){if(i=g.alternate,i!==null&&Ml(i)===null){o.child=g;break}i=g.sibling,g.sibling=s,s=g,g=i}Af(o,!0,s,null,v,c);break;case"together":Af(o,!1,null,null,void 0,c);break;default:o.memoizedState=null}return o.child}function ci(i,o,s){if(i!==null&&(o.dependencies=i.dependencies),Zi|=o.lanes,(s&o.childLanes)===0)if(i!==null){if(zo(i,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,s=ri(i,i.pendingProps),o.child=s,s.return=o;i.sibling!==null;)i=i.sibling,s=s.sibling=ri(i,i.pendingProps),s.return=o;s.sibling=null}return o.child}function Rf(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&wl(i)))}function Gk(i,o,s){switch(o.tag){case 3:Oe(o,o.stateNode.containerInfo),Gi(o,rt,i.memoizedState.cache),Dr();break;case 27:case 5:mt(o);break;case 4:Oe(o,o.stateNode.containerInfo);break;case 10:Gi(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,ef(o),null;break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(Yi(o),o.flags|=128,null):(s&o.child.childLanes)!==0?T0(i,o,s):(Yi(o),i=ci(i,o,s),i!==null?i.sibling:null);Yi(o);break;case 19:var g=(i.flags&128)!==0;if(c=(s&o.childLanes)!==0,c||(zo(i,o,s,!1),c=(s&o.childLanes)!==0),g){if(c)return R0(i,o,s);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),oe(et,et.current),c)break;return null;case 22:return o.lanes=0,C0(i,o,s,o.pendingProps);case 24:Gi(o,rt,i.memoizedState.cache)}return ci(i,o,s)}function O0(i,o,s){if(i!==null)if(i.memoizedProps!==o.pendingProps)at=!0;else{if(!Rf(i,s)&&(o.flags&128)===0)return at=!1,Gk(i,o,s);at=(i.flags&131072)!==0}else at=!1,Re&&(o.flags&1048576)!==0&&uv(o,ja,o.index);switch(o.lanes=0,o.tag){case 16:e:{var c=o.pendingProps;if(i=zr(o.elementType),o.type=i,typeof i=="function")Nd(i)?(c=Vr(i,c),o.tag=1,o=k0(null,o,i,c,s)):(o.tag=0,o=xf(null,o,i,c,s));else{if(i!=null){var g=i.$$typeof;if(g===A){o.tag=11,o=b0(null,o,i,c,s);break e}else if(g===H){o.tag=14,o=S0(null,o,i,c,s);break e}}throw o=Z(i)||i,Error(r(306,o,""))}}return o;case 0:return xf(i,o,o.type,o.pendingProps,s);case 1:return c=o.type,g=Vr(c,o.pendingProps),k0(i,o,c,g,s);case 3:e:{if(Oe(o,o.stateNode.containerInfo),i===null)throw Error(r(387));c=o.pendingProps;var v=o.memoizedState;g=v.element,Xd(i,o),Ka(o,c,null,s);var C=o.memoizedState;if(c=C.cache,Gi(o,rt,c),c!==v.cache&&Fd(o,[rt],s,!0),Xa(),c=C.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:C.cache},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){o=L0(i,o,c,s);break e}else if(c!==g){g=pn(Error(r(424)),o),Fa(g),o=L0(i,o,c,s);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,qe=bn(i.firstChild),Et=o,Re=!0,ji=null,vn=!0,s=Cv(o,null,c,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Dr(),c===g){o=ci(i,o,s);break e}kt(i,o,c,s)}o=o.child}return o;case 26:return Gl(i,o),i===null?(s=jy(o.type,null,o.pendingProps,null))?o.memoizedState=s:Re||(s=o.type,i=o.pendingProps,c=su(ue.current).createElement(s),c[xt]=o,c[Ht]=i,Lt(c,s,i),vt(c),o.stateNode=c):o.memoizedState=jy(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return mt(o),i===null&&Re&&(c=o.stateNode=Uy(o.type,o.pendingProps,ue.current),Et=o,vn=!0,g=qe,ir(o.type)?(uh=g,qe=bn(c.firstChild)):qe=g),kt(i,o,o.pendingProps.children,s),Gl(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Re&&((g=c=qe)&&(c=SL(c,o.type,o.pendingProps,vn),c!==null?(o.stateNode=c,Et=o,qe=bn(c.firstChild),vn=!1,g=!0):g=!1),g||Fi(o)),mt(o),g=o.type,v=o.pendingProps,C=i!==null?i.memoizedProps:null,c=v.children,rh(g,v)?c=null:C!==null&&rh(g,C)&&(o.flags|=32),o.memoizedState!==null&&(g=nf(i,o,Ik,null,null,s),gs._currentValue=g),Gl(i,o),kt(i,o,c,s),o.child;case 6:return i===null&&Re&&((i=s=qe)&&(s=_L(s,o.pendingProps,vn),s!==null?(o.stateNode=s,Et=o,qe=null,i=!0):i=!1),i||Fi(o)),null;case 13:return T0(i,o,s);case 4:return Oe(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=Pr(o,null,c,s):kt(i,o,c,s),o.child;case 11:return b0(i,o,o.type,o.pendingProps,s);case 7:return kt(i,o,o.pendingProps,s),o.child;case 8:return kt(i,o,o.pendingProps.children,s),o.child;case 12:return kt(i,o,o.pendingProps.children,s),o.child;case 10:return c=o.pendingProps,Gi(o,o.type,c.value),kt(i,o,c.children,s),o.child;case 9:return g=o.type._context,c=o.pendingProps.children,Nr(o),g=wt(g),c=c(g),o.flags|=1,kt(i,o,c,s),o.child;case 14:return S0(i,o,o.type,o.pendingProps,s);case 15:return _0(i,o,o.type,o.pendingProps,s);case 19:return R0(i,o,s);case 31:return Fk(i,o,s);case 22:return C0(i,o,s,o.pendingProps);case 24:return Nr(o),c=wt(rt),i===null?(g=qd(),g===null&&(g=Fe,v=Gd(),g.pooledCache=v,v.refCount++,v!==null&&(g.pooledCacheLanes|=s),g=v),o.memoizedState={parent:c,cache:g},Yd(o),Gi(o,rt,g)):((i.lanes&s)!==0&&(Xd(i,o),Ka(o,null,null,s),Xa()),g=i.memoizedState,v=o.memoizedState,g.parent!==c?(g={parent:c,cache:c},o.memoizedState=g,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=g),Gi(o,rt,c)):(c=v.cache,Gi(o,rt,c),c!==g.cache&&Fd(o,[rt],s,!0))),kt(i,o,o.pendingProps.children,s),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function di(i){i.flags|=4}function Of(i,o,s,c,g){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(g&335544128)===g)if(i.stateNode.complete)i.flags|=8192;else if(ry())i.flags|=8192;else throw Hr=Al,Wd}else i.flags&=-16777217}function D0(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Wy(o))if(ry())i.flags|=8192;else throw Hr=Al,Wd}function ql(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?dg():536870912,i.lanes|=o,Yo|=o)}function ns(i,o){if(!Re)switch(i.tailMode){case"hidden":o=i.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?i.tail=null:s.sibling=null;break;case"collapsed":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function We(i){var o=i.alternate!==null&&i.alternate.child===i.child,s=0,c=0;if(o)for(var g=i.child;g!==null;)s|=g.lanes|g.childLanes,c|=g.subtreeFlags&65011712,c|=g.flags&65011712,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)s|=g.lanes|g.childLanes,c|=g.subtreeFlags,c|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=c,i.childLanes=s,o}function $k(i,o,s){var c=o.pendingProps;switch(Pd(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(o),null;case 1:return We(o),null;case 3:return s=o.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),si(rt),me(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(i===null||i.child===null)&&(Io(o)?di(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Vd())),We(o),null;case 26:var g=o.type,v=o.memoizedState;return i===null?(di(o),v!==null?(We(o),D0(o,v)):(We(o),Of(o,g,null,c,s))):v?v!==i.memoizedState?(di(o),We(o),D0(o,v)):(We(o),o.flags&=-16777217):(i=i.memoizedProps,i!==c&&di(o),We(o),Of(o,g,i,c,s)),null;case 27:if(Je(o),s=ue.current,g=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&di(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return We(o),null}i=le.current,Io(o)?dv(o):(i=Uy(g,c,s),o.stateNode=i,di(o))}return We(o),null;case 5:if(Je(o),g=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&di(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return We(o),null}if(v=le.current,Io(o))dv(o);else{var C=su(ue.current);switch(v){case 1:v=C.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:v=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":v=C.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":v=C.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":v=C.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?C.createElement(g,{is:c.is}):C.createElement(g)}}v[xt]=o,v[Ht]=c;e:for(C=o.child;C!==null;){if(C.tag===5||C.tag===6)v.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break e;for(;C.sibling===null;){if(C.return===null||C.return===o)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}o.stateNode=v;e:switch(Lt(v,g,c),g){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&di(o)}}return We(o),Of(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,s),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==c&&di(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(i=ue.current,Io(o)){if(i=o.stateNode,s=o.memoizedProps,c=null,g=Et,g!==null)switch(g.tag){case 27:case 5:c=g.memoizedProps}i[xt]=o,i=!!(i.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||Ty(i.nodeValue,s)),i||Fi(o,!0)}else i=su(i).createTextNode(c),i[xt]=o,o.stateNode=i}return We(o),null;case 31:if(s=o.memoizedState,i===null||i.memoizedState!==null){if(c=Io(o),s!==null){if(i===null){if(!c)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[xt]=o}else Dr(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;We(o),i=!1}else s=Vd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=s),i=!0;if(!i)return o.flags&256?(nn(o),o):(nn(o),null);if((o.flags&128)!==0)throw Error(r(558))}return We(o),null;case 13:if(c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(g=Io(o),c!==null&&c.dehydrated!==null){if(i===null){if(!g)throw Error(r(318));if(g=o.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[xt]=o}else Dr(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;We(o),g=!1}else g=Vd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=g),g=!0;if(!g)return o.flags&256?(nn(o),o):(nn(o),null)}return nn(o),(o.flags&128)!==0?(o.lanes=s,o):(s=c!==null,i=i!==null&&i.memoizedState!==null,s&&(c=o.child,g=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(g=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==g&&(c.flags|=2048)),s!==i&&s&&(o.child.flags|=8192),ql(o,o.updateQueue),We(o),null);case 4:return me(),i===null&&Jf(o.stateNode.containerInfo),We(o),null;case 10:return si(o.type),We(o),null;case 19:if(q(et),c=o.memoizedState,c===null)return We(o),null;if(g=(o.flags&128)!==0,v=c.rendering,v===null)if(g)ns(c,!1);else{if(Ze!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Ml(i),v!==null){for(o.flags|=128,ns(c,!1),i=v.updateQueue,o.updateQueue=i,ql(o,i),o.subtreeFlags=0,i=s,s=o.child;s!==null;)av(s,i),s=s.sibling;return oe(et,et.current&1|2),Re&&oi(o,c.treeForkCount),o.child}i=i.sibling}c.tail!==null&&Kt()>Ql&&(o.flags|=128,g=!0,ns(c,!1),o.lanes=4194304)}else{if(!g)if(i=Ml(v),i!==null){if(o.flags|=128,g=!0,i=i.updateQueue,o.updateQueue=i,ql(o,i),ns(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!Re)return We(o),null}else 2*Kt()-c.renderingStartTime>Ql&&s!==536870912&&(o.flags|=128,g=!0,ns(c,!1),o.lanes=4194304);c.isBackwards?(v.sibling=o.child,o.child=v):(i=c.last,i!==null?i.sibling=v:o.child=v,c.last=v)}return c.tail!==null?(i=c.tail,c.rendering=i,c.tail=i.sibling,c.renderingStartTime=Kt(),i.sibling=null,s=et.current,oe(et,g?s&1|2:s&1),Re&&oi(o,c.treeForkCount),i):(We(o),null);case 22:case 23:return nn(o),Jd(),c=o.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(s&536870912)!==0&&(o.flags&128)===0&&(We(o),o.subtreeFlags&6&&(o.flags|=8192)):We(o),s=o.updateQueue,s!==null&&ql(o,s.retryQueue),s=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==s&&(o.flags|=2048),i!==null&&q(Ir),null;case 24:return s=null,i!==null&&(s=i.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),si(rt),We(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function qk(i,o){switch(Pd(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return si(rt),me(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Je(o),null;case 31:if(o.memoizedState!==null){if(nn(o),o.alternate===null)throw Error(r(340));Dr()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(nn(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Dr()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return q(et),null;case 4:return me(),null;case 10:return si(o.type),null;case 22:case 23:return nn(o),Jd(),i!==null&&q(Ir),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return si(rt),null;case 25:return null;default:return null}}function M0(i,o){switch(Pd(o),o.tag){case 3:si(rt),me();break;case 26:case 27:case 5:Je(o);break;case 4:me();break;case 31:o.memoizedState!==null&&nn(o);break;case 13:nn(o);break;case 19:q(et);break;case 10:si(o.type);break;case 22:case 23:nn(o),Jd(),i!==null&&q(Ir);break;case 24:si(rt)}}function is(i,o){try{var s=o.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var g=c.next;s=g;do{if((s.tag&i)===i){c=void 0;var v=s.create,C=s.inst;c=v(),C.destroy=c}s=s.next}while(s!==g)}}catch(T){Pe(o,o.return,T)}}function Ki(i,o,s){try{var c=o.updateQueue,g=c!==null?c.lastEffect:null;if(g!==null){var v=g.next;c=v;do{if((c.tag&i)===i){var C=c.inst,T=C.destroy;if(T!==void 0){C.destroy=void 0,g=o;var z=s,G=T;try{G()}catch(Q){Pe(g,z,Q)}}}c=c.next}while(c!==v)}}catch(Q){Pe(o,o.return,Q)}}function N0(i){var o=i.updateQueue;if(o!==null){var s=i.stateNode;try{Ev(o,s)}catch(c){Pe(i,i.return,c)}}}function I0(i,o,s){s.props=Vr(i.type,i.memoizedProps),s.state=i.memoizedState;try{s.componentWillUnmount()}catch(c){Pe(i,o,c)}}function rs(i,o){try{var s=i.ref;if(s!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}typeof s=="function"?i.refCleanup=s(c):s.current=c}}catch(g){Pe(i,o,g)}}function Pn(i,o){var s=i.ref,c=i.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(g){Pe(i,o,g)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(g){Pe(i,o,g)}else s.current=null}function z0(i){var o=i.type,s=i.memoizedProps,c=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(g){Pe(i,i.return,g)}}function Df(i,o,s){try{var c=i.stateNode;pL(c,i.type,s,o),c[Ht]=o}catch(g){Pe(i,i.return,g)}}function H0(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ir(i.type)||i.tag===4}function Mf(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||H0(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ir(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Nf(i,o,s){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(i,o):(o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(i),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=ni));else if(c!==4&&(c===27&&ir(i.type)&&(s=i.stateNode,o=null),i=i.child,i!==null))for(Nf(i,o,s),i=i.sibling;i!==null;)Nf(i,o,s),i=i.sibling}function Wl(i,o,s){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?s.insertBefore(i,o):s.appendChild(i);else if(c!==4&&(c===27&&ir(i.type)&&(s=i.stateNode),i=i.child,i!==null))for(Wl(i,o,s),i=i.sibling;i!==null;)Wl(i,o,s),i=i.sibling}function P0(i){var o=i.stateNode,s=i.memoizedProps;try{for(var c=i.type,g=o.attributes;g.length;)o.removeAttributeNode(g[0]);Lt(o,c,s),o[xt]=i,o[Ht]=s}catch(v){Pe(i,i.return,v)}}var fi=!1,st=!1,If=!1,U0=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Wk(i,o){if(i=i.containerInfo,nh=pu,i=Qg(i),Ld(i)){if("selectionStart"in i)var s={start:i.selectionStart,end:i.selectionEnd};else e:{s=(s=i.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var g=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var C=0,T=-1,z=-1,G=0,Q=0,ne=i,W=null;t:for(;;){for(var X;ne!==s||g!==0&&ne.nodeType!==3||(T=C+g),ne!==v||c!==0&&ne.nodeType!==3||(z=C+c),ne.nodeType===3&&(C+=ne.nodeValue.length),(X=ne.firstChild)!==null;)W=ne,ne=X;for(;;){if(ne===i)break t;if(W===s&&++G===g&&(T=C),W===v&&++Q===c&&(z=C),(X=ne.nextSibling)!==null)break;ne=W,W=ne.parentNode}ne=X}s=T===-1||z===-1?null:{start:T,end:z}}else s=null}s=s||{start:0,end:0}}else s=null;for(ih={focusedElem:i,selectionRange:s},pu=!1,yt=o;yt!==null;)if(o=yt,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,yt=i;else for(;yt!==null;){switch(o=yt,v=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(s=0;s<i.length;s++)g=i[s],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&v!==null){i=void 0,s=o,g=v.memoizedProps,v=v.memoizedState,c=s.stateNode;try{var he=Vr(s.type,g);i=c.getSnapshotBeforeUpdate(he,v),c.__reactInternalSnapshotBeforeUpdate=i}catch(ye){Pe(s,s.return,ye)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,s=i.nodeType,s===9)ah(i);else if(s===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":ah(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,yt=i;break}yt=o.return}}function V0(i,o,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:pi(i,s),c&4&&is(5,s);break;case 1:if(pi(i,s),c&4)if(i=s.stateNode,o===null)try{i.componentDidMount()}catch(C){Pe(s,s.return,C)}else{var g=Vr(s.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(g,o,i.__reactInternalSnapshotBeforeUpdate)}catch(C){Pe(s,s.return,C)}}c&64&&N0(s),c&512&&rs(s,s.return);break;case 3:if(pi(i,s),c&64&&(i=s.updateQueue,i!==null)){if(o=null,s.child!==null)switch(s.child.tag){case 27:case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}try{Ev(i,o)}catch(C){Pe(s,s.return,C)}}break;case 27:o===null&&c&4&&P0(s);case 26:case 5:pi(i,s),o===null&&c&4&&z0(s),c&512&&rs(s,s.return);break;case 12:pi(i,s);break;case 31:pi(i,s),c&4&&F0(i,s);break;case 13:pi(i,s),c&4&&G0(i,s),c&64&&(i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(s=nL.bind(null,s),CL(i,s))));break;case 22:if(c=s.memoizedState!==null||fi,!c){o=o!==null&&o.memoizedState!==null||st,g=fi;var v=st;fi=c,(st=o)&&!v?mi(i,s,(s.subtreeFlags&8772)!==0):pi(i,s),fi=g,st=v}break;case 30:break;default:pi(i,s)}}function B0(i){var o=i.alternate;o!==null&&(i.alternate=null,B0(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&cd(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Ye=null,Ut=!1;function hi(i,o,s){for(s=s.child;s!==null;)j0(i,o,s),s=s.sibling}function j0(i,o,s){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Ta,s)}catch{}switch(s.tag){case 26:st||Pn(s,o),hi(i,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:st||Pn(s,o);var c=Ye,g=Ut;ir(s.type)&&(Ye=s.stateNode,Ut=!1),hi(i,o,s),hs(s.stateNode),Ye=c,Ut=g;break;case 5:st||Pn(s,o);case 6:if(c=Ye,g=Ut,Ye=null,hi(i,o,s),Ye=c,Ut=g,Ye!==null)if(Ut)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(s.stateNode)}catch(v){Pe(s,o,v)}else try{Ye.removeChild(s.stateNode)}catch(v){Pe(s,o,v)}break;case 18:Ye!==null&&(Ut?(i=Ye,Ny(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,s.stateNode),na(i)):Ny(Ye,s.stateNode));break;case 4:c=Ye,g=Ut,Ye=s.stateNode.containerInfo,Ut=!0,hi(i,o,s),Ye=c,Ut=g;break;case 0:case 11:case 14:case 15:Ki(2,s,o),st||Ki(4,s,o),hi(i,o,s);break;case 1:st||(Pn(s,o),c=s.stateNode,typeof c.componentWillUnmount=="function"&&I0(s,o,c)),hi(i,o,s);break;case 21:hi(i,o,s);break;case 22:st=(c=st)||s.memoizedState!==null,hi(i,o,s),st=c;break;default:hi(i,o,s)}}function F0(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{na(i)}catch(s){Pe(o,o.return,s)}}}function G0(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{na(i)}catch(s){Pe(o,o.return,s)}}function Yk(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new U0),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new U0),o;default:throw Error(r(435,i.tag))}}function Yl(i,o){var s=Yk(i);o.forEach(function(c){if(!s.has(c)){s.add(c);var g=iL.bind(null,i,c);c.then(g,g)}})}function Vt(i,o){var s=o.deletions;if(s!==null)for(var c=0;c<s.length;c++){var g=s[c],v=i,C=o,T=C;e:for(;T!==null;){switch(T.tag){case 27:if(ir(T.type)){Ye=T.stateNode,Ut=!1;break e}break;case 5:Ye=T.stateNode,Ut=!1;break e;case 3:case 4:Ye=T.stateNode.containerInfo,Ut=!0;break e}T=T.return}if(Ye===null)throw Error(r(160));j0(v,C,g),Ye=null,Ut=!1,v=g.alternate,v!==null&&(v.return=null),g.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)$0(o,i),o=o.sibling}var Ln=null;function $0(i,o){var s=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Vt(o,i),Bt(i),c&4&&(Ki(3,i,i.return),is(3,i),Ki(5,i,i.return));break;case 1:Vt(o,i),Bt(i),c&512&&(st||s===null||Pn(s,s.return)),c&64&&fi&&(i=i.updateQueue,i!==null&&(c=i.callbacks,c!==null&&(s=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var g=Ln;if(Vt(o,i),Bt(i),c&512&&(st||s===null||Pn(s,s.return)),c&4){var v=s!==null?s.memoizedState:null;if(c=i.memoizedState,s===null)if(c===null)if(i.stateNode===null){e:{c=i.type,s=i.memoizedProps,g=g.ownerDocument||g;t:switch(c){case"title":v=g.getElementsByTagName("title")[0],(!v||v[Oa]||v[xt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=g.createElement(c),g.head.insertBefore(v,g.querySelector("head > title"))),Lt(v,c,s),v[xt]=i,vt(v),c=v;break e;case"link":var C=$y("link","href",g).get(c+(s.href||""));if(C){for(var T=0;T<C.length;T++)if(v=C[T],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){C.splice(T,1);break t}}v=g.createElement(c),Lt(v,c,s),g.head.appendChild(v);break;case"meta":if(C=$y("meta","content",g).get(c+(s.content||""))){for(T=0;T<C.length;T++)if(v=C[T],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){C.splice(T,1);break t}}v=g.createElement(c),Lt(v,c,s),g.head.appendChild(v);break;default:throw Error(r(468,c))}v[xt]=i,vt(v),c=v}i.stateNode=c}else qy(g,i.type,i.stateNode);else i.stateNode=Gy(g,c,i.memoizedProps);else v!==c?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,c===null?qy(g,i.type,i.stateNode):Gy(g,c,i.memoizedProps)):c===null&&i.stateNode!==null&&Df(i,i.memoizedProps,s.memoizedProps)}break;case 27:Vt(o,i),Bt(i),c&512&&(st||s===null||Pn(s,s.return)),s!==null&&c&4&&Df(i,i.memoizedProps,s.memoizedProps);break;case 5:if(Vt(o,i),Bt(i),c&512&&(st||s===null||Pn(s,s.return)),i.flags&32){g=i.stateNode;try{wo(g,"")}catch(he){Pe(i,i.return,he)}}c&4&&i.stateNode!=null&&(g=i.memoizedProps,Df(i,g,s!==null?s.memoizedProps:g)),c&1024&&(If=!0);break;case 6:if(Vt(o,i),Bt(i),c&4){if(i.stateNode===null)throw Error(r(162));c=i.memoizedProps,s=i.stateNode;try{s.nodeValue=c}catch(he){Pe(i,i.return,he)}}break;case 3:if(cu=null,g=Ln,Ln=lu(o.containerInfo),Vt(o,i),Ln=g,Bt(i),c&4&&s!==null&&s.memoizedState.isDehydrated)try{na(o.containerInfo)}catch(he){Pe(i,i.return,he)}If&&(If=!1,q0(i));break;case 4:c=Ln,Ln=lu(i.stateNode.containerInfo),Vt(o,i),Bt(i),Ln=c;break;case 12:Vt(o,i),Bt(i);break;case 31:Vt(o,i),Bt(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Yl(i,c)));break;case 13:Vt(o,i),Bt(i),i.child.flags&8192&&i.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Kl=Kt()),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Yl(i,c)));break;case 22:g=i.memoizedState!==null;var z=s!==null&&s.memoizedState!==null,G=fi,Q=st;if(fi=G||g,st=Q||z,Vt(o,i),st=Q,fi=G,Bt(i),c&8192)e:for(o=i.stateNode,o._visibility=g?o._visibility&-2:o._visibility|1,g&&(s===null||z||fi||st||Br(i)),s=null,o=i;;){if(o.tag===5||o.tag===26){if(s===null){z=s=o;try{if(v=z.stateNode,g)C=v.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{T=z.stateNode;var ne=z.memoizedProps.style,W=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;T.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(he){Pe(z,z.return,he)}}}else if(o.tag===6){if(s===null){z=o;try{z.stateNode.nodeValue=g?"":z.memoizedProps}catch(he){Pe(z,z.return,he)}}}else if(o.tag===18){if(s===null){z=o;try{var X=z.stateNode;g?Iy(X,!0):Iy(z.stateNode,!1)}catch(he){Pe(z,z.return,he)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;s===o&&(s=null),o=o.return}s===o&&(s=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=i.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Yl(i,s))));break;case 19:Vt(o,i),Bt(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Yl(i,c)));break;case 30:break;case 21:break;default:Vt(o,i),Bt(i)}}function Bt(i){var o=i.flags;if(o&2){try{for(var s,c=i.return;c!==null;){if(H0(c)){s=c;break}c=c.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var g=s.stateNode,v=Mf(i);Wl(i,v,g);break;case 5:var C=s.stateNode;s.flags&32&&(wo(C,""),s.flags&=-33);var T=Mf(i);Wl(i,T,C);break;case 3:case 4:var z=s.stateNode.containerInfo,G=Mf(i);Nf(i,G,z);break;default:throw Error(r(161))}}catch(Q){Pe(i,i.return,Q)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function q0(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;q0(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function pi(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)V0(i,o.alternate,o),o=o.sibling}function Br(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Ki(4,o,o.return),Br(o);break;case 1:Pn(o,o.return);var s=o.stateNode;typeof s.componentWillUnmount=="function"&&I0(o,o.return,s),Br(o);break;case 27:hs(o.stateNode);case 26:case 5:Pn(o,o.return),Br(o);break;case 22:o.memoizedState===null&&Br(o);break;case 30:Br(o);break;default:Br(o)}i=i.sibling}}function mi(i,o,s){for(s=s&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,g=i,v=o,C=v.flags;switch(v.tag){case 0:case 11:case 15:mi(g,v,s),is(4,v);break;case 1:if(mi(g,v,s),c=v,g=c.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(G){Pe(c,c.return,G)}if(c=v,g=c.updateQueue,g!==null){var T=c.stateNode;try{var z=g.shared.hiddenCallbacks;if(z!==null)for(g.shared.hiddenCallbacks=null,g=0;g<z.length;g++)xv(z[g],T)}catch(G){Pe(c,c.return,G)}}s&&C&64&&N0(v),rs(v,v.return);break;case 27:P0(v);case 26:case 5:mi(g,v,s),s&&c===null&&C&4&&z0(v),rs(v,v.return);break;case 12:mi(g,v,s);break;case 31:mi(g,v,s),s&&C&4&&F0(g,v);break;case 13:mi(g,v,s),s&&C&4&&G0(g,v);break;case 22:v.memoizedState===null&&mi(g,v,s),rs(v,v.return);break;case 30:break;default:mi(g,v,s)}o=o.sibling}}function zf(i,o){var s=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==s&&(i!=null&&i.refCount++,s!=null&&Ga(s))}function Hf(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Ga(i))}function Tn(i,o,s,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)W0(i,o,s,c),o=o.sibling}function W0(i,o,s,c){var g=o.flags;switch(o.tag){case 0:case 11:case 15:Tn(i,o,s,c),g&2048&&is(9,o);break;case 1:Tn(i,o,s,c);break;case 3:Tn(i,o,s,c),g&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Ga(i)));break;case 12:if(g&2048){Tn(i,o,s,c),i=o.stateNode;try{var v=o.memoizedProps,C=v.id,T=v.onPostCommit;typeof T=="function"&&T(C,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(z){Pe(o,o.return,z)}}else Tn(i,o,s,c);break;case 31:Tn(i,o,s,c);break;case 13:Tn(i,o,s,c);break;case 23:break;case 22:v=o.stateNode,C=o.alternate,o.memoizedState!==null?v._visibility&2?Tn(i,o,s,c):os(i,o):v._visibility&2?Tn(i,o,s,c):(v._visibility|=2,$o(i,o,s,c,(o.subtreeFlags&10256)!==0||!1)),g&2048&&zf(C,o);break;case 24:Tn(i,o,s,c),g&2048&&Hf(o.alternate,o);break;default:Tn(i,o,s,c)}}function $o(i,o,s,c,g){for(g=g&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var v=i,C=o,T=s,z=c,G=C.flags;switch(C.tag){case 0:case 11:case 15:$o(v,C,T,z,g),is(8,C);break;case 23:break;case 22:var Q=C.stateNode;C.memoizedState!==null?Q._visibility&2?$o(v,C,T,z,g):os(v,C):(Q._visibility|=2,$o(v,C,T,z,g)),g&&G&2048&&zf(C.alternate,C);break;case 24:$o(v,C,T,z,g),g&&G&2048&&Hf(C.alternate,C);break;default:$o(v,C,T,z,g)}o=o.sibling}}function os(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var s=i,c=o,g=c.flags;switch(c.tag){case 22:os(s,c),g&2048&&zf(c.alternate,c);break;case 24:os(s,c),g&2048&&Hf(c.alternate,c);break;default:os(s,c)}o=o.sibling}}var as=8192;function qo(i,o,s){if(i.subtreeFlags&as)for(i=i.child;i!==null;)Y0(i,o,s),i=i.sibling}function Y0(i,o,s){switch(i.tag){case 26:qo(i,o,s),i.flags&as&&i.memoizedState!==null&&NL(s,Ln,i.memoizedState,i.memoizedProps);break;case 5:qo(i,o,s);break;case 3:case 4:var c=Ln;Ln=lu(i.stateNode.containerInfo),qo(i,o,s),Ln=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=as,as=16777216,qo(i,o,s),as=c):qo(i,o,s));break;default:qo(i,o,s)}}function X0(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function ss(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var c=o[s];yt=c,Q0(c,i)}X0(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)K0(i),i=i.sibling}function K0(i){switch(i.tag){case 0:case 11:case 15:ss(i),i.flags&2048&&Ki(9,i,i.return);break;case 3:ss(i);break;case 12:ss(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Xl(i)):ss(i);break;default:ss(i)}}function Xl(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var c=o[s];yt=c,Q0(c,i)}X0(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Ki(8,o,o.return),Xl(o);break;case 22:s=o.stateNode,s._visibility&2&&(s._visibility&=-3,Xl(o));break;default:Xl(o)}i=i.sibling}}function Q0(i,o){for(;yt!==null;){var s=yt;switch(s.tag){case 0:case 11:case 15:Ki(8,s,o);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ga(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,yt=c;else e:for(s=i;yt!==null;){c=yt;var g=c.sibling,v=c.return;if(B0(c),c===s){yt=null;break e}if(g!==null){g.return=v,yt=g;break e}yt=v}}}var Xk={getCacheForType:function(i){var o=wt(rt),s=o.data.get(i);return s===void 0&&(s=i(),o.data.set(i,s)),s},cacheSignal:function(){return wt(rt).controller.signal}},Kk=typeof WeakMap=="function"?WeakMap:Map,Ie=0,Fe=null,ke=null,Te=0,He=0,rn=null,Qi=!1,Wo=!1,Pf=!1,gi=0,Ze=0,Zi=0,jr=0,Uf=0,on=0,Yo=0,ls=null,jt=null,Vf=!1,Kl=0,Z0=0,Ql=1/0,Zl=null,Ji=null,ut=0,er=null,Xo=null,vi=0,Bf=0,jf=null,J0=null,us=0,Ff=null;function an(){return(Ie&2)!==0&&Te!==0?Te&-Te:I.T!==null?Xf():mg()}function ey(){if(on===0)if((Te&536870912)===0||Re){var i=al;al<<=1,(al&3932160)===0&&(al=262144),on=i}else on=536870912;return i=tn.current,i!==null&&(i.flags|=32),on}function Ft(i,o,s){(i===Fe&&(He===2||He===9)||i.cancelPendingCommit!==null)&&(Ko(i,0),tr(i,Te,on,!1)),Ra(i,s),((Ie&2)===0||i!==Fe)&&(i===Fe&&((Ie&2)===0&&(jr|=s),Ze===4&&tr(i,Te,on,!1)),Un(i))}function ty(i,o,s){if((Ie&6)!==0)throw Error(r(327));var c=!s&&(o&127)===0&&(o&i.expiredLanes)===0||Aa(i,o),g=c?Jk(i,o):$f(i,o,!0),v=c;do{if(g===0){Wo&&!c&&tr(i,o,0,!1);break}else{if(s=i.current.alternate,v&&!Qk(s)){g=$f(i,o,!1),v=!1;continue}if(g===2){if(v=o,i.errorRecoveryDisabledLanes&v)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){o=C;e:{var T=i;g=ls;var z=T.current.memoizedState.isDehydrated;if(z&&(Ko(T,C).flags|=256),C=$f(T,C,!1),C!==2){if(Pf&&!z){T.errorRecoveryDisabledLanes|=v,jr|=v,g=4;break e}v=jt,jt=g,v!==null&&(jt===null?jt=v:jt.push.apply(jt,v))}g=C}if(v=!1,g!==2)continue}}if(g===1){Ko(i,0),tr(i,o,0,!0);break}e:{switch(c=i,v=g,v){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:tr(c,o,on,!Qi);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(g=Kl+300-Kt(),10<g)){if(tr(c,o,on,!Qi),ll(c,0,!0)!==0)break e;vi=o,c.timeoutHandle=Dy(ny.bind(null,c,s,jt,Zl,Vf,o,on,jr,Yo,Qi,v,"Throttled",-0,0),g);break e}ny(c,s,jt,Zl,Vf,o,on,jr,Yo,Qi,v,null,-0,0)}}break}while(!0);Un(i)}function ny(i,o,s,c,g,v,C,T,z,G,Q,ne,W,X){if(i.timeoutHandle=-1,ne=o.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ni},Y0(o,v,ne);var he=(v&62914560)===v?Kl-Kt():(v&4194048)===v?Z0-Kt():0;if(he=IL(ne,he),he!==null){vi=v,i.cancelPendingCommit=he(cy.bind(null,i,o,v,s,c,g,C,T,z,Q,ne,null,W,X)),tr(i,v,C,!G);return}}cy(i,o,v,s,c,g,C,T,z)}function Qk(i){for(var o=i;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var g=s[c],v=g.getSnapshot;g=g.value;try{if(!Jt(v(),g))return!1}catch{return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function tr(i,o,s,c){o&=~Uf,o&=~jr,i.suspendedLanes|=o,i.pingedLanes&=~o,c&&(i.warmLanes|=o),c=i.expirationTimes;for(var g=o;0<g;){var v=31-Zt(g),C=1<<v;c[v]=-1,g&=~C}s!==0&&fg(i,s,o)}function Jl(){return(Ie&6)===0?(cs(0),!1):!0}function Gf(){if(ke!==null){if(He===0)var i=ke.return;else i=ke,ai=Mr=null,af(i),Vo=null,qa=0,i=ke;for(;i!==null;)M0(i.alternate,i),i=i.return;ke=null}}function Ko(i,o){var s=i.timeoutHandle;s!==-1&&(i.timeoutHandle=-1,vL(s)),s=i.cancelPendingCommit,s!==null&&(i.cancelPendingCommit=null,s()),vi=0,Gf(),Fe=i,ke=s=ri(i.current,null),Te=o,He=0,rn=null,Qi=!1,Wo=Aa(i,o),Pf=!1,Yo=on=Uf=jr=Zi=Ze=0,jt=ls=null,Vf=!1,(o&8)!==0&&(o|=o&32);var c=i.entangledLanes;if(c!==0)for(i=i.entanglements,c&=o;0<c;){var g=31-Zt(c),v=1<<g;o|=i[g],c&=~v}return gi=o,Sl(),s}function iy(i,o){xe=null,I.H=es,o===Uo||o===Tl?(o=bv(),He=3):o===Wd?(o=bv(),He=4):He=o===Cf?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,rn=o,ke===null&&(Ze=1,jl(i,pn(o,i.current)))}function ry(){var i=tn.current;return i===null?!0:(Te&4194048)===Te?yn===null:(Te&62914560)===Te||(Te&536870912)!==0?i===yn:!1}function oy(){var i=I.H;return I.H=es,i===null?es:i}function ay(){var i=I.A;return I.A=Xk,i}function eu(){Ze=4,Qi||(Te&4194048)!==Te&&tn.current!==null||(Wo=!0),(Zi&134217727)===0&&(jr&134217727)===0||Fe===null||tr(Fe,Te,on,!1)}function $f(i,o,s){var c=Ie;Ie|=2;var g=oy(),v=ay();(Fe!==i||Te!==o)&&(Zl=null,Ko(i,o)),o=!1;var C=Ze;e:do try{if(He!==0&&ke!==null){var T=ke,z=rn;switch(He){case 8:Gf(),C=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(o=!0);var G=He;if(He=0,rn=null,Qo(i,T,z,G),s&&Wo){C=0;break e}break;default:G=He,He=0,rn=null,Qo(i,T,z,G)}}Zk(),C=Ze;break}catch(Q){iy(i,Q)}while(!0);return o&&i.shellSuspendCounter++,ai=Mr=null,Ie=c,I.H=g,I.A=v,ke===null&&(Fe=null,Te=0,Sl()),C}function Zk(){for(;ke!==null;)sy(ke)}function Jk(i,o){var s=Ie;Ie|=2;var c=oy(),g=ay();Fe!==i||Te!==o?(Zl=null,Ql=Kt()+500,Ko(i,o)):Wo=Aa(i,o);e:do try{if(He!==0&&ke!==null){o=ke;var v=rn;t:switch(He){case 1:He=0,rn=null,Qo(i,o,v,1);break;case 2:case 9:if(vv(v)){He=0,rn=null,ly(o);break}o=function(){He!==2&&He!==9||Fe!==i||(He=7),Un(i)},v.then(o,o);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:vv(v)?(He=0,rn=null,ly(o)):(He=0,rn=null,Qo(i,o,v,7));break;case 5:var C=null;switch(ke.tag){case 26:C=ke.memoizedState;case 5:case 27:var T=ke;if(C?Wy(C):T.stateNode.complete){He=0,rn=null;var z=T.sibling;if(z!==null)ke=z;else{var G=T.return;G!==null?(ke=G,tu(G)):ke=null}break t}}He=0,rn=null,Qo(i,o,v,5);break;case 6:He=0,rn=null,Qo(i,o,v,6);break;case 8:Gf(),Ze=6;break e;default:throw Error(r(462))}}eL();break}catch(Q){iy(i,Q)}while(!0);return ai=Mr=null,I.H=c,I.A=g,Ie=s,ke!==null?0:(Fe=null,Te=0,Sl(),Ze)}function eL(){for(;ke!==null&&!x1();)sy(ke)}function sy(i){var o=O0(i.alternate,i,gi);i.memoizedProps=i.pendingProps,o===null?tu(i):ke=o}function ly(i){var o=i,s=o.alternate;switch(o.tag){case 15:case 0:o=w0(s,o,o.pendingProps,o.type,void 0,Te);break;case 11:o=w0(s,o,o.pendingProps,o.type.render,o.ref,Te);break;case 5:af(o);default:M0(s,o),o=ke=av(o,gi),o=O0(s,o,gi)}i.memoizedProps=i.pendingProps,o===null?tu(i):ke=o}function Qo(i,o,s,c){ai=Mr=null,af(o),Vo=null,qa=0;var g=o.return;try{if(jk(i,g,o,s,Te)){Ze=1,jl(i,pn(s,i.current)),ke=null;return}}catch(v){if(g!==null)throw ke=g,v;Ze=1,jl(i,pn(s,i.current)),ke=null;return}o.flags&32768?(Re||c===1?i=!0:Wo||(Te&536870912)!==0?i=!1:(Qi=i=!0,(c===2||c===9||c===3||c===6)&&(c=tn.current,c!==null&&c.tag===13&&(c.flags|=16384))),uy(o,i)):tu(o)}function tu(i){var o=i;do{if((o.flags&32768)!==0){uy(o,Qi);return}i=o.return;var s=$k(o.alternate,o,gi);if(s!==null){ke=s;return}if(o=o.sibling,o!==null){ke=o;return}ke=o=i}while(o!==null);Ze===0&&(Ze=5)}function uy(i,o){do{var s=qk(i.alternate,i);if(s!==null){s.flags&=32767,ke=s;return}if(s=i.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(i=i.sibling,i!==null)){ke=i;return}ke=i=s}while(i!==null);Ze=6,ke=null}function cy(i,o,s,c,g,v,C,T,z){i.cancelPendingCommit=null;do nu();while(ut!==0);if((Ie&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(v=o.lanes|o.childLanes,v|=Dd,M1(i,s,v,C,T,z),i===Fe&&(ke=Fe=null,Te=0),Xo=o,er=i,vi=s,Bf=v,jf=g,J0=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,rL(rl,function(){return my(),null})):(i.callbackNode=null,i.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,g=$.p,$.p=2,C=Ie,Ie|=4;try{Wk(i,o,s)}finally{Ie=C,$.p=g,I.T=c}}ut=1,dy(),fy(),hy()}}function dy(){if(ut===1){ut=0;var i=er,o=Xo,s=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||s){s=I.T,I.T=null;var c=$.p;$.p=2;var g=Ie;Ie|=4;try{$0(o,i);var v=ih,C=Qg(i.containerInfo),T=v.focusedElem,z=v.selectionRange;if(C!==T&&T&&T.ownerDocument&&Kg(T.ownerDocument.documentElement,T)){if(z!==null&&Ld(T)){var G=z.start,Q=z.end;if(Q===void 0&&(Q=G),"selectionStart"in T)T.selectionStart=G,T.selectionEnd=Math.min(Q,T.value.length);else{var ne=T.ownerDocument||document,W=ne&&ne.defaultView||window;if(W.getSelection){var X=W.getSelection(),he=T.textContent.length,ye=Math.min(z.start,he),Be=z.end===void 0?ye:Math.min(z.end,he);!X.extend&&ye>Be&&(C=Be,Be=ye,ye=C);var V=Xg(T,ye),P=Xg(T,Be);if(V&&P&&(X.rangeCount!==1||X.anchorNode!==V.node||X.anchorOffset!==V.offset||X.focusNode!==P.node||X.focusOffset!==P.offset)){var j=ne.createRange();j.setStart(V.node,V.offset),X.removeAllRanges(),ye>Be?(X.addRange(j),X.extend(P.node,P.offset)):(j.setEnd(P.node,P.offset),X.addRange(j))}}}}for(ne=[],X=T;X=X.parentNode;)X.nodeType===1&&ne.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ne.length;T++){var ee=ne[T];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}pu=!!nh,ih=nh=null}finally{Ie=g,$.p=c,I.T=s}}i.current=o,ut=2}}function fy(){if(ut===2){ut=0;var i=er,o=Xo,s=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||s){s=I.T,I.T=null;var c=$.p;$.p=2;var g=Ie;Ie|=4;try{V0(i,o.alternate,o)}finally{Ie=g,$.p=c,I.T=s}}ut=3}}function hy(){if(ut===4||ut===3){ut=0,E1();var i=er,o=Xo,s=vi,c=J0;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?ut=5:(ut=0,Xo=er=null,py(i,i.pendingLanes));var g=i.pendingLanes;if(g===0&&(Ji=null),ld(s),o=o.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Ta,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=I.T,g=$.p,$.p=2,I.T=null;try{for(var v=i.onRecoverableError,C=0;C<c.length;C++){var T=c[C];v(T.value,{componentStack:T.stack})}}finally{I.T=o,$.p=g}}(vi&3)!==0&&nu(),Un(i),g=i.pendingLanes,(s&261930)!==0&&(g&42)!==0?i===Ff?us++:(us=0,Ff=i):us=0,cs(0)}}function py(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Ga(o)))}function nu(){return dy(),fy(),hy(),my()}function my(){if(ut!==5)return!1;var i=er,o=Bf;Bf=0;var s=ld(vi),c=I.T,g=$.p;try{$.p=32>s?32:s,I.T=null,s=jf,jf=null;var v=er,C=vi;if(ut=0,Xo=er=null,vi=0,(Ie&6)!==0)throw Error(r(331));var T=Ie;if(Ie|=4,K0(v.current),W0(v,v.current,C,s),Ie=T,cs(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Ta,v)}catch{}return!0}finally{$.p=g,I.T=c,py(i,o)}}function gy(i,o,s){o=pn(s,o),o=_f(i.stateNode,o,2),i=Wi(i,o,2),i!==null&&(Ra(i,2),Un(i))}function Pe(i,o,s){if(i.tag===3)gy(i,i,s);else for(;o!==null;){if(o.tag===3){gy(o,i,s);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ji===null||!Ji.has(c))){i=pn(s,i),s=v0(2),c=Wi(o,s,2),c!==null&&(y0(s,c,o,i),Ra(c,2),Un(c));break}}o=o.return}}function qf(i,o,s){var c=i.pingCache;if(c===null){c=i.pingCache=new Kk;var g=new Set;c.set(o,g)}else g=c.get(o),g===void 0&&(g=new Set,c.set(o,g));g.has(s)||(Pf=!0,g.add(s),i=tL.bind(null,i,o,s),o.then(i,i))}function tL(i,o,s){var c=i.pingCache;c!==null&&c.delete(o),i.pingedLanes|=i.suspendedLanes&s,i.warmLanes&=~s,Fe===i&&(Te&s)===s&&(Ze===4||Ze===3&&(Te&62914560)===Te&&300>Kt()-Kl?(Ie&2)===0&&Ko(i,0):Uf|=s,Yo===Te&&(Yo=0)),Un(i)}function vy(i,o){o===0&&(o=dg()),i=Rr(i,o),i!==null&&(Ra(i,o),Un(i))}function nL(i){var o=i.memoizedState,s=0;o!==null&&(s=o.retryLane),vy(i,s)}function iL(i,o){var s=0;switch(i.tag){case 31:case 13:var c=i.stateNode,g=i.memoizedState;g!==null&&(s=g.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(o),vy(i,s)}function rL(i,o){return gt(i,o)}var iu=null,Zo=null,Wf=!1,ru=!1,Yf=!1,nr=0;function Un(i){i!==Zo&&i.next===null&&(Zo===null?iu=Zo=i:Zo=Zo.next=i),ru=!0,Wf||(Wf=!0,aL())}function cs(i,o){if(!Yf&&ru){Yf=!0;do for(var s=!1,c=iu;c!==null;){if(i!==0){var g=c.pendingLanes;if(g===0)var v=0;else{var C=c.suspendedLanes,T=c.pingedLanes;v=(1<<31-Zt(42|i)+1)-1,v&=g&~(C&~T),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,_y(c,v))}else v=Te,v=ll(c,c===Fe?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||Aa(c,v)||(s=!0,_y(c,v));c=c.next}while(s);Yf=!1}}function oL(){yy()}function yy(){ru=Wf=!1;var i=0;nr!==0&&gL()&&(i=nr);for(var o=Kt(),s=null,c=iu;c!==null;){var g=c.next,v=by(c,o);v===0?(c.next=null,s===null?iu=g:s.next=g,g===null&&(Zo=s)):(s=c,(i!==0||(v&3)!==0)&&(ru=!0)),c=g}ut!==0&&ut!==5||cs(i),nr!==0&&(nr=0)}function by(i,o){for(var s=i.suspendedLanes,c=i.pingedLanes,g=i.expirationTimes,v=i.pendingLanes&-62914561;0<v;){var C=31-Zt(v),T=1<<C,z=g[C];z===-1?((T&s)===0||(T&c)!==0)&&(g[C]=D1(T,o)):z<=o&&(i.expiredLanes|=T),v&=~T}if(o=Fe,s=Te,s=ll(i,i===o?s:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,s===0||i===o&&(He===2||He===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&Hi(c),i.callbackNode=null,i.callbackPriority=0;if((s&3)===0||Aa(i,s)){if(o=s&-s,o===i.callbackPriority)return o;switch(c!==null&&Hi(c),ld(s)){case 2:case 8:s=ug;break;case 32:s=rl;break;case 268435456:s=cg;break;default:s=rl}return c=Sy.bind(null,i),s=gt(s,c),i.callbackPriority=o,i.callbackNode=s,o}return c!==null&&c!==null&&Hi(c),i.callbackPriority=2,i.callbackNode=null,2}function Sy(i,o){if(ut!==0&&ut!==5)return i.callbackNode=null,i.callbackPriority=0,null;var s=i.callbackNode;if(nu()&&i.callbackNode!==s)return null;var c=Te;return c=ll(i,i===Fe?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(ty(i,c,o),by(i,Kt()),i.callbackNode!=null&&i.callbackNode===s?Sy.bind(null,i):null)}function _y(i,o){if(nu())return null;ty(i,o,!0)}function aL(){yL(function(){(Ie&6)!==0?gt(lg,oL):yy()})}function Xf(){if(nr===0){var i=Ho;i===0&&(i=ol,ol<<=1,(ol&261888)===0&&(ol=256)),nr=i}return nr}function Cy(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:fl(""+i)}function xy(i,o){var s=o.ownerDocument.createElement("input");return s.name=o.name,s.value=o.value,i.id&&s.setAttribute("form",i.id),o.parentNode.insertBefore(s,o),i=new FormData(i),s.parentNode.removeChild(s),i}function sL(i,o,s,c,g){if(o==="submit"&&s&&s.stateNode===g){var v=Cy((g[Ht]||null).action),C=c.submitter;C&&(o=(o=C[Ht]||null)?Cy(o.formAction):C.getAttribute("formAction"),o!==null&&(v=o,C=null));var T=new gl("action","action",null,c,g);i.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(nr!==0){var z=C?xy(g,C):new FormData(g);mf(s,{pending:!0,data:z,method:g.method,action:v},null,z)}}else typeof v=="function"&&(T.preventDefault(),z=C?xy(g,C):new FormData(g),mf(s,{pending:!0,data:z,method:g.method,action:v},v,z))},currentTarget:g}]})}}for(var Kf=0;Kf<Od.length;Kf++){var Qf=Od[Kf],lL=Qf.toLowerCase(),uL=Qf[0].toUpperCase()+Qf.slice(1);kn(lL,"on"+uL)}kn(ev,"onAnimationEnd"),kn(tv,"onAnimationIteration"),kn(nv,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(wk,"onTransitionRun"),kn(kk,"onTransitionStart"),kn(Lk,"onTransitionCancel"),kn(iv,"onTransitionEnd"),xo("onMouseEnter",["mouseout","mouseover"]),xo("onMouseLeave",["mouseout","mouseover"]),xo("onPointerEnter",["pointerout","pointerover"]),xo("onPointerLeave",["pointerout","pointerover"]),kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kr("onBeforeInput",["compositionend","keypress","textInput","paste"]),kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ds="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(" "),cL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ds));function Ey(i,o){o=(o&4)!==0;for(var s=0;s<i.length;s++){var c=i[s],g=c.event;c=c.listeners;e:{var v=void 0;if(o)for(var C=c.length-1;0<=C;C--){var T=c[C],z=T.instance,G=T.currentTarget;if(T=T.listener,z!==v&&g.isPropagationStopped())break e;v=T,g.currentTarget=G;try{v(g)}catch(Q){bl(Q)}g.currentTarget=null,v=z}else for(C=0;C<c.length;C++){if(T=c[C],z=T.instance,G=T.currentTarget,T=T.listener,z!==v&&g.isPropagationStopped())break e;v=T,g.currentTarget=G;try{v(g)}catch(Q){bl(Q)}g.currentTarget=null,v=z}}}}function Le(i,o){var s=o[ud];s===void 0&&(s=o[ud]=new Set);var c=i+"__bubble";s.has(c)||(wy(o,i,2,!1),s.add(c))}function Zf(i,o,s){var c=0;o&&(c|=4),wy(s,i,c,o)}var ou="_reactListening"+Math.random().toString(36).slice(2);function Jf(i){if(!i[ou]){i[ou]=!0,yg.forEach(function(s){s!=="selectionchange"&&(cL.has(s)||Zf(s,!1,i),Zf(s,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[ou]||(o[ou]=!0,Zf("selectionchange",!1,o))}}function wy(i,o,s,c){switch(eb(o)){case 2:var g=PL;break;case 8:g=UL;break;default:g=ph}s=g.bind(null,o,s,i),g=void 0,!yd||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),c?g!==void 0?i.addEventListener(o,s,{capture:!0,passive:g}):i.addEventListener(o,s,!0):g!==void 0?i.addEventListener(o,s,{passive:g}):i.addEventListener(o,s,!1)}function eh(i,o,s,c,g){var v=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var C=c.tag;if(C===3||C===4){var T=c.stateNode.containerInfo;if(T===g)break;if(C===4)for(C=c.return;C!==null;){var z=C.tag;if((z===3||z===4)&&C.stateNode.containerInfo===g)return;C=C.return}for(;T!==null;){if(C=So(T),C===null)return;if(z=C.tag,z===5||z===6||z===26||z===27){c=v=C;continue e}T=T.parentNode}}c=c.return}Rg(function(){var G=v,Q=gd(s),ne=[];e:{var W=rv.get(i);if(W!==void 0){var X=gl,he=i;switch(i){case"keypress":if(pl(s)===0)break e;case"keydown":case"keyup":X=ik;break;case"focusin":he="focus",X=Cd;break;case"focusout":he="blur",X=Cd;break;case"beforeblur":case"afterblur":X=Cd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Mg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=ak;break;case ev:case tv:case nv:X=Y1;break;case iv:X=lk;break;case"scroll":case"scrollend":X=F1;break;case"wheel":X=ck;break;case"copy":case"cut":case"paste":X=K1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Ig;break;case"toggle":case"beforetoggle":X=fk}var ye=(o&4)!==0,Be=!ye&&(i==="scroll"||i==="scrollend"),V=ye?W!==null?W+"Capture":null:W;ye=[];for(var P=G,j;P!==null;){var ee=P;if(j=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||j===null||V===null||(ee=Ma(P,V),ee!=null&&ye.push(fs(P,ee,j))),Be)break;P=P.return}0<ye.length&&(W=new X(W,he,null,s,Q),ne.push({event:W,listeners:ye}))}}if((o&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",X=i==="mouseout"||i==="pointerout",W&&s!==md&&(he=s.relatedTarget||s.fromElement)&&(So(he)||he[bo]))break e;if((X||W)&&(W=Q.window===Q?Q:(W=Q.ownerDocument)?W.defaultView||W.parentWindow:window,X?(he=s.relatedTarget||s.toElement,X=G,he=he?So(he):null,he!==null&&(Be=l(he),ye=he.tag,he!==Be||ye!==5&&ye!==27&&ye!==6)&&(he=null)):(X=null,he=G),X!==he)){if(ye=Mg,ee="onMouseLeave",V="onMouseEnter",P="mouse",(i==="pointerout"||i==="pointerover")&&(ye=Ig,ee="onPointerLeave",V="onPointerEnter",P="pointer"),Be=X==null?W:Da(X),j=he==null?W:Da(he),W=new ye(ee,P+"leave",X,s,Q),W.target=Be,W.relatedTarget=j,ee=null,So(Q)===G&&(ye=new ye(V,P+"enter",he,s,Q),ye.target=j,ye.relatedTarget=Be,ee=ye),Be=ee,X&&he)t:{for(ye=dL,V=X,P=he,j=0,ee=V;ee;ee=ye(ee))j++;ee=0;for(var ve=P;ve;ve=ye(ve))ee++;for(;0<j-ee;)V=ye(V),j--;for(;0<ee-j;)P=ye(P),ee--;for(;j--;){if(V===P||P!==null&&V===P.alternate){ye=V;break t}V=ye(V),P=ye(P)}ye=null}else ye=null;X!==null&&ky(ne,W,X,ye,!1),he!==null&&Be!==null&&ky(ne,Be,he,ye,!0)}}e:{if(W=G?Da(G):window,X=W.nodeName&&W.nodeName.toLowerCase(),X==="select"||X==="input"&&W.type==="file")var De=Fg;else if(Bg(W))if(Gg)De=Ck;else{De=Sk;var pe=bk}else X=W.nodeName,!X||X.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?G&&pd(G.elementType)&&(De=Fg):De=_k;if(De&&(De=De(i,G))){jg(ne,De,s,Q);break e}pe&&pe(i,W,G),i==="focusout"&&G&&W.type==="number"&&G.memoizedProps.value!=null&&hd(W,"number",W.value)}switch(pe=G?Da(G):window,i){case"focusin":(Bg(pe)||pe.contentEditable==="true")&&(Ao=pe,Td=G,Ba=null);break;case"focusout":Ba=Td=Ao=null;break;case"mousedown":Ad=!0;break;case"contextmenu":case"mouseup":case"dragend":Ad=!1,Zg(ne,s,Q);break;case"selectionchange":if(Ek)break;case"keydown":case"keyup":Zg(ne,s,Q)}var Ee;if(Ed)e:{switch(i){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else To?Ug(i,s)&&(Ae="onCompositionEnd"):i==="keydown"&&s.keyCode===229&&(Ae="onCompositionStart");Ae&&(zg&&s.locale!=="ko"&&(To||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&To&&(Ee=Og()):(Vi=Q,bd="value"in Vi?Vi.value:Vi.textContent,To=!0)),pe=au(G,Ae),0<pe.length&&(Ae=new Ng(Ae,i,null,s,Q),ne.push({event:Ae,listeners:pe}),Ee?Ae.data=Ee:(Ee=Vg(s),Ee!==null&&(Ae.data=Ee)))),(Ee=pk?mk(i,s):gk(i,s))&&(Ae=au(G,"onBeforeInput"),0<Ae.length&&(pe=new Ng("onBeforeInput","beforeinput",null,s,Q),ne.push({event:pe,listeners:Ae}),pe.data=Ee)),sL(ne,i,G,s,Q)}Ey(ne,o)})}function fs(i,o,s){return{instance:i,listener:o,currentTarget:s}}function au(i,o){for(var s=o+"Capture",c=[];i!==null;){var g=i,v=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||v===null||(g=Ma(i,s),g!=null&&c.unshift(fs(i,g,v)),g=Ma(i,o),g!=null&&c.push(fs(i,g,v))),i.tag===3)return c;i=i.return}return[]}function dL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function ky(i,o,s,c,g){for(var v=o._reactName,C=[];s!==null&&s!==c;){var T=s,z=T.alternate,G=T.stateNode;if(T=T.tag,z!==null&&z===c)break;T!==5&&T!==26&&T!==27||G===null||(z=G,g?(G=Ma(s,v),G!=null&&C.unshift(fs(s,G,z))):g||(G=Ma(s,v),G!=null&&C.push(fs(s,G,z)))),s=s.return}C.length!==0&&i.push({event:o,listeners:C})}var fL=/\r\n?/g,hL=/\u0000|\uFFFD/g;function Ly(i){return(typeof i=="string"?i:""+i).replace(fL,`
|
|
10
|
+
`).replace(hL,"")}function Ty(i,o){return o=Ly(o),Ly(i)===o}function Ve(i,o,s,c,g,v){switch(s){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||wo(i,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&wo(i,""+c);break;case"className":cl(i,"class",c);break;case"tabIndex":cl(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(i,s,c);break;case"style":Tg(i,c,v);break;case"data":if(o!=="object"){cl(i,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||s!=="href")){i.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(s);break}c=fl(""+c),i.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(s==="formAction"?(o!=="input"&&Ve(i,o,"name",g.name,g,null),Ve(i,o,"formEncType",g.formEncType,g,null),Ve(i,o,"formMethod",g.formMethod,g,null),Ve(i,o,"formTarget",g.formTarget,g,null)):(Ve(i,o,"encType",g.encType,g,null),Ve(i,o,"method",g.method,g,null),Ve(i,o,"target",g.target,g,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(s);break}c=fl(""+c),i.setAttribute(s,c);break;case"onClick":c!=null&&(i.onclick=ni);break;case"onScroll":c!=null&&Le("scroll",i);break;case"onScrollEnd":c!=null&&Le("scrollend",i);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(g.children!=null)throw Error(r(60));i.innerHTML=s}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}s=fl(""+c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(s,""+c):i.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(s,""):i.removeAttribute(s);break;case"capture":case"download":c===!0?i.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(s,c):i.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(s,c):i.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(s):i.setAttribute(s,c);break;case"popover":Le("beforetoggle",i),Le("toggle",i),ul(i,"popover",c);break;case"xlinkActuate":ti(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ti(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ti(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ti(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ti(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ti(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ti(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ti(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ti(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ul(i,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=B1.get(s)||s,ul(i,s,c))}}function th(i,o,s,c,g,v){switch(s){case"style":Tg(i,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(g.children!=null)throw Error(r(60));i.innerHTML=s}}break;case"children":typeof c=="string"?wo(i,c):(typeof c=="number"||typeof c=="bigint")&&wo(i,""+c);break;case"onScroll":c!=null&&Le("scroll",i);break;case"onScrollEnd":c!=null&&Le("scrollend",i);break;case"onClick":c!=null&&(i.onclick=ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(g=s.endsWith("Capture"),o=s.slice(2,g?s.length-7:void 0),v=i[Ht]||null,v=v!=null?v[s]:null,typeof v=="function"&&i.removeEventListener(o,v,g),typeof c=="function")){typeof v!="function"&&v!==null&&(s in i?i[s]=null:i.hasAttribute(s)&&i.removeAttribute(s)),i.addEventListener(o,c,g);break e}s in i?i[s]=c:c===!0?i.setAttribute(s,""):ul(i,s,c)}}}function Lt(i,o,s){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",i),Le("load",i);var c=!1,g=!1,v;for(v in s)if(s.hasOwnProperty(v)){var C=s[v];if(C!=null)switch(v){case"src":c=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ve(i,o,v,C,s,null)}}g&&Ve(i,o,"srcSet",s.srcSet,s,null),c&&Ve(i,o,"src",s.src,s,null);return;case"input":Le("invalid",i);var T=v=C=g=null,z=null,G=null;for(c in s)if(s.hasOwnProperty(c)){var Q=s[c];if(Q!=null)switch(c){case"name":g=Q;break;case"type":C=Q;break;case"checked":z=Q;break;case"defaultChecked":G=Q;break;case"value":v=Q;break;case"defaultValue":T=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,o));break;default:Ve(i,o,c,Q,s,null)}}Eg(i,v,T,z,G,C,g,!1);return;case"select":Le("invalid",i),c=C=v=null;for(g in s)if(s.hasOwnProperty(g)&&(T=s[g],T!=null))switch(g){case"value":v=T;break;case"defaultValue":C=T;break;case"multiple":c=T;default:Ve(i,o,g,T,s,null)}o=v,s=C,i.multiple=!!c,o!=null?Eo(i,!!c,o,!1):s!=null&&Eo(i,!!c,s,!0);return;case"textarea":Le("invalid",i),v=g=c=null;for(C in s)if(s.hasOwnProperty(C)&&(T=s[C],T!=null))switch(C){case"value":c=T;break;case"defaultValue":g=T;break;case"children":v=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Ve(i,o,C,T,s,null)}kg(i,c,g,v);return;case"option":for(z in s)s.hasOwnProperty(z)&&(c=s[z],c!=null)&&(z==="selected"?i.selected=c&&typeof c!="function"&&typeof c!="symbol":Ve(i,o,z,c,s,null));return;case"dialog":Le("beforetoggle",i),Le("toggle",i),Le("cancel",i),Le("close",i);break;case"iframe":case"object":Le("load",i);break;case"video":case"audio":for(c=0;c<ds.length;c++)Le(ds[c],i);break;case"image":Le("error",i),Le("load",i);break;case"details":Le("toggle",i);break;case"embed":case"source":case"link":Le("error",i),Le("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in s)if(s.hasOwnProperty(G)&&(c=s[G],c!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ve(i,o,G,c,s,null)}return;default:if(pd(o)){for(Q in s)s.hasOwnProperty(Q)&&(c=s[Q],c!==void 0&&th(i,o,Q,c,s,void 0));return}}for(T in s)s.hasOwnProperty(T)&&(c=s[T],c!=null&&Ve(i,o,T,c,s,null))}function pL(i,o,s,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,v=null,C=null,T=null,z=null,G=null,Q=null;for(X in s){var ne=s[X];if(s.hasOwnProperty(X)&&ne!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":z=ne;default:c.hasOwnProperty(X)||Ve(i,o,X,null,c,ne)}}for(var W in c){var X=c[W];if(ne=s[W],c.hasOwnProperty(W)&&(X!=null||ne!=null))switch(W){case"type":v=X;break;case"name":g=X;break;case"checked":G=X;break;case"defaultChecked":Q=X;break;case"value":C=X;break;case"defaultValue":T=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,o));break;default:X!==ne&&Ve(i,o,W,X,c,ne)}}fd(i,C,T,z,G,Q,v,g);return;case"select":X=C=T=W=null;for(v in s)if(z=s[v],s.hasOwnProperty(v)&&z!=null)switch(v){case"value":break;case"multiple":X=z;default:c.hasOwnProperty(v)||Ve(i,o,v,null,c,z)}for(g in c)if(v=c[g],z=s[g],c.hasOwnProperty(g)&&(v!=null||z!=null))switch(g){case"value":W=v;break;case"defaultValue":T=v;break;case"multiple":C=v;default:v!==z&&Ve(i,o,g,v,c,z)}o=T,s=C,c=X,W!=null?Eo(i,!!s,W,!1):!!c!=!!s&&(o!=null?Eo(i,!!s,o,!0):Eo(i,!!s,s?[]:"",!1));return;case"textarea":X=W=null;for(T in s)if(g=s[T],s.hasOwnProperty(T)&&g!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ve(i,o,T,null,c,g)}for(C in c)if(g=c[C],v=s[C],c.hasOwnProperty(C)&&(g!=null||v!=null))switch(C){case"value":W=g;break;case"defaultValue":X=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==v&&Ve(i,o,C,g,c,v)}wg(i,W,X);return;case"option":for(var he in s)W=s[he],s.hasOwnProperty(he)&&W!=null&&!c.hasOwnProperty(he)&&(he==="selected"?i.selected=!1:Ve(i,o,he,null,c,W));for(z in c)W=c[z],X=s[z],c.hasOwnProperty(z)&&W!==X&&(W!=null||X!=null)&&(z==="selected"?i.selected=W&&typeof W!="function"&&typeof W!="symbol":Ve(i,o,z,W,c,X));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 ye in s)W=s[ye],s.hasOwnProperty(ye)&&W!=null&&!c.hasOwnProperty(ye)&&Ve(i,o,ye,null,c,W);for(G in c)if(W=c[G],X=s[G],c.hasOwnProperty(G)&&W!==X&&(W!=null||X!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,o));break;default:Ve(i,o,G,W,c,X)}return;default:if(pd(o)){for(var Be in s)W=s[Be],s.hasOwnProperty(Be)&&W!==void 0&&!c.hasOwnProperty(Be)&&th(i,o,Be,void 0,c,W);for(Q in c)W=c[Q],X=s[Q],!c.hasOwnProperty(Q)||W===X||W===void 0&&X===void 0||th(i,o,Q,W,c,X);return}}for(var V in s)W=s[V],s.hasOwnProperty(V)&&W!=null&&!c.hasOwnProperty(V)&&Ve(i,o,V,null,c,W);for(ne in c)W=c[ne],X=s[ne],!c.hasOwnProperty(ne)||W===X||W==null&&X==null||Ve(i,o,ne,W,c,X)}function Ay(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var g=s[c],v=g.transferSize,C=g.initiatorType,T=g.duration;if(v&&T&&Ay(C)){for(C=0,T=g.responseEnd,c+=1;c<s.length;c++){var z=s[c],G=z.startTime;if(G>T)break;var Q=z.transferSize,ne=z.initiatorType;Q&&Ay(ne)&&(z=z.responseEnd,C+=Q*(z<T?1:(T-G)/(z-G)))}if(--c,o+=8*(v+C)/(g.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var nh=null,ih=null;function su(i){return i.nodeType===9?i:i.ownerDocument}function Ry(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Oy(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function rh(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var oh=null;function gL(){var i=window.event;return i&&i.type==="popstate"?i===oh?!1:(oh=i,!0):(oh=null,!1)}var Dy=typeof setTimeout=="function"?setTimeout:void 0,vL=typeof clearTimeout=="function"?clearTimeout:void 0,My=typeof Promise=="function"?Promise:void 0,yL=typeof queueMicrotask=="function"?queueMicrotask:typeof My<"u"?function(i){return My.resolve(null).then(i).catch(bL)}:Dy;function bL(i){setTimeout(function(){throw i})}function ir(i){return i==="head"}function Ny(i,o){var s=o,c=0;do{var g=s.nextSibling;if(i.removeChild(s),g&&g.nodeType===8)if(s=g.data,s==="/$"||s==="/&"){if(c===0){i.removeChild(g),na(o);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")hs(i.ownerDocument.documentElement);else if(s==="head"){s=i.ownerDocument.head,hs(s);for(var v=s.firstChild;v;){var C=v.nextSibling,T=v.nodeName;v[Oa]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=C}}else s==="body"&&hs(i.ownerDocument.body);s=g}while(s);na(o)}function Iy(i,o){var s=i;i=0;do{var c=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(i===0)break;i--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||i++;s=c}while(s)}function ah(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ah(s),cd(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}i.removeChild(s)}}function SL(i,o,s,c){for(;i.nodeType===1;){var g=s;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[Oa])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(v=i.getAttribute("rel"),v==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(v!==g.rel||i.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||i.getAttribute("title")!==(g.title==null?null:g.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(v=i.getAttribute("src"),(v!==(g.src==null?null:g.src)||i.getAttribute("type")!==(g.type==null?null:g.type)||i.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&v&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var v=g.name==null?null:""+g.name;if(g.type==="hidden"&&i.getAttribute("name")===v)return i}else return i;if(i=bn(i.nextSibling),i===null)break}return null}function _L(i,o,s){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=bn(i.nextSibling),i===null))return null;return i}function zy(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=bn(i.nextSibling),i===null))return null;return i}function sh(i){return i.data==="$?"||i.data==="$~"}function lh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function CL(i,o){var s=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||s.readyState!=="loading")o();else{var c=function(){o(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function bn(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var uh=null;function Hy(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var s=i.data;if(s==="/$"||s==="/&"){if(o===0)return bn(i.nextSibling);o--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||o++}i=i.nextSibling}return null}function Py(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var s=i.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(o===0)return i;o--}else s!=="/$"&&s!=="/&"||o++}i=i.previousSibling}return null}function Uy(i,o,s){switch(o=su(s),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function hs(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);cd(i)}var Sn=new Map,Vy=new Set;function lu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var yi=$.d;$.d={f:xL,r:EL,D:wL,C:kL,L:LL,m:TL,X:RL,S:AL,M:OL};function xL(){var i=yi.f(),o=Jl();return i||o}function EL(i){var o=_o(i);o!==null&&o.tag===5&&o.type==="form"?i0(o):yi.r(i)}var Jo=typeof document>"u"?null:document;function By(i,o,s){var c=Jo;if(c&&typeof o=="string"&&o){var g=fn(o);g='link[rel="'+i+'"][href="'+g+'"]',typeof s=="string"&&(g+='[crossorigin="'+s+'"]'),Vy.has(g)||(Vy.add(g),i={rel:i,crossOrigin:s,href:o},c.querySelector(g)===null&&(o=c.createElement("link"),Lt(o,"link",i),vt(o),c.head.appendChild(o)))}}function wL(i){yi.D(i),By("dns-prefetch",i,null)}function kL(i,o){yi.C(i,o),By("preconnect",i,o)}function LL(i,o,s){yi.L(i,o,s);var c=Jo;if(c&&i&&o){var g='link[rel="preload"][as="'+fn(o)+'"]';o==="image"&&s&&s.imageSrcSet?(g+='[imagesrcset="'+fn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(g+='[imagesizes="'+fn(s.imageSizes)+'"]')):g+='[href="'+fn(i)+'"]';var v=g;switch(o){case"style":v=ea(i);break;case"script":v=ta(i)}Sn.has(v)||(i=m({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:i,as:o},s),Sn.set(v,i),c.querySelector(g)!==null||o==="style"&&c.querySelector(ps(v))||o==="script"&&c.querySelector(ms(v))||(o=c.createElement("link"),Lt(o,"link",i),vt(o),c.head.appendChild(o)))}}function TL(i,o){yi.m(i,o);var s=Jo;if(s&&i){var c=o&&typeof o.as=="string"?o.as:"script",g='link[rel="modulepreload"][as="'+fn(c)+'"][href="'+fn(i)+'"]',v=g;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ta(i)}if(!Sn.has(v)&&(i=m({rel:"modulepreload",href:i},o),Sn.set(v,i),s.querySelector(g)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ms(v)))return}c=s.createElement("link"),Lt(c,"link",i),vt(c),s.head.appendChild(c)}}}function AL(i,o,s){yi.S(i,o,s);var c=Jo;if(c&&i){var g=Co(c).hoistableStyles,v=ea(i);o=o||"default";var C=g.get(v);if(!C){var T={loading:0,preload:null};if(C=c.querySelector(ps(v)))T.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},s),(s=Sn.get(v))&&ch(i,s);var z=C=c.createElement("link");vt(z),Lt(z,"link",i),z._p=new Promise(function(G,Q){z.onload=G,z.onerror=Q}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,uu(C,o,c)}C={type:"stylesheet",instance:C,count:1,state:T},g.set(v,C)}}}function RL(i,o){yi.X(i,o);var s=Jo;if(s&&i){var c=Co(s).hoistableScripts,g=ta(i),v=c.get(g);v||(v=s.querySelector(ms(g)),v||(i=m({src:i,async:!0},o),(o=Sn.get(g))&&dh(i,o),v=s.createElement("script"),vt(v),Lt(v,"link",i),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(g,v))}}function OL(i,o){yi.M(i,o);var s=Jo;if(s&&i){var c=Co(s).hoistableScripts,g=ta(i),v=c.get(g);v||(v=s.querySelector(ms(g)),v||(i=m({src:i,async:!0,type:"module"},o),(o=Sn.get(g))&&dh(i,o),v=s.createElement("script"),vt(v),Lt(v,"link",i),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(g,v))}}function jy(i,o,s,c){var g=(g=ue.current)?lu(g):null;if(!g)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(o=ea(s.href),s=Co(g).hoistableStyles,c=s.get(o),c||(c={type:"style",instance:null,count:0,state:null},s.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){i=ea(s.href);var v=Co(g).hoistableStyles,C=v.get(i);if(C||(g=g.ownerDocument||g,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(i,C),(v=g.querySelector(ps(i)))&&!v._p&&(C.instance=v,C.state.loading=5),Sn.has(i)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Sn.set(i,s),v||DL(g,i,s,C.state))),o&&c===null)throw Error(r(528,""));return C}if(o&&c!==null)throw Error(r(529,""));return null;case"script":return o=s.async,s=s.src,typeof s=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=ta(s),s=Co(g).hoistableScripts,c=s.get(o),c||(c={type:"script",instance:null,count:0,state:null},s.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ea(i){return'href="'+fn(i)+'"'}function ps(i){return'link[rel="stylesheet"]['+i+"]"}function Fy(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function DL(i,o,s,c){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=i.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),Lt(o,"link",s),vt(o),i.head.appendChild(o))}function ta(i){return'[src="'+fn(i)+'"]'}function ms(i){return"script[async]"+i}function Gy(i,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var c=i.querySelector('style[data-href~="'+fn(s.href)+'"]');if(c)return o.instance=c,vt(c),c;var g=m({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),vt(c),Lt(c,"style",g),uu(c,s.precedence,i),o.instance=c;case"stylesheet":g=ea(s.href);var v=i.querySelector(ps(g));if(v)return o.state.loading|=4,o.instance=v,vt(v),v;c=Fy(s),(g=Sn.get(g))&&ch(c,g),v=(i.ownerDocument||i).createElement("link"),vt(v);var C=v;return C._p=new Promise(function(T,z){C.onload=T,C.onerror=z}),Lt(v,"link",c),o.state.loading|=4,uu(v,s.precedence,i),o.instance=v;case"script":return v=ta(s.src),(g=i.querySelector(ms(v)))?(o.instance=g,vt(g),g):(c=s,(g=Sn.get(v))&&(c=m({},s),dh(c,g)),i=i.ownerDocument||i,g=i.createElement("script"),vt(g),Lt(g,"link",c),i.head.appendChild(g),o.instance=g);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,uu(c,s.precedence,i));return o.instance}function uu(i,o,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=c.length?c[c.length-1]:null,v=g,C=0;C<c.length;C++){var T=c[C];if(T.dataset.precedence===o)v=T;else if(v!==g)break}v?v.parentNode.insertBefore(i,v.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(i,o.firstChild))}function ch(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function dh(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var cu=null;function $y(i,o,s){if(cu===null){var c=new Map,g=cu=new Map;g.set(s,c)}else g=cu,c=g.get(s),c||(c=new Map,g.set(s,c));if(c.has(i))return c;for(c.set(i,null),s=s.getElementsByTagName(i),g=0;g<s.length;g++){var v=s[g];if(!(v[Oa]||v[xt]||i==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var C=v.getAttribute(o)||"";C=i+C;var T=c.get(C);T?T.push(v):c.set(C,[v])}}return c}function qy(i,o,s){i=i.ownerDocument||i,i.head.insertBefore(s,o==="title"?i.querySelector("head > title"):null)}function ML(i,o,s){if(s===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Wy(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function NL(i,o,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var g=ea(c.href),v=o.querySelector(ps(g));if(v){o=v._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=du.bind(i),o.then(i,i)),s.state.loading|=4,s.instance=v,vt(v);return}v=o.ownerDocument||o,c=Fy(c),(g=Sn.get(g))&&ch(c,g),v=v.createElement("link"),vt(v);var C=v;C._p=new Promise(function(T,z){C.onload=T,C.onerror=z}),Lt(v,"link",c),s.instance=v}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&3)===0&&(i.count++,s=du.bind(i),o.addEventListener("load",s),o.addEventListener("error",s))}}var fh=0;function IL(i,o){return i.stylesheets&&i.count===0&&hu(i,i.stylesheets),0<i.count||0<i.imgCount?function(s){var c=setTimeout(function(){if(i.stylesheets&&hu(i,i.stylesheets),i.unsuspend){var v=i.unsuspend;i.unsuspend=null,v()}},6e4+o);0<i.imgBytes&&fh===0&&(fh=62500*mL());var g=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&hu(i,i.stylesheets),i.unsuspend)){var v=i.unsuspend;i.unsuspend=null,v()}},(i.imgBytes>fh?50:800)+o);return i.unsuspend=s,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(g)}}:null}function du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var fu=null;function hu(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,fu=new Map,o.forEach(zL,i),fu=null,du.call(i))}function zL(i,o){if(!(o.state.loading&4)){var s=fu.get(i);if(s)var c=s.get(null);else{s=new Map,fu.set(i,s);for(var g=i.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<g.length;v++){var C=g[v];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(s.set(C.dataset.precedence,C),c=C)}c&&s.set(null,c)}g=o.instance,C=g.getAttribute("data-precedence"),v=s.get(C)||c,v===c&&s.set(null,g),s.set(C,g),this.count++,c=du.bind(this),g.addEventListener("load",c),g.addEventListener("error",c),v?v.parentNode.insertBefore(g,v.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(g,i.firstChild)),o.state.loading|=4}}var gs={$$typeof:L,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function HL(i,o,s,c,g,v,C,T,z){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ad(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ad(0),this.hiddenUpdates=ad(null),this.identifierPrefix=c,this.onUncaughtError=g,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Yy(i,o,s,c,g,v,C,T,z,G,Q,ne){return i=new HL(i,o,s,C,z,G,Q,ne,T),o=1,v===!0&&(o|=24),v=en(3,null,null,o),i.current=v,v.stateNode=i,o=Gd(),o.refCount++,i.pooledCache=o,o.refCount++,v.memoizedState={element:c,isDehydrated:s,cache:o},Yd(v),i}function Xy(i){return i?(i=Do,i):Do}function Ky(i,o,s,c,g,v){g=Xy(g),c.context===null?c.context=g:c.pendingContext=g,c=qi(o),c.payload={element:s},v=v===void 0?null:v,v!==null&&(c.callback=v),s=Wi(i,c,o),s!==null&&(Ft(s,i,o),Ya(s,i,o))}function Qy(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var s=i.retryLane;i.retryLane=s!==0&&s<o?s:o}}function hh(i,o){Qy(i,o),(i=i.alternate)&&Qy(i,o)}function Zy(i){if(i.tag===13||i.tag===31){var o=Rr(i,67108864);o!==null&&Ft(o,i,67108864),hh(i,67108864)}}function Jy(i){if(i.tag===13||i.tag===31){var o=an();o=sd(o);var s=Rr(i,o);s!==null&&Ft(s,i,o),hh(i,o)}}var pu=!0;function PL(i,o,s,c){var g=I.T;I.T=null;var v=$.p;try{$.p=2,ph(i,o,s,c)}finally{$.p=v,I.T=g}}function UL(i,o,s,c){var g=I.T;I.T=null;var v=$.p;try{$.p=8,ph(i,o,s,c)}finally{$.p=v,I.T=g}}function ph(i,o,s,c){if(pu){var g=mh(c);if(g===null)eh(i,o,c,mu,s),tb(i,c);else if(BL(g,i,o,s,c))c.stopPropagation();else if(tb(i,c),o&4&&-1<VL.indexOf(i)){for(;g!==null;){var v=_o(g);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var C=wr(v.pendingLanes);if(C!==0){var T=v;for(T.pendingLanes|=2,T.entangledLanes|=2;C;){var z=1<<31-Zt(C);T.entanglements[1]|=z,C&=~z}Un(v),(Ie&6)===0&&(Ql=Kt()+500,cs(0))}}break;case 31:case 13:T=Rr(v,2),T!==null&&Ft(T,v,2),Jl(),hh(v,2)}if(v=mh(c),v===null&&eh(i,o,c,mu,s),v===g)break;g=v}g!==null&&c.stopPropagation()}else eh(i,o,c,null,s)}}function mh(i){return i=gd(i),gh(i)}var mu=null;function gh(i){if(mu=null,i=So(i),i!==null){var o=l(i);if(o===null)i=null;else{var s=o.tag;if(s===13){if(i=u(o),i!==null)return i;i=null}else if(s===31){if(i=d(o),i!==null)return i;i=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return mu=i,null}function eb(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(w1()){case lg:return 2;case ug:return 8;case rl:case k1:return 32;case cg:return 268435456;default:return 32}default:return 32}}var vh=!1,rr=null,or=null,ar=null,vs=new Map,ys=new Map,sr=[],VL="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 tb(i,o){switch(i){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":vs.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ys.delete(o.pointerId)}}function bs(i,o,s,c,g,v){return i===null||i.nativeEvent!==v?(i={blockedOn:o,domEventName:s,eventSystemFlags:c,nativeEvent:v,targetContainers:[g]},o!==null&&(o=_o(o),o!==null&&Zy(o)),i):(i.eventSystemFlags|=c,o=i.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),i)}function BL(i,o,s,c,g){switch(o){case"focusin":return rr=bs(rr,i,o,s,c,g),!0;case"dragenter":return or=bs(or,i,o,s,c,g),!0;case"mouseover":return ar=bs(ar,i,o,s,c,g),!0;case"pointerover":var v=g.pointerId;return vs.set(v,bs(vs.get(v)||null,i,o,s,c,g)),!0;case"gotpointercapture":return v=g.pointerId,ys.set(v,bs(ys.get(v)||null,i,o,s,c,g)),!0}return!1}function nb(i){var o=So(i.target);if(o!==null){var s=l(o);if(s!==null){if(o=s.tag,o===13){if(o=u(s),o!==null){i.blockedOn=o,gg(i.priority,function(){Jy(s)});return}}else if(o===31){if(o=d(s),o!==null){i.blockedOn=o,gg(i.priority,function(){Jy(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){i.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}i.blockedOn=null}function gu(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var s=mh(i.nativeEvent);if(s===null){s=i.nativeEvent;var c=new s.constructor(s.type,s);md=c,s.target.dispatchEvent(c),md=null}else return o=_o(s),o!==null&&Zy(o),i.blockedOn=s,!1;o.shift()}return!0}function ib(i,o,s){gu(i)&&s.delete(o)}function jL(){vh=!1,rr!==null&&gu(rr)&&(rr=null),or!==null&&gu(or)&&(or=null),ar!==null&&gu(ar)&&(ar=null),vs.forEach(ib),ys.forEach(ib)}function vu(i,o){i.blockedOn===o&&(i.blockedOn=null,vh||(vh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,jL)))}var yu=null;function rb(i){yu!==i&&(yu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){yu===i&&(yu=null);for(var o=0;o<i.length;o+=3){var s=i[o],c=i[o+1],g=i[o+2];if(typeof c!="function"){if(gh(c||s)===null)continue;break}var v=_o(s);v!==null&&(i.splice(o,3),o-=3,mf(v,{pending:!0,data:g,method:s.method,action:c},c,g))}}))}function na(i){function o(z){return vu(z,i)}rr!==null&&vu(rr,i),or!==null&&vu(or,i),ar!==null&&vu(ar,i),vs.forEach(o),ys.forEach(o);for(var s=0;s<sr.length;s++){var c=sr[s];c.blockedOn===i&&(c.blockedOn=null)}for(;0<sr.length&&(s=sr[0],s.blockedOn===null);)nb(s),s.blockedOn===null&&sr.shift();if(s=(i.ownerDocument||i).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var g=s[c],v=s[c+1],C=g[Ht]||null;if(typeof v=="function")C||rb(s);else if(C){var T=null;if(v&&v.hasAttribute("formAction")){if(g=v,C=v[Ht]||null)T=C.formAction;else if(gh(g)!==null)continue}else T=C.action;typeof T=="function"?s[c+1]=T:(s.splice(c,3),c-=3),rb(s)}}}function ob(){function i(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(C){return g=C})},focusReset:"manual",scroll:"manual"})}function o(){g!==null&&(g(),g=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,g=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),g!==null&&(g(),g=null)}}}function yh(i){this._internalRoot=i}bu.prototype.render=yh.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var s=o.current,c=an();Ky(s,c,i,o,null,null)},bu.prototype.unmount=yh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ky(i.current,2,null,i,null,null),Jl(),o[bo]=null}};function bu(i){this._internalRoot=i}bu.prototype.unstable_scheduleHydration=function(i){if(i){var o=mg();i={blockedOn:null,target:i,priority:o};for(var s=0;s<sr.length&&o!==0&&o<sr[s].priority;s++);sr.splice(s,0,i),s===0&&nb(i)}};var ab=t.version;if(ab!=="19.2.8")throw Error(r(527,ab,"19.2.8"));$.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=h(o),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var FL={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{Ta=Su.inject(FL),Qt=Su}catch{}}return _s.createRoot=function(i,o){if(!a(i))throw Error(r(299));var s=!1,c="",g=h0,v=p0,C=m0;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(v=o.onCaughtError),o.onRecoverableError!==void 0&&(C=o.onRecoverableError)),o=Yy(i,1,!1,null,null,s,c,null,g,v,C,ob),i[bo]=o.current,Jf(i),new yh(o)},_s.hydrateRoot=function(i,o,s){if(!a(i))throw Error(r(299));var c=!1,g="",v=h0,C=p0,T=m0,z=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(C=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError),s.formState!==void 0&&(z=s.formState)),o=Yy(i,1,!0,o,s??null,c,g,z,v,C,T,ob),o.context=Xy(null),s=o.current,c=an(),c=sd(c),g=qi(c),g.callback=null,Wi(s,g,c),s=c,o.current.lanes=s,Ra(o,s),Un(o),i[bo]=o.current,Jf(i),new bu(o)},_s.version="19.2.8",_s}var gb;function eT(){if(gb)return _h.exports;gb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_h.exports=JL(),_h.exports}var tT=eT();function nT(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function iT(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),r=parseFloat(n.fontSize);return t*r}function rT(e){return e/100*window.innerHeight}function oT(e){return e/100*window.innerWidth}function aT(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function ks({groupSize:e,panelElement:t,styleProp:n}){let r;const[a,l]=aT(n);switch(l){case"%":{r=a/100*e;break}case"px":{r=a;break}case"rem":{r=iT(t,a);break}case"em":{r=nT(t,a);break}case"vh":{r=rT(a);break}case"vw":{r=oT(a);break}}return r}function Mt(e){return parseFloat(e.toFixed(3))}function Sa({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,a)=>(r+=t==="horizontal"?a.element.offsetWidth:a.element.offsetHeight,r),0)}function hp(e){const{panels:t}=e,n=Sa({group:e});return n===0?t.map(r=>({groupResizeBehavior:r.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:a,panelConstraints:l}=r;let u=0;if(l.collapsedSize!==void 0){const p=ks({groupSize:n,panelElement:a,styleProp:l.collapsedSize});u=Mt(p/n*100)}let d;if(l.defaultSize!==void 0){const p=ks({groupSize:n,panelElement:a,styleProp:l.defaultSize});d=Mt(p/n*100)}let f=0;if(l.minSize!==void 0){const p=ks({groupSize:n,panelElement:a,styleProp:l.minSize});f=Mt(p/n*100)}let h=100;if(l.maxSize!==void 0){const p=ks({groupSize:n,panelElement:a,styleProp:l.maxSize});h=Mt(p/n*100)}return{groupResizeBehavior:l.groupResizeBehavior,collapsedSize:u,collapsible:l.collapsible===!0,defaultSize:d,disabled:l.disabled,minSize:f,maxSize:h,panelId:r.id}})}function je(e,t="Assertion error"){if(!e)throw Error(t)}function pp(e,t){return Array.from(t).sort(e==="horizontal"?sT:lT)}function sT(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function lT(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function J_(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function eC(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function uT({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let a,l=Number.MAX_VALUE;for(const u of t){const{x:d,y:f}=eC(r,u),h=e==="horizontal"?d:f;h<l&&(l=h,a=u)}return je(a,"No rect found"),a}let _u;function cT(){return _u===void 0&&(typeof matchMedia=="function"?_u=!!matchMedia("(pointer:coarse)").matches:_u=!1),_u}function tC(e){const{element:t,orientation:n,panels:r,separators:a}=e,l=pp(n,Array.from(t.children).filter(J_).map(S=>({element:S}))).map(({element:S})=>S),u=[];let d=!1,f=!1,h=-1,p=-1,m=0,y,b=[];{let S=-1;for(const _ of l)_.hasAttribute("data-panel")&&(S++,_.hasAttribute("data-disabled")||(m++,h===-1&&(h=S),p=S))}if(m>1){let S=-1;for(const _ of l)if(_.hasAttribute("data-panel")){S++;const w=r.find(x=>x.element===_);if(w){if(y){const x=y.element.getBoundingClientRect(),E=_.getBoundingClientRect();let L;if(f){const A=n==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),R=n==="horizontal"?new DOMRect(E.left,E.top,0,E.height):new DOMRect(E.left,E.top,E.width,0);switch(b.length){case 0:{L=[A,R];break}case 1:{const N=b[0],H=uT({orientation:n,rects:[x,E],targetRect:N.element.getBoundingClientRect()});L=[N,H===x?R:A];break}default:{L=b;break}}}else b.length?L=b:L=[n==="horizontal"?new DOMRect(x.right,E.top,E.left-x.right,E.height):new DOMRect(E.left,x.bottom,E.width,E.top-x.bottom)];for(const A of L){let R="width"in A?A:A.element.getBoundingClientRect();const N=cT()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(R.width<N){const U=N-R.width;R=new DOMRect(R.x-U/2,R.y,R.width+U,R.height)}if(R.height<N){const U=N-R.height;R=new DOMRect(R.x,R.y-U/2,R.width,R.height+U)}const H=S<=h||S>p;!d&&!H&&u.push({group:e,groupSize:Sa({group:e}),panels:[y,w],separator:"width"in A?void 0:A,rect:R}),d=!1}}f=!1,y=w,b=[]}}else if(_.hasAttribute("data-separator")){_.ariaDisabled!==null&&(d=!0);const w=a.find(x=>x.element===_);w?b.push(w):(y=void 0,b=[])}else f=!0}return u}class nC{#e={};addListener(t,n){const r=this.#e[t];return r===void 0?this.#e[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=this.#e[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let a=!1,l=null;const u=Array.from(r);for(let d=0;d<u.length;d++){const f=u[d];try{f.call(null,n)}catch(h){l===null&&(a=!0,l=h)}}if(a)throw l}}removeAllListeners(){this.#e={}}removeListener(t,n){const r=this.#e[t];if(r!==void 0){const a=r.indexOf(n);a>=0&&r.splice(a,1)}}}let ha={cursorFlags:0,state:"inactive"};const vm=new nC;function io(){return ha}function dT(e){return vm.addListener("change",e)}function fT(e){const t=ha,n={...ha};n.cursorFlags=e,ha=n,vm.emit("change",{prev:t,next:n})}function pa(e){const t=ha;ha=e,vm.emit("change",{prev:t,next:e})}const hT=e=>e,wh=()=>{},iC=1,rC=2,oC=4,aC=8,vb=3,yb=12;let Cu;function bb(){return Cu===void 0&&(Cu=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Cu=!0)),Cu}function pT({cursorFlags:e,groups:t,state:n}){let r=0,a=0;switch(n){case"active":case"hover":t.forEach(l=>{if(!l.mutableState.disableCursor)switch(l.orientation){case"horizontal":{r++;break}case"vertical":{a++;break}}})}if(!(r===0&&a===0)){switch(n){case"active":{if(e&&bb()){const l=(e&iC)!==0,u=(e&rC)!==0,d=(e&oC)!==0,f=(e&aC)!==0;if(l)return d?"se-resize":f?"ne-resize":"e-resize";if(u)return d?"sw-resize":f?"nw-resize":"w-resize";if(d)return"s-resize";if(f)return"n-resize"}break}}return bb()?r>0&&a>0?"move":r>0?"ew-resize":"ns-resize":r>0&&a>0?"grab":r>0?"col-resize":"row-resize"}}const Sb=new WeakMap;function ym(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Sb.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const r=io();switch(r.state){case"active":case"hover":{const a=pT({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(u=>u.group),state:r.state}),l=`*, *:hover {cursor: ${a} !important; }`;if(t===l)return;t=l,a?n.cssRules.length===0?n.insertRule(l):n.replaceSync(l):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}Sb.set(e,{prevStyle:t,styleSheet:n})}let Xn=new Map;const sC=new nC;function mT(e){Xn=new Map(Xn),Xn.delete(e)}function _b(e,t){for(const[n]of Xn)if(n.id===e)return n}function yr(e,t){for(const[n,r]of Xn)if(n.id===e)return r;if(t)throw Error(`Could not find data for Group with id ${e}`)}function ho(){return Xn}function bm(e,t){return sC.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function Ri(e,t,n){const r=Xn.get(e);Xn=new Map(Xn),Xn.set(e,t),sC.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function lC(e){const t=io();let n=!1;return t.state==="active"&&(pa({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(ym(e),n=!0,t.hitRegions.forEach(r=>{const a=yr(r.group.id,!0);Ri(r.group,a,{isUserInteraction:!0})}))),n}function Cb(e){e.defaultPrevented||lC(e.currentTarget)}function gT(e,t,n){let r,a={x:1/0,y:1/0};for(const l of t){const u=eC(n,l.rect);switch(e){case"horizontal":{u.x<=a.x&&(r=l,a=u);break}case"vertical":{u.y<=a.y&&(r=l,a=u);break}}}return r?{distance:a,hitRegion:r}:void 0}function vT(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function yT(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:wb(e),b:wb(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();je(r,"Stacking order can only be calculated for elements with a common ancestor");const a={a:Eb(xb(n.a)),b:Eb(xb(n.b))};if(a.a===a.b){const l=r.childNodes,u={a:n.a.at(-1),b:n.b.at(-1)};let d=l.length;for(;d--;){const f=l[d];if(f===u.a)return 1;if(f===u.b)return-1}}return Math.sign(a.a-a.b)}const bT=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ST(e){const t=getComputedStyle(uC(e)??e).display;return t==="flex"||t==="inline-flex"}function _T(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||ST(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||bT.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function xb(e){let t=e.length;for(;t--;){const n=e[t];if(je(n,"Missing node"),_T(n))return n}return null}function Eb(e){return e&&Number(getComputedStyle(e).zIndex)||0}function wb(e){const t=[];for(;e;)t.push(e),e=uC(e);return t}function uC(e){const{parentNode:t}=e;return vT(t)?t.host:t}function CT(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function xT({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!J_(n)||n.contains(e)||e.contains(n))return!0;if(yT(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(CT(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Sm(e,t){const n=[];return t.forEach((r,a)=>{if(a.disabled)return;const l=tC(a),u=gT(a.orientation,l,{x:e.clientX,y:e.clientY});u&&u.distance.x<=0&&u.distance.y<=0&&xT({groupElement:a.element,hitRegion:u.hitRegion.rect,pointerEventTarget:e.target})&&n.push(u.hitRegion)}),n}function ET(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Rt(e,t,n=0){return Math.abs(Mt(e)-Mt(t))<=n}function Gn(e,t){return Rt(e,t)?0:e>t?1:-1}function ca({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:a=0,collapsible:l,disabled:u,maxSize:d=100,minSize:f=0}=t;if(u&&!e)return n;if(Gn(r,f)<0)if(l){const h=(a+f)/2;Gn(r,h)<0?r=a:r=f}else r=f;return r=Math.min(d,r),r=Mt(r),r}function zs({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:a,trigger:l}){if(Rt(e,0))return t;const u=l==="imperative-api",d=Object.values(t),f=Object.values(a),h=[...d],[p,m]=r;je(p!=null,"Invalid first pivot index"),je(m!=null,"Invalid second pivot index");let y=0;switch(l){case"keyboard":{{const _=e<0?m:p,w=n[_];je(w,`Panel constraints not found for index ${_}`);const{collapsedSize:x=0,collapsible:E,minSize:L=0}=w;if(E){const A=d[_];if(je(A!=null,`Previous layout not found for panel index ${_}`),Rt(A,x)){const R=L-A;Gn(R,Math.abs(e))>0&&(e=e<0?0-R:R)}}}{const _=e<0?p:m,w=n[_];je(w,`No panel constraints found for index ${_}`);const{collapsedSize:x=0,collapsible:E,minSize:L=0}=w;if(E){const A=d[_];if(je(A!=null,`Previous layout not found for panel index ${_}`),Rt(A,L)){const R=A-x;Gn(R,Math.abs(e))>0&&(e=e<0?0-R:R)}}}break}default:{const _=e<0?m:p,w=n[_];je(w,`Panel constraints not found for index ${_}`);const x=d[_],{collapsible:E,collapsedSize:L,minSize:A}=w;if(E&&Gn(x,A)<0)if(e>0){const R=A-L,N=R/2,H=x+e;Gn(H,A)<0&&(e=Gn(e,N)<=0?0:R)}else{const R=A-L,N=100-R/2,H=x-e;Gn(H,A)<0&&(e=Gn(100+e,N)>0?0:-R)}break}}{const _=e<0?1:-1;let w=e<0?m:p,x=0;for(;;){const L=d[w];je(L!=null,`Previous layout not found for panel index ${w}`);const A=ca({overrideDisabledPanels:u,panelConstraints:n[w],prevSize:L,size:100})-L;if(x+=A,w+=_,w<0||w>=n.length)break}const E=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-E:E}{let _=e<0?p:m;for(;_>=0&&_<n.length;){const w=Math.abs(e)-Math.abs(y),x=d[_];je(x!=null,`Previous layout not found for panel index ${_}`);const E=x-w,L=ca({overrideDisabledPanels:u,panelConstraints:n[_],prevSize:x,size:E});if(!Rt(x,L)&&(y+=x-L,h[_]=L,y.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?_--:_++}}if(ET(f,h))return a;{const _=e<0?m:p,w=d[_];je(w!=null,`Previous layout not found for panel index ${_}`);const x=w+y,E=ca({overrideDisabledPanels:u,panelConstraints:n[_],prevSize:w,size:x});if(h[_]=E,!Rt(E,x)){let L=x-E,A=e<0?m:p;for(;A>=0&&A<n.length;){const R=h[A];je(R!=null,`Previous layout not found for panel index ${A}`);const N=R+L,H=ca({overrideDisabledPanels:u,panelConstraints:n[A],prevSize:R,size:N});if(Rt(R,H)||(L-=H-R,h[A]=H),Rt(L,0))break;e>0?A--:A++}}}const b=Object.values(h).reduce((_,w)=>w+_,0);if(!Rt(b,100,.1))return a;const S=Object.keys(a);return h.reduce((_,w,x)=>(_[S[x]]=w,_),{})}function ro(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Gn(e[n],t[n])!==0)return!1;return!0}function oo({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],a=r.reduce((d,f)=>d+f,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(d=>`${d}%`).join(", ")}`);if(!Rt(a,100)&&r.length>0)for(let d=0;d<t.length;d++){const f=r[d];je(f!=null,`No layout data found for index ${d}`);const h=100/a*f;r[d]=h}let l=0;for(let d=0;d<t.length;d++){const f=n[d];je(f!=null,`No layout data found for index ${d}`);const h=r[d];je(h!=null,`No layout data found for index ${d}`);const p=ca({overrideDisabledPanels:!0,panelConstraints:t[d],prevSize:f,size:h});h!=p&&(l+=h-p,r[d]=p)}if(!Rt(l,0))for(let d=0;d<t.length;d++){const f=r[d];je(f!=null,`No layout data found for index ${d}`);const h=f+l,p=ca({overrideDisabledPanels:!0,panelConstraints:t[d],prevSize:f,size:h});if(f!==p&&(l-=p-f,r[d]=p,Rt(l,0)))break}const u=Object.keys(e);return r.reduce((d,f,h)=>(d[u[h]]=f,d),{})}function cC({groupId:e,panelId:t}){const n=()=>{const f=ho();for(const[h,{defaultLayoutDeferred:p,derivedPanelConstraints:m,layout:y,groupSize:b,separatorToPanels:S}]of f)if(h.id===e)return{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:h,groupSize:b,layout:y,separatorToPanels:S};throw Error(`Group ${e} not found`)},r=()=>{const f=n().derivedPanelConstraints.find(h=>h.panelId===t);if(f!==void 0)return f;throw Error(`Panel constraints not found for Panel ${t}`)},a=()=>{const f=n().group.panels.find(h=>h.id===t);if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},l=()=>{const f=n().layout[t];if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},u=({nextSize:f,panels:h,prevLayout:p,derivedPanelConstraints:m})=>{const y=l(),b=h.findIndex(w=>w.id===t),S=b===0,_=b===h.length-1;if(_&&f<y&&(S||h.slice(0,b).every((w,x)=>{const E=m[x];return E?.collapsible&&Rt(E.collapsedSize,p[E.panelId])}))){const w=h.slice(0,b).reduce((x,E)=>x+p[E.id],0);return{...p,[t]:Mt(100-w)}}return zs({delta:_?y-f:f-y,initialLayout:p,panelConstraints:m,pivotIndices:_?[b-1,b]:[b,b+1],prevLayout:p,trigger:"imperative-api"})},d=f=>{const h=l();if(f===h)return;const{defaultLayoutDeferred:p,derivedPanelConstraints:m,group:y,groupSize:b,layout:S,separatorToPanels:_}=n(),w=u({nextSize:f,panels:y.panels,prevLayout:S,derivedPanelConstraints:m}),x=oo({layout:w,panelConstraints:m});ro(S,x)||Ri(y,{defaultLayoutDeferred:p,derivedPanelConstraints:m,groupSize:b,layout:x,separatorToPanels:_})};return{collapse:()=>{const{collapsible:f,collapsedSize:h}=r(),{mutableValues:p}=a(),m=l();f&&m!==h&&(p.expandToSize=m,d(h))},expand:()=>{const{collapsible:f,collapsedSize:h,minSize:p}=r(),{mutableValues:m}=a(),y=l();if(f&&y===h){let b=m.expandToSize??p;b===0&&(b=1),d(b)}},getSize:()=>{const{group:f}=n(),h=l(),{element:p}=a(),m=f.orientation==="horizontal"?p.offsetWidth:p.offsetHeight;return{asPercentage:h,inPixels:m}},isCollapsed:()=>{const{collapsible:f,collapsedSize:h}=r(),p=l();return f&&Rt(h,p)},resize:f=>{const{group:h}=n(),{element:p}=a(),m=Sa({group:h}),y=ks({groupSize:m,panelElement:p,styleProp:f}),b=Mt(y/m*100);d(b)}}}function kb(e){if(e.defaultPrevented)return;const t=ho();Sm(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const r=n.panels.find(a=>a.panelConstraints.defaultSize!==void 0);if(r){const a=r.panelConstraints.defaultSize,l=cC({groupId:n.group.id,panelId:r.id});l&&a!==void 0&&(l.resize(a),e.preventDefault())}}})}function Qu(e){const t=ho();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function dC({groupId:e}){const t=()=>{const n=ho();for(const[r,a]of n)if(r.id===e)return{group:r,...a};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:a,group:l,groupSize:u,layout:d,separatorToPanels:f}=t(),h=oo({layout:n,panelConstraints:a});return r?d:(ro(d,h)||Ri(l,{defaultLayoutDeferred:r,derivedPanelConstraints:a,groupSize:u,layout:h,separatorToPanels:f}),h)}}}function Fr(e,t){const n=Qu(e),r=yr(n.id,!0),a=n.separators.find(p=>p.element===e);je(a,"Matching separator not found");const l=r.separatorToPanels.get(a);je(l,"Matching panels not found");const u=l.map(p=>n.panels.indexOf(p)),d=dC({groupId:n.id}).getLayout(),f=zs({delta:t,initialLayout:d,panelConstraints:r.derivedPanelConstraints,pivotIndices:u,prevLayout:d,trigger:"keyboard"}),h=oo({layout:f,panelConstraints:r.derivedPanelConstraints});ro(d,h)||Ri(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:h,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function Lb(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Qu(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Fr(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Fr(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Fr(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Fr(t,-5);break}case"End":{e.preventDefault(),Fr(t,100);break}case"Enter":{e.preventDefault();const r=Qu(t),a=yr(r.id,!0),{derivedPanelConstraints:l,layout:u,separatorToPanels:d}=a,f=r.separators.find(y=>y.element===t);je(f,"Matching separator not found");const h=d.get(f);je(h,"Matching panels not found");const p=h[0],m=l.find(y=>y.panelId===p.id);if(je(m,"Panel metadata not found"),m.collapsible){const y=u[p.id],b=m.collapsedSize===y?r.mutableState.expandedPanelSizes[p.id]??m.minSize:m.collapsedSize;Fr(t,b-y)}break}case"F6":{e.preventDefault();const r=Qu(t).separators.map(u=>u.element),a=Array.from(r).findIndex(u=>u===e.currentTarget);je(a!==null,"Index not found");const l=e.shiftKey?a>0?a-1:r.length-1:a+1<r.length?a+1:0;r[l].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),Fr(t,-100);break}}}function Tb(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=ho(),n=Sm(e,t),r=new Map;let a=!1;n.forEach(l=>{l.separator&&(a||(a=!0,l.separator.element.focus({focusVisible:!1,preventScroll:!0})));const u=t.get(l.group);u&&r.set(l.group,u.layout)}),pa({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function fC({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:a,pointerDownAtPoint:l,prevCursorFlags:u}){let d=0;n.forEach(h=>{const{group:p,groupSize:m}=h,{orientation:y,panels:b}=p,{disableCursor:S}=p.mutableState;let _=0;l?y==="horizontal"?_=(t.clientX-l.x)/m*100:_=(t.clientY-l.y)/m*100:y==="horizontal"?_=t.clientX<0?-100:100:_=t.clientY<0?-100:100;const w=r.get(p),x=a.get(p);if(!w||!x)return;const{defaultLayoutDeferred:E,derivedPanelConstraints:L,groupSize:A,layout:R,separatorToPanels:N}=x;if(L&&R&&N){const H=zs({delta:_,initialLayout:w,panelConstraints:L,pivotIndices:h.panels.map(U=>b.indexOf(U)),prevLayout:R,trigger:"mouse-or-touch"});if(ro(H,R)){if(_!==0&&!S)switch(y){case"horizontal":{d|=_<0?iC:rC;break}case"vertical":{d|=_<0?oC:aC;break}}}else Ri(h.group,{defaultLayoutDeferred:E,derivedPanelConstraints:L,groupSize:A,layout:H,separatorToPanels:N})}});let f=0;t.movementX===0?f|=u&vb:f|=d&vb,t.movementY===0?f|=u&yb:f|=d&yb,fT(f),ym(e)}function Ab(e){const t=ho(),n=io();n.state==="active"&&fC({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function Rb(e){if(e.defaultPrevented)return;const t=io(),n=ho();switch(t.state){case"active":{if(e.buttons===0){pa({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(r=>{const a=yr(r.group.id,!0);Ri(r.group,a,{isUserInteraction:!0})});return}for(const r of t.hitRegions)if(r.separator){const{element:a}=r.separator;a.hasPointerCapture?.(e.pointerId)||a.setPointerCapture?.(e.pointerId)}fC({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const r=Sm(e,n);r.length===0?t.state!=="inactive"&&pa({cursorFlags:0,state:"inactive"}):pa({cursorFlags:0,hitRegions:r,state:"hover"}),ym(e.currentTarget);break}}}function Ob(e){e.relatedTarget instanceof HTMLIFrameElement&&io().state==="hover"&&pa({cursorFlags:0,state:"inactive"})}function Db(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||lC(e.currentTarget)&&e.preventDefault()}function Mb(e){let t=0,n=0;const r={};for(const l of e)if(l.defaultSize!==void 0){t++;const u=Mt(l.defaultSize);n+=u,r[l.panelId]=u}else r[l.panelId]=void 0;const a=e.length-t;if(a!==0){const l=Mt((100-n)/a);for(const u of e)u.defaultSize===void 0&&(r[u.panelId]=l)}return r}function wT(e,t,n){if(!n[0])return;const r=e.panels.find(f=>f.element===t);if(!r||!r.onResize)return;const a=Sa({group:e}),l=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,u=r.mutableValues.prevSize,d={asPercentage:Mt(l/a*100),inPixels:l};r.mutableValues.prevSize=d,r.onResize(d,r.id,u)}function kT(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function LT({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let a=0,l=0,u=!1;const d=new Map,f=[];for(const m of e.panels){const y=r[m.id]??0;if(m.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){u=!0;const b=y/100*n,S=Mt(b/t*100);d.set(m.id,S),a+=S}else f.push(m.id),l+=y}if(!u||f.length===0)return r;const h=100-a,p={...r};if(d.forEach((m,y)=>{p[y]=m}),l>0)for(const m of f){const y=r[m]??0;p[m]=Mt(y/l*h)}else{const m=Mt(h/f.length);for(const y of f)p[y]=m}return p}function TT(e,t){const n=e.map(a=>a.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(!r.includes(a))return!1;return!0}const ia=new Map;function AT(e){let t=!0;je(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,a=new Set,l=new n(S=>{for(const _ of S){const{borderBoxSize:w,target:x}=_;if(x===e.element){if(t){const E=Sa({group:e});if(E===0)return;const L=yr(e.id);if(!L)return;const A=hp(e),R=L.defaultLayoutDeferred?Mb(A):L.layout,N=LT({group:e,nextGroupSize:E,prevGroupSize:L.groupSize,prevLayout:R}),H=oo({layout:N,panelConstraints:A});if(!L.defaultLayoutDeferred&&ro(L.layout,H)&&kT(L.derivedPanelConstraints,A)&&L.groupSize===E)return;Ri(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:A,groupSize:E,layout:H,separatorToPanels:L.separatorToPanels})}}else wT(e,x,w)}});l.observe(e.element),e.panels.forEach(S=>{je(!r.has(S.id),`Panel ids must be unique; id "${S.id}" was used more than once`),r.add(S.id),S.onResize&&l.observe(S.element)});const u=Sa({group:e}),d=hp(e),f=e.panels.map(({id:S})=>S).join(",");let h=e.mutableState.defaultLayout;h&&(TT(e.panels,h)||(h=void 0));const p=e.mutableState.layouts[f]??h??Mb(d),m=oo({layout:p,panelConstraints:d}),y=e.element.ownerDocument;ia.set(y,(ia.get(y)??0)+1);const b=new Map;return tC(e).forEach(S=>{S.separator&&b.set(S.separator,S.panels)}),Ri(e,{defaultLayoutDeferred:u===0,derivedPanelConstraints:d,groupSize:u,layout:m,separatorToPanels:b}),e.separators.forEach(S=>{je(!a.has(S.id),`Separator ids must be unique; id "${S.id}" was used more than once`),a.add(S.id),S.element.addEventListener("keydown",Lb)}),ia.get(y)===1&&(y.addEventListener("contextmenu",Cb,!0),y.addEventListener("dblclick",kb,!0),y.addEventListener("pointerdown",Tb,!0),y.addEventListener("pointerleave",Ab),y.addEventListener("pointermove",Rb),y.addEventListener("pointerout",Ob),y.addEventListener("pointerup",Db,!0)),function(){t=!1,ia.set(y,Math.max(0,(ia.get(y)??0)-1)),mT(e),e.separators.forEach(S=>{S.element.removeEventListener("keydown",Lb)}),ia.get(y)||(y.removeEventListener("contextmenu",Cb,!0),y.removeEventListener("dblclick",kb,!0),y.removeEventListener("pointerdown",Tb,!0),y.removeEventListener("pointerleave",Ab),y.removeEventListener("pointermove",Rb),y.removeEventListener("pointerout",Ob),y.removeEventListener("pointerup",Db,!0)),l.disconnect()}}function RT(){const[e,t]=D.useState({}),n=D.useCallback(()=>t({}),[]);return[e,n]}function _m(e){const t=D.useId();return`${e??t}`}const po=typeof window<"u"?D.useLayoutEffect:D.useEffect;function Os(e){const t=D.useRef(e);return po(()=>{t.current=e},[e]),D.useCallback((...n)=>t.current?.(...n),[t])}function Cm(...e){return Os(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function xm(e){const t=D.useRef({...e});return po(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const hC=D.createContext(null);function OT(e,t){const n=D.useRef({getLayout:()=>({}),setLayout:hT});D.useImperativeHandle(t,()=>n.current,[]),po(()=>{Object.assign(n.current,dC({groupId:e}))})}function pC({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:a,elementRef:l,groupRef:u,id:d,onLayoutChange:f,onLayoutChanged:h,orientation:p="horizontal",resizeTargetMinimumSize:m={coarse:20,fine:10},style:y,...b}){const S=D.useRef({onLayoutChange:{},onLayoutChanged:{}}),_=Os(J=>{ro(S.current.onLayoutChange,J)||(S.current.onLayoutChange=J,f?.(J))}),w=Os((J,K)=>{ro(S.current.onLayoutChanged,J)||(S.current.onLayoutChanged=J,h?.(J,{isUserInteraction:K}))}),x=_m(d),E=D.useRef(null),[L,A]=RT(),R=D.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:m,separators:[]}),N=Cm(E,l);OT(x,u);const H=Os((J,K)=>{const ie=io(),Z=_b(J),se=yr(J);if(se){let I=!1;return ie.state==="active"&&(I=ie.hitRegions.some($=>$.group===Z)),{flexGrow:se.layout[K]??1,pointerEvents:I?"none":void 0}}if(n?.[K])return{flexGrow:n?.[K]}}),U=xm({defaultLayout:n,disableCursor:r}),Y=D.useMemo(()=>({get disableCursor(){return!!U.disableCursor},getPanelStyles:H,id:x,orientation:p,registerPanel:J=>{const K=R.current;return K.panels=pp(p,[...K.panels,J]),A(),()=>{K.panels=K.panels.filter(ie=>ie!==J),A()}},registerSeparator:J=>{const K=R.current;return K.separators=pp(p,[...K.separators,J]),A(),()=>{K.separators=K.separators.filter(ie=>ie!==J),A()}},updatePanelProps:(J,{disabled:K})=>{const ie=R.current.panels.find(I=>I.id===J);ie&&(ie.panelConstraints.disabled=K);const Z=_b(x),se=yr(x);Z&&se&&Ri(Z,{...se,derivedPanelConstraints:hp(Z)})},updateSeparatorProps:(J,{disabled:K,disableDoubleClick:ie})=>{const Z=R.current.separators.find(se=>se.id===J);Z&&(Z.disabled=K,Z.disableDoubleClick=ie)}}),[H,x,A,p,U]),te=D.useRef(null);return po(()=>{const J=E.current;if(J===null)return;const K=R.current;let ie;if(U.defaultLayout!==void 0&&Object.keys(U.defaultLayout).length===K.panels.length){ie={};for(const B of K.panels){const O=U.defaultLayout[B.id];O!==void 0&&(ie[B.id]=O)}}const Z={disabled:!!a,element:J,id:x,mutableState:{defaultLayout:ie,disableCursor:!!U.disableCursor,expandedPanelSizes:R.current.lastExpandedPanelSizes,layouts:R.current.layouts},orientation:p,panels:K.panels,resizeTargetMinimumSize:K.resizeTargetMinimumSize,separators:K.separators};te.current=Z;const se=AT(Z),{defaultLayoutDeferred:I,derivedPanelConstraints:$,layout:F}=yr(Z.id,!0);!I&&$.length>0&&(_(F),w(F,!1));const re=bm(x,B=>{const{defaultLayoutDeferred:O,derivedPanelConstraints:q,layout:oe}=B.next;if(O||q.length===0)return;const le=Z.panels.map(({id:ue})=>ue).join(",");Z.mutableState.layouts[le]=oe,q.forEach(ue=>{if(ue.collapsible){const{layout:ge}=B.prev??{};if(ge){const Oe=Rt(ue.collapsedSize,oe[ue.panelId]),me=Rt(ue.collapsedSize,ge[ue.panelId]);Oe&&!me&&(Z.mutableState.expandedPanelSizes[ue.panelId]=ge[ue.panelId])}}});const ce=io().state!=="active";_(oe),ce&&w(oe,B.isUserInteraction)});return()=>{te.current=null,se(),re()}},[a,x,w,_,p,L,U]),D.useEffect(()=>{const J=te.current;J&&(J.mutableState.defaultLayout=n,J.mutableState.disableCursor=!!r)}),M.jsx(hC.Provider,{value:Y,children:M.jsx("div",{...b,className:t,"data-group":!0,"data-testid":x,id:x,ref:N,style:{height:"100%",width:"100%",overflow:"hidden",...y,display:"flex",flexDirection:p==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:p==="horizontal"?"pan-y":"pan-x"},children:e})})}pC.displayName="Group";function Zu(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function DT({id:e,panelIds:t,storage:n}){const r=Zu(e,[]),a=n.getItem(r);if(a)try{const l=JSON.parse(a);if(t){const u=t.join(","),d=l[u];if(d&&Array.isArray(d.layout)&&t.length===d.layout.length){const f={};for(let h=0;h<t.length;h++)f[t[h]]=d.layout[h];return f}}else{const u=Object.keys(l);if(u.length===1){const d=l[u[0]];if(d&&Array.isArray(d.layout)){const f=u[0].split(",");if(f.length===d.layout.length){const h={};for(let p=0;p<f.length;p++)h[f[p]]=d.layout[p];return h}}}}}catch{}}function MT({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...a}){const l=n!==void 0,u="id"in a?a.id:a.groupId,d=Zu(u,n??[]),f=D.useSyncExternalStore(NT,()=>r.getItem(d),()=>r.getItem(d)),h=D.useMemo(()=>{if(f){const w=JSON.parse(f),x=Object.values(w);if(Array.from(x).every(E=>typeof E=="number"))return w}},[f]),p=D.useMemo(()=>{if(!h)return DT({id:u,panelIds:n,storage:r})},[h,u,n,r]),m=h??p,y=D.useRef(null),b=D.useCallback(()=>{const w=y.current;w&&(y.current=null,clearTimeout(w))},[]);D.useLayoutEffect(()=>()=>{b()},[b]);const S=D.useCallback((w,x)=>{if(!x.isUserInteraction)return;b();let E;l?E=Zu(u,Object.keys(w)):E=Zu(u,[]);try{r.setItem(E,JSON.stringify(w))}catch(L){console.error(L)}},[b,l,u,t,r]),_=D.useCallback(w=>{b(),e===0?S(w,{isUserInteraction:!1}):y.current=setTimeout(()=>{S(w,{isUserInteraction:!1})},e)},[b,e,S]);return{defaultLayout:m,onLayoutChange:_,onLayoutChanged:S}}function NT(){return function(){}}function Em(){const e=D.useContext(hC);return je(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function IT(e,t){const{id:n}=Em(),r=D.useRef({collapse:wh,expand:wh,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:wh});D.useImperativeHandle(t,()=>r.current,[]),po(()=>{Object.assign(r.current,cC({groupId:n,panelId:e}))})}function mC({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:a,disabled:l,elementRef:u,groupResizeBehavior:d="preserve-relative-size",id:f,maxSize:h="100%",minSize:p="0%",onResize:m,panelRef:y,style:b,...S}){const _=!!f,w=_m(f),x=xm({disabled:l}),E=D.useRef(null),L=Cm(E,u),{getPanelStyles:A,id:R,orientation:N,registerPanel:H,updatePanelProps:U}=Em(),Y=m!==null,te=Os((Z,se,I)=>{m?.(Z,f,I)});po(()=>{const Z=E.current;if(Z!==null){const se={element:Z,id:w,idIsStable:_,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:Y?te:void 0,panelConstraints:{groupResizeBehavior:d,collapsedSize:n,collapsible:r,defaultSize:a,disabled:x.disabled,maxSize:h,minSize:p}};return H(se)}},[d,n,r,a,Y,w,_,h,p,te,H,x]),D.useEffect(()=>{U(w,{disabled:l})},[l,w,U]),IT(w,y);const J=()=>{const Z=A(R,w);if(Z)return JSON.stringify(Z)},K=D.useSyncExternalStore(Z=>bm(R,Z),J,J);let ie;return K?ie=JSON.parse(K):a!==void 0?ie={flexGrow:void 0,flexShrink:void 0,flexBasis:a}:ie={flexGrow:1},M.jsx("div",{...S,"data-disabled":l||void 0,"data-panel":!0,"data-testid":w,id:w,ref:L,style:{...zT,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...ie},children:M.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...b,touchAction:N==="horizontal"?"pan-y":"pan-x"},children:e})})}mC.displayName="Panel";const zT={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function HT({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let a,l;const u=e[n],d=t.find(f=>f.panelId===n);if(d){const f=d.maxSize,h=d.collapsible?d.collapsedSize:d.minSize,p=[r,r+1];l=oo({layout:zs({delta:h-u,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n],a=oo({layout:zs({delta:f-u,initialLayout:e,panelConstraints:t,pivotIndices:p,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:a,valueMin:l,valueNow:u}}function gC({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:a,id:l,style:u,...d}){const f=_m(l),h=xm({disabled:n,disableDoubleClick:r}),[p,m]=D.useState({}),[y,b]=D.useState("inactive"),[S,_]=D.useState(!1),w=D.useRef(null),x=Cm(w,a),{disableCursor:E,id:L,orientation:A,registerSeparator:R,updateSeparatorProps:N}=Em(),H=A==="horizontal"?"vertical":"horizontal";po(()=>{const te=w.current;if(te!==null){const J={disabled:h.disabled,disableDoubleClick:h.disableDoubleClick,element:te,id:f},K=R(J),ie=dT(se=>{b(se.next.state!=="inactive"&&se.next.hitRegions.some(I=>I.separator===J)?se.next.state:"inactive")}),Z=bm(L,se=>{const{derivedPanelConstraints:I,layout:$,separatorToPanels:F}=se.next,re=F.get(J);if(re){const B=re[0],O=re.indexOf(B);m(HT({layout:$,panelConstraints:I,panelId:B.id,panelIndex:O}))}});return()=>{ie(),Z(),K()}}},[L,f,R,h]),D.useEffect(()=>{N(f,{disabled:n,disableDoubleClick:r})},[n,r,f,N]);let U;n&&!E&&(U="not-allowed");let Y;return n?Y="disabled":y==="active"?Y="active":S?Y="focus":Y=y,M.jsx("div",{...d,"aria-controls":p.valueControls,"aria-disabled":n||void 0,"aria-orientation":H,"aria-valuemax":p.valueMax,"aria-valuemin":p.valueMin,"aria-valuenow":p.valueNow,children:e,className:t,"data-separator":Y,"data-testid":f,id:f,onBlur:()=>_(!1),onFocus:()=>_(!0),ref:x,role:"separator",style:{flexBasis:"auto",cursor:U,...u,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}gC.displayName="Separator";async function Pc(e){const t=await fetch(e),n=await t.text();if(!t.ok){let r=n;try{const a=JSON.parse(n);a.error!==void 0&&(r=a.error)}catch{}throw new Error(r)}return JSON.parse(n)}function PT(){return Pc("/api/review")}function UT(e){return Pc(`/api/hunks?group=${encodeURIComponent(e)}`)}function VT(e,t){return Pc(`/api/file?path=${encodeURIComponent(e)}&side=${t}`)}function BT(e,t){return Pc(`/api/blame?path=${encodeURIComponent(e)}&side=${t}`)}function Nb(e){return e.slice(0,7)}function vC(e,t){return e.findIndex(n=>n.id===t)+1}function cc(e){return String(e).padStart(2,"0")}function yC(e){return e.replace("-"," ")}var jT=Object.defineProperty,wm=(e,t)=>jT(e,"name",{value:t,configurable:!0});function mp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}wm(mp,"setRef");function bC(...e){return t=>{let n=!1;const r=e.map(a=>{const l=mp(a,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let a=0;a<r.length;a++){const l=r[a];typeof l=="function"?l():mp(e[a],null)}}}}wm(bC,"composeRefs");function mo(...e){return D.useCallback(bC(...e),e)}wm(mo,"useComposedRefs");var FT=Object.defineProperty,In=(e,t)=>FT(e,"name",{value:t,configurable:!0});function km(e){const t=D.forwardRef((n,r)=>{let{children:a,...l}=n,u=null,d=!1;const f=[];gp(a)&&typeof xu=="function"&&(a=xu(a._payload)),D.Children.forEach(a,y=>{if(wC(y)){d=!0;const b=y;let S="child"in b.props?b.props.child:b.props.children;gp(S)&&typeof xu=="function"&&(S=xu(S._payload)),u=GT(b,S),f.push(u?.props?.children)}else f.push(y)}),u?u=D.cloneElement(u,void 0,f):!d&&D.Children.count(a)===1&&D.isValidElement(a)&&(u=a);const h=u?EC(u):void 0,p=mo(r,h);if(!u){if(a||a===0)throw new Error(d?WT(e):qT(e));return a}const m=xC(l,u.props??{});return u.type!==D.Fragment&&(m.ref=r?p:h),D.cloneElement(u,m)});return t.displayName=`${e}.Slot`,t}In(km,"createSlot");var SC=km("Slot"),_C=Symbol.for("radix.slottable");function CC(e){const t=In(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=_C,t}In(CC,"createSlottable");var GT=In((e,t)=>{if("child"in e.props){const n=e.props.child;return D.isValidElement(n)?D.cloneElement(n,void 0,e.props.children(n.props.children)):null}return D.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function xC(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...d)=>{const f=l(...d);return a(...d),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...l}:r==="className"&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}In(xC,"mergeProps");function EC(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}In(EC,"getElementRef");function wC(e){return D.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_C}In(wC,"isSlottable");var $T=Symbol.for("react.lazy");function gp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$T&&"_payload"in e&&kC(e._payload)}In(gp,"isLazyComponent");function kC(e){return typeof e=="object"&&e!==null&&"then"in e}In(kC,"isPromiseLike");var qT=In(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),WT=In(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),xu=Ks[" use ".trim().toString()];function LC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=LC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function TC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=LC(e))&&(r&&(r+=" "),r+=t);return r}const Ib=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zb=TC,AC=(e,t)=>n=>{var r;if(t?.variants==null)return zb(e,n?.class,n?.className);const{variants:a,defaultVariants:l}=t,u=Object.keys(a).map(h=>{const p=n?.[h],m=l?.[h];if(p===null)return null;const y=Ib(p)||Ib(m);return a[h][y]}),d=n&&Object.entries(n).reduce((h,p)=>{let[m,y]=p;return y===void 0||(h[m]=y),h},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:y,...b}=p;return Object.entries(b).every(S=>{let[_,w]=S;return Array.isArray(w)?w.includes({...l,...d}[_]):{...l,...d}[_]===w})?[...h,m,y]:h},[]);return zb(e,u,f,n?.class,n?.className)},YT=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},XT=(e,t)=>({classGroupId:e,validator:t}),RC=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),dc="-",Hb=[],KT="arbitrary..",QT=e=>{const t=JT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return ZT(u);const d=u.split(dc),f=d[0]===""&&d.length>1?1:0;return OC(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=r[u],h=n[u];return f?h?YT(h,f):f:h||Hb}return n[u]||Hb}}},OC=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],l=n.nextPart.get(a);if(l){const h=OC(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(dc):e.slice(t).join(dc),f=u.length;for(let h=0;h<f;h++){const p=u[h];if(p.validator(d))return p.classGroupId}},ZT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?KT+r:void 0})(),JT=e=>{const{theme:t,classGroups:n}=e;return eA(n,t)},eA=(e,t)=>{const n=RC();for(const r in e){const a=e[r];Lm(a,n,r,t)}return n},Lm=(e,t,n,r)=>{const a=e.length;for(let l=0;l<a;l++){const u=e[l];tA(u,t,n,r)}},tA=(e,t,n,r)=>{if(typeof e=="string"){nA(e,t,n);return}if(typeof e=="function"){iA(e,t,n,r);return}rA(e,t,n,r)},nA=(e,t,n)=>{const r=e===""?t:DC(t,e);r.classGroupId=n},iA=(e,t,n,r)=>{if(oA(e)){Lm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(XT(n,e))},rA=(e,t,n,r)=>{const a=Object.entries(e),l=a.length;for(let u=0;u<l;u++){const[d,f]=a[u];Lm(f,DC(t,d),n,r)}},DC=(e,t)=>{let n=e;const r=t.split(dc),a=r.length;for(let l=0;l<a;l++){const u=r[l];let d=n.nextPart.get(u);d||(d=RC(),n.nextPart.set(u,d)),n=d}return n},oA=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,aA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(l,u)=>{n[l]=u,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=r[l])!==void 0)return a(l,u),u},set(l,u){l in n?n[l]=u:a(l,u)}}},vp="!",Pb=":",sA=[],Ub=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),lA=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const l=[];let u=0,d=0,f=0,h;const p=a.length;for(let _=0;_<p;_++){const w=a[_];if(u===0&&d===0){if(w===Pb){l.push(a.slice(f,_)),f=_+1;continue}if(w==="/"){h=_;continue}}w==="["?u++:w==="]"?u--:w==="("?d++:w===")"&&d--}const m=l.length===0?a:a.slice(f);let y=m,b=!1;m.endsWith(vp)?(y=m.slice(0,-1),b=!0):m.startsWith(vp)&&(y=m.slice(1),b=!0);const S=h&&h>f?h-f:void 0;return Ub(l,b,y,S)};if(t){const a=t+Pb,l=r;r=u=>u.startsWith(a)?l(u.slice(a.length)):Ub(sA,!1,u,void 0,!0)}if(n){const a=r;r=l=>n({className:l,parseClassName:a})}return r},uA=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(u)):a.push(u)}return a.length>0&&(a.sort(),r.push(...a)),r}},cA=e=>({cache:aA(e.cacheSize),parseClassName:lA(e),sortModifiers:uA(e),postfixLookupClassGroupIds:dA(e),...QT(e)}),dA=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},fA=/\s+/,hA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:l,postfixLookupClassGroupIds:u}=t,d=[],f=e.trim().split(fA);let h="";for(let p=f.length-1;p>=0;p-=1){const m=f[p],{isExternal:y,modifiers:b,hasImportantModifier:S,baseClassName:_,maybePostfixModifierPosition:w}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let x=!!w,E;if(x){const H=_.substring(0,w);E=r(H);const U=E&&u[E]?r(_):void 0;U&&U!==E&&(E=U,x=!1)}else E=r(_);if(!E){if(!x){h=m+(h.length>0?" "+h:h);continue}if(E=r(_),!E){h=m+(h.length>0?" "+h:h);continue}x=!1}const L=b.length===0?"":b.length===1?b[0]:l(b).join(":"),A=S?L+vp:L,R=A+E;if(d.indexOf(R)>-1)continue;d.push(R);const N=a(E,x);for(let H=0;H<N.length;++H){const U=N[H];d.push(A+U)}h=m+(h.length>0?" "+h:h)}return h},pA=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=MC(n))&&(a&&(a+=" "),a+=r);return a},MC=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=MC(e[r]))&&(n&&(n+=" "),n+=t);return n},mA=(e,...t)=>{let n,r,a,l;const u=f=>{const h=t.reduce((p,m)=>m(p),e());return n=cA(h),r=n.cache.get,a=n.cache.set,l=d,d(f)},d=f=>{const h=r(f);if(h)return h;const p=hA(f,n);return a(f,p),p};return l=u,(...f)=>l(pA(...f))},gA=[],ct=e=>{const t=n=>n[e]||gA;return t.isThemeGetter=!0,t},NC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vA=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bA=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_A=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=e=>vA.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),Vn=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&we(e.slice(0,-1)),bi=e=>yA.test(e),zC=()=>!0,xA=e=>bA.test(e)&&!SA.test(e),Tm=()=>!1,EA=e=>_A.test(e),wA=e=>CA.test(e),kA=e=>!de(e)&&!fe(e),LA=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),TA=e=>xr(e,UC,Tm),de=e=>NC.test(e),Gr=e=>xr(e,VC,xA),Vb=e=>xr(e,zA,we),AA=e=>xr(e,jC,zC),RA=e=>xr(e,BC,Tm),Bb=e=>xr(e,HC,Tm),OA=e=>xr(e,PC,wA),Eu=e=>xr(e,FC,EA),fe=e=>IC.test(e),Cs=e=>go(e,VC),DA=e=>go(e,BC),jb=e=>go(e,HC),MA=e=>go(e,UC),NA=e=>go(e,PC),wu=e=>go(e,FC,!0),IA=e=>go(e,jC,!0),xr=(e,t,n)=>{const r=NC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},go=(e,t,n=!1)=>{const r=IC.exec(e);return r?r[1]?t(r[1]):n:!1},HC=e=>e==="position"||e==="percentage",PC=e=>e==="image"||e==="url",UC=e=>e==="length"||e==="size"||e==="bg-size",VC=e=>e==="length",zA=e=>e==="number",BC=e=>e==="family-name",jC=e=>e==="number"||e==="weight",FC=e=>e==="shadow",HA=()=>{const e=ct("color"),t=ct("font"),n=ct("text"),r=ct("font-weight"),a=ct("tracking"),l=ct("leading"),u=ct("breakpoint"),d=ct("container"),f=ct("spacing"),h=ct("radius"),p=ct("shadow"),m=ct("inset-shadow"),y=ct("text-shadow"),b=ct("drop-shadow"),S=ct("blur"),_=ct("perspective"),w=ct("aspect"),x=ct("ease"),E=ct("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...A(),fe,de],N=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],U=()=>[fe,de,f],Y=()=>[ur,"full","auto",...U()],te=()=>[Vn,"none","subgrid",fe,de],J=()=>["auto",{span:["full",Vn,fe,de]},Vn,fe,de],K=()=>[Vn,"auto",fe,de],ie=()=>["auto","min","max","fr",fe,de],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...U()],$=()=>[ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],F=()=>[ur,"screen","full","dvw","lvw","svw","min","max","fit",...U()],re=()=>[ur,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],B=()=>[e,fe,de],O=()=>[...A(),jb,Bb,{position:[fe,de]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],oe=()=>["auto","cover","contain",MA,TA,{size:[fe,de]}],le=()=>[kh,Cs,Gr],ce=()=>["","none","full",h,fe,de],ue=()=>["",we,Cs,Gr],ge=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[we,kh,jb,Bb],mt=()=>["","none",S,fe,de],Je=()=>["none",we,fe,de],Xe=()=>["none",we,fe,de],Ne=()=>[we,fe,de],ze=()=>[ur,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[zC],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[kA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",we],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ur,de,fe,w]}],container:["container"],"container-type":[{"@container":["","normal","size",fe,de]}],"container-named":[LA],columns:[{columns:[we,de,fe,d]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Vn,"auto",fe,de]}],basis:[{basis:[ur,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,ur,"auto","initial","none",de]}],grow:[{grow:["",we,fe,de]}],shrink:[{shrink:["",we,fe,de]}],order:[{order:[Vn,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[d,"screen",...$()]}],"min-w":[{"min-w":[d,"screen","none",...$()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Cs,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,IA,AA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kh,de]}],"font-family":[{font:[DA,RA,t]}],"font-features":[{"font-features":[de]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,fe,de]}],"line-clamp":[{"line-clamp":[we,"none",fe,Vb]}],leading:[{leading:[l,...U()]}],"list-image":[{"list-image":["none",fe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",fe,Gr]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[we,"auto",fe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[Vn,fe,de]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vn,fe,de],radial:["",fe,de],conic:[Vn,fe,de]},NA,OA]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[we,fe,de]}],"outline-w":[{outline:["",we,Cs,Gr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",p,wu,Eu]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",m,wu,Eu]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[we,Gr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",y,wu,Eu]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[we,fe,de]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[fe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,de]}],filter:[{filter:["","none",fe,de]}],blur:[{blur:mt()}],brightness:[{brightness:[we,fe,de]}],contrast:[{contrast:[we,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",b,wu,Eu]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",we,fe,de]}],"hue-rotate":[{"hue-rotate":[we,fe,de]}],invert:[{invert:["",we,fe,de]}],saturate:[{saturate:[we,fe,de]}],sepia:[{sepia:["",we,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":mt()}],"backdrop-brightness":[{"backdrop-brightness":[we,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[we,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",we,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[we,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[we,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",we,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",fe,de]}],ease:[{ease:["linear","initial",x,fe,de]}],delay:[{delay:[we,fe,de]}],animate:[{animate:["none",E,fe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,fe,de]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Je()}],"rotate-x":[{"rotate-x":Je()}],"rotate-y":[{"rotate-y":Je()}],"rotate-z":[{"rotate-z":Je()}],scale:[{scale:Xe()}],"scale-x":[{"scale-x":Xe()}],"scale-y":[{"scale-y":Xe()}],"scale-z":[{"scale-z":Xe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[fe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],zoom:[{zoom:[Vn,fe,de]}],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":B()}],"scrollbar-track-color":[{"scrollbar-track":B()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",fe,de]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[we,Cs,Gr,Vb]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},PA=mA(HA);function $t(...e){return PA(TC(e))}const UA=AC("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 text-xs has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8"}},defaultVariants:{variant:"default",size:"default"}});function Gt({className:e,variant:t="default",size:n="default",asChild:r=!1,...a}){const l=r?SC:"button";return M.jsx(l,{"data-slot":"button",className:$t(UA({variant:t,size:n}),e),...a})}var VA=Object.defineProperty,_a=(e,t)=>VA(e,"name",{value:t,configurable:!0}),GC=!!(typeof window<"u"&&window.document&&window.document.createElement);function $n(e,t,{checkForDefaultPrevented:n=!0}={}){return _a(function(a){if(e?.(a),n===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}_a($n,"composeEventHandlers");function BA(e){if(!GC)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}_a(BA,"getOwnerWindow");function yp(e){if(!GC)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}_a(yp,"getOwnerDocument");function $C(e,t=!1){const{activeElement:n}=yp(e);if(!n?.nodeName)return null;if(qC(n)&&n.contentDocument)return $C(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const a=yp(n).getElementById(r);if(a)return a}}return n}_a($C,"getActiveElement");function qC(e){return e.tagName==="IFRAME"}_a(qC,"isFrame");var jA=Object.defineProperty,Cn=(e,t)=>jA(e,"name",{value:t,configurable:!0});function FA(e,t){const n=D.createContext(t);n.displayName=e+"Context";const r=Cn(l=>{const{children:u,...d}=l,f=D.useMemo(()=>d,Object.values(d));return M.jsx(n.Provider,{value:f,children:u})},"Provider");r.displayName=e+"Provider";function a(l,u={}){const{optional:d=!1}=u,f=D.useContext(n);if(f)return f;if(t!==void 0)return t;if(!d)throw new Error(`\`${l}\` must be used within \`${e}\``)}return Cn(a,"useContext"),[r,a]}Cn(FA,"createContext");function Am(e,t=[]){let n=[];function r(l,u){const d=D.createContext(u);d.displayName=l+"Context";const f=n.length;n=[...n,u];const h=Cn(m=>{const{scope:y,children:b,...S}=m,_=y?.[e]?.[f]||d,w=D.useMemo(()=>S,Object.values(S));return M.jsx(_.Provider,{value:w,children:b})},"Provider");h.displayName=l+"Provider";function p(m,y,b={}){const{optional:S=!1}=b,_=y?.[e]?.[f]||d,w=D.useContext(_);if(w)return w;if(u!==void 0)return u;if(!S)throw new Error(`\`${m}\` must be used within \`${l}\``)}return Cn(p,"useContext"),[h,p]}Cn(r,"createContext");const a=Cn(()=>{const l=n.map(u=>D.createContext(u));return Cn(function(d){const f=d?.[e]||l;return D.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])},"useScope")},"createScope");return a.scopeName=e,[r,WC(a,...t)]}Cn(Am,"createContextScope");function WC(...e){const t=e[0];if(e.length===1)return t;const n=Cn(()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return Cn(function(l){const u=r.reduce((d,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...d,...m}},{});return D.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Cn(WC,"composeContextScopes");var Rm=Z_(),GA=Object.defineProperty,$A=(e,t)=>GA(e,"name",{value:t,configurable:!0}),qA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vo=qA.reduce((e,t)=>{const n=km(`Primitive.${t}`),r=D.forwardRef((a,l)=>{const{asChild:u,...d}=a,f=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(f,{...d,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function YC(e,t){e&&Rm.flushSync(()=>e.dispatchEvent(t))}$A(YC,"dispatchDiscreteCustomEvent");var WA=Object.defineProperty,YA=(e,t)=>WA(e,"name",{value:t,configurable:!0});function Qs(e){const t=D.useRef(e);return D.useEffect(()=>{t.current=e}),D.useMemo(()=>((...n)=>t.current?.(...n)),[])}YA(Qs,"useCallbackRef");var XA=Object.defineProperty,St=(e,t)=>XA(e,"name",{value:t,configurable:!0}),bp="dismissableLayer.update",KA="dismissableLayer.pointerDownOutside",QA="dismissableLayer.focusOutside",Fb,XC=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ZA=D.forwardRef(St(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,...p}=t,m=D.useContext(XC),[y,b]=D.useState(null),S=y?.ownerDocument??globalThis?.document,[,_]=D.useState({}),w=mo(n,b),x=Array.from(m.layers),[E]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),L=E?x.indexOf(E):-1,A=y?x.indexOf(y):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,N=A>=L,H=D.useRef(!1),U=KC(K=>{u?.(K),f?.(K),K.defaultPrevented||h?.()},{ownerDocument:S,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:H,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:D.useCallback(K=>{if(!(K instanceof Node))return!1;const ie=[...m.branches].some(Z=>Z.contains(K));return N&&!ie},[m.branches,N])}),Y=QC(K=>{if(a&&H.current)return;const ie=K.target;[...m.branches].some(se=>se.contains(ie))||(d?.(K),f?.(K),K.defaultPrevented||h?.())},S),te=y?A===x.length-1:!1,J=Qs(K=>{K.key==="Escape"&&(l?.(K),!K.defaultPrevented&&h&&(K.preventDefault(),h()))});return D.useEffect(()=>{if(te)return S.addEventListener("keydown",J,{capture:!0}),()=>S.removeEventListener("keydown",J,{capture:!0})},[S,te,J]),D.useEffect(()=>{if(y)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Fb=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),Sp(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(y),m.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Fb))}},[y,S,r,m]),D.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),Sp())},[y,m]),D.useEffect(()=>{const K=St(()=>_({}),"handleUpdate");return document.addEventListener(bp,K),()=>document.removeEventListener(bp,K)},[]),M.jsx(vo.div,{...p,ref:w,style:{pointerEvents:R?N?"auto":"none":void 0,...t.style},onFocusCapture:$n(t.onFocusCapture,Y.onFocusCapture),onBlurCapture:$n(t.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:$n(t.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function JA(){const e=D.useContext(XC),[t,n]=D.useState(null);return D.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}St(JA,"useDismissableLayerSurface");var eR=St(()=>!0,"IS_TRUE");function KC(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:l,shouldHandlePointerDownOutside:u=eR}=t,d=Qs(e),f=D.useRef(!1),h=D.useRef(!1),p=D.useRef(new Map),m=D.useRef(()=>{});return D.useEffect(()=>{function y(){h.current=!1,a.current=!1,p.current.clear()}St(y,"resetOutsideInteraction");function b(){return Array.from(p.current.values()).some(Boolean)}St(b,"isOutsideInteractionIntercepted");function S(L){if(!h.current)return;const A=L.target;A instanceof Node&&[...l].some(N=>N.contains(A))||p.current.set(L.type,!0),L.type==="click"&&window.setTimeout(()=>{h.current&&m.current()},0)}St(S,"handleInteractionCapture");function _(L){h.current&&p.current.set(L.type,!1)}St(_,"handleInteractionBubble");const w=St(L=>{if(L.target&&!f.current){let A=function(){n.removeEventListener("click",m.current);const N=b();y(),N||Om(KA,d,R,{discrete:!0})};if(St(A,"handleAndDispatchPointerDownOutsideEvent"),!u(L.target)){n.removeEventListener("click",m.current),y(),f.current=!1;return}const R={originalEvent:L};h.current=!0,a.current=r&&L.button===0,p.current.clear(),!r||L.button!==0?A():(n.removeEventListener("click",m.current),m.current=A,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),y();f.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const L of x)n.addEventListener(L,S,!0),n.addEventListener(L,_);const E=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(E),n.removeEventListener("pointerdown",w),n.removeEventListener("click",m.current);for(const L of x)n.removeEventListener(L,S,!0),n.removeEventListener(L,_)}},[n,d,r,a,l,u]),{onPointerDownCapture:St(()=>f.current=!0,"onPointerDownCapture")}}St(KC,"usePointerDownOutside");function QC(e,t=globalThis?.document){const n=Qs(e),r=D.useRef(!1);return D.useEffect(()=>{const a=St(l=>{l.target&&!r.current&&Om(QA,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:St(()=>r.current=!0,"onFocusCapture"),onBlurCapture:St(()=>r.current=!1,"onBlurCapture")}}St(QC,"useFocusOutside");function Sp(){const e=new CustomEvent(bp);document.dispatchEvent(e)}St(Sp,"dispatchUpdate");function Om(e,t,n,{discrete:r}){const a=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?YC(a,l):a.dispatchEvent(l)}St(Om,"handleAndDispatchCustomEvent");var On=globalThis?.document?D.useLayoutEffect:()=>{},tR=Object.defineProperty,nR=(e,t)=>tR(e,"name",{value:t,configurable:!0}),iR=Ks[" useId ".trim().toString()]||(()=>{}),rR=0;function ZC(e){const[t,n]=D.useState(iR());return On(()=>{e||n(r=>r??String(rR++))},[e]),e||(t?`radix-${t}`:"")}nR(ZC,"useId");const oR=["top","right","bottom","left"],_r=Math.min,Ti=Math.max,fc=Math.round,ku=Math.floor,Ai=e=>({x:e,y:e}),aR={left:"right",right:"left",bottom:"top",top:"bottom"};function JC(e,t,n){return Ti(e,_r(t,n))}function Oi(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Ca(e){return e.split("-")[1]}function Dm(e){return e==="x"?"y":"x"}function Mm(e){return e==="y"?"height":"width"}function Kn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Nm(e){return Dm(Kn(e))}function sR(e,t,n){n===void 0&&(n=!1);const r=Ca(e),a=Nm(e),l=Mm(a);let u=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=hc(u)),[u,hc(u)]}function lR(e){const t=hc(e);return[_p(e),t,_p(t)]}function _p(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gb=["left","right"],$b=["right","left"],uR=["top","bottom"],cR=["bottom","top"];function dR(e,t,n){switch(e){case"top":case"bottom":return n?t?$b:Gb:t?Gb:$b;case"left":case"right":return t?uR:cR;default:return[]}}function fR(e,t,n,r){const a=Ca(e);let l=dR(Cr(e),n==="start",r);return a&&(l=l.map(u=>u+"-"+a),t&&(l=l.concat(l.map(_p)))),l}function hc(e){const t=Cr(e);return aR[t]+e.slice(t.length)}function hR(e){var t,n,r,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(a=e.left)!=null?a:0}}function ex(e){return typeof e!="number"?hR(e):{top:e,right:e,bottom:e,left:e}}function pc(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function qb(e,t,n){let{reference:r,floating:a}=e;const l=Kn(t),u=Nm(t),d=Mm(u),f=Cr(t),h=l==="y",p=r.x+r.width/2-a.width/2,m=r.y+r.height/2-a.height/2,y=r[d]/2-a[d]/2;let b;switch(f){case"top":b={x:p,y:r.y-a.height};break;case"bottom":b={x:p,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-a.width,y:m};break;default:b={x:r.x,y:r.y}}const S=Ca(t);return S&&(b[u]+=y*(S==="end"?1:-1)*(n&&h?-1:1)),b}async function pR(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:y=!1,padding:b=0}=Oi(t,e),S=ex(b),w=d[y?m==="floating"?"reference":"floating":m],x=pc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(w)))==null||n?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:h,rootBoundary:p,strategy:f})),E=m==="floating"?{x:r,y:a,width:u.floating.width,height:u.floating.height}:u.reference,L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(L))&&await(l.getScale==null?void 0:l.getScale(L))||{x:1,y:1},R=pc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:E,offsetParent:L,strategy:f}):E);return{top:(x.top-R.top+S.top)/A.y,bottom:(R.bottom-x.bottom+S.bottom)/A.y,left:(x.left-R.left+S.left)/A.x,right:(R.right-x.right+S.right)/A.x}}const mR=50,gR=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:l=[],platform:u}=n,d=u.detectOverflow?u:{...u,detectOverflow:pR},f=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=qb(h,r,f),y=r,b=0;const S={};for(let _=0;_<l.length;_++){const w=l[_];if(!w)continue;const{name:x,fn:E}=w,{x:L,y:A,data:R,reset:N}=await E({x:p,y:m,initialPlacement:r,placement:y,strategy:a,middlewareData:S,rects:h,platform:d,elements:{reference:e,floating:t}});p=L??p,m=A??m,S[x]={...S[x],...R},N&&b<mR&&(b++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(h=N.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:p,y:m}=qb(h,y,f)),_=-1)}return{x:p,y:m,placement:y,strategy:a,middlewareData:S}},vR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:h,padding:p=0}=Oi(e,t)||{};if(h==null)return{};const m=ex(p),y={x:n,y:r},b=Nm(a),S=Mm(b),_=await u.getDimensions(h),w=b==="y",x=w?"top":"left",E=w?"bottom":"right",L=w?"clientHeight":"clientWidth",A=l.reference[S]+l.reference[b]-y[b]-l.floating[S],R=y[b]-l.reference[b],N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let H=N?N[L]:0;(!H||!await(u.isElement==null?void 0:u.isElement(N)))&&(H=d.floating[L]||l.floating[S]);const U=A/2-R/2,Y=H/2-_[S]/2-1,te=_r(m[x],Y),J=_r(m[E],Y),K=H-_[S]-J,ie=H/2-_[S]/2+U,Z=JC(te,ie,K),se=!f.arrow&&Ca(a)!=null&&ie!==Z&&l.reference[S]/2-(ie<te?te:J)-_[S]/2<0,I=se?ie<te?ie-te:ie-K:0;return{[b]:y[b]+I,data:{[b]:Z,centerOffset:ie-Z-I,...se&&{alignmentOffset:I}},reset:se}}}),yR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...w}=Oi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const x=Cr(a),E=Kn(d),L=Cr(d)===d,A=await(f.isRTL==null?void 0:f.isRTL(h.floating)),R=y||(L||!_?[hc(d)]:lR(d)),N=S!=="none";!y&&N&&R.push(...fR(d,_,S,A));const H=[d,...R],U=await f.detectOverflow(t,w),Y=[];let te=((r=l.flip)==null?void 0:r.overflows)||[];if(p&&Y.push(U[x]),m){const Z=sR(a,u,A);Y.push(U[Z[0]],U[Z[1]])}if(te=[...te,{placement:a,overflows:Y}],!Y.every(Z=>Z<=0)){var J,K;const Z=(((J=l.flip)==null?void 0:J.index)||0)+1,se=H[Z];if(se&&(!(m==="alignment"?E!==Kn(se):!1)||te.every(F=>Kn(F.placement)===E?F.overflows[0]>0:!0)))return{data:{index:Z,overflows:te},reset:{placement:se}};let I=(K=te.filter($=>$.overflows[0]<=0).sort(($,F)=>$.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!I)switch(b){case"bestFit":{var ie;const $=(ie=te.filter(F=>{if(N){const re=Kn(F.placement);return re===E||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,B)=>re+B,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:ie[0];$&&(I=$);break}case"initialPlacement":I=d;break}if(a!==I)return{reset:{placement:I}}}return{}}}};function Wb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yb(e){return oR.some(t=>e[t]>=0)}const bR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...l}=Oi(e,t);switch(a){case"referenceHidden":{const u=await r.detectOverflow(t,{...l,elementContext:"reference"}),d=Wb(u,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Yb(d)}}}case"escaped":{const u=await r.detectOverflow(t,{...l,altBoundary:!0}),d=Wb(u,n.floating);return{data:{escapedOffsets:d,escaped:Yb(d)}}}default:return{}}}}},tx=new Set(["left","top"]);async function SR(e,t){const{placement:n,platform:r,elements:a}=e,l=await(r.isRTL==null?void 0:r.isRTL(a.floating)),u=Cr(n),d=Ca(n),f=Kn(n)==="y",h=tx.has(u)?-1:1,p=l&&f?-1:1,m=Oi(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),f?{x:b*p,y:y*h}:{x:y*h,y:b*p}}const _R=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:l,placement:u,middlewareData:d}=t,f=await SR(t,e);return u===((n=d.offset)==null?void 0:n.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:l+f.y,data:{...f,placement:u}}}}},CR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:f={fn:E=>{let{x:L,y:A}=E;return{x:L,y:A}}},...h}=Oi(e,t),p={x:n,y:r},m=await l.detectOverflow(t,h),y=Kn(a),b=Dm(y);let S=p[b],_=p[y];const w=(E,L)=>JC(L+m[E==="y"?"top":"left"],L,L-m[E==="y"?"bottom":"right"]);u&&(S=w(b,S)),d&&(_=w(y,_));const x=f.fn({...t,[b]:S,[y]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[b]:u,[y]:d}}}}}},xR=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:a,y:l,placement:u,rects:d,middlewareData:f}=t,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=Oi(e,t),y={x:a,y:l},b=Kn(u),S=Dm(b);let _=y[S],w=y[b];const x=Oi(h,t),E=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const R=S==="y"?"height":"width",N=d.reference[S]-d.floating[R]+E.mainAxis,H=d.reference[S]+d.reference[R]-E.mainAxis;_<N?_=N:_>H&&(_=H)}if(m){var L,A;const R=S==="y"?"width":"height",N=tx.has(Cr(u)),H=d.reference[b]-d.floating[R]+(N&&((L=f.offset)==null?void 0:L[b])||0)+(N?0:E.crossAxis),U=d.reference[b]+d.reference[R]+(N?0:((A=f.offset)==null?void 0:A[b])||0)-(N?E.crossAxis:0);w<H?w=H:w>U&&(w=U)}return{[S]:_,[b]:w}}}},ER=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:a,elements:l}=t,{apply:u=()=>{},...d}=Oi(e,t),f=await a.detectOverflow(t,d),h=Cr(n),p=Ca(n),m=Kn(n)==="y",{width:y,height:b}=r.floating;let S,_;h==="top"||h==="bottom"?(S=h,_=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(_=h,S=p==="end"?"top":"bottom");const w=b-f.top-f.bottom,x=y-f.left-f.right,E=_r(b-f[S],w),L=_r(y-f[_],x),A=t.middlewareData.shift,R=!A;let N=E,H=L;A!=null&&A.enabled.x&&(H=x),A!=null&&A.enabled.y&&(N=w),R&&!p&&(m?H=y-2*Ti(f.left,f.right):N=b-2*Ti(f.top,f.bottom)),await u({...t,availableWidth:H,availableHeight:N});const U=await a.getDimensions(l.floating);return y!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function xa(e){return nx(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){var t;return(t=(nx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nx(e){return Uc()?e instanceof Node||e instanceof qt(e).Node:!1}function Zn(e){return Uc()?e instanceof Element||e instanceof qt(e).Element:!1}function Er(e){return Uc()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Xb(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function Vc(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function wR(e){return/^(table|td|th)$/.test(xa(e))}function Bc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kR=/transform|translate|scale|rotate|perspective|filter/,LR=/paint|layout|strict|content/,$r=e=>!!e&&e!=="none";let Lh;function Im(e){const t=Zn(e)?Jn(e):e;return $r(t.transform)||$r(t.translate)||$r(t.scale)||$r(t.rotate)||$r(t.perspective)||!zm()&&($r(t.backdropFilter)||$r(t.filter))||kR.test(t.willChange||"")||LR.test(t.contain||"")}function TR(e){let t=ao(e);for(;Er(t)&&!Hs(t);){if(Im(t))return t;if(Bc(t))return null;t=ao(t)}return null}function zm(){return Lh==null&&(Lh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lh}function Hs(e){return/^(html|body|#document)$/.test(xa(e))}function Jn(e){return qt(e).getComputedStyle(e)}function jc(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ao(e){if(xa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xb(e)&&e.host||zi(e);return Xb(t)?t.host:t}function ix(e){const t=ao(e);return Hs(t)?(e.ownerDocument||e).body:Er(t)&&Vc(t)?t:ix(t)}function Ps(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=ix(e),l=a===((r=e.ownerDocument)==null?void 0:r.body),u=qt(a);if(l){const d=Cp(u);return t.concat(u,u.visualViewport||[],Vc(a)?a:[],d&&n?Ps(d):[])}else return t.concat(a,Ps(a,[],n))}function Cp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rx(e){const t=Jn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Er(e),l=a?e.offsetWidth:n,u=a?e.offsetHeight:r,d=fc(n)!==l||fc(r)!==u;return d&&(n=l,r=u),{width:n,height:r,$:d}}function Hm(e){return Zn(e)?e:e.contextElement}function ma(e){const t=Hm(e);if(!Er(t))return Ai(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:l}=rx(t);let u=(l?fc(n.width):n.width)/r,d=(l?fc(n.height):n.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const AR=Ai(0);function ox(e){const t=qt(e);return!zm()||!t.visualViewport?AR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RR(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===qt(e)}function so(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),l=Hm(e);let u=Ai(1);t&&(r?Zn(r)&&(u=ma(r)):u=ma(e));const d=RR(l,n,r)?ox(l):Ai(0);let f=(a.left+d.x)/u.x,h=(a.top+d.y)/u.y,p=a.width/u.x,m=a.height/u.y;if(l&&r){const y=qt(l),b=Zn(r)?qt(r):r;let S=y,_=Cp(S);for(;_&&b!==S;){const w=ma(_),x=_.getBoundingClientRect(),E=Jn(_),L=x.left+(_.clientLeft+parseFloat(E.paddingLeft))*w.x,A=x.top+(_.clientTop+parseFloat(E.paddingTop))*w.y;f*=w.x,h*=w.y,p*=w.x,m*=w.y,f+=L,h+=A,S=qt(_),_=Cp(S)}}return pc({width:p,height:m,x:f,y:h})}function Fc(e,t){const n=jc(e).scrollLeft;return t?t.left+n:so(zi(e)).left+n}function ax(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fc(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function OR(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const l=a==="fixed",u=zi(r),d=t?Bc(t.floating):!1;if(r===u||d&&l)return n;let f={scrollLeft:0,scrollTop:0},h=Ai(1);const p=Ai(0),m=Er(r);if((m||!l)&&((xa(r)!=="body"||Vc(u))&&(f=jc(r)),m)){const b=so(r);h=ma(r),p.x=b.x+r.clientLeft,p.y=b.y+r.clientTop}const y=u&&!m&&!l?ax(u,f):Ai(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+p.x+y.x,y:n.y*h.y-f.scrollTop*h.y+p.y+y.y}}function DR(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function MR(e){const t=jc(e),n=e.ownerDocument.body,r=Ti(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Ti(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-t.scrollLeft+Fc(e);const u=-t.scrollTop;return Jn(n).direction==="rtl"&&(l+=Ti(e.clientWidth,n.clientWidth)-r),{width:r,height:a,x:l,y:u}}const NR=25;function IR(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",a=qt(e),l=zi(e),u=a.visualViewport;let d=l.clientWidth,f=l.clientHeight,h=0,p=0;if(u){const y=!zm()||t==="fixed";r?y||(h=-u.offsetLeft,p=-u.offsetTop):(d=u.width,f=u.height,y&&(h=u.offsetLeft,p=u.offsetTop))}if(Fc(l)<=0){const y=l.ownerDocument,b=y.body,S=getComputedStyle(b),_=y.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,w=Math.abs(l.clientWidth-b.clientWidth-_),x=getComputedStyle(l).scrollbarGutter==="stable both-edges"?w/2:w;x<=NR&&(d-=x)}return{width:d,height:f,x:h,y:p}}function zR(e,t){const n=so(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,l=ma(e),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=a*l.x,h=r*l.y;return{width:u,height:d,x:f,y:h}}function Kb(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=IR(e,n,t);else if(t==="document")r=MR(zi(e));else if(Zn(t))r=zR(t,n);else{const a=ox(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return pc(r)}function HR(e,t){const n=t.get(e);if(n)return n;let r=Ps(e,[],!1).filter(d=>Zn(d)&&xa(d)!=="body"),a=null;const l=Jn(e).position==="fixed";let u=l?ao(e):e;for(;Zn(u)&&!Hs(u);){const d=Jn(u),f=Im(u),h=a?a.position:l?"fixed":"";!f&&(h==="fixed"||h==="absolute"&&d.position==="static")?r=r.filter(m=>m!==u):a=d,u=ao(u)}return t.set(e,r),r}function PR(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const u=[...n==="clippingAncestors"?Bc(t)?[]:HR(t,this._c):[].concat(n),r],d=Kb(t,u[0],a);let f=d.top,h=d.right,p=d.bottom,m=d.left;for(let y=1;y<u.length;y++){const b=Kb(t,u[y],a);f=Ti(b.top,f),h=_r(b.right,h),p=_r(b.bottom,p),m=Ti(b.left,m)}return{width:h-m,height:p-f,x:m,y:f}}function UR(e){const{width:t,height:n}=rx(e);return{width:t,height:n}}function VR(e,t,n){const r=Er(t),a=zi(t),l=n==="fixed",u=so(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Ai(0);if((r||!l)&&((xa(t)!=="body"||Vc(a))&&(d=jc(t)),r)){const y=so(t,!0,l,t);f.x=y.x+t.clientLeft,f.y=y.y+t.clientTop}!r&&a&&(f.x=Fc(a));const h=a&&!r&&!l?ax(a,d):Ai(0),p=u.left+d.scrollLeft-f.x-h.x,m=u.top+d.scrollTop-f.y-h.y;return{x:p,y:m,width:u.width,height:u.height}}function Th(e){return Jn(e).position==="static"}function Qb(e,t){if(!Er(e)||Jn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function sx(e,t){const n=qt(e);if(Bc(e))return n;if(!Er(e)){let a=ao(e);for(;a&&!Hs(a);){if(Zn(a)&&!Th(a))return a;a=ao(a)}return n}let r=Qb(e,t);for(;r&&wR(r)&&Th(r);)r=Qb(r,t);return r&&Hs(r)&&Th(r)&&!Im(r)?n:r||TR(e)||n}const BR=async function(e){const t=this.getOffsetParent||sx,n=this.getDimensions,r=await n(e.floating);return{reference:VR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jR(e){return Jn(e).direction==="rtl"}const FR={convertOffsetParentRelativeRectToViewportRelativeRect:OR,getDocumentElement:zi,getClippingRect:PR,getOffsetParent:sx,getElementRects:BR,getClientRects:DR,getDimensions:UR,getScale:ma,isElement:Zn,isRTL:jR};function lx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GR(e,t,n){let r=null,a;const l=zi(e);function u(){var p;clearTimeout(a),(p=r)==null||p.disconnect(),r=null}function d(p,m){p===void 0&&(p=!1),m===void 0&&(m=1),u();const y=e.getBoundingClientRect(),{left:b,top:S,width:_,height:w}=y;if(p||t(),!_||!w)return;const x=ku(S),E=ku(l.clientWidth-(b+_)),L=ku(l.clientHeight-(S+w)),A=ku(b),N={rootMargin:-x+"px "+-E+"px "+-L+"px "+-A+"px",threshold:Ti(0,_r(1,m))||1};let H=!0;function U(Y){const te=Y[0].intersectionRatio;if(!lx(y,e.getBoundingClientRect()))return d();if(te!==m){if(!H)return d();te?d(!1,te):a=setTimeout(()=>{d(!1,1e-7)},1e3)}H=!1}try{r=new IntersectionObserver(U,{...N,root:l.ownerDocument})}catch{r=new IntersectionObserver(U,N)}r.observe(e)}const f=qt(e),h=()=>d(n);return f.addEventListener("resize",h),d(!0),()=>{f.removeEventListener("resize",h),u()}}function $R(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=Hm(e),p=a||l?[...h?Ps(h):[],...t?Ps(t):[]]:[];p.forEach(x=>{a&&x.addEventListener("scroll",n),l&&x.addEventListener("resize",n)});const m=h&&d?GR(h,n,l):null;let y=-1,b=null;u&&(b=new ResizeObserver(x=>{let[E]=x;E&&E.target===h&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var L;(L=b)==null||L.observe(t)})),n()}),h&&!f&&b.observe(h),t&&b.observe(t));let S,_=f?so(e):null;f&&w();function w(){const x=so(e);_&&!lx(_,x)&&n(),_=x,S=requestAnimationFrame(w)}return n(),()=>{var x;p.forEach(E=>{a&&E.removeEventListener("scroll",n),l&&E.removeEventListener("resize",n)}),m?.(),(x=b)==null||x.disconnect(),b=null,f&&cancelAnimationFrame(S)}}const qR=_R,WR=CR,YR=yR,XR=ER,KR=bR,Zb=vR,QR=xR,ZR=(e,t,n)=>{const r=new Map,a=n??{},l={...FR,...a.platform,_c:r};return gR(e,t,{...a,platform:l})};var JR=typeof document<"u",eO=function(){},Ju=JR?D.useLayoutEffect:eO;function mc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!mc(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const l=a[r];if(!(l==="_owner"&&e.$$typeof)&&!mc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function ux(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jb(e,t){const n=ux(e);return Math.round(t*n)/n}function Ah(e){const t=D.useRef(e);return Ju(()=>{t.current=e}),t}function tO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[p,m]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=D.useState(r);mc(y,r)||b(r);const[S,_]=D.useState(null),[w,x]=D.useState(null),E=D.useCallback(F=>{F!==N.current&&(N.current=F,_(F))},[]),L=D.useCallback(F=>{F!==H.current&&(H.current=F,x(F))},[]),A=l||S,R=u||w,N=D.useRef(null),H=D.useRef(null),U=D.useRef(p),Y=f!=null,te=Ah(f),J=Ah(a),K=Ah(h),ie=D.useCallback(()=>{if(!N.current||!H.current)return;const F={placement:t,strategy:n,middleware:y};J.current&&(F.platform=J.current),ZR(N.current,H.current,F).then(re=>{const B={...re,isPositioned:K.current!==!1};Z.current&&!mc(U.current,B)&&(U.current=B,Rm.flushSync(()=>{m(B)}))})},[y,t,n,J,K]);Ju(()=>{h===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[h]);const Z=D.useRef(!1);Ju(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Ju(()=>{if(A&&(N.current=A),R&&(H.current=R),A&&R){if(te.current)return te.current(A,R,ie);ie()}},[A,R,ie,te,Y]);const se=D.useMemo(()=>({reference:N,floating:H,setReference:E,setFloating:L}),[E,L]),I=D.useMemo(()=>({reference:A,floating:R}),[A,R]),$=D.useMemo(()=>{const F={position:n,left:0,top:0};if(!I.floating)return F;const re=Jb(I.floating,p.x),B=Jb(I.floating,p.y);return d?{...F,transform:"translate("+re+"px, "+B+"px)",...ux(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:B}},[n,d,I.floating,p.x,p.y]);return D.useMemo(()=>({...p,update:ie,refs:se,elements:I,floatingStyles:$}),[p,ie,se,I,$])}const nO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Zb({element:r.current,padding:a}).fn(n):{}:r?Zb({element:r,padding:a}).fn(n):{}}}},iO=(e,t)=>{const n=qR(e);return{name:n.name,fn:n.fn,options:[e,t]}},rO=(e,t)=>{const n=WR(e);return{name:n.name,fn:n.fn,options:[e,t]}},oO=(e,t)=>({fn:QR(e).fn,options:[e,t]}),aO=(e,t)=>{const n=YR(e);return{name:n.name,fn:n.fn,options:[e,t]}},sO=(e,t)=>{const n=XR(e);return{name:n.name,fn:n.fn,options:[e,t]}},lO=(e,t)=>{const n=KR(e);return{name:n.name,fn:n.fn,options:[e,t]}},uO=(e,t)=>{const n=nO(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cO=Object.defineProperty,dO=(e,t)=>cO(e,"name",{value:t,configurable:!0});function cx(e){const[t,n]=D.useState(void 0);return On(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,d;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;n({width:u,height:d})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}dO(cx,"useSize");var fO=Object.defineProperty,br=(e,t)=>fO(e,"name",{value:t,configurable:!0}),dx="Popper",[fx,hx]=Am(dx),[hO,px]=fx(dx),pO=br(e=>{const{__scopePopper:t,children:n}=e,[r,a]=D.useState(null),[l,u]=D.useState(void 0);return M.jsx(hO,{scope:t,anchor:r,onAnchorChange:a,placementState:l,setPlacementState:u,children:n})},"Popper"),mO="PopperAnchor",gO=D.forwardRef(br(function(t,n){const{__scopePopper:r,virtualRef:a,...l}=t,u=px(mO,r),d=D.useRef(null),f=u.onAnchorChange,h=D.useCallback(_=>{d.current=_,_&&f(_)},[f]),p=mo(n,h),m=D.useRef(null);D.useEffect(()=>{if(!a)return;const _=m.current;m.current=a.current,_!==m.current&&f(m.current)});const y=u.placementState&&Gc(u.placementState),b=y?.[0],S=y?.[1];return a?null:M.jsx(vo.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...l,ref:p})},"PopperAnchor")),mx="PopperContent",[vO,w6]=fx(mx),yO=D.forwardRef(br(function(t,n){const{__scopePopper:r,side:a="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:_,...w}=t,x=px(mx,r),[E,L]=D.useState(null),A=mo(n,L),[R,N]=D.useState(null),H=cx(R),U=H?.width??0,Y=H?.height??0,te=a+(u!=="center"?"-"+u:""),J=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},K=Array.isArray(p)?p:[p],ie=K.length>0,Z={padding:J,boundary:K.filter(gx),altBoundary:ie},{refs:se,floatingStyles:I,placement:$,isPositioned:F,middlewareData:re}=tO({strategy:"fixed",placement:te,whileElementsMounted:br((...me)=>$R(...me,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[iO({mainAxis:l+Y,alignmentAxis:d}),h&&rO({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?oO():void 0,...Z}),h&&aO({...Z}),sO({...Z,apply:br(({elements:me,rects:mt,availableWidth:Je,availableHeight:Xe})=>{const{width:Ne,height:ze}=mt.reference,Ke=me.floating.style;Ke.setProperty("--radix-popper-available-width",`${Je}px`),Ke.setProperty("--radix-popper-available-height",`${Xe}px`),Ke.setProperty("--radix-popper-anchor-width",`${Ne}px`),Ke.setProperty("--radix-popper-anchor-height",`${ze}px`)},"apply")}),R&&uO({element:R,padding:f}),bO({arrowWidth:U,arrowHeight:Y}),b&&lO({strategy:"referenceHidden",...Z,boundary:ie?Z.boundary:void 0})]}),B=x.setPlacementState;On(()=>(B($),()=>{B(void 0)}),[$,B]);const[O,q]=Gc($),oe=Qs(_);On(()=>{F&&oe?.()},[F,oe]);const le=re.arrow?.x,ce=re.arrow?.y,ue=re.arrow?.centerOffset!==0,[ge,Oe]=D.useState();return On(()=>{E&&Oe(window.getComputedStyle(E).zIndex)},[E]),M.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(" "),...re.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:M.jsx(vO,{scope:r,placedSide:O,placedAlign:q,onArrowChange:N,arrowX:le,arrowY:ce,shouldHideArrow:ue,children:M.jsx(vo.div,{"data-side":O,"data-align":q,...w,ref:A,style:{...w.style,animation:F?w.style?.animation:"none"}})})})},"PopperContent"));function gx(e){return e!==null}br(gx,"isNotNull");var bO=br(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,p]=Gc(n),m={start:"0%",center:"50%",end:"100%"}[p],y=(a.arrow?.x??0)+d/2,b=(a.arrow?.y??0)+f/2;let S="",_="";return h==="bottom"?(S=u?m:`${y}px`,_=`${-f}px`):h==="top"?(S=u?m:`${y}px`,_=`${r.floating.height+f}px`):h==="right"?(S=`${-f}px`,_=u?m:`${b}px`):h==="left"&&(S=`${r.floating.width+f}px`,_=u?m:`${b}px`),{data:{x:S,y:_}}}}),"transformOrigin");function Gc(e){const[t,n="center"]=e.split("-");return[t,n]}br(Gc,"getSideAndAlignFromPlacement");var SO=pO,_O=gO,CO=yO,xO=Object.defineProperty,EO=(e,t)=>xO(e,"name",{value:t,configurable:!0}),wO=D.forwardRef(EO(function(t,n){const{container:r,...a}=t,[l,u]=D.useState(!1);On(()=>u(!0),[]);const d=r||l&&globalThis?.document?.body;return d?Rm.createPortal(M.jsx(vo.div,{...a,ref:n}),d):null},"Portal")),kO=Object.defineProperty,Di=(e,t)=>kO(e,"name",{value:t,configurable:!0});function vx(e,t){return D.useReducer((n,r)=>t[n][r]??n,e)}Di(vx,"useStateMachine");var yx=Di(e=>{const{present:t,children:n}=e,r=bx(t),a=typeof n=="function"?n({present:r.isPresent}):D.Children.only(n),l=Sx(r.ref,_x(a));return typeof n=="function"||r.isPresent?D.cloneElement(a,{ref:l}):null},"Presence");function bx(e){const[t,n]=D.useState(),r=D.useRef(null),a=D.useRef(e),l=D.useRef("none"),u=D.useRef(void 0),d=e?"mounted":"unmounted",[f,h]=vx(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{f==="mounted"?(l.current=u.current??sa(r.current),u.current=void 0):l.current="none"},[f]),On(()=>{const p=r.current,m=a.current;if(m!==e){const b=l.current,S=sa(p);e?(u.current=S,h("MOUNT")):S==="none"||p?.display==="none"?h("UNMOUNT"):h(m&&b!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,h]),On(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,y=Di(S=>{const w=sa(r.current).includes(CSS.escape(S.animationName));if(S.target===t&&w&&(h("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},"handleAnimationEnd"),b=Di(S=>{S.target===t&&(l.current=sa(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:D.useCallback(p=>{if(p){const m=getComputedStyle(p);r.current=m,u.current=sa(m)}else r.current=null;n(p)},[])}}Di(bx,"usePresence");function xp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Di(xp,"setRef");function Sx(...e){const t=D.useRef(e);return t.current=e,D.useCallback(n=>{const r=t.current;let a=!1;const l=r.map(u=>{const d=xp(u,n);return!a&&typeof d=="function"&&(a=!0),d});if(a)return()=>{for(let u=0;u<l.length;u++){const d=l[u];typeof d=="function"?d():xp(r[u],null)}}},[])}Di(Sx,"useStableComposedRefs");function sa(e){return e?.animationName||"none"}Di(sa,"getAnimationName");function _x(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Di(_x,"getElementRef");var LO=Object.defineProperty,TO=(e,t)=>LO(e,"name",{value:t,configurable:!0}),eS=Ks[" useEffectEvent ".trim().toString()],tS=Ks[" useInsertionEffect ".trim().toString()];function Cx(e){if(typeof eS=="function")return eS(e);const t=D.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof tS=="function"?tS(()=>{t.current=e}):On(()=>{t.current=e}),D.useMemo(()=>((...n)=>t.current?.(...n)),[])}TO(Cx,"useEffectEvent");var AO=Object.defineProperty,Zs=(e,t)=>AO(e,"name",{value:t,configurable:!0}),RO=Ks[" useInsertionEffect ".trim().toString()]||On;function xx({prop:e,defaultProp:t,onChange:n=Zs(()=>{},"onChange"),caller:r}){const[a,l,u]=Ex({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:a,h=D.useCallback(p=>{if(d){const m=wx(p)?p(e):p;m!==e&&u.current?.(m)}else l(p)},[d,e,l,u]);return[f,h]}Zs(xx,"useControllableState");function Ex({defaultProp:e,onChange:t}){const[n,r]=D.useState(e),a=D.useRef(n),l=D.useRef(t);return RO(()=>{l.current=t},[t]),D.useEffect(()=>{a.current!==n&&(l.current?.(n),a.current=n)},[n,a]),[n,r,l]}Zs(Ex,"useUncontrolledState");function wx(e){return typeof e=="function"}Zs(wx,"isFunction");var nS=Symbol("RADIX:SYNC_STATE");function OO(e,t,n,r){const{prop:a,defaultProp:l,onChange:u,caller:d}=t,f=a!==void 0,h=Cx(u),p=[{...n,state:l}];r&&p.push(r);const[m,y]=D.useReducer((w,x)=>{if(x.type===nS)return{...w,state:x.state};const E=e(w,x);return f&&!Object.is(E.state,w.state)&&h(E.state),E},...p),b=m.state,S=D.useRef(b);D.useEffect(()=>{S.current!==b&&(S.current=b,f||h(b))},[b,S,f]);const _=D.useMemo(()=>a!==void 0?{...m,state:a}:m,[m,a]);return D.useEffect(()=>{f&&!Object.is(a,m.state)&&y({type:nS,state:a})},[a,m.state,f]),[_,y]}Zs(OO,"useControllableStateReducer");var DO=Object.defineProperty,MO=(e,t)=>DO(e,"name",{value:t,configurable:!0}),NO=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"}),IO=D.forwardRef(MO(function(t,n){return M.jsx(vo.span,{...t,ref:n,style:{...NO,...t.style}})},"VisuallyHidden")),zO=IO,HO=Object.defineProperty,Ct=(e,t)=>HO(e,"name",{value:t,configurable:!0}),[Pm,k6]=Am("Tooltip",[hx]),Um=hx(),PO="TooltipProvider",UO=700,Ep="tooltip.open",[VO,Vm]=Pm(PO),BO=Ct(e=>{const{__scopeTooltip:t,delayDuration:n=UO,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:l}=e,u=D.useRef(!0),d=D.useRef(!1),f=D.useRef(0);return D.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),M.jsx(VO,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:D.useCallback(()=>{r<=0||(window.clearTimeout(f.current),u.current=!1)},[r]),onClose:D.useCallback(()=>{r<=0||(window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.current=!0,r))},[r]),isPointerInTransitRef:d,onPointerInTransitChange:D.useCallback(h=>{d.current=h},[]),disableHoverableContent:a,children:l})},"TooltipProvider"),wp="Tooltip",[jO,Js]=Pm(wp),FO=Ct(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=e,f=Vm(wp,e.__scopeTooltip),h=Um(t),[p,m]=D.useState(null),[y,b]=D.useState(void 0),S=ZC(),_=D.useRef(0),w=u??f.disableHoverableContent,x=d??f.delayDuration,E=D.useRef(!1),[L,A]=xx({prop:r,defaultProp:a??!1,onChange:Ct(te=>{te?(f.onOpen(),document.dispatchEvent(new CustomEvent(Ep))):f.onClose(),l?.(te)},"onChange"),caller:wp}),R=D.useMemo(()=>L?E.current?"delayed-open":"instant-open":"closed",[L]),N=D.useCallback(()=>{window.clearTimeout(_.current),_.current=0,E.current=!1,A(!0)},[A]),H=D.useCallback(()=>{window.clearTimeout(_.current),_.current=0,A(!1)},[A]),U=D.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{E.current=!0,A(!0),_.current=0},x)},[x,A]);D.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]);const Y=y??S;return M.jsx(SO,{...h,children:M.jsx(jO,{scope:t,contentId:Y,setContentId:b,open:L,stateAttribute:R,trigger:p,onTriggerChange:m,onTriggerEnter:D.useCallback(()=>{f.isOpenDelayedRef.current?U():N()},[f.isOpenDelayedRef,U,N]),onTriggerLeave:D.useCallback(()=>{w?H():(window.clearTimeout(_.current),_.current=0)},[H,w]),onOpen:N,onClose:H,disableHoverableContent:w,children:n})})},"Tooltip"),iS="TooltipTrigger",GO=D.forwardRef(Ct(function(t,n){const{__scopeTooltip:r,...a}=t,l=Js(iS,r),u=Vm(iS,r),d=Um(r),f=D.useRef(null),h=mo(n,f,l.onTriggerChange),p=D.useRef(!1),m=D.useRef(!1),y=D.useCallback(()=>p.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),M.jsx(_O,{asChild:!0,...d,children:M.jsx(vo.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...a,ref:h,onPointerMove:$n(t.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:$n(t.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:$n(t.onPointerDown,()=>{l.open&&l.onClose(),p.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:$n(t.onFocus,()=>{p.current||l.onOpen()}),onBlur:$n(t.onBlur,l.onClose),onClick:$n(t.onClick,l.onClose)})})},"TooltipTrigger")),kx="TooltipPortal",[$O,qO]=Pm(kx,{forceMount:void 0}),WO=Ct(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,l=Js(kx,t);return M.jsx($O,{scope:t,forceMount:n,children:M.jsx(yx,{present:n||l.open,children:M.jsx(wO,{asChild:!0,container:a,children:r})})})},"TooltipPortal"),Us="TooltipContent",YO=D.forwardRef(Ct(function(t,n){const r=qO(Us,t.__scopeTooltip),{forceMount:a=r.forceMount,side:l="top",...u}=t,d=Js(Us,t.__scopeTooltip);return M.jsx(yx,{present:a||d.open,children:d.disableHoverableContent?M.jsx(Lx,{side:l,...u,ref:n}):M.jsx(XO,{side:l,...u,ref:n})})},"TooltipContent")),XO=D.forwardRef(Ct(function(t,n){const r=Js(Us,t.__scopeTooltip),a=Vm(Us,t.__scopeTooltip),l=D.useRef(null),u=mo(n,l),[d,f]=D.useState(null),{trigger:h,onClose:p}=r,m=l.current,{onPointerInTransitChange:y}=a,b=D.useCallback(()=>{f(null),y(!1)},[y]),S=D.useCallback((_,w)=>{const x=_.currentTarget,E={x:_.clientX,y:_.clientY},L=Tx(E,x.getBoundingClientRect()),A=Ax(E,L),R=Rx(w.getBoundingClientRect()),N=Dx([...A,...R]);f(N),y(!0)},[y]);return D.useEffect(()=>()=>b(),[b]),D.useEffect(()=>{if(h&&m){const _=Ct(x=>S(x,m),"handleTriggerLeave"),w=Ct(x=>S(x,h),"handleContentLeave");return h.addEventListener("pointerleave",_),m.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",_),m.removeEventListener("pointerleave",w)}}},[h,m,S,b]),D.useEffect(()=>{if(d){const _=Ct(w=>{const x=w.target,E={x:w.clientX,y:w.clientY},L=h?.contains(x)||m?.contains(x),A=!Ox(E,d);L?b():A&&(b(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[h,m,d,p,b]),M.jsx(Lx,{...t,ref:u})},"TooltipContentHoverable")),KO=CC("TooltipContent"),Lx=D.forwardRef(Ct(function(t,n){const{__scopeTooltip:r,children:a,"aria-label":l,id:u,onEscapeKeyDown:d,onPointerDownOutside:f,...h}=t,p=Js(Us,r),m=Um(r),{onClose:y}=p;D.useEffect(()=>(document.addEventListener(Ep,y),()=>document.removeEventListener(Ep,y)),[y]),D.useEffect(()=>{if(p.trigger){const S=Ct(_=>{_.target instanceof Node&&_.target.contains(p.trigger)&&y()},"handleScroll");return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[p.trigger,y]);const{setContentId:b}=p;return On(()=>(b(u),()=>{b(void 0)}),[u,b]),M.jsx(ZA,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:S=>S.preventDefault(),onDismiss:y,children:M.jsxs(CO,{"data-state":p.stateAttribute,role:l?void 0:"tooltip",id:l?void 0:p.contentId,...m,...h,ref:n,style:{...h.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:[M.jsx(KO,{children:a}),l?M.jsx(zO,{id:p.contentId,role:"tooltip",children:l}):null]})})},"TooltipContentImpl"));function Tx(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,a,l)){case l:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}Ct(Tx,"getExitSideFromRect");function Ax(e,t,n=5){const 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}Ct(Ax,"getPaddedExitPoints");function Rx(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}Ct(Rx,"getPointsFromRect");function Ox(e,t){const{x:n,y:r}=e;let a=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l],f=t[u],h=d.x,p=d.y,m=f.x,y=f.y;p>r!=y>r&&n<(m-h)*(r-p)/(y-p)+h&&(a=!a)}return a}Ct(Ox,"isPointInPolygon");function Dx(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Mx(t)}Ct(Dx,"getHull");function Mx(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(a.y-u.y)>=(l.y-u.y)*(a.x-u.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(a.y-u.y)>=(l.y-u.y)*(a.x-u.x))n.pop();else break}n.push(a)}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)}Ct(Mx,"getHullPresorted");var QO=BO,ZO=FO,JO=GO,eD=WO,tD=YO;function nD({delayDuration:e=400,...t}){return M.jsx(QO,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function mr({...e}){return M.jsx(ZO,{"data-slot":"tooltip",...e})}function gr({...e}){return M.jsx(JO,{"data-slot":"tooltip-trigger",...e})}function vr({className:e,sideOffset:t=6,children:n,...r}){return M.jsx(eD,{children:M.jsx(tD,{"data-slot":"tooltip-content",sideOffset:t,className:$t("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background",e),...r,children:n})})}function ec(e){return M.jsx("kbd",{className:"font-mono text-[10px] font-normal text-muted-foreground",children:e.children})}function iD(e){const{meta:t,wrap:n,split:r,onWrap:a,onUnified:l,onSplit:u,onRefresh:d}=e;return M.jsxs("header",{className:"flex items-center gap-6 border-b border-border px-5 py-3",children:[M.jsx("span",{className:"font-serif text-lg leading-none text-foreground",children:"Comprehende"}),M.jsxs("div",{className:"flex min-w-0 flex-1 items-baseline gap-2 text-sm",title:`${t.resolved.baseSha} ... ${t.resolved.headSha}`,children:[M.jsx("code",{className:"text-primary",children:t.resolved.baseRef}),M.jsx("span",{className:"text-muted-foreground",children:"..."}),M.jsx("code",{className:"text-primary",children:t.resolved.headRef}),M.jsxs("span",{className:"font-mono text-[11px] text-muted-foreground",children:[Nb(t.resolved.baseSha)," → ",Nb(t.resolved.headSha)]})]}),M.jsx(rD,{meta:t}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsxs(Gt,{size:"sm",variant:n?"secondary":"outline","aria-pressed":n,"aria-label":"Wrap lines",onClick:a,children:["Wrap",M.jsx(ec,{children:"w"})]})}),M.jsx(vr,{children:"Wrap long lines"})]}),M.jsxs("div",{className:"flex items-center gap-1.5",children:[M.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input",children:[M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsx(Gt,{size:"sm",variant:r?"ghost":"secondary",className:"rounded-none border-0",onClick:l,"aria-pressed":!r,children:"Unified"})}),M.jsx(vr,{children:"Unified diff"})]}),M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsx(Gt,{size:"sm",variant:r?"secondary":"ghost",className:"rounded-none border-0",onClick:u,"aria-pressed":r,children:"Split"})}),M.jsx(vr,{children:"Side-by-side diff"})]})]}),M.jsx(ec,{children:"s"})]}),M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsxs(Gt,{size:"sm",variant:"outline",onClick:d,children:["Refresh",M.jsx(ec,{children:"r"})]})}),M.jsx(vr,{children:"Reload live git"})]})]})]})}function rD(e){const{meta:t}=e,n=t.coverage.unassignedCount>0||t.coverage.staleCount>0,r=[`${t.coverage.assignedHunks} of ${t.coverage.totalHunks} hunks grouped`,t.coverage.unassignedCount>0?`${t.coverage.unassignedCount} unassigned`:null,t.coverage.staleCount>0?`${t.coverage.staleCount} stale`:null].filter(a=>a!==null).join(" · ");return M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsxs("span",{className:$t("font-mono text-xs tabular-nums",n?"text-warn":"text-muted-foreground"),children:[t.coverage.assignedHunks,"/",t.coverage.totalHunks]})}),M.jsx(vr,{children:r})]})}function oD(e){return/^(@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@)/.exec(e)?.[1]??e}function aD(e){const t=[],n=/^(?:export\s+)?(?:async\s+)?(?:function|class|type|interface|enum)\s+([A-Za-z_][\w]*)/;for(const r of e){const l=n.exec(r.trim())?.[1];l!==void 0&&!t.includes(l)&&t.push(l)}return t}function sD(e){let t=0,n=0;for(const r of e)r.kind==="add"?t+=1:r.kind==="del"&&(n+=1);return{added:t,removed:n}}const Bm="diffs-container";(()=>{try{return!1}catch{return!1}})();const lD=/(?=^From [a-f0-9]+ .+$)/m,Nx=/(?=^diff --git)/gm,uD=new RegExp("(?<=\\n)"),cD=/^(---|\+\+\+)\s+([^\t\r\n]+)/,dD=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,fD=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,hD=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,jm="header-prefix",Fm="header-filename-suffix",Gm="header-metadata",el="header-custom",it={dark:"pierre-dark",light:"pierre-light"},pD="data-theme-css",mD="data-unsafe-css",gD="data-diffs-scrollbar-measure",Ix="--diffs-scrollbar-gutter-measured",vD=1e5,$m={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...$m});const yD=Object.freeze({fromStart:0,fromEnd:0}),gc={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},zx={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},ga=new Set;let va=null;function Hx(e){ga.add(e),va??=requestAnimationFrame(Px)}function kp(e){ga.delete(e)&&ga.size===0&&va!=null&&(cancelAnimationFrame(va),va=null)}function Px(e){const t=new Set(ga);ga.clear();for(const n of t)try{n(e)}catch(r){console.error(r)}ga.size>0?va=requestAnimationFrame(Px):va=null}function vc(e,t,n){if(e===t||e==null||t==null)return e===t;const r=new Set(n),a=Object.keys(e),l=new Set(Object.keys(t));for(const u of a)if(l.delete(u),!r.has(u)&&(!(u in t)||e[u]!==t[u]))return!1;for(const u of Array.from(l))if(!r.has(u))return!1;return!0}function Ea(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function $c(e,t){const n=e?.theme??it,r=t?.theme??it,a=rS(e),l=rS(t);return Ea(n,r)&&vc(e,t,["theme","parseDiffOptions"])&&vc(a,l)}function rS(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Lp(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Mi(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}const bD=new TextEncoder,SD=new TextDecoder("utf-8",{ignoreBOM:!0}),_D=/[\uD800-\uDFFF]/,Tp=1024;let da=new Uint8Array(Tp);function Ux(){da.length!==Tp&&(da=new Uint8Array(Tp))}function dt(e){if(e.length===0)return e;if(_D.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;da.length<t&&(da=new Uint8Array(t));const{written:n}=bD.encodeInto(e,da);return SD.decode(da.subarray(0,n))}function ei(e,t){return e-(t===0?0:1)}function Wt(e,t){return ei(e,t)+t}const CD=4096,xD=.5;function ED(e){for(const t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){const r=t.hunkContent[n];if(r.type!=="change")continue;const a=kD(e,r);a!=null&&(t.hunkContent.splice(n,1,...a),n+=a.length-1)}wD(t,e)}}function wD(e,t){const{hunkContent:n}=e;for(let r=1;r<n.length;r++){const a=n[r],l=n[r-1];if(a.type!=="change"||a.additions>0&&a.deletions>0||l.type!=="context")continue;const u=a.additions>0,d=u?t.additionLines:t.deletionLines,f=u?a.additionLineIndex:a.deletionLineIndex,h=u?a.additions:a.deletions,p=d[f]??"";if(p.trim()!=="")continue;let m=!0;for(let w=1;w<h;w++)if(d[f+w]!==p){m=!1;break}if(!m)continue;let y=0;for(;y<l.lines&&t.additionLines[l.additionLineIndex+l.lines-1-y]===p;)y++;if(y===0||r===1&&y===l.lines)continue;a.additionLineIndex-=y,a.deletionLineIndex-=y;const b=a.additionLineIndex+a.additions,S=a.deletionLineIndex+a.deletions,_=n[r+1];_?.type==="context"?(_.lines+=y,_.additionLineIndex=b,_.deletionLineIndex=S):n.splice(r+1,0,{type:"context",lines:y,additionLineIndex:b,deletionLineIndex:S}),l.lines-=y,l.lines===0&&(n.splice(r-1,1),r--)}}function kD(e,t){const{deletions:n,additions:r,deletionLineIndex:a,additionLineIndex:l}=t,u=Math.min(n,r),d=Math.abs(r-n);if(u===0||d===0||u*(d+1)>CD)return null;const f=[];for(let _=0;_<n;_++)f.push(oS(e.deletionLines[a+_]??""));const h=[];for(let _=0;_<r;_++)h.push(oS(e.additionLines[l+_]??""));const p=r>n;let m=0,y=-1;for(let _=0;_<=d;_++){let w=0;for(let x=0;x<u;x++)w+=TD(f[x+(p?0:_)],h[x+(p?_:0)]);_===0?y=w+u*xD:w>y&&(y=w,m=_)}if(m===0)return null;const b=[],S=(_,w,x,E)=>{(_>0||w>0)&&b.push({type:"change",deletions:_,additions:w,deletionLineIndex:x,additionLineIndex:E})};return p?(S(0,m,a,l),S(u,u,a,l+m),S(0,r-u-m,a+u,l+m+u)):(S(m,0,a,l),S(u,u,a+m,l),S(n-u-m,0,a+m+u,l+u)),b}const LD=/\s+/g;function oS(e){return e.replace(LD,"")}function TD(e,t){if(e===t)return 1;const n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let a=0;for(;a<r&&e[a]===t[a];)a++;let l=0;for(;l<r-a&&e[e.length-1-l]===t[t.length-1-l];)l++;return(a+l)/n}function AD(e,t,n){try{return RD(e,t,n)}finally{Ux()}}function RD(e,t,n=!1){const r=VD(e),a=r?ND(e):ID(e);let l;const u=[];for(const d of a){if(r&&!Nx.test(d)){if(l==null)l=dt(d);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!r&&!zD(d)){if(l==null)l=dt(d);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const f=Vx(d,{cacheKey:t!=null?`${t}-${u.length}`:void 0,isGitDiff:r,throwOnError:n});f!=null&&u.push(f)}return{patchMetadata:l,files:u}}function OD(e,t){try{return Vx(e,t)}finally{Ux()}}function Vx(e,{cacheKey:t,isGitDiff:n=Nx.test(e),oldFile:r,newFile:a,throwOnError:l=!1}={}){let u=0;const d=Gx(e,"@@ ");let f;const h=r==null||a==null;let p=0,m=0;for(const y of d){const b=Bx(y),S=b[0];if(S==null){if(l)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",y);continue}const _=Fx(S);let w=0,x=0;if(_==null||f==null){if(f!=null){if(l)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",y);continue}f={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:h,additionLines:!h&&r!=null&&a!=null?aS(a.contents):[],deletionLines:!h&&r!=null&&a!=null?aS(r.contents):[],cacheKey:uS(t)},f.additionLines.length===1&&a?.contents===""&&(f.additionLines.length=0),f.deletionLines.length===1&&r?.contents===""&&(f.deletionLines.length=0);for(const Y of b){if(Y.startsWith("diff --git")){const J=Y.trim().match(fD),K=J?.[1]??J?.[2],ie=J?.[3]??J?.[4];if(K==null||ie==null){if(l)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",Y);continue}f.name=dt(ie.trim()),K!==ie&&(f.prevName=dt(K.trim()));continue}const te=Y.startsWith("---")||Y.startsWith("+++")?Y.match(n?dD:cD):null;if(te!=null){const[,J,K]=te;if(J==="---"&&K!=="/dev/null"){const ie=dt(K.trim());f.prevName=ie,f.name=ie}else J==="+++"&&K!=="/dev/null"&&(f.name=dt(K.trim()))}else if(n){if(Y.startsWith("new mode ")&&(f.mode=dt(Y.slice(8).trim())),Y.startsWith("old mode ")&&(f.prevMode=dt(Y.slice(8).trim())),Y.startsWith("new file mode")&&(f.type="new",f.mode=dt(Y.slice(13).trim())),Y.startsWith("deleted file mode")&&(f.type="deleted",f.mode=dt(Y.slice(17).trim())),Y.startsWith("similarity index")&&(Y.startsWith("similarity index 100%")?f.type="rename-pure":f.type="rename-changed"),Y.startsWith("index ")){const[,J,K,ie]=Y.trim().match(hD)??[];J!=null&&(f.prevObjectId=dt(J)),K!=null&&(f.newObjectId=dt(K)),ie!=null&&(f.mode=dt(ie))}Y.startsWith("rename from ")&&(f.prevName=dt(Y.slice(12).trim())),Y.startsWith("rename to ")&&(f.name=dt(Y.slice(10).trim()))}}continue}let E,L;for(;b.length>0&&(b[b.length-1]===`
|
|
11
|
+
`||b[b.length-1]==="\r"||b[b.length-1]===`\r
|
|
12
|
+
`||b[b.length-1]==="");)b.pop();const{additionStart:A,deletionStart:R}=_;p=h?p:R-1,m=h?m:A-1;const N={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:_.additionCount,additionStart:A,additionLines:w,deletionCount:_.deletionCount,deletionStart:R,deletionLines:x,deletionLineIndex:p,additionLineIndex:m,hunkContent:[],hunkContext:uS(_.hunkContext),hunkSpecs:dt(S),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let H=0,U=0;for(let Y=1;Y<b.length;Y++){const te=b[Y];if(H>=N.additionCount&&U>=N.deletionCount&&!te.startsWith("\\")){if(l&&HD(te)&&!PD(te))throw Error("parsePatchContent: hunk has more lines than expected");break}const J=te[0];if(J!=="+"&&J!=="-"&&J!==" "&&J!=="\\"){if(l)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${J}", full line: "${te}"`),console.error("processFile: invalid rawLine:",te);continue}const K=BD(J);if(K==="addition"){if(l&&H>=N.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const ie=Rh(te);(E==null||E.type!=="change")&&(E=Oh("change",p,m),N.hunkContent.push(E)),m++,H++,h&&f.additionLines.push(ie),E.additions++,w++,L="addition"}else if(K==="deletion"){if(l&&U>=N.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const ie=Rh(te);(E==null||E.type!=="change")&&(E=Oh("change",p,m),N.hunkContent.push(E)),p++,U++,h&&f.deletionLines.push(ie),E.deletions++,x++,L="deletion"}else if(K==="context"){if(l&&(U>=N.deletionCount||H>=N.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const ie=Rh(te);(E==null||E.type!=="context")&&(E=Oh("context",p,m),N.hunkContent.push(E)),m++,p++,H++,U++,h&&(f.deletionLines.push(ie),f.additionLines.push(ie)),E.lines++,L="context"}else if(K==="metadata"&&E!=null){if(E.type==="context"?(N.noEOFCRAdditions=!0,N.noEOFCRDeletions=!0):L==="deletion"?N.noEOFCRDeletions=!0:L==="addition"&&(N.noEOFCRAdditions=!0),h&&(L==="addition"||L==="context")){const ie=f.additionLines.length-1;ie>=0&&(f.additionLines[ie]=Mi(f.additionLines[ie]))}if(h&&(L==="deletion"||L==="context")){const ie=f.deletionLines.length-1;ie>=0&&(f.deletionLines[ie]=Mi(f.deletionLines[ie]))}}}if(l&&(H!==N.additionCount||U!==N.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");N.additionLines=w,N.deletionLines=x,N.collapsedBefore=Math.max(ei(N.additionStart,N.additionCount)-u,0),f.hunks.push(N),u=Wt(N.additionStart,N.additionCount);for(const Y of N.hunkContent)Y.type==="context"?(N.splitLineCount+=Y.lines,N.unifiedLineCount+=Y.lines):(N.splitLineCount+=Math.max(Y.additions,Y.deletions),N.unifiedLineCount+=Y.deletions+Y.additions);N.splitLineStart=f.splitLineCount+N.collapsedBefore,N.unifiedLineStart=f.unifiedLineCount+N.collapsedBefore,f.splitLineCount+=N.collapsedBefore+N.splitLineCount,f.unifiedLineCount+=N.collapsedBefore+N.unifiedLineCount}if(f!=null){if(l&&h&&!n&&f.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(f.hunks.length>0&&!h&&f.additionLines.length>0&&f.deletionLines.length>0){const y=f.hunks[f.hunks.length-1],b=Wt(y.additionStart,y.additionCount),S=f.additionLines.length,_=Math.max(S-b,0);f.splitLineCount+=_,f.unifiedLineCount+=_}return n||(f.prevName!=null&&f.name!==f.prevName?f.hunks.length>0?f.type="rename-changed":f.type="rename-pure":(r==null||r.contents==="")&&a!=null&&a.contents!==""?f.type="new":r!=null&&r.contents!==""&&(a==null||a.contents==="")&&(f.type="deleted")),f.type!=="rename-pure"&&f.type!=="rename-changed"&&(f.prevName=void 0),ED(f),f}}function DD(e,t,n=!1){const r=[],a=MD(e)?e.split(lD):[e];for(const l of a)try{r.push(AD(l,t!=null?`${t}-${r.length}`:void 0,n))}catch(u){if(n)throw u;console.error(u)}return r}function MD(e){return e.startsWith("From ")||e.includes(`
|
|
13
|
+
From `)}function aS(e){const t=Bx(e);for(let n=0;n<t.length;n++)t[n]=dt(t[n]);return t}function Bx(e){if(e.length===0)return[""];const t=[];let n=0;for(;;){const r=e.indexOf(`
|
|
14
|
+
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function ND(e){return Gx(e,"diff --git")}function ID(e){if(e.length===0)return[""];const t=[];let n=0,r=0,a=0,l=0,u=!1;for(;r<e.length;){const d=Ap(e,r);if(a<=0&&l<=0){if(jx(e,r)){r>n&&t.push(e.slice(n,r)),n=r,u=!0,r=Ap(e,d);continue}if(u&&e.startsWith("@@ -",r)){const h=Fx(e.slice(r,d));h!=null&&(a=h.deletionCount,l=h.additionCount)}r=d;continue}const f=e[r];if(f==="\\"){r=d;continue}f===" "?(a=Math.max(a-1,0),l=Math.max(l-1,0)):f==="-"?a=Math.max(a-1,0):f==="+"&&(l=Math.max(l-1,0)),r=d}return t.push(e.slice(n)),t}function zD(e){return jx(e,0)}function jx(e,t){const n=Ap(e,t);return sS(e,t,"---")&&sS(e,n,"+++")}function sS(e,t,n){if(!e.startsWith(n,t))return!1;const r=e[t+n.length];if(r!==" "&&r!==" ")return!1;for(let a=t+n.length+1;a<e.length;a++){const l=e[a];if(l===`
|
|
15
|
+
`||l==="\r")break;if(l!==" "&&l!==" ")return!0}return!1}function Ap(e,t){const n=e.indexOf(`
|
|
16
|
+
`,t);return n===-1?e.length:n+1}function HD(e){const t=e[0];return t==="+"||t==="-"||t===" "}function PD(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){const n=e[t];if(n!==" "&&n!==" "&&n!==`
|
|
17
|
+
`&&n!=="\r")return!1}return!0}function Fx(e){if(!e.startsWith("@@ -"))return;let t=4;const n=Lu(e,t);if(n==null)return;const r=n.value;t=n.endIndex;let a=1;if(e[t]===","){const p=Lu(e,t+1);if(p==null)return;a=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const l=Lu(e,t);if(l==null)return;const u=l.value;t=l.endIndex;let d=1;if(e[t]===","){const p=Lu(e,t+1);if(p==null)return;d=p.value,t=p.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let f;const h=t+3;return e[h]===" "&&(f=UD(e.slice(h+1))),{additionCount:d,additionStart:u,deletionCount:a,deletionStart:r,hunkContext:f}}function Lu(e,t){let n=t,r=0;for(;n<e.length;n++){const a=e.charCodeAt(n)-48;if(a<0||a>9)break;r=r*10+a}if(n!==t)return{value:r,endIndex:n}}function UD(e){return e.endsWith(`\r
|
|
18
|
+
`)?e.slice(0,-2):e.endsWith(`
|
|
19
|
+
`)?e.slice(0,-1):e}function VD(e){return e.startsWith("diff --git")||e.includes(`
|
|
20
|
+
diff --git`)}function Gx(e,t){if(e.length===0)return[""];const n=`
|
|
21
|
+
${t}`,r=e.startsWith(t)?0:lS(e,n,0);if(r===-1)return[e];const a=[];r>0&&a.push(e.slice(0,r));let l=r;for(;;){const u=lS(e,n,l+1);if(u===-1)break;a.push(e.slice(l,u)),l=u}return a.push(e.slice(l)),a}function lS(e,t,n){const r=e.indexOf(t,n);return r===-1?-1:r+1}function uS(e){return e==null?e:dt(e)}function BD(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Rh(e){const t=e.slice(1);return dt(t===""?`
|
|
22
|
+
`:t)}function Oh(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}class qm{diff(t,n,r={}){let a;typeof r=="function"?(a=r,r={}):"callback"in r&&(a=r.callback);const l=this.castInput(t,r),u=this.castInput(n,r),d=this.removeEmpty(this.tokenize(l,r)),f=this.removeEmpty(this.tokenize(u,r));return this.diffWithOptionsObj(d,f,r,a)}diffWithOptionsObj(t,n,r,a){var l;const u=E=>{if(E=this.postProcess(E,r),a){setTimeout(function(){a(E)},0);return}else return E},d=n.length,f=t.length;let h=1,p=d+f;r.maxEditLength!=null&&(p=Math.min(p,r.maxEditLength));const m=(l=r.timeout)!==null&&l!==void 0?l:1/0,y=Date.now()+m,b=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(b[0],n,t,0,r);if(b[0].oldPos+1>=f&&S+1>=d)return u(this.buildValues(b[0].lastComponent,n,t));let _=-1/0,w=1/0;const x=()=>{for(let E=Math.max(_,-h);E<=Math.min(w,h);E+=2){let L;const A=b[E-1],R=b[E+1];A&&(b[E-1]=void 0);let N=!1;if(R){const U=R.oldPos-E;N=R&&0<=U&&U<d}const H=A&&A.oldPos+1<f;if(!N&&!H){b[E]=void 0;continue}if(!H||N&&A.oldPos<R.oldPos?L=this.addToPath(R,!0,!1,0,r):L=this.addToPath(A,!1,!0,1,r),S=this.extractCommon(L,n,t,E,r),L.oldPos+1>=f&&S+1>=d)return u(this.buildValues(L.lastComponent,n,t))||!0;b[E]=L,L.oldPos+1>=f&&(w=Math.min(w,E-1)),S+1>=d&&(_=Math.max(_,E+1))}h++};if(a)(function E(){setTimeout(function(){if(h>p||Date.now()>y)return a(void 0);x()||E()},0)})();else for(;h<=p&&Date.now()<=y;){const E=x();if(E)return E}}addToPath(t,n,r,a,l){const u=t.lastComponent;return u&&!l.oneChangePerToken&&u.added===n&&u.removed===r?{oldPos:t.oldPos+a,lastComponent:{count:u.count+1,added:n,removed:r,previousComponent:u.previousComponent}}:{oldPos:t.oldPos+a,lastComponent:{count:1,added:n,removed:r,previousComponent:u}}}extractCommon(t,n,r,a,l){const u=n.length,d=r.length;let f=t.oldPos,h=f-a,p=0;for(;h+1<u&&f+1<d&&this.equals(r[f+1],n[h+1],l);)h++,f++,p++,l.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!l.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=f,h}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const a=[];let l;for(;t;)a.push(t),l=t.previousComponent,delete t.previousComponent,t=l;a.reverse();const u=a.length;let d=0,f=0,h=0;for(;d<u;d++){const p=a[d];if(p.removed)p.value=this.join(r.slice(h,h+p.count)),h+=p.count;else{if(!p.added&&this.useLongestToken){let m=n.slice(f,f+p.count);m=m.map(function(y,b){const S=r[h+b];return S.length>y.length?S:y}),p.value=this.join(m)}else p.value=this.join(n.slice(f,f+p.count));f+=p.count,p.added||(h+=p.count)}}return a}}class jD extends qm{}const FD=new jD;function GD(e,t,n){return FD.diff(e,t,n)}const cS="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}";class $D extends qm{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${cS}]+|[^\\S\\n\\r]+|[^${cS}]`,"ug");return t.match(n)||[]}}const qD=new $D;function WD(e,t,n){return qD.diff(e,t,n)}class YD extends qm{constructor(){super(...arguments),this.tokenize=KD}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
23
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
24
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
25
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
26
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const XD=new YD;function dS(e,t,n){return XD.diff(e,t,n)}function KD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
27
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let a=0;a<r.length;a++){const l=r[a];a%2&&!t.newlineIsToken?n[n.length-1]+=l:n.push(l)}return n}function QD(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function cr(e){if(!QD(e))return e;let t='"';const n=new TextEncoder().encode(e);let r=0;for(;r<n.length;){const a=n[r];a===7?t+="\\a":a===8?t+="\\b":a===9?t+="\\t":a===10?t+="\\n":a===11?t+="\\v":a===12?t+="\\f":a===13?t+="\\r":a===34?t+='\\"':a===92?t+="\\\\":a>=32&&a<=126?t+=String.fromCharCode(a):t+="\\"+a.toString(8).padStart(3,"0"),r++}return t+='"',t}const fS={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function hS(e,t,n,r,a,l,u){let d;u?typeof u=="function"?d={callback:u}:d=u:d={},typeof d.context>"u"&&(d.context=4);const f=d.context;if(d.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(d.callback){const{callback:p}=d;dS(n,r,Object.assign(Object.assign({},d),{callback:m=>{const y=h(m);p(y)}}))}else return h(dS(n,r,d));function h(p){if(!p)return;p.push({value:"",lines:[]});function m(E){return E.map(function(L){return" "+L})}const y=[];let b=0,S=0,_=[],w=1,x=1;for(let E=0;E<p.length;E++){const L=p[E],A=L.lines||JD(L.value);if(L.lines=A,L.added||L.removed){if(!b){const R=p[E-1];b=w,S=x,R&&(_=f>0?m(R.lines.slice(-f)):[],b-=_.length,S-=_.length)}for(const R of A)_.push((L.added?"+":"-")+R);L.added?x+=A.length:w+=A.length}else{if(b)if(A.length<=f*2&&E<p.length-2)for(const R of m(A))_.push(R);else{const R=Math.min(A.length,f);for(const H of m(A.slice(0,R)))_.push(H);const N={oldStart:b,oldLines:w-b+R,newStart:S,newLines:x-S+R,lines:_};y.push(N),b=0,S=0,_=[]}w+=A.length,x+=A.length}}for(const E of y)for(let L=0;L<E.lines.length;L++)E.lines[L].endsWith(`
|
|
28
|
+
`)?E.lines[L]=E.lines[L].slice(0,-1):(E.lines.splice(L+1,0,"\"),L++);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:l,hunks:y}}}function Rp(e,t){var n,r,a,l,u,d;if(t||(t=fS),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(p=>p.isGit))throw new 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(p=>Rp(p,t)).join(`
|
|
29
|
+
`)}const f=[];if(e.isGit){if(t=fS,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let p=e.oldFileName,m=e.newFileName;e.isCreate&&p==="/dev/null"?p=m.replace(/^b\//,"a/"):e.isDelete&&m==="/dev/null"&&(m=p.replace(/^a\//,"b/")),f.push("diff --git "+cr(p)+" "+cr(m)),e.isDelete&&f.push("deleted file mode "+((n=e.oldMode)!==null&&n!==void 0?n:"100644")),e.isCreate&&f.push("new file mode "+((r=e.newMode)!==null&&r!==void 0?r:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(f.push("old mode "+e.oldMode),f.push("new mode "+e.newMode)),e.isRename&&(f.push("rename from "+cr(((a=e.oldFileName)!==null&&a!==void 0?a:"").replace(/^a\//,""))),f.push("rename to "+cr(((l=e.newFileName)!==null&&l!==void 0?l:"").replace(/^b\//,"")))),e.isCopy&&(f.push("copy from "+cr(((u=e.oldFileName)!==null&&u!==void 0?u:"").replace(/^a\//,""))),f.push("copy to "+cr(((d=e.newFileName)!==null&&d!==void 0?d:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&f.push("Index: "+e.oldFileName),t.includeUnderline&&f.push("===================================================================");const h=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||h)&&(f.push("--- "+cr(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),f.push("+++ "+cr(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let p=0;p<e.hunks.length;p++){const m=e.hunks[p],y=m.oldLines===0?m.oldStart-1:m.oldStart,b=m.newLines===0?m.newStart-1:m.newStart;f.push("@@ -"+y+","+m.oldLines+" +"+b+","+m.newLines+" @@");for(const S of m.lines)f.push(S)}return f.join(`
|
|
30
|
+
`)+`
|
|
31
|
+
`}function ZD(e,t,n,r,a,l,u){if(typeof u=="function"&&(u={callback:u}),u?.callback){const{callback:d}=u;hS(e,t,n,r,a,l,Object.assign(Object.assign({},u),{callback:f=>{d(f?Rp(f,u.headerOptions):void 0)}}))}else{const d=hS(e,t,n,r,a,l,u);return d?Rp(d,u?.headerOptions):void 0}}function JD(e){const t=e.endsWith(`
|
|
32
|
+
`),n=e.split(`
|
|
33
|
+
`).map(r=>r+`
|
|
34
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}const eM="/dev/null";function lo(e,t,n,r=!1){if(e===null&&t===null)throw new Error("parseDiffFromFile: You must pass oldFile, newFile, or both");const a=e??pS(),l=t??pS(),u=OD(ZD(a.name,l.name,a.contents,l.contents,a.header,l.header,n),{cacheKey:(()=>{const f=e?.cacheKey??e?.name,h=t?.cacheKey??t?.name;return f!=null&&h!=null?f+":"+h:f??h})(),oldFile:a,newFile:l,throwOnError:r});if(u==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");e===null?(u.type="new",u.prevName=void 0):t===null&&(u.type="deleted",u.prevName=void 0);const d=t?.lang??(t===null?e?.lang:void 0);return d!=null&&(u.lang=d),u}function pS(){return{name:eM,contents:""}}function An(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Qn(e){return{type:"text",value:e}}function Ce({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function yc({name:e,width:t=16,height:n=16,properties:r}){return Ce({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[Ce({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function tM(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function fa(e){return Ce({tagName:"div",properties:{"data-gutter":""},children:e})}function $x(e,t,n,r={}){return Ce({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t!=null?[Ce({tagName:"span",properties:{"data-line-number-content":""},children:[Qn(`${t}`)]})]:void 0})}function ln(e,t,n){return Ce({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function nM(){return Ce({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[yc({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function iM(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Tu(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}const rM=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class tl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}tl.prototype.normal={};tl.prototype.property={};tl.prototype.space=void 0;function qx(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new tl(n,r,t)}function Op(e){return e.toLowerCase()}class Yt{constructor(t,n){this.attribute=n,this.property=t}}Yt.prototype.attribute="";Yt.prototype.booleanish=!1;Yt.prototype.boolean=!1;Yt.prototype.commaOrSpaceSeparated=!1;Yt.prototype.commaSeparated=!1;Yt.prototype.defined=!1;Yt.prototype.mustUseProperty=!1;Yt.prototype.number=!1;Yt.prototype.overloadedBoolean=!1;Yt.prototype.property="";Yt.prototype.spaceSeparated=!1;Yt.prototype.space=void 0;let oM=0;const be=yo(),lt=yo(),Dp=yo(),ae=yo(),Ge=yo(),eo=yo(),sn=yo();function yo(){return 2**++oM}const Mp=Object.freeze(Object.defineProperty({__proto__:null,boolean:be,booleanish:lt,commaOrSpaceSeparated:sn,commaSeparated:eo,number:ae,overloadedBoolean:Dp,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),Dh=Object.keys(Mp);class Wm extends Yt{constructor(t,n,r,a){let l=-1;if(super(t,n),mS(this,"space",a),typeof r=="number")for(;++l<Dh.length;){const u=Dh[l];mS(this,Dh[l],(r&Mp[u])===Mp[u])}}}Wm.prototype.defined=!0;function mS(e,t,n){n&&(e[t]=n)}function wa(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const l=new Wm(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Op(r)]=r,n[Op(l.attribute)]=r}return new tl(t,n,e.space)}const Wx=wa({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ge,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:ae,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ge,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:lt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Yx(e,t){return t in e?e[t]:t}function Xx(e,t){return Yx(e,t.toLowerCase())}const aM=wa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eo,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alpha:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Ge,autoFocus:be,autoPlay:be,blocking:Ge,capture:null,charSet:null,checked:be,cite:null,className:Ge,closedBy:null,colorSpace:null,cols:ae,colSpan:ae,command:null,commandFor:null,content:null,contentEditable:lt,controls:be,controlsList:Ge,coords:ae|eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:Dp,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Ge,height:ae,hidden:Dp,high:ae,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:be,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:be,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,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:be,optimum:ae,pattern:null,ping:Ge,placeholder:null,playsInline:be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Ge,required:be,reversed:be,rows:ae,rowSpan:ae,sandbox:Ge,scope:null,scoped:be,seamless:be,selected:be,shadowRootClonable:be,shadowRootCustomElementRegistry:be,shadowRootDelegatesFocus:be,shadowRootMode:null,shadowRootSerializable:be,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:lt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:be,disablePictureInPicture:be,disableRemotePlayback:be,exportParts:eo,part:Ge,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Xx}),sM=wa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sn,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:Ge,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:eo,g2:eo,glyphName:eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yx}),Kx=wa({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()}}),Qx=wa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xx}),Zx=wa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lM=/[A-Z]/g,gS=/-[a-z]/g,uM=/^data[-\w.:]+$/i;function cM(e,t){const n=Op(t);let r=t,a=Yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uM.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(gS,fM);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!gS.test(l)){let u=l.replace(lM,dM);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Wm}return new a(r,t)}function dM(e){return"-"+e.toLowerCase()}function fM(e){return e.charAt(1).toUpperCase()}const hM=qx([Wx,aM,Kx,Qx,Zx],"html"),Jx=qx([Wx,sM,Kx,Qx,Zx],"svg"),vS={}.hasOwnProperty;function pM(e,t){const n=t||{};function r(a,...l){let u=r.invalid;const d=r.handlers;if(a&&vS.call(a,e)){const f=String(a[e]);u=vS.call(d,f)?d[f]:r.unknown}if(u)return u.call(this,a,...l)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const mM=/["&'<>`]/g,gM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vM=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,yM=/[|\\{}()[\]^$+*?.]/g,yS=new WeakMap;function bM(e,t){if(e=e.replace(t.subset?SM(t.subset):mM,r),t.subset||t.escapeOnly)return e;return e.replace(gM,n).replace(vM,r);function n(a,l,u){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,u.charCodeAt(l+2),t)}function r(a,l,u){return t.format(a.charCodeAt(0),u.charCodeAt(l+1),t)}}function SM(e){let t=yS.get(e);return t||(t=_M(e),yS.set(e,t)),t}function _M(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(yM,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const CM=/[\dA-Fa-f]/;function xM(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!CM.test(String.fromCharCode(t))?r:r+";"}const EM=/\d/;function wM(e,t,n){const r="&#"+String(e);return n&&t&&!EM.test(String.fromCharCode(t))?r:r+";"}const kM=["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"],Mh={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},LM=["cent","copy","divide","gt","lt","not","para","times"],eE={}.hasOwnProperty,Np={};let Au;for(Au in Mh)eE.call(Mh,Au)&&(Np[Mh[Au]]=Au);const TM=/[^\dA-Za-z]/;function AM(e,t,n,r){const a=String.fromCharCode(e);if(eE.call(Np,a)){const l=Np[a],u="&"+l;return n&&kM.includes(l)&&!LM.includes(l)&&(!r||t&&t!==61&&TM.test(String.fromCharCode(t)))?u:u+";"}return""}function RM(e,t,n){let r=xM(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=AM(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const l=wM(e,t,n.omitOptionalSemicolons);l.length<r.length&&(r=l)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function ya(e,t){return bM(e,Object.assign({format:RM},t))}const OM=/^>|^->|<!--|-->|--!>|<!-$/g,DM=[">"],MM=["<",">"];function NM(e,t,n,r){return r.settings.bogusComments?"<?"+ya(e.value,Object.assign({},r.settings.characterReferences,{subset:DM}))+">":"<!--"+e.value.replace(OM,a)+"-->";function a(l){return ya(l,Object.assign({},r.settings.characterReferences,{subset:MM}))}}function IM(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function bS(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function zM(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function HM(e){return e.join(" ").trim()}const PM=/[ \t\n\f\r]/g;function Ym(e){return typeof e=="object"?e.type==="text"?SS(e.value):!1:SS(e)}function SS(e){return e.replace(PM,"")===""}const pt=nE(1),tE=nE(-1),UM=[];function nE(e){return t;function t(n,r,a){const l=n?n.children:UM;let u=(r||0)+e,d=l[u];if(!a)for(;d&&Ym(d);)u+=e,d=l[u];return d}}const VM={}.hasOwnProperty;function iE(e){return t;function t(n,r,a){return VM.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const Xm=iE({body:jM,caption:Nh,colgroup:Nh,dd:qM,dt:$M,head:Nh,html:BM,li:GM,optgroup:WM,option:YM,p:FM,rp:_S,rt:_S,tbody:KM,td:CS,tfoot:QM,th:CS,thead:XM,tr:ZM});function Nh(e,t,n){const r=pt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ym(r.value.charAt(0)))}function BM(e,t,n){const r=pt(n,t);return!r||r.type!=="comment"}function jM(e,t,n){const r=pt(n,t);return!r||r.type!=="comment"}function FM(e,t,n){const r=pt(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 GM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function $M(e,t,n){const r=pt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function qM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function _S(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function WM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function YM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function XM(e,t,n){const r=pt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function KM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function QM(e,t,n){return!pt(n,t)}function ZM(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function CS(e,t,n){const r=pt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const JM=iE({body:n2,colgroup:i2,head:t2,html:e2,tbody:r2});function e2(e){const t=pt(e,-1);return!t||t.type!=="comment"}function t2(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function n2(e){const t=pt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ym(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function i2(e,t,n){const r=tE(n,t),a=pt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Xm(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function r2(e,t,n){const r=tE(n,t),a=pt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Xm(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Ru={name:[[`
|
|
35
|
+
\f\r &/=>`.split(""),`
|
|
36
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
37
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
38
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
39
|
+
\f\r &>`.split(""),`\0
|
|
40
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
41
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
42
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function o2(e,t,n,r){const a=r.schema,l=a.space==="svg"?!1:r.settings.omitOptionalTags;let u=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const d=[];let f;a.space==="html"&&e.tagName==="svg"&&(r.schema=Jx);const h=a2(r,e.properties),p=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,p&&(u=!1),(h||!l||!JM(e,t,n))&&(d.push("<",e.tagName,h?" "+h:""),u&&(a.space==="svg"||r.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!r.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&d.push(" "),d.push("/")),d.push(">")),d.push(p),!u&&(!l||!Xm(e,t,n))&&d.push("</"+e.tagName+">"),d.join("")}function a2(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const l=s2(e,a,t[a]);l&&n.push(l)}}for(;++r<n.length;){const l=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&l!=='"'&&l!=="'"&&(n[r]+=" ")}return n.join("")}function s2(e,t,n){const r=cM(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,l=e.settings.allowDangerousCharacters?0:1;let u=e.quote,d;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=ya(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Ru.name[a][l]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?zM:HM)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(d=ya(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ru.unquoted[a][l]}))),d!==n&&(e.settings.quoteSmart&&bS(n,u)>bS(n,e.alternative)&&(u=e.alternative),d=u+ya(n,Object.assign({},e.settings.characterReferences,{subset:(u==="'"?Ru.single:Ru.double)[a][l],attribute:!0}))+u),f+(d&&"="+d))}const l2=["<","&"];function rE(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:ya(e.value,Object.assign({},r.settings.characterReferences,{subset:l2}))}function u2(e,t,n,r){return r.settings.allowDangerousHtml?e.value:rE(e,t,n,r)}function c2(e,t,n,r){return r.all(e)}const d2=pM("type",{invalid:f2,unknown:h2,handlers:{comment:NM,doctype:IM,element:o2,raw:u2,root:c2,text:rE}});function f2(e){throw new Error("Expected node, not `"+e+"`")}function h2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const p2={},m2={},g2=[];function Nt(e,t){const n=t||p2,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:v2,all:y2,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||rM,characterReferences:n.characterReferences||m2,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Jx:hM,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function v2(e,t,n){return d2(e,t,n,this)}function y2(e){const t=[],n=e&&e.children||g2;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}var oE=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),kp(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){const n=!(e===this.selectedRange||Lp(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,a=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!a||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){const r=e!==this.editorActiveLine,a=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!a||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:a,onMergeConflictActionClick:l}=this.options;t==null&&n==null&&r==null&&l==null&&a==null||this.options.onGutterUtilityClick!=null&&Tu(e.composedPath())||(Si(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:r,onTokenEnter:a,onTokenLeave:l,enableGutterUtility:u=!1}=this.options;t==="disabled"&&!u&&n==null&&r==null&&a==null&&l==null||(Si(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Si(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Si(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,r=t.composedPath();Si(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:r});const a=this.resolvePointerTarget(r);Si(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:l,onLineNumberClick:u,onLineEnter:d,onLineLeave:f,onTokenClick:h,onTokenEnter:p,onTokenLeave:m,onHunkExpand:y,onMergeConflictActionClick:b}=this.options;switch(e){case"move":{const S=Ih(a)&&this.hoveredLine?.lineElement===a.lineElement;tc(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,t),this.clearHoveredToken()),tc(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),p?.(this.hoveredToken,t))),S||(this.hoveredLine!=null&&(f?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ih(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),d?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(a==null)break;if(_2(a)&&b!=null){b(a);break}if(S2(a)&&y!=null){y(a.hunkIndex,a.all||t.shiftKey?"both":a.direction,a.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Ih(a))break;tc(a)&&h!=null&&h(this.toTokenEventBaseProps(a),t);const S=this.toEventBaseProps(a);u!=null&&a.numberColumn?u({...S,event:t}):l?.({...S,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:r,onLineNumberClick:a,onLineEnter:l,onLineLeave:u,onTokenClick:d,onTokenEnter:f,onTokenLeave:h,onHunkExpand:p,onMergeConflictActionClick:m,enableGutterUtility:y=!1,enableLineSelection:b=!1,onGutterUtilityClick:S}=this.options,_=S!=null,w=n!=="disabled"||r!=null||a!=null||l!=null||u!=null||d!=null||f!=null||h!=null||p!=null||m!=null||y||b||_;w&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Si(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const L=[];return(t==="both"||t==="click")&&(r!=null&&L.push("onLineClick"),a!=null&&L.push("onLineNumberClick"),p!=null&&L.push("expandable hunk separators"),m!=null&&L.push("merge conflict actions")),L})()),Si(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Si(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!w&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const x=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",E=this.pointerSession.mode==="gutterSelecting";(!b&&x||!_&&E)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,a=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();Tu(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:r}=this;if(r==null)return;const{lineNumber:a,eventSide:l,lineIndex:u}=n;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,r.getAttribute("data-diff-type")==="split");if(d==null)return;const f=d.start<=d.end?u>=d.start:u<=d.end;this.selectionAnchor={lineNumber:f?this.selectedRange.start:this.selectedRange.end,side:f?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,l,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const d={lineNumber:a,side:l};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:l},this.updateSelection(a,l,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{onGutterUtilityClick:t}=this.options;if(t==null)return;const n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),a=n?.top??r;r==null||a==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:a,current:r},this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const n={lineNumber:t.lineNumber,side:t.eventSide};if(iM(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{const{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();const r=this.resolveSelectionPoint(e,{source:"coordinates-first"});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));const a=this.buildSelectedLineRange(n.anchor,n.current);t?.({...a}),this.selectionAnchor=void 0,this.notifySelectionEnd(a),this.notifySelectionCommitted(a),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=Nt(nM());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ls(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),a=this.selectionPointRowIndex(n);if(!(r==null||a==null))return r>a?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const a of r){if(!(a instanceof HTMLElement))continue;const l=this.resolvePointerTarget(Ou(a));if(Ls(l)&&!(this.mode==="diff"&&e.side!=null&&l.side!==e.side))return l}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ls(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ls(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const r=this.pathFromCoordinates(e,n);return r!==void 0?r??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Tu(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ou(e);if(t&&Tu(n))return;const r=x2(e);return r!=null?Ou(r):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=w2(E2(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ou(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=ES(t)?t:ES(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const r=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const l=this.selectionAnchor?.side??t,u=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(u,e,l,t)}Lp(r??void 0,a??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,Hx(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;const r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),new Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];const{children:a}=this.pre;if(a.length>2)throw console.error(a),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const l=[];for(const u of a){const d=u.hasAttribute("data-deletions")?"deletions":u.hasAttribute("data-additions")?"additions":void 0,f=e!=null&&t!=null&&(e.highlightSide==null||d==null||e.highlightSide===d),h=n!=null&&r!=null&&(n.highlightSide==null||d==null||n.highlightSide===d);if(!f&&!h)continue;const[p,m]=u.children;if(!(p instanceof HTMLElement)||!(m instanceof HTMLElement))throw new Error("InteractionManager.renderSelection: missing gutter or content element");if(m.children.length!==p.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");l.push({content:m,gutter:p,renderEditorActiveLine:h,renderSelectedLines:f})}return l}renderSelection=()=>{kp(this.renderSelection);const e=this.getSelectionRenderState();if(this.pre==null)return;const{editorActiveLine:t,selectedLines:n}=e,r=!wS(this.renderedSelectedLinesState,n),a=!wS(this.renderedEditorActiveLineState,t);if(!r&&!a)return;r&&(this.renderedSelectedLinesState=void 0),a&&(this.renderedEditorActiveLineState=void 0);const l=this.pre.getAttribute("data-diff-type")==="split",u=r?this.resolveLineRenderRange(n,l,"selected-lines"):void 0,d=a?this.resolveLineRenderRange(t,l,"editor-active-line"):void 0,f=this.getLineRenderColumns(r?n:void 0,u,a?t:void 0,d),h=n.range==null||f.some(_=>_.renderSelectedLines),p=t.range==null||f.some(_=>_.renderEditorActiveLine);if(r)for(const _ of this.pre.querySelectorAll("[data-selected-line]"))_.removeAttribute("data-selected-line");if(a)for(const _ of this.pre.querySelectorAll("[data-editor-active-line]"))_.removeAttribute("data-editor-active-line");const m=u==null?void 0:Math.min(u.start,u.end),y=u==null?void 0:Math.max(u.start,u.end),b=m===y,S=d?.start;for(const _ of f){const{content:w,gutter:x,renderEditorActiveLine:E,renderSelectedLines:L}=_,A=Math.max(L?y??-1/0:-1/0,E?S??-1/0:-1/0),R=w.children.length;for(let N=0;N<R;N++){const H=w.children[N],U=x.children[N];if(!(H instanceof HTMLElement)||!(U instanceof HTMLElement))continue;const Y=this.parseLineIndex(H,l);if((Y??0)>A)break;if(Y!=null){if(L&&m!=null&&y!=null&&Y>=m&&Y<=y){let te=b?"single":Y===m?"first":Y===y?"last":"";U.setAttribute("data-selected-line",te),n.lineNumberOnly||(H.setAttribute("data-selected-line",te),U.nextSibling instanceof HTMLElement&&H.nextSibling instanceof HTMLElement&&(H.nextSibling.hasAttribute("data-line-annotation")||H.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(b?(te="last",H.setAttribute("data-selected-line","first")):Y===m?te="":Y===y&&H.setAttribute("data-selected-line",""),H.nextSibling.setAttribute("data-selected-line",te),U.nextSibling.setAttribute("data-selected-line",te)))}E&&Y===S&&(U.setAttribute("data-editor-active-line",""),t.lineNumberOnly||H.setAttribute("data-editor-active-line",""))}}}r&&h&&(this.renderedSelectedLinesState=n),a&&p&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:a,tokenText:l}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:a,tokenText:l}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:a,tokenText:l}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n!=null?{side:n}:{},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,a,l,u,d,f,h,p,m;for(const b of e){if(!(b instanceof HTMLElement))continue;if(m==null&&b.hasAttribute("data-merge-conflict-action")){const x=b.getAttribute("data-merge-conflict-action")??void 0,E=b.getAttribute("data-merge-conflict-conflict-index")??void 0,L=E!=null?Number.parseInt(E,10):NaN;C2(x)&&Number.isFinite(L)&&(m={kind:"merge-conflict-action",resolution:x,conflictIndex:L})}if(d==null&&b.hasAttribute("data-char")){d=b;const x=b.getAttribute("data-char");if(x!=null){const E=Number.parseInt(x,10);if(!Number.isNaN(E)){const L=b.textContent??"",A=E+L.length;(L.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(f={tokenElement:d,lineCharStart:E,lineCharEnd:A,tokenText:L});continue}}}const S=u==null?b.getAttribute("data-column-number")??void 0:void 0;if(S!=null){u=b,p=Number.parseInt(S,10),t=!0,n=LS(b),l=b.getAttribute("data-line-index")??void 0;continue}const _=a==null?b.getAttribute("data-line")??void 0:void 0;if(_!=null){a=b,p=Number.parseInt(_,10),n=LS(b),l=b.getAttribute("data-line-index")??void 0;continue}if(h==null&&(b.hasAttribute("data-expand-button")||b.hasAttribute("data-unmodified-lines"))){h={hunkIndex:void 0,direction:b.hasAttribute("data-expand-up")?"up":b.hasAttribute("data-expand-down")?"down":"both",all:b.hasAttribute("data-expand-all-button")};continue}const w=h!=null?b.getAttribute("data-expand-index")??void 0:void 0;if(h!=null&&w!=null){const x=Number.parseInt(w,10);Number.isNaN(x)||(h.hunkIndex=x);continue}if(r==null&&b.hasAttribute("data-code")){r=b;break}}if(m!=null)return m;if(h?.hunkIndex!=null)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction,all:h.all};if(a??=l!=null?xS(r,`[data-line][data-line-index="${l}"]`):void 0,u??=l!=null?xS(r,`[data-column-number][data-line-index="${l}"]`):void 0,r==null||a==null||u==null||n==null||p==null||Number.isNaN(p))return;const y=this.parseLineIndex(a,this.isSplitDiff());return f!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:a,lineNumber:p,numberColumn:t,numberElement:u,side:void 0,splitLineIndex:y,...f}:{kind:"token",lineType:n,lineElement:a,lineNumber:p,numberColumn:t,numberElement:u,side:kS(n,r),splitLineIndex:y,...f}:this.mode==="file"?{kind:"line",lineType:n,lineElement:a,lineNumber:p,numberColumn:t,numberElement:u,side:void 0,splitLineIndex:y}:{kind:"line",lineType:n,lineElement:a,lineNumber:p,numberColumn:t,numberElement:u,side:kS(n,r),splitLineIndex:y}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(r=>Number.parseInt(r,10)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function bc({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:a,onLineEnter:l,onLineLeave:u,onLineNumberClick:d,onTokenClick:f,onTokenEnter:h,onTokenLeave:p,renderGutterUtility:m,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:S,onLineSelected:_,onLineSelectionStart:w,onLineSelectionChange:x,onLineSelectionEnd:E},L,A,R){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:b2({enableGutterUtility:t,renderGutterUtility:m,onGutterUtilityClick:r}),usesCustomGutterUtility:m!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:L,onMergeConflictActionClick:R,onLineClick:a,onLineEnter:l,onLineLeave:u,onLineNumberClick:d,onTokenClick:f,onTokenEnter:h,onTokenLeave:p,__debugPointerEvents:y,enableLineSelection:b,controlledSelection:S,onLineSelected:_,onLineSelectionStart:w,onLineSelectionChange:x,onLineSelectionEnd:E,getLineIndex:A}}function b2({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ls(e){return e!=null&&"kind"in e&&e.kind==="line"}function tc(e){return e!=null&&"kind"in e&&e.kind==="token"}function Ih(e){return Ls(e)||tc(e)}function S2(e){return"type"in e&&e.type==="line-info"}function _2(e){return"kind"in e&&e.kind==="merge-conflict-action"}function C2(e){return e==="current"||e==="incoming"||e==="both"}function xS(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ou(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function x2(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute("data-line")||r.hasAttribute("data-column-number"))?r:void 0}function E2(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function w2(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function ES(e){return e!=null&&typeof e.elementFromPoint=="function"}function k2(e,t){return e===t||Lp(e??void 0,t??void 0)}function wS(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&k2(e?.range??null,t.range)}function kS(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function LS(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Si(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)}var aE=class Ei{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=Ei.resizeObserver??new ResizeObserver(Ei.handleSharedResizeEntries);return Ei.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const r of t){const a=Ei.managersByElement.get(r.target);if(a==null)continue;const l=n.get(a);l==null?n.set(a,[r]):l.push(r)}for(const[r,a]of n)r.handleResizeEntries(a)}observedNodes=new Map;setup(t,{disableAnnotations:n,columnVariables:r="apply"}){const a=new Set,l=r==="apply";let u=0;const d=new Map(this.observedNodes);this.observedNodes.clear();for(const f of t.children){if(u===2)break;const h=(()=>{if(f instanceof HTMLElement&&f.tagName==="CODE")return f})();if(h==null)continue;u++;let p=d.get(h);if(p!=null&&p.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=h.firstElementChild;m instanceof HTMLElement||(m=null),p!=null?(this.observedNodes.set(h,p),d.delete(h),p.numberElement!==m?(p.numberElement!=null&&(this.unobserve(p.numberElement),d.delete(p.numberElement)),m!=null&&(this.observe(m),d.delete(m),this.observedNodes.set(m,p)),p.numberElement=m,p.numberWidth=0):p.numberElement!=null?(d.delete(p.numberElement),this.observedNodes.set(p.numberElement,p)):p.numberWidth=0,A2(p,l)):(p={type:"code",codeElement:h,numberElement:m,codeWidth:"auto",numberWidth:0,applyColumnVariables:l},this.observedNodes.set(h,p),this.observe(h),m!=null&&(this.observedNodes.set(m,p),this.observe(m)))}if(u>1&&!n){const f=t.querySelectorAll('[data-line-annotation*=","]'),h=new Map;for(const p of f){if(!(p instanceof HTMLElement))continue;const m=p.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:p});continue}let y=h.get(m);y==null&&(y=[],h.set(m,y)),y.push(p)}for(const[p,m]of h){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",p,m);continue}const[y,b]=m,S=y.firstElementChild,_=b.firstElementChild;if(!(y instanceof HTMLElement)||!(b instanceof HTMLElement)||!(S instanceof HTMLElement)||!(_ instanceof HTMLElement))continue;let w=d.get(S);if(w!=null){this.observedNodes.set(S,w),this.observedNodes.set(_,w),d.delete(S),d.delete(_);continue}const x=S.getBoundingClientRect().height,E=_.getBoundingClientRect().height;w={type:"annotations",column1:{container:y,child:S,childHeight:x},column2:{container:b,child:_,childHeight:E},currentHeight:"auto"},a.add({child1:S,child2:_,item:w,newHeight:Math.max(x,E)})}for(const p of a)this.applyNewHeight(p.item,p.newHeight),this.observedNodes.set(p.child1,p.item),this.observedNodes.set(p.child2,p.item),this.observe(p.child1),this.observe(p.child2);a.clear()}for(const[f,h]of d)this.unobserve(f),h.type==="code"?R2(h):O2(h);d.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=Ei,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),Ei.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:r}=Ei,a=n.get(t);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),Ei.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,r=new Set;for(const a of t){const{target:l,borderBoxSize:u,contentBoxSize:d}=a;if(!(l instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const f=this.observedNodes.get(l);if(f==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(f.type==="annotations"){const h=(()=>{if(l===f.column1.child)return f.column1;if(l===f.column2.child)return f.column2})();if(h==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:f,target:l});continue}h.childHeight=u[0].blockSize,r.add(f)}else if(f.type==="code"){const h=n.get(f)??{},p=d[0].inlineSize;l===f.codeElement?h.codeInlineSize=p:l===f.numberElement&&(h.numberInlineSize=p),n.set(f,h)}}this.applyAnnotationUpdates(r),r.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,r]of t){const a=r.codeInlineSize!=null?L2(r.codeInlineSize):n.codeWidth,l=r.numberInlineSize!=null?T2(r.numberInlineSize):n.numberWidth,u=a!==n.codeWidth,d=l!==n.numberWidth;!u&&!d||(n.codeWidth=a,n.numberWidth=l,n.applyColumnVariables&&sE(n,{codeWidthChanged:u,numberWidthChanged:d}))}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function L2(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function T2(e){return Math.max(Math.ceil(e),0)}function A2(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?sE(e,{codeWidthChanged:!0,numberWidthChanged:!0}):lE(e))}function sE(e,{codeWidthChanged:t,numberWidthChanged:n}){const{codeElement:r,codeWidth:a,numberWidth:l}=e;if(t&&r.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),n&&r.style.setProperty("--diffs-column-number-width",`${l===0?"auto":`${l}px`}`),t||n&&a!=="auto"){const u=typeof a=="number"?Math.max(a-l,0):0;r.style.setProperty("--diffs-column-content-width",`${u>0?`${u}px`:"auto"}`)}}function lE(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}function R2(e){e.codeElement.isConnected&&lE(e)}function O2(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const uo=new Map,zh=new Map,D2=new Map,Ip=new Set;function Sc(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!Ip.has(t))return!1;return!0}function TS(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(Ip.has(n.name))continue;let r=uo.get(n.name);r==null&&(r=n,uo.set(n.name,r)),Ip.add(r.name),t.loadLanguageSync(r.data)}}function uE(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var zp=Object.defineProperty,M2=Object.getOwnPropertyDescriptor,N2=Object.getOwnPropertyNames,I2=Object.prototype.hasOwnProperty,z2=(e,t)=>{let n={};for(var r in e)zp(n,r,{get:e[r],enumerable:!0});return zp(n,Symbol.toStringTag,{value:"Module"}),n},H2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=N2(t),l=0,u=a.length,d;l<u;l++)d=a[l],!I2.call(e,d)&&d!==n&&zp(e,d,{get:(f=>t[f]).bind(null,d),enumerable:!(r=M2(t,d))||r.enumerable});return e},P2=(e,t,n)=>(H2(e,t,"default"),n);const U2="modulepreload",V2=function(e){return"/"+e},AS={},k=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};var u=h;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");a=h(n.map(p=>{if(p=V2(p),p in AS)return;AS[p]=!0;const m=p.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":U2,m||(b.as="script"),b.crossOrigin="",b.href=p,f&&b.setAttribute("nonce",f),document.head.appendChild(b),m)return new Promise((S,_)=>{b.addEventListener("load",S),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})},cE=[{id:"abap",name:"ABAP",import:(()=>k(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>k(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>k(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>k(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>k(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>k(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>k(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>k(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>k(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>k(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>k(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>k(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>k(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>k(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>k(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>k(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>k(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>k(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>k(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>k(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>k(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>k(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>k(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>k(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>k(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>k(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>k(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>k(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>k(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>k(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>k(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>k(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>k(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>k(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>k(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>k(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>k(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>k(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>k(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>k(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>k(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>k(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>k(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>k(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>k(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>k(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>k(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>k(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>k(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>k(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>k(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>k(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>k(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>k(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>k(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>k(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>k(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>k(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>k(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>k(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>k(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>k(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>k(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>k(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>k(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>k(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>k(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>k(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>k(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>k(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>k(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>k(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>k(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>k(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>k(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>k(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>k(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>k(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>k(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>k(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>k(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>k(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>k(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>k(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>k(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>k(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>k(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>k(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>k(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>k(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>k(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>k(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>k(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>k(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>k(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>k(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>k(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>k(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>k(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>k(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>k(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>k(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>k(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>k(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>k(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>k(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>k(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>k(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>k(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>k(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>k(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>k(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>k(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>k(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>k(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>k(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>k(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>k(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>k(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>k(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>k(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>k(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>k(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>k(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>k(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>k(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>k(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>k(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>k(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>k(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>k(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>k(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>k(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>k(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>k(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>k(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>k(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>k(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>k(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>k(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>k(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>k(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>k(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>k(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>k(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>k(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>k(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>k(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>k(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>k(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>k(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>k(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>k(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>k(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>k(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>k(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>k(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>k(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>k(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>k(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>k(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>k(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>k(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>k(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>k(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>k(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>k(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>k(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>k(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>k(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>k(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>k(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>k(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>k(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>k(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>k(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>k(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>k(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>k(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>k(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>k(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>k(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>k(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>k(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>k(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>k(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>k(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>k(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>k(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>k(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>k(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>k(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>k(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>k(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>k(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>k(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>k(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>k(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>k(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>k(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>k(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>k(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>k(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>k(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>k(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>k(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>k(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>k(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>k(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>k(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>k(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>k(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>k(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>k(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>k(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>k(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>k(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>k(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>k(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>k(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>k(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>k(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>k(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>k(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>k(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>k(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>k(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>k(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>k(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>k(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>k(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>k(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>k(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>k(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>k(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>k(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>k(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>k(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>k(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>k(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>k(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>k(()=>import("./zig-VOosw3JB.js"),[]))}],B2=Object.fromEntries(cE.map(e=>[e.id,e.import])),j2=Object.fromEntries(cE.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Hp={...B2,...j2},F2=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>k(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>k(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>k(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>k(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>k(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>k(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>k(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>k(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>k(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>k(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>k(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>k(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>k(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>k(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>k(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>k(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>k(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>k(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>k(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>k(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>k(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>k(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>k(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>k(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>k(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>k(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>k(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],G2=Object.fromEntries(F2.map(e=>[e.id,e.import]));var Km=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function $2(){return 2147483648}function q2(){return typeof performance<"u"?performance.now():Date.now()}const W2=(e,t)=>e+(t-e%t)%t;async function Y2(e){let t,n;const r={};function a(b){n=b,r.HEAPU8=new Uint8Array(b),r.HEAPU32=new Uint32Array(b)}function l(b,S,_){r.HEAPU8.copyWithin(b,S,S+_)}function u(b){try{return t.grow(b-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function d(b){const S=r.HEAPU8.length;b=b>>>0;const _=$2();if(b>_)return!1;for(let w=1;w<=4;w*=2){let x=S*(1+.2/w);x=Math.min(x,b+100663296);const E=Math.min(_,W2(Math.max(b,x),65536));if(u(E))return!0}return!1}const f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(b,S,_=1024){const w=S+_;let x=S;for(;b[x]&&!(x>=w);)++x;if(x-S>16&&b.buffer&&f)return f.decode(b.subarray(S,x));let E="";for(;S<x;){let L=b[S++];if(!(L&128)){E+=String.fromCharCode(L);continue}const A=b[S++]&63;if((L&224)===192){E+=String.fromCharCode((L&31)<<6|A);continue}const R=b[S++]&63;if((L&240)===224?L=(L&15)<<12|A<<6|R:L=(L&7)<<18|A<<12|R<<6|b[S++]&63,L<65536)E+=String.fromCharCode(L);else{const N=L-65536;E+=String.fromCharCode(55296|N>>10,56320|N&1023)}}return E}function p(b,S){return b?h(r.HEAPU8,b,S):""}const m={emscripten_get_now:q2,emscripten_memcpy_big:l,emscripten_resize_heap:d,fd_write:()=>0};async function y(){const S=await e({env:m,wasi_snapshot_preview1:m});t=S.memory,a(t.buffer),Object.assign(r,S),r.UTF8ToString=p}return await y(),r}var X2=Object.defineProperty,K2=(e,t,n)=>t in e?X2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ft=(e,t,n)=>K2(e,typeof t!="symbol"?t+"":t,n);let bt=null;function Q2(e){throw new Km(e.UTF8ToString(e.getLastOnigError()))}class qc{constructor(t){ft(this,"utf16Length"),ft(this,"utf8Length"),ft(this,"utf16Value"),ft(this,"utf8Value"),ft(this,"utf16OffsetToUtf8"),ft(this,"utf8OffsetToUtf16");const n=t.length,r=qc._utf8ByteLength(t),a=r!==n,l=a?new Uint32Array(n+1):null;a&&(l[n]=r);const u=a?new Uint32Array(r+1):null;a&&(u[r]=n);const d=new Uint8Array(r);let f=0;for(let h=0;h<n;h++){const p=t.charCodeAt(h);let m=p,y=!1;if(p>=55296&&p<=56319&&h+1<n){const b=t.charCodeAt(h+1);b>=56320&&b<=57343&&(m=(p-55296<<10)+65536|b-56320,y=!0)}a&&(l[h]=f,y&&(l[h+1]=f),m<=127?u[f+0]=h:m<=2047?(u[f+0]=h,u[f+1]=h):m<=65535?(u[f+0]=h,u[f+1]=h,u[f+2]=h):(u[f+0]=h,u[f+1]=h,u[f+2]=h,u[f+3]=h)),m<=127?d[f++]=m:m<=2047?(d[f++]=192|(m&1984)>>>6,d[f++]=128|(m&63)>>>0):m<=65535?(d[f++]=224|(m&61440)>>>12,d[f++]=128|(m&4032)>>>6,d[f++]=128|(m&63)>>>0):(d[f++]=240|(m&1835008)>>>18,d[f++]=128|(m&258048)>>>12,d[f++]=128|(m&4032)>>>6,d[f++]=128|(m&63)>>>0),y&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=d,this.utf16OffsetToUtf8=l,this.utf8OffsetToUtf16=u}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const l=t.charCodeAt(r);let u=l,d=!1;if(l>=55296&&l<=56319&&r+1<a){const f=t.charCodeAt(r+1);f>=56320&&f<=57343&&(u=(l-55296<<10)+65536|f-56320,d=!0)}u<=127?n+=1:u<=2047?n+=2:u<=65535?n+=3:n+=4,d&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Wc=class jn{constructor(t){if(ft(this,"id",++jn.LAST_ID),ft(this,"_onigBinding"),ft(this,"content"),ft(this,"utf16Length"),ft(this,"utf8Length"),ft(this,"utf16OffsetToUtf8"),ft(this,"utf8OffsetToUtf16"),ft(this,"ptr"),!bt)throw new Km("Must invoke loadWasm first.");this._onigBinding=bt,this.content=t;const n=new qc(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!jn._sharedPtrInUse?(jn._sharedPtr||(jn._sharedPtr=bt.omalloc(1e4)),jn._sharedPtrInUse=!0,bt.HEAPU8.set(n.utf8Value,jn._sharedPtr),this.ptr=jn._sharedPtr):this.ptr=n.createString(bt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===jn._sharedPtr?jn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ft(Wc,"LAST_ID",0);ft(Wc,"_sharedPtr",0);ft(Wc,"_sharedPtrInUse",!1);let dE=Wc;class Z2{constructor(t){if(ft(this,"_onigBinding"),ft(this,"_ptr"),!bt)throw new Km("Must invoke loadWasm first.");const n=[],r=[];for(let d=0,f=t.length;d<f;d++){const h=new qc(t[d]);n[d]=h.createString(bt),r[d]=h.utf8Length}const a=bt.omalloc(4*t.length);bt.HEAPU32.set(n,a/4);const l=bt.omalloc(4*t.length);bt.HEAPU32.set(r,l/4);const u=bt.createOnigScanner(a,l,t.length);for(let d=0,f=t.length;d<f;d++)bt.ofree(n[d]);bt.ofree(l),bt.ofree(a),u===0&&Q2(bt),this._onigBinding=bt,this._ptr=u}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new dE(t);const l=this._findNextMatchSync(t,n,!1,a);return t.dispose(),l}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const l=this._onigBinding,u=l.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(u===0)return null;const d=l.HEAPU32;let f=u/4;const h=d[f++],p=d[f++],m=[];for(let y=0;y<p;y++){const b=t.convertUtf8OffsetToUtf16(d[f++]),S=t.convertUtf8OffsetToUtf16(d[f++]);m[y]={start:b,end:S,length:S-b}}return{index:h,captureIndices:m}}}function J2(e){return typeof e.instantiator=="function"}function eN(e){return typeof e.default=="function"}function tN(e){return typeof e.data<"u"}function nN(e){return typeof Response<"u"&&e instanceof Response}function iN(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}let Du;function fE(e){if(Du)return Du;async function t(){bt=await Y2(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),J2(r)?r=await r.instantiator(n):eN(r)?r=await r.default(n):(tN(r)&&(r=r.data),nN(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await rN(r)(n):r=await oN(r)(n):iN(r)?r=await Hh(r)(n):r instanceof WebAssembly.Module?r=await Hh(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Hh(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Du=t(),Du}function Hh(e){return t=>WebAssembly.instantiate(e,t)}function rN(e){return t=>WebAssembly.instantiateStreaming(e,t)}function oN(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let hE;function aN(e){hE=e}function sN(){return hE}async function pE(e){return e&&await fE(e),{createScanner(t){return new Z2(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new dE(t)}}}const lN=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:pE,getDefaultWasmLoader:sN,loadWasm:fE,setDefaultWasmLoader:aN},Symbol.toStringTag,{value:"Module"}));var mE=z2({});P2(mE,lN);var $e=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function uN(e){return Qm(e)}function Qm(e){return Array.isArray(e)?cN(e):e instanceof RegExp?e:typeof e=="object"?dN(e):e}function cN(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Qm(e[n]);return t}function dN(e){let t={};for(let n in e)t[n]=Qm(e[n]);return t}function gE(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function vE(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?vE(e.substring(0,e.length-1)):e.substr(~t+1)}var Ph=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Mu=class{static hasCaptures(e){return e===null?!1:(Ph.lastIndex=0,Ph.test(e))}static replaceCaptures(e,t,n){return e.replace(Ph,(r,a,l,u)=>{let d=n[parseInt(a||l,10)];if(d){let f=t.substring(d.start,d.end);for(;f[0]===".";)f=f.substring(1);switch(u){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return r})}};function yE(e,t){return e<t?-1:e>t?1:0}function bE(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let l=yE(e[a],t[a]);if(l!==0)return l}return 0}return n-r}function RS(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 SE(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var _E=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},_c=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(pN(e),t)}static createFromParsedTheme(e,t){return gN(e,t)}_cachedMatchRoot=new _E(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>fN(e.parent,a.parentScopes));return r?new CE(r.fontStyle,r.foreground,r.background):null}},Uh=class nc{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new nc(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new nc(n,t[r]);return n}push(t){return new nc(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function fN(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!hN(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function hN(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var CE=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function pN(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,l=t.length;a<l;a++){let u=t[a];if(!u.settings)continue;let d;if(typeof u.scope=="string"){let m=u.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),d=m.split(",")}else Array.isArray(u.scope)?d=u.scope:d=[""];let f=-1;if(typeof u.settings.fontStyle=="string"){f=0;let m=u.settings.fontStyle.split(" ");for(let y=0,b=m.length;y<b;y++)switch(m[y]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof u.settings.foreground=="string"&&RS(u.settings.foreground)&&(h=u.settings.foreground);let p=null;typeof u.settings.background=="string"&&RS(u.settings.background)&&(p=u.settings.background);for(let m=0,y=d.length;m<y;m++){let S=d[m].trim().split(" "),_=S[S.length-1],w=null;S.length>1&&(w=S.slice(0,S.length-1),w.reverse()),n[r++]=new mN(_,w,a,f,h,p)}}return n}var mN=class{constructor(e,t,n,r,a,l){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=l}},Ot=(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))(Ot||{});function gN(e,t){e.sort((f,h)=>{let p=yE(f.scope,h.scope);return p!==0||(p=bE(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(r=f.foreground),f.background!==null&&(a=f.background)}let l=new vN(t),u=new CE(n,l.getId(r),l.getId(a)),d=new bN(new Pp(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];d.insert(0,p.scope,p.parentScopes,p.fontStyle,l.getId(p.foreground),l.getId(p.background))}return new _c(l,u,d)}var vN=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 new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},yN=Object.freeze([]),Pp=class xE{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,l){this.scopeDepth=t,this.parentScopes=n||yN,this.fontStyle=r,this.foreground=a,this.background=l}clone(){return new xE(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},bN=class Up{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const l=n.parentScopes[a].length-t.parentScopes[r].length;if(l!==0)return l;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,l;if(r===-1?(a=t,l=""):(a=t.substring(0,r),l=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(l)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Up._cmpBySpecificity),n}insert(t,n,r,a,l,u){if(n===""){this._doInsertHere(t,r,a,l,u);return}let d=n.indexOf("."),f,h;d===-1?(f=n,h=""):(f=n.substring(0,d),h=n.substring(d+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new Up(this._mainRule.clone(),Pp.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,r,a,l,u)}_doInsertHere(t,n,r,a,l){if(n===null){this._mainRule.acceptOverwrite(t,r,a,l);return}for(let u=0,d=this._rulesWithParentScopes.length;u<d;u++){let f=this._rulesWithParentScopes[u];if(bE(f.parentScopes,n)===0){f.acceptOverwrite(t,r,a,l);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),l===0&&(l=this._mainRule.background),this._rulesWithParentScopes.push(new Pp(t,n,r,a,l))}},to=class _n{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=_n.getLanguageId(t),r=_n.getTokenType(t),a=_n.getFontStyle(t),l=_n.getForeground(t),u=_n.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:l,background:u})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,l,u,d){let f=_n.getLanguageId(t),h=_n.getTokenType(t),p=_n.containsBalancedBrackets(t)?1:0,m=_n.getFontStyle(t),y=_n.getForeground(t),b=_n.getBackground(t);return n!==0&&(f=n),r!==8&&(h=r),a!==null&&(p=a?1:0),l!==-1&&(m=l),u!==0&&(y=u),d!==0&&(b=d),(f<<0|h<<8|p<<10|m<<11|y<<15|b<<24)>>>0}};function Cc(e,t){const n=[],r=SN(e);let a=r.next();for(;a!==null;){let f=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let h=u();if(n.push({matcher:h,priority:f}),a!==",")break;a=r.next()}return n;function l(){if(a==="-"){a=r.next();const f=l();return h=>!!f&&!f(h)}if(a==="("){a=r.next();const f=d();return a===")"&&(a=r.next()),f}if(OS(a)){const f=[];do f.push(a),a=r.next();while(OS(a));return h=>t(f,h)}return null}function u(){const f=[];let h=l();for(;h;)f.push(h),h=l();return p=>f.every(m=>m(p))}function d(){const f=[];let h=u();for(;h&&(f.push(h),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");h=u()}return p=>f.some(m=>m(p))}}function OS(e){return!!e&&!!e.match(/[\w\.:]+/)}function SN(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function EE(e){typeof e.dispose=="function"&&e.dispose()}var Vs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},_N=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},CN=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xN=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Vs(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new CN;for(const n of e)EN(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Vs){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function EN(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const l=n.lookup(t);e instanceof Vs?ic({baseGrammar:l,selfGrammar:a},r):Vp(e.ruleName,{baseGrammar:l,selfGrammar:a,repository:a.repository},r);const u=n.injections(e.scopeName);if(u)for(const d of u)r.add(new Vs(d))}function Vp(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];xc([r],t,n)}}function ic(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&xc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&xc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function xc(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?gE({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&xc(r.patterns,{...t,repository:a},n);const l=r.include;if(!l)continue;const u=wE(l);switch(u.kind){case 0:ic({...t,selfGrammar:t.baseGrammar},n);break;case 1:ic(t,n);break;case 2:Vp(u.ruleName,{...t,repository:a},n);break;case 3:case 4:const d=u.scopeName===t.selfGrammar.scopeName?t.selfGrammar:u.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(d){const f={baseGrammar:t.baseGrammar,selfGrammar:d,repository:a};u.kind===4?Vp(u.ruleName,f,n):ic(f,n)}else u.kind===4?n.add(new _N(u.scopeName,u.ruleName)):n.add(new Vs(u.scopeName));break}}}var wN=class{kind=0},kN=class{kind=1},LN=class{constructor(e){this.ruleName=e}kind=2},TN=class{constructor(e){this.scopeName=e}kind=3},AN=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function wE(e){if(e==="$base")return new wN;if(e==="$self")return new kN;const t=e.indexOf("#");if(t===-1)return new TN(e);if(t===0)return new LN(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new AN(n,r)}}var RN=/\\(\d+)/,DS=/\\(\d+)/g,ON=-1,kE=-2;var nl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Mu.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Mu.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${vE(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:Mu.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Mu.replaceCaptures(this._contentName,e,t)}},DN=class extends nl{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},MN=class extends nl{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Bs(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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 js,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},MS=class extends nl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const 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 js,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bp=class extends nl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,l,u,d,f,h){super(e,t,n,r),this._begin=new Bs(a,this.id),this.beginCaptures=l,this._end=new Bs(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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 js;for(const n of this.patterns)e.getRule(n).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}},Ec=class extends nl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,l,u,d,f){super(e,t,n,r),this._begin=new Bs(a,this.id),this.beginCaptures=l,this.whileCaptures=d,this._while=new Bs(u,kE),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(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 js;for(const 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 js,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},LE=class At{static createCaptureRule(t,n,r,a,l){return t.registerRule(u=>new DN(n,u,r,a,l))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new MN(t.$vscodeTextmateLocation,t.id,t.name,t.match,At._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=gE({},r,t.repository));let l=t.patterns;return typeof l>"u"&&t.include&&(l=[{include:t.include}]),new MS(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,At._compilePatterns(l,n,r))}return t.while?new Ec(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,At._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,At._compileCaptures(t.whileCaptures||t.captures,n,r),At._compilePatterns(t.patterns,n,r)):new Bp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,At._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,At._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,At._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let l=0;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const d=parseInt(u,10);d>l&&(l=d)}for(let u=0;u<=l;u++)a[u]=null;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const d=parseInt(u,10);let f=0;t[u].patterns&&(f=At.getCompiledRuleId(t[u],n,r)),a[d]=At.createCaptureRule(n,t[u].$vscodeTextmateLocation,t[u].name,t[u].contentName,f)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let l=0,u=t.length;l<u;l++){const d=t[l];let f=-1;if(d.include){const h=wE(d.include);switch(h.kind){case 0:case 1:f=At.getCompiledRuleId(r[d.include],n,r);break;case 2:let p=r[h.ruleName];p&&(f=At.getCompiledRuleId(p,n,r));break;case 3:case 4:const m=h.scopeName,y=h.kind===4?h.ruleName:null,b=n.getExternalGrammar(m,r);if(b)if(y){let S=b.repository[y];S&&(f=At.getCompiledRuleId(S,n,b.repository))}else f=At.getCompiledRuleId(b.repository.$self,n,b.repository);break}}else f=At.getCompiledRuleId(d,n,r);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof MS||h instanceof Bp||h instanceof Ec)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;a.push(f)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Bs=class TE{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let a=0,l=[],u=!1;for(let d=0;d<r;d++)if(t.charAt(d)==="\\"&&d+1<r){const h=t.charAt(d+1);h==="z"?(l.push(t.substring(a,d)),l.push("$(?!\\n)(?<!\\n)"),a=d+2):(h==="A"||h==="G")&&(u=!0),d++}this.hasAnchor=u,a===0?this.source=t:(l.push(t.substring(a,r)),this.source=l.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=RN.test(this.source):this.hasBackReferences=!1}clone(){return new TE(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return DS.lastIndex=0,this.source.replace(DS,(a,l)=>SE(r[parseInt(l,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],l,u,d,f;for(l=0,u=this.source.length;l<u;l++)d=this.source.charAt(l),t[l]=d,n[l]=d,r[l]=d,a[l]=d,d==="\\"&&l+1<u&&(f=this.source.charAt(l+1),f==="A"?(t[l+1]="",n[l+1]="",r[l+1]="A",a[l+1]="A"):f==="G"?(t[l+1]="",n[l+1]="G",r[l+1]="",a[l+1]="G"):(t[l+1]=f,n[l+1]=f,r[l+1]=f,a[l+1]=f),l++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},js=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(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new NS(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new NS(e,r,this._items.map(a=>a.ruleId))}},NS=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(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
43
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Vh=class{constructor(e,t){this.languageId=e,this.tokenType=t}},NN=class jp{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Vh(t,8),this._embeddedLanguagesMatcher=new IN(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?jp._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Vh(0,0);_getBasicScopeAttributes=new _E(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Vh(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(jp.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},IN=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>SE(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},IS=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function AE(e,t,n,r,a,l,u,d){const f=t.content.length;let h=!1,p=-1;if(u){const b=zN(e,t,n,r,a,l);a=b.stack,r=b.linePos,n=b.isFirstLine,p=b.anchorPosition}const m=Date.now();for(;!h;){if(d!==0&&Date.now()-m>d)return new IS(a,!0);y()}return new IS(a,!1);function y(){const b=HN(e,t,n,r,a,p);if(!b){l.produce(a,f),h=!0;return}const S=b.captureIndices,_=b.matchedRuleId,w=S&&S.length>0?S[0].end>r:!1;if(_===ON){const x=a.getRule(e);l.produce(a,S[0].start),a=a.withContentNameScopesList(a.nameScopesList),Ts(e,t,n,a,l,x.endCaptures,S),l.produce(a,S[0].end);const E=a;if(a=a.parent,p=E.getAnchorPos(),!w&&E.getEnterPos()===r){a=E,l.produce(a,f),h=!0;return}}else{const x=e.getRule(_);l.produce(a,S[0].start);const E=a,L=x.getName(t.content,S),A=a.contentNameScopesList.pushAttributed(L,e);if(a=a.push(_,r,p,S[0].end===f,null,A,A),x instanceof Bp){const R=x;Ts(e,t,n,a,l,R.beginCaptures,S),l.produce(a,S[0].end),p=S[0].end;const N=R.getContentName(t.content,S),H=A.pushAttributed(N,e);if(a=a.withContentNameScopesList(H),R.endHasBackReferences&&(a=a.withEndRule(R.getEndWithResolvedBackReferences(t.content,S))),!w&&E.hasSameRuleAs(a)){a=a.pop(),l.produce(a,f),h=!0;return}}else if(x instanceof Ec){const R=x;Ts(e,t,n,a,l,R.beginCaptures,S),l.produce(a,S[0].end),p=S[0].end;const N=R.getContentName(t.content,S),H=A.pushAttributed(N,e);if(a=a.withContentNameScopesList(H),R.whileHasBackReferences&&(a=a.withEndRule(R.getWhileWithResolvedBackReferences(t.content,S))),!w&&E.hasSameRuleAs(a)){a=a.pop(),l.produce(a,f),h=!0;return}}else if(Ts(e,t,n,a,l,x.captures,S),l.produce(a,S[0].end),a=a.pop(),!w){a=a.safePop(),l.produce(a,f),h=!0;return}}S[0].end>r&&(r=S[0].end,n=!1)}}function zN(e,t,n,r,a,l){let u=a.beginRuleCapturedEOL?0:-1;const d=[];for(let f=a;f;f=f.pop()){const h=f.getRule(e);h instanceof Ec&&d.push({rule:h,stack:f})}for(let f=d.pop();f;f=d.pop()){const{ruleScanner:h,findOptions:p}=VN(f.rule,e,f.stack.endRule,n,r===u),m=h.findNextMatchSync(t,r,p);if(m){if(m.ruleId!==kE){a=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(l.produce(f.stack,m.captureIndices[0].start),Ts(e,t,n,f.stack,l,f.rule.whileCaptures,m.captureIndices),l.produce(f.stack,m.captureIndices[0].end),u=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{a=f.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:u,isFirstLine:n}}function HN(e,t,n,r,a,l){const u=PN(e,t,n,r,a,l),d=e.getInjections();if(d.length===0)return u;const f=UN(d,e,t,n,r,a,l);if(!f)return u;if(!u)return f;const h=u.captureIndices[0].start,p=f.captureIndices[0].start;return p<h||f.priorityMatch&&p===h?f:u}function PN(e,t,n,r,a,l){const u=a.getRule(e),{ruleScanner:d,findOptions:f}=RE(u,e,a.endRule,n,r===l),h=d.findNextMatchSync(t,r,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function UN(e,t,n,r,a,l,u){let d=Number.MAX_VALUE,f=null,h,p=0;const m=l.contentNameScopesList.getScopeNames();for(let y=0,b=e.length;y<b;y++){const S=e[y];if(!S.matcher(m))continue;const _=t.getRule(S.ruleId),{ruleScanner:w,findOptions:x}=RE(_,t,null,r,a===u),E=w.findNextMatchSync(n,a,x);if(!E)continue;const L=E.captureIndices[0].start;if(!(L>=d)&&(d=L,f=E.captureIndices,h=E.ruleId,p=S.priority,d===a))break}return f?{priorityMatch:p===-1,captureIndices:f,matchedRuleId:h}:null}function RE(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function VN(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Ts(e,t,n,r,a,l,u){if(l.length===0)return;const d=t.content,f=Math.min(l.length,u.length),h=[],p=u[0].end;for(let m=0;m<f;m++){const y=l[m];if(y===null)continue;const b=u[m];if(b.length===0)continue;if(b.start>p)break;for(;h.length>0&&h[h.length-1].endPos<=b.start;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?a.produceFromScopes(h[h.length-1].scopes,b.start):a.produce(r,b.start),y.retokenizeCapturedWithRuleId){const _=y.getName(d,u),w=r.contentNameScopesList.pushAttributed(_,e),x=y.getContentName(d,u),E=w.pushAttributed(x,e),L=r.push(y.retokenizeCapturedWithRuleId,b.start,-1,!1,null,w,E),A=e.createOnigString(d.substring(0,b.end));AE(e,A,n&&b.start===0,b.start,L,a,!1,0),EE(A);continue}const S=y.getName(d,u);if(S!==null){const w=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(S,e);h.push(new BN(w,b.end))}}for(;h.length>0;)a.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var BN=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function jN(e,t,n,r,a,l,u,d){return new GN(e,t,n,r,a,l,u,d)}function zS(e,t,n,r,a){const l=Cc(t,wc),u=LE.getCompiledRuleId(n,r,a.repository);for(const d of l)e.push({debugSelector:t,matcher:d.matcher,ruleId:u,grammar:a,priority:d.priority})}function wc(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(FN(t[a],r))return n=a+1,!0;return!1})}function FN(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var GN=class{constructor(e,t,n,r,a,l,u,d){if(this._rootScopeName=e,this.balancedBracketSelectors=l,this._onigLib=d,this._basicScopeAttributesProvider=new NN(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=u,this._grammar=HS(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const f of Object.keys(a)){const h=Cc(f,wc);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:a[f]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let u in a)zS(t,u,a[u],this,r);const l=this._grammarRepository.injections(n);l&&l.forEach(u=>{const d=this.getExternalGrammar(u);if(d){const f=d.injectionSelector;f&&zS(t,f,d,this,d)}})}return t.sort((a,l)=>a.priority-l.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=HS(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=LE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===Fp.NULL){a=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=to.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),y=this.getRule(this._rootId).getName(null,null);let b;y?b=Ds.createRootAndLookUpScopeName(y,m,this):b=Ds.createRoot("unknown",m),t=new Fp(null,this._rootId,-1,-1,!1,null,b,b)}else a=!1,t.reset();e=e+`
|
|
44
|
+
`;const l=this.createOnigString(e),u=l.content.length,d=new qN(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=AE(this,l,a,0,t,d,!0,r);return EE(l),{lineLength:u,lineTokens:d,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function HS(e,t){return e=uN(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 Ds=class Fn{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(const l of n)a=Uh.push(a,l.scopeNames),r=new Fn(r,a,l.encodedTokenAttributes);return r}static createRoot(t,n){return new Fn(null,new Uh(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),l=new Uh(null,t),u=r.themeProvider.themeMatch(l),d=Fn.mergeAttributes(n,a,u);return new Fn(null,l,d)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Fn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,l=0,u=0;return r!==null&&(a=r.fontStyle,l=r.foregroundId,u=r.backgroundId),to.set(t,n.languageId,n.tokenType,null,a,l,u)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Fn._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const l of r)a=Fn._pushAttributed(a,l,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),l=t.scopePath.push(n),u=r.themeProvider.themeMatch(l),d=Fn.mergeAttributes(t.tokenAttributes,a,u);return new Fn(t,l,d)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Fp=class Wr{constructor(t,n,r,a,l,u,d,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=l,this.endRule=u,this.nameScopesList=d,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Wr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Wr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ds.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Wr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,l,u,d){return new Wr(this,t,n,r,a,l,u,d)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Wr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId: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){const r=Ds.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Wr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ds.fromExtension(r,n.contentNameScopesList))}},$N=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Cc(n,wc).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Cc(n,wc).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},qN=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 r=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(r=to.set(r,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(l))}if(a&&(r=to.set(r,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const 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);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},WN=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let l=this._rawGrammars.get(e);if(!l)return null;this._grammars.set(e,jN(e,l,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},YN=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new WN(_c.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(_c.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new $N(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,l){const u=new xN(this._syncRegistry,t);for(;u.Q.length>0;)u.Q.map(d=>this._loadSingleGrammar(d.scopeName)),u.processQueue();return this._grammarForScopeName(t,n,r,a,l)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,l=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,l)}},Gp=Fp.NULL;function kc(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,l]of Object.entries(t?.colorReplacements||{}))typeof l=="string"?n[a]=l:a===r&&Object.assign(n,l);return n}function Sr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function XN(e){return Array.isArray(e)?e:[e]}async function OE(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Yc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function DE(e){return e==="ansi"||Yc(e)}function Xc(e){return e==="none"}function ME(e){return Xc(e)}const KN=/(\r?\n)/g;function Kc(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(KN);let r=0;const a=[];for(let l=0;l<n.length;l+=2){const u=t?n[l]+(n[l+1]||""):n[l];a.push([u,r]),r+=n[l].length,r+=n[l+1]?.length||0}return a}const PS={light:"#333333",dark:"#bbbbbb"},US={light:"#fffffe",dark:"#1e1e1e"},VS="__shiki_resolved";function Qc(e){if(e?.[VS])return e;const 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){const d=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;d?.settings?.foreground&&(r=d.settings.foreground),d?.settings?.background&&(n=d.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?PS.light:PS.dark),n||(n=t.type==="light"?US.light:US.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const l=new Map;function u(d){if(l.has(d))return l.get(d);a+=1;const f=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?u(d):(l.set(d,f),f)}t.settings=t.settings.map(d=>{const f=d.settings?.foreground&&!d.settings.foreground.startsWith("#"),h=d.settings?.background&&!d.settings.background.startsWith("#");if(!f&&!h)return d;const p={...d,settings:{...d.settings}};if(f){const m=u(d.settings.foreground);t.colorReplacements[m]=d.settings.foreground,p.settings.foreground=m}if(h){const m=u(d.settings.background);t.colorReplacements[m]=d.settings.background,p.settings.background=m}return p});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!t.colors[d]?.startsWith("#")){const f=u(t.colors[d]);t.colorReplacements[f]=t.colors[d],t.colors[d]=f}return Object.defineProperty(t,VS,{enumerable:!1,writable:!1,value:!0}),t}async function NE(e){return[...new Set((await Promise.all(e.filter(t=>!DE(t)).map(async t=>await OE(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function IE(e){return(await Promise.all(e.map(async t=>ME(t)?null:Qc(await OE(t))))).filter(t=>!!t)}function zE(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new $e(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var QN=class extends YN{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Qc(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=_c.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=zE(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(const a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,a])=>!a);if(n.length){const r=t.filter(([a,l])=>l?(l.embeddedLanguages||l.embeddedLangs)?.some(u=>n.map(([d])=>d).includes(u)):!1).filter(a=>!n.includes(a));throw new $e(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${r.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[r,a]of t)this._resolver.addLanguage(a);for(const[r,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(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);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},ZN=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const a=t.slice(0,r).join(".");n=[...n,...this._injections.get(a)||[]]}return n}};let xs=0;function JN(e){xs+=1,e.warnings!==!1&&xs>=10&&xs%10===0&&console.warn(`[Shiki] ${xs} 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 $e("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Qc),a=new QN(new ZN(e.engine,n),r,n,e.langAlias);let l;function u(E){return zE(E,e.langAlias)}function d(E){w();const L=a.getGrammar(typeof E=="string"?E:E.name);if(!L)throw new $e(`Language \`${E}\` not found, you may need to load it first`);return L}function f(E){if(E==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const L=a.getTheme(E);if(!L)throw new $e(`Theme \`${E}\` not found, you may need to load it first`);return L}function h(E){w();const L=f(E);return l!==E&&(a.setTheme(L),l=E),{theme:L,colorMap:a.getColorMap()}}function p(){return w(),a.getLoadedThemes()}function m(){return w(),a.getLoadedLanguages()}function y(...E){w(),a.loadLanguages(E.flat(1))}async function b(...E){return y(await NE(E))}function S(...E){w();for(const L of E.flat(1))a.loadTheme(L)}async function _(...E){return w(),S(await IE(E))}function w(){if(t)throw new $e("Shiki instance has been disposed")}function x(){t||(t=!0,a.dispose(),xs-=1)}return{setTheme:h,getTheme:f,getLanguage:d,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:_,loadThemeSync:S,dispose:x,[Symbol.dispose]:x}}async function eI(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([IE(e.themes||[]),NE(e.langs||[]),e.engine]);return JN({...e,themes:t,langs:n,engine:r})}const HE=new WeakMap;function Zc(e,t){HE.set(e,t)}function Fs(e){return HE.get(e)}var Jc=class PE{_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 PE(Object.fromEntries(XN(n).map(r=>[r,Gp])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return tI(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function tI(e){const t=[],n=new Set;function r(a){if(n.has(a))return;n.add(a);const l=a?.nameScopesList?.scopeName;l&&t.push(l),a.parent&&r(a.parent)}return r(e),t}function nI(e,t){if(!(e instanceof Jc))throw new $e("Invalid grammar state");return e.getInternalStack(t)}const iI=/,/,rI=/ /;function UE(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Yc(e.resolveLangAlias(n.lang||"text"))||Xc(r))return Kc(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:a,colorMap:l}=e.setTheme(r),u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new $e(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(a.name))throw new $e(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return aI(t,u,a,l,n)}function oI(...e){if(e.length===2)return Fs(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:l=t.getLoadedThemes()[0]}=r;if(Yc(a)||Xc(l))throw new $e("Plain language does not have grammar state");if(a==="ansi")throw new $e("ANSI language does not have grammar state");const{theme:u,colorMap:d}=t.setTheme(l),f=t.getLanguage(a);return new Jc(Zm(n,f,u,d,r).stateStack,f.name,u.name)}function aI(e,t,n,r,a){const l=Zm(e,t,n,r,a),u=new Jc(l.stateStack,t.name,n.name);return Zc(l.tokens,u),l.tokens}function Zm(e,t,n,r,a){const l=kc(n,a),{tokenizeMaxLineLength:u=0,tokenizeTimeLimit:d=500,includeExplanation:f=!1}=a,h=Kc(e);let p=a.grammarState?nI(a.grammarState,n.name)??Gp:a.grammarContextCode!=null?Zm(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:Gp,m=[];const y=[];for(let b=0,S=h.length;b<S;b++){const[_,w]=h[b];if(_===""){m=[],y.push([]);continue}if(u>0&&_.length>=u){m=[],y.push([{content:_,offset:w,color:"",fontStyle:0}]);continue}let x,E,L;f&&f!=="tokenType"&&(x=t.tokenizeLine(_,p,d),E=x.tokens,L=0);const A=t.tokenizeLine2(_,p,d),R=A.tokens.length/2;for(let N=0;N<R;N++){const H=A.tokens[2*N],U=N+1<R?A.tokens[2*N+2]:_.length;if(H===U)continue;const Y=A.tokens[2*N+1],te=Sr(r[to.getForeground(Y)],l),J=to.getFontStyle(Y),K={content:_.substring(H,U),offset:w+H,color:te,fontStyle:J};if(f==="tokenType")K.type=to.getTokenType(Y);else if(f){const ie=[];if(f!=="scopeName")for(const se of n.settings){let I;switch(typeof se.scope){case"string":I=se.scope.split(iI).map($=>$.trim());break;case"object":I=se.scope;break;default:continue}ie.push({settings:se,selectors:I.map($=>$.split(rI))})}K.explanation=[];let Z=0;for(;H+Z<U;){const se=E[L],I=_.substring(se.startIndex,se.endIndex);Z+=I.length,K.explanation.push({content:I,scopes:f==="scopeName"?sI(se.scopes):lI(ie,se.scopes)}),L+=1}}m.push(K)}y.push(m),m=[],p=A.ruleStack}return{tokens:y,stateStack:p}}function sI(e){return e.map(t=>({scopeName:t}))}function lI(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const l=t[r];n[r]={scopeName:l,themeMatches:cI(e,l,t.slice(0,r))}}return n}function BS(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function uI(e,t,n){if(!BS(e.at(-1),t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)BS(e[r],n[a])&&(r-=1),a-=1;return r===-1}function cI(e,t,n){const r=[];for(const{selectors:a,settings:l}of e)for(const u of a)if(uI(u,t,n)){r.push(l);break}return r}function VE(e,t,n,r=UE){const a=Object.entries(n.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),l=a.map(h=>{const p=r(e,t,{...n,theme:h.theme});return{tokens:p,state:Fs(p),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),u=dI(...l.map(h=>h.tokens)),d=u[0].map((h,p)=>h.map((m,y)=>{const b={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(b.explanation=m.explanation),u.forEach((S,_)=>{const{content:w,explanation:x,offset:E,...L}=S[p][y];b.variants[a[_].color]=L}),b})),f=l[0].state?new Jc(Object.fromEntries(l.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),l[0].state.lang):void 0;return f&&Zc(d,f),d}function dI(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(f=>f[r]),l=t.map(()=>[]);t.forEach((f,h)=>f.push(l[h]));const u=a.map(()=>0),d=a.map(f=>f[0]);for(;d.every(f=>f);){const f=Math.min(...d.map(h=>h.content.length));for(let h=0;h<n;h++){const p=d[h];p.content.length===f?(l[h].push(p),u[h]+=1,d[h]=a[h][u[h]]):(l[h].push({...p,content:p.content.slice(0,f)}),d[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}const jS=/\s+/g;function BE(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(jS)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(jS);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function fI(e){const t=Kc(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t.at(-1).length};let l=a,u=0;for(const d of t){if(l<d.length)break;l-=d.length,u++}return{line:u,character:l}}function r(a,l){let u=0;for(let d=0;d<a;d++)u+=t[d].length;return u+=l,u}return{lines:t,indexToPos:n,posToIndex:r}}const hI=["color","background-color"];function pI(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function mI(e,t){let n=0,r=e.length;for(;n<r;){const a=n+(r-n>>1);e[a]<=t?n=a+1:r=a}return n}function gI(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const l=a.offset+a.content.length,u=mI(n,a.offset);let d=u;for(;d<n.length&&n[d]<l;)d++;if(u===d)return a;const f=n.slice(u,d);for(let h=0;h<f.length;h++)f[h]-=a.offset;return pI(a,f)})):e}function vI(e,t,n,r,a="css-vars"){const l={content:e.content,explanation:e.explanation,offset:e.offset},u=t.map(p=>Lc(e.variants[p])),d=new Set(u.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const y=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":y)};return u.forEach((p,m)=>{for(const y of d){const b=p[y]||"inherit";if(m===0&&r&&hI.includes(y))if(r==="light-dark()"&&u.length>1){const S=t.findIndex(E=>E==="light"),_=t.findIndex(E=>E==="dark");if(S===-1||_===-1)throw new $e('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const w=u[S][y]||"inherit",x=u[_][y]||"inherit";f[y]=`light-dark(${w}, ${x})`,a==="css-vars"&&(f[h(m,y)]=b)}else f[y]=b;else a==="css-vars"&&(f[h(m,y)]=b)}}),l.htmlStyle=f,l}function Lc(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ot.Italic&&(t["font-style"]="italic"),e.fontStyle&Ot.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ot.Underline&&n.push("underline"),e.fontStyle&Ot.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function $p(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function yI(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let l=function(d){if(typeof d=="number"){if(d<0||d>n.source.length)throw new $e(`Invalid decoration offset: ${d}. Code length: ${n.source.length}`);return{...a.indexToPos(d),offset:d}}else{const f=a.lines[d.line];if(f===void 0)throw new $e(`Invalid decoration position ${JSON.stringify(d)}. Lines length: ${a.lines.length}`);let h=d.character;if(h<0&&(h=f.length+h),h<0||h>f.length)throw new $e(`Invalid decoration position ${JSON.stringify(d)}. Line ${d.line} length: ${f.length}`);return{...d,character:h,offset:a.posToIndex(d.line,h)}}};var r=l;const a=fI(n.source),u=(n.options.decorations||[]).map(d=>({...d,start:l(d.start),end:l(d.end)}));bI(u),e.set(n.meta,{decorations:u,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return gI(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),a=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(a.length!==r.converter.lines.length)throw new $e(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function l(p,m,y,b){const S=a[p];let _="",w=-1,x=-1;if(m===0&&(w=0),y===0&&(x=0),y===Number.POSITIVE_INFINITY&&(x=S.children.length),w===-1||x===-1)for(let L=0;L<S.children.length;L++)_+=jE(S.children[L]),w===-1&&_.length===m&&(w=L+1),x===-1&&_.length===y&&(x=L+1);if(w===-1)throw new $e(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(x===-1)throw new $e(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const E=S.children.slice(w,x);if(!b.alwaysWrap&&E.length===S.children.length)d(S,b,"line");else if(!b.alwaysWrap&&E.length===1&&E[0].type==="element")d(E[0],b,"token");else{const L={type:"element",tagName:"span",properties:{},children:E};d(L,b,"wrapper"),S.children.splice(w,E.length,L)}}function u(p,m){a[p]=d(a[p],m,"line")}function d(p,m,y){const b=m.properties||{},S=m.transform||(_=>_);return p.tagName=m.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},m.properties?.class&&BE(p,m.properties.class),p=S(p,y)||p,p}const f=[],h=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:y}=p;if(m.line===y.line)l(m.line,m.character,y.character,p);else if(m.line<y.line){l(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let b=m.line+1;b<y.line;b++)f.unshift(()=>u(b,p));l(y.line,0,y.character,p)}}f.forEach(p=>p())}}}function bI(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new $e(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],l=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,u=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,d=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,f=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(l||u||d||f){if(l&&u||d&&f||d&&n.start.offset===n.end.offset||u&&a.start.offset===a.end.offset)continue;throw new $e(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function jE(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(jE).join(""):""}const SI=[yI()];function Tc(e){const t=_I(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...SI]}function _I(e){const t=[],n=[],r=[];for(const a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":n.push(a);break;default:r.push(a)}return{pre:t,post:n,normal:r}}var Qr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Bh={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function CI(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function FS(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function xI(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Bh[r]&&t.push({type:"setDecoration",value:Bh[r]});else if(r<=29){const a=Bh[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Qr[r-30]}});else if(r===38){const a=FS(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Qr[r-40]}});else if(r===48){const a=FS(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Qr[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Qr[r-100+8]}})}return t}function EI(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let l=0;do{const u=CI(r,l),d=u.sequence?r.substring(l,u.startPosition):r.substring(l);if(d.length>0&&a.push({value:d,foreground:e,background:t,decorations:new Set(n)}),u.sequence){const f=xI(u.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}l=u.position}while(l<r.length);return a}}}var wI={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 kI(e=wI){function t(d){return e[d]}function n(d){return`#${d.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let h=0;h<Qr.length;h++)r.push(t(Qr[h]));let d=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)r.push(n([d[h],d[p],d[m]]));let f=8;for(let h=0;h<24;h++,f+=10)r.push(n([f,f,f]));return r}function l(d){return a()[d]}function u(d){switch(d.type){case"named":return t(d.name);case"rgb":return n(d.rgb);case"table":return l(d.index)}}return{value:u}}const LI=/#([0-9a-f]{3,8})/i,TI=/var\((--[\w-]+-ansi-[\w-]+)\)/,AI={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 RI(e,t,n){const r=kc(e,n),a=Kc(t),l=kI(Object.fromEntries(Qr.map(d=>{const f=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`;return[d,e.colors?.[f]||AI[d]]}))),u=EI();return a.map(d=>u.parse(d[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?l.value(f.background):e.bg,p=f.foreground?l.value(f.foreground):e.fg):(h=f.foreground?l.value(f.foreground):e.fg,p=f.background?l.value(f.background):void 0),h=Sr(h,r),p=Sr(p,r),f.decorations.has("dim")&&(h=OI(h));let m=Ot.None;return f.decorations.has("bold")&&(m|=Ot.Bold),f.decorations.has("italic")&&(m|=Ot.Italic),f.decorations.has("underline")&&(m|=Ot.Underline),f.decorations.has("strikethrough")&&(m|=Ot.Strikethrough),{content:f.value,offset:d[1],color:h,bgColor:p,fontStyle:m}}))}function OI(e){const t=e.match(LI);if(t){const r=t[1];if(r.length===8){const a=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${a}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const a=r[0],l=r[1],u=r[2],d=r[3];return`#${a}${a}${l}${l}${u}${u}${Math.round(Number.parseInt(`${d}${d}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const a=r[0],l=r[1],u=r[2];return`#${a}${a}${l}${l}${u}${u}80`}}}const n=e.match(TI);return n?`var(${n[1]}-dim)`:e}function qp(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:a=e.getLoadedThemes()[0]}=n;if(!Yc(r)&&!Xc(a)&&r==="ansi"){const{theme:l}=e.setTheme(a);return RI(l,t,n)}return UE(e,t,n)}function Ac(e,t,n){let r,a,l,u,d,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,y=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,E)=>x.color===h?-1:E.color===h?1:0);if(y.length===0)throw new $e("`themes` option must not be empty");const b=VE(e,t,n,qp);if(f=Fs(b),h&&h!=="light-dark()"&&!y.some(x=>x.color===h))throw new $e(`\`themes\` option must contain the defaultColor key \`${h}\``);const S=y.map(x=>e.getTheme(x.theme)),_=y.map(x=>x.color);l=b.map(x=>x.map(E=>vI(E,_,p,h,m))),f&&Zc(l,f);const w=y.map(x=>kc(x.theme,n));a=GS(y,S,w,p,h,"fg",m),r=GS(y,S,w,p,h,"bg",m),u=`shiki-themes ${S.map(x=>x.name).join(" ")}`,d=h?void 0:[a,r].join(";")}else if("theme"in n){const h=kc(n.theme,n);l=qp(e,t,n);const p=e.getTheme(n.theme);r=Sr(p.bg,h),a=Sr(p.fg,h),u=p.name,f=Fs(l)}else throw new $e("Invalid options, either `theme` or `themes` must be provided");return{tokens:l,fg:a,bg:r,themeName:u,rootStyle:d,grammarState:f}}function GS(e,t,n,r,a,l,u){return e.map((d,f)=>{const h=Sr(t[f][l],n[f])||"inherit",p=`${r+d.color}${l==="bg"?"-bg":""}:${h}`;if(f===0&&a){if(a==="light-dark()"&&e.length>1){const m=e.findIndex(b=>b.color==="light"),y=e.findIndex(b=>b.color==="dark");if(m===-1||y===-1)throw new $e('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Sr(t[m][l],n[m])||"inherit"}, ${Sr(t[y][l],n[y])||"inherit"});${p}`}return h}return u==="css-vars"?p:null}).filter(d=>!!d).join(";")}const FE=/^\s+$/,DI=/^(\s*)(.*?)(\s*)$/;function Rc(e,t,n,r={meta:{},options:n,codeToHast:(a,l)=>Rc(e,a,l),codeToTokens:(a,l)=>Ac(e,a,l)}){let a=t;for(const S of Tc(n))a=S.preprocess?.call(r,a,n)||a;let{tokens:l,fg:u,bg:d,themeName:f,rootStyle:h,grammarState:p}=Ac(e,a,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:y=!1}=n;m===!0?l=NI(l):m==="never"&&(l=II(l)),y&&(l=zI(l));const b={...r,get source(){return a}};for(const S of Tc(n))l=S.tokens?.call(b,l)||l;return MI(l,{...n,fg:u,bg:d,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},b,p)}function MI(e,t,n,r=Fs(e)){const a=Tc(t),l=[],u={type:"root",children:[]},{structure:d="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[_,w]of Object.entries(t.meta||{}))_.startsWith("_")||(h[_]=w);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:l};const y=[],b={...n,structure:d,addClassToHast:BE,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return u},get pre(){return p},get code(){return m},get lines(){return y}};if(e.forEach((_,w)=>{w&&(d==="inline"?u.children.push({type:"element",tagName:"br",properties:{},children:[]}):d==="classic"&&l.push({type:"text",value:`
|
|
45
|
+
`}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},E=0;for(const L of _){let A={type:"element",tagName:"span",properties:{...L.htmlAttrs},children:[{type:"text",value:L.content}]};const R=$p(L.htmlStyle||Lc(L));R&&(A.properties.style=R);for(const N of a)A=N?.span?.call(b,A,w+1,E,x,L)||A;d==="inline"?u.children.push(A):d==="classic"&&x.children.push(A),E+=L.content.length}if(d==="classic"){for(const L of a)x=L?.line?.call(b,x,w+1)||x;y.push(x),l.push(x)}else d==="inline"&&y.push(x)}),d==="classic"){for(const _ of a)m=_?.code?.call(b,m)||m;p.children.push(m);for(const _ of a)p=_?.pre?.call(b,p)||p;u.children.push(p)}else if(d==="inline"){const _=[];let w={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const E of u.children)E.type==="element"&&E.tagName==="br"?(_.push(w),w={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(E.type==="element"||E.type==="text")&&w.children.push(E);_.push(w);let x={type:"element",tagName:"code",properties:{},children:_};for(const E of a)x=E?.code?.call(b,x)||x;u.children=[];for(let E=0;E<x.children.length;E++){E>0&&u.children.push({type:"element",tagName:"br",properties:{},children:[]});const L=x.children[E];L.type==="element"&&u.children.push(...L.children)}}let S=u;for(const _ of a)S=_?.root?.call(b,S)||S;return r&&Zc(S,r),S}function NI(e){return e.map(t=>{const n=[];let r="",a;return t.forEach((l,u)=>{const d=!(l.fontStyle&&(l.fontStyle&Ot.Underline||l.fontStyle&Ot.Strikethrough));d&&FE.test(l.content)&&t[u+1]?(a===void 0&&(a=l.offset),r+=l.content):r?(d?n.push({...l,offset:a,content:r+l.content}):n.push({content:r,offset:a},l),a=void 0,r=""):n.push(l)}),n})}function II(e){return e.map(t=>t.flatMap(n=>{if(FE.test(n.content))return n;const r=n.content.match(DI);if(!r)return n;const[,a,l,u]=r;if(!a&&!u)return n;const d=[{...n,offset:n.offset+a.length,content:l}];return a&&d.unshift({content:a,offset:n.offset}),u&&d.push({content:u,offset:n.offset+a.length+l.length}),d}))}function zI(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n.at(-1),l=$p(a.htmlStyle||Lc(a)),u=$p(r.htmlStyle||Lc(r)),d=a.fontStyle&&(a.fontStyle&Ot.Underline||a.fontStyle&Ot.Strikethrough),f=r.fontStyle&&(r.fontStyle&Ot.Underline||r.fontStyle&Ot.Strikethrough);!d&&!f&&l===u?a.content+=r.content:n.push({...r})}return n})}const HI=Nt;function PI(e,t,n){const r={meta:{},options:n,codeToHast:(l,u)=>Rc(e,l,u),codeToTokens:(l,u)=>Ac(e,l,u)};let a=HI(Rc(e,t,n,r));for(const l of Tc(n))a=l.postprocess?.call(r,a,n)||a;return a}async function UI(e){const t=await eI(e);return{getLastGrammarState:(...n)=>oI(t,...n),codeToTokensBase:(n,r)=>qp(t,n,r),codeToTokensWithThemes:(n,r)=>VE(t,n,r),codeToTokens:(n,r)=>Ac(t,n,r),codeToHast:(n,r)=>Rc(t,n,r),codeToHtml:(n,r)=>PI(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function VI(e){const t=e.langs,n=e.themes,r=e.engine;async function a(l){function u(m){if(typeof m=="string"){if(m=l.langAlias?.[m]||m,DE(m))return[];const y=t[m];if(!y)throw new $e(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return y}return m}function d(m){if(ME(m))return"none";if(typeof m=="string"){const y=n[m];if(!y)throw new $e(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return y}return m}const f=(l.themes??[]).map(m=>d(m)),h=(l.langs??[]).map(m=>u(m)),p=await UI({engine:l.engine??r(),...l,themes:f,langs:h});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(u))},loadTheme(...m){return p.loadTheme(...m.map(d))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}const BI=VI({langs:Hp,themes:G2,engine:()=>(0,mE.createOnigurumaEngine)(k(()=>import("./wasm-CG6Dc4jp.js"),[]))}),$S=4294967295;var jI=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:a}=t;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(l=>{if(typeof l!="string")return l;const u=r?.get(l);if(u){if(u instanceof RegExp)return u;if(n)return null;throw u}try{const d=a(l);return r?.set(l,d),d}catch(d){if(r?.set(l,d),n)return null;throw d}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,a=[];function l(u,d,f=0){return{index:u,captureIndices:d.indices.map(h=>h==null?{start:$S,end:$S,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let u=0;u<this.regexps.length;u++){const d=this.regexps[u];if(d)try{d.lastIndex=t;const f=d.exec(r);if(!f)continue;if(f.index===t)return l(u,f,0);a.push([u,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(a.length){const u=Math.min(...a.map(d=>d[1].index));for(const[d,f,h]of a)if(f.index===u)return l(d,f,h)}return null}};function ka(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function FI(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Jm=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),_t=String.raw;function La(e,t){if(e==null)throw new Error(t??"Value expected");return e}const GE=_t`\[\^?`,$E=`c.? | C(?:-.?)?|${_t`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${_t`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${_t`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${_t`o\{[^\}]*\}?`}|${_t`\d{1,3}`}`,eg=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Nu=new RegExp(_t`
|
|
46
|
+
\\ (?:
|
|
47
|
+
${$E}
|
|
48
|
+
| [gk]<[^>]*>?
|
|
49
|
+
| [gk]'[^']*'?
|
|
50
|
+
| .
|
|
51
|
+
)
|
|
52
|
+
| \( (?:
|
|
53
|
+
\? (?:
|
|
54
|
+
[:=!>({]
|
|
55
|
+
| <[=!]
|
|
56
|
+
| <[^>]*>
|
|
57
|
+
| '[^']*'
|
|
58
|
+
| ~\|?
|
|
59
|
+
| #(?:[^)\\]|\\.?)*
|
|
60
|
+
| [^:)]*[:)]
|
|
61
|
+
)?
|
|
62
|
+
| \*[^\)]*\)?
|
|
63
|
+
)?
|
|
64
|
+
| (?:${eg.source})+
|
|
65
|
+
| ${GE}
|
|
66
|
+
| .
|
|
67
|
+
`.replace(/\s+/g,""),"gsu"),jh=new RegExp(_t`
|
|
68
|
+
\\ (?:
|
|
69
|
+
${$E}
|
|
70
|
+
| .
|
|
71
|
+
)
|
|
72
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
73
|
+
| ${GE}
|
|
74
|
+
| &&
|
|
75
|
+
| .
|
|
76
|
+
`.replace(/\s+/g,""),"gsu");function GI(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=uz(n.flags),a=[r.extended],l={captureGroup:n.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(m){a.push(m)},replaceCurrentModX(m){a[a.length-1]=m},singleline:n.rules.singleline};let u=[],d;for(Nu.lastIndex=0;d=Nu.exec(e);){const m=$I(l,e,d[0],Nu.lastIndex);m.tokens?u.push(...m.tokens):m.token&&u.push(m.token),m.lastIndex!==void 0&&(Nu.lastIndex=m.lastIndex)}const f=[];let h=0;u.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,y)=>{m.kind="capturing",m.number=y+1});const p=h||f.length;return{tokens:u.map(m=>m.type==="EscapedNumber"?dz(m,p):m).flat(),flags:r}}function $I(e,t,n,r){const[a,l]=n;if(n==="["||n==="[^"){const u=qI(t,n,r);return{tokens:u.tokens,lastIndex:u.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(l))return{token:qS(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:nz(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:WE(n)}}if(l==="K")return{token:YE("keep",n)};if(l==="N"||l==="R")return{token:Zr("newline",n,{negate:l==="N"})};if(l==="O")return{token:Zr("any",n)};if(l==="X")return{token:Zr("text_segment",n)};const u=qE(n,{inCharClass:!1});return Array.isArray(u)?{tokens:u}:{token:u}}if(a==="("){if(l==="*")return{token:az(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:oz(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:la("group",n)};if(n==="(?>")return{token:la("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:la(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:la("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:la("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:JI(n)}}if(e.getCurrentModX()){if(n==="#"){const u=t.indexOf(`
|
|
77
|
+
`,r);return{lastIndex:u===-1?t.length:u}}if(/^\s$/.test(n)){const u=/\s+/y;return u.lastIndex=r,{lastIndex:u.exec(t)?u.lastIndex:r}}}if(n===".")return{token:Zr("dot",n)};if(n==="^"||n==="$"){const u=e.singleline?{"^":_t`\A`,$:_t`\Z`}[n]:n;return{token:qS(u,n)}}return n==="|"?{token:YI(n)}:eg.test(n)?{tokens:fz(n)}:{token:Li(ka(n),n)}}function qI(e,t,n){const r=[WS(t[1]==="^",t)];let a=1,l;for(jh.lastIndex=n;l=jh.exec(e);){const u=l[0];if(u[0]==="["&&u[1]!==":")a++,r.push(WS(u[1]==="^",u));else if(u==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Li(93,u));else if(a--,r.push(XI(u)),!a)break}else{const d=WI(u);Array.isArray(d)?r.push(...d):r.push(d)}}return{tokens:r,lastIndex:jh.lastIndex||e.length}}function WI(e){if(e[0]==="\\")return qE(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Jm.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Zr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?KI(e):e==="&&"?QI(e):Li(ka(e),e)}function qE(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return rz(e);if("dDhHsSwW".includes(n))return sz(e);if(e.startsWith(_t`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return lz(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(u=>parseInt(u,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),l=new TextEncoder;return[...a].map(u=>{const d=[...l.encode(u)].map(f=>`\\x${f.toString(16)}`).join("");return Li(ka(u),d)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Li(cz(e),e);if(YS.has(n))return Li(YS.get(n),e);if(/\d/.test(n))return ZI(t,e);if(e==="\\")throw new Error(_t`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Li(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function YI(e){return{type:"Alternator",raw:e}}function qS(e,t){return{type:"Assertion",kind:e,raw:t}}function WE(e){return{type:"Backreference",raw:e}}function Li(e,t){return{type:"Character",value:e,raw:t}}function XI(e){return{type:"CharacterClassClose",raw:e}}function KI(e){return{type:"CharacterClassHyphen",raw:e}}function QI(e){return{type:"CharacterClassIntersector",raw:e}}function WS(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Zr(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function YE(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:La(n.flags),raw:t}}function ZI(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function JI(e){return{type:"GroupClose",raw:e}}function la(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function ez(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function tz(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function nz(e){return{type:"Subroutine",raw:e}}const iz=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),YS=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function rz(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Li(ka(t.toUpperCase())-64,e)}function oz(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const a=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),l=KS(n),u=KS(r),d={};if(l&&(d.enable=l),u&&(d.disable=u),e.endsWith(")"))return t.replaceCurrentModX(a),YE("flags",e,{flags:d});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,la("group",e,{...(l||u)&&{flags:d}});throw new Error(`Unexpected flag modifier "${e}"`)}function az(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:a}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const l=a?a.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[u,d,f]=l,h=iz.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(l.length>0)throw new Error(`Named callout arguments not allowed "${l}"`);break;case"error":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(typeof u=="string")throw new Error(`Named callout argument must be a number "${u}"`);break;case"max":if(!l.length||l.length>2)throw new Error(`Named callout must have one or two arguments "${l}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(l.length===2&&(typeof d=="number"||!/^[<>X]$/.test(d)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${d}"`);break;case"count":case"total_count":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(l.length===1&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${u}"`);break;case"cmp":if(l.length!==3)throw new Error(`Named callout must have three arguments "${l}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(typeof d=="number"||!/^(?:[<>!=]=|[<>])$/.test(d))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${d}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return ez(h,r??null,a?.split(",")??null,e)}function XS(e){let t=null,n,r;if(e[0]==="{"){const{minStr:a,maxStr:l}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,u=1e5;if(+a>u||l&&+l>u)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+a,r=l===void 0?+a:l===""?1/0:+l,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return tz(t,n,r,e)}function sz(e){const t=e[1].toLowerCase();return Zr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function lz(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Zr("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function KS(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function uz(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function cz(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function dz(e,t){const{raw:n,inCharClass:r}=e,a=n.slice(1);if(!r&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[WE(n)];const l=[],u=a.match(/^[0-7]+|\d/g);for(let d=0;d<u.length;d++){const f=u[d];let h;if(d===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(_t`Octal encoded byte above 177 unsupported "${n}"`)}else h=ka(f);l.push(Li(h,(d===0?"\\":"")+f))}return l}function fz(e){const t=[],n=new RegExp(eg,"gy");let r;for(;r=n.exec(e);){const a=r[0];if(a[0]==="{"){const l=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(l){const{min:u,max:d}=l.groups;if(+u>+d&&a.endsWith("?")){n.lastIndex--,t.push(XS(a.slice(0,-1)));continue}}}t.push(XS(a))}return t}function XE(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function hz(e){return pz.has(e.type)}const pz=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function KE(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=GI(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),a=(y,b)=>{const S=r.tokens[l.nextIndex];switch(l.parent=y,l.nextIndex++,S.type){case"Alternator":return co();case"Assertion":return mz(S);case"Backreference":return gz(S,l);case"Character":return ed(S.value,{useLastValid:!!b.isCheckingRangeEnd});case"CharacterClassHyphen":return vz(S,l,b);case"CharacterClassOpen":return yz(S,l,b);case"CharacterSet":return bz(S,l);case"Directive":return wz(S.kind,{flags:S.flags});case"GroupOpen":return Sz(S,l,b);case"NamedCallout":return Lz(S.kind,S.tag,S.arguments);case"Quantifier":return _z(S,l);case"Subroutine":return Cz(S,l);default:throw new Error(`Unexpected token type "${S.type}"`)}},l={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:a},u=Az(kz(r.flags));let d=u.body[0];for(;l.nextIndex<r.tokens.length;){const y=a(d,{});y.type==="Alternative"?(u.body.push(y),d=y):d.body.push(y)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=l;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:y}of m)if(typeof y=="number"){if(y>f.length)throw new Error("Subroutine uses a group number that's not defined");y&&(f[y-1].isSubroutined=!0)}else if(p.has(y)){if(p.get(y).length>1)throw new Error(_t`Subroutine uses a duplicate group name "\g<${y}>"`);p.get(y)[0].isSubroutined=!0}else throw new Error(_t`Subroutine uses a group name that's not defined "\g<${y}>"`);return u}function mz({kind:e}){return Wp(La({"^":"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===_t`\B`||e===_t`\Y`})}function gz({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),a=(l,u=!1)=>{const d=t.capturingGroups.length;let f=!1;if(l>d)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Yp(u?d+1-l:l,{orphan:f})};if(n){const l=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(l)return a(+l.groups.num,!!l.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return Yp(r)}return a(+r)}function vz(e,t,n){const{tokens:r,walk:a}=t,l=t.parent,u=l.body.at(-1),d=r[t.nextIndex];if(!n.isCheckingRangeEnd&&u&&u.type!=="CharacterClass"&&u.type!=="CharacterClassRange"&&d&&d.type!=="CharacterClassOpen"&&d.type!=="CharacterClassClose"&&d.type!=="CharacterClassIntersector"){const f=a(l,{...n,isCheckingRangeEnd:!0});if(u.type==="Character"&&f.type==="Character")return l.body.pop(),Ez(u,f);throw new Error("Invalid character class range")}return ed(ka("-"))}function yz({negate:e},t,n){const{tokens:r,walk:a}=t,l=[rc()],u=r[t.nextIndex];let d=JS(u);for(;d.type!=="CharacterClassClose";){if(d.type==="CharacterClassIntersector")l.push(rc()),t.nextIndex++;else{const h=l.at(-1);h.body.push(a(h,n))}d=JS(r[t.nextIndex],u)}const f=rc({negate:e});return l.length===1?f.body=l[0].body:(f.kind="intersection",f.body=l.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function bz({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:l,unicodePropertyMap:u}=r;if(e==="property"){const d=td(n);if(Jm.has(d)&&!u?.has(d))e="posix",n=d;else return ua(n,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:l,unicodePropertyMap:u})}return e==="posix"?Tz(n,{negate:t}):Xp(e,{negate:t})}function Sz(e,t,n){const{tokens:r,capturingGroups:a,namedGroupsByName:l,skipLookbehindValidation:u,walk:d}=t,f=Rz(e),h=f.type==="AbsenceFunction",p=ZS(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(a.push(f),f.name&&FI(l,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let y=e_(r[t.nextIndex]);for(;y.type!=="GroupClose";){if(y.type==="Alternator")f.body.push(co()),t.nextIndex++;else{const b=f.body.at(-1),S=d(b,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(b.body.push(S),(p||n.isInLookbehind)&&!u){const _="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(QS(S)||S.type==="CapturingGroup")throw new Error(_)}else if(QS(S)||ZS(S)&&S.negate)throw new Error(_)}}y=e_(r[t.nextIndex])}return t.nextIndex++,f}function _z({kind:e,min:t,max:n},r){const a=r.parent,l=a.body.at(-1);if(!l||!hz(l))throw new Error("Quantifier requires a repeatable token");const u=ZE(e,t,n,l);return a.body.pop(),u}function Cz({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let a=e.slice(3,-1);const l=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(l){const d=+l.groups.num,f=n.length;if(t.hasNumberedRef=!0,a={"":d,"+":f+d,"-":f+1-d}[l.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const u=JE(a);return r.push(u),u}function xz(e,t){return{type:"AbsenceFunction",kind:e,body:il(t?.body)}}function co(e){return{type:"Alternative",body:ew(e?.body)}}function Wp(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function Yp(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function QE(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Oz(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:il(t?.body)}}function ed(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function rc(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:ew(e?.body)}}function Ez(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Xp(e,t){const 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 wz(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:La(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function kz(e){return{type:"Flags",...e}}function Rn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:il(e?.body)}}function Xr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:il(e?.body)}}function Lz(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Tz(e,t){const n=!!t?.negate;if(!Jm.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function ZE(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function Az(e,t){return{type:"Regex",body:il(t?.body),flags:e}}function JE(e){return{type:"Subroutine",ref:e}}function ua(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(td(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Dz(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(_t`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Rz({flags:e,kind:t,name:n,negate:r,number:a}){switch(t){case"absence_repeater":return xz("repeater");case"atomic":return Rn({atomic:!0});case"capturing":return QE(a,{name:n});case"group":return Rn({flags:e});case"lookahead":case"lookbehind":return Xr({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function il(e){if(e===void 0)e=[co()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function ew(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function QS(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function ZS(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Oz(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Dz(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function td(e){return e.replace(/[- _]+/g,"").toLowerCase()}function JS(e,t){const n=t;return La(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function e_(e){return La(e,"Unclosed group")}function Ms(e,t,n=null){function r(l,u){for(let d=0;d<l.length;d++){const f=a(l[d],u,d,l);d=Math.max(-1,d+f)}}function a(l,u=null,d=null,f=null){let h=0,p=!1;const m={node:l,parent:u,key:d,container:f,root:e,remove(){Iu(f).splice(Math.max(0,ra(d)+h),1),h--,p=!0},removeAllNextSiblings(){return Iu(f).splice(ra(d)+1)},removeAllPrevSiblings(){const x=ra(d)+h;return h-=x,Iu(f).splice(0,Math.max(0,x))},replaceWith(x,E={}){const L=!!E.traverse;f?f[Math.max(0,ra(d)+h)]=x:La(u,"Can't replace root node")[d]=x,L&&a(x,u,d,f),p=!0},replaceWithMultiple(x,E={}){const L=!!E.traverse;if(Iu(f).splice(Math.max(0,ra(d)+h),1,...x),h+=x.length-1,L){let A=0;for(let R=0;R<x.length;R++)A+=a(x[R],u,ra(d)+R+A,f)}p=!0},skip(){p=!0}},{type:y}=l,b=t["*"],S=t[y],_=typeof b=="function"?b:b?.enter,w=typeof S=="function"?S:S?.enter;if(_?.(m,n),w?.(m,n),!p)switch(y){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(l.body,l);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(l.min,l,"min"),a(l.max,l,"max");break;case"Quantifier":a(l.body,l,"body");break;case"Regex":r(l.body,l),a(l.flags,l,"flags");break;default:throw new Error(`Unexpected node type "${y}"`)}return S?.exit?.(m,n),b?.exit?.(m,n),h}return a(e),e}function Iu(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ra(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Mz=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Nz(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Iz(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const En=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function tg(e,t,n,r){const a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),l=[!1];let u=0,d="";for(const f of e.matchAll(a)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!r||r===En.DEFAULT==!u)){n instanceof Function?d+=n(f,{context:u?En.CHAR_CLASS:En.DEFAULT,negated:l[l.length-1]}):d+=n;continue}h[0]==="["?(u++,l.push(h[1]==="^")):h==="]"&&u&&(u--,l.pop()),d+=h}return d}function tw(e,t,n,r){tg(e,t,n,r)}function zz(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let l=0,u;for(;u=a.exec(e);){const{0:d,groups:{$skip:f}}=u;if(!f&&(!r||r===En.DEFAULT==!l))return u;d==="["?l++:d==="]"&&l&&l--,a.lastIndex==u.index&&a.lastIndex++}return null}function zu(e,t,n){return!!zz(e,t,0,n)}function Hz(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,a=0,l=1,u;for(;u=n.exec(e);){const[d]=u;if(d==="[")a++;else if(a)d==="]"&&a--;else if(d==="(")l++;else if(d===")"&&(l--,!l)){r=u.index;break}}return e.slice(t,r)}const t_=new RegExp(String.raw`(?<noncapturingStart>${Mz})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Pz(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const a="(?>",l="(?:(?=(",u=[0],d=[];let f=0,h=0,p=NaN,m;do{m=!1;let y=0,b=0,S=!1,_;for(t_.lastIndex=Number.isNaN(p)?0:p+l.length;_=t_.exec(e);){const{0:w,index:x,groups:{capturingStart:E,noncapturingStart:L}}=_;if(w==="[")y++;else if(y)w==="]"&&y--;else if(w===a&&!S)p=x,S=!0;else if(S&&L)b++;else if(E)S?b++:(f++,u.push(f+h));else if(w===")"&&S){if(!b){h++;const A=f+h;if(e=`${e.slice(0,p)}${l}${e.slice(p+a.length,x)}))<$$${A}>)${e.slice(x+1)}`,m=!0,d.push(A),Nz(n,A),r.size){const R=new Map;r.forEach((N,H)=>{R.set(H>=A?H+1:H,N.map(U=>U>=A?U+1:U))}),r=R}break}b--}}}while(m);return n.push(...d),e=tg(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:y,groups:{backrefNum:b,wrappedBackrefNum:S}})=>{if(b){const _=+b;if(_>u.length-1)throw new Error(`Backref "${y}" greater than number of captures`);return`\\${u[_]}`}return`\\${S}`},En.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const nw=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Fh=new RegExp(String.raw`
|
|
78
|
+
\\(?: \d+
|
|
79
|
+
| c[A-Za-z]
|
|
80
|
+
| [gk]<[^>]+>
|
|
81
|
+
| [pPu]\{[^\}]+\}
|
|
82
|
+
| u[A-Fa-f\d]{4}
|
|
83
|
+
| x[A-Fa-f\d]{2}
|
|
84
|
+
)
|
|
85
|
+
| \((?: \? (?: [:=!>]
|
|
86
|
+
| <(?:[=!]|[^>]+>)
|
|
87
|
+
| [A-Za-z\-]+:
|
|
88
|
+
| \(DEFINE\)
|
|
89
|
+
))?
|
|
90
|
+
| (?<qBase>${nw})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
91
|
+
| \\?.
|
|
92
|
+
`.replace(/\s+/g,""),"gsu");function Uz(e){if(!new RegExp(`${nw}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,a="",l=0,u;for(Fh.lastIndex=0;u=Fh.exec(e);){const{0:d,index:f,groups:{qBase:h,qMod:p,invalidQ:m}}=u;if(d==="[")l||(r=f),l++;else if(d==="]")l?l--:r=null;else if(!l)if(p==="+"&&a&&!a.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${d}"`);let y=-1;if(/^\{\d+\}$/.test(h))e=Iz(e,f+h.length,p,"");else{if(a===")"||a==="]"){const b=a===")"?n:r;if(b===null)throw new Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,b)}(?>${e.slice(b,f)}${h})${e.slice(f+d.length)}`}else e=`${e.slice(0,f-a.length)}(?>${a}${h})${e.slice(f+d.length)}`;y+=4}Fh.lastIndex+=y}else d[0]==="("?t.push(f):d===")"&&(n=t.length?t.pop():null);a=d}return{pattern:e}}const xn=String.raw,Vz=xn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Kp=xn`\(\?R=(?<rDepth>[^\)]+)\)|${Vz}`,nd=xn`\(\?<(?![=!])(?<captureName>[^>]+)>`,iw=xn`${nd}|(?<unnamed>\()(?!\?)`,qr=new RegExp(xn`${nd}|${Kp}|\(\?|\\?.`,"gsu"),Gh="Cannot use multiple overlapping recursions";function Bz(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let a=t?.captureTransfers??new Map;if(!new RegExp(Kp,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:n};if(r==="plugin"&&zu(e,xn`\(\?\(DEFINE\)`,En.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const l=[],u=zu(e,xn`\\[1-9]`,En.DEFAULT),d=new Map,f=[];let h=!1,p=0,m=0,y;for(qr.lastIndex=0;y=qr.exec(e);){const{0:b,groups:{captureName:S,rDepth:_,gRNameOrNum:w,gRDepth:x}}=y;if(b==="[")p++;else if(p)b==="]"&&p--;else if(_){if(n_(_),h)throw new Error(Gh);if(u)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const E=e.slice(0,y.index),L=e.slice(qr.lastIndex);if(zu(L,Kp,En.DEFAULT))throw new Error(Gh);const A=+_-1;e=i_(E,L,A,!1,n,l,m),a=o_(a,E,A,l.length,0,m);break}else if(w){n_(x);let E=!1;for(const K of f)if(K.name===w||K.num===+w){if(E=!0,K.hasRecursedWithin)throw new Error(Gh);break}if(!E)throw new Error(xn`Recursive \g cannot be used outside the referenced group "${r==="external"?w:xn`\g<${w}&R=${x}>`}"`);const L=d.get(w),A=Hz(e,L);if(u&&zu(A,xn`${nd}|\((?!\?)`,En.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const R=e.slice(L,y.index),N=A.slice(R.length+b.length),H=l.length,U=+x-1,Y=i_(R,N,U,!0,n,l,m);a=o_(a,R,U,l.length-H,H,m);const te=e.slice(0,L),J=e.slice(L+A.length);e=`${te}${Y}${J}`,qr.lastIndex+=Y.length-b.length-R.length-N.length,f.forEach(K=>K.hasRecursedWithin=!0),h=!0}else if(S)m++,d.set(String(m),qr.lastIndex),d.set(S,qr.lastIndex),f.push({num:m,name:S});else if(b[0]==="("){const E=b==="(";E&&(m++,d.set(String(m),qr.lastIndex)),f.push(E?{num:m}:{})}else b===")"&&f.pop()}return n.push(...l),{pattern:e,captureTransfers:a,hiddenCaptures:n}}function n_(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function i_(e,t,n,r,a,l,u){const d=new Set;r&&tw(e+t,nd,({groups:{captureName:h}})=>{d.add(h)},En.DEFAULT);const f=[n,r?d:null,a,l,u];return`${e}${r_(`(?:${e}`,"forward",...f)}(?:)${r_(`${t})`,"backward",...f)}${t}`}function r_(e,t,n,r,a,l,u){const f=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=f(p);h+=tg(e,xn`${iw}|\\k<(?<backref>[^>]+)>`,({0:y,groups:{captureName:b,unnamed:S,backref:_}})=>{if(_&&r&&!r.has(_))return y;const w=`_$${m}`;if(S||b){const x=u+l.length+1;return l.push(x),jz(a,x),S?y:`(?<${b}${w}>`}return xn`\k<${_}${w}>`},En.DEFAULT)}return h}function jz(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function o_(e,t,n,r,a,l){if(e.size&&r){let u=0;tw(t,iw,()=>u++,En.DEFAULT);const d=l-u+a,f=new Map;return e.forEach((h,p)=>{const m=(r-u*n)/n,y=u*n,b=p>d+u?p+r:p,S=[];for(const _ of h)if(_<=d)S.push(_);else if(_>d+u+m)S.push(_+r);else if(_<=d+u)for(let w=0;w<=n;w++)S.push(_+u*w);else for(let w=0;w<=n;w++)S.push(_+y+m*w);f.set(b,S)}),f}return e}var ht=String.fromCodePoint,_e=String.raw,Dn={},id=globalThis.RegExp;Dn.flagGroups=(()=>{try{new id("(?i:)")}catch{return!1}return!0})();Dn.unicodeSets=(()=>{try{new id("[[]]","v")}catch{return!1}return!0})();Dn.bugFlagVLiteralHyphenIsRange=Dn.unicodeSets?(()=>{try{new id(_e`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Dn.bugNestedClassIgnoresNegation=Dn.unicodeSets&&new id("[[^a]]","v").test("a");function Oc(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Gs(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Qp(e,t){return a_[e]>=a_[t]}function Fz(e,t){if(e==null)throw new Error(t??"Value expected");return e}var a_={ES2025:2025,ES2024:2024,ES2018:2018},Gz={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function rw(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Gz[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Dn.flagGroups?"ES2025":Dn.unicodeSets?"ES2024":"ES2018"),t}var $z="[ -\r ]",qz=new Set([ht(304),ht(305)]),_i=_e`[\p{L}\p{M}\p{N}\p{Pc}]`;function ow(e){if(qz.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),a=Xz.get(n),l=Wz.get(n),u=Yz.get(n);return[...r].length===1&&t.add(r),u&&t.add(u),a&&t.add(a),t.add(n),l&&t.add(l),[...t]}var ng=new Map(`C Other
|
|
93
|
+
Cc Control cntrl
|
|
94
|
+
Cf Format
|
|
95
|
+
Cn Unassigned
|
|
96
|
+
Co Private_Use
|
|
97
|
+
Cs Surrogate
|
|
98
|
+
L Letter
|
|
99
|
+
LC Cased_Letter
|
|
100
|
+
Ll Lowercase_Letter
|
|
101
|
+
Lm Modifier_Letter
|
|
102
|
+
Lo Other_Letter
|
|
103
|
+
Lt Titlecase_Letter
|
|
104
|
+
Lu Uppercase_Letter
|
|
105
|
+
M Mark Combining_Mark
|
|
106
|
+
Mc Spacing_Mark
|
|
107
|
+
Me Enclosing_Mark
|
|
108
|
+
Mn Nonspacing_Mark
|
|
109
|
+
N Number
|
|
110
|
+
Nd Decimal_Number digit
|
|
111
|
+
Nl Letter_Number
|
|
112
|
+
No Other_Number
|
|
113
|
+
P Punctuation punct
|
|
114
|
+
Pc Connector_Punctuation
|
|
115
|
+
Pd Dash_Punctuation
|
|
116
|
+
Pe Close_Punctuation
|
|
117
|
+
Pf Final_Punctuation
|
|
118
|
+
Pi Initial_Punctuation
|
|
119
|
+
Po Other_Punctuation
|
|
120
|
+
Ps Open_Punctuation
|
|
121
|
+
S Symbol
|
|
122
|
+
Sc Currency_Symbol
|
|
123
|
+
Sk Modifier_Symbol
|
|
124
|
+
Sm Math_Symbol
|
|
125
|
+
So Other_Symbol
|
|
126
|
+
Z Separator
|
|
127
|
+
Zl Line_Separator
|
|
128
|
+
Zp Paragraph_Separator
|
|
129
|
+
Zs Space_Separator
|
|
130
|
+
ASCII
|
|
131
|
+
ASCII_Hex_Digit AHex
|
|
132
|
+
Alphabetic Alpha
|
|
133
|
+
Any
|
|
134
|
+
Assigned
|
|
135
|
+
Bidi_Control Bidi_C
|
|
136
|
+
Bidi_Mirrored Bidi_M
|
|
137
|
+
Case_Ignorable CI
|
|
138
|
+
Cased
|
|
139
|
+
Changes_When_Casefolded CWCF
|
|
140
|
+
Changes_When_Casemapped CWCM
|
|
141
|
+
Changes_When_Lowercased CWL
|
|
142
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
143
|
+
Changes_When_Titlecased CWT
|
|
144
|
+
Changes_When_Uppercased CWU
|
|
145
|
+
Dash
|
|
146
|
+
Default_Ignorable_Code_Point DI
|
|
147
|
+
Deprecated Dep
|
|
148
|
+
Diacritic Dia
|
|
149
|
+
Emoji
|
|
150
|
+
Emoji_Component EComp
|
|
151
|
+
Emoji_Modifier EMod
|
|
152
|
+
Emoji_Modifier_Base EBase
|
|
153
|
+
Emoji_Presentation EPres
|
|
154
|
+
Extended_Pictographic ExtPict
|
|
155
|
+
Extender Ext
|
|
156
|
+
Grapheme_Base Gr_Base
|
|
157
|
+
Grapheme_Extend Gr_Ext
|
|
158
|
+
Hex_Digit Hex
|
|
159
|
+
IDS_Binary_Operator IDSB
|
|
160
|
+
IDS_Trinary_Operator IDST
|
|
161
|
+
ID_Continue IDC
|
|
162
|
+
ID_Start IDS
|
|
163
|
+
Ideographic Ideo
|
|
164
|
+
Join_Control Join_C
|
|
165
|
+
Logical_Order_Exception LOE
|
|
166
|
+
Lowercase Lower
|
|
167
|
+
Math
|
|
168
|
+
Noncharacter_Code_Point NChar
|
|
169
|
+
Pattern_Syntax Pat_Syn
|
|
170
|
+
Pattern_White_Space Pat_WS
|
|
171
|
+
Quotation_Mark QMark
|
|
172
|
+
Radical
|
|
173
|
+
Regional_Indicator RI
|
|
174
|
+
Sentence_Terminal STerm
|
|
175
|
+
Soft_Dotted SD
|
|
176
|
+
Terminal_Punctuation Term
|
|
177
|
+
Unified_Ideograph UIdeo
|
|
178
|
+
Uppercase Upper
|
|
179
|
+
Variation_Selector VS
|
|
180
|
+
White_Space space
|
|
181
|
+
XID_Continue XIDC
|
|
182
|
+
XID_Start XIDS`.split(/\s/).map(e=>[td(e),e])),Wz=new Map([["s",ht(383)],[ht(383),"s"]]),Yz=new Map([[ht(223),ht(7838)],[ht(107),ht(8490)],[ht(229),ht(8491)],[ht(969),ht(8486)]]),Xz=new Map([hr(453),hr(456),hr(459),hr(498),...$h(8072,8079),...$h(8088,8095),...$h(8104,8111),hr(8124),hr(8140),hr(8188)]),Kz=new Map([["alnum",_e`[\p{Alpha}\p{Nd}]`],["alpha",_e`\p{Alpha}`],["ascii",_e`\p{ASCII}`],["blank",_e`[\p{Zs}\t]`],["cntrl",_e`\p{Cc}`],["digit",_e`\p{Nd}`],["graph",_e`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",_e`\p{Lower}`],["print",_e`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",_e`[\p{P}\p{S}]`],["space",_e`\p{space}`],["upper",_e`\p{Upper}`],["word",_e`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",_e`\p{AHex}`]]);function Qz(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function hr(e){const t=ht(e);return[t.toLowerCase(),t]}function $h(e,t){return Qz(e,t).map(n=>hr(n))}var aw=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Zz(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};sw(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Qp(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};Ms(e,Jz,r);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},l={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Ms(e,eH,l);const u={groupsByName:l.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:l.reffedNodesByReferencer};return Ms(e,tH,u),e._originMap=l.groupOriginByCopy,e._strategy=r.strategy,e}var Jz={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:a}=e;if(a==="repeater"){const l=Rn();l.body[0].body.push(Xr({negate:!0,body:r}),ua("Any"));const u=Rn();u.body[0].body.push(ZE("greedy",0,1/0,l)),n(nt(u,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const a=e.body.filter(l=>l.kind==="flags");for(let l=n+1;l<t.body.length;l++){const u=t.body[l];Gs(r,u,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=uw(t.get(e));if(n){const r=Rn({flags:n});r.body[0].body=e.body,e.body=[nt(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:a,remove:l,replaceWith:u},d){const{kind:f,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:y,wordIsAscii:b}=d;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")u(nt(Xr({body:[co({body:[Wp("string_end")]}),co({body:[ed(10)]})]}),t));else if(f==="line_start")u(nt(Ci(_e`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(y.has(e))a.flags.sticky=!0,l();else{const S=r[n-1];if(S&&sH(S))u(nt(Xr({negate:!0}),t));else{if(m)throw new Error(_e`Uses "\G" in a way that requires a subclass`);u(pr(Wp("string_start"),t)),d.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")u(nt(Ci(_e`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!b&&!p){const S=`(?:(?<=${_i})(?!${_i})|(?<!${_i})(?=${_i}))`,_=`(?:(?<=${_i})(?=${_i})|(?<!${_i})(?!${_i}))`;u(nt(Ci(h?_:S),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Wh(n)&&(n=qh(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Wh(r)&&(r=qh(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=rc({body:[e]});n(nt(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:a,digitIsAscii:l,spaceIsAscii:u,wordIsAscii:d}){const{kind:f,negate:h,value:p}=e;if(l&&(f==="digit"||p==="digit")){n(pr(Xp("digit",{negate:h}),t));return}if(u&&(f==="space"||p==="space")){n(nt(Yh(Ci($z),h),t));return}if(d&&(f==="word"||p==="word")){n(pr(Xp("word",{negate:h}),t));return}if(f==="any")n(pr(ua("Any"),t));else if(f==="digit")n(pr(ua("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(r==="strict")throw new Error(_e`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",y=_e`\p{RI}{2}|${m}(?:\u200D${m})*`;n(nt(Ci(_e`(?>\r\n|${a?_e`\p{RGI_Emoji}`:y}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")n(pr(ua("AHex",{negate:h}),t));else if(f==="newline")n(nt(Ci(h?`[^
|
|
183
|
+
]`:`(?>\r
|
|
184
|
+
?|[
|
|
185
|
+
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!a&&(p==="graph"||p==="print")){if(r==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${ht(m.codePointAt(0)-1)}${ht(m.codePointAt(2)+1)}-`),n(nt(Ci(`[${m}]`),t))}else n(nt(Yh(Ci(Kz.get(p)),h),t));else if(f==="property")ng.has(td(p))||(e.key="sc");else if(f==="space")n(pr(ua("space",{negate:h}),t));else if(f==="word")n(nt(Yh(Ci(_i),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:a,removeAllPrevSiblings:l,removeAllNextSiblings:u}){const{kind:d,flags:f}=e;if(d==="flags")if(!f.enable&&!f.disable)r();else{const h=Rn({flags:f});h.body[0].body=u(),a(nt(h,t),{traverse:!0})}else if(d==="keep"){const h=n.body[0],m=n.body.length===1&&XE(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(_e`Uses "\K" in a way that's unsupported`);const y=Xr({behind:!0});y.body[0].body=l(),a(nt(y,t))}else throw new Error(`Unexpected directive kind "${d}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.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){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(nt(Xr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Rn();t.body[0].body.push(e.body),e.body=nt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,a=!1;for(const l of e.body)if(l.body.length===1&&l.body[0].kind==="search_start")l.body.pop();else{const u=dw(l.body);u?(r=!0,Array.isArray(u)?n.push(...u):n.push(u)):a=!0}r&&!a&&n.forEach(l=>t.add(l))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(_e`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Wh(n)&&(n=qh(n,t),e.ref=n)}},eH={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:a}=e;r||n.set(e,[...t.get(a).map(({node:l})=>l)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:a,groupsByName:l,multiplexCapturesToLeftByRef:u,openRefs:d,reffedNodesByReferencer:f}){const h=a.get(e);if(h&&d.has(e.number)){const m=pr(s_(e.number),t);f.set(m,d.get(e.number)),n(m);return}d.set(e.number,e),u.set(e.number,[]),e.name&&Gs(u,e.name,[]);const p=u.get(e.name??e.number);for(let m=0;m<p.length;m++){const y=p[m];if(h===y.node||h&&h===y.origin||e===y.origin){p.splice(m,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const m=Gs(l,e.name,new Map);let y=!1;if(h)y=!0;else for(const b of m.values())if(!b.hasDuplicateNameToRemove){y=!0;break}l.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:y})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Oc(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:a,ref:l}=e;if(a){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===l||p.number===l)););r.reffedNodesByReferencer.set(e,p);return}const u=r.subroutineRefMap.get(l),d=l===0,f=d?s_(0):lw(u,r.groupOriginByCopy,null);let h=f;if(!d){const p=uw(rH(u,y=>y.type==="Group"&&!!y.flags)),m=p?Oc(r.globalFlags,p):r.globalFlags;nH(m,r.currentFlags)||(h=Rn({flags:oH(m)}),h.body[0].body.push(f))}n(nt(h,t),{traverse:!d})}},tH={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const l=r.reffedNodesByReferencer.get(e).filter(u=>iH(u,e));if(!l.length)n(nt(Xr({negate:!0}),t));else if(l.length>1){const u=Rn({atomic:!0,body:l.reverse().map(d=>co({body:[Yp(d.number)]}))});n(nt(u,t))}else e.ref=l[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const a=QE();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function sw(e){Ms(e,{"*"({node:t,parent:n}){t.parent=n}})}function nH(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function iH(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=cw(n.parent);for(const a of r){if(a===n)break;if(a===e||fw(a,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function lw(e,t,n,r){const a=Array.isArray(e)?[]:{};for(const[l,u]of Object.entries(e))l==="parent"?a.parent=Array.isArray(n)?r:n:u&&typeof u=="object"?a[l]=lw(u,t,a,n):(l==="type"&&u==="CapturingGroup"&&t.set(a,t.get(e)??e),a[l]=u);return a}function s_(e){const t=JE(e);return t.isRecursive=!0,t}function rH(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function qh(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function uw(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(a=>{r.enable?.[a]&&(delete n.disable[a],n.enable[a]=!0),r.disable?.[a]&&(n.disable[a]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function oH({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function cw(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function dw(e){const t=e.find(n=>n.kind==="search_start"||lH(n,{negate:!1})||!aH(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const a=dw(r.body);if(!a)return null;Array.isArray(a)?n.push(...a):n.push(a)}return n}return null}function fw(e,t){const n=cw(e)??[];for(const r of n)if(r===t||fw(r,t))return!0;return!1}function aH({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function sH(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function lH(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&XE(e.body[0],{type:"Assertion",kind:"search_start"})}function Wh(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ci(e,t){const r=KE(e,{...t,unicodePropertyMap:ng}).body;return r.length>1||r[0].body.length>1?Rn({body:r}):r[0].body[0]}function Yh(e,t){return e.negate=t,e}function pr(e,t){return e.parent=t,e}function nt(e,t){return sw(e),e.parent=t,e}function uH(e,t){const n=rw(t),r=Qp(n.target,"ES2024"),a=Qp(n.target,"ES2025"),l=n.rules.recursionLimit;if(!Number.isInteger(l)||l<2||l>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,d=null;if(!a){const b=[e.flags.ignoreCase];Ms(e,cH,{getCurrentModI:()=>b.at(-1),popModI(){b.pop()},pushModI(S){b.push(S)},setHasCasedChar(){b.at(-1)?u=!0:d=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!d)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:l,useAppliedIgnoreCase:!!(!a&&u&&d),useFlagMods:a,useFlagV:r,verbose:n.verbose};function m(b){return p.lastNode=h,h=b,Fz(dH[b.type],`Unexpected node type "${b.type}"`)(b,p,m)}const y={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete y.options.force.v,y.options.disable.v=!0,y.options.unicodeSetsPlugin=null),y._captureTransfers=new Map,y._hiddenCaptures=[],p.captureMap.forEach((b,S)=>{b.hidden&&y._hiddenCaptures.push(S),b.transferTo&&Gs(y._captureTransfers,b.transferTo,[]).push(S)}),y}var cH={"*":{enter({node:e},t){if(u_(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Oc({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){u_(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ig(ht(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),hw(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&aw.has(e.value)&&t.setHasCasedChar()}},dH={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?_e`\B`:_e`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:a,number:l}=e,u={ignoreCase:t.currentFlags.ignoreCase},d=t.originMap.get(e);return d&&(u.hidden=!0,l>d.number&&(u.transferTo=d.number)),t.captureMap.set(l,u),`(${a?`?<${a}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=ht(e),r=oa(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ig(n)){const a=ow(n);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:a,parent:l}=e;let{body:u}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Dn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&u.some(c_)&&(u=[ed(45),...u.filter(h=>!c_(h))]);const d=()=>`[${a?"^":""}${u.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Dn.bugNestedClassIgnoresNegation)&&!a){const p=u.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=Rn(),y=m.body[0];return m.parent=l,y.parent=m,u=u.filter(b=>!p.includes(b)),e.body=u,u.length?(e.parent=y,y.body.push(e)):m.body.pop(),p.forEach(b=>{const S=co({body:[b]});b.parent=S,S.parent=m,m.body.push(S)}),n(m)}}t.inCharClass=!0;const h=d();return t.inCharClass=!1,h}const f=u[0];if(r==="union"&&!a&&f&&((!t.useFlagV||!t.verbose)&&l.kind==="union"&&!(Dn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&l.kind==="intersection"&&u.length===1&&f.type!=="CharacterClassRange"))return u.map(n).join("");if(!t.useFlagV&&l.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return d()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},l=oa(n,a),u=oa(r,a),d=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=hw(e);gH(f).forEach(p=>{d.add(Array.isArray(p)?`${oa(p[0],a)}-${oa(p[1],a)}`:oa(p,a))})}return`${l}-${u}${[...d].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":_e`[^\n]`;if(e==="digit")return t?_e`\D`:_e`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&aw.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?_e`\P`:_e`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?_e`\W`:_e`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},a,l){const u=a.currentFlags;n&&(a.currentFlags=Oc(u,n));const d=t.map(l).join("|"),f=!a.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!a.useFlagMods||!n)?d:`(?${vH(e,n,a.useFlagMods)}${d})`;return a.currentFlags=u,f},LookaroundAssertion({body:e,kind:t,negate:n},r,a){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,n){return n(e.body)+yH(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:_e`\g<${t}&R=${r}>`}},fH=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),hH=new Set(["-","\\","]","^","["]),pH=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),l_=new Map([[9,_e`\t`],[10,_e`\n`],[11,_e`\v`],[12,_e`\f`],[13,_e`\r`],[8232,_e`\u2028`],[8233,_e`\u2029`],[65279,_e`\uFEFF`]]),mH=new RegExp("^\\p{Cased}$","u");function ig(e){return mH.test(e)}function hw(e,t){const n=!!t?.firstOnly,r=e.min.value,a=e.max.value,l=[];if(r<65&&(a===65535||a>=131071)||r===65536&&a>=131071)return l;for(let u=r;u<=a;u++){const d=ht(u);if(!ig(d))continue;const f=ow(d).filter(h=>{const p=h.codePointAt(0);return p<r||p>a});if(f.length&&(l.push(...f),n))break}return l}function oa(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(l_.has(e))return l_.get(e);if(e<32||e>126&&e<160||e>262143||t&&bH(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=n?r?pH:hH:fH,l=ht(e);return(a.has(l)?"\\":"")+l}function gH(e){const t=e.map(a=>a.codePointAt(0)).sort((a,l)=>a-l),n=[];let r=null;for(let a=0;a<t.length;a++)t[a+1]===t[a]+1?r??=t[a]:r===null?n.push(t[a]):(n.push([r,t[a]]),r=null);return n}function vH(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:a,disable:l}=t;r=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(l?"-":"")+(l?.ignoreCase?"i":"")+(l?.dotAll?"s":"")}return`${r}:`}function yH({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function u_({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function bH(e){return e>47&&e<58}function c_({type:e,value:t}){return e==="Character"&&t===45}var SH=class Zp extends RegExp{#e=new Map;#t=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(t,n,r){const a=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const l=t;super(l,n),this.#i=l.source,l instanceof Zp&&(this.#e=l.#e,this.#n=l.#n,this.#r=l.#r,this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...r};super(a?"":t,n),this.#i=t,this.#e=CH(l.hiddenCaptures,l.transfers),this.#r=l.strategy,this.rawOptions=r??{}}a||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:a,...l}=this.rawOptions;this.#t=new Zp(this.#i,this.flags,l)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#r==="clip_search"&&n&&r){this.lastIndex=0;const a=this.#o(t.slice(r));return a&&(_H(a,r,t,this.hasIndices),this.lastIndex+=r),a}return this.#o(t)}#o(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const r=[...n];n.length=1;let a;this.hasIndices&&(a=[...n.indices],n.indices.length=1);const l=[0];for(let u=1;u<r.length;u++){const{hidden:d,transferTo:f}=this.#e.get(u)??{};if(d?l.push(null):(l.push(n.length),n.push(r[u]),this.hasIndices&&n.indices.push(a[u])),f&&r[u]!==void 0){const h=l[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=r[u],this.hasIndices&&(n.indices[h]=a[u]),n.groups){this.#n||(this.#n=xH(this.source));const p=this.#n.get(f);p&&(n.groups[p]=r[u],this.hasIndices&&(n.indices.groups[p]=a[u]))}}}return n}};function _H(e,t,n,r){if(e.index+=t,e.input=n,r){const a=e.indices;for(let u=0;u<a.length;u++){const d=a[u];d&&(a[u]=[d[0]+t,d[1]+t])}const l=a.groups;l&&Object.keys(l).forEach(u=>{const d=l[u];d&&(l[u]=[d[0]+t,d[1]+t])})}}function CH(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,a]of t)for(const l of a)Gs(n,l,{}).transferTo=r;return n}function xH(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,a=0,l;for(;l=t.exec(e);){const{0:u,groups:{capture:d,name:f}}=l;u==="["?r++:r?u==="]"&&r--:d&&(a++,f&&n.set(a,f))}return n}function EH(e,t){const n=wH(e,t);return n.options?new SH(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function wH(e,t){const n=rw(t),r=KE(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ng}),a=Zz(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),l=uH(a,n),u=Bz(l.pattern,{captureTransfers:l._captureTransfers,hiddenCaptures:l._hiddenCaptures,mode:"external"}),d=Uz(u.pattern),f=Pz(d.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${l.flags}${l.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((S,_)=>S-_),m=Array.from(f.captureTransfers),y=a._strategy,b=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||y||b)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...y&&{strategy:y},...b&&{lazyCompile:b}})}return h}function kH(e,t){return EH(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function LH(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>kH(n,{target:t.target}),{createScanner(n){return new jI(n,t)},createString(n){return{content:n}}}}async function pw(e){if(uE())throw new 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.`);const t=zh.get(e);if(t!=null)return t;try{let n=D2.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Hp,e)&&(n=Hp[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const r=n().then(({default:a})=>{const l={name:e,data:a};return uo.has(e)||uo.set(e,l),l});return zh.set(e,r),await r}finally{zh.delete(e)}}function mw(e){return uo.get(e)??pw(e)}const Jp=new Set;function $s(e){const t=[],n=new Set;for(const m of TH(e.themes)){const y=gw(m)?m.getThemes():[m];for(const b of y){if(n.has(b.name))throw new Error(`Theme collection already contains theme "${b.name}"`);n.add(b.name),t.push(b)}}const r=Object.freeze([...t]),a=Object.freeze(r.filter(m=>m.colorScheme==="light")),l=Object.freeze(r.filter(m=>m.colorScheme==="dark")),u=new Map(r.map(m=>[m.name,m])),d=Object.freeze(r.map(m=>m.name)),f=Object.freeze(a.map(m=>m.name)),h=Object.freeze(l.map(m=>m.name));function p(m){if(m==null)return r;const{colorScheme:y,collection:b}=m;return b==null?y==="light"?a:y==="dark"?l:r:r.filter(S=>S.collection!==b?!1:y==null||S.colorScheme===y)}return{getTheme(m){return u.get(m)},getThemes(m){return p(m)},getThemeNames(m){return m?.collection==null?m?.colorScheme==="light"?f:m?.colorScheme==="dark"?h:d:p(m).map(y=>y.name)},hasTheme(m){return u.has(m)},orderBy(m){return $s({themes:r.map((y,b)=>({descriptor:y,index:b})).sort((y,b)=>{const S=m(y.descriptor,b.descriptor);return S!==0?S:y.index-b.index}).map(y=>y.descriptor)})},pick(m){const y=[],b=new Set;for(const S of m){if(b.has(S))throw new Error(`Theme collection pick already includes theme "${S}"`);b.add(S);const _=u.get(S);if(_==null)throw new Error(`Theme collection does not contain theme "${S}"`);y.push(_)}return $s({themes:y})},registerInto(m){for(const y of r)m.registerThemeIfAbsent(y.name,y.load)}}}function TH(e){return AH(e)?[e]:e}function AH(e){return gw(e)||RH(e)}function RH(e){return typeof e.name=="string"&&typeof e.load=="function"}function gw(e){return typeof e.getThemes=="function"}function vw(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var OH=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},DH=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},MH=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function NH(){const e=new Map,t=new Map,n=new Map;let r=0;function a(x,E){if(e.has(x))throw new OH(x);e.set(x,E)}function l(x,E){return e.has(x)?!1:(e.set(x,E),!0)}function u(x){return e.has(x)}function d(x){const E=t.get(x);if(E!==void 0)return Promise.resolve(E);const L=n.get(x);if(L!==void 0)return L;const A=e.get(x);if(A===void 0)return Promise.reject(new DH(x));const R=r,N=A().then(H=>{const U=vw(H);return R===r&&t.set(x,U),n.get(x)===N&&n.delete(x),U}).catch(H=>{throw n.get(x)===N&&n.delete(x),H});return n.set(x,N),N}function f(x){return Promise.all(x.map(E=>d(E)))}function h(x,E){t.set(x,E)}function p(x){for(const[E,L]of x)h(E,L)}function m(x){return t.get(x)}function y(x){const E=[];for(const L of x){const A=t.get(L);if(A===void 0)throw new MH(L);E.push(A)}return E}function b(x){return t.has(x)}function S(x){for(const E of x)if(!t.has(E))return!1;return!0}function _(x){const E=t.get(x);return E!==void 0?E:d(x)}function w(){r++,t.clear(),n.clear()}return{clearResolvedThemes:w,getResolvedOrResolveTheme:_,getResolvedTheme:m,getResolvedThemes:y,hasRegisteredTheme:u,hasResolvedTheme:b,hasResolvedThemes:S,registerTheme:a,registerThemeIfAbsent:l,resolveTheme:d,resolveThemes:f,seedResolvedTheme:h,seedResolvedThemes:p}}const Mn=NH();function em(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=Mn.getResolvedTheme(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,Mn.getResolvedTheme(n)==null&&Mn.seedResolvedTheme(n,r);Jp.has(n)||(Jp.add(n),t.loadThemeSync(r))}}function yw({name:e,load:t,colorScheme:n,collection:r,displayName:a}){return{name:e,colorScheme:n,collection:r,displayName:a,load:IH(t)}}function IH(e){return async()=>Qc(vw(await e()))}const zH="pierre",HH=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],bw=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],PH=[...bw,...HH],UH=new Set(bw);function VH(e){return UH.has(e)?"light":"dark"}const BH={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},jH={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function FH(e){return yw({name:e,collection:zH,colorScheme:VH(e),displayName:BH[e],load:jH[e]})}const Sw=$s({themes:PH.map(e=>FH(e))}),GH="shiki",_w=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],$H=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],qH=new Set(_w);function WH(e){return qH.has(e)?"light":"dark"}const YH={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-BRVnQi9A.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-hvxz__6c.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-5qJOZa0Y.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-CpvCGNkr.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-Dlz6yCKv.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function d_(e){return yw({name:e,collection:GH,colorScheme:WH(e),load:YH[e]})}const Cw=$s({themes:Object.freeze([..._w.map(e=>d_(e)),...$H.map(e=>d_(e))])});$s({themes:[Sw,Cw]});function xw(e){if(uE())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Mn.hasRegisteredTheme(e))return;const t=Cw.getTheme(e);if(t!=null){Mn.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Ew(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function XH(e){xw(e);const t=await Mn.resolveTheme(e);return Ew(e,t),t}function KH(e){return Mn.getResolvedTheme(e)??XH(e)}let qn;async function Dc({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){qn??=BI({themes:[],langs:["text"],engine:n==="shiki-wasm"?pE(k(()=>import("./wasm-CG6Dc4jp.js"),[])):LH()});const r=QH(qn)?await qn:qn;qn=r;const a=[];for(const u of t){if(u==="text"||u==="ansi")continue;const d=mw(u);"then"in d?a.push(d):TS(d,r)}const l=[];for(const u of e){const d=KH(u);"then"in d?l.push(d):em(d,qn)}return(a.length>0||l.length>0)&&await Promise.all([Promise.all(a).then(u=>{TS(u,r)}),Promise.all(l).then(u=>{em(u,r)})]),r}function ww(){if(qn!=null&&!("then"in qn))return qn}function QH(e=qn){return e!=null&&"then"in e}for(const e of Sw.getThemes())Mn.registerThemeIfAbsent(e.name,e.load);function qs(e=it){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ns(e){for(const t of qs(e))if(!Jp.has(t))return!1;return!0}function tm(e){return Mn.hasResolvedThemes(e)}function ki(e,t){return Ea(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function rd(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function nm(e){return Ce({tagName:"div",children:[Ce({tagName:"div",children:e.annotations?.map(t=>Ce({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function ZH(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 kw({fileOrDiff:e,mode:t,stickyHeader:n}){const r="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?"":void 0};return Ce({tagName:"div",children:[t==="custom"?Ce({tagName:"slot",properties:{name:el}}):JH({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),...t==="custom"?[]:[eP(r)]],properties:a})}function JH({name:e,prevName:t,iconType:n}){const r=[Ce({tagName:"slot",properties:{name:jm}}),yc({name:ZH(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Ce({tagName:"div",children:[Ce({tagName:"bdi",children:[Qn(t)]})],properties:{"data-prev-name":""}})),r.push(yc({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(Ce({tagName:"div",children:[Ce({tagName:"bdi",children:[Qn(e)]})],properties:{"data-title":""}})),r.push(Ce({tagName:"slot",properties:{name:Fm}})),Ce({tagName:"div",children:r,properties:{"data-header-content":""}})}function eP(e){const t=[];if(e!=null){let n=0,r=0;for(const a of e.hunks)n+=a.additionLines,r+=a.deletionLines;(r>0||n===0)&&t.push(Ce({tagName:"span",children:[Qn(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(Ce({tagName:"span",children:[Qn(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(Ce({tagName:"slot",properties:{name:Gm}})),Ce({tagName:"div",children:t,properties:{"data-metadata":""}})}function Lw(e){return Ce({tagName:"pre",properties:tP(e)})}function tP({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:a,totalLines:l,type:u,customProperties:d}){return{...d,"data-diff":u==="diff"?"":void 0,"data-file":u==="file"?"":void 0,"data-diff-type":u==="diff"?a?"split":"single":void 0,"data-overflow":r,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${l}`.length}ch;`}}const Yr=new Map;let nP=0;const Es={"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",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"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",mts:"typescript",cts:"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 It(e){if(Yr.has(e))return Yr.get(e)??"text";if(Es[e]!=null)return Es[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Yr.has(t[1]))return Yr.get(t[1])??"text";if(Es[t[1]]!=null)return Es[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Yr.has(n)?Yr.get(n)??"text":Es[n]??"text"}function iP(){return nP}function rP(){return Object.fromEntries(Yr)}function Tw(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:qs(t),preferredHighlighter:n}}function Nn(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function oP(e,t,n){const r=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(r==null){const a=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(a,{node:e,line:t,state:n}),new Error(a)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,e.children.length===0&&e.children.push(Qn(`
|
|
186
|
+
`)),e}const Hu=Symbol("no-token"),Xh=Symbol("multiple-tokens");function Aw(e){const t=aP(e);if(t!=null)return t;let n=Hu;const r=[];let a=[],l;const u=()=>{if(a.length===0||l==null){a=[],l=void 0;return}if(a.length===1){const f=a[0];if(f?.type==="element"){sP(f,l);for(const h of f.children)oc(h)}else oc(f);r.push(f),a=[],l=void 0;return}for(const f of a)oc(f);r.push(Ce({tagName:"span",properties:{"data-char":l},children:a})),a=[],l=void 0},d=f=>{if(f!==Hu){if(f===Xh){n=Xh;return}if(n===Hu){n=f;return}n!==f&&(n=Xh)}};for(const f of e.children){const h=f.type==="element"?Aw(f):Hu;if(d(h),typeof h!="number"){u(),r.push(f);continue}l!=null&&l!==h&&u(),l??=h,a.push(f)}return u(),e.children=r,n}function aP(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function oc(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)oc(t)}}function sP(e,t){e.properties["data-char"]=t}function lP(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=d=>d}=e,a=new Map;function l(d){return Object.entries(d).map(([f,h])=>`${f}:${h}`).join(";")}function u(d){const f=typeof d=="string"?d:l(d);let h=t+uP(f)+n;return h=r(h),a.has(h)||a.set(h,typeof d=="string"?d:{...d}),h}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const f=u(d.properties.style);delete d.properties.style,this.addClassToHast(d,f)},tokens(d){for(const f of d)for(const h of f){if(!h.htmlStyle)continue;const p=u(h.htmlStyle);h.htmlStyle={},h.htmlAttrs||={},h.htmlAttrs.class?h.htmlAttrs.class+=` ${p}`:h.htmlAttrs.class=p}},getClassRegistry(){return a},getCSS(){let d="";for(const[f,h]of a.entries())d+=`.${f}{${typeof h=="string"?h:l(h)}}`;return d},clearRegistry(){a.clear()}}}function uP(e,t=0){let n=3735928559^t,r=1103547991^t;for(let a=0,l;a<e.length;a++)l=e.charCodeAt(a),n=Math.imul(n^l,2654435761),r=Math.imul(r^l,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 Rw(e=!1,t=!1){const n={lineInfo:[]},r=[{line(a){return delete a.properties.class,a},pre(a){const l=tM(a),u=[];if(l!=null){let d=1;for(const f of l.children)f.type==="element"&&(e&&Aw(f),u.push(oP(f,d,n)),d++);l.children=u}return a},...e?{tokens(a){for(const l of a){let u=0;for(const d of l){const f=d;f.__lineChar??=u,u+=d.content.length}}},preprocess(a,l){l.mergeWhitespaces="never"},span(a,l,u,d,f){if(f?.offset!=null&&f.content!=null){const h=f.__lineChar;return h!=null&&(a.properties["data-char"]=h),a}return a}}:null}];return t&&r.push(cP,f_),e&&r.push({line:a=>(a.type==="element"&&a.children.length===0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]}),a)}),{state:n,transformers:r,toClass:f_}}const f_=lP({classPrefix:"hl-"}),cP={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const r={};n.color!=null&&(r.color=n.color),n.bgColor!=null&&(r["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(r["font-style"]="italic"),(n.fontStyle&2)!==0&&(r["font-weight"]="bold"),(n.fontStyle&4)!==0&&(r["text-decoration"]="underline")),Object.keys(r).length>0&&(n.htmlStyle=r)}}};function un(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const dP=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,fP=/^0(?:\.0+)?%?$/;function hP(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const r=e.slice(t+1,-1).trim();if(r.length===0)return;const a=r.lastIndexOf("/");if(a!==-1)return r.slice(a+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const l=r.split(",");if(l.length===4)return l[3]?.trim()}}function pP(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let r,a=1;return n.length===3?r=n.split("").map(l=>l+l).join(""):n.length===6?r=n:(r=n.slice(0,6),a=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),a]}function Kh(e){if(e==null)return null;const t=pP(e);if(t==null)return null;const n=t[0]/255,r=t[1]/255,a=t[2]/255,l=u=>u<=.03928?u/12.92:((u+.055)/1.055)**2.4;return .2126*l(n)+.7152*l(r)+.0722*l(a)}function h_(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||dP.test(t))return!0;const n=hP(t);return n!=null&&fP.test(n)}function mP(e,t,n){if(t==null||n==null)return!1;const r=Kh(e),a=Kh(t),l=Kh(n);return r==null||a==null||l==null?!1:Math.abs(r-l)<Math.abs(r-a)}const p_=new WeakMap;function Qh(e){const t=p_.get(e);if(t!=null)return t;const n=e.colors??{},r={...n},a=n["editor.background"]??e.bg,l=n["editor.foreground"]??e.fg,u=n["sideBar.background"]??a,d=n["sideBar.foreground"]??l;Bn(r,"editor.background",a),Bn(r,"editor.foreground",l),Bn(r,"sideBar.background",u),Bn(r,"sideBar.foreground",d),Bn(r,"input.background",n["input.background"]??u),Bn(r,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??d),Bn(r,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??d),Bn(r,"gitDecoration.addedResourceForeground",Zh(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),Bn(r,"gitDecoration.modifiedResourceForeground",Zh(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),Bn(r,"gitDecoration.deletedResourceForeground",Zh(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const f=(h_(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(h_(n.focusBorder)?void 0:n.focusBorder);f!=null?r["list.focusOutline"]=f:delete r["list.focusOutline"];const h=n["list.hoverBackground"];h!=null&&(gP(h,u)||mP(h,u,d))&&delete r["list.hoverBackground"];const p=Object.freeze({...e,colors:Object.freeze(r)});return p_.set(e,p),p}function Bn(e,t,n){n!=null&&n!==""&&(e[t]=n)}function Zh(...e){for(const t of e)if(t!=null&&t!=="")return t}function gP(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Ow({theme:e=it,highlighter:t,prefix:n}){let r="";if(typeof e=="string"){const a=t.getTheme(e),l=Qh(a);r+=`color:${l.fg};`,r+=`background-color:${l.bg};`,r+=`${un("global")}fg:${l.fg};`,r+=`${un("global")}bg:${l.bg};`,r+=Jh(a,n)}else{let a=t.getTheme(e.dark),l=Qh(a);r+=`${un("global")}dark:${l.fg};`,r+=`${un("global")}dark-bg:${l.bg};`,r+=Jh(a,"dark"),a=t.getTheme(e.light),l=Qh(a),r+=`${un("global")}light:${l.fg};`,r+=`${un("global")}light-bg:${l.bg};`,r+=Jh(a,"light")}return r}function Jh(e,t){t=t!=null?`${t}-`:"";let n="";const r=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];r!=null&&(n+=`${un("global")}${t}addition-color:${r};`);const a=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];a!=null&&(n+=`${un("global")}${t}deletion-color:${a};`);const l=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return l!=null&&(n+=`${un("global")}${t}modified-color:${l};`),n}function im(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}const m_=10,g_=13,vP=4,yP=40;function bP(e){const t=[0];let n=e.indexOf("\r"),r=e.indexOf(`
|
|
187
|
+
`),a=0,l=0;for(;n!==-1||r!==-1;){let u;if(n!==-1&&(r===-1||n<r)?r===n+1?(u=r+1,n=e.indexOf("\r",u),r=e.indexOf(`
|
|
188
|
+
`,u)):(u=n+1,n=e.indexOf("\r",u)):(u=r+1,r=e.indexOf(`
|
|
189
|
+
`,u)),t.push(u),++l===vP){if(u-a<=yP){for(let d=u;d<e.length;d++){const f=e.charCodeAt(d);(f===m_||f===g_)&&(f===g_&&d+1<e.length&&e.charCodeAt(d+1)===m_&&d++,t.push(d+1))}return t}a=u,l=0}}return t}function ac(e){const t=bP(e);return Array.from({length:t.length},(n,r)=>{const a=t[r],l=t[r+1]??e.length;return e.slice(a,l)})}const SP={forcePlainText:!1};function Dw(e,t,{theme:n=it,tokenizeMaxLineLength:r,useTokenTransformer:a},{forcePlainText:l,startingLine:u,totalLines:d,lines:f}=SP){l?(u??=0,d??=1/0):(u=0,d=1/0);const h=u>0||d<1/0,{state:p,transformers:m}=Rw(a),y=l?"text":e.lang??It(e.name),b=typeof n=="string"?t.getTheme(n).type:void 0,S=Ow({theme:n,highlighter:t});p.lineInfo=E=>({type:"context",lineIndex:E-1+u,lineNumber:E+u});const _=typeof n=="string"?{lang:y,theme:n,transformers:m,defaultColor:!1,cssVariablePrefix:un("token"),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:y,themes:n,transformers:m,defaultColor:!1,cssVariablePrefix:un("token"),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},w=im(t.codeToHast(h?_P(f??ac(e.contents),u,d):e.contents,_)),x=h?new Array(u):w;return h&&x.push(...w),{code:x,themeStyles:S,baseThemeType:b}}function _P(e,t,n){if(e.length===0)return"";const r=Math.min(t+n,e.length);return e.slice(t,r).join("")}const Mw="-1,-1";function rm(e){return e?.some(t=>t.lineNumber===0)??!1}function om(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function od(e){return e.startingLine===0&&e.totalLines>0}function Nw(e,t){return e.endsWith(`\r
|
|
190
|
+
`)?t+`\r
|
|
191
|
+
`:e.endsWith("\r")?t+"\r":e.endsWith(`
|
|
192
|
+
`)?t+`
|
|
193
|
+
`:t}function Iw(e,t){return Ce({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Ws(e){return(e.lang??It(e.name))==="text"}function Pu(e,t){return t.cacheKey==null?e.file===t&&e.sourceContents===t.contents:e.cacheKey===t.cacheKey}let CP=-1;var xP=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++CP}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;pendingStructuralRows;textDocumentCache=new WeakMap;editSessionActive=!1;constructor(e={theme:it},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Ns(e.theme??it)?ww():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}beginEditSession(){this.editSessionActive=!0}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0,this.endEditSession(),this.textDocumentCache=new WeakMap}syncEditedContentsToFile(){const{renderCache:e,lineCache:t}=this;e?.isDirty!==!0||t==null||!Pu(t,e.file)||(e.file.contents=t.lines.join(""))}hasUnkeyedFileContentsChanged(e){const{lineCache:t}=this;return e.cacheKey==null&&t!=null&&t.file===e&&t.sourceContents!==e.contents}invalidateChangedUnkeyedFile(e){this.hasUnkeyedFileContentsChanged(e)&&(this.workerManager?.cleanUpTasks(this),this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap)}clearRenderCache(){this.syncEditedContentsToFile(),this.pendingStructuralRows=void 0;const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.file.cacheKey!=null&&this.workerManager?.evictFileFromCache(e.file.cacheKey)}hydrate(e){const{options:t}=this.getRenderOptions(e),n=ep(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let r=this.workerManager?.getFileResultCache(e);r!=null&&!ki(t,r.options)&&(r=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Ws(e),result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??It(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??it}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getFileRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const a=this.workerManager.getFileRenderOptions();return this.editSessionActive&&a.useTokenTransformer!==!0?{...a,useTokenTransformer:!0}:a}const{tokenizeMaxLineLength:r=1e3}=this.options;return{theme:this.getLocalHighlightTheme(),useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!An(e,n.file)||!ki(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){this.invalidateChangedUnkeyedFile(e);let{lineCache:t}=this;return(t==null||!Pu(t,e))&&(t={cacheKey:e.cacheKey,file:e,sourceContents:e.contents,lines:ac(e.contents)}),this.lineCache=t,t.lines}getLineCount(e){const t=this.getOrCreateLineCache(e);return this.textDocumentCache.get(e)?.lineCount??t.length}updateRenderCache(e,t,n=!1){if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:r,result:a}=this.renderCache;if(a==null)return;const l=n?new Map:void 0;this.pendingStructuralRows=l;const u=this.lineCache!=null&&Pu(this.lineCache,r)?this.lineCache:void 0;for(const[d,f]of e){if(l===void 0&&u!=null&&d<u.lines.length){const p=f.map(m=>m[2]).join("");u.lines[d]=Nw(u.lines[d]??"",p)}const h={type:"element",tagName:"div",properties:{"data-line":d+1,"data-line-type":"context","data-line-index":d},children:f.map(([p,m,y])=>p===0&&m===""?y===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:y}:{type:"element",tagName:"span",properties:{"data-char":p,style:`color:${m};`},children:[{type:"text",value:y}]})};l!==void 0?l.set(d,h):a.code[d]=h}a.baseThemeType=t,this.renderCache.isDirty=!0}applyDocumentChange(e){const t=this.pendingStructuralRows;if(this.pendingStructuralRows=void 0,this.renderCache==null)return;const{file:n,result:r}=this.renderCache;if(r==null)return;const a=this.lineCache!=null&&Pu(this.lineCache,n)?this.lineCache.lines:ac(n.contents),l=ac(e.getText());if(a.length!==l.length){const u=Math.min(a.length,l.length);let d=0;for(;d<u&&a[d]===l[d];)d++;let f=0;for(;f<u-d&&a[a.length-1-f]===l[l.length-1-f];)f++;const h=r.code;r.code=new Array(l.length);for(let p=0;p<d;p++)r.code[p]=h[p];for(let p=0;p<f;p++)r.code[l.length-1-p]=h[a.length-1-p];if(t!==void 0)for(const[p,m]of t)p<l.length&&(r.code[p]=m);for(let p=d;p<l.length-f;p++)r.code[p]??={type:"element",tagName:"div",properties:{"data-line":p+1,"data-line-type":"context","data-line-index":p},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:e.getLineText(p)}]}]};for(let p=0;p<r.code.length;p++){const m=r.code[p];m?.type==="element"&&(m.properties["data-line"]=p+1,m.properties["data-line-index"]=p)}this.renderCache.isDirty=!0}this.lineCache={cacheKey:n.cacheKey,file:n,sourceContents:n.contents,lines:l},this.textDocumentCache.set(n,e)}renderFile(e=this.renderCache?.file,t=gc){if(e==null)return;this.invalidateChangedUnkeyedFile(e),this.renderCache?.isDirty===!0&&!An(e,this.renderCache.file)&&(this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap);let{options:n,forceHighlight:r}=this.getRenderOptions(e);this.renderCache?.isDirty===!0&&!ki(n,this.renderCache.options)&&this.clearRenderCache();const a=this.getMatchingWorkerResultCache(e,n);a!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...a},r=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const l=this.getOrCreateLineCache(e),u=e.contents.length>0,d=!u||Ws(e)||ep(l.length,this.getTokenizeMaxLength()),f=!An(e,this.renderCache.file),h=!rd(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0)(d||this.renderCache.result==null||!this.renderCache.highlighted&&(f||h))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||f||h||r)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,l)),this.renderCache.renderRange=t),!d&&u&&(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??It(e.name);const p=this.highlighter!=null&&Ns(n.theme),m=this.highlighter!=null&&Sc(this.computedLang),y=!d&&m;if(this.highlighter!=null&&p&&(r||d||!this.renderCache.highlighted&&y||this.renderCache.result==null)){const{result:b,options:S}=this.renderFileWithHighlighter(e,this.highlighter,d||!m);this.renderCache={file:e,options:S,highlighted:y,result:b,renderRange:void 0}}(!p||!d&&!m)&&this.asyncHighlight(e).then(({result:b,options:S})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,b,S,!d)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=gc){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=ep(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??It(e.name);const n=this.highlighter!=null&&tm(qs(this.getLocalHighlightTheme())),r=t||this.highlighter!=null&&Sc(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e);return{result:Dw(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:a}){const l=this.getLineCount(e),{disableFileHeader:u=!1}=this.options,d=[],f=fa(),h=Math.min(t.startingLine+t.totalLines,l);let p=0;const m=od(t)?om(this.lineAnnotations):void 0;m!=null&&(f.children.push(ln("context","annotation",1)),d.push(nm({hunkIndex:-1,lineIndex:-1,annotations:m.map(y=>Nn(y))})),p++);for(let y=t.startingLine;y<h;y++){const b=y+1,S=n[y];if(S==null){const w="FileRenderer.processFileResult: Line doesnt exist";throw console.error(w,{name:e.name,lineIndex:y,lineNumber:b}),new Error(w)}f.children.push($x("context",b,`${y}`)),d.push(S),p++;const _=this.lineAnnotations[b];_!=null&&(f.children.push(ln("context","annotation",1)),d.push(nm({hunkIndex:0,lineIndex:b,annotations:_.map(w=>Nn(w))})),p++)}return f.properties.style=`grid-row: span ${p}`,{gutterAST:f.children??[],contentAST:d,preAST:this.createPreElement(l),headerAST:u?void 0:this.renderHeader(e),totalLines:l,rowCount:p,themeStyles:r,baseThemeType:a,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return kw({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return Nt(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(Ce({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=fa();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,Iw(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return Nt(t?Ce({tagName:"code",children:e,properties:{"data-code":""}}):e)}async initializeHighlighter(){return this.highlighter=await Dc(Tw(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){if(this.renderCache==null)return;const a=!An(e,this.renderCache.file)||!this.renderCache.highlighted||!ki(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:r,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!ki(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&An(e,n.file)&&ki(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Lw({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function ep(e,t){return e>t}const zw=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
194
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
195
|
+
<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"/>
|
|
196
|
+
</symbol>
|
|
197
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
198
|
+
<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"/>
|
|
199
|
+
</symbol>
|
|
200
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
201
|
+
<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"/>
|
|
202
|
+
</symbol>
|
|
203
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
204
|
+
<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"/>
|
|
205
|
+
</symbol>
|
|
206
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
207
|
+
<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"/>
|
|
208
|
+
</symbol>
|
|
209
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
210
|
+
<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"/>
|
|
211
|
+
</symbol>
|
|
212
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
213
|
+
<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"/>
|
|
214
|
+
</symbol>
|
|
215
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
216
|
+
<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"/>
|
|
217
|
+
</symbol>
|
|
218
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
219
|
+
<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"/>
|
|
220
|
+
</symbol>
|
|
221
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
222
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
223
|
+
</symbol>
|
|
224
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
225
|
+
<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"/>
|
|
226
|
+
</symbol>
|
|
227
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
228
|
+
<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"/>
|
|
229
|
+
</symbol>
|
|
230
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
231
|
+
<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"/>
|
|
232
|
+
</symbol>
|
|
233
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
234
|
+
<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"/>
|
|
235
|
+
</symbol>
|
|
236
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
237
|
+
<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"/>
|
|
238
|
+
</symbol>
|
|
239
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
240
|
+
<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"/>
|
|
241
|
+
</symbol>
|
|
242
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
243
|
+
<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"/>
|
|
244
|
+
</symbol>
|
|
245
|
+
</svg>`;function EP(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function Hw(e,t){return e==null||t==null?e===t:wP(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const v_={};function wP(e=v_,t=v_){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(e[a]!==t[a])return!1;return!0}function Pw(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function Uw(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Vw(){const e=document.createElement("style");return e.setAttribute(mD,""),e}var kP=`@layer base {
|
|
246
|
+
:host {
|
|
247
|
+
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
248
|
+
"Courier New", monospace;
|
|
249
|
+
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
250
|
+
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
251
|
+
--diffs-mixer: light-dark(#000, #fff);
|
|
252
|
+
--diffs-gap-fallback: 8px;
|
|
253
|
+
--diffs-scrollbar-gutter-fallback: 6px;
|
|
254
|
+
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
255
|
+
--diffs-added-light: #0dbe4e;
|
|
256
|
+
--diffs-added-dark: #5ecc71;
|
|
257
|
+
--diffs-modified-light: #009fff;
|
|
258
|
+
--diffs-modified-dark: #69b1ff;
|
|
259
|
+
--diffs-deleted-light: #ff2e3f;
|
|
260
|
+
--diffs-deleted-dark: #ff6762;
|
|
261
|
+
--diffs-warning-light: #d5a910;
|
|
262
|
+
--diffs-warning-dark: #ffd452;
|
|
263
|
+
color-scheme: light dark;
|
|
264
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
265
|
+
font-size: var(--diffs-font-size, 13px);
|
|
266
|
+
line-height: var(--diffs-line-height, 20px);
|
|
267
|
+
font-feature-settings: var(--diffs-font-features);
|
|
268
|
+
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
269
|
+
--diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
|
|
270
|
+
--diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
|
|
271
|
+
--diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
|
|
272
|
+
--diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
|
|
273
|
+
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
274
|
+
--diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
|
|
275
|
+
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
276
|
+
--diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
|
|
277
|
+
--diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
|
|
278
|
+
--diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
|
|
279
|
+
--diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
|
|
280
|
+
--diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
|
|
281
|
+
--diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
|
|
282
|
+
--diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
|
|
283
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
284
|
+
--diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
|
|
285
|
+
background-color: var(--diffs-bg);
|
|
286
|
+
color: var(--diffs-fg);
|
|
287
|
+
display: block;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
pre, code, [data-error-wrapper] {
|
|
291
|
+
isolation: isolate;
|
|
292
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
293
|
+
outline: none;
|
|
294
|
+
margin: 0;
|
|
295
|
+
padding: 0;
|
|
296
|
+
display: block;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
pre, code {
|
|
300
|
+
background-color: var(--diffs-bg);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
code {
|
|
304
|
+
contain: content;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
input, button {
|
|
308
|
+
font-family: inherit;
|
|
309
|
+
font-size: inherit;
|
|
310
|
+
line-height: inherit;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
*, :before, :after {
|
|
314
|
+
box-sizing: border-box;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[data-icon-sprite] {
|
|
318
|
+
display: none;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[data-diffs-header], [data-separator] {
|
|
322
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
[data-diffs-header][data-sticky] {
|
|
326
|
+
z-index: 1;
|
|
327
|
+
background-color: var(--diffs-bg);
|
|
328
|
+
position: sticky;
|
|
329
|
+
top: 0;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
[data-file-info] {
|
|
333
|
+
color: var(--fg);
|
|
334
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
335
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
336
|
+
padding: 10px;
|
|
337
|
+
font-weight: 700;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
[data-diff], [data-file] {
|
|
341
|
+
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
342
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
343
|
+
|
|
344
|
+
&[data-dehydrated] {
|
|
345
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
349
|
+
background-color: var(--diffs-bg-context);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@supports (-webkit-touch-callout: none) {
|
|
354
|
+
:host {
|
|
355
|
+
--diffs-scrollbar-gutter-fallback: 0px;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
[data-line] span {
|
|
360
|
+
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
361
|
+
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
362
|
+
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
363
|
+
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
364
|
+
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
|
|
368
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
369
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
370
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
371
|
+
--diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
|
|
372
|
+
--diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
|
|
373
|
+
--diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
|
|
374
|
+
--diffs-line-bg: var(--diffs-computed-hovered-line-bg);
|
|
375
|
+
color: var(--diffs-fg);
|
|
376
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
[data-line], [data-no-newline] {
|
|
380
|
+
&[data-decoration-bg] {
|
|
381
|
+
--mix-deco-light: 92%;
|
|
382
|
+
--mix-deco-dark: 85%;
|
|
383
|
+
|
|
384
|
+
&[data-decoration-bg-depth="2"] {
|
|
385
|
+
--mix-deco-light: 88%;
|
|
386
|
+
--mix-deco-dark: 80%;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
&[data-decoration-bg-depth="3"] {
|
|
390
|
+
--mix-deco-light: 85%;
|
|
391
|
+
--mix-deco-dark: 78%;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
--diffs-hover-mix-target: var(--diffs-decoration-bg);
|
|
395
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
396
|
+
var(--diffs-bg) var(--mix-deco-light),
|
|
397
|
+
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
398
|
+
var(--diffs-bg) var(--mix-deco-dark),
|
|
399
|
+
var(--diffs-decoration-bg)));
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
404
|
+
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
405
|
+
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
406
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
[data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
|
|
410
|
+
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
411
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
415
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
416
|
+
var(--diffs-bg) 78%,
|
|
417
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
418
|
+
var(--diffs-bg) 68%,
|
|
419
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
420
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
424
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
425
|
+
var(--diffs-bg) 78%,
|
|
426
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
427
|
+
var(--diffs-bg) 68%,
|
|
428
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
429
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
433
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
434
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
:where([data-background]) {
|
|
438
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
439
|
+
--mix-light: 91%;
|
|
440
|
+
--mix-dark: 85%;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
& [data-line], & [data-no-newline] {
|
|
444
|
+
--mix-light: 88%;
|
|
445
|
+
--mix-dark: 80%;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
449
|
+
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
450
|
+
|
|
451
|
+
&[data-line-type="change-deletion"] {
|
|
452
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
453
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
454
|
+
|
|
455
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
456
|
+
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
457
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
461
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
462
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
463
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
464
|
+
var(--diffs-diff-line-mix-target)));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
&[data-line-type="change-addition"] {
|
|
468
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
469
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
470
|
+
|
|
471
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
472
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
473
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
477
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
478
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
479
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
480
|
+
var(--diffs-diff-line-mix-target)));
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
&[data-merge-conflict="current"] {
|
|
484
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
485
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
486
|
+
|
|
487
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
488
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
489
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
493
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
494
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
495
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
496
|
+
var(--diffs-diff-line-mix-target)));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
&[data-merge-conflict="incoming"] {
|
|
500
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
501
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
502
|
+
|
|
503
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
504
|
+
color: var(--diffs-modified-base);
|
|
505
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
509
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
510
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
511
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
512
|
+
var(--diffs-diff-line-mix-target)));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
|
|
518
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
519
|
+
--diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
|
|
520
|
+
|
|
521
|
+
&:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
522
|
+
--mix-selection-light: 82%;
|
|
523
|
+
--mix-selection-dark: 75%;
|
|
524
|
+
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
&:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
|
|
528
|
+
--mix-selection-light: 75%;
|
|
529
|
+
--mix-selection-dark: 60%;
|
|
530
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
531
|
+
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
&:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
535
|
+
--diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
|
|
536
|
+
var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
|
|
537
|
+
var(--mix-selection-light),
|
|
538
|
+
var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
&:where([data-editor-overlay]), &[data-selected-line] {
|
|
542
|
+
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
543
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
544
|
+
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
545
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
546
|
+
var(--diffs-selection-mix-target)));
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
[data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
|
|
551
|
+
--diffs-computed-editor-active-line-bg: color-mix(in lab,
|
|
552
|
+
var(--diffs-computed-selected-line-bg)
|
|
553
|
+
var(--diffs-editor-active-line-source-mix, 100%),
|
|
554
|
+
var(--diffs-selection-emphasis-mix-target));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@media (pointer: fine) {
|
|
558
|
+
[data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {
|
|
559
|
+
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
560
|
+
var(--diffs-computed-editor-active-line-bg) 97%,
|
|
561
|
+
var(--diffs-hover-mix-target)), color-mix(in lab,
|
|
562
|
+
var(--diffs-computed-editor-active-line-bg) 91%,
|
|
563
|
+
var(--diffs-hover-mix-target)));
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
[data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
|
|
568
|
+
color: var(--diffs-selection-number-fg);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
[data-no-newline] {
|
|
572
|
+
user-select: none;
|
|
573
|
+
|
|
574
|
+
& span {
|
|
575
|
+
opacity: .6;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
580
|
+
grid-template-columns: 1fr 1fr;
|
|
581
|
+
display: grid;
|
|
582
|
+
|
|
583
|
+
& [data-additions] {
|
|
584
|
+
border-left: 1px solid var(--diffs-bg);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
& [data-deletions] {
|
|
588
|
+
border-right: 1px solid var(--diffs-bg);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
[data-code] {
|
|
593
|
+
grid-auto-flow: dense;
|
|
594
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
595
|
+
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
596
|
+
overscroll-behavior-x: none;
|
|
597
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
598
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
599
|
+
padding-bottom: max(0px,
|
|
600
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
601
|
+
var(--diffs-scrollbar-gutter)));
|
|
602
|
+
scrollbar-gutter: stable;
|
|
603
|
+
align-self: flex-start;
|
|
604
|
+
display: grid;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
[data-diffs-scrollbar-measure] {
|
|
608
|
+
opacity: 0;
|
|
609
|
+
pointer-events: none;
|
|
610
|
+
scrollbar-gutter: auto;
|
|
611
|
+
grid-template-columns: none;
|
|
612
|
+
width: 100px;
|
|
613
|
+
height: 100px;
|
|
614
|
+
padding: 0;
|
|
615
|
+
position: absolute;
|
|
616
|
+
top: -200px;
|
|
617
|
+
left: -200px;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
[data-container-size] {
|
|
621
|
+
container-type: inline-size;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
[data-code]::-webkit-scrollbar {
|
|
625
|
+
width: 0;
|
|
626
|
+
height: var(--diffs-scrollbar-gutter);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
[data-code]::-webkit-scrollbar-track {
|
|
630
|
+
background: none;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
634
|
+
background-color: #0000;
|
|
635
|
+
background-clip: content-box;
|
|
636
|
+
border: 1px solid #0000;
|
|
637
|
+
border-radius: 3px;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
641
|
+
background-color: #0000;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
@supports ((-moz-appearance: none)) {
|
|
645
|
+
[data-code] {
|
|
646
|
+
scrollbar-width: thin;
|
|
647
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
648
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
653
|
+
& [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
654
|
+
padding-top: 0;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
[data-gutter] {
|
|
659
|
+
grid-template-rows: subgrid;
|
|
660
|
+
grid-template-columns: subgrid;
|
|
661
|
+
z-index: 3;
|
|
662
|
+
background-color: var(--diffs-bg);
|
|
663
|
+
grid-column: 1;
|
|
664
|
+
display: grid;
|
|
665
|
+
position: relative;
|
|
666
|
+
|
|
667
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
668
|
+
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
[data-content] {
|
|
673
|
+
grid-template-rows: subgrid;
|
|
674
|
+
grid-template-columns: subgrid;
|
|
675
|
+
background-color: var(--diffs-bg);
|
|
676
|
+
grid-column: 2;
|
|
677
|
+
min-width: 0;
|
|
678
|
+
display: grid;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
[data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
682
|
+
grid-auto-flow: dense;
|
|
683
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
684
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
685
|
+
display: grid;
|
|
686
|
+
|
|
687
|
+
& [data-code] {
|
|
688
|
+
display: contents;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
& [data-deletions] {
|
|
692
|
+
& [data-gutter] {
|
|
693
|
+
grid-column: 1;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
& [data-content] {
|
|
697
|
+
border-right: 1px solid var(--diffs-bg);
|
|
698
|
+
grid-column: 2;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
& [data-additions] {
|
|
703
|
+
& [data-gutter] {
|
|
704
|
+
border-left: 1px solid var(--diffs-bg);
|
|
705
|
+
grid-column: 3;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
& [data-content] {
|
|
709
|
+
grid-column: 4;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
|
|
715
|
+
overflow: clip;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
[data-overflow="scroll"] [data-gutter] {
|
|
719
|
+
position: sticky;
|
|
720
|
+
left: 0;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
[data-interactive-lines] [data-line] {
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
728
|
+
cursor: pointer;
|
|
729
|
+
touch-action: none;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
[data-content-buffer], [data-gutter-buffer] {
|
|
733
|
+
user-select: none;
|
|
734
|
+
min-height: 1lh;
|
|
735
|
+
position: relative;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
[data-gutter-buffer] {
|
|
739
|
+
padding-left: 2ch;
|
|
740
|
+
padding-right: 1ch;
|
|
741
|
+
|
|
742
|
+
&:before {
|
|
743
|
+
content: "";
|
|
744
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
745
|
+
display: block;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
[data-gutter-buffer="annotation"] {
|
|
750
|
+
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
751
|
+
min-height: 0;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
[data-gutter-buffer="buffer"] {
|
|
755
|
+
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
[data-content-buffer] {
|
|
759
|
+
background-position: 5px 0;
|
|
760
|
+
background-size: 8px 8px;
|
|
761
|
+
background-origin: border-box;
|
|
762
|
+
background-image: repeating-linear-gradient(-45deg,
|
|
763
|
+
transparent,
|
|
764
|
+
transparent calc(3px * 1.414),
|
|
765
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
766
|
+
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
767
|
+
grid-column: 1;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
[data-separator] {
|
|
771
|
+
box-sizing: content-box;
|
|
772
|
+
background-color: var(--diffs-bg);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
[data-separator="simple"] {
|
|
776
|
+
min-height: 4px;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
780
|
+
background-color: var(--diffs-bg-separator);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
784
|
+
height: 32px;
|
|
785
|
+
position: relative;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
[data-separator-wrapper] {
|
|
789
|
+
user-select: none;
|
|
790
|
+
fill: currentColor;
|
|
791
|
+
background-color: var(--diffs-bg);
|
|
792
|
+
align-items: center;
|
|
793
|
+
height: 100%;
|
|
794
|
+
display: flex;
|
|
795
|
+
position: absolute;
|
|
796
|
+
inset-inline: 0;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
[data-content] [data-separator-wrapper] {
|
|
800
|
+
display: none;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
[data-separator="metadata"] [data-separator-wrapper] {
|
|
804
|
+
background-color: var(--diffs-bg-separator);
|
|
805
|
+
height: 100%;
|
|
806
|
+
color: var(--diffs-fg-number);
|
|
807
|
+
white-space: nowrap;
|
|
808
|
+
text-overflow: ellipsis;
|
|
809
|
+
min-width: min-content;
|
|
810
|
+
padding-inline: 1ch;
|
|
811
|
+
inset-inline: 100% auto;
|
|
812
|
+
overflow: hidden;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
[data-separator="line-info"] {
|
|
816
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
817
|
+
|
|
818
|
+
& [data-separator-wrapper] {
|
|
819
|
+
min-width: 16px;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
824
|
+
margin-block: 0;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
[data-separator="line-info"][data-separator-first] {
|
|
828
|
+
margin-top: 0;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
[data-separator="line-info"][data-separator-last] {
|
|
832
|
+
margin-bottom: 0;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
[data-expand-index] [data-separator-wrapper] {
|
|
836
|
+
grid-template-columns: 32px auto;
|
|
837
|
+
display: grid;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
841
|
+
grid-template-columns: 32px 32px auto;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
[data-expand-button], [data-separator-content] {
|
|
845
|
+
background-color: var(--diffs-bg-separator);
|
|
846
|
+
flex: none;
|
|
847
|
+
align-items: center;
|
|
848
|
+
display: flex;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
[data-expand-index] [data-separator-content]:hover {
|
|
852
|
+
cursor: pointer;
|
|
853
|
+
text-decoration: underline;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
[data-expand-button] {
|
|
857
|
+
cursor: pointer;
|
|
858
|
+
min-width: 32px;
|
|
859
|
+
color: var(--diffs-fg-number);
|
|
860
|
+
border-right: 2px solid var(--diffs-bg);
|
|
861
|
+
flex-shrink: 0;
|
|
862
|
+
justify-content: center;
|
|
863
|
+
align-self: stretch;
|
|
864
|
+
|
|
865
|
+
&:hover {
|
|
866
|
+
color: var(--diffs-fg);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
&[data-expand-all-button] {
|
|
870
|
+
display: none;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
[data-expand-down] [data-icon] {
|
|
875
|
+
transform: scaleY(-1);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
[data-separator-content] {
|
|
879
|
+
height: 100%;
|
|
880
|
+
color: var(--diffs-fg-number);
|
|
881
|
+
flex: auto;
|
|
882
|
+
justify-content: flex-start;
|
|
883
|
+
padding: 0 1ch;
|
|
884
|
+
overflow: hidden;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
888
|
+
& [data-separator-content] {
|
|
889
|
+
user-select: none;
|
|
890
|
+
height: 100%;
|
|
891
|
+
overflow: clip;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
[data-unmodified-lines] {
|
|
896
|
+
text-overflow: ellipsis;
|
|
897
|
+
white-space: nowrap;
|
|
898
|
+
flex: 0 auto;
|
|
899
|
+
min-width: 0;
|
|
900
|
+
display: block;
|
|
901
|
+
overflow: hidden;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
@supports (width: 1cqi) {
|
|
905
|
+
[data-unified] {
|
|
906
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
907
|
+
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
908
|
+
width: 100cqi;
|
|
909
|
+
|
|
910
|
+
& [data-separator-content] {
|
|
911
|
+
border-radius: 6px;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
916
|
+
border-top-left-radius: unset;
|
|
917
|
+
border-bottom-left-radius: unset;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
[data-gutter] {
|
|
922
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
923
|
+
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
& [data-separator="line-info"] [data-separator-content] {
|
|
927
|
+
border-top-left-radius: 6px;
|
|
928
|
+
border-bottom-left-radius: 6px;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
932
|
+
border-top-left-radius: unset;
|
|
933
|
+
border-bottom-left-radius: unset;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
[data-additions] {
|
|
938
|
+
& [data-content] [data-separator="line-info"] {
|
|
939
|
+
background-color: var(--diffs-bg);
|
|
940
|
+
|
|
941
|
+
& [data-separator-wrapper] {
|
|
942
|
+
display: none;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
947
|
+
background-color: var(--diffs-bg-separator);
|
|
948
|
+
border-top-right-radius: 6px;
|
|
949
|
+
border-bottom-right-radius: 6px;
|
|
950
|
+
height: 100%;
|
|
951
|
+
display: block;
|
|
952
|
+
|
|
953
|
+
& [data-separator-content], & [data-expand-button] {
|
|
954
|
+
display: none;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
960
|
+
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
964
|
+
background-color: var(--diffs-bg-separator);
|
|
965
|
+
height: 100%;
|
|
966
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
967
|
+
border-top-right-radius: 6px;
|
|
968
|
+
border-bottom-right-radius: 6px;
|
|
969
|
+
display: block;
|
|
970
|
+
|
|
971
|
+
& [data-separator-content], & [data-expand-button] {
|
|
972
|
+
display: none;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
977
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
978
|
+
border-top-left-radius: 6px;
|
|
979
|
+
border-bottom-left-radius: 6px;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
@media (pointer: fine) {
|
|
984
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
985
|
+
&[data-separator-multi-button] {
|
|
986
|
+
& [data-expand-up] {
|
|
987
|
+
border-top-left-radius: 6px;
|
|
988
|
+
border-bottom-left-radius: unset;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
& [data-expand-down] {
|
|
992
|
+
border-bottom-left-radius: 6px;
|
|
993
|
+
border-top-left-radius: unset;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
@media (pointer: coarse) {
|
|
1001
|
+
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1002
|
+
grid-template-columns: 34px 34px auto;
|
|
1003
|
+
|
|
1004
|
+
& [data-separator-content] {
|
|
1005
|
+
grid-column: unset;
|
|
1006
|
+
grid-row: unset;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
@supports (width: 1cqi) {
|
|
1011
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1012
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
1013
|
+
border-top-left-radius: 6px;
|
|
1014
|
+
border-bottom-left-radius: 6px;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
&[data-separator-multi-button] {
|
|
1018
|
+
& [data-expand-up] {
|
|
1019
|
+
border-top-left-radius: 6px;
|
|
1020
|
+
border-bottom-left-radius: 6px;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
& [data-expand-down] {
|
|
1024
|
+
border-bottom-left-radius: unset;
|
|
1025
|
+
border-top-left-radius: unset;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
@media (pointer: fine) {
|
|
1033
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1034
|
+
grid-template-rows: 50% 50%;
|
|
1035
|
+
display: grid;
|
|
1036
|
+
|
|
1037
|
+
& [data-separator-content] {
|
|
1038
|
+
grid-area: 1 / 2 / -1;
|
|
1039
|
+
min-width: min-content;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
& [data-expand-button] {
|
|
1043
|
+
grid-column: 1;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1048
|
+
grid-template-columns: 34px auto;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
1052
|
+
grid-template-columns: 100% auto;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1056
|
+
& [data-separator-multi-button] {
|
|
1057
|
+
& [data-expand-up] {
|
|
1058
|
+
border-bottom: 1px solid var(--diffs-bg);
|
|
1059
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
& [data-expand-down] {
|
|
1063
|
+
border-top: 1px solid var(--diffs-bg);
|
|
1064
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
1071
|
+
display: none;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
[data-line-annotation] {
|
|
1075
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
1076
|
+
z-index: 2;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
[data-merge-conflict-actions] {
|
|
1080
|
+
z-index: 2;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
[data-separator="custom"] {
|
|
1084
|
+
grid-template-columns: subgrid;
|
|
1085
|
+
display: grid;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
[data-line], [data-column-number], [data-no-newline] {
|
|
1089
|
+
padding-inline: 1ch;
|
|
1090
|
+
position: relative;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
[data-indicators="classic"] [data-line] {
|
|
1094
|
+
padding-inline-start: 2ch;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
[data-indicators="classic"] {
|
|
1098
|
+
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
1099
|
+
&[data-no-newline], &[data-line] {
|
|
1100
|
+
&:before {
|
|
1101
|
+
user-select: none;
|
|
1102
|
+
width: 1ch;
|
|
1103
|
+
height: 1lh;
|
|
1104
|
+
display: inline-block;
|
|
1105
|
+
position: absolute;
|
|
1106
|
+
top: 0;
|
|
1107
|
+
left: 0;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
& [data-line-type="change-addition"] {
|
|
1113
|
+
&[data-line], &[data-no-newline] {
|
|
1114
|
+
&:before {
|
|
1115
|
+
content: "+";
|
|
1116
|
+
color: var(--diffs-addition-base);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
& [data-line-type="change-deletion"] {
|
|
1122
|
+
&[data-line], &[data-no-newline] {
|
|
1123
|
+
&:before {
|
|
1124
|
+
content: "-";
|
|
1125
|
+
color: var(--diffs-deletion-base);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
[data-indicators="bars"] {
|
|
1132
|
+
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
1133
|
+
&[data-column-number] {
|
|
1134
|
+
&:before {
|
|
1135
|
+
content: "";
|
|
1136
|
+
user-select: none;
|
|
1137
|
+
contain: strict;
|
|
1138
|
+
width: 4px;
|
|
1139
|
+
height: 100%;
|
|
1140
|
+
display: block;
|
|
1141
|
+
position: absolute;
|
|
1142
|
+
top: 0;
|
|
1143
|
+
left: 0;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
& [data-line-type="change-deletion"] {
|
|
1149
|
+
&[data-column-number] {
|
|
1150
|
+
&:before {
|
|
1151
|
+
background-image: linear-gradient(0deg,
|
|
1152
|
+
var(--diffs-bg-deletion) 50%,
|
|
1153
|
+
var(--diffs-deletion-base) 50%);
|
|
1154
|
+
background-repeat: repeat;
|
|
1155
|
+
background-size: 2px 2px;
|
|
1156
|
+
background-size: calc(1lh / round(1lh / 2px))
|
|
1157
|
+
calc(1lh / round(1lh / 2px));
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
& [data-line-type="change-addition"] {
|
|
1163
|
+
&[data-column-number] {
|
|
1164
|
+
&:before {
|
|
1165
|
+
background-color: var(--diffs-addition-base);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
[data-overflow="wrap"] {
|
|
1172
|
+
& [data-line] {
|
|
1173
|
+
white-space: pre-wrap;
|
|
1174
|
+
word-break: break-word;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
& [data-annotation-content] {
|
|
1178
|
+
word-break: break-word;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
[data-overflow="scroll"] [data-line] {
|
|
1183
|
+
white-space: pre;
|
|
1184
|
+
min-height: 1lh;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
[data-column-number] {
|
|
1188
|
+
box-sizing: content-box;
|
|
1189
|
+
text-align: right;
|
|
1190
|
+
user-select: none;
|
|
1191
|
+
color: var(--diffs-fg-number);
|
|
1192
|
+
padding-left: 2ch;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
[data-line-number-content] {
|
|
1196
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
1197
|
+
z-index: 1;
|
|
1198
|
+
display: inline-block;
|
|
1199
|
+
position: relative;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
[data-disable-line-numbers] {
|
|
1203
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1204
|
+
min-width: 4px;
|
|
1205
|
+
padding: 0;
|
|
1206
|
+
|
|
1207
|
+
&:before {
|
|
1208
|
+
min-width: 0;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
& [data-line-number-content] {
|
|
1213
|
+
display: none;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
& [data-gutter-utility-slot] {
|
|
1217
|
+
right: unset;
|
|
1218
|
+
justify-content: flex-start;
|
|
1219
|
+
left: 0;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
1223
|
+
left: 6px;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
[data-file][data-disable-line-numbers] {
|
|
1228
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1229
|
+
border-right: 0;
|
|
1230
|
+
min-width: 0;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
[data-diff-span] {
|
|
1235
|
+
box-decoration-break: clone;
|
|
1236
|
+
border-radius: 3px;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
[data-line-type="change-addition"] [data-diff-span] {
|
|
1240
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
[data-line-type="change-deletion"] [data-diff-span] {
|
|
1244
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
1248
|
+
color: var(--diffs-fg);
|
|
1249
|
+
padding-left: 1ch;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
1253
|
+
align-items: center;
|
|
1254
|
+
display: flex;
|
|
1255
|
+
|
|
1256
|
+
&:after {
|
|
1257
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1258
|
+
font-size: .75rem;
|
|
1259
|
+
font-style: normal;
|
|
1260
|
+
line-height: 1.25rem;
|
|
1261
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1262
|
+
padding-left: 1ch;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
[data-merge-conflict="marker-start"]:after {
|
|
1267
|
+
content: "(Current Change)";
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
[data-merge-conflict="marker-end"]:after {
|
|
1271
|
+
content: "(Incoming Change)";
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
[data-merge-conflict-actions-content] {
|
|
1275
|
+
min-height: 1.75rem;
|
|
1276
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1277
|
+
color: var(--diffs-fg);
|
|
1278
|
+
align-items: center;
|
|
1279
|
+
gap: .25rem;
|
|
1280
|
+
padding-inline: .5rem;
|
|
1281
|
+
font-size: .75rem;
|
|
1282
|
+
line-height: 1.2;
|
|
1283
|
+
display: flex;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
[data-merge-conflict-action] {
|
|
1287
|
+
appearance: none;
|
|
1288
|
+
color: var(--diffs-fg-number);
|
|
1289
|
+
font: inherit;
|
|
1290
|
+
cursor: pointer;
|
|
1291
|
+
background: none;
|
|
1292
|
+
border: 0;
|
|
1293
|
+
padding: 0;
|
|
1294
|
+
font-style: normal;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
[data-merge-conflict-action]:hover {
|
|
1298
|
+
color: var(--diffs-fg);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
[data-merge-conflict-action="current"]:hover {
|
|
1302
|
+
color: var(--diffs-addition-base);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
[data-merge-conflict-action="incoming"]:hover {
|
|
1306
|
+
color: var(--diffs-modified-base);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
[data-merge-conflict-action-separator] {
|
|
1310
|
+
color: var(--diffs-fg-number);
|
|
1311
|
+
opacity: .6;
|
|
1312
|
+
user-select: none;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
[data-diffs-header="default"] {
|
|
1316
|
+
background-color: var(--diffs-bg);
|
|
1317
|
+
justify-content: space-between;
|
|
1318
|
+
align-items: center;
|
|
1319
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1320
|
+
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
1321
|
+
z-index: 2;
|
|
1322
|
+
flex-direction: row;
|
|
1323
|
+
padding-inline: 16px;
|
|
1324
|
+
display: flex;
|
|
1325
|
+
position: relative;
|
|
1326
|
+
top: 0;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
[data-header-content] {
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1332
|
+
white-space: nowrap;
|
|
1333
|
+
flex-direction: row;
|
|
1334
|
+
min-width: 0;
|
|
1335
|
+
display: flex;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
1339
|
+
text-overflow: ellipsis;
|
|
1340
|
+
white-space: nowrap;
|
|
1341
|
+
direction: rtl;
|
|
1342
|
+
min-width: 0;
|
|
1343
|
+
overflow: hidden;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
[data-prev-name] {
|
|
1347
|
+
opacity: .7;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
[data-rename-icon] {
|
|
1351
|
+
fill: currentColor;
|
|
1352
|
+
flex-grow: 0;
|
|
1353
|
+
flex-shrink: 0;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
[data-diffs-header="default"] [data-metadata] {
|
|
1357
|
+
white-space: nowrap;
|
|
1358
|
+
align-items: center;
|
|
1359
|
+
gap: 1ch;
|
|
1360
|
+
display: flex;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
[data-diffs-header="default"] [data-additions-count] {
|
|
1364
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1365
|
+
color: var(--diffs-addition-base);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
[data-diffs-header="default"] [data-deletions-count] {
|
|
1369
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1370
|
+
color: var(--diffs-deletion-base);
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
[data-change-icon] {
|
|
1374
|
+
fill: currentColor;
|
|
1375
|
+
flex-shrink: 0;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
1379
|
+
color: var(--diffs-modified-base);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
[data-change-icon="new"] {
|
|
1383
|
+
color: var(--diffs-addition-base);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
[data-change-icon="deleted"] {
|
|
1387
|
+
color: var(--diffs-deletion-base);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
[data-change-icon="file"] {
|
|
1391
|
+
opacity: .6;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
[data-annotation-content] {
|
|
1395
|
+
z-index: 2;
|
|
1396
|
+
isolation: isolate;
|
|
1397
|
+
white-space: normal;
|
|
1398
|
+
align-self: flex-start;
|
|
1399
|
+
min-width: 0;
|
|
1400
|
+
display: flow-root;
|
|
1401
|
+
position: relative;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
1405
|
+
width: var(--diffs-column-content-width, auto);
|
|
1406
|
+
left: var(--diffs-column-number-width, 0);
|
|
1407
|
+
position: sticky;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
[data-annotation-slot] {
|
|
1411
|
+
text-wrap-mode: wrap;
|
|
1412
|
+
word-break: normal;
|
|
1413
|
+
white-space-collapse: collapse;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
[data-gutter-utility-slot] {
|
|
1417
|
+
touch-action: none;
|
|
1418
|
+
justify-content: flex-end;
|
|
1419
|
+
display: flex;
|
|
1420
|
+
position: absolute;
|
|
1421
|
+
top: 0;
|
|
1422
|
+
bottom: 0;
|
|
1423
|
+
right: 0;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
[data-utility-button] {
|
|
1427
|
+
appearance: none;
|
|
1428
|
+
cursor: pointer;
|
|
1429
|
+
width: 1lh;
|
|
1430
|
+
height: 1lh;
|
|
1431
|
+
font-size: var(--diffs-font-size, 13px);
|
|
1432
|
+
line-height: var(--diffs-line-height, 20px);
|
|
1433
|
+
background-color: var(--diffs-modified-base);
|
|
1434
|
+
color: var(--diffs-bg);
|
|
1435
|
+
fill: currentColor;
|
|
1436
|
+
z-index: 4;
|
|
1437
|
+
touch-action: none;
|
|
1438
|
+
border: none;
|
|
1439
|
+
border-radius: 4px;
|
|
1440
|
+
justify-content: center;
|
|
1441
|
+
align-items: center;
|
|
1442
|
+
margin-right: calc(-1lh + 1ch);
|
|
1443
|
+
padding: 0;
|
|
1444
|
+
display: flex;
|
|
1445
|
+
position: relative;
|
|
1446
|
+
|
|
1447
|
+
&:before {
|
|
1448
|
+
content: "";
|
|
1449
|
+
display: block;
|
|
1450
|
+
position: absolute;
|
|
1451
|
+
inset: 0 0 0 -4px;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
[data-decoration-bar-stack] {
|
|
1456
|
+
pointer-events: none;
|
|
1457
|
+
isolation: isolate;
|
|
1458
|
+
z-index: 1;
|
|
1459
|
+
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
1460
|
+
box-sizing: content-box;
|
|
1461
|
+
border-left: 2px solid var(--diffs-bg);
|
|
1462
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1463
|
+
width: 6px;
|
|
1464
|
+
position: absolute;
|
|
1465
|
+
top: 0;
|
|
1466
|
+
bottom: 0;
|
|
1467
|
+
right: -2px;
|
|
1468
|
+
|
|
1469
|
+
[data-decoration-bar-depth="1"] & {
|
|
1470
|
+
background-color: color-mix(in lab,
|
|
1471
|
+
var(--diffs-bg) 20%,
|
|
1472
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
[data-decoration-bar-depth="2"] & {
|
|
1476
|
+
background-color: color-mix(in lab,
|
|
1477
|
+
var(--diffs-bg) 45%,
|
|
1478
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
[data-decoration-bar-depth="3"] & {
|
|
1482
|
+
background-color: color-mix(in lab,
|
|
1483
|
+
var(--diffs-bg) 65%,
|
|
1484
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
[data-decoration-bar-start] & {
|
|
1488
|
+
border-top-left-radius: 5px;
|
|
1489
|
+
border-top-right-radius: 5px;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
[data-decoration-bar-end] & {
|
|
1493
|
+
z-index: 3;
|
|
1494
|
+
border-bottom-right-radius: 5px;
|
|
1495
|
+
border-bottom-left-radius: 5px;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
[data-placeholder] {
|
|
1500
|
+
contain: strict;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
[data-error-wrapper] {
|
|
1504
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1505
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1506
|
+
scrollbar-width: none;
|
|
1507
|
+
max-height: 400px;
|
|
1508
|
+
overflow: auto;
|
|
1509
|
+
|
|
1510
|
+
& [data-error-message] {
|
|
1511
|
+
color: var(--diffs-deletion-base);
|
|
1512
|
+
font-size: 18px;
|
|
1513
|
+
font-weight: bold;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
& [data-error-stack] {
|
|
1517
|
+
color: var(--diffs-fg-number);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
@layer theme, rendered, unsafe;
|
|
1523
|
+
`;let Uu;function Ys(e){if(Uu!=null)return Uu;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(gD,"true");const r=document.createElement("div");return r.style.position="relative",r.style.width="200%",r.style.height="200%",n.appendChild(r),e.appendChild(n),Uu=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),Uu}function Bw(e){return`${Ix}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const jw="@layer base, theme, rendered, unsafe;",LP=new RegExp(`${TP(Ix)}\\s*:\\s*[^;]+;`);function Fw(e){return`${jw}
|
|
1524
|
+
@layer unsafe {
|
|
1525
|
+
${e}
|
|
1526
|
+
}`}function Gw(e,t="system",n){return`${jw}
|
|
1527
|
+
@layer rendered {
|
|
1528
|
+
:host {${t==="system"?"":`
|
|
1529
|
+
color-scheme: ${t};`}
|
|
1530
|
+
${Bw(n)}
|
|
1531
|
+
${e}
|
|
1532
|
+
}
|
|
1533
|
+
}`}function $w(e,t){const n=Bw(t);return e.replace(LP,n)}function TP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sc({code:e,pre:t,columnType:n,rowSpan:r,containerSize:a=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),r!=null?e.style.setProperty("grid-row",`span ${r}`):e.style.removeProperty("grid-row"),a?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function qw(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function Ww(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:a,overflow:l,split:u,totalLines:d,customProperties:f}){if(f!=null)for(const h in f){const p=f[h];p!=null&&e.setAttribute(h,`${p}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return a?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),r?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",u?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",l),e.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),e}function Mc(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function Yw(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function y_(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:Yw(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function am(e,t){const n=e?.offsetHeight??0;if(e==null||n===0){t();return}e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=""}}function Xw({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=AP(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function AP(){const e=document.createElement("style");return e.setAttribute(pD,""),e}let RP;function Kw(){return RP??="safari"in window&&"pushNotification"in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const r=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(kP)),r.adoptedStyleSheets=[e]}connectedCallback(){Ys(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(Bm,t)}const OP=[""];let DP=-1;var Qw=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++DP}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerFilenameSuffix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;editor;constructor(t={theme:it},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.fileRenderer=new xP(t,this.handleHighlightRender,this.workerManager),this.resizeManager=new aE,this.interactionManager=new oE("file",bc(t)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}__getCurrentFile(){return this.file}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(bc(this.options))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Ea(this.appliedThemeCSS.theme,this.options.theme??it)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(t){this.code!=null&&(this.code.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.fileRenderer.getEffectiveCodeOptions()}}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t==="wrap",columnVariables:this.shouldApplyColumnVariables(t)?"apply":"measure"}),this.managersDirty=!1}shouldApplyColumnVariables(t){return t==="scroll"&&this.lineAnnotations.length>0}cleanUp(t=!1){this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.pre=void 0,this.code=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,t?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:r,preventEmit:a=!1,file:l,lineAnnotations:u}=t;if(!this.enabled)throw new Error("File.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("File.hydrate: hydrate can only be called before the instance has rendered or hydrated");this.hydrateElements(n,r),MP(this.pre,l,this.options.collapsed)||NP(this.headerElement,l,this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({file:l,lineAnnotations:u}),a||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),qw(t,n);for(const r of Array.from(t.shadowRoot?.children??[])){if(r instanceof SVGElement){this.spriteSVG=r;continue}if(r instanceof HTMLElement){if(r instanceof HTMLPreElement){this.pre=r,this.appliedPreAttributes=void 0;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-theme-css")){this.themeCSSStyle=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=r,this.appliedUnsafeCSS=r.textContent;continue}if("diffsHeader"in r.dataset){this.headerElement=r,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({file:t,lineAnnotations:n}){this.lineAnnotations=n??this.lineAnnotations,this.file=t,this.fileRenderer.setOptions(y_(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(t),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(t=this.file){return t!=null?this.fileRenderer.getOrCreateLineCache(t):OP}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,r=this.file,a=this.lineAnnotations,l=this.renderRange;t!=null&&n!=null&&r!=null&&this.fileRenderer.initializeHighlighter().then(u=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.file!==r||t.__syncRenderView(u,n,r,a,l)})}attachEditor(t){this.editor?.cleanUp(),this.editor=t,this.fileRenderer.beginEditSession();const n=this.file==null?void 0:t.__prepareFile?.(this.file);return n!==void 0&&n!==this.file?this.renderPreparedFile({file:n,forceRender:!0,preventEmit:!0,renderRange:this.renderRange}):this.fileRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),()=>{this.editor=void 0,this.fileRenderer.endEditSession()}}applyDocumentChange(t,n){this.fileRenderer.applyDocumentChange(t),n!=null&&n!==this.lineAnnotations&&this.file!=null&&(this.setLineAnnotations(n),this.fileRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations())}updateRenderCache(t,n,r){this.fileRenderer.updateRenderCache(t,n,r?.lineCountChangeInFlight)}render(t){if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const n=this.editor?.__prepareFile?.(t.file)??t.file;return this.renderPreparedFile(n===t.file?t:{...t,file:n})}renderPreparedFile({file:t,fileContainer:n,forceRender:r=!1,preventEmit:a=!1,containerWrapper:l,deferManagers:u=!1,lineAnnotations:d,renderRange:f}){this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:h=!1,themeType:p="system"}=this.options,m=h?void 0:f,y=this.renderRange,b=this.hasThemeChanged(),S=d!=null&&(d.length>0||this.lineAnnotations.length>0)?d!==this.lineAnnotations:!1,_=!An(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t);if(!h&&!r&&rd(m,this.renderRange)&&!_&&!S&&!b)return this.applyCachedThemeState(p);this.renderRange=m,_&&(this.cachedHeaderHTML=void 0),this.file=t,this.fileRenderer.setOptions(y_(this.options)),this.syncInteractionOptions(),d!=null&&this.setLineAnnotations(d),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:w=!1,disableFileHeader:x=!1}=this.options;if(x&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,l),this.applyCachedThemeState(p),h){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const E=this.fileRenderer.renderFile(t,zx);E!=null&&this.applyThemeState(n,E.themeStyles,p,E.baseThemeType),E?.headerAST!=null&&this.applyHeaderToDOM(E.headerAST,n),this.injectUnsafeCSS()}catch(E){if(w)throw E;console.error(E),E instanceof Error&&this.applyErrorToDOM(E,n)}return a||this.emitPostRender(),!0}try{const E=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(r,S,_||b)||!this.applyPartialRender(y,m)){const L=this.fileRenderer.renderFile(t,m);if(L==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,L.themeStyles,p,L.baseThemeType),L.headerAST!=null&&this.applyHeaderToDOM(L.headerAST,n),this.applyFullRender(L,E)}this.applyBuffers(E,m),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,u||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(E){if(w)throw E;console.error(E),E instanceof Error&&this.applyErrorToDOM(E,n)}return a||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:r}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;r?.(n,this,"unmount");return}if(n==null)return;const a=this.mounted?"update":"mount";this.mounted=!0,r?.(n,this,a)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(t,n,r){return!(t||n||r)}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.file){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||Ws(t))return;const r=this.options.tokenizeMaxLength??1e5;this.fileRenderer.getOrCreateLineCache(t).length>r||await n.primeFileHighlightCache(t).catch(a=>{console.error(a)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[r,a]of this.lineAnnotations.entries()){const l=`${r}-${Nn(a)}`;let u=this.annotationCache.get(l);if(u==null||!EP(a,u.annotation)){u?.element.remove();const d=n(a);if(d==null)continue;u={element:Pw(Nn(a)),annotation:a},u.element.appendChild(d),this.fileContainer.appendChild(u.element),this.annotationCache.set(l,u)}t.delete(l)}for(const[r,{element:a}]of t.entries())this.annotationCache.delete(r),a.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=Uw();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=Vw(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Fw(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,r,a){const l=t.shadowRoot??t.attachShadow({mode:"open"}),u=a??r,d=this.options.theme??it,f=typeof d=="string"?d:{...d},h=Ys(l);if(this.themeCSSStyle?.parentNode===l&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===u&&this.appliedThemeCSS.scrollbarGutter===h){this.appliedThemeCSS.theme=f;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===l){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:f,themeStyles:n,themeType:u,baseThemeType:a,scrollbarGutter:h};return}this.themeCSSStyle=Xw({shadowRoot:l,currentNode:this.themeCSSStyle,themeCSS:Gw(n,u,h)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:f,themeStyles:n,themeType:u,baseThemeType:a,scrollbarGutter:h}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=$w(this.themeCSSStyle.textContent??"",Ys(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&Kw()}applyFullRender(t,n){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,t);const r=this.code=sc({code:this.code}),a=this.fileRenderer.renderCodeAST(t);this.editor?.__captureFocusForDOMReplacement();const l=()=>{if(r.childElementCount>=2)for(let u=0;u<2;u++){const d=r.children[u],f=a[u];d.innerHTML=Nt(f.children),d.style.cssText=f.properties.style}else r.innerHTML=Nt(a);n.contains(r)||n.replaceChildren(r)};this.shouldGuardRebuildScroll()?am(n,l):l(),this.lastRowCount=t.rowCount}applyPartialRender(t,n){if(t==null||n==null)return!1;const{file:r,code:a}=this,l=a!=null?this.getColumns(a):void 0;if(r==null||a==null||l==null)return!1;const u=t.startingLine,d=n.startingLine,f=t.totalLines===1/0?Number.POSITIVE_INFINITY:u+t.totalLines,h=n.totalLines===1/0?Number.POSITIVE_INFINITY:d+n.totalLines,p=Math.max(u,d),m=Math.min(f,h);if(m<=p)return!1;if(!this.trimDOMToOverlap(l.gutter,p,m)||!this.trimDOMToOverlap(l.content,p,m))throw new Error("File.applyPartialRender: failed to trim to overlap");let{length:y}=l.content.children;const b=(x,E)=>{if(!(E<=0))return this.fileRenderer.renderFile(r,{startingLine:x,totalLines:E,bufferBefore:0,bufferAfter:0})},S=d<p?b(d,p-d):void 0;if(S===void 0&&d<p)return!1;const _=h===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Math.max(0,h-m),w=h>m?b(m,_):void 0;return w===void 0&&h>m?!1:(this.cleanupErrorWrapper(),S!=null&&(l.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(S.gutterAST)),l.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(S.contentAST)),y+=S.rowCount),w!=null&&(l.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(w.gutterAST)),l.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(w.contentAST)),y+=w.rowCount),this.lastRowCount!==y&&(l.gutter.style.setProperty("grid-row",`span ${y}`),l.content.style.setProperty("grid-row",`span ${y}`),this.lastRowCount=y),!0)}getColumns(t){const n=t.children[0],r=t.children[1];if(!(!(n instanceof HTMLElement)||!(r instanceof HTMLElement)||n.dataset.gutter==null||r.dataset.content==null))return{gutter:n,content:r}}trimDOMToOverlap(t,n,r){const a=this.getDOMBoundaryIndices(t,[n,r]),l=a.get(n)??t.children.length,u=a.get(r)??t.children.length;if(l>u)return!1;for(let d=t.children.length-1;d>=u;d-=1)t.children[d]?.remove();for(let d=l-1;d>=0;d-=1)t.children[d]?.remove();return!0}getDOMBoundaryIndices(t,n){const r=[...new Set(n)].sort((f,h)=>f-h),a=new Map;if(r.length===0)return a;let l=0,u=r[l];const{children:d}=t;u===0&&(a.set(0,0),l+=1,u=r[l]);for(let f=0;f<d.length;f+=1){const h=d[f];if(!(h instanceof HTMLElement))continue;const p=this.getLineIndexFromDOMNode(h);if(p!=null){for(;u!=null&&p>=u;)a.set(u,f),l+=1,u=r[l];if(l>=r.length)break}}for(const f of r)a.has(f)||a.set(f,d.length);return a}getLineIndexFromDOMNode(t){const n=t.dataset.lineIndex;if(n==null)return;const r=Number(n);return Number.isNaN(r)?void 0:r}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(t,n){const{file:r}=this;if(r==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const a=this.cachedHeaderHTML??Nt(t);if(this.cachedHeaderHTML=a,a!==this.lastRenderedHeaderHTML){const h=document.createElement("div");h.innerHTML=a;const p=h.firstElementChild;if(!(p instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(p,this.headerElement):n.shadowRoot?.prepend(p),this.headerElement=p,this.lastRenderedHeaderHTML=a}if(this.isContainerManaged)return;const{renderHeaderPrefix:l,renderHeaderFilenameSuffix:u,renderCustomHeader:d,renderHeaderMetadata:f}=this.options;if(d!=null){const h=d(r)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,el,h),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{const h=l?.(r)??void 0,p=u?.(r)??void 0,m=f?.(r)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,jm,h),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,Fm,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Gm,m),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,r,a){if(a==null){n?.remove();return}const l=n??this.createHeaderSlotElement(r);return n==null&&t.appendChild(l),this.replaceHeaderSlotContent(l,a),l}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}getOrCreateFileContainerNode(t,n){const{fileContainer:r}=this,a=t??r??document.createElement("diffs-container"),l=r!==a;return r!=null&&l&&this.editor?.__captureFocusForDOMReplacement(),l&&this.emitPostRender(!0),this.fileContainer=a,r!=null&&l&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),l&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const r of n.children)r instanceof SVGElement?this.spriteSVG??=r:Mc(r)&&r.hasAttribute("data-theme-css")?(this.themeCSSStyle??=r,this.hasAdoptedThemeCSS=!0):Mc(r)&&r.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=r,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=zw;const a=r.firstChild;a instanceof SVGElement&&(this.spriteSVG=a)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),t.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(t){this.code=void 0;for(const n of Array.from(t.children))if(n instanceof HTMLElement&&n.hasAttribute("data-code")){this.code=n;return}}applyPreNodeAttributes(t,{totalLines:n}){const{overflow:r="scroll",disableLineNumbers:a=!1}=this.options,l={type:"file",split:!1,overflow:r,disableLineNumbers:a,diffIndicators:"none",disableBackground:!0,totalLines:n};Hw(l,this.appliedPreAttributes)||(Ww(t,l),this.appliedPreAttributes=l)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const r=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",r.appendChild(this.errorWrapper);const a=document.createElement("div");a.dataset.errorMessage="",a.innerText=t.message,this.errorWrapper.appendChild(a);const l=document.createElement("pre");l.dataset.errorStack="",l.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(l)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function MP(e,t,n=!1){return!n&&e==null&&t!=null}function NP(e,t,n=!1){return e==null&&t!=null&&!n}function lc(e){return{...$m,...e}}function Yn(e,t){const n=IP(e,t);return t?n:e.diffHeaderHeight+n}function IP(e,t){return e.paddingTop??(t?e.spacing:0)}function Nc(e){return e.paddingBottom??e.spacing}function zP(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const HP=5e3;let PP=-1;function UP(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var VP=class extends Qw{virtualizer;metrics;__id=`virtualized-file:${++PP}`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=$m,r,a=!1){super(e,r,a),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){const n=lc(e);!t&&vc(this.metrics,n)||(this.metrics=n,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}hasLineAnnotations(){return this.lineAnnotations.some(e=>e.lineNumber>0)}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!$c(t,e),r=UP(t,e);super.setOptions(e),r&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1,t=!0){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;const r=rm(this.lineAnnotations);if(this.renderRange!=null&&r&&od(this.renderRange)){const a=BP(n)??0;a!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=a,e=!0)}else!r&&this.cache.fileAnnotationHeight!==0&&(this.cache.fileAnnotationHeight=0,e=!0);for(const a of n.children){if(!(a instanceof HTMLElement))continue;const l=a.dataset.lineIndex;if(l==null)continue;const u=Number(l);let d=a.getBoundingClientRect().height,f=!1;a.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in a.nextElementSibling.dataset||"noNewline"in a.nextElementSibling.dataset)&&("noNewline"in a.nextElementSibling.dataset&&(f=!0),d+=a.nextElementSibling.getBoundingClientRect().height);const h=this.getLineHeight(u,f);d!==h&&(e=!0,d===this.metrics.lineHeight*(f?2:1)?this.cache.heights.delete(u):this.cache.heights.set(u,d))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n,r){const a=this.syncLineAnnotations(r),l=!An(this.file,e)||this.fileRenderer.hasUnkeyedFileContentsChanged(e);let u=n?.resetFileLayoutCache===!0||l||a;n?.metrics!=null&&(this.metrics=n.metrics,u=!0);const{collapsed:d=!1}=this.options;return this.currentCollapsed!==d&&(this.currentCollapsed=d,u=!0),u&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null||e<1)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,r=this.fileRenderer.getLineCount(this.file)-1;let a=Yn(this.metrics,t);if(n||r<0)return{top:a,height:0};const l=Math.min(Math.max(e-1,0),r),{overflow:u="scroll"}=this.options,{lineHeight:d}=this.metrics;if(a+=this.cache.fileAnnotationHeight,u==="scroll"&&!this.hasLineAnnotations())return{top:a+l*d,height:d};const f=this.getLayoutCheckpointBeforeLineIndex(l);a=f?.top??a;for(let h=f?.lineIndex??0;h<l;h++)a+=this.getLineHeight(h,!1);return{top:a,height:this.getLineHeight(l,!1)}}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.file==null||this.renderRange==null)return;const{disableFileHeader:t=!1,collapsed:n=!1,overflow:r="scroll"}=this.options;if(n||this.renderRange.totalLines<=0)return;const a=this.fileRenderer.getLineCount(this.file)-1;if(a<0)return;const l=Yn(this.metrics,t),u=Math.min(this.renderRange.startingLine,a),d=Math.min(u+this.renderRange.totalLines-1,a);if(d<u)return;const{fileAnnotationHeight:f}=this.cache;if(r==="scroll"&&!this.hasLineAnnotations()){const{lineHeight:p}=this.metrics,m=l+(u===0?f:this.renderRange.bufferBefore),y=u+Math.max(Math.ceil((e-m)/p),0);return y>d?void 0:{lineNumber:y+1,top:l+f+y*p}}let h=l+(u===0?f:this.renderRange.bufferBefore);for(let p=u;p<=d;p++){if(h>=e)return{lineNumber:p+1,top:h};h+=this.getLineHeight(p)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:a}=t;let l=0;if(a===0){const u=e??this.virtualizer.getWindowSpecs();this.top<u.top&&(l=r)}return{topOffset:this.top+n+l,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.isSetup=!1,super.cleanUp(e)}computeApproximateSize(e=!1,t=this.file){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const r=this.height===0;if(this.height=0,this.cache.checkpoints=[],t==null){this.layoutDirty=!1;return}const{disableFileHeader:a=!1,collapsed:l=!1,overflow:u="scroll"}=this.options,{lineHeight:d}=this.metrics,f=this.fileRenderer.getLineCount(t),h=Yn(this.metrics,a),p=Nc(this.metrics);if(this.height+=h,l){this.layoutDirty=!1;return}if(this.height+=this.cache.fileAnnotationHeight,u==="scroll"&&!this.hasLineAnnotations())this.height+=f*d;else for(let m=0;m<f;m++)this.addLayoutCheckpoint(m,this.height),this.height+=this.getLineHeight(m,!1);if(f>0&&(this.height+=p),this.fileContainer!=null&&n&&!r){const m=this.fileContainer.getBoundingClientRect();m.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:t.name,elementHeight:m.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){const{renderRange:r}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!==void 0&&this.file!==void 0){const a=this.virtualizer.getWindowSpecs(),l=this.computeRenderRangeFromWindow(this.file,this.top??0,a);l.bufferAfter!==r.bufferAfter&&this.updateBuffers(l)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}renderPreparedFile({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:r,...a}){const l=this.file==null||!An(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t),{forceRenderOverride:u,isSetup:d}=this;this.forceRenderOverride=void 0;const f=this.syncLineAnnotations(r);if(f&&this.resetLayoutCache(),e=this.getOrCreateFileContainerNode(e),t==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(d)this.top??=this.getVirtualizedTop(),l&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(!1),this.computeApproximateSize(!1,t));else{this.computeApproximateSize(!1,t);const b=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(b==null)throw new Error("VirtualizedFile.render: simple virtualizer is not available");b.connect(e,this),this.isVisible=b.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!l||!d))return this.file=t,l&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const h=this.virtualizer.getWindowSpecs(),p=this.top??0,m=this.computeRenderRangeFromWindow(t,p,h),y=super.renderPreparedFile({file:t,fileContainer:e,renderRange:m,lineAnnotations:r,forceRender:(u??n)||f||l,...a});return this.isSimpleMode()&&y&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),y}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%HP===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const a=t+n>>1,l=this.cache.checkpoints[a];if(l==null)throw new Error("VirtualizedFile: invalid checkpoint index");l.lineIndex<=e?(r=l,t=a+1):n=a-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,a=-1;for(;n<=r;){const l=n+r>>1,u=this.cache.checkpoints[l];if(u==null)throw new Error("VirtualizedFile: invalid checkpoint index");u.top<=e?(a=l,n=l+1):r=l-1}if(t==null)return a>=0?this.cache.checkpoints[a]:void 0;for(let l=a;l>=0;l--){const u=this.cache.checkpoints[l];if(u==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(u.lineIndex%t===0)return u}}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:a=!1,overflow:l="scroll"}=this.options,{hunkLineCount:u,lineHeight:d}=this.metrics,f=this.fileRenderer.getLineCount(e),h=this.height,p=Yn(this.metrics,a),m=f>0?Nc(this.metrics):0,{fileAnnotationHeight:y}=this.cache,b=p+y,S=Math.max(0,h-p-y-m),_=rm(this.lineAnnotations),w=t+p,x=y>0&&_&&w<r&&w+y>n;if(t<n-h||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-p-m};if(f<=u)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};const E=Math.ceil(Math.max(r-n,0)/d),L=Math.ceil(E/u)*u+u,A=L/u,R=(n+r)/2;if(l==="scroll"&&!this.hasLineAnnotations()){const le=t+b,ce=le+S;if(!x&&!(le<r&&ce>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-p-m};const ue=Math.floor(x&&R<t+b?0:(R-(t+b))/d),ge=Math.floor(ue/u)-Math.floor(A/2),Oe=Math.ceil(f/u),me=Math.max(0,Math.min(ge,Oe))*u,mt=ge<0?L+ge*u:L,Je=me===0?0:y+me*d,Xe=Math.min(mt,f-me);return{startingLine:me,totalLines:mt,bufferBefore:Je,bufferAfter:Math.max(0,(f-me-Xe)*d)}}const N=A,H=[],U=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-L*d*2),u);let Y=t+(U?.top??b),te=U?.lineIndex??0,J,K,ie;const Z=U?.lineIndex??0;for(let le=Z;le<f;le++){const ce=te%u===0,ue=Math.floor(te/u);if(ce&&(H[ue]=Y-(t+b),ie!=null)){if(ie<=0)break;ie--}const ge=this.getLineHeight(le,!1);Y>n-ge&&Y<r&&(J??=ue),Y+ge>R&&(K??=ue),ie==null&&Y>=r&&ce&&(ie=N),te++,Y+=ge}if(J==null)if(x)J=0,K=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-p-m};K??=J;const se=Math.round(K-A/2),I=Math.max(0,Math.ceil(f/u)-A),$=Math.max(0,Math.min(se,I)),F=$*u,re=se<0?L+se*u:L,B=H[$]??0,O=F===0?0:y+B,q=$+re/u,oe=q<H.length?S-H[q]:S-(Y-t-b);return{startingLine:F,totalLines:re,bufferBefore:O,bufferAfter:Math.max(0,oe)}}};function BP(e){let t;for(const n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===Mw&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}function Jr(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function jP(e){return{...e,hunks:e.hunks.map(t=>({...t,hunkContent:t.hunkContent.map(n=>({...n}))})),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function sm(e){return e!==""?e.split(uD):[]}function lm(e,t,n){const r=e==="clone"?jP(t):t;if(!r.isPartial)throw new Error("hydratePartialDiff: fileDiff must be partial");switch(r.type){case"change":case"rename-changed":return FP(r,$P(r,n),b_(r,n));case"rename-pure":{const a=b_(r,n);qP(r,n);const l=sm(a.contents);return r.isPartial=!1,r.deletionLines=l,r.additionLines=l,Zw(r,null,a),r}}throw new Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function FP(e,t,n){const r=sm(t.contents),a=sm(n.contents),{hunks:l,splitLineCount:u,unifiedLineCount:d}=GP(e.hunks,a.length);return e.hunks=l,e.splitLineCount=u,e.unifiedLineCount=d,e.isPartial=!1,e.deletionLines=r,e.additionLines=a,Zw(e,t,n),e}function GP(e,t){let n=0,r=0,a=0;const l=[];for(const u of e){const d=Math.max(u.additionStart-1,0),f=Math.max(u.deletionStart-1,0);let h=d,p=f,m=0,y=0,b=0,S=0;const _=[];for(const x of u.hunkContent){if(x.type==="context"){_.push({...x,additionLineIndex:h,deletionLineIndex:p}),h+=x.lines,p+=x.lines,b+=x.lines,S+=x.lines;continue}_.push({...x,additionLineIndex:h,deletionLineIndex:p}),h+=x.additions,p+=x.deletions,m+=x.additions,y+=x.deletions,b+=Math.max(x.additions,x.deletions),S+=x.additions+x.deletions}const w=Math.max(ei(u.additionStart,u.additionCount)-a,0);l.push({...u,collapsedBefore:w,additionLineIndex:d,deletionLineIndex:f,additionLines:m,deletionLines:y,hunkContent:_,splitLineStart:n+w,unifiedLineStart:r+w,splitLineCount:b,unifiedLineCount:S}),n+=w+b,r+=w+S,a=Wt(u.additionStart,u.additionCount)}if(l.length>0){const u=l[l.length-1],d=Wt(u.additionStart,u.additionCount),f=Math.max(t-d,0);n+=f,r+=f}return{hunks:l,splitLineCount:n,unifiedLineCount:r}}function $P(e,t){if(t.oldFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function b_(e,t){if(t.newFile==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function qP(e,t){if(t.oldFile!==null)throw new Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function WP(e,t,n){return e.cacheKey!=null?`${e.cacheKey}:hydrated`:YP(t,n)}function Zw(e,t,n){const r=WP(e,t,n);if(r==null){delete e.cacheKey;return}e.cacheKey=r}function YP(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?`${e.cacheKey}:${t.cacheKey}`:void 0:e?.cacheKey??t?.cacheKey}var XP=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,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const 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 Wn(e,t){return Ea(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Vu(e){return Ce({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Bu(e){return Ce({tagName:"div",children:[Ce({tagName:"span",children:[Qn("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function tp(e){return Ce({tagName:"div",children:[yc({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","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 aa({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:a,isFirstHunk:l,isLastHunk:u}){let d=0;const f=[];if(e==="metadata"&&t!=null&&f.push(Ce({tagName:"div",children:[Qn(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const h=[];n!=null&&(r?(l||(h.push(tp("up")),d++),u||(h.push(tp("down")),d++)):(h.push(tp(!l&&!u?"both":l?"down":"up")),d++)),h.push(Ce({tagName:"div",children:[Ce({tagName:"span",children:[Qn(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),r&&n!=null&&h.push(Ce({tagName:"div",children:[Qn("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),f.push(Ce({tagName:"div",children:h,properties:{"data-separator-wrapper":"","data-separator-multi-button":d>1?"":void 0}}))}return e==="custom"&&a!=null&&f.push(Ce({tagName:"slot",properties:{name:a}})),Ce({tagName:"div",children:f,properties:{"data-separator":f.length===0?"simple":e,"data-expand-index":n,"data-separator-first":l?"":void 0,"data-separator-last":u?"":void 0}})}function KP(e,t){return`hunk-separator-${e}-${t}`}function QP(e){const t=e.at(-1);return t==null?0:Math.max(Wt(t.additionStart,t.additionCount),Wt(t.deletionStart,t.deletionCount))}function um(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function S_({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 ju({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:a=!1}){const l=t[t.length-1];if(l==null||a||!n){t.push([r?0:1,e.value]);return}const u=l[0]===0;if(r===u||r&&e.value.length===1&&!u){l[1]+=e.value;return}t.push([r?0:1,e.value])}function Xs(e){return[ei(e.additionStart,e.additionCount)+1,Wt(e.additionStart,e.additionCount)+1]}function Ni({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:a}){const l=Math.max(t,0);if(l===0||e)return{fromStart:0,fromEnd:0,rangeSize:l,collapsedLines:l,renderAll:!1};if(n===!0||l<=a)return{fromStart:l,fromEnd:0,rangeSize:l,collapsedLines:0,renderAll:!0};const u=n?.get(r),d=Math.min(Math.max(u?.fromStart??0,0),l),f=Math.min(Math.max(u?.fromEnd??0,0),l),h=d+f,p=h>=l;return{fromStart:p?l:d,fromEnd:p?0:f,rangeSize:l,collapsedLines:Math.max(l-h,0),renderAll:p}}function ZP(e){const t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;const n=e.additionLines.length-Wt(t.additionStart,t.additionCount),r=e.deletionLines.length-Wt(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function Jw({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const r=e.additionLines.length-Wt(n.additionStart,n.additionCount),a=e.deletionLines.length-Wt(n.deletionStart,n.deletionCount);if(r<=0&&a<=0)return 0;if(r!==a)throw new Error(`${t}: trailing context mismatch (additions=${r}, deletions=${a}) for ${e.name}`);return Math.min(r,a)}function Ii({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:a}){if(t!==e.hunks.length-1)return;const l=Jw({fileDiff:e,errorPrefix:a});if(l<=0)return;if(n===!0||l<=r)return{fromStart:l,fromEnd:0,rangeSize:l,collapsedLines:0,renderAll:!0};const u=n?.get(e.hunks.length),d=Math.min(Math.max(u?.fromStart??0,0),l);return{fromStart:d,fromEnd:0,rangeSize:l,collapsedLines:l-d,renderAll:d>=l}}function e1({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(const[d,f]of e.hunks.entries()){const[h,p]=Xs(f);if(t<h){const m=Ni({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:n,hunkIndex:d,collapsedContextThreshold:r}),y=h-m.rangeSize;return m.renderAll||t<y+m.fromStart||t>=h-m.fromEnd}if(t<p)return!0}const a=Ii({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:"isAdditionLineRenderable"});if(a==null||a.renderAll)return!0;const l=e.hunks[e.hunks.length-1],[,u]=Xs(l);return t<u+a.fromStart||t>=u+a.rangeSize}function JP({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:a}){if(r===!0||e.isPartial)return t;const l=[];let u=1;for(const[f,h]of e.hunks.entries()){const[p,m]=Xs(h),y=Ni({isPartial:e.isPartial,rangeSize:h.collapsedBefore,expandedHunks:r,hunkIndex:f,collapsedContextThreshold:a}),b=p-y.rangeSize;y.renderAll?l.push([b,p]):(y.fromStart>0&&l.push([b,b+y.fromStart]),y.fromEnd>0&&l.push([p-y.fromEnd,p])),l.push([p,m]),u=m}const d=Ii({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:a,errorPrefix:"getNearestRenderableAdditionLine"});if(d!=null){const f=u;u=f+d.rangeSize,d.renderAll?l.push([f,u]):d.fromStart>0&&l.push([f,f+d.fromStart])}if(t>=u)return t;if(n==="down"){for(const[f,h]of l)if(h>t)return Math.max(f,t);return}for(let f=l.length-1;f>=0;f--){const[h,p]=l[f];if(h<=t)return Math.min(p-1,t)}}function t1({type:e,metrics:t}){return t.hunkSeparatorHeight??zP(e)}function n1({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function e8({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function t8(e){return e!=="simple"&&e!=="metadata"}function As({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!e8({type:e,hunkIndex:n,hunkSpecs:r}))return;const a=t1({type:e,metrics:t}),l=n1({type:e,metrics:t}),u=n>0?l:0,d=l;return{height:a,gapBefore:u,gapAfter:d,totalHeight:u+a+d}}function Kr({type:e,metrics:t}){if(!t8(e))return;const n=t1({type:e,metrics:t}),r=n1({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function no({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:a,collapsedContextThreshold:l=1,callback:u}){const d=n8({diff:e,diffStyle:t,startingLine:n,expandedHunks:a,collapsedContextThreshold:l}),f={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:d.splitCount,unifiedCount:d.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!f.isWindowedHighlight)return!1;const m=f.unifiedCount>=n+r,y=f.splitCount>=n+r;return t==="unified"?m:(t==="split"||m)&&y},shouldSkip(m,y){if(!f.isWindowedHighlight)return!1;const b=m>0&&f.unifiedCount+m<=n,S=y>0&&f.splitCount+y<=n;return t==="unified"?b:(t==="split"||b)&&S},incrementCounts(m,y){(t==="unified"||t==="both")&&(f.unifiedCount+=m),(t==="split"||t==="both")&&(f.splitCount+=y)},isInWindow(m,y){if(!f.isWindowedHighlight)return!0;const b=f.isInUnifiedWindow(m),S=f.isInSplitWindow(y);return t==="unified"?b:t==="split"?S:b||S},isInUnifiedWindow(m){return!f.isWindowedHighlight||f.unifiedCount>=n-m&&f.unifiedCount<n+r},isInSplitWindow(m){return!f.isWindowedHighlight||f.splitCount>=n-m&&f.splitCount<n+r},emit(m,y=!1){return y||(t==="unified"?f.incrementCounts(1,0):t==="split"?f.incrementCounts(0,1):f.incrementCounts(1,1)),u(m)??!1}};e:for(let m=d.hunkIndex;m<e.hunks.length;m++){let A=function(Z,se){return E==null||E.collapsedLines<=0||E.fromStart+E.fromEnd>0?0:t==="unified"?Z===y.unifiedLineStart+y.unifiedLineCount-1?E.collapsedLines:0:se===y.splitLineStart+y.splitLineCount-1?E.collapsedLines:0},N=function(){return R?0:(R=!0,x.collapsedLines)};var h=A,p=N;const y=e.hunks[m];if(y==null)throw new Error("iterateOverDiff: invalid hunk index");if(f.shouldBreak())break;const b=ei(y.deletionStart,y.deletionCount),S=ei(y.additionStart,y.additionCount),_=!e.isPartial&&y.deletionCount===0?b:y.deletionLineIndex,w=!e.isPartial&&y.additionCount===0?S:y.additionLineIndex,x=Ni({isPartial:e.isPartial,rangeSize:y.collapsedBefore,expandedHunks:a,hunkIndex:m,collapsedContextThreshold:l}),E=m===f.finalHunkIndex?Ii({fileDiff:e,hunkIndex:m,expandedHunks:a,collapsedContextThreshold:l,errorPrefix:"iterateOverDiff"}):void 0,L=x.fromStart+x.fromEnd;let R=x.collapsedLines===0;if(f.shouldSkip(L,L))f.incrementCounts(L,L),N();else{let Z=y.unifiedLineStart-x.rangeSize,se=y.splitLineStart-x.rangeSize,I=_-x.rangeSize,$=w-x.rangeSize,F=b+1-x.rangeSize,re=S+1-x.rangeSize;if(Fu(f,x.fromStart,t,B=>f.emit({hunkIndex:m,hunk:y,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+B,lineIndex:I+B,noEOFCR:!1,unifiedLineIndex:Z+B,splitLineIndex:se+B},additionLine:{unifiedLineIndex:Z+B,splitLineIndex:se+B,lineIndex:$+B,lineNumber:re+B,noEOFCR:!1}}))||(Z=y.unifiedLineStart-x.fromEnd,se=y.splitLineStart-x.fromEnd,I=_-x.fromEnd,$=w-x.fromEnd,F=b+1-x.fromEnd,re=S+1-x.fromEnd,Fu(f,x.fromEnd,t,B=>f.emit({hunkIndex:m,hunk:y,collapsedBefore:N(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:F+B,lineIndex:I+B,noEOFCR:!1,unifiedLineIndex:Z+B,splitLineIndex:se+B},additionLine:{unifiedLineIndex:Z+B,splitLineIndex:se+B,lineIndex:$+B,lineNumber:re+B,noEOFCR:!1}}),()=>{N()})))break e}let H=y.unifiedLineStart,U=y.splitLineStart,Y=_,te=w,J=b+1,K=S+1;const ie=y.hunkContent.at(-1);for(const Z of y.hunkContent){if(f.shouldBreak())break e;const se=Z===ie;if(Z.type==="context"){if(f.shouldSkip(Z.lines,Z.lines))f.incrementCounts(Z.lines,Z.lines),N();else if(Fu(f,Z.lines,t,I=>{const $=se&&I===Z.lines-1,F=H+I,re=U+I;return f.emit({hunkIndex:m,hunk:y,collapsedBefore:N(),collapsedAfter:A(F,re),type:"context",deletionLine:{lineNumber:J+I,lineIndex:Y+I,noEOFCR:$&&y.noEOFCRDeletions,unifiedLineIndex:F,splitLineIndex:re},additionLine:{unifiedLineIndex:F,splitLineIndex:re,lineIndex:te+I,lineNumber:K+I,noEOFCR:$&&y.noEOFCRAdditions}})},()=>{N()}))break e;H+=Z.lines,U+=Z.lines,Y+=Z.lines,te+=Z.lines,J+=Z.lines,K+=Z.lines}else{const I=Math.max(Z.deletions,Z.additions),$=Z.deletions+Z.additions;if(!f.shouldSkip($,I)){const F=o8(f,Z,t);(F[0]?.[0]??0)>0&&N();for(const[re,B]of F)for(let O=re;O<B;O++){const q=A(H+O,t==="unified"?U+(O<Z.deletions?O:O-Z.deletions):U+O);if(f.emit(a8({hunkIndex:m,hunk:y,collapsedBefore:N(),collapsedAfter:q,diffStyle:t,index:O,unifiedLineIndex:H,splitLineIndex:U,additionLineIndex:te,deletionLineIndex:Y,additionLineNumber:K,deletionLineNumber:J,content:Z,isLastContent:se,unifiedCount:$,splitCount:I}),!0))break e}}N(),f.incrementCounts($,I),H+=$,U+=I,Y+=Z.deletions,te+=Z.additions,J+=Z.deletions,K+=Z.additions}}if(E!=null){const{collapsedLines:Z,fromStart:se,fromEnd:I}=E,$=se+I;if(Fu(f,$,t,F=>{const re=F===$-1;return f.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:re?Z:0,type:"context-expanded",deletionLine:{lineNumber:J+F,lineIndex:Y+F,noEOFCR:!1,unifiedLineIndex:H+F,splitLineIndex:U+F},additionLine:{unifiedLineIndex:H+F,splitLineIndex:U+F,lineIndex:te+F,lineNumber:K+F,noEOFCR:!1}})},void 0,()=>f.shouldBreak()))break e}}}function n8({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:a}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const l=i8({diff:e,expandedHunks:r,collapsedContextThreshold:a});let u=0,d=e.hunks.length-1,f=e.hunks.length;for(;u<=d;){const p=u+d>>1,m=l[p+1];if(m==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?m.unifiedCount:m.splitCount)>n?(f=p,d=p-1):u=p+1}if(f>=e.hunks.length){const p=l[e.hunks.length];if(p==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:p.splitCount,unifiedCount:p.unifiedCount}}const h=l[f];if(h==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:f,splitCount:h.splitCount,unifiedCount:h.unifiedCount}}function i8({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,a=0;const l=e.hunks.length-1,u=[{splitCount:0,unifiedCount:0}];for(let d=0;d<e.hunks.length;d++){const f=e.hunks[d];if(f==null)throw new Error("iterateOverDiff: invalid hunk summary index");const h=Ni({isPartial:e.isPartial,rangeSize:f.collapsedBefore,expandedHunks:t,hunkIndex:d,collapsedContextThreshold:n}),p=h.fromStart+h.fromEnd;r+=p+f.splitLineCount,a+=p+f.unifiedLineCount;const m=d===l?Ii({fileDiff:e,hunkIndex:d,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"iterateOverDiff"}):void 0;if(m!=null){const y=m.fromStart+m.fromEnd;r+=y,a+=y}u.push({splitCount:r,unifiedCount:a})}return u}function r8(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];const r=[];function a(d){const f=Math.max(0,e.viewportStart-d),h=Math.min(t,e.viewportEnd-d);h>f&&r.push([f,h])}if(n!=="split"&&a(e.unifiedCount),n!=="unified"&&a(e.splitCount),r.length===0)return[0,0];let l=r[0][0],u=r[0][1];for(let d=1;d<r.length;d++){const f=r[d];l=Math.min(l,f[0]),u=Math.max(u,f[1])}return[l,u]}function Fu(e,t,n,r,a,l){const[u,d]=r8(e,t,n);u>0&&(e.incrementCounts(u,u),a?.());let f=u;for(;f<t;){if(l?.()===!0)return!0;if(f>=d){e.incrementCounts(t-f,t-f);break}if(e.isInWindow(0,0)){if(r(f)===!0)return!0}else e.incrementCounts(1,1);f++}return!1}function o8(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const r=n!=="split",a=n!=="unified",l=n==="unified"?"unified":"split",u=[];function d(m,y){if(m+y<=e.viewportStart||m>=e.viewportEnd)return;const b=Math.max(0,e.viewportStart-m),S=Math.min(y,e.viewportEnd-m);return S>b?[b,S]:void 0}function f(m,y){return l==="split"?m:y==="additions"?[m[0]+t.deletions,m[1]+t.deletions]:m}function h(m,y){if(m==null)return;const[b,S]=f(m,y);S>b&&u.push([b,S])}if(r&&(h(d(e.unifiedCount,t.deletions),"deletions"),h(d(e.unifiedCount+t.deletions,t.additions),"additions")),a&&(h(d(e.splitCount,t.deletions),"deletions"),h(d(e.splitCount,t.additions),"additions")),u.length===0)return u;u.sort((m,y)=>m[0]-y[0]);const p=[u[0]];for(const[m,y]of u.slice(1)){const b=p[p.length-1];m<=b[1]?b[1]=Math.max(b[1],y):p.push([m,y])}return p}function a8({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:a,index:l,unifiedLineIndex:u,splitLineIndex:d,additionLineIndex:f,deletionLineIndex:h,additionLineNumber:p,deletionLineNumber:m,content:y,isLastContent:b,unifiedCount:S,splitCount:_}){const w=l<y.deletions?u+l:void 0,x=a==="unified"?l>=y.deletions?u+l:void 0:l<y.additions?u+y.deletions+l:void 0,E=a==="unified"?d+(l<y.deletions?l:l-y.deletions):d+l,L=l<y.deletions?h+l:void 0,A=l<y.deletions?m+l:void 0,R=a==="unified"?l>=y.deletions?f+(l-y.deletions):void 0:l<y.additions?f+l:void 0,N=a==="unified"?l>=y.deletions?p+(l-y.deletions):void 0:l<y.additions?p+l:void 0,H=a==="unified"?b&&l===y.deletions-1&&t.noEOFCRDeletions:b&&l===_-1&&t.noEOFCRDeletions,U=a==="unified"?b&&l===S-1&&t.noEOFCRAdditions:b&&l===_-1&&t.noEOFCRAdditions,Y=L!=null&&A!=null&&w!=null?{lineNumber:A,lineIndex:L,noEOFCR:H,unifiedLineIndex:w,splitLineIndex:E}:void 0,te=R!=null&&N!=null&&x!=null?{unifiedLineIndex:x,splitLineIndex:E,lineIndex:R,lineNumber:N,noEOFCR:U}:void 0;if(Y==null&&te!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:te};if(Y!=null&&te==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:Y,additionLine:void 0};if(Y==null||te==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:Y,additionLine:te}}const s8={forcePlainText:!1};function i1(e,t,n,{forcePlainText:r,startingLine:a,totalLines:l,expandedHunks:u,collapsedContextThreshold:d=1}=s8){r?(a??=0,l??=1/0):(a=0,l=1/0);const f=a>0||l<1/0,h=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,p=Ow({theme:n.theme,highlighter:t}),m=r&&!f&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,y={deletionLines:[],additionLines:[]},{maxLineDiffLength:b}=n,S=!r&&!e.isPartial,_=r?u:void 0,w=new Map;function x(L){const A=S?0:L,R=w.get(A)??u8();return w.set(A,R),R}function E(L,A,R,N){if(f){let H=R.at(-1);(H==null||H.targetIndex+H.count!==A)&&(H={targetIndex:A,originalOffset:N.length,count:0},R.push(H)),H.count++}N.push(L)}no({diff:e,diffStyle:"both",startingLine:a,totalLines:l,expandedHunks:f?_:!0,collapsedContextThreshold:d,callback:({hunkIndex:L,additionLine:A,deletionLine:R,type:N})=>{const H=x(L),U=A!=null?A.splitLineIndex:R.splitLineIndex;N==="change"&&A!=null&&R!=null&&l8({additionLine:e.additionLines[A.lineIndex],deletionLine:e.deletionLines[R.lineIndex],deletionLineIndex:H.deletionContent.length,additionLineIndex:H.additionContent.length,deletionDecorations:H.deletionDecorations,additionDecorations:H.additionDecorations,lineDiffType:m,maxLineDiffLength:b}),R!=null&&(E(e.deletionLines[R.lineIndex],R.lineIndex,H.deletionSegments,H.deletionContent),H.deletionInfo.push({type:N==="change"?"change-deletion":N,lineNumber:R.lineNumber,altLineNumber:N==="change"?void 0:A.lineNumber??void 0,lineIndex:`${R.unifiedLineIndex},${U}`})),A!=null&&(E(e.additionLines[A.lineIndex],A.lineIndex,H.additionSegments,H.additionContent),H.additionInfo.push({type:N==="change"?"change-addition":N,lineNumber:A.lineNumber,altLineNumber:N==="change"?void 0:R.lineNumber??void 0,lineIndex:`${A.unifiedLineIndex},${U}`}))}});for(const L of w.values()){if(L.deletionContent.length===0&&L.additionContent.length===0)continue;const A={name:e.prevName??e.name,contents:L.deletionContent.value},R={name:e.name,contents:L.additionContent.value},{deletionLines:N,additionLines:H}=c8({deletionFile:A,deletionInfo:L.deletionInfo,deletionDecorations:L.deletionDecorations,additionFile:R,additionInfo:L.additionInfo,additionDecorations:L.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(S){y.deletionLines=N,y.additionLines=H;continue}if(L.deletionSegments.length>0)for(const U of L.deletionSegments)for(let Y=0;Y<U.count;Y++)y.deletionLines[U.targetIndex+Y]=N[U.originalOffset+Y];else y.deletionLines.push(...N);if(L.additionSegments.length>0)for(const U of L.additionSegments)for(let Y=0;Y<U.count;Y++)y.additionLines[U.targetIndex+Y]=H[U.originalOffset+Y];else y.additionLines.push(...H)}return{code:y,themeStyles:p,baseThemeType:h}}function l8({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:a,additionDecorations:l,lineDiffType:u,maxLineDiffLength:d}){if(e==null||t==null||u==="none"||(e=Mi(e),t=Mi(t),e.length>d||t.length>d))return;const f=u==="char"?GD(e,t):WD(e,t),h=[],p=[],m=u==="word-alt",y=f.at(-1);for(const S of f){const _=S===y;!S.added&&!S.removed?(ju({item:S,arr:h,enableJoin:m,isNeutral:!0,isLastItem:_}),ju({item:S,arr:p,enableJoin:m,isNeutral:!0,isLastItem:_})):S.removed?ju({item:S,arr:h,enableJoin:m,isLastItem:_}):ju({item:S,arr:p,enableJoin:m,isLastItem:_})}let b=0;for(const S of h)S[0]===1&&a.push(S_({line:n,spanStart:b,spanLength:S[1].length})),b+=S[1].length;b=0;for(const S of p)S[0]===1&&l.push(S_({line:r,spanStart:b,spanLength:S[1].length})),b+=S[1].length}function u8(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function c8({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:a,deletionDecorations:l,additionDecorations:u,languageOverride:d,options:{theme:f=it,...h}}){const p=d??It(e.name),m=d??It(t.name),{state:y,transformers:b}=Rw(h.useTokenTransformer),S=typeof f=="string"?{...h,lang:"text",theme:f,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:un("token"),tokenizeTimeLimit:0}:{...h,lang:"text",themes:f,transformers:b,decorations:void 0,defaultColor:!1,cssVariablePrefix:un("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(S.lang=p,y.lineInfo=n,S.decorations=l,im(a.codeToHast(Mi(e.contents),S))),additionLines:t.contents===""?[]:(S.lang=m,S.decorations=u,y.lineInfo=r,im(a.codeToHast(Mi(t.contents),S)))}}function wi(e,t){const n=lo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function d8(e,t){const n=Math.max(e,1);let r=Array.from({length:n},(a,l)=>`${" ".repeat(l+1)}
|
|
1534
|
+
`).join("");return r===t&&(r=Array.from({length:n},(a,l)=>`\0${" ".repeat(l)}
|
|
1535
|
+
`).join("")),r}function f8(e){for(const t of e)if(t.trim().length>0)return!1;return!0}function cm(e,t){return t.length>0&&t.length<e.deletionLines.length&&f8(t)}function Ic(e,t,n){const r=e.deletionLines.join(""),a=d8(t.length,r),l=lo({name:e.prevName??e.name,contents:r},{name:e.name,contents:a,lang:e.lang},n);return{hunks:l.hunks,splitLineCount:l.splitLineCount,unifiedLineCount:l.unifiedLineCount,additionLines:t,deletionLines:l.deletionLines,type:l.type}}function uc(e,t){return Ic(e,[""],t)}function r1(e,t){if(e.additionLines.length===0)return uc(e,t);if(cm(e,e.additionLines))return Ic(e,e.additionLines,t);const n=e.additionLines,r=wi(e,t);return o1(r,n),r}function h8(e){return e.length>1&&e.at(-1)===""}function o1(e,t){if(!h8(t))return;const n=t.length-e.additionLines.length;if(n<=0)return;const r=e.additionLines.length,a=e.hunks.at(-1);if(a!=null&&Wt(a.additionStart,a.additionCount)===r){for(const l of a.hunkContent)if(l.type==="change"&&l.additions<l.deletions&&l.additionLineIndex+l.additions===r){e.additionLines=t,l.additions+=n,a.additionCount+=n,a.additionLines+=n,og(e);return}}}function p8(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return xi(e,wi(e,n));const r=Array.from(t);if(r.length===0)return xi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(const l of r){const u=e.additionLines[l],d=e.deletionLines[l];if(u==null||d==null||Mi(u)===Mi(d))return xi(e,wi(e,n))}const a=m8(e,r);if(a.size===0)return xi(e,wi(e,n));for(const l of a)if(!v8(e,l,n))return xi(e,wi(e,n));return og(e),ZP(e)?xi(e,wi(e,n)):xi(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function xi(e,t){return Object.assign(e,t),t}function m8(e,t){const n=new Set;for(const r of t){const a=g8(e,r);if(a==null)return new Set;n.add(a)}return n}function g8(e,t){for(const[n,r]of e.hunks.entries()){const a=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<a)return n}}function v8(e,t,n){const r=e.hunks[t];if(r==null)return!1;const a=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),l=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),u=lo({name:e.prevName??e.name,contents:a.join("")},{name:e.name,contents:l.join(""),lang:e.lang},{...n,context:0}),d=u.hunks[0];return d==null||u.hunks.length!==1?!1:(y8(r,d),a1(e,t),!0)}function a1(e,t){const n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}const r=e.additionLines.at(-1),a=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==""&&!r.endsWith(`
|
|
1536
|
+
`),n.noEOFCRDeletions=a!=null&&a!==""&&!a.endsWith(`
|
|
1537
|
+
`)}function y8(e,t){const n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(a=>s1(a,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart=e.additionStart+t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart=e.deletionStart+t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,rg(e)}function s1(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function rg(e){let t=0,n=0;for(const r of e.hunkContent)r.type==="context"?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function og(e){let t=0,n=0,r=0;for(const a of e.hunks)a.collapsedBefore=Math.max(ei(a.additionStart,a.additionCount)-r,0),a.splitLineStart=t+a.collapsedBefore,a.unifiedLineStart=n+a.collapsedBefore,rg(a),t+=a.collapsedBefore+a.splitLineCount,n+=a.collapsedBefore+a.unifiedLineCount,r=Wt(a.additionStart,a.additionCount);if(e.hunks.length>0){const a=e.hunks[e.hunks.length-1],l=Math.max(e.additionLines.length-Wt(a.additionStart,a.additionCount),0);t+=l,n+=l}e.splitLineCount=t,e.unifiedLineCount=n}const __=new WeakMap;function b8(e){return e.length>1&&e[e.length-1]===""?e.slice(0,-1):e}function S8(e,t){const n=Math.min(e.length,t.length);let r=0;for(;r<n&&e[r]===t[r];)r++;let a=e.length,l=t.length;for(;a>r&&l>r&&e[a-1]===t[l-1];)a--,l--;if(!(r===a&&r===l))return{start:r,deletionEnd:a,additionEnd:l}}function dm(e,t){const n=e.hunks,r=e.additionLines,a=b8(r),l=a===r?e:{...e,additionLines:a},u=A8(n,T8(l,t),e.deletionLines.length),d=D8(l,u);if(e.additionLines=a,e.hunks=d,e.editSessionDirty=!0,z8(e),o1(e,r),!!N8(n,e.hunks))return{regions:u.map(f=>f.previousSpan)}}function _8(e,t,n,r){const a=Array.from(new Set(t)).filter(f=>f>=0&&f<e.additionLines.length).sort((f,h)=>f-h);if(a.length===0)return;const{hunks:l}=e;let u,d=0;for(const f of a){for(;d<l.length;){const m=l[d];if(f<zc(m)+m.additionCount)break;d++}const h=l[d],p=h==null?void 0:zc(h);if(p==null||f<p||u!=null&&u!==d)return dm(e,n);u=d}if(u!=null){if(C8(e,a,u,r,n)){e.editSessionDirty=!0;return}return dm(e,n)}}function C8(e,t,n,r,a){if(r==null||a?.ignoreWhitespace===!0||a?.stripTrailingCr===!0)return!1;const l=x8(e),u=e.hunks[n];if(u.hunkContent.some(E8))return!1;for(const d of t){const f=r.get(d),h=e.additionLines[d];if(f==null||h==null||l.has(f)||l.has(h))return!1;let p=!1;for(const m of u.hunkContent)if(m.type==="change"&&m.additions===m.deletions&&d>=m.additionLineIndex&&d<m.additionLineIndex+m.additions){p=!0;break}if(!p)return!1}return!0}function x8(e){const t=__.get(e);if(t?.lines===e.deletionLines)return t.set;const n=new Set(e.deletionLines);return __.set(e,{lines:e.deletionLines,set:n}),n}function E8(e){return e?.type==="change"&&(e.additions===0||e.deletions===0)}function w8(e,t){const n=new Map,{regions:r}=t;for(let a=0;a<=r.length;a++){const l=r[a-1],u=r[a],d=a===0?e.get(0):l==null?void 0:e.get(l.lastIndex+1),f=u==null?void 0:e.get(u.firstIndex),h=d?.fromStart??0,p=f?.fromEnd??0;(h>0||p>0)&&n.set(a,{fromStart:h,fromEnd:p})}return n}function k8(e,t,n){const r=[];if(e.isPartial)return r;for(const[l,u]of e.hunks.entries()){const d=Ni({isPartial:e.isPartial,rangeSize:u.collapsedBefore,expandedHunks:t,hunkIndex:l,collapsedContextThreshold:n});if(d.rangeSize<=n)continue;const f=fo(u),h=f-d.rangeSize;d.fromStart>0&&r.push([h,h+d.fromStart]),d.fromEnd>0&&r.push([f-d.fromEnd,f])}const a=Ii({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"captureExpansionAnchors"});if(a!=null&&a.fromStart>0&&a.rangeSize>n){const l=e.hunks[e.hunks.length-1],u=fo(l)+l.deletionCount;r.push([u,u+a.fromStart])}return r}function L8(e,t){const n=new Map;if(t.length===0)return n;const r=(l,u,d)=>{if(d<=u)return;let f=0,h=0;for(const[p,m]of t)m<=u||p>=d||(p<=u&&(f=Math.max(f,Math.min(m,d)-u)),m>=d&&(h=Math.max(h,d-Math.max(p,u))));(f>0||h>0)&&n.set(l,{fromStart:f,fromEnd:h})};for(const[l,u]of e.hunks.entries()){const d=fo(u);r(l,d-Math.max(u.collapsedBefore,0),d)}const a=e.hunks[e.hunks.length-1];return a!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,fo(a)+a.deletionCount,e.deletionLines.length),n}function C_(e,t){return e.editSessionDirty!==!0?!1:(e.editSessionDirty=void 0,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join("")===""?wi(e,t):r1(e,t)),!0)}function T8(e,t){if(S8(e.deletionLines,e.additionLines)==null)return[];const n=lo({name:e.prevName??e.name,contents:e.deletionLines.join("")},{name:e.name,contents:e.additionLines.join(""),lang:e.lang},t),r=[];let a=0,l=0;for(const u of n.hunks){const d=u.additionCount>0?u.additionLineIndex-a:u.deletionLineIndex-l;a+=d,l+=d;for(const f of u.hunkContent){if(f.type==="context"){a+=f.lines,l+=f.lines;continue}const h=s1(f,0,0);h.additions===0&&(h.additionLineIndex=a),h.deletions===0&&(h.deletionLineIndex=l),r.push(h),a+=h.additions,l+=h.deletions}}return r}function A8(e,t,n){const r=e.map((u,d)=>{const f=fo(u);return{deletionStart:f,deletionEnd:f+u.deletionCount,blocks:[],previousSpan:{firstIndex:d,lastIndex:d}}}),a=[];let l=0;for(const u of t){const d=u.deletionLineIndex,f=d+u.deletions;for(;l<r.length&&r[l].deletionEnd<d;)a.push(r[l]),l++;let h=a.length>0&&R8(d,f,a[a.length-1])?a.pop():void 0;for(;l<r.length&&r[l].deletionStart<=f;)h=O8(h,r[l]),l++;if(h==null){let p=d,m=f;if((u.deletions===0||u.additions===0)&&n>u.deletions){const y=a[a.length-1]?.deletionEnd??0,b=r[l]?.deletionStart??n;d>y?p--:f<b&&m++}h={deletionStart:p,deletionEnd:m,blocks:[],previousSpan:void 0}}h.deletionStart=Math.min(h.deletionStart,d),h.deletionEnd=Math.max(h.deletionEnd,f),h.blocks.push(u),a.push(h)}for(;l<r.length;)a.push(r[l]),l++;return a}function R8(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function O8(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function D8(e,t){const n=[];let r=0,a=0;for(const l of t){const u=l.deletionStart-r;if(u<0)throw new Error("buildRegionHunks: overlapping old-side regions");r+=u,a+=u;const d=a,f=[];for(const p of l.blocks){const m=p.deletionLineIndex-r,y=p.additionLineIndex-a;if(m<0||m!==y)throw new Error("buildRegionHunks: canonical block context mismatch");x_(f,m,a,r),r+=m,a+=y,f.push({...p}),r+=p.deletions,a+=p.additions}const h=l.deletionEnd-r;if(h<0)throw new Error("buildRegionHunks: block exceeds its old-side region");x_(f,h,a,r),r+=h,a+=h,n.push(M8(e,{additionStart:d,additionEnd:a,deletionStart:l.deletionStart,deletionEnd:l.deletionEnd},f))}if(e.deletionLines.length-r!==e.additionLines.length-a)throw new Error("buildRegionHunks: trailing context mismatch");return n}function M8(e,t,n){const r=t.additionEnd-t.additionStart,a=t.deletionEnd-t.deletionStart;let l=0,u=0;for(const f of n)f.type==="change"&&(l+=f.additions,u+=f.deletions);const d={collapsedBefore:0,additionStart:Gu(t.additionStart,r),additionCount:r,additionLines:l,additionLineIndex:w_(t.additionStart,r),deletionStart:Gu(t.deletionStart,a),deletionCount:a,deletionLines:u,deletionLineIndex:w_(t.deletionStart,a),hunkContent:n,hunkSpecs:`@@ -${Gu(t.deletionStart,a)},${a} +${Gu(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return rg(d),d}function x_(e,t,n,r){t>0&&e.push({type:"context",lines:t,additionLineIndex:n,deletionLineIndex:r})}function N8(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){const r=e[n],a=t[n];if(fo(r)!==fo(a)||r.deletionCount!==a.deletionCount||zc(r)!==zc(a)||r.additionCount!==a.additionCount||r.splitLineCount!==a.splitLineCount||!I8(r,a))return!0}return!1}function I8(e,t){const n=E_(e),r=E_(t);for(;;){const a=n.next(),l=r.next();if(a.done===!0||l.done===!0)return a.done===l.done;if(a.value[0]!==l.value[0]||a.value[1]!==l.value[1])return!1}}function*E_(e){for(const t of e.hunkContent){if(t.type==="context"){for(let r=0;r<t.lines;r++)yield[t.deletionLineIndex+r,t.additionLineIndex+r];continue}const n=Math.max(t.deletions,t.additions);for(let r=0;r<n;r++)yield[r<t.deletions?t.deletionLineIndex+r:void 0,r<t.additions?t.additionLineIndex+r:void 0]}}function zc(e){return ei(e.additionStart,e.additionCount)}function fo(e){return ei(e.deletionStart,e.deletionCount)}function Gu(e,t){return t===0?e:e+1}function w_(e,t){return t===0?e-1:e}function z8(e){og(e);for(let t=0;t<e.hunks.length;t++)a1(e,t)}function ba(e){const t=e.lang??It(e.name),n=e.lang??(e.prevName!=null?It(e.prevName):"text");return t==="text"&&n==="text"}let H8=-1;var P8=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++H8}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;editSessionActive=!1;constructor(e={theme:it},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Ns(e.theme??it)?ww():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this),this.endEditSession()}beginEditSession(){this.editSessionActive=!0;const e=this.diffCache;e!=null&&!e.isPartial&&e.additionLines.length===0&&(Object.assign(e,uc(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache())}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){const{renderCache:e}=this;if(e==null||ba(e.diff)||Wu(e.diff,this.getTokenizeMaxLength()))return Promise.resolve();const{diff:t}=e,{workerManager:n}=this;return!this.editSessionActive&&n?.isWorkingPool()===!0&&t.cacheKey!=null?(n.evictDiffFromCache(t.cacheKey),n.primeDiffHighlightCache(t).then(()=>{this.applyRefreshedResult(t,n.getDiffResultCache(t))}).catch(r=>this.onHighlightError(r))):this.asyncHighlight(t).then(r=>this.applyRefreshedResult(t,r)).catch(r=>this.onHighlightError(r))}applyRefreshedResult(e,t){if(t==null||this.renderCache==null||this.renderCache.diff!==e||this.editSessionActive)return;const{options:n}=this.getRenderOptions(e);Wn(n,t.options)&&(this.renderCache={diff:e,options:t.options,highlighted:!0,result:t.result,renderRange:void 0},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){const e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.diff.cacheKey!=null&&this.workerManager?.evictDiffFromCache(e.diff.cacheKey)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(r.fromStart+=n),(t==="down"||t==="both")&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??yD}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}updateRenderCache(e,t,n=!1){if(this.renderCache==null)return!1;const{result:r,diff:a}=this.renderCache;if(r==null)return!1;if(a.isPartial)throw new Error("Could not update render cache for partial diff");const l=r.code.additionLines,u=[],d=new Map;for(const[h,p]of e){const m=l[h]?.properties??{},y=p.map(w=>w[2]).join(""),b=h<a.additionLines.length,S=b?a.additionLines[h]??"":"",_=Mi(S);b&&(a.additionLines[h]=Nw(S,y),_!==y&&(u.push(h),d.set(h,S))),l[h]={type:"element",tagName:"div",properties:{"data-line":m["data-line"]??h+1,"data-line-index":m["data-line-index"]??h,"data-line-type":m["data-line-type"]??"context"},children:p.map(([w,x,E])=>w===0&&x===""?E===""?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:E}:{type:"element",tagName:"span",properties:{"data-char":w,style:`color:${x};`},children:[{type:"text",value:E}]})}}let f=!1;if(u.length>0)if(this.editSessionActive&&!a.isPartial){if(!n)if(a.additionLines.length<=1&&a.additionLines.join("")==="")Object.assign(a,uc(a,this.options.parseDiffOptions)),this.markEditSessionPass(a),f=!0;else if(cm(a,a.additionLines))Object.assign(a,Ic(a,a.additionLines,this.options.parseDiffOptions)),this.markEditSessionPass(a),f=!0;else{const h=_8(a,u,this.options.parseDiffOptions,d);this.applyExpansionRemap(h),f=h!=null}}else Object.assign(a,p8(a,u,this.options.parseDiffOptions));return r.baseThemeType=t,this.renderCache.isDirty=!0,f}applyExpansionRemap(e){e!=null&&(this.expandedHunks=w8(this.expandedHunks,e))}applyDocumentChange(e){if(this.renderCache==null)return;const{diff:t,result:n}=this.renderCache;if(n==null)return;if(t.isPartial)throw new Error("Could not apply document change for partial diff");const{additionLines:r}=t;t.additionLines=j8(e,r),n.code.additionLines=B8(r,t.additionLines,n.code.additionLines,e),t.additionLines.length<=1&&t.additionLines.join("")===""?(Object.assign(t,uc(t,this.options.parseDiffOptions)),n.code.additionLines[0]=fm(0,e.getLineText(0)),this.markEditSessionPass(t)):this.editSessionActive?this.applySessionDocumentChange(t):Object.assign(t,r1(t,this.options.parseDiffOptions)),this.renderCache.isDirty=!0}applySessionDocumentChange(e){const{parseDiffOptions:t}=this.options,n=e.additionLines;if(cm(e,n)){Object.assign(e,Ic(e,n,t)),this.markEditSessionPass(e);return}this.applyExpansionRemap(dm(e,t))}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){const n=t==="change"?e==="deletions"?"change-deletion":"change-addition":t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>nm(e);getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:a=!1,disableVirtualizationBuffers:l=!1,collapsed:u=!1,expandUnchanged:d=!1,collapsedContextThreshold:f=1,expansionLineCount:h=100,hunkSeparators:p="line-info",lineDiffType:m="word-alt",maxLineDiffLength:y=1e3,overflow:b="scroll",stickyHeader:S=!1,theme:_=it,headerRenderMode:w="default",tokenizeMaxLineLength:x=1e3,tokenizeMaxLength:E=vD,useTokenTransformer:L=!1,useCSSClasses:A=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:a,disableVirtualizationBuffers:l,collapsed:u,expandUnchanged:d,collapsedContextThreshold:f,expansionLineCount:h,hunkSeparators:p,lineDiffType:m,maxLineDiffLength:y,overflow:b,stickyHeader:S,theme:this.workerManager?.getDiffRenderOptions().theme??_,headerRenderMode:w,tokenizeMaxLineLength:x,tokenizeMaxLength:E,useTokenTransformer:L,useCSSClasses:A}}async initializeHighlighter(){return this.highlighter=await Dc(Tw(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=Wu(e,this.getTokenizeMaxLength());let r=this.workerManager?.getDiffResultCache(e);r!=null&&!Wn(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!ba(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??It(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??it}getEffectiveCodeOptions(){const e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0){const d=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&d.useTokenTransformer!==!0?{...d,useTokenTransformer:!0}:d}const{theme:r,tokenizeMaxLineLength:a,lineDiffType:l,maxLineDiffLength:u}=this.getOptionsWithDefaults();return{theme:r,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:a,lineDiffType:l,maxLineDiffLength:u}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Jr(e,n.diff)||!Wn(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=gc){if(e==null)return;const{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults();let{options:a,forceHighlight:l}=this.getRenderOptions(e);const u=this.getMatchingWorkerResultCache(e,a);u!=null&&!this.hasHighlightedRenderCache(e,a)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...u},l=!1),this.renderCache??={diff:e,highlighted:!1,options:a,result:void 0,renderRange:void 0};const d=e.additionLines.length>0||e.deletionLines.length>0,f=!d||ba(e)||Wu(e,this.getTokenizeMaxLength()),h=!Jr(e,this.renderCache.diff),p=!rd(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){const m=this.renderCache.result==null&&this.renderCache.highlighted&&!f&&!h&&um(t);m&&(this.renderCache.highlightPending=!0),!m&&(f||this.renderCache.result==null||!this.renderCache.highlighted&&(h||p))&&(this.renderCache.diff=e,this.renderCache.options=a,this.renderCache.highlighted=!1,(this.renderCache.result==null||h||p||l)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,um(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!f&&d&&(!this.renderCache.highlighted||l)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??It(e.name);const m=this.highlighter!=null&&Ns(a.theme),y=this.highlighter!=null&&Sc(this.computedLang),b=!f&&y;if(this.highlighter!=null&&m&&(l||f||!this.renderCache.highlighted&&b||this.renderCache.result==null)){const{result:S,options:_}=this.renderDiffWithHighlighter(e,this.highlighter,f||!y);this.renderCache={diff:e,options:_,highlighted:b,result:S,renderRange:void 0}}(!m||!f&&!y)&&this.asyncHighlight(e).then(({result:S,options:_})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,S,_,!f)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=gc){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:r,disableBackground:a,disableLineNumbers:l,overflow:u}=this.getOptionsWithDefaults();return Lw({type:"diff",diffIndicators:r,disableBackground:a,disableLineNumbers:l,overflow:u,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=Wu(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??It(e.name);const n=this.highlighter!=null&&Ns(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&Sc(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:a}=this.getOptionsWithDefaults(),l=i1(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:a});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===""&&l.code.additionLines[0]==null){let u;if(no({diff:e,diffStyle:"both",expandedHunks:n?!0:void 0,collapsedContextThreshold:a,callback:({additionLine:d})=>{if(d?.lineIndex===0)return u=d,!0}}),u==null)throw new Error("DiffHunksRenderer: missing empty addition line");l.code.additionLines[0]=fm(0,"",u.unifiedLineIndex,u.splitLineIndex)}return{result:l,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){if(this.renderCache==null)return;const a=this.renderCache.highlightPending===!0||!this.renderCache.highlighted||!Wn(this.renderCache.options,n)||!Jr(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!Wn(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Jr(e,n.diff)&&Wn(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:a}){const{diffStyle:l,disableFileHeader:u,expandUnchanged:d,expansionLineCount:f,collapsedContextThreshold:h,hunkSeparators:p}=this.getOptionsWithDefaults(),m=this.renderCache?.isDirty??!1;this.diff=e;const y=l==="unified",b=$8(e,this.options.loadDiffFiles!=null),S=!e.isPartial||b;let _=[],w=[],x=[];const E=[],{additionLines:L,deletionLines:A}=n,R={rowCount:0,hunkSeparators:p,additionsContentAST:_,deletionsContentAST:w,unifiedContentAST:x,unifiedGutterAST:fa(),deletionsGutterAST:fa(),additionsGutterAST:fa(),expansionLineCount:f,hunkData:E,incrementRowCount(I=1){R.rowCount+=I},pushToGutter(I,$){switch(I){case"unified":R.unifiedGutterAST.children.push($);break;case"deletions":R.deletionsGutterAST.children.push($);break;case"additions":R.additionsGutterAST.children.push($);break}}},N=Jw({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),H={size:0,side:void 0,increment(){this.size+=1},flush(){if(l!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(R.pushToGutter("additions",ln(void 0,"buffer",this.size)),_?.push(Vu(this.size))):(R.pushToGutter("deletions",ln(void 0,"buffer",this.size)),w?.push(Vu(this.size))),this.size=0,this.side=void 0}}},U=(I,$,F,re,B)=>{R.pushToGutter(I,$x($,F,re,B))};function Y(I){H.flush(),l==="unified"?np("unified",I,R):(np("deletions",I,R),np("additions",I,R))}this.pushFileLevelAnnotations(e,l,t,R),no({diff:e,diffStyle:l,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:d?!0:this.expandedHunks,collapsedContextThreshold:h,callback:({hunkIndex:I,hunk:$,collapsedBefore:F,collapsedAfter:re,additionLine:B,deletionLine:O,type:q})=>{const oe=O!=null?O.splitLineIndex:B.splitLineIndex,le=B!=null?B.unifiedLineIndex:O.unifiedLineIndex;l==="split"&&q!=="change"&&H.flush(),F>0&&Y({hunkIndex:I,collapsedLines:F,rangeSize:Math.max($?.collapsedBefore??0,0),hunkSpecs:$?.hunkSpecs,isFirstHunk:I===0,isLastHunk:!1,isExpandable:S});const ce=l==="unified"?le:oe,ue={type:q,hunkIndex:I,lineIndex:ce,unifiedLineIndex:le,splitLineIndex:oe,deletionLine:O,additionLine:B};if(l==="unified"){const Ne=this.getUnifiedInjectedRowsForLine?.(ue);Ne?.before!=null&&L_(Ne.before,R);let ze=O!=null?A[O.lineIndex]:void 0,Ke=B!=null?L[B.lineIndex]:void 0;if(ze==null&&Ke==null){const zt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(zt,{file:e.name}),new Error(zt)}const wn=q==="change"?B!=null?"change-addition":"change-deletion":q,Xt=this.getUnifiedLineDecoration({type:q,lineType:wn,additionLineIndex:B?.lineIndex,deletionLineIndex:O?.lineIndex});U("unified",Xt.gutterLineType,B!=null?B.lineNumber:O.lineNumber,`${le},${oe}`,Xt.gutterProperties),Ke!=null?Ke=qu(Ke,Xt.contentProperties,m&&B!=null?{"data-line":B.lineNumber,"data-line-index":`${le},${oe}`}:void 0):ze!=null&&(ze=qu(ze,Xt.contentProperties,m&&O!=null?{"data-line":O.lineNumber,"data-line-index":`${le},${oe}`}:void 0)),$u({diffStyle:"unified",type:q,deletionLine:ze,additionLine:Ke,unifiedSpan:this.getAnnotations("unified",O?.lineNumber,B?.lineNumber,I,ce),createAnnotationElement:zt=>this.createAnnotationElement(zt),context:R}),Ne?.after!=null&&L_(Ne.after,R)}else{const Ne=this.getSplitInjectedRowsForLine?.(ue);Ne?.before!=null&&T_(Ne.before,R,H);let ze=O!=null?A[O.lineIndex]:void 0,Ke=B!=null?L[B.lineIndex]:void 0;const wn=this.getSplitLineDecoration({side:"deletions",type:q,lineIndex:O?.lineIndex}),Xt=this.getSplitLineDecoration({side:"additions",type:q,lineIndex:B?.lineIndex});if(ze==null&&Ke==null){const gt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(gt,{file:e.name}),new Error(gt)}const zt=(()=>{if(q==="change"){if(Ke==null)return"additions";if(ze==null)return"deletions"}})();zt!=null?(H.side!=null&&H.side!==zt&&H.flush(),H.side=zt,H.increment()):q==="change"&&H.flush();const cn=this.getAnnotations("split",O?.lineNumber,B?.lineNumber,I,ce);if(cn!=null&&H.size>0&&H.flush(),O!=null){const gt=qu(ze,wn.contentProperties,m?{"data-line":O.lineNumber,"data-line-index":`${O.unifiedLineIndex},${oe}`}:void 0);U("deletions",wn.gutterLineType,O.lineNumber,`${O.unifiedLineIndex},${oe}`,wn.gutterProperties),gt!=null&&(ze=gt)}if(B!=null){const gt=qu(Ke,Xt.contentProperties,m?{"data-line":B.lineNumber,"data-line-index":`${B.unifiedLineIndex},${oe}`}:void 0);U("additions",Xt.gutterLineType,B.lineNumber,`${B.unifiedLineIndex},${oe}`,Xt.gutterProperties),gt!=null&&(Ke=gt)}$u({diffStyle:"split",type:q,additionLine:Ke,deletionLine:ze,...cn,createAnnotationElement:gt=>this.createAnnotationElement(gt),context:R}),Ne?.after!=null&&T_(Ne.after,R,H)}const ge=l==="split"&&$!=null&&oe===$.splitLineStart+$.splitLineCount-1,Oe=I===e.hunks.length-1&&$!=null&&(l==="split"?oe===$.splitLineStart+$.splitLineCount-1:le===$.unifiedLineStart+$.unifiedLineCount-1),me=ge?$.noEOFCRDeletions:!1,mt=ge?$.noEOFCRAdditions:!1,Je=(O?.noEOFCR??!1)||me,Xe=(B?.noEOFCR??!1)||mt;if(Xe||Je){if(l==="split"&&H.flush(),Je){const Ne=q==="context"||q==="context-expanded"?q:"change-deletion";l==="unified"?(R.unifiedContentAST.push(Bu(Ne)),R.pushToGutter("unified",ln(Ne,"metadata",1))):(R.deletionsContentAST.push(Bu(Ne)),R.pushToGutter("deletions",ln(Ne,"metadata",1)),Xe||(R.pushToGutter("additions",ln(void 0,"buffer",1)),R.additionsContentAST.push(Vu(1))))}if(Xe){const Ne=q==="context"||q==="context-expanded"?q:"change-addition";l==="unified"?(R.unifiedContentAST.push(Bu(Ne)),R.pushToGutter("unified",ln(Ne,"metadata",1))):(R.additionsContentAST.push(Bu(Ne)),R.pushToGutter("additions",ln(Ne,"metadata",1)),Je||(R.pushToGutter("deletions",ln(void 0,"buffer",1)),R.deletionsContentAST.push(Vu(1))))}R.incrementRowCount(1)}p!=="simple"&&p!=="metadata"&&(re>0||Oe&&b)&&Y({hunkIndex:q==="context-expanded"?I:I+1,collapsedLines:Oe&&b?"unknown":re,rangeSize:N,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:S}),R.incrementRowCount(1)}}),l==="split"&&H.flush();const te=Math.max(QP(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),J=t.bufferBefore>0||t.bufferAfter>0,K=!y&&e.type!=="deleted",ie=!y&&e.type!=="new",Z=R.rowCount>0||J;_=K&&Z?_:void 0,w=ie&&Z?w:void 0,x=y&&Z?x:void 0;const se=this.createPreElement(w!=null&&_!=null,te);return{unifiedGutterAST:y&&Z?R.unifiedGutterAST.children:void 0,unifiedContentAST:x,deletionsGutterAST:ie&&Z?R.deletionsGutterAST.children:void 0,deletionsContentAST:w,additionsGutterAST:K&&Z?R.additionsGutterAST.children:void 0,additionsContentAST:_,hunkData:E,preNode:se,themeStyles:r,baseThemeType:a,headerElement:u?void 0:this.renderHeader(this.diff),totalLines:te,rowCount:R.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,r=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;const a=fa(n);return a.properties.style=`grid-row: span ${t.rowCount}`,[a,Iw(r,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",r=this.renderCodeAST("unified",e);if(r!=null)return t.push(Ce({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const a=this.renderCodeAST("deletions",e);a!=null&&t.push(Ce({tagName:"code",children:a,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const l=this.renderCodeAST("additions",e);return l!=null&&t.push(Ce({tagName:"code",children:l,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Nt(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?Nt(e):Nt(Ce({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,r){if(!od(n))return;const a=e.type!=="new"?k_(om(this.deletionAnnotations)):[],l=e.type!=="deleted"?k_(om(this.additionAnnotations)):[];if(a.length===0&&l.length===0)return;const u=-1,d=-1,{createAnnotationElement:f}=this;if(t==="unified"){$u({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:u,lineIndex:d,annotations:a.concat(l)},createAnnotationElement:f,context:r});return}$u({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:u,lineIndex:d,annotations:a},additionSpan:{type:"annotation",hunkIndex:u,lineIndex:d,annotations:l},createAnnotationElement:f,context:r})}getAnnotations(e,t,n,r,a){const l={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(t!=null)for(const d of this.deletionAnnotations[t]??[])l.annotations.push(Nn(d));const u={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(n!=null)for(const d of this.additionAnnotations[n]??[])(e==="unified"?l:u).annotations.push(Nn(d));if(e==="unified")return l.annotations.length>0?l:void 0;if(!(u.annotations.length===0&&l.annotations.length===0))return{deletionSpan:l,additionSpan:u}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return kw({fileOrDiff:e,mode:t,stickyHeader:n})}};function k_(e){return e?.map(t=>Nn(t))??[]}const U8=new Intl.PluralRules("en-US");function V8(e){return`${e} unmodified line${U8.select(e)==="one"?"":"s"}`}function L_(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function T_(e,t,n){for(const{deletion:r,addition:a}of e){if(r==null&&a==null)continue;const l=r!=null&&a!=null?void 0:r==null?"deletions":"additions";(l==null||n.side!==l)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter("deletions",r.gutter)),a!=null&&(t.additionsContentAST.push(a.content),t.pushToGutter("additions",a.gutter)),l!=null&&(n.side=l,n.increment()),t.incrementRowCount(1)}}function $u({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:a,deletionSpan:l,additionSpan:u,createAnnotationElement:d,context:f}){let h=!1;if(e==="unified"){if(r!=null?f.unifiedContentAST.push(r):n!=null&&f.unifiedContentAST.push(n),a!=null){const p=t==="change"?n!=null?"change-deletion":"change-addition":t;f.unifiedContentAST.push(d(a)),f.pushToGutter("unified",ln(p,"annotation",1)),h=!0}}else if(e==="split"){if(n!=null&&f.deletionsContentAST.push(n),r!=null&&f.additionsContentAST.push(r),l!=null){const p=t==="change"?n!=null?"change-deletion":"context":t;f.deletionsContentAST.push(d(l)),f.pushToGutter("deletions",ln(p,"annotation",1)),h=!0}if(u!=null){const p=t==="change"?r!=null?"change-addition":"context":t;f.additionsContentAST.push(d(u)),f.pushToGutter("additions",ln(p,"annotation",1)),h=!0}}h&&f.incrementRowCount(1)}function np(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:a,isFirstHunk:l,isLastHunk:u,isExpandable:d},f){if(typeof n=="number"&&n<=0)return;const h=e==="unified"?f.unifiedContentAST:e==="deletions"?f.deletionsContentAST:f.additionsContentAST;if(f.hunkSeparators==="metadata"){a!=null&&(f.pushToGutter(e,aa({type:"metadata",content:a,isFirstHunk:l,isLastHunk:u})),h.push(aa({type:"metadata",content:a,isFirstHunk:l,isLastHunk:u})),e!=="additions"&&f.incrementRowCount(1));return}if(f.hunkSeparators==="simple"){t>0&&(f.pushToGutter(e,aa({type:"simple",isFirstHunk:l,isLastHunk:!1})),h.push(aa({type:"simple",isFirstHunk:l,isLastHunk:!1})),e!=="additions"&&f.incrementRowCount(1));return}const p=KP(e,t),m=r>f.expansionLineCount,y=d?t:void 0,b=typeof n=="number"?V8(n):"More unchanged context may be available";f.pushToGutter(e,aa({type:f.hunkSeparators,content:b,expandIndex:y,chunked:m,slotName:p,isFirstHunk:l,isLastHunk:u})),h.push(aa({type:f.hunkSeparators,content:b,expandIndex:y,chunked:m,slotName:p,isFirstHunk:l,isLastHunk:u})),e!=="additions"&&f.incrementRowCount(1),f.hunkData.push({slotName:p,hunkIndex:t,lines:typeof n=="number"?n:0,lineCountKnown:typeof n=="number",type:e,expandable:d?{up:!l,down:!u,chunked:m}:void 0})}function qu(e,t,n){return e==null||e.type!=="element"||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function A_(e){return e.length>0&&e[e.length-1]===""?e.length-1:e.length}function B8(e,t,n,r){const a=A_(e),l=A_(t),u=Math.min(a,l);let d=0;for(;d<u&&e[d]===t[d];)d++;let f=0;for(;f<u-d&&e[a-1-f]===t[l-1-f];)f++;const h=new Array(t.length);for(let p=0;p<d;p++)h[p]=n[p];for(let p=0;p<f;p++)h[l-1-p]=n[a-1-p];a<e.length&&l<t.length&&(h[t.length-1]=n[e.length-1]);for(let p=e.length;p<t.length;p++)h[p]??=n[p];for(let p=d;p<t.length;p++)h[p]??=fm(p,r.getLineText(p));return h}function fm(e,t,n=e,r=e){return{type:"element",tagName:"div",properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":"context"},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:t}]}]}}function j8(e,t){const n=[],r=G8(t);for(let a=0;a<e.lineCount;a++){const l=e.getLineText(a,!0);n.push(a<e.lineCount-1&&!F8(l)?l+r:l)}return n}function F8(e){return e.endsWith(`
|
|
1538
|
+
`)||e.endsWith("\r")}function G8(e){for(const t of e){if(t.endsWith(`\r
|
|
1539
|
+
`))return`\r
|
|
1540
|
+
`;if(t.endsWith(`
|
|
1541
|
+
`))return`
|
|
1542
|
+
`;if(t.endsWith("\r"))return"\r"}return`
|
|
1543
|
+
`}function Wu(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function $8(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function q8(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function W8(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function hm(e,t=300){let n;try{await Promise.race([e(),new Promise(r=>{n=setTimeout(r,t)})])}finally{n!=null&&clearTimeout(n)}}function pm({oldFile:e,newFile:t},n){if(!(e===void 0&&t===void 0)){if(e===void 0||t===void 0)throw new Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw new Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return t===null?{oldFile:e,newFile:t}:{oldFile:e,newFile:t}}}function Y8(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:Yw(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function X8(e){return e.isPartial&&(e.type==="change"||e.type==="rename-changed"||e.type==="rename-pure")}let K8=-1;var l1=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++K8}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(t={theme:it},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new aE,this.scrollSyncManager=new XP,this.interactionManager=new oE("diff",bc(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return Y8(t)}createHunksRenderer(t){return new P8(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,n="additions")=>{const r=this.fileDiffCache;if(r==null)return;const a=r.hunks.at(-1);let l,u;e:for(const d of r.hunks){const f=n==="deletions"?d.deletionStart:d.additionStart,h=n==="deletions"?d.deletionCount:d.additionCount;let p=ei(f,h)+1,m=d.splitLineStart,y=d.unifiedLineStart;if(t<p){const b=p-t;l=Math.max(y-b,0),u=Math.max(m-b,0);break e}if(t>=p+h){if(d===a){const b=t-(p+h);l=y+d.unifiedLineCount+b,u=m+d.splitLineCount+b;break e}continue}for(const b of d.hunkContent)if(b.type==="context")if(t<p+b.lines){const S=t-p;u=m+S,l=y+S;break e}else p+=b.lines,m+=b.lines,y+=b.lines;else{const S=n==="deletions"?b.deletions:b.additions;if(t<p+S){const _=t-p;l=y+(n==="additions"?b.deletions:0)+_,u=m+_;break e}else p+=S,m+=Math.max(b.deletions,b.additions),y+=b.deletions+b.additions}break e}if(!(l==null||u==null))return[l,u]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(bc(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Ea(this.appliedThemeCSS.theme,this.options.theme??it)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,n,r){return!(t||n||r||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,n){this.lineStateRefreshPending?this.deferredSelectedLines=[t,n]:this.interactionManager.setSelection(t,n)}setEditorActiveLine(t,n){this.lineStateRefreshPending?this.deferredEditorActiveLine=[t,n]:this.interactionManager.setEditorActiveLine(t,{lineNumberOnly:n?.lineNumberOnly,side:n?.side??"additions"})}flushDeferredLineState(){const{deferredEditorActiveLine:t,deferredSelectedLines:n}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,t!=null&&this.setEditorActiveLine(...t),n!=null&&this.interactionManager.setSelection(...n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:n="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:n==="wrap",columnVariables:this.shouldApplyColumnVariables(n)?"apply":"measure"}),n==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(t){return typeof this.options.hunkSeparators=="function"?!0:t==="scroll"&&(this.lineAnnotations.length>0||this.pre?.hasAttribute("data-has-merge-conflict")===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(t){this.codeUnified!=null&&(this.codeUnified.scrollLeft=t),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=t),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=t)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(t=!1){kp(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(t),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,t?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:a,fileDiff:l,...u}){if(!this.enabled)throw new Error("FileDiff.hydrate: attempting to call hydrate after cleaned up");if(this.fileContainer!=null)throw new Error("FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated");const d=pm(u,"FileDiff.hydrate"),f=d?.oldFile,h=d?.newFile;this.hydrateElements(t,n),J8(this.pre,Q8({fileDiff:l,oldFile:f,newFile:h}),this.options.collapsed)||e5(this.headerElement,Z8({fileDiff:l,oldFile:f,newFile:h}),this.options.disableFileHeader)?this.render({...u,fileContainer:t,lineAnnotations:a,fileDiff:l,preventEmit:!0}):this.hydrationSetup({fileDiff:l,lineAnnotations:a,...d}),r||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),qw(t,n);for(const r of t.shadowRoot?.children??[]){if(r instanceof SVGElement){this.spriteSVG=r;continue}if(r instanceof HTMLElement){if(r instanceof HTMLPreElement){this.pre=r;for(const a of r.children)!(a instanceof HTMLElement)||a.tagName.toLowerCase()!=="code"||("deletions"in a.dataset&&(this.codeDeletions=a),"additions"in a.dataset&&(this.codeAdditions=a),"unified"in a.dataset&&(this.codeUnified=a));continue}if("diffsHeader"in r.dataset){this.headerElement=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-theme-css")){this.themeCSSStyle=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=r,this.appliedUnsafeCSS=r.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:n,newFile:r,lineAnnotations:a}){this.lineAnnotations=a??this.lineAnnotations,this.additionFile=r,this.deletionFile=n,this.fileDiff=t??(n!==void 0&&r!==void 0?lo(n,r,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(t,n,r)=>{this.expandHunk(t,n,r)};expandHunk=(t,n,r)=>{this.hunksRenderer.expandHunk(t,n,r),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){const{fileDiff:t,options:{loadDiffFiles:n}}=this;t==null||n==null||!X8(t)||this.pendingFiles?.fileDiff===t||(this.pendingFiles={fileDiff:t,promise:this.loadFilesForDiff(t,n)})}async loadFilesForDiff(t,n){try{const r=await n(t);if(!this.enabled||this.fileDiff!==t)return;await this.handleFilesLoaded(t,r)}catch(r){if(this.options.disableErrorHandling===!0)throw r;console.error(r)}finally{this.pendingFiles?.fileDiff===t&&(this.pendingFiles=void 0)}}async handleFilesLoaded(t,n){this.fileDiff!==t||!t.isPartial||(lm("merge",t,n),this.setHydratedState(n),await hm(()=>this.primeHighlightCache(t)),!(!this.enabled||this.fileDiff!==t)&&this.rerender())}setHydratedState(t){this.deletionFile=t.oldFile,this.additionFile=t.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:t,deferManagers:n=!1,forceRender:r=!1,preventEmit:a=!1,lineAnnotations:l,fileContainer:u,containerWrapper:d,renderRange:f,...h}){const p=pm(h,"FileDiff.render"),m=p?.oldFile,y=p?.newFile;if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");t!=null&&t.cacheKey===void 0&&(t.cacheKey=t.prevName!=null?t.prevName+":"+t.name:t.name),this.editor?.__postponeBgTokenizeToNextFrame();const{collapsed:b=!1,themeType:S="system",expandUnchanged:_=!1}=this.options,w=b?void 0:f,x=this.hasThemeChanged(),E=p!=null,L=E&&(!R_(m,this.deletionFile)||!R_(y,this.additionFile));let A=t!=null&&t!==this.fileDiff;const R=l!=null&&(l.length>0||this.lineAnnotations.length>0)?l!==this.lineAnnotations:!1;if(!b&&rd(w,this.renderRange)&&!r&&!R&&!x&&(t!=null&&t===this.fileDiff||t==null&&!L))return this.applyCachedThemeState(S);let N;t==null&&E&&(L||this.fileDiff==null)&&(N=lo(p.oldFile,p.newFile,this.options.parseDiffOptions));const{renderRange:H}=this;if(this.renderRange=w,E?(this.deletionFile=m,this.additionFile=y):t!=null&&(this.deletionFile=void 0,this.additionFile=void 0),t!=null?this.fileDiff=t:N!=null&&(A=!0,this.fileDiff=N),A&&(this.cachedHeaderHTML=void 0),l!=null&&this.setLineAnnotations(l),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(C_(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),_&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:U=!1,disableFileHeader:Y=!1}=this.options;if(Y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),u=this.getOrCreateFileContainer(u,d),this.applyCachedThemeState(S),b){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const te=this.hunksRenderer.renderDiff(this.fileDiff,zx);te!=null&&this.applyThemeState(u,te.themeStyles,S,te.baseThemeType),te?.headerElement!=null&&this.applyHeaderToDOM(te.headerElement,u),this.renderSeparators([]),this.injectUnsafeCSS()}catch(te){if(U)throw te;console.error(te),te instanceof Error&&this.applyErrorToDOM(te,u)}return a||this.emitPostRender(),!0}try{const te=this.getOrCreatePreNode(u);if(!(this.canPartiallyRender(r,R,L||A||x)&&this.applyPartialRender({previousRenderRange:H,renderRange:w}))){const J=this.hunksRenderer.renderDiff(this.fileDiff,w);if(J==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(u,J.themeStyles,S,J.baseThemeType),J.headerElement!=null&&this.applyHeaderToDOM(J.headerElement,u),J.additionsContentAST!=null||J.deletionsContentAST!=null||J.unifiedContentAST!=null?this.applyHunksToDOM(te,J):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(J.hunkData)}this.applyBuffers(te,w),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,n||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(te){if(U)throw te;console.error(te),te instanceof Error&&this.applyErrorToDOM(te,u)}return a||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:r}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;this.options.onPostRender?.(n,this,"unmount");return}if(n==null)return;const a=this.mounted?"update":"mount";this.mounted=!0,r?.(n,this,a)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){const t=this.editor,n=this.fileContainer,r=this.fileDiffCache,a=this.lineAnnotations,l=this.computeEditorRenderRange(this.renderRange);t!=null&&n!=null&&r!=null&&!r.isPartial&&this.hunksRenderer.initializeHighlighter().then(u=>{!this.enabled||this.editor!==t||this.fileContainer!==n||this.fileDiffCache!==r||t.__syncRenderView(u,n,r,a,l)})}computeEditorRenderRange(t){const n=this.fileDiffCache;if(t==null||n==null||um(t))return t;const{diffStyle:r="split",expandUnchanged:a=!1,collapsedContextThreshold:l=1}=this.options;let u,d;return no({diff:n,diffStyle:r,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({additionLine:f})=>{f!=null&&(u??=f.lineNumber,d=f.lineNumber)}}),u==null||d==null?{...t,startingLine:0,totalLines:0}:{...t,startingLine:u-1,totalLines:d-u+1}}attachEditor(t){if(this.type!=="file-diff")throw new Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=t,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),n=>{this.editor=void 0,n!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){const t=this.fileDiffCache;if(t==null||t.editSessionDirty!==!0)return!1;const{collapsedContextThreshold:n=1}=this.options,r=k8(t,this.hunksRenderer.getExpandedHunksMap(),n);return C_(t,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(L8(t,r)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(t,n){this.hunksRenderer.applyDocumentChange(t);const r=this.hunksRenderer.diffCache;if(r!=null){const a=this.fileDiff?.cacheKey;a!=null&&r.cacheKey==null&&(r.cacheKey=a),this.fileDiff=r}n!==void 0&&n!==this.lineAnnotations&&(this.setLineAnnotations(n),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(t,n,r={}){const{shouldRefreshDiffsView:a,lineCountChangeInFlight:l}=r;if(this.hunksRenderer.updateRenderCache(t,n,l)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}a===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle==="split"?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(t){const n=this.fileDiffCache;if(n==null)return!0;const{expandUnchanged:r=!1,collapsedContextThreshold:a=1}=this.options;return e1({fileDiff:n,lineNumber:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a})}getNearestRenderableLine(t,n){const r=this.fileDiffCache;if(r==null)return t;const{expandUnchanged:a=!1,collapsedContextThreshold:l=1}=this.options;return JP({fileDiff:r,lineNumber:t,direction:n,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l})}revealLine(t){const n=this.fileDiffCache,{expandUnchanged:r=!1,collapsedContextThreshold:a=1,expansionLineCount:l=100}=this.options;if(n==null||n.isPartial||r)return!1;const u=this.hunksRenderer.getExpandedHunksMap();for(const[p,m]of n.hunks.entries()){const[y,b]=Xs(m);if(t<y){const S=Ni({isPartial:n.isPartial,rangeSize:m.collapsedBefore,expandedHunks:u,hunkIndex:p,collapsedContextThreshold:a}),_=y-S.rangeSize;if(S.renderAll||t<_+S.fromStart||t>=y-S.fromEnd)return!1;const w=t-(_+S.fromStart)+1,x=y-S.fromEnd-t;return w<=x?this.expandHunk(p,"up",w+l):this.expandHunk(p,"down",x+l),!0}if(t<b)return!1}const d=Ii({fileDiff:n,hunkIndex:n.hunks.length-1,expandedHunks:u,collapsedContextThreshold:a,errorPrefix:"FileDiff.revealLine"});if(d==null||d.renderAll)return!1;const f=n.hunks[n.hunks.length-1],[,h]=Xs(f);return t<h+d.fromStart||t>=h+d.rangeSize?!1:(this.expandHunk(n.hunks.length,"up",t-(h+d.fromStart)+1+l),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){Hx(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}async primeHighlightCache(t=this.fileDiff){const{workerManager:n}=this;if(t==null||n==null||!n.isWorkingPool()||t.cacheKey==null||ba(t))return;const r=this.options.tokenizeMaxLength??1e5;Math.max(t.additionLines.length,t.deletionLines.length)>r||await n.primeDiffHighlightCache(t).catch(a=>{console.error(a)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(t){const{hunkSeparators:n}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof n!="function"){for(const{element:a}of this.separatorCache.values())a.remove();this.separatorCache.clear();return}const r=new Map(this.separatorCache);for(const a of t){const l=a.slotName;let u=this.separatorCache.get(l);if(u==null||!W8(a,u.hunkData)){u?.element.remove();const d=document.createElement("div");d.style.display="contents",d.slot=a.slotName;const f=n(a,this);f!=null&&d.appendChild(f),this.fileContainer.appendChild(d),u={element:d,hunkData:a},this.separatorCache.set(l,u)}r.delete(l)}for(const[a,{element:l}]of r.entries())this.separatorCache.delete(a),l.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[r,a]of this.lineAnnotations.entries()){const l=`${r}-${Nn(a)}`;let u=this.annotationCache.get(l);if(u==null||!q8(a,u.annotation)){u?.element.remove();const d=n(a);if(d==null)continue;u={element:Pw(Nn(a)),annotation:a},u.element.appendChild(d),this.fileContainer.appendChild(u.element),this.annotationCache.set(l,u)}t.delete(l)}for(const[r,{element:a}]of t.entries())this.annotationCache.delete(r),a.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=Uw();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}getOrCreateFileContainer(t,n){const{fileContainer:r}=this,a=t??r??document.createElement("diffs-container"),l=r!==a;return r!=null&&l&&this.editor?.__captureFocusForDOMReplacement(),l&&this.emitPostRender(!0),this.fileContainer=a,r!=null&&l&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),l&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const r of n.children)r instanceof SVGElement?this.spriteSVG??=r:Mc(r)&&r.hasAttribute("data-theme-css")?(this.themeCSSStyle??=r,this.hasAdoptedThemeCSS=!0):Mc(r)&&r.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=r,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=zw;const a=r.firstChild;a instanceof SVGElement&&(this.spriteSVG=a)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(this.editor?.__captureFocusForDOMReplacement(),n.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const n of Array.from(t.children))n instanceof HTMLElement&&(n.hasAttribute("data-unified")?this.codeUnified=n:n.hasAttribute("data-deletions")?this.codeDeletions=n:n.hasAttribute("data-additions")&&(this.codeAdditions=n))}applyHeaderToDOM(t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:r}=this,a=this.cachedHeaderHTML??Nt(t);if(this.cachedHeaderHTML=a,a!==this.lastRenderedHeaderHTML){const y=document.createElement("div");y.innerHTML=a;const b=y.firstElementChild;if(!(b instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(b,this.headerElement):n.shadowRoot?.prepend(b),this.headerElement=b,this.lastRenderedHeaderHTML=a}if(this.isContainerManaged||r==null)return;const{renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderFilenameSuffix:d,renderHeaderMetadata:f}=this.options;if(l!=null){const y=l(r)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,el,y),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}const h=u?.(r)??void 0,p=d?.(r)??void 0,m=f?.(r)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,jm,h),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,Fm,p),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,Gm,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,r,a){if(a==null){n?.remove();return}const l=n??this.createHeaderSlotElement(r);return n==null&&t.appendChild(l),this.replaceHeaderSlotContent(l,a),l}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=Vw(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Fw(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,r,a){const l=t.shadowRoot??t.attachShadow({mode:"open"}),u=a??r,d=this.options.theme??it,f=typeof d=="string"?d:{...d},h=Ys(l);if(this.themeCSSStyle?.parentNode===l&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===u&&this.appliedThemeCSS.scrollbarGutter===h){this.appliedThemeCSS.theme=f;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===l){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:f,themeStyles:n,themeType:u,baseThemeType:a,scrollbarGutter:h};return}this.themeCSSStyle=Xw({shadowRoot:l,currentNode:this.themeCSSStyle,themeCSS:Gw(n,u,h)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:f,themeStyles:n,themeType:u,baseThemeType:a,scrollbarGutter:h}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=$w(this.themeCSSStyle.textContent??"",Ys(t)))}shouldGuardRebuildScroll(){return this.editor!=null&&Kw()}applyHunksToDOM(t,n){this.shouldGuardRebuildScroll()?am(t,()=>this.replaceCodeColumns(t,n)):this.replaceCodeColumns(t,n)}applyCodeColumnsInPlace(t,n,r){const a=this.getColumnPair(t);if(a==null)return!1;const l=dr(n[0]),u=dr(n[1]);return l==null||u==null?!1:(a.gutter.innerHTML=Nt(l),a.content.innerHTML=Nt(u),r!==this.lastRowCount&&(a.gutter.style.setProperty("grid-row",`span ${r}`),a.content.style.setProperty("grid-row",`span ${r}`)),!0)}replaceCodeColumns(t,n){const{overflow:r="scroll"}=this.options,a=(this.options.hunkSeparators??"line-info")==="line-info",l=r==="wrap"?n.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,n);let u=!1;const d=[],f=this.hunksRenderer.renderCodeAST("unified",n),h=this.hunksRenderer.renderCodeAST("deletions",n),p=this.hunksRenderer.renderCodeAST("additions",n);this.editor?.__captureFocusForDOMReplacement(),f!=null?(u=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=sc({code:this.codeUnified,columnType:"unified",rowSpan:l,containerSize:a}),this.applyCodeColumnsInPlace(this.codeUnified,f,n.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(f)),d.push(this.codeUnified)):h!=null||p!=null?(h!=null?(u=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=sc({code:this.codeDeletions,columnType:"deletions",rowSpan:l,containerSize:a}),this.applyCodeColumnsInPlace(this.codeDeletions,h,n.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(h)),d.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),p!=null?(u=u||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=sc({code:this.codeAdditions,columnType:"additions",rowSpan:l,containerSize:a}),this.applyCodeColumnsInPlace(this.codeAdditions,p,n.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(p)),d.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),d.length===0?t.textContent="":u&&t.replaceChildren(...d),this.lastRowCount=n.rowCount}applyPartialRender({previousRenderRange:t,renderRange:n}){const{pre:r,codeUnified:a,codeAdditions:l,codeDeletions:u,options:{diffStyle:d="split"}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;const f=this.getCodeColumns(d,a,u,l);if(f==null)return!1;const h=t.startingLine,p=n.startingLine,m=h+t.totalLines,y=p+n.totalLines,b=Math.max(h,p),S=Math.min(m,y);if(S<=b)return!1;const _=Math.max(0,b-h),w=Math.max(0,m-S),x=this.trimColumns({columns:f,trimStart:_,trimEnd:w,previousStart:h,overlapStart:b,overlapEnd:S,diffStyle:d});if(x<0)throw new Error("FileDiff.applyPartialRender: failed to trim to overlap");if(this.lastRowCount<x)throw new Error("FileDiff.applyPartialRender: trimmed beyond DOM row count");let E=this.lastRowCount-x;const L=(H,U)=>{if(!(U<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:H,totalLines:U,bufferBefore:0,bufferAfter:0})},A=L(p,Math.max(b-p,0));if(A==null&&p<b)return!1;const R=L(S,Math.max(y-S,0));if(R==null&&y>S)return!1;const N=(H,U)=>{if(H!=null){if(d==="unified"&&!Array.isArray(f))this.insertPartialHTML(d,f,H,U);else if(d==="split"&&Array.isArray(f))this.insertPartialHTML(d,f,H,U);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");E+=H.rowCount}};return this.cleanupErrorWrapper(),N(A,"afterbegin"),N(R,"beforeend"),this.lastRowCount!==E&&(this.applyRowSpan(d,f,E),this.lastRowCount=E),!0}insertPartialHTML(t,n,r,a){if(t==="unified"&&!Array.isArray(n)){const l=this.hunksRenderer.renderCodeAST("unified",r);this.renderPartialColumn(n,l,a)}else if(t==="split"&&Array.isArray(n)){const l=this.hunksRenderer.renderCodeAST("deletions",r),u=this.hunksRenderer.renderCodeAST("additions",r);this.renderPartialColumn(n[0],l,a),this.renderPartialColumn(n[1],u,a)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}refreshSplitDiffView(){if(this.options.diffStyle!=="split")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("split",this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;const r=(a,l)=>{if(l==null)return;const u=this.hunksRenderer.renderCodeAST(a,t),d=dr(u?.[0]),f=dr(u?.[1]);for(const[h,p]of[[l.gutter,d],[l.content,f]])if(p!=null&&h.childElementCount===p.length)for(let m=0;m<p.length;m++){const y=h.children[m],b=p[m].properties["data-line-type"];b!=null&&y.dataset.lineType!==b&&(y.dataset.lineType=b)}};r("deletions",n[0]),r("additions",n[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!=="unified")return;const t=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(t==null)return;const n=this.getCodeColumns("unified",this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;const r=this.hunksRenderer.renderCodeAST("unified",t),a=dr(r?.[0]),l=dr(r?.[1]),u=()=>{for(const[d,f]of[[n.gutter,a],[n.content,l]])f!=null&&(d.innerHTML=Nt(f));t.rowCount!==this.lastRowCount&&(this.applyRowSpan("unified",n,t.rowCount),this.lastRowCount=t.rowCount)};this.shouldGuardRebuildScroll()?am(this.pre,u):u(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(t,n,r){if(t==null||n==null)return;const a=dr(n[0]),l=dr(n[1]);if(a==null||l==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const u=l.at(0);r==="beforeend"&&u?.type==="element"&&typeof u.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(u.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],a,l,!0);const d=l.at(-1);r==="afterbegin"&&d?.type==="element"&&typeof d.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(d.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],a,l,!1),t.gutter.insertAdjacentHTML(r,this.hunksRenderer.renderPartialHTML(a)),t.content.insertAdjacentHTML(r,this.hunksRenderer.renderPartialHTML(l))}mergeBuffersIfNecessary(t,n,r,a,l,u){if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement))return;const d=this.getBufferSize(n.dataset);d!=null&&(u?(a.shift(),l.shift()):(a.pop(),l.pop()),this.updateBufferSize(n,d+t),this.updateBufferSize(r,d+t))}applyRowSpan(t,n,r){const a=l=>{l!=null&&(l.gutter.style.setProperty("grid-row",`span ${r}`),l.content.style.setProperty("grid-row",`span ${r}`))};if(t==="unified"&&!Array.isArray(n))a(n);else if(t==="split"&&Array.isArray(n))a(n[0]),a(n[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,n,r){let a=0,l=0,u=0,d=!1;const f=r>=0;if(t==null)return 0;const h=Array.from(t.content.children),p=Array.from(t.gutter.children);if(h.length!==p.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;u<h.length&&!(n<=0&&!f&&!d);){const m=p[u],y=h[u];if(u++,!(m instanceof HTMLElement)||!(y instanceof HTMLElement))throw console.error({gutterElement:m,contentElement:y}),new Error("FileDiff.trimColumnRows: invalid row elements");if(d&&(d=!1,m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset||m.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset)){m.remove(),y.remove(),l++;continue}if("lineIndex"in m.dataset&&"lineIndex"in y.dataset){(n>0||f&&a>=r)&&(m.remove(),y.remove(),n>0&&(n--,n===0&&(d=!0)),l++),a++;continue}if("separator"in m.dataset&&"separator"in y.dataset){(n>0||f&&a>=r)&&(m.remove(),y.remove(),l++);continue}if(m.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in y.dataset){(n>0||f&&a>=r)&&(m.remove(),y.remove(),l++);continue}if(m.dataset.gutterBuffer==="metadata"&&"noNewline"in y.dataset){(n>0||f&&a>=r)&&(m.remove(),y.remove(),l++);continue}if(m.dataset.gutterBuffer==="buffer"&&"contentBuffer"in y.dataset){const b=this.getBufferSize(y.dataset);if(b==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(n>0){const S=Math.min(n,b),_=b-S;_>0?(this.updateBufferSize(m,_),this.updateBufferSize(y,_),l+=S):(m.remove(),y.remove(),l+=b),n-=S,n===0&&_===0&&(d=!0)}else if(f){const S=a,_=a+b-1;if(r<=S)m.remove(),y.remove(),l+=b;else if(r<=_){const w=_-r+1,x=b-w;this.updateBufferSize(m,x),this.updateBufferSize(y,x),l+=w}}a+=b;continue}throw console.error({gutterElement:m,contentElement:y}),new Error("FileDiff.trimColumnRows: unknown row elements")}return l}trimColumns({columns:t,diffStyle:n,overlapEnd:r,overlapStart:a,previousStart:l,trimEnd:u,trimStart:d}){const f=Math.max(0,a-l),h=r-l;if(h<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const p=d>0,m=u>0;if(!p&&!m)return 0;const y=p?f:0,b=m?h:-1;if(n==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,y,b);if(n==="split"&&Array.isArray(t)){const S=this.trimColumnRows(t[0],y,b),_=this.trimColumnRows(t[1],y,b);if(t[0]!=null&&t[1]!=null&&S!==_)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?S:_}else throw console.error({diffStyle:n,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const n=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(n)?void 0:n}updateBufferSize(t,n){t.dataset.bufferSize=`${n}`,t.style.setProperty("grid-row",`span ${n}`),t.style.setProperty("min-height",`calc(${n} * 1lh)`)}getColumnPair(t){if(t==null)return;const n=t.children[0],r=t.children[1];if(!(!(n instanceof HTMLElement)||!(r instanceof HTMLElement)||n.dataset.gutter==null||r.dataset.content==null))return{gutter:n,content:r}}getCodeColumns(t,n,r,a){if(t==="unified")return this.getColumnPair(n);{const l=this.getColumnPair(r),u=this.getColumnPair(a);return l!=null||u!=null?[l,u]:void 0}}updateBuffers(t){this.pre!=null&&this.applyBuffers(this.pre,t)}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(t,{additionsContentAST:n,deletionsContentAST:r,totalLines:a},l){const{diffIndicators:u="bars",disableBackground:d=!1,disableLineNumbers:f=!1,overflow:h="scroll",diffStyle:p="split"}=this.options,m={type:"diff",diffIndicators:u,disableBackground:d,disableLineNumbers:f,overflow:h,split:p==="unified"?!1:n!=null&&r!=null,totalLines:a,customProperties:l};Hw(m,this.appliedPreAttributes)||(Ww(t,m),this.appliedPreAttributes=m)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const r=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",r.appendChild(this.errorWrapper);const a=document.createElement("div");a.dataset.errorMessage="",a.innerText=t.message,this.errorWrapper.appendChild(a);const l=document.createElement("pre");l.dataset.errorStack="",l.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(l)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function R_(e,t){return e==null||t==null?e==null&&t==null:An(e,t)}function Q8({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Z8({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function J8(e,t,n=!1){return!n&&e==null&&t}function e5(e,t,n=!1){return e==null&&t&&!n}function dr(e){if(!(e==null||e.type!=="element"))return e.children??[]}function t5({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:a,expandedHunks:l,collapsedContextThreshold:u,canHydratePartialDiff:d}){let f=Yn(t,n),h=f;const p=a?!0:l,m=e.hunks.length-1;for(let y=0;y<e.hunks.length;y++){const b=e.hunks[y];if(b==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const S=Ni({isPartial:e.isPartial,rangeSize:b.collapsedBefore,expandedHunks:p,hunkIndex:y,collapsedContextThreshold:u}),_=(S.fromStart+S.fromEnd)*t.lineHeight;if(f+=_,h+=_,S.collapsedLines>0){const E=As({type:r,metrics:t,hunkIndex:y,hunkSpecs:b.hunkSpecs})?.totalHeight??0;f+=E,h+=E}f+=b.splitLineCount*t.lineHeight,h+=b.unifiedLineCount*t.lineHeight;const w=n5(b);f+=w.split*t.lineHeight,h+=w.unified*t.lineHeight;const x=y===m?Ii({fileDiff:e,hunkIndex:y,expandedHunks:p,collapsedContextThreshold:u,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(x!=null){const E=(x.fromStart+x.fromEnd)*t.lineHeight;if(f+=E,h+=E,x.collapsedLines>0){const L=Kr({type:r,metrics:t})?.totalHeight??0;f+=L,h+=L}}else if(y===m&&e.isPartial&&d){const E=Kr({type:r,metrics:t})?.totalHeight??0;f+=E,h+=E}}if(e.hunks.length>0){const y=Nc(t);f+=y,h+=y}return{splitHeight:f,unifiedHeight:h}}function n5(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return i5(e,t)}function i5(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,a=t.additions>0&&e.noEOFCRAdditions;return{split:r||a?1:0,unified:n}}const mm=3e3;let r5=-1;var o5=class extends l1{__id=`little-virtualized-file-diff:${++r5}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;currentExpandUnchanged;pendingHydratedDiff;pendingExpansions;constructor(e,t,n,r,a=!1){super(e,r,a),this.virtualizer=t,this.metrics=lc(n)}setMetrics(e,t=!1){const n=lc(e);!t&&vc(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!rm(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber!==0?!1:e.type==="new"?t.side==="additions":e.type==="deleted"?t.side==="deletions":!0)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!$c(t,e),r=n&&d5(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:f5(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),r=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],a=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&a&&od(this.renderRange)){const l=a5(r)??0;this.setFileAnnotationHeight(l)&&(e=!0)}else!a&&this.setFileAnnotationHeight(0)&&(e=!0);for(const l of r){if(l==null)continue;const u=l.children[1];if(u instanceof HTMLElement)for(const d of u.children){if(!(d instanceof HTMLElement))continue;const f=d.dataset.lineIndex;if(f==null)continue;const h=p5(f,n);let p=d.getBoundingClientRect().height,m=!1;d.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in d.nextElementSibling.dataset||"noNewline"in d.nextElementSibling.dataset)&&("noNewline"in d.nextElementSibling.dataset&&(m=!0),p+=d.nextElementSibling.getBoundingClientRect().height);const y=this.getEstimatedLineHeight(m),b=this.cache.heightDeltas.get(h)??0,S=p-y;S!==b&&(e=!0,this.cache.measuredHeightDeltaTotal+=S-b,S===0?this.cache.heightDeltas.delete(h):this.cache.heightDeltas.set(h,S))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}prepareCodeViewItem(e,t,n,r){const a=!Jr(this.fileDiff,e),l=this.syncLineAnnotations(r);let u=n?.resetDiffLayoutCache===!0||a||l,d=a||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=lc(n.metrics),u=!0,d=!0);const{collapsed:f=!1,expandUnchanged:h=!1}=this.options;return this.currentCollapsed!==f&&(this.currentCollapsed=f,u=!0),this.currentExpandUnchanged!==h&&(this.currentExpandUnchanged=h,u=!0,d=!0),u&&this.resetLayoutCache({includeEstimatedHeights:d}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:r=!1,expandUnchanged:a=!1,collapsed:l=!1,collapsedContextThreshold:u=1}=this.options,d=this.getDiffStyle(),f=this.getHunkSeparatorType(),h=d==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const p=Yn(this.metrics,r),m=this.getLayoutCheckpointBeforeLineIndex(h);let y=m?.top??p+this.cache.fileAnnotationHeight;if(l)return{top:p,height:0};let b;return no({diff:this.fileDiff,diffStyle:d,startingLine:m?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:u,callback:({hunkIndex:S,hunk:_,collapsedBefore:w,collapsedAfter:x,deletionLine:E,additionLine:L})=>{const A=d==="split"?L?.splitLineIndex??E?.splitLineIndex:L?.unifiedLineIndex??E?.unifiedLineIndex;if(A==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(w>0){const N=As({type:f,metrics:this.metrics,hunkIndex:S,hunkSpecs:_?.hunkSpecs});if(N!=null){if(y+=N.gapBefore,h>=A-w&&h<A)return b={top:y,height:N.height},!0;y+=N.height+N.gapAfter}}const R=this.getLineHeight(A,(L?.noEOFCR??!1)||(E?.noEOFCR??!1));if(A===h)return b={top:y,height:R},!0;if(y+=R,x>0){const N=Kr({type:f,metrics:this.metrics});if(N!=null){if(h>A&&h<=A+x)return b={top:y+N.gapBefore,height:N.height},!0;y+=N.totalHeight}}return!1}}),b}getEditorViewport(){return this.virtualizer.type==="simple"?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:a=1}=this.options;if(r)return;const l=this.getDiffStyle(),u=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const d=this.getLayoutCheckpointBeforeTop(e);let f=d?.top??Yn(this.metrics,t)+this.cache.fileAnnotationHeight,h;return no({diff:this.fileDiff,diffStyle:l,startingLine:d?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:p,hunk:m,collapsedBefore:y,collapsedAfter:b,deletionLine:S,additionLine:_})=>{const w=l==="split"?_?.splitLineIndex??S?.splitLineIndex:_?.unifiedLineIndex??S?.unifiedLineIndex;if(w==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(y>0){const E=As({type:u,metrics:this.metrics,hunkIndex:p,hunkSpecs:m?.hunkSpecs});E!=null&&(f+=E.totalHeight)}if(f>=e&&(S!=null?h={lineNumber:S.lineNumber,side:"deletions",top:f}:_!=null&&(h={lineNumber:_.lineNumber,side:"additions",top:f}),h!=null))return!0;const x=this.getLineHeight(w,(_?.noEOFCR??!1)||(S?.noEOFCR??!1));if(f+=x,b>0){const E=Kr({type:u,metrics:this.metrics});E!=null&&(f+=E.totalHeight)}return!1}}),h}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:a}=t;let l=0;if(a===0){const u=e??this.virtualizer.getWindowSpecs();this.top<u.top&&(l=r)}return{topOffset:this.top+n+l,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.loadFilesIfNecessary(),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(!(this.fileDiff!==e||!e.isPartial)){if(this.isAdvancedMode()){const n=lm("clone",e,t);if(await hm(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(lm("merge",e,t),this.setHydratedState(t),await hm(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e)return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}consumeCodeViewLayoutChanges(e){let t=!1,n;const{pendingExpansions:r,pendingHydratedDiff:a}=this;if(r!=null){this.pendingExpansions=void 0;for(const l of r)this.hunksRenderer.expandHunk(l.hunkIndex,l.direction,l.expansionLineCountOverride),t=!0}return a!=null&&(this.pendingHydratedDiff=void 0,a.expectedDiff===e&&(this.setHydratedState(a.files),n=a.nextDiff)),n!=null?(this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0})):t&&(this.forceRenderOverride=!0,this.invalidateDerivedLayoutCache(!0)),n}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;const{pendingExpansions:t}=this,n=this.fileDiffCache;if(t==null||t.length===0||n==null)return!1;const{expansionLineCount:r=100,collapsedContextThreshold:a=1}=this.options,l=new Map(this.hunksRenderer.getExpandedHunksMap());for(const u of t){const d={...l.get(u.hunkIndex)??{fromStart:0,fromEnd:0}},f=u.expansionLineCountOverride??r;(u.direction==="up"||u.direction==="both")&&(d.fromStart+=f),(u.direction==="down"||u.direction==="both")&&(d.fromEnd+=f),l.set(u.hunkIndex,d)}return e1({fileDiff:n,lineNumber:e,expandedHunks:l,collapsedContextThreshold:a})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),!(!this.enabled||this.fileDiff==null)&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){const{renderRange:r}=this;if(this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!==void 0&&this.fileDiff!==void 0){const a=this.virtualizer.getWindowSpecs(),l=this.computeRenderRangeFromWindow(this.fileDiff,this.top??0,a);l.bufferAfter!==r.bufferAfter&&this.updateBuffers(l)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.fileDiff){const n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;const r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}const{disableFileHeader:a=!1,collapsed:l=!1}=this.options,u=Yn(this.metrics,a);if(this.height+=u,l){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getActiveEstimatedHeight(e=this.fileDiff){this.ensureEstimatedDiffHeights(e);const t=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return t}ensureEstimatedDiffHeights(e=this.fileDiff){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:a,unifiedHeight:l}=t5({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:ip(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=a,this.cache.estimatedUnifiedHeight=l}validateComputedHeight(e=this.fileDiff){if(this.fileContainer==null||e==null)return;const t=this.fileContainer.getBoundingClientRect();t.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:e.name,elementHeight:t.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...a}={}){const l=pm(a,"VirtualizedFileDiff.render"),u=l!=null,d=l?.oldFile,f=l?.newFile,h=u&&(!M_(d,this.deletionFile)||!M_(f,this.additionFile));let p=t??this.fileDiff;t==null&&u&&(h||this.fileDiff==null)&&(p=lo(l.oldFile,l.newFile,this.options.parseDiffOptions));const{forceRenderOverride:m,isSetup:y}=this;this.forceRenderOverride=void 0;const b=this.syncLineAnnotations(r);b&&this.resetLayoutCache({includeEstimatedHeights:!1});const S=t!=null&&t!==this.fileDiff,_=p!=null&&!Jr(this.fileDiff,p),w=S||h;if(_&&this.resetLayoutCache({includeEstimatedHeights:!0}),e=this.getOrCreateFileContainer(e),p==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(y)this.top??=this.getVirtualizedTop(),_&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,p));else{this.computeApproximateSize(!1,p);const R=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(R==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");R.connect(e,this),this.isVisible=R.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!w||!y))return this.fileDiff=p,l!=null&&(this.deletionFile=d,this.additionFile=f),_&&(this.cachedHeaderHTML=void 0),this.renderPlaceholder(this.height);const x=this.virtualizer.getWindowSpecs(),E=this.top??0,L=this.computeRenderRangeFromWindow(p,E,x),A=super.render({fileDiff:p,fileContainer:e,renderRange:L,lineAnnotations:r,forceRender:(m??n)||b||_,...l,...a});return this.isSimpleMode()&&A&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),A}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type==="advanced"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return h5(this.options.hunkSeparators)}approximateLayoutCheckpoints(e=this.fileDiff){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e==null||e.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,a=e.hunks.length-1,l=ip(e,this.options.loadDiffFiles!=null),u=this.getDiffStyle(),d=this.getHunkSeparatorType(),f=n?!0:this.hunksRenderer.getExpandedHunksMap(),h=s5(this.cache.heightDeltas);let p=Yn(this.metrics,t)+this.cache.fileAnnotationHeight,m=0;const y=({rowCount:b,startLineIndex:S,preSeparatorHeight:_=0,postSeparatorHeight:w=0,metadataOffsets:x=[]})=>{if(b<=0)return;const E=m,L=m+b;let A=l5(E);for(;A<L;){const R=A-E,N=p+(R>0?_:0)+R*this.metrics.lineHeight+u5(x,R)*this.metrics.lineHeight+O_(h,S,S+R);this.cache.checkpoints.push({renderedLineIndex:A,lineIndex:S+R,top:N}),A+=mm}p+=_+b*this.metrics.lineHeight+x.length*this.metrics.lineHeight+O_(h,S,S+b)+w,m=L};for(let b=0;b<e.hunks.length;b++){const S=e.hunks[b];if(S==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const _=Ni({isPartial:e.isPartial,rangeSize:S.collapsedBefore,expandedHunks:f,hunkIndex:b,collapsedContextThreshold:r}),w=_.collapsedLines>0?As({type:d,metrics:this.metrics,hunkIndex:b,hunkSpecs:S.hunkSpecs})?.totalHeight??0:0;y({rowCount:_.fromStart,startLineIndex:(u==="split"?S.splitLineStart:S.unifiedLineStart)-_.rangeSize});let x=w;y({rowCount:_.fromEnd,startLineIndex:(u==="split"?S.splitLineStart:S.unifiedLineStart)-_.fromEnd,preSeparatorHeight:x}),_.fromEnd>0&&(x=0);const E=b===a?Ii({fileDiff:e,hunkIndex:b,expandedHunks:f,collapsedContextThreshold:r,errorPrefix:"VirtualizedFileDiff"}):void 0,L=E!=null&&E.collapsedLines>0?Kr({type:d,metrics:this.metrics})?.totalHeight??0:b===a&&l?Kr({type:d,metrics:this.metrics})?.totalHeight??0:0,A=E!=null?E.fromStart+E.fromEnd:0,R=u==="split"?S.splitLineCount:S.unifiedLineCount,N=u==="split"?S.splitLineStart:S.unifiedLineStart;y({rowCount:R,startLineIndex:N,preSeparatorHeight:x,postSeparatorHeight:A===0?L:0,metadataOffsets:c5({diffStyle:u,hunk:S,rowCount:R})}),E!=null&&A>0&&y({rowCount:A,startLineIndex:N+R,postSeparatorHeight:L})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const a=t+n>>1,l=this.cache.checkpoints[a];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");l.lineIndex<=e?(r=l,t=a+1):n=a-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,a=-1;for(;n<=r;){const l=n+r>>1,u=this.cache.checkpoints[l];if(u==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");u.top<=e?(a=l,n=l+1):r=l-1}if(t==null)return a>=0?this.cache.checkpoints[a]:void 0;for(let l=a;l>=0;l--){const u=this.cache.checkpoints[l];if(u==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(u.renderedLineIndex%t===0)return u}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const d of e.hunks)n+=t==="split"?d.splitLineCount:d.unifiedLineCount;return n}const{expandUnchanged:r=!1,collapsedContextThreshold:a=1}=this.options,l=r?!0:this.hunksRenderer.getExpandedHunksMap();for(const[d,f]of e.hunks.entries()){const h=t==="split"?f.splitLineCount:f.unifiedLineCount;n+=h;const p=Math.max(f.collapsedBefore,0),{fromStart:m,fromEnd:y,renderAll:b}=Ni({isPartial:e.isPartial,rangeSize:p,expandedHunks:l,hunkIndex:d,collapsedContextThreshold:a});p>0&&(n+=b?p:m+y)}const u=Ii({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:l,collapsedContextThreshold:a,errorPrefix:"VirtualizedFileDiff"});return u!=null&&(n+=u.fromStart+u.fromEnd),n}getLayoutLineCount(e,t){const n=this.getExpandedLineCount(e,t),r=t==="split"?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:a=!1,expandUnchanged:l=!1,collapsedContextThreshold:u=1}=this.options,{hunkLineCount:d,lineHeight:f}=this.metrics,h=this.getDiffStyle(),p=this.getHunkSeparatorType(),m=ip(e,this.options.loadDiffFiles!=null),y=this.height;let b=this.getLayoutLineCount(e,h);const S=Yn(this.metrics,a),_=e.hunks.length>0?Nc(this.metrics):0,{fileAnnotationHeight:w}=this.cache,x=S+w,E=Math.max(0,y-S-w-_),L=this.hasFileAnnotations(e),A=t+S,R=w>0&&L&&A<r&&A+w>n;if(t<n-y||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:y-S-_};if(b<=d||e.hunks.length===0)return{startingLine:0,totalLines:d,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),b=this.getLayoutLineCount(e,h);const N=Math.ceil(Math.max(r-n,0)/f),H=Math.ceil(N/d)*d+d,U=H/d,Y=U,te=[],J=(n+r)/2,K=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-H*f*2),d);let ie=t+(K?.top??x),Z=K?.renderedLineIndex??0,se,I,$;if(no({diff:e,diffStyle:h,startingLine:K?.renderedLineIndex??0,expandedHunks:l?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:u,callback:({hunkIndex:ge,hunk:Oe,collapsedBefore:me,collapsedAfter:mt,deletionLine:Je,additionLine:Xe})=>{const Ne=Xe!=null?Xe.splitLineIndex:Je.splitLineIndex,ze=Xe!=null?Xe.unifiedLineIndex:Je.unifiedLineIndex,Ke=(Xe?.noEOFCR??!1)||(Je?.noEOFCR??!1),wn=ge===e.hunks.length-1&&Oe!=null&&(h==="split"?Ne===Oe.splitLineStart+Oe.splitLineCount-1:ze===Oe.unifiedLineStart+Oe.unifiedLineCount-1),Xt=(me>0?As({type:p,metrics:this.metrics,hunkIndex:ge,hunkSpecs:Oe?.hunkSpecs}):void 0)?.totalHeight??0;ie+=Xt;const zt=Z%d===0,cn=Math.floor(Z/d);if(zt&&(te[cn]=ie-(t+x+Xt),$!=null)){if($<=0)return!0;$--}const gt=this.getLineHeight(h==="split"?Ne:ze,Ke);if(ie>n-gt&&ie<r&&(se??=cn),I==null&&ie+gt>J&&(I=cn),$==null&&ie>=r&&zt&&($=Y),Z++,ie+=gt,mt>0||wn&&m){const Hi=Kr({type:p,metrics:this.metrics});Hi!=null&&(ie<r&&ie+Hi.totalHeight>n&&(se??=cn),I==null&&ie+Hi.totalHeight>J&&(I=cn),ie+=Hi.totalHeight)}return!1}}),se==null)if(R)se=0,I=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:y-S-_};I??=se;const F=Math.round(I-U/2),re=Math.max(0,Math.ceil(b/d)-U),B=Math.max(0,Math.min(F,re)),O=B*d,q=F<0?H+F*d:H,oe=te[B]??0,le=O===0?0:w+oe,ce=B+q/d,ue=ce<te.length?E-te[ce]:E-(ie-t-x);return{startingLine:O,totalLines:q,bufferBefore:le,bufferAfter:Math.max(0,ue)}}};function a5(e){let t;for(const n of e){if(n==null)continue;const r=n.children[1];if(r instanceof HTMLElement)for(const a of r.children)a instanceof HTMLElement&&a.dataset.lineAnnotation===Mw&&(t=Math.max(t??0,a.getBoundingClientRect().height))}return t}function s5(e){const t=Array.from(e).sort((l,u)=>l[0]-u[0]),n=[],r=[0];let a=0;for(const[l,u]of t)n.push(l),a+=u,r.push(a);return{lineIndexes:n,prefixTotals:r}}function O_({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;const a=D_(e,n);return(t[D_(e,r)]??0)-(t[a]??0)}function D_(e,t){let n=0,r=e.length;for(;n<r;){const a=n+r>>1,l=e[a];if(l==null)throw new Error("VirtualizedFileDiff: invalid prefix index");l<t?n=a+1:r=a}return n}function l5(e){return Math.ceil(e/mm)*mm}function u5(e,t){let n=0;for(const r of e)r<t&&n++;return n}function c5({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const r=t.hunkContent.at(-1);if(r==null)return[];if(r.type==="context")return[n-1];const a=Math.max(r.deletions,r.additions),l=r.deletions+r.additions;if(e==="split")return a>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const u=[],d=n-l;return r.deletions>0&&t.noEOFCRDeletions&&u.push(d+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&u.push(n-1),u}function d5(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function f5(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function ip(e,t){return e.isPartial&&t&&(e.type==="change"||e.type==="rename-changed")}function h5(e){return typeof e=="function"?"custom":e??"line-info"}function M_(e,t){return e==null||t==null?e==null&&t==null:An(e,t)}function p5(e,t){const[n,r]=e.split(",").map(Number);return t==="split"?r:n}function m5({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function g5(e,t){const n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:v5(n,e.startContentIndex)}}function v5(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){const a=e.hunkContent[r];n+=a.type==="context"?a.lines:a.deletions+a.additions}return n}function N_(e){const t=[];for(const n of e){const r=uo.get(n);if(r==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(r)}return t}function I_(e){for(const t of Array.isArray(e)?e:[e])if(!uo.has(t))return!1;return!0}async function z_(e){const t=[],n=[];for(const r of e){if(r==="text"||r==="ansi")continue;const a=mw(r)??pw(r);"then"in a?n.push(a):t.push(a)}return n.length>0&&await Promise.all(n).then(r=>{for(const a of r){if(a==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(a)}}),t}function H_(e){return Mn.getResolvedThemes(e)}async function P_(e){for(const n of e)xw(n);const t=await Mn.resolveThemes(e);for(let n=0;n<e.length;n++)Ew(e[n],t[n]);return t}function u1(e){const t=D.useRef(e);return D.useInsertionEffect(()=>{t.current=e}),D.useCallback((...n)=>t.current(...n),[])}const y5=D.createContext(void 0);function c1(){return D.useContext(y5)}const d1={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},b5={display:"contents"};function Hc(){return null}function S5({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:a,renderHeaderMetadata:l,renderAnnotation:u,renderGutterUtility:d,renderMergeConflictUtility:f,lineAnnotations:h,getHoveredLine:p,getInstance:m}){const y=n?.(e),b=r?.(e),S=a?.(e),_=l?.(e);return M.jsxs(M.Fragment,{children:[y!=null?M.jsx("div",{slot:el,children:y}):M.jsxs(M.Fragment,{children:[b!=null&&M.jsx("div",{slot:"header-prefix",children:b}),S!=null&&M.jsx("div",{slot:"header-filename-suffix",children:S}),_!=null&&M.jsx("div",{slot:"header-metadata",children:_})]}),u!=null&&h?.map((w,x)=>M.jsx("div",{slot:Nn(w),children:u(w)},x)),t!=null&&f!=null&&m!=null&&t.map(w=>{if(w==null)return;const x=_5(w,e);return M.jsx("div",{slot:x,style:b5,children:f(w,m)},x)}),d!=null&&M.jsx("div",{slot:"gutter-utility-slot",style:d1,children:d(p)})]})}function _5(e,t){const n=g5(e,t);return n!=null?m5({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex}):void 0}function C5({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:a,renderAnnotation:l,lineAnnotations:u,renderGutterUtility:d,getHoveredLine:f}){const h=t?.(e),p=n?.(e),m=r?.(e),y=a?.(e);return M.jsxs(M.Fragment,{children:[h!=null?M.jsx("div",{slot:el,children:h}):M.jsxs(M.Fragment,{children:[p!=null&&M.jsx("div",{slot:"header-prefix",children:p}),m!=null&&M.jsx("div",{slot:"header-filename-suffix",children:m}),y!=null&&M.jsx("div",{slot:"header-metadata",children:y})]}),l!=null&&u?.map((b,S)=>M.jsx("div",{slot:Nn(b),children:l(b)},S)),d!=null&&M.jsx("div",{slot:"gutter-utility-slot",style:d1,children:d(f)})]})}var Rs={exports:{}},x5=Rs.exports,U_;function E5(){return U_||(U_=1,(function(e,t){(function(n,r){r(t)})(x5,function(n){const r=Symbol("newer"),a=Symbol("older");class l{constructor(m,y){typeof m!="number"&&(y=m,m=0),this.size=0,this.limit=m,this.oldest=this.newest=void 0,this._keymap=new Map,y&&(this.assign(y),m<1&&(this.limit=this.size))}_markEntryAsUsed(m){m!==this.newest&&(m[r]&&(m===this.oldest&&(this.oldest=m[r]),m[r][a]=m[a]),m[a]&&(m[a][r]=m[r]),m[r]=void 0,m[a]=this.newest,this.newest&&(this.newest[r]=m),this.newest=m)}assign(m){let y,b=this.limit||Number.MAX_VALUE;this._keymap.clear();let S=m[Symbol.iterator]();for(let _=S.next();!_.done;_=S.next()){let w=new u(_.value[0],_.value[1]);if(this._keymap.set(w.key,w),y?(y[r]=w,w[a]=y):this.oldest=w,y=w,b--==0)throw new Error("overflow")}this.newest=y,this.size=this._keymap.size}get(m){var y=this._keymap.get(m);return y?(this._markEntryAsUsed(y),y.value):void 0}set(m,y){var b=this._keymap.get(m);return b?(b.value=y,this._markEntryAsUsed(b),this):(this._keymap.set(m,b=new u(m,y)),this.newest?(this.newest[r]=b,b[a]=this.newest):this.oldest=b,this.newest=b,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var m=this.oldest;if(m)return this.oldest[r]?(this.oldest=this.oldest[r],this.oldest[a]=void 0):(this.oldest=void 0,this.newest=void 0),m[r]=m[a]=void 0,this._keymap.delete(m.key),--this.size,[m.key,m.value]}find(m){let y=this._keymap.get(m);return y?y.value:void 0}has(m){return this._keymap.has(m)}delete(m){var y=this._keymap.get(m);return y?(this._keymap.delete(y.key),y[r]&&y[a]?(y[a][r]=y[r],y[r][a]=y[a]):y[r]?(y[r][a]=void 0,this.oldest=y[r]):y[a]?(y[a][r]=void 0,this.newest=y[a]):this.oldest=this.newest=void 0,this.size--,y.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new f(this.oldest)}values(){return new h(this.oldest)}entries(){return this}[Symbol.iterator](){return new d(this.oldest)}forEach(m,y){typeof y!="object"&&(y=this);let b=this.oldest;for(;b;)m.call(y,b.value,b.key,this),b=b[r]}toJSON(){for(var m=new Array(this.size),y=0,b=this.oldest;b;)m[y++]={key:b.key,value:b.value},b=b[r];return m}toString(){for(var m="",y=this.oldest;y;)m+=String(y.key)+":"+y.value,y=y[r],y&&(m+=" < ");return m}}n.LRUMap=l;function u(p,m){this.key=p,this.value=m,this[r]=void 0,this[a]=void 0}function d(p){this.entry=p}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:[p.key,p.value]}):{done:!0,value:void 0}};function f(p){this.entry=p}f.prototype[Symbol.iterator]=function(){return this},f.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:p.key}):{done:!0,value:void 0}};function h(p){this.entry=p}h.prototype[Symbol.iterator]=function(){return this},h.prototype.next=function(){let p=this.entry;return p?(this.entry=p[r],{done:!1,value:p.value}):{done:!0,value:void 0}}})})(Rs,Rs.exports)),Rs.exports}var w5=E5();const V_=Q_(w5),Yu=Symbol("IGNORE_RESPONSE");var Xu=class extends Error{constructor(){super("WorkerPoolManager: operation canceled because the pool terminated")}},rp=class extends Error{constructor(){super("WorkerPoolManager: operation canceled before the task completed")}},k5=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=it,useTokenTransformer:r=!1,lineDiffType:a="word-alt",maxLineDiffLength:l=1e3,tokenizeMaxLineLength:u=1e3,preferredHighlighter:d="shiki-js"}){this.options=e,this.preferredHighlighter=d,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:a,maxLineDiffLength:l,tokenizeMaxLineLength:u},this.fileCache=new V_.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new V_.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey!=null?this.fileCache.get(e.cacheKey):void 0}getDiffResultCache(e){return e.cacheKey!=null?this.diffCache.get(e.cacheKey):void 0}inspectCaches(){const{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??it,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??"word-alt",maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:a=this.renderOptions.tokenizeMaxLineLength??1e3}){const{lifecycleGeneration:l}=this,u=++this.renderOptionsRequestVersion,d=()=>this.isCurrentLifecycle(l)&&this.renderOptionsRequestVersion===u;try{const f={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:a};if(this.isInitialized()||await this.initialize(),!d()||Wn(f,this.renderOptions))return;const h=qs(e);let p=[];if(Ea(f.theme,this.renderOptions.theme)||(tm(h)?p=H_(h):p=await P_(h)),!d())return;if(this.highlighter!=null)em(p,this.highlighter);else{const y=await Dc({themes:h,langs:["text"],preferredHighlighter:this.preferredHighlighter});if(!d())return;this.highlighter=y}const m=this.setRenderOptionsOnWorkers(f,p);this.renderOptions=f,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(const y of this.themeSubscribers)y.onThemeChange();await m}catch(f){if(f instanceof Xu||!d())return;throw f}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){const{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();const n=[];for(const r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),new Error("setRenderOptionsOnWorkers: Somehow we have an uninitialized worker");n.push(new Promise((a,l)=>{const u=this.generateRequestId(),d={type:"set-render-options",id:u,request:{type:"set-render-options",id:u,renderOptions:e,resolvedThemes:t},resolve:a,reject:l,requestStart:Date.now()};this.activeTaskById.set(u,d),r.pendingSetupRequestId=u,r.worker.postMessage(d.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast==null&&(this._queuedBroadcast=requestAnimationFrame(this._broadcastStateChanges))}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);const e=this.getStats();for(const t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);const t=this.activeRequestByInstance.get(e);if(t!=null){const n=this.activeTaskById.get(t);fr(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0)if(this.initialized===!1){const{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{const a=qs(this.renderOptions.theme);let l=[];if(tm(a)?l=H_(a):l=await P_(a),!this.isCurrentLifecycle(t)){n();return}let u=[];if(I_(e)?u=N_(e):u=await z_(e),!this.isCurrentLifecycle(t)){n();return}const[d]=await Promise.all([Dc({themes:a,langs:["text",...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(l,u)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=d,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(a){if(a instanceof Xu||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(const l of this.queuedTasks)this.rejectRenderTaskCallbacks(l,op(a));this.queueBroadcastStateChanges(),r(a)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}async initializeWorkers(e,t){this.workersFailed=!1;const n=[],r=void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){const l=this.options.workerFactory(),u={worker:l,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set(["text",...t.map(({name:d})=>d)]),customExtensionsVersion:0};l.addEventListener("message",d=>{this.handleWorkerMessage(u,d.data)}),l.addEventListener("error",d=>console.error("Worker error:",d,u)),this.workers.push(u),n.push(new Promise((d,f)=>{const h=this.generateRequestId(),p={type:"initialize",id:h,request:{type:"initialize",id:h,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:void 0,customExtensionMap:r},resolve(){u.initialized=!0,d()},reject:f,requestStart:Date.now()};this.activeTaskById.set(h,p),this.executeTask(u,p)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,!(this.initialized!==!0||this.queuedTasks.length===0)){for(let e=0;e<this.queuedTasks.length;){const t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}const n=B_(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){const n=this.getFileResultCache(t);Ws(t)||n!=null&&ki(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:"file",file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeFileHighlightCache: worker pool is not working"));const t=this.getOrCreateFileHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}const t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Ws(e)||t!=null&&ki(t.options,this.getFileRenderOptions()))return;const r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type==="file"?r:void 0;{const a=this.submitCacheTask({type:"file",file:e},n);return a.type==="file"?a:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return Dw(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){const n=this.getDiffResultCache(t);ba(t)||n!=null&&Wn(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:"diff",diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(new Error("WorkerPoolManager.primeDiffHighlightCache: worker pool is not working"));const t=this.getOrCreateDiffHighlightCacheTask(e);return t!=null?this.createRenderTaskCallbacks(t):Promise.resolve()}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}const t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||ba(e)||t!=null&&Wn(t.options,this.getDiffRenderOptions()))return;const r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type==="diff"?r:void 0;{const a=this.submitCacheTask({type:"diff",diff:e},n);return a.type==="diff"?a:void 0}}getPlainDiffAST(e,t,n,r,a){return this.highlighter!=null?i1(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:a}):void 0}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();const e=new Xu;for(const t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(t=>{console.error(t)})}cancelActiveWorkerTasks(){const e=new Xu;for(const t of this.activeTaskById.values())"reject"in t?t.reject(e):fr(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(const e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?"waiting":this.initialized!==!0?"initializing":"initialized",totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.getHighlightKeyForRequest(t),r=n!=null?this.getTaskByHighlightKey(n):void 0;if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);const a=this.generateRequestId(),l=Date.now(),{renderOptionsVersion:u}=this,d=(()=>{switch(t.type){case"file":return{type:"file",id:a,request:{...t,id:a},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:u,requestStart:l};case"diff":return{type:"diff",id:a,request:{...t,id:a},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:u,requestStart:l}}})();this.enqueueRenderTask(d,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();const n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:a}=this,l=(()=>{switch(e.type){case"file":return{type:"file",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:a,requestStart:r};case"diff":return{type:"diff",id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:a,requestStart:r}}})();return this.enqueueRenderTask(l),l}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{const r=n.filter(a=>!e.langs.has(a));if(r.length>0&&(I_(r)?t.request.resolvedLanguages=N_(r):t.request.resolvedLanguages=await z_(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(r){this.rejectRenderTaskCallbacks(t,op(r)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){const n=this.activeTaskById.get(t.id);try{if(n==null)throw Yu;if(t.type==="error"){const r=new Error(t.error);if(t.stack&&(r.stack=t.stack),"reject"in n)n.reject(r);else if(fr(n))this.notifyHighlightError(n,r),this.rejectRenderTaskCallbacks(n,r);else throw new Error("handleWorkerMessage: unknown task type");throw r}else switch(t.requestType){case"initialize":if(n.type!=="initialize")throw new Error("handleWorkerMessage: task/response dont match");this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case"set-render-options":if(n.type!=="set-render-options")throw new Error("handleWorkerMessage: task/response dont match");n.resolve();break;case"file":{if(n.type!=="file")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:a}=t;if(!this.isCurrentRenderTask(n)||!ki(a,this.getFileRenderOptions()))throw Yu;const{request:l}=n;this.syncCustomExtensionVersion(e,l),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:a}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,a);break}case"diff":{if(n.type!=="diff")throw new Error("handleWorkerMessage: task/response dont match");const{result:r,options:a}=t;if(!this.isCurrentRenderTask(n)||!Wn(a,this.getDiffRenderOptions()))throw Yu;const{request:l}=n;this.syncCustomExtensionVersion(e,l),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:a}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,a);break}}}catch(r){r!==Yu&&console.error(r,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain==null&&(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,fr(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(fr(t)&&(this.rejectRenderTaskCallbacks(t,new rp),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){L5(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(const n of B_(t))e.langs.add(n);try{t.type==="file"?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type==="diff"&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error("Failed to post message to worker:",n),fr(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,op(n))):"reject"in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;const n=iP();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=rP())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(const n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(const a of e)if(!n.langs.has(a)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case"file":return this.getFileHighlightKey(e.file);case"diff":return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(const t of ws(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){const n=this.queuedTaskByInstance.get(e);n==null||n===t||(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){const t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new rp),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new rp),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(const t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(const n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){const t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(const e of Array.from(this.activeTaskById.values()))fr(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(const t of ws(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(const t of ws(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(const t of ws(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(const r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(const n of ws(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="file"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&An(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(const n of this.iterateRenderTasks())if(n.type==="diff"&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Jr(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){const t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(const e of this.queuedTasks)yield e;for(const e of this.activeTaskById.values())fr(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function L5(e){return e.type==="initialize"||e.type==="file"||e.type==="diff"}function B_(e){const t=new Set;if(e.type==="initialize"||e.type==="set-render-options")return[];switch(e.type){case"file":t.add(e.request.file.lang??It(e.request.file.name));break;case"diff":t.add(e.request.diff.lang??It(e.request.diff.name)),t.add(e.request.diff.lang??It(e.request.diff.prevName??"-"));break}return t.delete("text"),Array.from(t)}function fr(e){return e?.type==="file"||e?.type==="diff"}function ws(e){return e.instances}function op(e){return e instanceof Error?e:new Error(String(e))}let Is;function T5({poolOptions:e,highlighterOptions:t}){return Is??=new k5(e,t),Is}function A5(){Is!=null&&(Is.terminate(),Is=void 0)}const ag=D.createContext(void 0);let ap=0;function R5({children:e,poolOptions:t,highlighterOptions:n}){const[r]=D.useState(()=>{if(!(typeof window>"u"))return T5({poolOptions:t,highlighterOptions:n})});return D.useInsertionEffect(()=>{if(r!=null)return ap++,()=>{ap--}},[r]),D.useEffect(()=>()=>{ap===0&&A5()},[]),M.jsx(ag.Provider,{value:r,children:e})}function f1(e,t){return typeof window>"u"&&t!=null?M.jsxs(M.Fragment,{children:[M.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):M.jsx(M.Fragment,{children:e})}const O5=D.createContext(void 0);function h1(){return D.useContext(O5)}const j_=typeof window>"u"?D.useEffect:D.useLayoutEffect;function D5({file:e,options:t,editorOptions:n,lineAnnotations:r,selectedLines:a,prerenderedHTML:l,metrics:u,hasGutterRenderUtility:d,hasCustomHeader:f,disableWorkerPool:h,edit:p}){const m=h1(),y=a!==void 0,b=D.useContext(ag),S=c1(),_=D.useRef(null),w=u1(x=>{if(x!=null){if(_.current!=null)throw new Error("File: An instance should not already exist when a node is created");m!=null?_.current=new VP(sp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),m,u,h?void 0:b,!0):_.current=new Qw(sp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),h?void 0:b,!0),_.current.hydrate({file:e,fileContainer:x,lineAnnotations:r,prerenderedHTML:l})}else{if(_.current==null)throw new Error("File: A File instance should exist when unmounting");_.current.cleanUp(),_.current=null}});return j_(()=>{if(_.current==null)return;const x=sp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),E=x!==void 0&&!$c(_.current.options,x);_.current.setOptions(x),_.current.render({file:e,lineAnnotations:r,forceRender:E}),a!==void 0&&_.current.setSelectedLines(a)}),j_(()=>{if(p&&_.current!=null){if(S===void 0)throw new Error("File: EditContext is not attached");const x=S(n??{});if(x==null)throw new Error("File: EditProvider.createEditor must return an editor instance");try{return x.edit(_.current)}catch(E){throw x.cleanUp(),E}}},[p]),{ref:w,getHoveredLine:D.useCallback(()=>_.current?.getHoveredLine(),[])}}function sp({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r}){return t||r||n?{...e,controlledSelection:t,renderCustomHeader:n?Hc:e?.renderCustomHeader,renderGutterUtility:r?Hc:e?.renderGutterUtility}:e}function M5({file:e,lineAnnotations:t,selectedLines:n,options:r,editorOptions:a,metrics:l,className:u,style:d,renderAnnotation:f,renderCustomHeader:h,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:y,prerenderedHTML:b,renderGutterUtility:S,disableWorkerPool:_=!1,edit:w=!1}){const{ref:x,getHoveredLine:E}=D5({file:e,options:r,editorOptions:a,metrics:l,lineAnnotations:t,selectedLines:n,prerenderedHTML:b,hasGutterRenderUtility:S!=null,hasCustomHeader:h!=null,disableWorkerPool:_,edit:w});return M.jsx(Bm,{ref:x,className:u,style:d,children:f1(C5({file:e,renderAnnotation:f,renderCustomHeader:h,renderHeaderPrefix:p,renderHeaderFilenameSuffix:m,renderHeaderMetadata:y,renderGutterUtility:S,lineAnnotations:t,getHoveredLine:E}),b)})}const F_=typeof window>"u"?D.useEffect:D.useLayoutEffect;function N5({fileDiff:e,options:t,editorOptions:n,lineAnnotations:r,selectedLines:a,prerenderedHTML:l,metrics:u,hasGutterRenderUtility:d,hasCustomHeader:f,disableWorkerPool:h,edit:p}){const m=h1(),y=a!==void 0,b=D.useContext(ag),S=c1(),_=D.useRef(null),w=u1(x=>{if(x!=null){if(_.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?_.current=new o5(lp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),m,u,h?void 0:b,!0):_.current=new l1(lp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),h?void 0:b,!0),_.current.hydrate({fileDiff:e,fileContainer:x,lineAnnotations:r,prerenderedHTML:l})}else{if(_.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");_.current.cleanUp(),_.current=null}});return F_(()=>{const{current:x}=_;if(x==null)return;const E=lp({controlledSelection:y,hasCustomHeader:f,hasGutterRenderUtility:d,options:t}),L=E!==void 0&&!$c(x.options,E);x.setOptions(E),x.render({forceRender:L,fileDiff:e,lineAnnotations:r}),a!==void 0&&x.setSelectedLines(a)}),F_(()=>{if(p&&_.current!=null){if(S===void 0)throw new Error("FileDiff: EditContext is not attached");const x=S(n??{});if(x==null)throw new Error("FileDiff: EditProvider.createEditor must return an editor instance");try{return x.edit(_.current)}catch(E){throw x.cleanUp(),E}}},[p]),{ref:w,getHoveredLine:D.useCallback(()=>_.current?.getHoveredLine(),[])}}function lp({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r}){return t||r||n?{...e,controlledSelection:t,renderCustomHeader:n?Hc:e?.renderCustomHeader,renderGutterUtility:r?Hc:e?.renderGutterUtility}:e}function I5({fileDiff:e,options:t,editorOptions:n,metrics:r,lineAnnotations:a,selectedLines:l,className:u,style:d,prerenderedHTML:f,renderAnnotation:h,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:y,renderHeaderMetadata:b,renderGutterUtility:S,disableWorkerPool:_=!1,edit:w=!1}){const{ref:x,getHoveredLine:E}=N5({fileDiff:e,options:t,editorOptions:n,metrics:r,lineAnnotations:a,selectedLines:l,prerenderedHTML:f,hasGutterRenderUtility:S!=null,hasCustomHeader:p!=null,disableWorkerPool:_,edit:w});return M.jsx(Bm,{ref:x,className:u,style:d,children:f1(S5({fileDiff:e,renderCustomHeader:p,renderHeaderPrefix:m,renderHeaderFilenameSuffix:y,renderHeaderMetadata:b,renderAnnotation:h,renderGutterUtility:S,lineAnnotations:a,getHoveredLine:E}),f)})}function z5(e){return new Worker("/assets/worker-DsKBD11i.js",{type:"module",name:e?.name})}const p1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const H5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const P5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const G_=e=>{const t=P5(e);return t.charAt(0).toUpperCase()+t.slice(1)};var up={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const U5=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},V5=D.createContext({}),B5=()=>D.useContext(V5),j5=D.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:l,iconNode:u,...d},f)=>{const{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:y="currentColor",className:b=""}=B5()??{},S=r??m?Number(n??p)*24/Number(t??h):n??p;return D.createElement("svg",{ref:f,...up,width:t??h??up.width,height:t??h??up.height,stroke:e??y,strokeWidth:S,className:p1("lucide",b,a),...!l&&!U5(d)&&{"aria-hidden":"true"},...d},[...u.map(([_,w])=>D.createElement(_,w)),...Array.isArray(l)?l:[l]])});const sg=(e,t)=>{const n=D.forwardRef(({className:r,...a},l)=>D.createElement(j5,{ref:l,iconNode:t,className:p1(`lucide-${H5(G_(e))}`,`lucide-${e}`,r),...a}));return n.displayName=G_(e),n};const F5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],G5=sg("chevron-down",F5);const $5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],q5=sg("chevron-right",$5);const W5=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],m1=sg("grip-vertical",W5),g1=`
|
|
1544
|
+
[data-diffs-header],
|
|
1545
|
+
[data-diff],
|
|
1546
|
+
[data-file],
|
|
1547
|
+
[data-error-wrapper],
|
|
1548
|
+
[data-virtualizer-buffer] {
|
|
1549
|
+
--diffs-header-font-family: var(--font-sans) !important;
|
|
1550
|
+
--diffs-font-family: var(--font-mono) !important;
|
|
1551
|
+
--diffs-bg: var(--card) !important;
|
|
1552
|
+
--diffs-light-bg: var(--card) !important;
|
|
1553
|
+
--diffs-dark-bg: var(--card) !important;
|
|
1554
|
+
--diffs-token-light-bg: transparent;
|
|
1555
|
+
--diffs-token-dark-bg: transparent;
|
|
1556
|
+
--diffs-bg-context-override: color-mix(in srgb, var(--card) 97%, var(--foreground));
|
|
1557
|
+
--diffs-bg-hover-override: color-mix(in srgb, var(--card) 94%, var(--foreground));
|
|
1558
|
+
--diffs-bg-separator-override: color-mix(in srgb, var(--card) 95%, var(--foreground));
|
|
1559
|
+
--diffs-bg-buffer-override: color-mix(in srgb, var(--card) 90%, var(--foreground));
|
|
1560
|
+
--diffs-bg-addition-override: color-mix(in srgb, var(--card) 70%, var(--add));
|
|
1561
|
+
--diffs-bg-addition-number-override: color-mix(in srgb, var(--card) 55%, var(--add));
|
|
1562
|
+
--diffs-bg-addition-hover-override: color-mix(in srgb, var(--card) 85%, var(--add));
|
|
1563
|
+
--diffs-bg-addition-emphasis-override: color-mix(in srgb, var(--card) 80%, var(--add));
|
|
1564
|
+
--diffs-bg-deletion-override: color-mix(in srgb, var(--card) 70%, var(--del));
|
|
1565
|
+
--diffs-bg-deletion-number-override: color-mix(in srgb, var(--card) 55%, var(--del));
|
|
1566
|
+
--diffs-bg-deletion-hover-override: color-mix(in srgb, var(--card) 85%, var(--del));
|
|
1567
|
+
--diffs-bg-deletion-emphasis-override: color-mix(in srgb, var(--card) 80%, var(--del));
|
|
1568
|
+
background-color: var(--card) !important;
|
|
1569
|
+
color: var(--foreground) !important;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
1573
|
+
grid-template-columns: minmax(0, var(--comprehende-split-left, 1fr)) minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
[data-diff-type="split"][data-overflow="wrap"],
|
|
1577
|
+
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
1578
|
+
grid-template-columns:
|
|
1579
|
+
var(--diffs-grid-number-column-width)
|
|
1580
|
+
minmax(0, var(--comprehende-split-left, 1fr))
|
|
1581
|
+
var(--diffs-grid-number-column-width)
|
|
1582
|
+
minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1583
|
+
}
|
|
1584
|
+
`,v1=.2,y1=.8;function cp(e){return Math.min(y1,Math.max(v1,e))}function Y5(e){const t=D.useMemo(()=>{const r=typeof navigator>"u"?4:Math.max(1,navigator.hardwareConcurrency||4);return{workerFactory:()=>new z5,poolSize:Math.max(2,Math.min(6,Math.floor(r/2)))}},[]),n=D.useMemo(()=>({theme:"pierre-dark",tokenizeMaxLineLength:1e3,useTokenTransformer:!0,lineDiffType:"none"}),[]);return M.jsx(R5,{poolOptions:t,highlighterOptions:n,children:e.children})}function X5(e){if(e.trim()!=="")try{return DD(e,`comprehende:${e.length}`)[0]?.files[0]}catch{return}}const K5=D.memo(function(t){const n=D.useMemo(()=>({theme:"pierre-dark",themeType:"dark",diffStyle:t.split?"split":"unified",overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,lineDiffType:"none",unsafeCSS:g1}),[t.split,t.wrap]);return M.jsx(I5,{className:"block w-full",fileDiff:t.fileDiff,options:n})}),Q5=D.memo(function(t){const n=D.useMemo(()=>({name:t.path,contents:t.contents,cacheKey:`${t.path}:${t.contents.length}:${t.contents.slice(0,32)}:${t.annotations?.length??0}`}),[t.annotations?.length,t.contents,t.path]),r=D.useMemo(()=>({theme:"pierre-dark",themeType:"dark",overflow:t.wrap?"wrap":"scroll",disableFileHeader:!0,stickyHeader:!1,unsafeCSS:g1}),[t.wrap]);return M.jsx(M5,{className:"block w-full",file:n,options:r,lineAnnotations:t.annotations,renderAnnotation:t.annotations===void 0?void 0:Z5})});function Z5(e){const t=e.metadata,n=new Date(t.timestamp*1e3).toISOString().slice(0,10);return M.jsxs("div",{className:"flex min-w-0 items-baseline gap-2 px-2 py-1 font-sans text-[11px] text-muted-foreground",children:[M.jsx("code",{className:"text-primary",children:t.sha.slice(0,7)}),M.jsx("span",{className:"min-w-0 truncate",children:t.author}),M.jsx("span",{className:"shrink-0 tabular-nums",children:n}),t.lines>1?M.jsxs("span",{className:"shrink-0 tabular-nums",children:[t.lines," lines"]}):null]})}function $_(e){return M.jsx("div",{className:"min-h-0 min-w-0",children:M.jsx(Q5,{path:e.path,contents:e.contents,wrap:e.wrap,annotations:e.annotations})})}function J5(e){const{patch:t,split:n,wrap:r,splitRatio:a,onSplitRatio:l}=e,u=D.useMemo(()=>X5(t),[t]);return u===void 0?M.jsx("p",{className:"px-3 py-2 text-xs text-warn",children:"Could not render this git patch."}):M.jsxs("div",{className:"relative min-w-0",style:{"--comprehende-split-left":`${a}fr`,"--comprehende-split-right":`${1-a}fr`},children:[M.jsx(K5,{fileDiff:u,split:n,wrap:r}),n?M.jsx(e6,{ratio:a,onRatio:l}):null]})}function e6(e){const t=D.useRef(null),n=l=>{const u=l.currentTarget.parentElement;u!==null&&(l.preventDefault(),l.currentTarget.setPointerCapture(l.pointerId),t.current={startX:l.clientX,start:e.ratio,width:u.getBoundingClientRect().width})},r=l=>{const u=t.current;u===null||u.width===0||e.onRatio(cp(u.start+(l.clientX-u.startX)/u.width))},a=()=>{t.current=null};return M.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize split diff","aria-valuemin":Math.round(v1*100),"aria-valuemax":Math.round(y1*100),"aria-valuenow":Math.round(e.ratio*100),tabIndex:0,className:$t("absolute inset-y-0 z-10 flex w-3 -translate-x-1/2 cursor-col-resize touch-none items-center justify-center select-none","after:absolute after:inset-y-0 after:w-px after:bg-border hover:after:bg-primary/70"),style:{left:`${e.ratio*100}%`},onPointerDown:n,onPointerMove:r,onPointerUp:a,onPointerCancel:a,onDoubleClick:()=>e.onRatio(.5),onKeyDown:l=>{l.key==="ArrowLeft"?(l.preventDefault(),e.onRatio(cp(e.ratio-.05))):l.key==="ArrowRight"?(l.preventDefault(),e.onRatio(cp(e.ratio+.05))):(l.key==="Home"||l.key==="Enter")&&(l.preventDefault(),e.onRatio(.5))},children:M.jsx("div",{className:"z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border bg-card",children:M.jsx(m1,{className:"size-2.5 text-muted-foreground"})})})}const t6=AC("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/20 text-destructive",outline:"border-border text-foreground",ghost:"text-muted-foreground"}},defaultVariants:{variant:"default"}});function n6({className:e,variant:t="default",asChild:n=!1,...r}){const a=n?SC:"span";return M.jsx(a,{"data-slot":"badge",className:$t(t6({variant:t}),e),...r})}function i6(e){const{file:t,active:n,index:r,split:a,splitRatio:l,wrap:u,viewed:d,onSplitRatio:f,onOpen:h,onViewed:p}=e,[m,y]=D.useState(d),b=t.hunks[0],S=aD(t.hunks.flatMap(L=>L.lines.filter(A=>A.kind==="add").map(A=>A.text))),_=t.oldPath!==void 0?`${t.oldPath} → ${t.path}`:t.path,w=D.useId(),x=m?q5:G5;D.useEffect(()=>{y(d)},[d]);const E=L=>{L.target instanceof Element&&L.target.closest("button, input, label, a")!==null||y(A=>!A)};return M.jsxs("article",{className:$t("overflow-hidden rounded-lg border bg-card",n?"border-primary":"border-border"),"data-hunk":r,children:[M.jsxs("header",{className:$t("sticky top-0 z-10 flex cursor-pointer flex-wrap items-center gap-x-3 gap-y-1 bg-card px-3 py-2",m?null:"border-b border-border"),onClick:E,children:[M.jsx(Gt,{type:"button",variant:"ghost",size:"icon-sm",className:"size-6","aria-expanded":!m,"aria-controls":w,"aria-label":m?"Expand file":"Collapse file",onClick:()=>y(L=>!L),children:M.jsx(x,{className:"size-4"})}),M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsx(Gt,{type:"button",variant:"link",className:$t("h-auto p-0 font-mono text-sm",d&&"text-muted-foreground"),onClick:()=>h(t.path),children:_})}),M.jsx(vr,{children:"Open file"})]}),M.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:t.hunkCount===1&&b!==void 0?oD(b.header):`${t.hunkCount} hunks`}),M.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:[M.jsxs("span",{className:"text-del",children:["−",t.removed]})," ",M.jsxs("span",{className:"text-add",children:["+",t.added]})]}),S.length>0?S.map(L=>M.jsx(n6,{variant:"outline",className:"font-mono font-normal",children:L},L)):null,M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsxs("label",{className:"ml-auto flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground select-none",children:[M.jsx("input",{type:"checkbox",className:"size-3.5 accent-primary",checked:d,onChange:L=>p(t.path,L.target.checked)}),"Viewed"]})}),M.jsxs(vr,{children:[d?"Mark as not viewed":"Mark as viewed"," (v)"]})]})]}),M.jsx("div",{id:w,hidden:m,children:m?null:M.jsx(J5,{patch:t.patch,split:a,wrap:u,splitRatio:l,onSplitRatio:f})})]})}function r6(e){const t=[];for(const n of e){const r=t[t.length-1];if(r!==void 0&&r.sha===n.sha&&r.author===n.author){r.lines+=1;continue}t.push({lineNumber:n.line,sha:n.sha,author:n.author,timestamp:n.timestamp,lines:1})}return t}var o6=Object.defineProperty,b1=(e,t)=>o6(e,"name",{value:t,configurable:!0}),q_="horizontal",a6=["horizontal","vertical"],s6=D.forwardRef(b1(function(t,n){const{decorative:r,orientation:a=q_,...l}=t,u=S1(a)?a:q_,f=r?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return M.jsx(vo.div,{"data-orientation":u,...f,...l,ref:n})},"Separator"));function S1(e){return a6.includes(e)}b1(S1,"isValidOrientation");var l6=s6;function u6({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return M.jsx(l6,{"data-slot":"separator",decorative:n,orientation:t,className:$t("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function c6(e){const{inspector:t,wrap:n,setInspector:r,onClose:a}=e,[l,u]=D.useState(""),[d,f]=D.useState(null),[h,p]=D.useState(null),[m,y]=D.useState(!1),b=D.useMemo(()=>d===null?"":d.map(_=>_.text).join(`
|
|
1585
|
+
`),[d]),S=D.useMemo(()=>{if(d!==null)return r6(d).map(_=>({lineNumber:_.lineNumber,metadata:{sha:_.sha,author:_.author,timestamp:_.timestamp,lines:_.lines}}))},[d]);return D.useEffect(()=>{let _=!1;return p(null),y(!0),u(""),f(null),t.mode==="file"?VT(t.path,t.side).then(w=>{_||(u(w.content),y(!1))}).catch(w=>{_||(p(w instanceof Error?w.message:String(w)),y(!1))}):BT(t.path,t.side).then(w=>{_||(f(w.lines),y(!1))}).catch(w=>{_||(p(w instanceof Error?w.message:String(w)),y(!1))}),()=>{_=!0}},[t]),M.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[M.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-8 pt-6 pb-4",children:[M.jsxs(mr,{children:[M.jsx(gr,{asChild:!0,children:M.jsxs(Gt,{type:"button",size:"sm",variant:"outline",onClick:a,children:["Back",M.jsx(ec,{children:"esc"})]})}),M.jsx(vr,{children:"Back to the diff"})]}),M.jsx("strong",{className:"min-w-0 truncate font-mono text-sm font-medium",children:t.path}),M.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[M.jsx(Gt,{type:"button",size:"sm",variant:t.mode==="file"?"secondary":"ghost",onClick:()=>r({...t,mode:"file"}),children:"File"}),M.jsx(Gt,{type:"button",size:"sm",variant:t.mode==="blame"?"secondary":"ghost",onClick:()=>r({...t,mode:"blame"}),children:"Blame"}),M.jsx(u6,{orientation:"vertical",className:"mx-1 h-6"}),M.jsx(Gt,{type:"button",size:"sm",variant:t.side==="old"?"secondary":"ghost",onClick:()=>r({...t,side:"old"}),children:"Old"}),M.jsx(Gt,{type:"button",size:"sm",variant:t.side==="new"?"secondary":"ghost",onClick:()=>r({...t,side:"new"}),children:"New"})]})]}),h!==null?M.jsx("p",{className:"px-8 text-warn",children:h}):null,m&&h===null?M.jsx("p",{className:"px-8 text-sm text-muted-foreground",children:"Reading git…"}):null,t.mode==="file"&&h===null&&!m?M.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:M.jsx($_,{path:t.path,contents:l,wrap:n})}):null,t.mode==="blame"&&h===null&&!m&&d!==null?M.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-8",children:M.jsx($_,{path:t.path,contents:b,wrap:n,annotations:S})}):null]})}function _1(e){return M.jsxs("div",{className:"mb-8 max-w-[68ch]",children:[e.kicker!==void 0?M.jsx("p",{className:"mb-2 font-mono text-[11px] tracking-wide text-muted-foreground",children:e.kicker}):null,M.jsx("h1",{className:"mb-3 font-serif text-[1.75rem] leading-snug text-foreground",children:e.title}),e.children]})}function d6(e){const{group:t,index:n,groups:r,onOpenLayer:a}=e;return M.jsxs(_1,{kicker:cc(n),title:t.title,children:[M.jsx("p",{className:"mb-5 font-serif text-lg leading-relaxed text-foreground",children:t.summary}),t.dependsOn.length>0?M.jsxs("p",{className:"mb-5 text-muted-foreground",children:["Depends on"," ",t.dependsOn.map((l,u)=>{const d=r.find(h=>h.id===l),f=d!==void 0?`${cc(vC(r,l))} ${d.title}`:l;return M.jsxs("span",{children:[u>0?", ":"",M.jsx(Gt,{type:"button",variant:"link",className:"h-auto p-0",onClick:()=>a(l),children:f})]},l)})]}):null,t.lookFor.length>0?M.jsx("ul",{className:"mb-2 list-disc space-y-2 pl-5 leading-relaxed",children:t.lookFor.map(l=>M.jsx("li",{children:l},l))}):null,t.staleCount>0?M.jsxs("p",{className:"mt-4 text-warn",children:[t.staleCount," hunk ref",t.staleCount===1?"":"s"," no longer match live git. Git wins; the pointer is flagged, not replaced."]}):null]})}function f6(e){const{meta:t,onOpenLayer:n}=e;return M.jsxs("div",{className:"mb-8 max-w-[68ch]",children:[t.document.walkthrough!==void 0?M.jsx("h1",{className:"mb-4 font-serif text-[1.75rem] leading-snug text-foreground",children:t.document.walkthrough}):M.jsx("h1",{className:"mb-4 font-serif text-[1.75rem] leading-snug text-foreground",children:"Overview"}),M.jsxs("p",{className:"mb-10 text-muted-foreground",children:[yC(t.document.size)," · ",t.files.length," files"]}),M.jsx("ol",{className:"m-0 list-none p-0",children:t.groups.map((r,a)=>M.jsx("li",{className:"mb-2",children:M.jsxs(Gt,{type:"button",variant:"ghost",className:"h-auto w-full min-w-0 items-start justify-start gap-3 px-3 py-3 text-left font-normal whitespace-normal",onClick:()=>n(r.id),children:[M.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:cc(a+1)}),M.jsxs("span",{className:"min-w-0 flex-1",children:[M.jsx("strong",{className:"block font-medium text-foreground",children:r.title}),M.jsx("span",{className:"mt-1 block leading-relaxed text-muted-foreground",children:r.summary})]})]})},r.id))}),t.commits.length>0?M.jsx("ul",{className:"mt-12 space-y-2 text-sm text-muted-foreground",children:t.commits.map(r=>M.jsxs("li",{children:[M.jsx("code",{className:"text-primary",children:r.shortSha})," ",r.subject]},r.sha))}):null]})}function h6(e){const{meta:t,selection:n,onSelect:r}=e;return M.jsxs("nav",{className:"h-full overflow-auto py-6",children:[M.jsx("ul",{className:"mb-6 list-none p-0",children:M.jsx("li",{children:M.jsx(dp,{active:n?.kind==="overview",onClick:()=>r({kind:"overview"}),title:"Overview",count:yC(t.document.size)})})}),M.jsxs("ul",{className:"mb-6 list-none p-0",children:[t.groups.map((a,l)=>M.jsx("li",{children:M.jsx(dp,{active:n?.kind==="group"&&n.id===a.id,onClick:()=>r({kind:"group",id:a.id}),index:cc(l+1),title:a.title,count:a.staleCount>0?`${a.staleCount} stale`:void 0})},a.id)),t.unassigned.hunkCount>0?M.jsx("li",{children:M.jsx(dp,{active:n?.kind==="unassigned",onClick:()=>r({kind:"unassigned"}),title:"Unassigned",count:String(t.unassigned.hunkCount),warn:!0})}):null]}),t.document.tickets!==void 0&&t.document.tickets.length>0?M.jsx("ul",{className:"space-y-2 px-4 text-sm text-muted-foreground",children:t.document.tickets.map(a=>M.jsx("li",{children:a.url!==void 0?M.jsxs("a",{className:"text-primary hover:underline",href:a.url,target:"_blank",rel:"noreferrer",children:[a.id,a.title!==void 0?` ${a.title}`:""]}):M.jsxs("span",{children:[a.id,a.title!==void 0?` ${a.title}`:""]})},a.id))}):null]})}function dp(e){return M.jsxs(Gt,{type:"button",variant:"ghost",onClick:e.onClick,className:$t("mx-3 mb-1 h-auto w-[calc(100%-24px)] min-w-0 items-start justify-start gap-2.5 rounded-md px-3 py-2 text-left font-normal whitespace-normal",e.active&&"bg-secondary text-foreground",e.warn&&"text-warn hover:text-warn"),children:[e.index!==void 0?M.jsx("span",{className:"mt-px w-5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:e.index}):null,M.jsx("span",{className:"min-w-0 flex-1 text-left leading-snug",children:e.title}),e.count!==void 0?M.jsx("span",{className:$t("shrink-0 text-[11px] tabular-nums text-muted-foreground",e.warn&&"text-warn"),children:e.count}):null]})}function Ku(e,t){const n=new Map;return e.forEach((r,a)=>{const l=sD(r.lines),u=n.get(r.path);if(u===void 0){n.set(r.path,{path:r.path,oldPath:r.oldPath,patch:t.get(r.path)??"",added:l.added,removed:l.removed,hunkCount:1,firstIndex:a,hunks:[r]});return}u.added+=l.added,u.removed+=l.removed,u.hunkCount+=1,u.hunks.push(r)}),[...n.values()]}function fp(e,t){return e.findIndex(n=>t>=n.firstIndex&&t<n.firstIndex+n.hunkCount)}function p6(e){return e.groups.length>0?{kind:"overview"}:{kind:"unassigned"}}function W_(e,t,n,r){if(e===null)return;const a=[{kind:"overview"},...e.groups.map(d=>({kind:"group",id:d.id}))];e.unassigned.hunkCount>0&&a.push({kind:"unassigned"});const l=a.findIndex(d=>m6(d,t)),u=a[(l+r+a.length)%a.length];u!==void 0&&n(u)}function m6(e,t){return t===null?!1:e.kind==="overview"?t.kind==="overview":e.kind==="unassigned"?t.kind==="unassigned":t.kind==="group"&&t.id===e.id}function g6(e,t){return`comprehende.viewed.${e}.${t}`}function v6(e){if(e===null||e==="")return new Set;try{const t=JSON.parse(e);return!Array.isArray(t)||t.some(n=>typeof n!="string")?new Set:new Set(t)}catch{return new Set}}function y6(e){return JSON.stringify([...e].sort())}function b6(e,t,n){const r=new Set(e);return n?r.add(t):r.delete(t),r}function Y_(e){try{return v6(localStorage.getItem(e))}catch{return new Set}}function S6(e,t){try{localStorage.setItem(e,y6(t))}catch{}}function _6(e,t){const n=e!==void 0&&t!==void 0?g6(e,t):null,[r,a]=D.useState(()=>n===null?new Set:Y_(n));D.useEffect(()=>{a(n===null?new Set:Y_(n))},[n]);const l=D.useCallback((u,d)=>{n!==null&&a(f=>{const h=b6(f,u,d);return S6(n,h),h})},[n]);return{viewedPaths:r,setFileViewed:l}}function C6({className:e,...t}){return M.jsx(pC,{"data-slot":"resizable-panel-group",className:$t("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...t})}function X_({...e}){return M.jsx(mC,{"data-slot":"resizable-panel",...e})}function x6({withHandle:e=!1,className:t,...n}){return M.jsx(gC,{"data-slot":"resizable-handle",className:$t("relative flex w-2 items-center justify-center bg-transparent after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-border hover:after:bg-primary/60 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-2 aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-px aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2",t),...n,children:e?M.jsx("div",{className:"bg-border z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border",children:M.jsx(m1,{className:"size-2.5 text-muted-foreground"})}):null})}function E6(){const[e,t]=D.useState(null),[n,r]=D.useState(null),[a,l]=D.useState(null),[u,d]=D.useState([]),[f,h]=D.useState(()=>new Map),[p,m]=D.useState(null),[y,b]=D.useState(!1),[S,_]=D.useState(!1),[w,x]=D.useState(.5),[E,L]=D.useState(0),[A,R]=D.useState(null),[N,H]=D.useState(!0),U=D.useRef(null),{defaultLayout:Y,onLayoutChanged:te}=MT({id:"comprehende-shell-overlay",panelIds:["stack","main"],onlySaveAfterUserInteractions:!0}),J=D.useCallback(async()=>{H(!0),r(null);try{const F=await PT();t(F),l(re=>re??p6(F))}catch(F){r(F instanceof Error?F.message:String(F))}finally{H(!1)}},[]);D.useEffect(()=>{J()},[J]);const K=a?.kind==="group"?a.id:a?.kind==="unassigned"?"unassigned":null;D.useEffect(()=>{if(K===null){d([]),h(new Map);return}let F=!1;return m(null),UT(K).then(re=>{F||(d(re.hunks),h(new Map(re.files.map(B=>[B.path,B.patch]))),L(0))}).catch(re=>{F||(d([]),h(new Map),m(re instanceof Error?re.message:String(re)))}),()=>{F=!0}},[K]),D.useEffect(()=>{R(null)},[a]);const{viewedPaths:ie,setFileViewed:Z}=_6(e?.resolved.baseSha,e?.resolved.headSha),se=D.useCallback(F=>{L(F),requestAnimationFrame(()=>{document.querySelector(`[data-hunk="${F}"]`)?.scrollIntoView({block:"nearest"})})},[]);D.useEffect(()=>{const F=re=>{if(re.metaKey||re.ctrlKey||re.altKey)return;const B=re.target;if(!(B instanceof HTMLElement&&(B.isContentEditable||B.closest("input, textarea, select")!==null)))if(re.key==="w")b(O=>!O);else if(re.key==="s")_(O=>(O||x(.5),!O));else if(re.key==="r")J();else if(re.key==="o")l({kind:"overview"});else if(re.key==="u")l({kind:"unassigned"});else if(re.key==="Escape")R(null);else if(re.key==="[")W_(e,a,l,-1);else if(re.key==="]")W_(e,a,l,1);else{if(A!==null)return;if(re.key==="j"){const O=Ku(u,f),q=fp(O,E),oe=O[Math.min(O.length-1,Math.max(q,0)+1)];oe!==void 0&&se(oe.firstIndex)}else if(re.key==="k"){const O=Ku(u,f),q=fp(O,E),oe=O[Math.max(0,(q===-1?0:q)-1)];oe!==void 0&&se(oe.firstIndex)}else if(re.key==="v"){const O=Ku(u,f),q=O[Math.max(0,fp(O,E))];q!==void 0&&Z(q.path,!ie.has(q.path))}}};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[E,u,A,f,J,e,se,a,Z,ie]),D.useEffect(()=>{U.current?.scrollTo({top:0})},[a]);const I=D.useMemo(()=>e===null||a?.kind!=="group"?null:e.groups.find(F=>F.id===a.id)??null,[e,a]),$=D.useMemo(()=>Ku(u,f),[u,f]);return N&&e===null?M.jsx(K_,{children:"Reading git…"}):n!==null&&e===null?M.jsx(K_,{className:"text-warn",children:n}):e===null?null:M.jsx(nD,{children:M.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[M.jsx(iD,{meta:e,wrap:y,split:S,onWrap:()=>b(F=>!F),onUnified:()=>_(!1),onSplit:()=>{_(!0),S||x(.5)},onRefresh:()=>{J()}}),M.jsxs(C6,{className:"min-h-0 flex-1",defaultLayout:Y,onLayoutChanged:te,children:[M.jsx(X_,{id:"stack",defaultSize:"20",minSize:"14%",className:"min-h-0 min-w-0",children:M.jsx(h6,{meta:e,selection:a,onSelect:l})}),M.jsx(x6,{withHandle:!0}),M.jsx(X_,{id:"main",defaultSize:"80",minSize:"40%",className:"min-h-0 min-w-0",children:A!==null?M.jsx(c6,{inspector:A,wrap:y,setInspector:R,onClose:()=>R(null)}):M.jsxs("main",{ref:U,className:"h-full overflow-auto px-10 py-8",children:[a?.kind==="overview"?M.jsx(f6,{meta:e,onOpenLayer:F=>l({kind:"group",id:F})}):a?.kind==="unassigned"?M.jsx(_1,{kicker:"Unassigned",title:"Not in any layer",children:M.jsx("p",{className:"font-serif text-lg leading-relaxed text-foreground",children:"These hunks are in git and in no layer. Fix the review document — never the diff."})}):I!==null?M.jsx(d6,{group:I,index:vC(e.groups,I.id),groups:e.groups,onOpenLayer:F=>l({kind:"group",id:F})}):M.jsx("h1",{className:"font-serif text-2xl",children:"Select a layer"}),p!==null?M.jsx("p",{className:"mt-4 text-warn",children:p}):null,a?.kind!=="overview"?M.jsxs(M.Fragment,{children:[u.length===0&&p===null?M.jsx("p",{className:"mt-8 text-muted-foreground",children:"No hunks in this layer."}):null,$.length>0?M.jsxs("p",{className:"mt-8 font-mono text-xs tabular-nums text-muted-foreground",children:[$.filter(F=>ie.has(F.path)).length," of ",$.length," files viewed"]}):null,M.jsx("div",{className:$.length>0?"mt-4 space-y-8":"mt-8 space-y-8",children:$.map(F=>M.jsx(i6,{file:F,active:E>=F.firstIndex&&E<F.firstIndex+F.hunkCount,index:F.firstIndex,split:S,splitRatio:w,wrap:y,viewed:ie.has(F.path),onSplitRatio:x,onOpen:re=>R({path:re,mode:"file",side:"new"}),onViewed:Z},F.path))})]}):null]})})]})]})})}function K_(e){return M.jsx("div",{className:$t("p-16 text-muted-foreground",e.className),children:e.children})}const C1=document.getElementById("root");if(C1===null)throw new Error("missing #root");tT.createRoot(C1).render(M.jsx(D.StrictMode,{children:M.jsx(Y5,{children:M.jsx(E6,{})})}));
|