comprehende 0.7.0 → 0.8.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/README.md +6 -2
- package/dist/api/agent-md.js +1 -0
- package/dist/schema/cli-pin.js +4 -0
- package/dist/schema/review.js +1 -0
- package/dist/schema/source.js +3 -0
- package/dist/ui/assets/index-BPpt3lUW.css +1 -0
- package/dist/ui/assets/index-Cw3dQOi7.js +1744 -0
- package/dist/ui/assets/{shiki-lang-abap-CCh0PiHj.js → shiki-lang-abap-BuHPl3Px.js} +1 -1
- package/dist/ui/assets/{shiki-lang-actionscript-3-CDO_W9Hu.js → shiki-lang-actionscript-3-DT7i6v_4.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ada-D0v8MB-a.js → shiki-lang-ada-QB58RKQb.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ahk-DGQ1h58c.js → shiki-lang-ahk-Deo8ZsxI.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ahk2-DZVNTXIX.js → shiki-lang-ahk2-DWQ-qmQe.js} +1 -1
- package/dist/ui/assets/{shiki-lang-angular-html-CxeRyf73.js → shiki-lang-angular-html-BZS7pisj.js} +1 -1
- package/dist/ui/assets/{shiki-lang-angular-inline-style-DlHvU-5D.js → shiki-lang-angular-inline-style-B4bPMr5O.js} +1 -1
- package/dist/ui/assets/{shiki-lang-angular-inline-template-ZFfps1P0.js → shiki-lang-angular-inline-template-obnrrKUv.js} +1 -1
- package/dist/ui/assets/{shiki-lang-angular-ts-CfsDaJsV.js → shiki-lang-angular-ts-Bg0EOCRA.js} +1 -1
- package/dist/ui/assets/{shiki-lang-apache-DAGm6YRx.js → shiki-lang-apache-CaeBCo1H.js} +1 -1
- package/dist/ui/assets/{shiki-lang-apex-BntCzcMz.js → shiki-lang-apex-C0P1xrr7.js} +1 -1
- package/dist/ui/assets/{shiki-lang-apl-DXxMY1U9.js → shiki-lang-apl-DpghvkS9.js} +1 -1
- package/dist/ui/assets/{shiki-lang-applescript-CuQP6ZZz.js → shiki-lang-applescript-qHXCUv9W.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ara-BuQtgMwr.js → shiki-lang-ara-CnKLzTh0.js} +1 -1
- package/dist/ui/assets/{shiki-lang-asciidoc-CoUO43hK.js → shiki-lang-asciidoc-BFyWQdTW.js} +1 -1
- package/dist/ui/assets/{shiki-lang-asm-Nrnud8z_.js → shiki-lang-asm-BDAQRHlr.js} +1 -1
- package/dist/ui/assets/{shiki-lang-astro-Cepap9Dk.js → shiki-lang-astro-eLzdEfkh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-awk-GUYPwV2Y.js → shiki-lang-awk-nbK03rsj.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ballerina-BL4RI1ko.js → shiki-lang-ballerina-BvFIoPjv.js} +1 -1
- package/dist/ui/assets/{shiki-lang-bat-DaideUf2.js → shiki-lang-bat-DeZWaK2t.js} +1 -1
- package/dist/ui/assets/{shiki-lang-beancount-CK-GFgjb.js → shiki-lang-beancount-D3PEpbaR.js} +1 -1
- package/dist/ui/assets/{shiki-lang-berry-CaoJlEUd.js → shiki-lang-berry-q4KduTOe.js} +1 -1
- package/dist/ui/assets/{shiki-lang-bibtex-CfgnHv7j.js → shiki-lang-bibtex-BK_j-Uh8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-bicep-ClIJAykG.js → shiki-lang-bicep-BAz0ZWPk.js} +1 -1
- package/dist/ui/assets/{shiki-lang-bird2-B5MZrXeo.js → shiki-lang-bird2-CexT8W9C.js} +1 -1
- package/dist/ui/assets/{shiki-lang-blade-4XbkxIss.js → shiki-lang-blade-EiwCWvW-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-bsl-CcGvbV5A.js → shiki-lang-bsl-BJlZfp3d.js} +1 -1
- package/dist/ui/assets/{shiki-lang-c-POGgq8OX.js → shiki-lang-c-cUgVXYtZ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-c3-Bk0Vc2Tn.js → shiki-lang-c3-DkIGQwpj.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cadence-C45UQpy5.js → shiki-lang-cadence-D0f5xasM.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cairo-Bekf3Fcc.js → shiki-lang-cairo-BhNbTAo2.js} +1 -1
- package/dist/ui/assets/{shiki-lang-chapel-Ce27PSf2.js → shiki-lang-chapel-C41a-Vfc.js} +1 -1
- package/dist/ui/assets/{shiki-lang-clarity-DzhUGUb5.js → shiki-lang-clarity-D30seMWU.js} +1 -1
- package/dist/ui/assets/{shiki-lang-clojure-BGHEPgLH.js → shiki-lang-clojure-uuUteQ-I.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cmake-cj3BvjrT.js → shiki-lang-cmake-TS4v06Lq.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cobol-6silywQZ.js → shiki-lang-cobol-DR4--xqM.js} +1 -1
- package/dist/ui/assets/{shiki-lang-codeowners-CjsAJB7V.js → shiki-lang-codeowners-Dq4wI_wj.js} +1 -1
- package/dist/ui/assets/{shiki-lang-codeql-COxApCWA.js → shiki-lang-codeql-C2YFz6nZ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-coffee-DJFZ3vXp.js → shiki-lang-coffee-BoP47XOy.js} +1 -1
- package/dist/ui/assets/{shiki-lang-common-lisp-6R4RkOm6.js → shiki-lang-common-lisp-BI2P6pYW.js} +1 -1
- package/dist/ui/assets/{shiki-lang-coq-0p5OGVcA.js → shiki-lang-coq-DGJ-LtGn.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cpp-BL0zwoTz.js → shiki-lang-cpp-Dal4zAhU.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cpp-macro-BhQTFR1w.js → shiki-lang-cpp-macro-BNcMYQzK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-crystal-BhrX2mUY.js → shiki-lang-crystal-C8kllMvh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-csharp-BJ0dqAQQ.js → shiki-lang-csharp-xjiDMJUR.js} +1 -1
- package/dist/ui/assets/{shiki-lang-css-CgONgvzo.js → shiki-lang-css-BtK5ec9f.js} +1 -1
- package/dist/ui/assets/{shiki-lang-csv-MORT_y9S.js → shiki-lang-csv-p-Fkolpm.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cue-CFbNGLLB.js → shiki-lang-cue-rpKFDnrP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-cypher-DH-T6IiV.js → shiki-lang-cypher-COrMSn75.js} +1 -1
- package/dist/ui/assets/{shiki-lang-d-C3P1qfpW.js → shiki-lang-d-i8h2-tT8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-dart-C1Hg8CB4.js → shiki-lang-dart-Dio4c9vd.js} +1 -1
- package/dist/ui/assets/{shiki-lang-dax-YJWgtppW.js → shiki-lang-dax-CPTkOeIN.js} +1 -1
- package/dist/ui/assets/{shiki-lang-desktop-VlON4cDl.js → shiki-lang-desktop-DFiSEBxz.js} +1 -1
- package/dist/ui/assets/{shiki-lang-diff-Bj1DVcNN.js → shiki-lang-diff-D6COc5hs.js} +1 -1
- package/dist/ui/assets/{shiki-lang-docker-ByWlYF6b.js → shiki-lang-docker-XIMjEzG8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-dotenv-DJpkm7RO.js → shiki-lang-dotenv-QSkQX7h5.js} +1 -1
- package/dist/ui/assets/{shiki-lang-dream-maker-Z_U8NFug.js → shiki-lang-dream-maker-USSOZfUq.js} +1 -1
- package/dist/ui/assets/{shiki-lang-edge-CbPibdPM.js → shiki-lang-edge-BPDV4Q0u.js} +1 -1
- package/dist/ui/assets/{shiki-lang-elixir-FOIoAYAu.js → shiki-lang-elixir-BKE9OPDF.js} +1 -1
- package/dist/ui/assets/{shiki-lang-elm-CqNCzRK1.js → shiki-lang-elm-WG-wF2ge.js} +1 -1
- package/dist/ui/assets/{shiki-lang-emacs-lisp-BocUWC8p.js → shiki-lang-emacs-lisp-YvLEIlvI.js} +1 -1
- package/dist/ui/assets/{shiki-lang-erb-DK5ZF4vz.js → shiki-lang-erb-CbW7_yrm.js} +1 -1
- package/dist/ui/assets/{shiki-lang-erlang-rYxHmi04.js → shiki-lang-erlang-tQ2Conzb.js} +1 -1
- package/dist/ui/assets/{shiki-lang-es-tag-css-DnlLlrRA.js → shiki-lang-es-tag-css-CwAevhtf.js} +1 -1
- package/dist/ui/assets/{shiki-lang-es-tag-glsl-8APUALJ6.js → shiki-lang-es-tag-glsl-dqP1Yz9Z.js} +1 -1
- package/dist/ui/assets/{shiki-lang-es-tag-html-C4XIcryF.js → shiki-lang-es-tag-html--KbvnLgJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-es-tag-sql-BtI5o8rX.js → shiki-lang-es-tag-sql-D8eF3fs-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-es-tag-xml-DRxqpnDk.js → shiki-lang-es-tag-xml-C1XCREhg.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fennel-CP9FPjwQ.js → shiki-lang-fennel-ByuP2T_N.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fish-CqrI1-0S.js → shiki-lang-fish-Bl6JSWxf.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fluent-C23gPbyD.js → shiki-lang-fluent-DcjpW-CJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fortran-fixed-form-Dv3GdqPY.js → shiki-lang-fortran-fixed-form-Jm96oYxt.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fortran-free-form-BtHYkLVR.js → shiki-lang-fortran-free-form-DBXJeZhO.js} +1 -1
- package/dist/ui/assets/{shiki-lang-fsharp-D0NR9O4N.js → shiki-lang-fsharp-C1Axgpg7.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gdresource-Bg2P2NMh.js → shiki-lang-gdresource-Cb2Lv_Hg.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gdscript-BDP11UZz.js → shiki-lang-gdscript-BqpET1Hp.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gdshader-8V1ME3af.js → shiki-lang-gdshader-EJVyKmd9.js} +1 -1
- package/dist/ui/assets/{shiki-lang-genie-xgkduPxo.js → shiki-lang-genie-C580asv3.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gherkin--UFIrFpB.js → shiki-lang-gherkin-1-_7jqIt.js} +1 -1
- package/dist/ui/assets/{shiki-lang-git-commit-gTixV4s9.js → shiki-lang-git-commit-C1CitGA9.js} +1 -1
- package/dist/ui/assets/{shiki-lang-git-rebase-C_DDfC5h.js → shiki-lang-git-rebase-CafoN6im.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gleam-BCmzVrYm.js → shiki-lang-gleam-DzCfrYgh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-glimmer-js-0Wdoej83.js → shiki-lang-glimmer-js-DFqhoMH-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-glimmer-ts-Bul8Ca32.js → shiki-lang-glimmer-ts-BpmACrHW.js} +1 -1
- package/dist/ui/assets/{shiki-lang-glsl-fJH1k42K.js → shiki-lang-glsl-CZJe7hbK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gn-ClvndNYF.js → shiki-lang-gn-Rjzf9iJq.js} +1 -1
- package/dist/ui/assets/{shiki-lang-gnuplot-B4aa2-v6.js → shiki-lang-gnuplot-eeygxHmA.js} +1 -1
- package/dist/ui/assets/{shiki-lang-go-WKfzAuWo.js → shiki-lang-go-NVEOzY7_.js} +1 -1
- package/dist/ui/assets/{shiki-lang-graphql-Bl41bkR3.js → shiki-lang-graphql-DhZ5TXkF.js} +1 -1
- package/dist/ui/assets/{shiki-lang-groovy-DPTIjDbN.js → shiki-lang-groovy-CEZdlCsP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hack-BwL2Ag2H.js → shiki-lang-hack-BmcjITAv.js} +1 -1
- package/dist/ui/assets/{shiki-lang-haml-CEYRfOiF.js → shiki-lang-haml-HJ2Ueb86.js} +1 -1
- package/dist/ui/assets/{shiki-lang-handlebars-By72h-0H.js → shiki-lang-handlebars-DxaLlHkn.js} +1 -1
- package/dist/ui/assets/{shiki-lang-haskell-Ba8bHyyZ.js → shiki-lang-haskell-DiddM2MJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-haxe-D9mPDiPb.js → shiki-lang-haxe-pMfP0LCc.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hcl-DTpCFc46.js → shiki-lang-hcl-Bap936O0.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hjson-h-0INsVU.js → shiki-lang-hjson-BYTDlyGA.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hlsl-CKI6OfeK.js → shiki-lang-hlsl-fyyNP_qi.js} +1 -1
- package/dist/ui/assets/{shiki-lang-html-DFf92Hms.js → shiki-lang-html-CP9Hm1lR.js} +1 -1
- package/dist/ui/assets/{shiki-lang-html-derivative-y0kQp5cN.js → shiki-lang-html-derivative--x4x2jCE.js} +1 -1
- package/dist/ui/assets/{shiki-lang-http-Cap4KCjR.js → shiki-lang-http-CwwtjO5s.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hurl-fC0934ju.js → shiki-lang-hurl-CQo_d2_V.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hxml-BTpXjiag.js → shiki-lang-hxml-CJQUEG21.js} +1 -1
- package/dist/ui/assets/{shiki-lang-hy-RIXtmhH7.js → shiki-lang-hy-BHZn1Bjp.js} +1 -1
- package/dist/ui/assets/{shiki-lang-imba-DvVFFMy1.js → shiki-lang-imba-QC3P1YWQ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ini-D-vLyVj8.js → shiki-lang-ini-kwRikv0S.js} +1 -1
- package/dist/ui/assets/{shiki-lang-java-BeTjxnHl.js → shiki-lang-java-d1M2cgqP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-javascript-CF6Vsgp3.js → shiki-lang-javascript-CoQwDVkE.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jinja-html-CVnbJ0oM.js → shiki-lang-jinja-html-C-rrI0jb.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jinja-Cz3-RWz8.js → shiki-lang-jinja-oWNRr7NO.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jison-DxtixVzs.js → shiki-lang-jison-DlYeb9b8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-json-QS2TvV-a.js → shiki-lang-json-yQGkCSm9.js} +1 -1
- package/dist/ui/assets/{shiki-lang-json5-BsThk---.js → shiki-lang-json5-BBK18-F7.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jsonc-BBxdRkqS.js → shiki-lang-jsonc-C492qAh6.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jsonl-DHixT2Ch.js → shiki-lang-jsonl-Df74WKjQ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jsonnet-DMmrvZE9.js → shiki-lang-jsonnet-doyqAZP2.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jssm-D-BacgrV.js → shiki-lang-jssm-Cn74Pd6Y.js} +1 -1
- package/dist/ui/assets/{shiki-lang-jsx-DGUCmvqX.js → shiki-lang-jsx-mYZ0_grh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-julia-WtC1loLD.js → shiki-lang-julia-By3XtwRn.js} +1 -1
- package/dist/ui/assets/{shiki-lang-just-EJs2Bpr8.js → shiki-lang-just-BTkdamae.js} +1 -1
- package/dist/ui/assets/{shiki-lang-kdl-XgCoC7ro.js → shiki-lang-kdl-hCt96Ltw.js} +1 -1
- package/dist/ui/assets/{shiki-lang-kotlin-Ceu1DClC.js → shiki-lang-kotlin-BFL6W1VK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-kusto-IydfCbjB.js → shiki-lang-kusto-Bi9Fd-uE.js} +1 -1
- package/dist/ui/assets/{shiki-lang-latex-CERrvjmL.js → shiki-lang-latex-C1gH_y7D.js} +1 -1
- package/dist/ui/assets/{shiki-lang-lean-Bb1MSB5_.js → shiki-lang-lean-DJESOId2.js} +1 -1
- package/dist/ui/assets/{shiki-lang-less-C57uWnIP.js → shiki-lang-less-BlBwe5lT.js} +1 -1
- package/dist/ui/assets/{shiki-lang-liquid-D2YDAKEE.js → shiki-lang-liquid-_aQQlg5i.js} +1 -1
- package/dist/ui/assets/{shiki-lang-llvm-CsPaR48C.js → shiki-lang-llvm-BEpgvxue.js} +1 -1
- package/dist/ui/assets/{shiki-lang-log-4Q7z9P2_.js → shiki-lang-log-COUzL5MF.js} +1 -1
- package/dist/ui/assets/{shiki-lang-logo-B-rjKTna.js → shiki-lang-logo-BzFyBpUa.js} +1 -1
- package/dist/ui/assets/{shiki-lang-lua-CjwakkuI.js → shiki-lang-lua-D86t0AFA.js} +1 -1
- package/dist/ui/assets/{shiki-lang-luau-95molwVq.js → shiki-lang-luau-D1iPfPp8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-make-BuLqiXA5.js → shiki-lang-make-CKHn0pN_.js} +1 -1
- package/dist/ui/assets/{shiki-lang-markdown-Dlt9cTjJ.js → shiki-lang-markdown-DvqJlRaX.js} +1 -1
- package/dist/ui/assets/{shiki-lang-marko-AgxF-6vJ.js → shiki-lang-marko-Bx5Ys3zf.js} +1 -1
- package/dist/ui/assets/{shiki-lang-matlab-CLkaVy-y.js → shiki-lang-matlab-Bsmpzlgg.js} +1 -1
- package/dist/ui/assets/{shiki-lang-mdc-B-JDJ8TU.js → shiki-lang-mdc-BD8Hug0K.js} +1 -1
- package/dist/ui/assets/{shiki-lang-mdx-DdDHzKCT.js → shiki-lang-mdx-D6-XzQ1O.js} +1 -1
- package/dist/ui/assets/{shiki-lang-mermaid-Cjcnm69Q.js → shiki-lang-mermaid-CyNo_sGZ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-mipsasm-B_6mjd6u.js → shiki-lang-mipsasm-DA63Htym.js} +1 -1
- package/dist/ui/assets/{shiki-lang-mojo-D0L5A59C.js → shiki-lang-mojo-COJJ3_fN.js} +1 -1
- package/dist/ui/assets/{shiki-lang-moonbit-Eqtgjxo4.js → shiki-lang-moonbit-CuNFBU2r.js} +1 -1
- package/dist/ui/assets/{shiki-lang-move-DbQlRQBG.js → shiki-lang-move-BX2BqAEI.js} +1 -1
- package/dist/ui/assets/{shiki-lang-narrat-DiDbLBuo.js → shiki-lang-narrat-DRT2PRBR.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nextflow-CpRbRx9E.js → shiki-lang-nextflow-CXbNYeNi.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nextflow-groovy-Dtoz-QfU.js → shiki-lang-nextflow-groovy-CBn50lGS.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nginx-BhB_jNUf.js → shiki-lang-nginx-VuJMgGAK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nim-ZHlDXpnX.js → shiki-lang-nim-gUyAmDNe.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nix-BIW1fYd1.js → shiki-lang-nix-ZWhismn0.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nsis-CVnxZHip.js → shiki-lang-nsis-DiLH_ad1.js} +1 -1
- package/dist/ui/assets/{shiki-lang-nushell-BMeIXYse.js → shiki-lang-nushell-D3HeAm2_.js} +1 -1
- package/dist/ui/assets/{shiki-lang-objective-c-Cc2on8Vi.js → shiki-lang-objective-c-Bf-vgIFL.js} +1 -1
- package/dist/ui/assets/{shiki-lang-objective-cpp-vFHMpEHE.js → shiki-lang-objective-cpp-BIkOqJvP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ocaml-D3g-9olK.js → shiki-lang-ocaml-DWguduvb.js} +1 -1
- package/dist/ui/assets/{shiki-lang-odin-BM_1nNT7.js → shiki-lang-odin-BH-7UUWe.js} +1 -1
- package/dist/ui/assets/{shiki-lang-openscad-BtEafwls.js → shiki-lang-openscad-BSzJHkmP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-org-Bo_61LoZ.js → shiki-lang-org-DbleOP5Y.js} +1 -1
- package/dist/ui/assets/{shiki-lang-pascal-CtzWzlCE.js → shiki-lang-pascal-gTsGvL1D.js} +1 -1
- package/dist/ui/assets/{shiki-lang-perl-PJeVLxjR.js → shiki-lang-perl-BKMLvgdT.js} +1 -1
- package/dist/ui/assets/{shiki-lang-php-CGIwcKYx.js → shiki-lang-php-B7Gwh9ef.js} +1 -1
- package/dist/ui/assets/{shiki-lang-pkl-BwBGf-Je.js → shiki-lang-pkl-CopbDshc.js} +1 -1
- package/dist/ui/assets/{shiki-lang-plsql-DfWyOq8S.js → shiki-lang-plsql-DQMF8idG.js} +1 -1
- package/dist/ui/assets/{shiki-lang-po-CGG3cf6x.js → shiki-lang-po-DwBJCip-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-polar-Ixg1DSjp.js → shiki-lang-polar-DnF9YeeS.js} +1 -1
- package/dist/ui/assets/{shiki-lang-postcss-Bz1BtlXf.js → shiki-lang-postcss-CXWa9_la.js} +1 -1
- package/dist/ui/assets/{shiki-lang-powerquery-ifUmxibQ.js → shiki-lang-powerquery-MZ135DUG.js} +1 -1
- package/dist/ui/assets/{shiki-lang-powershell-DBPOjskM.js → shiki-lang-powershell-BhvOQ-ow.js} +1 -1
- package/dist/ui/assets/{shiki-lang-prisma-Blu4wKH1.js → shiki-lang-prisma-ehoeHrFh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-prolog-xjF--GQU.js → shiki-lang-prolog-CbsViES-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-proto-DSra8eBV.js → shiki-lang-proto-DzSxeFhe.js} +1 -1
- package/dist/ui/assets/{shiki-lang-pug-DSuGdEWk.js → shiki-lang-pug-Cx8nw1GZ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-puppet-Cq0Seunk.js → shiki-lang-puppet-Btc-vtJB.js} +1 -1
- package/dist/ui/assets/{shiki-lang-purescript-ByxegL2r.js → shiki-lang-purescript-BRNRwNAr.js} +1 -1
- package/dist/ui/assets/{shiki-lang-python-oauygUGH.js → shiki-lang-python-CHKKXXi8.js} +1 -1
- package/dist/ui/assets/{shiki-lang-qml-CfCPNi46.js → shiki-lang-qml-8dXsP_KG.js} +1 -1
- package/dist/ui/assets/{shiki-lang-qmldir-B3ajh-8-.js → shiki-lang-qmldir-wsrRkenJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-qss-JwufFeTi.js → shiki-lang-qss-Cddq0YPK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-r-DMwcwdHm.js → shiki-lang-r-DSZvQ2bf.js} +1 -1
- package/dist/ui/assets/{shiki-lang-racket-CGdA7NhF.js → shiki-lang-racket-CPkaj6O_.js} +1 -1
- package/dist/ui/assets/{shiki-lang-raku-ClL-wuQO.js → shiki-lang-raku-C-j9AeHY.js} +1 -1
- package/dist/ui/assets/{shiki-lang-razor-Bc882n0u.js → shiki-lang-razor-Cw-zhqTO.js} +1 -1
- package/dist/ui/assets/{shiki-lang-rbs-FCklQ7tS.js → shiki-lang-rbs-Bcy0mDBQ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-reg-DaN26ZvO.js → shiki-lang-reg-BdP2Aq_3.js} +1 -1
- package/dist/ui/assets/{shiki-lang-regexp-DqcDyem1.js → shiki-lang-regexp-Dr8RsTV5.js} +1 -1
- package/dist/ui/assets/{shiki-lang-rel-BpLoSKv9.js → shiki-lang-rel-ItxKk1t2.js} +1 -1
- package/dist/ui/assets/{shiki-lang-riscv-B2iV_L1B.js → shiki-lang-riscv-sAXJO5va.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ron-DdvUXXs5.js → shiki-lang-ron-BVZi4ZmK.js} +1 -1
- package/dist/ui/assets/{shiki-lang-rosmsg-BxtFx0Y7.js → shiki-lang-rosmsg-BwJgk5sN.js} +1 -1
- package/dist/ui/assets/{shiki-lang-rst-B3dfhudY.js → shiki-lang-rst-D5hzYB0l.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ruby-DHCzTBzU.js → shiki-lang-ruby-D9gEja1t.js} +1 -1
- package/dist/ui/assets/{shiki-lang-rust-C4poL8VP.js → shiki-lang-rust-BzGhc63A.js} +1 -1
- package/dist/ui/assets/{shiki-lang-sas-C8wUw1Vp.js → shiki-lang-sas-BFWf1cyL.js} +1 -1
- package/dist/ui/assets/{shiki-lang-sass-Dji7kc40.js → shiki-lang-sass-fiWvE1E6.js} +1 -1
- package/dist/ui/assets/{shiki-lang-scala-JNssQMYD.js → shiki-lang-scala-KEPZWw7Q.js} +1 -1
- package/dist/ui/assets/{shiki-lang-scheme-CW7V2UtM.js → shiki-lang-scheme-WjM1Xspu.js} +1 -1
- package/dist/ui/assets/{shiki-lang-scss-DBg0YeZ4.js → shiki-lang-scss-CG7e8fco.js} +1 -1
- package/dist/ui/assets/{shiki-lang-sdbl-BYeb1lAp.js → shiki-lang-sdbl-D-fUhBMJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-shaderlab-GktSJyKV.js → shiki-lang-shaderlab-CeQUIb-m.js} +1 -1
- package/dist/ui/assets/{shiki-lang-shellscript-Bv7mPD64.js → shiki-lang-shellscript-BHRoVZ9B.js} +1 -1
- package/dist/ui/assets/{shiki-lang-shellsession-Bkg9Digr.js → shiki-lang-shellsession-oQPRyNtJ.js} +1 -1
- package/dist/ui/assets/{shiki-lang-smalltalk-CqpXp2gZ.js → shiki-lang-smalltalk-BCn5pML6.js} +1 -1
- package/dist/ui/assets/{shiki-lang-smithy-GwK488Vp.js → shiki-lang-smithy-Bnew5vAI.js} +1 -1
- package/dist/ui/assets/{shiki-lang-solidity-5PE2Pulk.js → shiki-lang-solidity-DYWBIpKd.js} +1 -1
- package/dist/ui/assets/{shiki-lang-soy-D61f_9WS.js → shiki-lang-soy-BU_I37b3.js} +1 -1
- package/dist/ui/assets/{shiki-lang-sparql-BVBXfaxX.js → shiki-lang-sparql-CUzHwOAc.js} +1 -1
- package/dist/ui/assets/{shiki-lang-splunk-DZldBRB0.js → shiki-lang-splunk-CuMQ-bQj.js} +1 -1
- package/dist/ui/assets/{shiki-lang-sql-CR9sphd-.js → shiki-lang-sql-D_91z_KC.js} +1 -1
- package/dist/ui/assets/{shiki-lang-ssh-config-C_eLd3hX.js → shiki-lang-ssh-config-E7f5J40j.js} +1 -1
- package/dist/ui/assets/{shiki-lang-stata-cxiQzY5Z.js → shiki-lang-stata-CcxlnAAd.js} +1 -1
- package/dist/ui/assets/{shiki-lang-stylus-yBLwS3B_.js → shiki-lang-stylus-QdNMd2Ol.js} +1 -1
- package/dist/ui/assets/{shiki-lang-surrealql-CQ1B4fvD.js → shiki-lang-surrealql-BY3L-U6I.js} +1 -1
- package/dist/ui/assets/{shiki-lang-svelte-BrZ-k7yi.js → shiki-lang-svelte-BraYXbN1.js} +1 -1
- package/dist/ui/assets/{shiki-lang-swift-DOjOtIxe.js → shiki-lang-swift-GBk9P9bD.js} +1 -1
- package/dist/ui/assets/{shiki-lang-system-verilog-DmyUa94s.js → shiki-lang-system-verilog-CcFNB-9G.js} +1 -1
- package/dist/ui/assets/{shiki-lang-systemd-DYSBXyN5.js → shiki-lang-systemd-CfyxEp-3.js} +1 -1
- package/dist/ui/assets/{shiki-lang-talonscript-BUBbooxD.js → shiki-lang-talonscript-EiloZNHt.js} +1 -1
- package/dist/ui/assets/{shiki-lang-tasl-DAKi3lWp.js → shiki-lang-tasl-D2hiq4aP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-tcl-DNeJRgOl.js → shiki-lang-tcl-DmPeea8t.js} +1 -1
- package/dist/ui/assets/{shiki-lang-templ-DKYV6Pof.js → shiki-lang-templ-CNQsuMTo.js} +1 -1
- package/dist/ui/assets/{shiki-lang-terraform-DfYuA89d.js → shiki-lang-terraform-Bk9FujxB.js} +1 -1
- package/dist/ui/assets/{shiki-lang-tex-Cb33DrEL.js → shiki-lang-tex-DqCIQlTN.js} +1 -1
- package/dist/ui/assets/{shiki-lang-toml-BaaR59A6.js → shiki-lang-toml-CTaoLtIw.js} +1 -1
- package/dist/ui/assets/shiki-lang-ts-tags-kbOGoo3o.js +1 -0
- package/dist/ui/assets/{shiki-lang-tsv--fpF5auZ.js → shiki-lang-tsv-n2qFIoSV.js} +1 -1
- package/dist/ui/assets/{shiki-lang-tsx-p97p3SK9.js → shiki-lang-tsx-DHN5AfF-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-turtle-1lh9Wfao.js → shiki-lang-turtle-BhxMO6m_.js} +1 -1
- package/dist/ui/assets/{shiki-lang-twig-DR1FyLif.js → shiki-lang-twig-BI3wu5j1.js} +1 -1
- package/dist/ui/assets/{shiki-lang-typescript-DHNOgsP8.js → shiki-lang-typescript-Bi84_wAX.js} +1 -1
- package/dist/ui/assets/{shiki-lang-typespec-C91uBnE3.js → shiki-lang-typespec-BUSudTwB.js} +1 -1
- package/dist/ui/assets/{shiki-lang-typst-CI5xfKyi.js → shiki-lang-typst-BeQRnfsh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-v-DMQILRRf.js → shiki-lang-v-DcmtCCfh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vala-C4ar8eoZ.js → shiki-lang-vala-ACNpIZyT.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vb-AAhTcthz.js → shiki-lang-vb-UxeHUT4-.js} +1 -1
- package/dist/ui/assets/{shiki-lang-verilog-DK5Iephb.js → shiki-lang-verilog-D_z-DWcI.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vhdl-CMQVRPDa.js → shiki-lang-vhdl-DjYxR0oh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-viml-C1l6E4A3.js → shiki-lang-viml-35sdc6lh.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vue-DNmpMN2C.js → shiki-lang-vue-CXmuYyCC.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vue-html-BRIUbDAp.js → shiki-lang-vue-html-D7p54nmB.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vue-sfc-style-variable-injection-D1TdO2sq.js → shiki-lang-vue-sfc-style-variable-injection-OrVM63MP.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vue-vine-r6cwuWZy.js → shiki-lang-vue-vine-jXgUN14Y.js} +1 -1
- package/dist/ui/assets/{shiki-lang-vyper-D0cV2GLW.js → shiki-lang-vyper-CkzXvo5f.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wasm-BVFSgxvN.js → shiki-lang-wasm-YV5MrSFG.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wenyan-JEKl_-0C.js → shiki-lang-wenyan-BEAREdij.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wgsl-CVTTOPpW.js → shiki-lang-wgsl-DKljNrqo.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wikitext-BT1u0lSn.js → shiki-lang-wikitext-zQrLZOLl.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wit-CXr4d-s1.js → shiki-lang-wit-oxy4vW-x.js} +1 -1
- package/dist/ui/assets/{shiki-lang-wolfram-CbuUgwLG.js → shiki-lang-wolfram-CBPWnKO2.js} +1 -1
- package/dist/ui/assets/{shiki-lang-xml-CzqLjWlK.js → shiki-lang-xml-Dbri-bZ6.js} +1 -1
- package/dist/ui/assets/{shiki-lang-xsl-hYwVdgCv.js → shiki-lang-xsl-HtA9ymS7.js} +1 -1
- package/dist/ui/assets/{shiki-lang-yaml-Byr1PsnH.js → shiki-lang-yaml-CC6ddTCm.js} +1 -1
- package/dist/ui/assets/{shiki-lang-zenscript-ZElI1LVr.js → shiki-lang-zenscript-B5ajX4si.js} +1 -1
- package/dist/ui/assets/{shiki-lang-zig-xkISalQB.js → shiki-lang-zig-DXnhftle.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/dist/ui/shiki-langs.json +1 -1
- package/package.json +6 -3
- package/skills/comprehende/SKILL.md +11 -9
- package/skills/comprehende/references/example.md +5 -0
- package/skills/comprehende/references/review.schema.json +8 -0
- package/dist/ui/assets/index-B7sLE_by.js +0 -1744
- package/dist/ui/assets/index-C3TmVu8x.css +0 -1
- package/dist/ui/assets/shiki-lang-ts-tags-Dz_laeDQ.js +0 -1
|
@@ -0,0 +1,1744 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./shiki-lang-angular-html-BZS7pisj.js","./shiki-lang-html-CP9Hm1lR.js","./shiki-lang-javascript-CoQwDVkE.js","./shiki-lang-css-BtK5ec9f.js","./shiki-lang-angular-expression-CWExdM8x.js","./shiki-lang-angular-let-declaration-BvqQakFa.js","./shiki-lang-angular-template-oRYn081P.js","./shiki-lang-angular-template-blocks-DlxKd-FQ.js","./shiki-lang-angular-ts-Bg0EOCRA.js","./shiki-lang-angular-inline-style-B4bPMr5O.js","./shiki-lang-scss-CG7e8fco.js","./shiki-lang-angular-inline-template-obnrrKUv.js","./shiki-lang-apl-DpghvkS9.js","./shiki-lang-xml-Dbri-bZ6.js","./shiki-lang-java-d1M2cgqP.js","./shiki-lang-json-yQGkCSm9.js","./shiki-lang-astro-eLzdEfkh.js","./shiki-lang-typescript-Bi84_wAX.js","./shiki-lang-postcss-CXWa9_la.js","./shiki-lang-tsx-DHN5AfF-.js","./shiki-lang-blade-EiwCWvW-.js","./shiki-lang-html-derivative--x4x2jCE.js","./shiki-lang-sql-D_91z_KC.js","./shiki-lang-bsl-BJlZfp3d.js","./shiki-lang-sdbl-D-fUhBMJ.js","./shiki-lang-cairo-BhNbTAo2.js","./shiki-lang-python-CHKKXXi8.js","./shiki-lang-chapel-C41a-Vfc.js","./shiki-lang-c-cUgVXYtZ.js","./shiki-lang-cobol-DR4--xqM.js","./shiki-lang-coffee-BoP47XOy.js","./shiki-lang-cpp-Dal4zAhU.js","./shiki-lang-regexp-Dr8RsTV5.js","./shiki-lang-glsl-CZJe7hbK.js","./shiki-lang-cpp-macro-BNcMYQzK.js","./shiki-lang-crystal-C8kllMvh.js","./shiki-lang-shellscript-BHRoVZ9B.js","./shiki-lang-edge-BPDV4Q0u.js","./shiki-lang-elixir-BKE9OPDF.js","./shiki-lang-elm-WG-wF2ge.js","./shiki-lang-erb-CbW7_yrm.js","./shiki-lang-ruby-D9gEja1t.js","./shiki-lang-haml-HJ2Ueb86.js","./shiki-lang-graphql-DhZ5TXkF.js","./shiki-lang-jsx-mYZ0_grh.js","./shiki-lang-lua-D86t0AFA.js","./shiki-lang-yaml-CC6ddTCm.js","./shiki-lang-erlang-tQ2Conzb.js","./shiki-lang-markdown-DvqJlRaX.js","./shiki-lang-fortran-fixed-form-Jm96oYxt.js","./shiki-lang-fortran-free-form-DBXJeZhO.js","./shiki-lang-fsharp-C1Axgpg7.js","./shiki-lang-gdresource-Cb2Lv_Hg.js","./shiki-lang-gdshader-EJVyKmd9.js","./shiki-lang-gdscript-BqpET1Hp.js","./shiki-lang-git-commit-C1CitGA9.js","./shiki-lang-diff-D6COc5hs.js","./shiki-lang-git-rebase-CafoN6im.js","./shiki-lang-glimmer-js-DFqhoMH-.js","./shiki-lang-glimmer-ts-BpmACrHW.js","./shiki-lang-hack-BmcjITAv.js","./shiki-lang-handlebars-DxaLlHkn.js","./shiki-lang-http-CwwtjO5s.js","./shiki-lang-hurl-CQo_d2_V.js","./shiki-lang-csv-p-Fkolpm.js","./shiki-lang-hxml-CJQUEG21.js","./shiki-lang-haxe-pMfP0LCc.js","./shiki-lang-jinja-oWNRr7NO.js","./shiki-lang-jinja-html-C-rrI0jb.js","./shiki-lang-jison-DlYeb9b8.js","./shiki-lang-julia-By3XtwRn.js","./shiki-lang-r-DSZvQ2bf.js","./shiki-lang-just-BTkdamae.js","./shiki-lang-perl-BKMLvgdT.js","./shiki-lang-latex-C1gH_y7D.js","./shiki-lang-tex-DqCIQlTN.js","./shiki-lang-liquid-_aQQlg5i.js","./shiki-lang-marko-Bx5Ys3zf.js","./shiki-lang-less-BlBwe5lT.js","./shiki-lang-mdc-BD8Hug0K.js","./shiki-lang-nextflow-CXbNYeNi.js","./shiki-lang-nextflow-groovy-CBn50lGS.js","./shiki-lang-nginx-VuJMgGAK.js","./shiki-lang-nim-gUyAmDNe.js","./shiki-lang-nix-ZWhismn0.js","./shiki-lang-markdown-nix-DOLw_s_D.js","./shiki-lang-org-DbleOP5Y.js","./shiki-lang-clojure-uuUteQ-I.js","./shiki-lang-csharp-xjiDMJUR.js","./shiki-lang-dart-Dio4c9vd.js","./shiki-lang-docker-XIMjEzG8.js","./shiki-lang-go-NVEOzY7_.js","./shiki-lang-groovy-CEZdlCsP.js","./shiki-lang-ini-kwRikv0S.js","./shiki-lang-make-CKHn0pN_.js","./shiki-lang-objective-c-Bf-vgIFL.js","./shiki-lang-ocaml-DWguduvb.js","./shiki-lang-php-B7Gwh9ef.js","./shiki-lang-vb-UxeHUT4-.js","./shiki-lang-raku-C-j9AeHY.js","./shiki-lang-rust-BzGhc63A.js","./shiki-lang-scala-KEPZWw7Q.js","./shiki-lang-zig-DXnhftle.js","./shiki-lang-xsl-HtA9ymS7.js","./shiki-lang-pug-Cx8nw1GZ.js","./shiki-lang-qml-8dXsP_KG.js","./shiki-lang-razor-Cw-zhqTO.js","./shiki-lang-rst-D5hzYB0l.js","./shiki-lang-cmake-TS4v06Lq.js","./shiki-lang-sas-BFWf1cyL.js","./shiki-lang-shaderlab-CeQUIb-m.js","./shiki-lang-hlsl-fyyNP_qi.js","./shiki-lang-shellsession-oQPRyNtJ.js","./shiki-lang-soy-BU_I37b3.js","./shiki-lang-sparql-CUzHwOAc.js","./shiki-lang-turtle-BhxMO6m_.js","./shiki-lang-stata-CcxlnAAd.js","./shiki-lang-surrealql-BY3L-U6I.js","./shiki-lang-svelte-BraYXbN1.js","./shiki-lang-templ-CNQsuMTo.js","./shiki-lang-ts-tags-kbOGoo3o.js","./shiki-lang-es-tag-css-CwAevhtf.js","./shiki-lang-es-tag-glsl-dqP1Yz9Z.js","./shiki-lang-es-tag-html--KbvnLgJ.js","./shiki-lang-es-tag-sql-D8eF3fs-.js","./shiki-lang-es-tag-xml-C1XCREhg.js","./shiki-lang-twig-BI3wu5j1.js","./shiki-lang-typst-BeQRnfsh.js","./shiki-lang-bat-DeZWaK2t.js","./shiki-lang-bibtex-BK_j-Uh8.js","./shiki-lang-jsonc-C492qAh6.js","./shiki-lang-log-COUzL5MF.js","./shiki-lang-powershell-BhvOQ-ow.js","./shiki-lang-swift-GBk9P9bD.js","./shiki-lang-system-verilog-CcFNB-9G.js","./shiki-lang-verilog-D_z-DWcI.js","./shiki-lang-vue-CXmuYyCC.js","./shiki-lang-markdown-vue-DDYW27gg.js","./shiki-lang-vue-directives-2-MeLAcz.js","./shiki-lang-vue-interpolations-D6IW37Bp.js","./shiki-lang-vue-sfc-style-variable-injection-OrVM63MP.js","./shiki-lang-vue-html-D7p54nmB.js","./shiki-lang-vue-vine-jXgUN14Y.js","./shiki-lang-stylus-QdNMd2Ol.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function I(e){return{current:e}}function L(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function ae(e,t){ie++,re[ie]=e.current,e.current=t}var oe=I(null),se=I(null),ce=I(null),le=I(null);function ue(e,t){switch(ae(ce,t),ae(se,e),ae(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(oe),ae(oe,e)}function de(){L(oe),L(se),L(ce)}function fe(e){e.memoizedState!==null&&ae(le,e);var t=oe.current,n=qd(t,e.type);t!==n&&(ae(se,e),ae(oe,n))}function pe(e){se.current===e&&(L(oe),L(se)),le.current===e&&(L(le),rp._currentValue=ne)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=F.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function at(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[st])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Tu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=m({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=m({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(m({},On,{dataTransfer:0})),jn=bn(m({},Cn,{relatedTarget:0})),Mn=bn(m({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(m({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(m({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={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`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(m({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(m({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(m({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(m({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(m({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(m({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={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 ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=jd(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){wd(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=jd(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`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(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function R(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ii(n,i,a)}}function ti(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ai(e){if(50<gu)throw gu=0,_u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function si(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(e,t,n,r){return new si(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ui(e,t){var n=e.alternate;return n===null?(n=ci(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function di(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function z(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)li(e)&&(s=1);else if(typeof e==`string`)s=Jf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ci(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ci(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ci(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ci(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ci(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=ci(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=ci(6,e,null,t),e.lanes=n,e}function mi(e){var t=ci(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var vi=[],B=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){vi[B++]=bi,vi[B++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Re(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=vi[--B],vi[B]=null,bi=vi[--B],vi[B]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function H(e){throw Vi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:q(`cancel`,t),q(`close`,t);break;case`iframe`:case`object`:case`embed`:q(`load`,t);break;case`video`:case`audio`:for(n=0;n<Sd.length;n++)q(Sd[n],t);break;case`source`:q(`error`,t);break;case`img`:case`image`:case`link`:q(`error`,t),q(`load`,t);break;case`details`:q(`toggle`,t);break;case`input`:q(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:q(`invalid`,t);break;case`textarea`:q(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ld(t.textContent,n)?(r.popover!=null&&(q(`beforetoggle`,t),q(`toggle`,t)),r.onScroll!=null&&q(`scroll`,t),r.onScrollEnd!=null&&q(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||H(e,!0)}function Li(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function Ri(e){if(e!==ji)return!1;if(!V)return Li(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Jd(e.type,e.memoizedProps)),n=!n),n&&Mi&&H(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=hf(e)}else t===27?(t=Mi,nf(e.type)?(e=mf,mf=null,Mi=e):Mi=t):Mi=ji?pf(e.stateNode.nextSibling):null;return!0}function zi(){Mi=ji=null,V=!1}function Bi(){var e=Ni;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Ni=null),e}function Vi(e){Ni===null?Ni=[e]:Ni.push(e)}var Hi=I(null),Ui=null,Wi=null;function Gi(e,t,n){ae(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,L(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[rp]:e.push(rp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=gd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=P.S;P.S=function(e,t){au=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=I(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?ae(ha,ha.current):ae(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ui(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=z(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=z(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(te(t)||M(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ta(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ta(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return V&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),V&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return V&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),V&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=z(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(G&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=I(null),Xa=I(0);function Za(e,t){e=Jl,ae(Xa,e),ae(Ya,t),Jl=e|t.baseLanes}function Qa(){ae(Xa,Jl),ae(Ya,Ya.current)}function $a(){Jl=Xa.current,L(Ya),L(Xa)}var eo=I(null),to=null;function no(e){var t=e.alternate;ae(so,so.current&1),ae(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){ae(so,so.current),ae(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(ae(so,so.current),ae(eo,e),to===null&&(to=e)):ao(e)}function ao(){ae(so,so.current),ae(eo,eo.current)}function oo(e){L(eo),to===e&&(to=null),L(so)}var so=I(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=0,U=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return lo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){P.H=Rs;var t=uo!==null&&uo.next!==null;if(lo=0,fo=uo=U=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function wo(e,t,n,r){U=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Vs,o=t(n,r)}while(mo);return o}function To(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(U.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}lo=0,fo=uo=U=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?U.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?U.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?U.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=wa(vo,e,t),t=U,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=jo(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(G&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,Xl|=p;f=u.action,ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=Ao(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Cr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=U,a=Ao(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=jo(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Wo(e){var t=ri(e,2);t!==null&&bu(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(V){var n=Hl.formState;if(n!==null){a:{var r=U;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=pf(i.nextSibling),r=i.data===`F!`;break a}}H(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,U,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,U,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===ya?xa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=jo(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();U.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(U.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=jo(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||lo&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=yu(),U.lanes|=e,Xl|=e,n)}function xs(e,t,n,r){return Cr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(G&261930)?(rc=!0,e.memoizedState=n):(e=yu(),U.lanes|=e,Xl|=e,t):(e=bs(e,n,r),Cr(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ps(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),vu(e)):Ns(e,t,r,vu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},vu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ne,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},vu())}function Ds(){return Qi(rp)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Ba(n);var r=Va(t,e,n);r!==null&&(bu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ni(e,t,n,r),n!==null&&(bu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,vu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ti(e,t,i,0),Hl===null&&R(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return bu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&bu(t,e,2)}function Fs(e){var t=e.alternate;return e===U||t!==null&&t===U}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Rs={readContext:Qi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Qi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,U,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=ko();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));G&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=Hl.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,U)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(bu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(bu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(bu(t,e,n),Ha(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Zr(e)}function Js(e){console.error(e)}function Ys(e){Zr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(cu===null?cu=new Set([this]):cu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Mu():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Zu(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Zu(e,r,a)),!1}throw Error(i(435,n.tag))}return Zu(e,r,a),Mu(),!1}if(V)return t=eo.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Vi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Vi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(cu===null||!cu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!li(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=z(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=ui(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref){if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=Mi)?(e=lf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw H(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a){if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ri(e,s),bu(r,e,s),nc;Mu(),t=fc(e,t,n)}else e=o.treeContext,Mi=pf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=dc(t,r),t.flags|=4096;return t}return e=ui(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return Zi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!rc?(Do(e,t,a),kc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=oi,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=oi,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=oi,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(so.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(V){if(a?no(t):ao(t),(e=Mi)?(e=lf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw H(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ri(e,r),bu(s,e,r),nc;uf(c)||Mu(),t=Tc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=pf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ui(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=ui(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=ui(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ci(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ae(so,o),ic(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Xi(e)))}function jc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}}else rc=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)li(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}if(r!==a){a=_i(Error(i(424)),t),Vi(a),t=vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=pf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Gd(ce.current).createElement(n),r[st]=t,r[ct]=e,zd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&V&&(r=t.stateNode=_f(t.type,t.pendingProps,ce.current),ji=t,Pi=!0,a=Mi,nf(t.type)?(mf=a,Mi=pf(r.firstChild)):Mi=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=sf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=pf(r.firstChild),Pi=!1,a=!0)),a||H(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=So(e,t,To,null,null,n),rp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=cf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||H(t)),null;case 13:return Sc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Hl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw Ea=Sa,ba}}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Yf(t)){if(ku())e.flags|=8192;else throw Ea=Sa,ba}}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,eu|=t)}function Lc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(pe(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=oe.current,Ri(t)?Ii(t,e):(e=_f(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=oe.current,Ri(t))Ii(t,o);else{var s=Gd(ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||H(t,!0)}else e=Gd(e).createTextNode(r),e[st]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return de(),e===null&&Dd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(L(so),r=t.memoizedState,r===null)return Rc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return ae(so,so.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>ou&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Rc(t),null}else 2*Ee()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=so.current,ae(so,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(so),null;case 4:return de(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&L(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Vc(e,t){switch(ki(t),t.tag){case 3:Ki(ia),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:L(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&L(ha);break;case 24:Ki(ia)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Xu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Xu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Xu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Xu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Xu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Xu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Xu(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Xu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[ct]=t}catch(t){Xu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[st]=e,t[ct]=n}catch(t){Xu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Ud=fp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},fp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Xu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Xu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Xu(n,n.return,e)}}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Xu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ed.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,!!(n.subtreeFlags&8772)):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;nf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),vf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null){if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Xu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Xu(n,t,e)}}break;case 18:ll!==null&&(ul?(e=ll,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Rp(e)):rf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rp(e)}catch(e){Xu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rp(e)}catch(e){Xu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=td.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=Kf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Kf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else qf(a,e.type,e.stateNode)}else e.stateNode=Vf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?qf(a,e.type,e.stateNode):Vf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Xu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Xu(e,e.return,t)}}break;case 3:if(Gf=null,a=vl,vl=xf(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rp(t.containerInfo)}catch(t){Xu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=xf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Xu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Xu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?af(m,!0):af(l.stateNode,!1)}catch(e){Xu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Xu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:vf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Xu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Xu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Xu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Xf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=xf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,W=null,G=0,Ul=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=null,nu=null,ru=!1,iu=0,au=0,ou=1/0,su=null,cu=null,lu=0,uu=null,du=null,fu=0,pu=0,mu=null,hu=null,gu=0,_u=null;function vu(){return Vl&2&&G!==0?G&-G:P.T===null?it():gd()}function yu(){if($l===0){if(!(G&536870912)||V){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),$l=e}else $l=536870912}return e=eo.current,e!==null&&(e.flags|=32),$l}function bu(e,t,n){(e===Hl&&(Ul===2||Ul===9)||e.cancelPendingCommit!==null)&&(Du(e,0),wu(e,G,$l,!1)),Ze(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&(Zl|=n),Yl===4&&wu(e,G,$l,!1)),cd(e))}function xu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||qe(e,t),a=r?Fu(e,t):Nu(e,t,!0),o=r;do{if(a===0){Kl&&!r&&wu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Cu(n)){a=Nu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Du(c,s).flags|=256),s=Nu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Zl|=o,a=4;break a}o=nu,nu=a,o!==null&&(nu===null?nu=o:nu.push.apply(nu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Du(e,0),wu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:wu(r,t,$l,!Gl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=iu+300-Ee(),10<a)){if(wu(r,t,$l,!Gl),Ke(r,0,!0)!==0)break a;fu=t,r.timeoutHandle=Zd(Su.bind(null,r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,`Throttled`,-0,0),a);break a}Su(r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,null,-0,0)}break}while(1);cd(e)}function Su(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Nl(t,a,d);var m=(a&62914560)===a?iu-Ee():(a&4194048)===a?au-Ee():0;if(m=Qf(d,m),m!==null){fu=a,e.cancelPendingCommit=m(Hu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),wu(e,a,o,!l);return}}Hu(e,t,a,n,r,i,o,s,c)}function Cu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wu(e,t,n,r){t&=~Ql,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Tu(){return Vl&6?!0:(ld(0,!1),!1)}function Eu(){if(W!==null){if(Ul===0)var e=W.return;else e=W,Wi=Ui=null,Oo(e),ka=null,Aa=0,e=W;for(;e!==null;)Vc(e.alternate,e),e=e.return;W=null}}function Du(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),fu=0,Eu(),Hl=e,W=n=ui(e.current,null),G=t,Ul=0,Wl=null,Gl=!1,Kl=qe(e,t),ql=!1,eu=$l=Ql=Zl=Xl=Yl=0,nu=tu=null,ru=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,R(),n}function Ou(e,t){U=null,P.H=Rs,t===ya||t===xa?(t=Da(),Ul=3):t===ba?(t=Da(),Ul=4):Ul=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,W===null&&(Yl=1,Xs(e,_i(t,e.current)))}function ku(){var e=eo.current;return e===null?!0:(G&4194048)===G?to===null:(G&62914560)===G||G&536870912?e===to:!1}function Au(){var e=P.H;return P.H=Rs,e===null?Rs:e}function ju(){var e=P.A;return P.A=zl,e}function Mu(){Yl=4,Gl||(G&4194048)!==G&&eo.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Hl===null||wu(Hl,G,$l,!1)}function Nu(e,t,n){var r=Vl;Vl|=2;var i=Au(),a=ju();(Hl!==e||G!==t)&&(su=null,Du(e,t)),t=!1;var o=Yl;a:do try{if(Ul!==0&&W!==null){var s=W,c=Wl;switch(Ul){case 8:Eu(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Ul;if(Ul=0,Wl=null,zu(e,s,c,l),n&&Kl){o=0;break a}break;default:l=Ul,Ul=0,Wl=null,zu(e,s,c,l)}}Pu(),o=Yl;break}catch(t){Ou(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Vl=r,P.H=i,P.A=a,W===null&&(Hl=null,G=0,R()),o}function Pu(){for(;W!==null;)Lu(W)}function Fu(e,t){var n=Vl;Vl|=2;var r=Au(),a=ju();Hl!==e||G!==t?(su=null,ou=Ee()+500,Du(e,t)):Kl=qe(e,t);a:do try{if(Ul!==0&&W!==null){t=W;var o=Wl;b:switch(Ul){case 1:Ul=0,Wl=null,zu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Ul=0,Wl=null,Ru(t);break}t=function(){Ul!==2&&Ul!==9||Hl!==e||(Ul=7),cd(e)},o.then(t,t);break a;case 3:Ul=7;break a;case 4:Ul=5;break a;case 7:Ca(o)?(Ul=0,Wl=null,Ru(t)):(Ul=0,Wl=null,zu(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Yf(s):c.stateNode.complete){Ul=0,Wl=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,Bu(u))}break b}}Ul=0,Wl=null,zu(e,t,o,5);break;case 6:Ul=0,Wl=null,zu(e,t,o,6);break;case 8:Eu(),Yl=6;break a;default:throw Error(i(462))}}Iu();break}catch(t){Ou(e,t)}while(1);return Wi=Ui=null,P.H=r,P.A=a,Vl=n,W===null?(Hl=null,G=0,R(),Yl):0}function Iu(){for(;W!==null&&!we();)Lu(W)}function Lu(e){var t=Mc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Bu(e):W=t}function Ru(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Oo(t);default:Vc(n,t),t=W=di(t,Jl),t=Mc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Bu(e):W=t}function zu(e,t,n,r){Wi=Ui=null,Oo(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,G)){Yl=1,Xs(e,_i(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Yl=1,Xs(e,_i(n,e.current)),W=null;return}t.flags&32768?(V||r===1?e=!0:Kl||G&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Vu(t,e)):Bu(t)}function Bu(e){var t=e;do{if(t.flags&32768){Vu(t,Gl);return}e=t.return;var n=zc(t.alternate,t,Jl);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Yl===0&&(Yl=5)}function Vu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Yl=6,W=null}function Hu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(lu!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Hl&&(W=Hl=null,G=0),du=t,uu=e,fu=n,pu=o,mu=a,hu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,nd(Ae,function(){return Ju(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,F.p=a,P.T=r}}lu=1,Uu(),Wu(),Gu()}}function Uu(){if(lu===1){lu=0;var e=uu,t=du,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Wd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fp=!!Ud,Wd=Ud=null}finally{Vl=i,F.p=r,P.T=n}}e.current=t,lu=2}}function Wu(){if(lu===2){lu=0;var e=uu,t=du,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,F.p=r,P.T=n}}lu=3}}function Gu(){if(lu===4||lu===3){lu=0,Te();var e=uu,t=du,n=fu,r=hu;t.subtreeFlags&10256||t.flags&10256?lu=5:(lu=0,du=uu=null,Ku(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(cu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}fu&3&&qu(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===_u?gu++:(gu=0,_u=e):gu=0,ld(0,!1)}}function Ku(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function qu(){return Uu(),Wu(),Gu(),Ju()}function Ju(){if(lu!==5)return!1;var e=uu,t=pu;pu=0;var n=rt(fu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=mu,mu=null;var o=uu,s=fu;if(lu=0,du=uu=null,fu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,ld(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{F.p=a,P.T=r,Ku(e,t)}}function Yu(e,t,n){t=_i(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ze(e,2),cd(e))}function Xu(e,t,n){if(e.tag===3)Yu(e,e,n);else for(;t!==null;){if(t.tag===3){Yu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cu===null||!cu.has(r))){e=_i(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),Ze(r,2),cd(r));break}}t=t.return}}function Zu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ql=!0,i.add(n),e=Qu.bind(null,e,t,n),t.then(e,e))}function Qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(G&n)===n&&(Yl===4||Yl===3&&(G&62914560)===G&&300>Ee()-iu?!(Vl&2)&&Du(e,0):Ql|=n,eu===G&&(eu=0)),cd(e)}function $u(e,t){t===0&&(t=Ye()),e=ri(e,t),e!==null&&(Ze(e,t),cd(e))}function ed(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$u(e,n)}function td(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),$u(e,n)}function nd(e,t){return Se(e,t)}var rd=null,K=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==K&&e.next===null&&(K===null?rd=K=e:K=K.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=rd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=G,a=Ke(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,md(r,a))}r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Xd()&&(e=sd);for(var t=Ee(),n=null,r=rd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?rd=i:n.next=i,i===null&&(K=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}lu!==0&&lu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=G,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ul===2||Ul===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=pd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(lu!==0&&lu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var r=G;return r=Ke(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xu(e,r,t),fd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function md(e,t){if(qu())return null;xu(e,t,!0)}function hd(){ef(function(){Vl&6?Se(Oe,ud):dd()})}function gd(){if(sd===0){var e=la;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),sd=e}return sd}function _d(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function vd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=_d((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?_d(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?vd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?vd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var bd=0;bd<Yr.length;bd++){var xd=Yr[bd];Xr(xd.toLowerCase(),`on`+(xd[0].toUpperCase()+xd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Sd=`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(` `),Cd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Sd));function wd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Od(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),Od(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,xt.forEach(function(t){t!==`selectionchange`&&(Cd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function Od(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function kd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Ad(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Md,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Nd(s,c,l,d,!1),u!==null&&f!==null&&Nd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c)){if(fr)v=xr;else{v=yr;var y=vr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=jd(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=jd(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),yd(s,e,r,n,i)}wd(s,t)})}function Ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Ad(e,i,a)),i=ln(e,t),i!=null&&r.push(Ad(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Md(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Ad(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Ad(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Id(e){return(typeof e==`string`?e:``+e).replace(Pd,`
|
|
10
|
+
`).replace(Fd,``)}function Ld(e,t){return t=Id(t),Id(e)===t}function J(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&J(e,t,`name`,a.name,a,null),J(e,t,`formEncType`,a.formEncType,a,null),J(e,t,`formMethod`,a.formMethod,a,null),J(e,t,`formTarget`,a.formTarget,a,null)):(J(e,t,`encType`,a.encType,a,null),J(e,t,`method`,a.method,a,null),J(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:q(`beforetoggle`,e),q(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:q(`error`,e),q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:J(e,t,o,s,n,null)}}a&&J(e,t,`srcSet`,n.srcSet,n,null),r&&J(e,t,`src`,n.src,n,null);return;case`input`:q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:J(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:J(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:J(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:J(e,t,l,r,n,null)}return;case`dialog`:q(`beforetoggle`,e),q(`toggle`,e),q(`cancel`,e),q(`close`,e);break;case`iframe`:case`object`:q(`load`,e);break;case`video`:case`audio`:for(r=0;r<Sd.length;r++)q(Sd[r],e);break;case`image`:q(`error`,e),q(`load`,e);break;case`details`:q(`toggle`,e);break;case`embed`:case`source`:case`link`:q(`error`,e),q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:J(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&J(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||J(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&J(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||J(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&J(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:J(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&J(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:J(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:J(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&J(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:J(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&J(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||J(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Jd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e!==Yd&&(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Rp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body)}n=i}while(n);Rp(t)}function af(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:of(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=F.d;F.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:Mf,S:jf,M:Nf};function Cf(){var e=Sf.f(),t=Tu();return e||t}function wf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=yt(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);bt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=yt(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=m({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),bt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=yt(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),bt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var a=(a=ce.current)?xf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=yt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Ff(n.href);var o=yt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(If(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Rf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=yt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ff(e){return`href="`+zt(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),bt(t),e.head.appendChild(t))}function zf(e){return`[src="`+zt(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),zd(r,`style`,a),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Ff(n.href);var o=e.querySelector(If(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Lf(n),(a=yf.get(a))&&Uf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Hf(o,n.precedence,e),t.instance=o;case`script`:return o=zf(n.src),(a=e.querySelector(Bf(o)))?(t.instance=a,bt(a),a):(r=n,(a=yf.get(o))&&(r=m({},n),Wf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),zd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gf=null;function Kf(e,t,n){if(Gf===null){var r=new Map,i=Gf=new Map;i.set(n,r)}else i=Gf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=$f.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var rp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ip(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ci(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function op(e){return e?(e=oi,e):oi}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(bu(n,e,t),Ha(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&bu(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=vu();t=nt(t);var n=ri(e,t);n!==null&&bu(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function mp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)kd(e,t,r,_p,n),Op(e,r);else if(Ap(i,e,t,n,r))r.stopPropagation();else if(Op(e,r),t&4&&-1<Dp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}cd(a),!(Vl&6)&&(ou=Ee()+500,ld(0,!1))}}break;case 31:case 13:s=ri(a,2),s!==null&&bu(s,a,2),Tu(),lp(a,2)}if(a=gp(r),a===null&&kd(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}function gp(e){return e=nn(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _p=e,null}function yp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Ep=[],Dp=`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 Op(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function kp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ap(e,t,n,r,i){switch(t){case`focusin`:return xp=kp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=kp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=kp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,kp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,kp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function jp(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){dp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function Np(e,t,n){Mp(e)&&n.delete(t)}function Pp(){bp=!1,xp!==null&&Mp(xp)&&(xp=null),Sp!==null&&Mp(Sp)&&(Sp=null),Cp!==null&&Mp(Cp)&&(Cp=null),wp.forEach(Np),Tp.forEach(Np)}function Fp(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pp)))}var Ip=null;function Lp(e){Ip!==e&&(Ip=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ip===e&&(Ip=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(vp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rp(e){function t(t){return Fp(t,e)}xp!==null&&Fp(xp,e),Sp!==null&&Fp(Sp,e),Cp!==null&&Fp(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Ep.length;n++){var r=Ep[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ep.length&&(n=Ep[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&Ep.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Lp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Lp(n)}}}function zp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Bp(e){this._internalRoot=e}Vp.prototype.render=Bp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;sp(n,vu(),e,t,null,null)},Vp.prototype.unmount=Bp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),Tu(),t[lt]=null}};function Vp(e){this._internalRoot=e}Vp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ep.length&&t!==0&&t<Ep[n].priority;n++);Ep.splice(n,0,e),n===0&&jp(e)}};var Hp=n.version;if(Hp!==`19.2.8`)throw Error(i(527,Hp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wp.isDisabled&&Wp.supportsFiber)try{Fe=Wp.inject(Up),Ie=Wp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,o,s,c,zp),e[lt]=t.current,Dd(e),new Bp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),x=o(((e,t)=>{t.exports=b()}))();function S(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function C(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function w(e){return e/100*window.innerHeight}function T(e){return e/100*window.innerWidth}function E(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let 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 D({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=E(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=C(t,i);break;case`em`:r=S(t,i);break;case`vh`:r=w(i);break;case`vw`:r=T(i)}return r}function O(e){return parseFloat(e.toFixed(3))}function k({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function A(e){let{panels:t}=e,n=k({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=O(D({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=O(D({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=O(D({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=O(D({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function j(e,t=`Assertion error`){if(!e)throw Error(t)}function M(e,t){return Array.from(t).sort(e===`horizontal`?N:ee)}function N(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function ee(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function te(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function P(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 F({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=P(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return j(i,`No rect found`),i}var ne;function re(){return ne===void 0&&(ne=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),ne}function ie(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=M(n,Array.from(t.children).filter(te).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,F({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=re()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:k({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var I=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0){if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},L={cursorFlags:0,state:`inactive`},ae=new I;function oe(){return L}function se(e){return ae.addListener(`change`,e)}function ce(e){let t=L,n={...L};n.cursorFlags=e,L=n,ae.emit(`change`,{prev:t,next:n})}function le(e){let t=L;L=e,ae.emit(`change`,{prev:t,next:e})}var ue=e=>e,de=()=>{},fe=1,pe=2,me=4,he=8,ge=3,_e=12,ve;function ye(){return ve===void 0&&(ve=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(ve=!0)),ve}function be({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++}})}if(r!==0||i!==0){if(n===`active`&&e&&ye()){let t=(e&fe)!==0,n=(e&pe)!==0,r=(e&me)!==0,i=(e&he)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}return ye()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var xe=new WeakMap;function Se(e){if(!e.defaultView||!e.adoptedStyleSheets)return;let{prevStyle:t,styleSheet:n}=xe.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]));let r=oe();switch(r.state){case`active`:case`hover`:{let e=be({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0)}xe.set(e,{prevStyle:t,styleSheet:n})}var Ce=new Map,we=new I;function Te(e){Ce=new Map(Ce),Ce.delete(e)}function Ee(e,t){for(let[t]of Ce)if(t.id===e)return t}function De(e,t){for(let[t,n]of Ce)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Oe(){return Ce}function ke(e,t){return we.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ae(e,t,n){let r=Ce.get(e);Ce=new Map(Ce),Ce.set(e,t),we.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function je(e){let t=oe(),n=Oe(),r=!1;return t.state===`active`&&(le({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Se(e),r=!0,t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=De(e.group.id,!0);Ae(e.group,t,{isUserInteraction:!0})}))),r}function Me(e){e.defaultPrevented||je(e.currentTarget)}function Ne(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=P(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t)}}return r?{distance:i,hitRegion:r}:void 0}function Pe(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Fe(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:Ve(e),b:Ve(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();j(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:Be(ze(n.a)),b:Be(ze(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Ie=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Le(e){let t=getComputedStyle(He(e)??e).display;return t===`flex`||t===`inline-flex`}function Re(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Le(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`||Ie.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function ze(e){let t=e.length;for(;t--;){let n=e[t];if(j(n,`Missing node`),Re(n))return n}return null}function Be(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ve(e){let t=[];for(;e;)t.push(e),e=He(e);return t}function He(e){let{parentNode:t}=e;return Pe(t)?t.host:t}function Ue(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 We({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!te(n)||n.contains(e)||e.contains(n))return!0;if(Fe(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Ue(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Ge(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=ie(r),a=Ne(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&We({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Ke(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 qe(e,t,n=0){return Math.abs(O(e)-O(t))<=n}function Je(e,t){return qe(e,t)?0:e>t?1:-1}function Ye({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(Je(r,c)<0){if(a){let e=(i+c)/2;r=Je(r,e)<0?i:c}else r=c}return r=Math.min(s,r),r=O(r),r}function Xe({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(qe(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;j(u!=null,`Invalid first pivot index`),j(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];j(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(j(n!=null,`Previous layout not found for panel index ${t}`),qe(n,i)){let t=o-n;Je(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];j(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(j(n!=null,`Previous layout not found for panel index ${t}`),qe(n,o)){let t=n-i;Je(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];j(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&Je(i,c)<0){if(e>0){let t=c-o,n=t/2;Je(i+e,c)<0&&(e=Je(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;Je(i-e,c)<0&&(e=Je(100+e,n)>0?0:-t)}}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];j(e!=null,`Previous layout not found for panel index ${r}`);let a=Ye({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];j(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=Ye({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!qe(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(Ke(c,l))return i;{let t=e<0?d:u,r=s[t];j(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=Ye({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!qe(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];j(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=Ye({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(qe(i,s)||(t-=s-i,l[r]=s),qe(t,0))break;e>0?r--:r++}}}if(!qe(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function Ze(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||Je(e[n],t[n])!==0)return!1;return!0}function Qe({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!qe(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];j(t!=null,`No layout data found for index ${e}`);let n=100/i*t;r[e]=n}let a=0;for(let e=0;e<t.length;e++){let i=n[e];j(i!=null,`No layout data found for index ${e}`);let o=r[e];j(o!=null,`No layout data found for index ${e}`);let s=Ye({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!qe(a,0))for(let e=0;e<t.length;e++){let n=r[e];j(n!=null,`No layout data found for index ${e}`);let i=n+a,o=Ye({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,qe(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function $e({groupId:e,panelId:t}){let n=()=>{let t=Oe();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&qe(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:O(100-e)}}return Xe({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=Qe({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});Ze(c,u)||Ae(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&qe(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=k({group:t}),o=O(D({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function et(e){e.defaultPrevented||Ge(e,Oe()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=$e({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function tt(e){let t=Oe();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function nt({groupId:e}){let t=()=>{let t=Oe();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=Qe({layout:e,panelConstraints:r});return n?o:(Ze(o,c)||Ae(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function rt(e,t){let n=tt(e),r=De(n.id,!0),i=n.separators.find(t=>t.element===e);j(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);j(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=nt({groupId:n.id}).getLayout(),c=Qe({layout:Xe({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});Ze(s,c)||Ae(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function it(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=tt(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&rt(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&rt(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&rt(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&rt(t,-5);break;case`End`:e.preventDefault(),rt(t,100);break;case`Enter`:{e.preventDefault();let n=tt(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=De(n.id,!0),o=n.separators.find(e=>e.element===t);j(o,`Matching separator not found`);let s=a.get(o);j(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(j(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];rt(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=tt(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);j(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),rt(t,-100)}}function at(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Oe(),n=Ge(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),le({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function ot({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=Xe({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(Ze(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?fe:pe;break;case`vertical`:s|=d<0?me:he}}else Ae(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&ge:c|=s&ge,t.movementY===0?c|=o&_e:c|=s&_e,ce(c),Se(e)}function st(e){let t=Oe(),n=oe();n.state===`active`&&ot({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function ct(e){if(e.defaultPrevented)return;let t=oe(),n=Oe();switch(t.state){case`active`:if(e.buttons===0){le({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=De(e.group.id,!0);Ae(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}ot({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=Ge(e,n);r.length===0?t.state!==`inactive`&&le({cursorFlags:0,state:`inactive`}):le({cursorFlags:0,hitRegions:r,state:`hover`}),Se(e.currentTarget);break}}}function lt(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(oe().state){case`hover`:le({cursorFlags:0,state:`inactive`})}}function ut(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||je(e.currentTarget)&&e.preventDefault()}function dt(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=O(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=O((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function ft(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=k({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:O(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function pt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function mt(e,t){return e.length===t.length&&e.every((e,n)=>pt(e,t[n]))}function ht({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=O(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=O((r[e]??0)/a*l);else{let e=O(l/c.length);for(let t of c)u[t]=e}return u}function gt(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var _t=new Map;function vt(e){let t=!0;j(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=k({group:e});if(t===0)return;let n=De(e.id);if(!n)return;let r=A(e),i=n.defaultLayoutDeferred?dt(r):n.layout,a=Qe({layout:ht({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&Ze(n.layout,a)&&mt(n.derivedPanelConstraints,r)&&n.groupSize===t)continue;Ae(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else ft(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{j(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=k({group:e}),s=A(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(gt(e.panels,l)||(l=void 0));let u=Qe({layout:e.mutableState.layouts[c]??l??dt(s),panelConstraints:s}),d=e.element.ownerDocument;_t.set(d,(_t.get(d)??0)+1);let f=new Map;return ie(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ae(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{j(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,it)}),_t.get(d)===1&&(d.addEventListener(`contextmenu`,Me,!0),d.addEventListener(`dblclick`,et,!0),d.addEventListener(`pointerdown`,at,!0),d.addEventListener(`pointerleave`,st),d.addEventListener(`pointermove`,ct),d.addEventListener(`pointerout`,lt),d.addEventListener(`pointerup`,ut,!0)),function(){t=!1,_t.set(d,Math.max(0,(_t.get(d)??0)-1)),Te(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,it)}),_t.get(d)||(d.removeEventListener(`contextmenu`,Me,!0),d.removeEventListener(`dblclick`,et,!0),d.removeEventListener(`pointerdown`,at,!0),d.removeEventListener(`pointerleave`,st),d.removeEventListener(`pointermove`,ct),d.removeEventListener(`pointerout`,lt),d.removeEventListener(`pointerup`,ut,!0)),a.disconnect()}}function yt(){let[e,t]=(0,v.useState)({});return[e,(0,v.useCallback)(()=>t({}),[])]}function bt(e){let t=(0,v.useId)();return`${e??t}`}var xt=typeof window<`u`?v.useLayoutEffect:v.useEffect;function St(e){let t=(0,v.useRef)(e);return xt(()=>{t.current=e},[e]),(0,v.useCallback)((...e)=>t.current?.(...e),[t])}function Ct(...e){return St(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t}})})}function wt(e){let t=(0,v.useRef)({...e});return xt(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Tt=(0,v.createContext)(null);function Et(e,t){let n=(0,v.useRef)({getLayout:()=>({}),setLayout:ue});(0,v.useImperativeHandle)(t,()=>n.current,[]),xt(()=>{Object.assign(n.current,nt({groupId:e}))})}function Dt({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,v.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=St(e=>{Ze(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=St((e,t)=>{Ze(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=bt(s),y=(0,v.useRef)(null),[b,S]=yt(),C=(0,v.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),w=Ct(y,a);Et(_,o);let T=St((e,t)=>{let r=oe(),i=Ee(e),a=De(e);if(a){let e=!1;return r.state===`active`&&(e=r.hitRegions.some(e=>e.group===i)),{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),E=wt({defaultLayout:n,disableCursor:r}),D=(0,v.useMemo)(()=>({get disableCursor(){return!!E.disableCursor},getPanelStyles:T,id:_,orientation:u,registerPanel:e=>{let t=C.current;return t.panels=M(u,[...t.panels,e]),S(),()=>{t.panels=t.panels.filter(t=>t!==e),S()}},registerSeparator:e=>{let t=C.current;return t.separators=M(u,[...t.separators,e]),S(),()=>{t.separators=t.separators.filter(t=>t!==e),S()}},updatePanelProps:(e,{disabled:t})=>{let n=C.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Ee(_),i=De(_);r&&i&&Ae(r,{...i,derivedPanelConstraints:A(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=C.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[T,_,S,u,E]),O=(0,v.useRef)(null);return xt(()=>{let e=y.current;if(e===null)return;let t=C.current,n;if(E.defaultLayout!==void 0&&Object.keys(E.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=E.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!E.disableCursor,expandedPanelSizes:C.current.lastExpandedPanelSizes,layouts:C.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};O.current=r;let a=vt(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=De(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=ke(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=qe(t.collapsedSize,i[t.panelId]),a=qe(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=oe().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{O.current=null,a(),l()}},[i,_,g,h,u,b,E]),(0,v.useEffect)(()=>{let e=O.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,x.jsx)(Tt.Provider,{value:D,children:(0,x.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:w,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}Dt.displayName=`Group`;function Ot(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function kt({id:e,panelIds:t,storage:n}){let r=Ot(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function At({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...i}){let a=n!==void 0,o=`id`in i?i.id:i.groupId,s=Ot(o,n??[]),c=(0,v.useSyncExternalStore)(jt,()=>r.getItem(s),()=>r.getItem(s)),l=(0,v.useMemo)(()=>{if(c){let e=JSON.parse(c),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[c]),u=(0,v.useMemo)(()=>{if(!l)return kt({id:o,panelIds:n,storage:r})},[l,o,n,r]),d=l??u,f=(0,v.useRef)(null),p=(0,v.useCallback)(()=>{let e=f.current;e&&(f.current=null,clearTimeout(e))},[]);(0,v.useLayoutEffect)(()=>()=>{p()},[p]);let m=(0,v.useCallback)((e,n)=>{if(t&&!n.isUserInteraction)return;p();let i;i=a?Ot(o,Object.keys(e)):Ot(o,[]);try{r.setItem(i,JSON.stringify(e))}catch(e){console.error(e)}},[p,a,o,t,r]);return{defaultLayout:d,onLayoutChange:(0,v.useCallback)(t=>{p(),e===0?m(t,{isUserInteraction:!1}):f.current=setTimeout(()=>{m(t,{isUserInteraction:!1})},e)},[p,e,m]),onLayoutChanged:m}}function jt(){return function(){}}function Mt(){let e=(0,v.useContext)(Tt);return j(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Nt(e,t){let{id:n}=Mt(),r=(0,v.useRef)({collapse:de,expand:de,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:de});(0,v.useImperativeHandle)(t,()=>r.current,[]),xt(()=>{Object.assign(r.current,$e({groupId:n,panelId:e}))})}function Pt({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=bt(c),_=wt({disabled:a}),y=(0,v.useRef)(null),b=Ct(y,o),{getPanelStyles:S,id:C,orientation:w,registerPanel:T,updatePanelProps:E}=Mt(),D=d!==null,O=St((e,t,n)=>{d?.(e,c,n)});xt(()=>{let e=y.current;if(e!==null){let t={element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:D?O:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}};return T(t)}},[s,n,r,i,D,g,h,l,u,O,T,_]),(0,v.useEffect)(()=>{E(g,{disabled:a})},[a,g,E]),Nt(g,f);let k=()=>{let e=S(C,g);if(e)return JSON.stringify(e)},A=(0,v.useSyncExternalStore)(e=>ke(C,e),k,k),j;return j=A?JSON.parse(A):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,x.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:b,style:{...Ft,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...j},children:(0,x.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:w===`horizontal`?`pan-y`:`pan-x`},children:e})})}Pt.displayName=`Panel`;var Ft={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function It({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=Qe({layout:Xe({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=Qe({layout:Xe({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function Lt({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=bt(a),l=wt({disabled:n,disableDoubleClick:r}),[u,d]=(0,v.useState)({}),[f,p]=(0,v.useState)(`inactive`),[m,h]=(0,v.useState)(!1),g=(0,v.useRef)(null),_=Ct(g,i),{disableCursor:y,id:b,orientation:S,registerSeparator:C,updateSeparatorProps:w}=Mt(),T=S===`horizontal`?`vertical`:`horizontal`;xt(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=C(t),r=se(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=ke(b,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(It({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[b,c,C,l]),(0,v.useEffect)(()=>{w(c,{disabled:n,disableDoubleClick:r})},[n,r,c,w]);let E;n&&!y&&(E=`not-allowed`);let D;if(n)D=`disabled`;else switch(f){case`active`:D=`active`;break;default:D=m?`focus`:f}return(0,x.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":T,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":D,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:E,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}Lt.displayName=`Separator`;function Rt(e){return String(e).padStart(2,`0`)}function zt(e){return e.replace(`-`,` `)}function Bt(e){return e.slice(0,7)}function Vt(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function Ht(e){return Wt(e,!0)}function Ut(e){return`groups/${encodeURIComponent(e)}.md`}function Wt(e,t){let n=e=>t?Gt(e):e;switch(e.kind){case`review`:return`api/review.json`;case`agent-md`:return Kt(e);case`hunks`:return`api/hunks/${encodeURIComponent(e.group)}.json`;case`file`:return`api/files/${e.side}/${n(e.path)}.json`;case`blame`:return`api/blame/${e.side}/${n(e.path)}.json`;case`image`:return`api/images/${e.side}/${n(e.path)}`;case`patch`:return`api/patches/${n(e.path)}.json`}}function Gt(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function Kt(e){return e.target===`overview`?`api/agent/overview.md`:`api/agent/${Ut(e.group)}`}function qt(e){return new URL(Ht(e),new URL(`./`,document.baseURI)).href}async function Jt(e){let t=qt(e),n=await fetch(t),r=await n.text();if(!n.ok){let e=r;try{let t=JSON.parse(r);en(t)&&typeof t.error==`string`&&(e=t.error)}catch{}throw Error(e)}return JSON.parse(r)}function Yt(){return Jt({kind:`review`})}function Xt(e){return Jt({kind:`hunks`,group:e})}function Zt(e){return Jt({kind:`patch`,path:e})}function Qt(e,t){return Jt({kind:`file`,path:e,side:t})}function $t(e,t){return Jt({kind:`blame`,path:e,side:t})}function en(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var tn={unassigned:`unassigned`,lockfiles:`lockfiles`},nn=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),rn=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),an=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),on=e=>{let t=an(e);return t.charAt(0).toUpperCase()+t.slice(1)},sn={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`},cn=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ln=(0,v.createContext)({}),un=()=>(0,v.useContext)(ln),dn=(0,v.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=un()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,v.createElement)(`svg`,{ref:c,...sn,width:t??l??sn.width,height:t??l??sn.height,stroke:e??f,strokeWidth:m,className:nn(`lucide`,p,i),...!a&&!cn(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),fn=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)(dn,{ref:i,iconNode:t,className:nn(`lucide-${rn(on(e))}`,`lucide-${e}`,n),...r}));return n.displayName=on(e),n},pn=fn(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),mn=fn(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),hn=fn(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),gn=fn(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_n=fn(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),vn=fn(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),yn=fn(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),bn=fn(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),xn=fn(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Sn=fn(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),Cn=fn(`grip-vertical`,[[`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`}]]),wn=fn(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Tn=fn(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),En=fn(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Dn=fn(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),On=fn(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),kn=fn(`sparkle`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}]]),An=fn(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),jn=fn(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),Mn=fn(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);async function Nn(e){try{await navigator.clipboard.writeText(e)}catch{Pn(e)}}function Pn(e){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-9999px`,document.body.append(t),t.select();let n=document.execCommand(`copy`);if(t.remove(),!n)throw Error(`copy failed`)}var Fn=/^[0-9a-f]{7,40}$/i;function In(e){return Fn.test(e)}function Ln(e,t){let n=!In(e)&&e!==t;return{display:n?e:Bt(t),copy:t,tooltip:n?`${e} · ${t}`:t}}var Rn={review:`Reading the review.`,group:`Reading git.`,file:`Reading this file.`,blame:`Reading blame.`,lockfile:`Reading the lockfile.`};function zn(e,t,n=180){return e&&t>=n}var Bn=Object.defineProperty,Vn=(e,t)=>Bn(e,`name`,{value:t,configurable:!0});function Hn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Vn(Hn,`setRef`);function Un(...e){return t=>{let n=!1,r=e.map(e=>{let r=Hn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Hn(e[t],null)}}}}Vn(Un,`composeRefs`);function Wn(...e){return v.useCallback(Un(...e),e)}Vn(Wn,`useComposedRefs`);var Gn=Object.defineProperty,Kn=(e,t)=>Gn(e,`name`,{value:t,configurable:!0});function qn(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];nr(r)&&typeof or==`function`&&(r=or(r._payload)),v.Children.forEach(r,e=>{if(er(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;nr(n)&&typeof or==`function`&&(n=or(n._payload)),a=Zn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v.cloneElement(a,void 0,s):!o&&v.Children.count(r)===1&&v.isValidElement(r)&&(a=r);let c=a?$n(a):void 0,l=Wn(n,c);if(!a){if(r||r===0)throw Error(o?ar(e):ir(e));return r}let u=Qn(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Kn(qn,`createSlot`);var Jn=qn(`Slot`),Yn=Symbol.for(`radix.slottable`);function Xn(e){let t=Kn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Yn,t}Kn(Xn,`createSlottable`);var Zn=Kn((e,t)=>{if(`child`in e.props){let t=e.props.child;return v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null}return v.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Qn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Kn(Qn,`mergeProps`);function $n(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)}Kn($n,`getElementRef`);function er(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Yn}Kn(er,`isSlottable`);var tr=Symbol.for(`react.lazy`);function nr(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===tr&&`_payload`in e&&rr(e._payload)}Kn(nr,`isLazyComponent`);function rr(e){return typeof e==`object`&&!!e&&`then`in e}Kn(rr,`isPromiseLike`);var ir=Kn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ar=Kn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),or=v.use;function sr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=sr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function cr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sr(e))&&(r&&(r+=` `),r+=t);return r}var lr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ur=cr,dr=(e,t)=>n=>{if(t?.variants==null)return ur(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=lr(t)||lr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return ur(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},fr=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pr=(e,t)=>({classGroupId:e,validator:t}),mr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hr=`-`,gr=[],_r=`arbitrary..`,vr=e=>{let t=xr(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return br(e);let n=e.split(hr);return yr(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fr(i,t):t:i||gr}return n[e]||gr}}},yr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yr(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hr):e.slice(t).join(hr),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},br=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_r+r:void 0})(),xr=e=>{let{theme:t,classGroups:n}=e;return Sr(n,t)},Sr=(e,t)=>{let n=mr();for(let r in e){let i=e[r];Cr(i,n,r,t)}return n},Cr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wr(i,t,n,r)}},wr=(e,t,n,r)=>{if(typeof e==`string`){Tr(e,t,n);return}if(typeof e==`function`){Er(e,t,n,r);return}Dr(e,t,n,r)},Tr=(e,t,n)=>{let r=e===``?t:Or(t,e);r.classGroupId=n},Er=(e,t,n,r)=>{if(kr(e)){Cr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pr(n,e))},Dr=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cr(o,Or(t,a),n,r)}},Or=(e,t)=>{let n=e,r=t.split(hr),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mr(),n.nextPart.set(t,i)),n=i}return n},kr=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ar=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jr=`!`,Mr=`:`,Nr=[],Pr=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Mr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jr)?(c=s.slice(0,-1),l=!0):s.startsWith(jr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pr(t,l,c,u)};if(t){let e=t+Mr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pr(Nr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ir=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lr=e=>({cache:Ar(e.cacheSize),parseClassName:Fr(e),sortModifiers:Ir(e),postfixLookupClassGroupIds:Rr(e),...vr(e)}),Rr=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zr=/\s+/,Br=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zr),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jr:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vr=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hr(n))&&(i&&(i+=` `),i+=r);return i},Hr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hr(e[r]))&&(n&&(n+=` `),n+=t);return n},Ur=(e,...t)=>{let n,r,i,a,o=o=>(n=Lr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Br(e,n);return i(e,a),a};return a=o,(...e)=>a(Vr(...e))},Wr=[],Gr=e=>{let t=t=>t[e]||Wr;return t.isThemeGetter=!0,t},Kr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xr=/\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$/,Zr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$r=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=e=>Jr.test(e),R=e=>!!e&&!Number.isNaN(Number(e)),ti=e=>!!e&&Number.isInteger(Number(e)),ni=e=>e.endsWith(`%`)&&R(e.slice(0,-1)),ri=e=>Yr.test(e),ii=()=>!0,ai=e=>Xr.test(e)&&!Zr.test(e),oi=()=>!1,si=e=>Qr.test(e),ci=e=>$r.test(e),li=e=>!z(e)&&!B(e),ui=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)),di=e=>Ei(e,Ai,oi),z=e=>Kr.test(e),fi=e=>Ei(e,ji,ai),pi=e=>Ei(e,Mi,R),mi=e=>Ei(e,Ni,ii),hi=e=>Ei(e,V,oi),gi=e=>Ei(e,Oi,oi),_i=e=>Ei(e,ki,ci),vi=e=>Ei(e,Pi,si),B=e=>qr.test(e),yi=e=>Di(e,ji),bi=e=>Di(e,V),xi=e=>Di(e,Oi),Si=e=>Di(e,Ai),Ci=e=>Di(e,ki),wi=e=>Di(e,Pi,!0),Ti=e=>Di(e,Ni,!0),Ei=(e,t,n)=>{let r=Kr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Di=(e,t,n=!1)=>{let r=qr.exec(e);return r?r[1]?t(r[1]):n:!1},Oi=e=>e===`position`||e===`percentage`,ki=e=>e===`image`||e===`url`,Ai=e=>e===`length`||e===`size`||e===`bg-size`,ji=e=>e===`length`,Mi=e=>e===`number`,V=e=>e===`family-name`,Ni=e=>e===`number`||e===`weight`,Pi=e=>e===`shadow`,Fi=Ur(()=>{let e=Gr(`color`),t=Gr(`font`),n=Gr(`text`),r=Gr(`font-weight`),i=Gr(`tracking`),a=Gr(`leading`),o=Gr(`breakpoint`),s=Gr(`container`),c=Gr(`spacing`),l=Gr(`radius`),u=Gr(`shadow`),d=Gr(`inset-shadow`),f=Gr(`text-shadow`),p=Gr(`drop-shadow`),m=Gr(`blur`),h=Gr(`perspective`),g=Gr(`aspect`),_=Gr(`ease`),v=Gr(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),B,z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[B,z,c],T=()=>[ei,`full`,`auto`,...w()],E=()=>[ti,`none`,`subgrid`,B,z],D=()=>[`auto`,{span:[`full`,ti,B,z]},ti,B,z],O=()=>[ti,`auto`,B,z],k=()=>[`auto`,`min`,`max`,`fr`,B,z],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ei,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[ei,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[ei,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,B,z],F=()=>[...b(),xi,gi,{position:[B,z]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Si,di,{size:[B,z]}],ie=()=>[ni,yi,fi],I=()=>[``,`none`,`full`,l,B,z],L=()=>[``,R,yi,fi],ae=()=>[`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`],se=()=>[R,ni,xi,gi],ce=()=>[``,`none`,m,B,z],le=()=>[`none`,R,B,z],ue=()=>[`none`,R,B,z],de=()=>[R,B,z],fe=()=>[ei,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ri],breakpoint:[ri],color:[ii],container:[ri],"drop-shadow":[ri],ease:[`in`,`out`,`in-out`],font:[li],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ri],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ri],shadow:[ri],spacing:[`px`,R],text:[ri],"text-shadow":[ri],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ei,z,B,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,B,z]}],"container-named":[ui],columns:[{columns:[R,z,B,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ti,`auto`,B,z]}],basis:[{basis:[ei,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[R,ei,`auto`,`initial`,`none`,z]}],grow:[{grow:[``,R,B,z]}],shrink:[{shrink:[``,R,B,z]}],order:[{order:[ti,`first`,`last`,`none`,B,z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,yi,fi]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ti,mi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ni,z]}],"font-family":[{font:[bi,hi,t]}],"font-features":[{"font-features":[z]}],"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:[i,B,z]}],"line-clamp":[{"line-clamp":[R,`none`,B,pi]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,B,z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,B,z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[R,`from-font`,`auto`,B,fi]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[R,`auto`,B,z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ti,B,z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,B,z]}],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`,B,z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ti,B,z],radial:[``,B,z],conic:[ti,B,z]},Ci,_i]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[R,B,z]}],"outline-w":[{outline:[``,R,yi,fi]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,wi,vi]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,wi,vi]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[R,fi]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,wi,vi]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[R,B,z]}],"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":[R]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[B,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[R]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,B,z]}],filter:[{filter:[``,`none`,B,z]}],blur:[{blur:ce()}],brightness:[{brightness:[R,B,z]}],contrast:[{contrast:[R,B,z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,wi,vi]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,R,B,z]}],"hue-rotate":[{"hue-rotate":[R,B,z]}],invert:[{invert:[``,R,B,z]}],saturate:[{saturate:[R,B,z]}],sepia:[{sepia:[``,R,B,z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,B,z]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[R,B,z]}],"backdrop-contrast":[{"backdrop-contrast":[R,B,z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,R,B,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R,B,z]}],"backdrop-invert":[{"backdrop-invert":[``,R,B,z]}],"backdrop-opacity":[{"backdrop-opacity":[R,B,z]}],"backdrop-saturate":[{"backdrop-saturate":[R,B,z]}],"backdrop-sepia":[{"backdrop-sepia":[``,R,B,z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,B,z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[R,`initial`,B,z]}],ease:[{ease:[`linear`,`initial`,_,B,z]}],delay:[{delay:[R,B,z]}],animate:[{animate:[`none`,v,B,z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,B,z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[B,z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ti,B,z]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,B,z]}],"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":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,B,z]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[R,yi,fi,pi]}],stroke:[{stroke:[`none`,...P()]}],"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`]}});function H(...e){return Fi(cr(e))}var Ii=dr(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] 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 Li({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,x.jsx)(r?Jn:`button`,{"data-slot":`button`,className:H(Ii({variant:t,size:n}),e),...i})}var Ri=Object.defineProperty,zi=(e,t)=>Ri(e,`name`,{value:t,configurable:!0}),Bi=!!(typeof window<`u`&&window.document&&window.document.createElement);function Vi(e,t,{checkForDefaultPrevented:n=!0}={}){return zi(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}zi(Vi,`composeEventHandlers`);function Hi(e){if(!Bi)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}zi(Hi,`getOwnerWindow`);function Ui(e){if(!Bi)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}zi(Ui,`getOwnerDocument`);function Wi(e,t=!1){let{activeElement:n}=Ui(e);if(!n?.nodeName)return null;if(Gi(n)&&n.contentDocument)return Wi(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ui(n).getElementById(e);if(t)return t}}return n}zi(Wi,`getActiveElement`);function Gi(e){return e.tagName===`IFRAME`}zi(Gi,`isFrame`);var Ki=Object.defineProperty,qi=(e,t)=>Ki(e,`name`,{value:t,configurable:!0});function Ji(e,t){let n=v.createContext(t);n.displayName=e+`Context`;let r=qi(e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,x.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=v.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return qi(i,`useContext`),[r,i]}qi(Ji,`createContext`);function Yi(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=qi(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,x.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=v.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return qi(s,`useContext`),[o,s]}qi(r,`createContext`);let i=qi(()=>{let t=n.map(e=>v.createContext(e));return qi(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Xi(i,...t)]}qi(Yi,`createContextScope`);function Xi(...e){let t=e[0];if(e.length===1)return t;let n=qi(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return qi(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}qi(Xi,`composeContextScopes`);var Zi=l(h(),1),Qi=Object.defineProperty,$i=(e,t)=>Qi(e,`name`,{value:t,configurable:!0}),ea=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=qn(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,x.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ta(e,t){e&&Zi.flushSync(()=>e.dispatchEvent(t))}$i(ta,`dispatchDiscreteCustomEvent`);var na=Object.defineProperty,ra=(e,t)=>na(e,`name`,{value:t,configurable:!0});function ia(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}ra(ia,`useCallbackRef`);var aa=Object.defineProperty,oa=(e,t)=>aa(e,`name`,{value:t,configurable:!0}),sa=`dismissableLayer.update`,ca=`dismissableLayer.pointerDownOutside`,la=`dismissableLayer.focusOutside`,ua,da=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),fa=v.forwardRef(oa(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(da),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=Wn(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_?g.indexOf(_):-1,b=d?g.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=b>=y,w=v.useRef(!1),T=ha(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=ga(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),D=d?b===g.length-1:!1,O=ia(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(D)return p.addEventListener(`keydown`,O,{capture:!0}),()=>p.removeEventListener(`keydown`,O,{capture:!0})},[p,D,O]),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ua=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),_a(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=ua))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),_a())},[d,u]),v.useEffect(()=>{let e=oa(()=>m({}),`handleUpdate`);return document.addEventListener(sa,e),()=>document.removeEventListener(sa,e)},[]),(0,x.jsx)(ea.div,{...l,ref:h,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:Vi(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Vi(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Vi(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function pa(){let e=v.useContext(da),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}oa(pa,`useDismissableLayerSurface`);var ma=oa(()=>!0,`IS_TRUE`);function ha(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=ma}=t,s=ia(e),c=v.useRef(!1),l=v.useRef(!1),u=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}oa(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}oa(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}oa(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}oa(p,`handleInteractionBubble`);let m=oa(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||va(ca,s,p,{discrete:!0})};if(oa(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:oa(()=>c.current=!0,`onPointerDownCapture`)}}oa(ha,`usePointerDownOutside`);function ga(e,t=globalThis?.document){let n=ia(e),r=v.useRef(!1);return v.useEffect(()=>{let e=oa(e=>{e.target&&!r.current&&va(la,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:oa(()=>r.current=!0,`onFocusCapture`),onBlurCapture:oa(()=>r.current=!1,`onBlurCapture`)}}oa(ga,`useFocusOutside`);function _a(){let e=new CustomEvent(sa);document.dispatchEvent(e)}oa(_a,`dispatchUpdate`);function va(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ta(i,a):i.dispatchEvent(a)}oa(va,`handleAndDispatchCustomEvent`);var ya=globalThis?.document?v.useLayoutEffect:()=>{},ba=Object.defineProperty,xa=(e,t)=>ba(e,`name`,{value:t,configurable:!0}),Sa=v.useId||(()=>void 0),Ca=0;function wa(e){let[t,n]=v.useState(Sa());return ya(()=>{e||n(e=>e??String(Ca++))},[e]),e||(t?`radix-${t}`:``)}xa(wa,`useId`);var Ta=[`top`,`right`,`bottom`,`left`],Ea=Math.min,Da=Math.max,Oa=Math.round,ka=Math.floor,Aa=e=>({x:e,y:e}),ja={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ma(e,t,n){return Da(e,Ea(t,n))}function Na(e,t){return typeof e==`function`?e(t):e}function Pa(e){return e.split(`-`)[0]}function Fa(e){return e.split(`-`)[1]}function Ia(e){return e===`x`?`y`:`x`}function La(e){return e===`y`?`height`:`width`}function Ra(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function za(e){return Ia(Ra(e))}function Ba(e,t,n){n===void 0&&(n=!1);let r=Fa(e),i=za(e),a=La(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ya(o)),[o,Ya(o)]}function Va(e){let t=Ya(e);return[Ha(e),t,Ha(t)]}function Ha(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ua=[`left`,`right`],Wa=[`right`,`left`],Ga=[`top`,`bottom`],Ka=[`bottom`,`top`];function qa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Wa:Ua:t?Ua:Wa;case`left`:case`right`:return t?Ga:Ka;default:return[]}}function Ja(e,t,n,r){let i=Fa(e),a=qa(Pa(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ha)))),a}function Ya(e){let t=Pa(e);return ja[t]+e.slice(t.length)}function Xa(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Za(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Xa(e)}function Qa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $a(e,t,n){let{reference:r,floating:i}=e,a=Ra(t),o=za(t),s=La(o),c=Pa(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Fa(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function eo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Na(t,e),p=Za(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Qa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Qa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var to=50,no=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:eo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=$a(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<to&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=$a(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ro=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Na(e,t)||{};if(l==null)return{};let d=Za(u),f={x:n,y:r},p=za(i),m=La(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ea(d[_],T),D=Ea(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ma(E,k,O),j=!c.arrow&&Fa(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),io=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Na(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Pa(r),_=Ra(o),v=Pa(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ya(o)]:Va(o)),x=p!==`none`;!d&&x&&b.push(...Ja(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ba(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ra(t)||T.every(e=>Ra(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ra(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ao(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return Ta.some(t=>e[t]>=0)}var so=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Na(e,t);switch(i){case`referenceHidden`:{let e=ao(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oo(e)}}}case`escaped`:{let e=ao(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oo(e)}}}default:return{}}}}},co=new Set([`left`,`top`]);async function lo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Pa(n),s=Fa(n),c=Ra(n)===`y`,l=co.has(o)?-1:1,u=a&&c?-1:1,d=Na(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var U=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await lo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},uo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Na(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ra(i),p=Ia(f),m=u[p],h=u[f],g=(e,t)=>Ma(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},fo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Na(e,t),u={x:n,y:r},d=Ra(i),f=Ia(d),p=u[f],m=u[d],h=Na(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=co.has(Pa(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},po=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Na(e,t),c=await i.detectOverflow(t,s),l=Pa(n),u=Fa(n),d=Ra(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ea(p-c[m],g),y=Ea(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Da(c.left,c.right):S=p-2*Da(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function mo(){return typeof window<`u`}function ho(e){return vo(e)?(e.nodeName||``).toLowerCase():`#document`}function go(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _o(e){return((vo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function vo(e){return mo()?e instanceof Node||e instanceof go(e).Node:!1}function yo(e){return mo()?e instanceof Element||e instanceof go(e).Element:!1}function bo(e){return mo()?e instanceof HTMLElement||e instanceof go(e).HTMLElement:!1}function xo(e){return!mo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof go(e).ShadowRoot}function So(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=No(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Co(e){return/^(table|td|th)$/.test(ho(e))}function wo(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var To=/transform|translate|scale|rotate|perspective|filter/,Eo=/paint|layout|strict|content/,Do=e=>!!e&&e!==`none`,Oo;function ko(e){let t=yo(e)?No(e):e;return Do(t.transform)||Do(t.translate)||Do(t.scale)||Do(t.rotate)||Do(t.perspective)||!jo()&&(Do(t.backdropFilter)||Do(t.filter))||To.test(t.willChange||``)||Eo.test(t.contain||``)}function Ao(e){let t=Fo(e);for(;bo(t)&&!Mo(t);){if(ko(t))return t;if(wo(t))return null;t=Fo(t)}return null}function jo(){return Oo??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Oo}function Mo(e){return/^(html|body|#document)$/.test(ho(e))}function No(e){return go(e).getComputedStyle(e)}function Po(e){return yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fo(e){if(ho(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||xo(e)&&e.host||_o(e);return xo(t)?t.host:t}function Io(e){let t=Fo(e);return Mo(t)?(e.ownerDocument||e).body:bo(t)&&So(t)?t:Io(t)}function Lo(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Io(e),i=r===e.ownerDocument?.body,a=go(r);if(i){let e=Ro(a);return t.concat(a,a.visualViewport||[],So(r)?r:[],e&&n?Lo(e):[])}return t.concat(r,Lo(r,[],n))}function Ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zo(e){let t=No(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=bo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Oa(n)!==a||Oa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Bo(e){return yo(e)?e:e.contextElement}function Vo(e){let t=Bo(e);if(!bo(t))return Aa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=zo(t),o=(a?Oa(n.width):n.width)/r,s=(a?Oa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ho=Aa(0);function Uo(e){let t=go(e);return!jo()||!t.visualViewport?Ho:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wo(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===go(e)}function Go(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Bo(e),o=Aa(1);t&&(r?yo(r)&&(o=Vo(r)):o=Vo(e));let s=Wo(a,n,r)?Uo(a):Aa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=go(a),t=yo(r)?go(r):r,n=e,i=Ro(n);for(;i&&t!==n;){let e=Vo(i),t=i.getBoundingClientRect(),r=No(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=go(i),i=Ro(n)}}return Qa({width:u,height:d,x:c,y:l})}function Ko(e,t){let n=Po(e).scrollLeft;return t?t.left+n:Go(_o(e)).left+n}function qo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ko(e,n),y:n.top+t.scrollTop}}function Jo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=_o(r),s=t?wo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Aa(1),u=Aa(0),d=bo(r);if((d||!a)&&((ho(r)!==`body`||So(o))&&(c=Po(r)),d)){let e=Go(r);l=Vo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?qo(o,c):Aa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Yo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Xo(e){let t=Po(e),n=e.ownerDocument.body,r=Da(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Da(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ko(e),o=-t.scrollTop;return No(n).direction===`rtl`&&(a+=Da(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Zo=25;function Qo(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=go(e),a=_o(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!jo()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ko(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Zo&&(s-=o)}return{width:s,height:c,x:l,y:u}}function $o(e,t){let n=Go(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Vo(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function es(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Qo(e,n,t);else if(t===`document`)r=Xo(_o(e));else if(yo(t))r=$o(t,n);else{let n=Uo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qa(r)}function ts(e,t){let n=t.get(e);if(n)return n;let r=Lo(e,[],!1).filter(e=>yo(e)&&ho(e)!==`body`),i=null,a=No(e).position===`fixed`,o=a?Fo(e):e;for(;yo(o)&&!Mo(o);){let e=No(o),t=ko(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Fo(o)}return t.set(e,r),r}function ns(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?wo(t)?[]:ts(t,this._c):[].concat(n),r],o=es(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=es(t,a[e],i);s=Da(n.top,s),c=Ea(n.right,c),l=Ea(n.bottom,l),u=Da(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function rs(e){let{width:t,height:n}=zo(e);return{width:t,height:n}}function is(e,t,n){let r=bo(t),i=_o(t),a=n===`fixed`,o=Go(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Aa(0);if((r||!a)&&((ho(t)!==`body`||So(i))&&(s=Po(t)),r)){let e=Go(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ko(i));let l=i&&!r&&!a?qo(i,s):Aa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function as(e){return No(e).position===`static`}function os(e,t){if(!bo(e)||No(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return _o(e)===n&&(n=n.ownerDocument.body),n}function ss(e,t){let n=go(e);if(wo(e))return n;if(!bo(e)){let t=Fo(e);for(;t&&!Mo(t);){if(yo(t)&&!as(t))return t;t=Fo(t)}return n}let r=os(e,t);for(;r&&Co(r)&&as(r);)r=os(r,t);return r&&Mo(r)&&as(r)&&!ko(r)?n:r||Ao(e)||n}var cs=async function(e){let t=this.getOffsetParent||ss,n=this.getDimensions,r=await n(e.floating);return{reference:is(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ls(e){return No(e).direction===`rtl`}var us={convertOffsetParentRelativeRectToViewportRelativeRect:Jo,getDocumentElement:_o,getClippingRect:ns,getOffsetParent:ss,getElementRects:cs,getClientRects:Yo,getDimensions:rs,getScale:Vo,isElement:yo,isRTL:ls};function ds(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fs(e,t,n){let r=null,i,a=_o(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ka(d),h=ka(a.clientWidth-(u+f)),g=ka(a.clientHeight-(d+p)),_=ka(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Da(0,Ea(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ds(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=go(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ps(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Bo(e),u=i||a?[...l?Lo(l):[],...t?Lo(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?fs(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Go(e):null;c&&g();function g(){let t=Go(e);h&&!ds(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ms=U,hs=uo,gs=io,_s=po,vs=so,ys=ro,bs=fo,xs=(e,t,n)=>{let r=new Map,i=n??{},a={...us,...i.platform,_c:r};return no(e,t,{...i,platform:a})},Ss=typeof document<`u`?v.useLayoutEffect:function(){};function Cs(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,i;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(!Cs(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Cs(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ws(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ts(e,t){let n=ws(e);return Math.round(t*n)/n}function Es(e){let t=v.useRef(e);return Ss(()=>{t.current=e}),t}function Ds(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Cs(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Es(c),O=Es(i),k=Es(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),xs(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Cs(T.current,t)&&(T.current=t,Zi.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Ss(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Ss(()=>(j.current=!0,()=>{j.current=!1}),[]),Ss(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Ts(N.floating,u.x),r=Ts(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ws(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var Os=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ys({element:r.current,padding:i}).fn(n):r?ys({element:r,padding:i}).fn(n):{}}}},ks=(e,t)=>{let n=ms(e);return{name:n.name,fn:n.fn,options:[e,t]}},As=(e,t)=>{let n=hs(e);return{name:n.name,fn:n.fn,options:[e,t]}},js=(e,t)=>({fn:bs(e).fn,options:[e,t]}),Ms=(e,t)=>{let n=gs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ns=(e,t)=>{let n=_s(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ps=(e,t)=>{let n=vs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fs=(e,t)=>{let n=Os(e);return{name:n.name,fn:n.fn,options:[e,t]}},Is=Object.defineProperty,Ls=(e,t)=>Is(e,`name`,{value:t,configurable:!0});function Rs(e){let[t,n]=v.useState(void 0);return ya(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Ls(Rs,`useSize`);var zs=Object.defineProperty,Bs=(e,t)=>zs(e,`name`,{value:t,configurable:!0}),Vs=`Popper`,[Hs,Us]=Yi(Vs),[Ws,Gs]=Hs(Vs),Ks=Bs(e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,x.jsx)(Ws,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),qs=`PopperAnchor`,Js=v.forwardRef(Bs(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Gs(qs,n),o=v.useRef(null),s=a.onAnchorChange,c=Wn(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&tc(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,x.jsx)(ea.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Ys=`PopperContent`,[Xs,Zs]=Hs(Ys),Qs=v.forwardRef(Bs(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Gs(Ys,n),[_,y]=v.useState(null),b=Wn(t,y),[S,C]=v.useState(null),w=Rs(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter($s),altBoundary:A},{refs:M,floatingStyles:N,placement:ee,isPositioned:te,middlewareData:P}=Ds({strategy:`fixed`,placement:D,whileElementsMounted:Bs((...e)=>ps(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[ks({mainAxis:i+E,alignmentAxis:o}),c&&As({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?js():void 0,...j}),c&&Ms({...j}),Ns({...j,apply:Bs(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Fs({element:S,padding:s}),ec({arrowWidth:T,arrowHeight:E}),f&&Ps({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),F=g.setPlacementState;ya(()=>(F(ee),()=>{F(void 0)}),[ee,F]);let[ne,re]=tc(ee),ie=ia(m);ya(()=>{te&&ie?.()},[te,ie]);let I=P.arrow?.x,L=P.arrow?.y,ae=P.arrow?.centerOffset!==0,[oe,se]=v.useState();return ya(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,x.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:te?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,x.jsx)(Xs,{scope:n,placedSide:ne,placedAlign:re,onArrowChange:C,arrowX:I,arrowY:L,shouldHideArrow:ae,children:(0,x.jsx)(ea.div,{"data-side":ne,"data-align":re,...h,ref:b,style:{...h.style,animation:te?h.style?.animation:`none`}})})})},`PopperContent`));function $s(e){return e!==null}Bs($s,`isNotNull`);var ec=Bs(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=tc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function tc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Bs(tc,`getSideAndAlignFromPlacement`);var nc=Ks,rc=Js,ic=Qs,ac=Object.defineProperty,oc=v.forwardRef(((e,t)=>ac(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=v.useState(!1);ya(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Zi.createPortal((0,x.jsx)(ea.div,{...r,ref:t}),o):null},`Portal`)),sc=Object.defineProperty,cc=(e,t)=>sc(e,`name`,{value:t,configurable:!0});function lc(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}cc(lc,`useStateMachine`);var uc=cc(e=>{let{present:t,children:n}=e,r=dc(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=pc(r.ref,hc(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null},`Presence`);function dc(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),o=v.useRef(void 0),[s,c]=lc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{s===`mounted`?(a.current=o.current??mc(r.current),o.current=void 0):a.current=`none`},[s]),ya(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=mc(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),ya(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=cc(a=>{let o=mc(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=cc(e=>{e.target===t&&(a.current=mc(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=mc(t)}else r.current=null;n(e)},[])}}cc(dc,`usePresence`);function fc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}cc(fc,`setRef`);function pc(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=fc(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():fc(n[e],null)}}},[])}cc(pc,`useStableComposedRefs`);function mc(e){return e?.animationName||`none`}cc(mc,`getAnimationName`);function hc(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)}cc(hc,`getElementRef`);var gc=Object.defineProperty,_c=(e,t)=>gc(e,`name`,{value:t,configurable:!0}),vc=v.useEffectEvent,yc=v.useInsertionEffect;function bc(e){if(typeof vc==`function`)return vc(e);let t=v.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof yc==`function`?yc(()=>{t.current=e}):ya(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}_c(bc,`useEffectEvent`);var xc=Object.defineProperty,Sc=(e,t)=>xc(e,`name`,{value:t,configurable:!0}),Cc=v.useInsertionEffect||ya;function wc({prop:e,defaultProp:t,onChange:n=Sc(()=>{},`onChange`),caller:r}){let[i,a,o]=Tc({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,v.useCallback(t=>{if(s){let n=Ec(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Sc(wc,`useControllableState`);function Tc({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return Cc(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Sc(Tc,`useUncontrolledState`);function Ec(e){return typeof e==`function`}Sc(Ec,`isFunction`);var Dc=Symbol(`RADIX:SYNC_STATE`);function Oc(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=bc(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===Dc)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=v.useRef(p);v.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=v.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return v.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Dc,state:i})},[i,d.state,c]),[h,f]}Sc(Oc,`useControllableStateReducer`);var kc=Object.defineProperty,Ac=(e,t)=>kc(e,`name`,{value:t,configurable:!0}),jc=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`}),Mc=v.forwardRef(Ac(function(e,t){return(0,x.jsx)(ea.span,{...e,ref:t,style:{...jc,...e.style}})},`VisuallyHidden`)),Nc=Object.defineProperty,Pc=(e,t)=>Nc(e,`name`,{value:t,configurable:!0}),[Fc,Ic]=Yi(`Tooltip`,[Us]),Lc=Us(),Rc=`TooltipProvider`,zc=700,Bc=`tooltip.open`,[Vc,Hc]=Fc(Rc),Uc=Pc(e=>{let{__scopeTooltip:t,delayDuration:n=zc,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=v.useRef(!0),s=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(Vc,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:v.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Wc=`Tooltip`,[Gc,Kc]=Fc(Wc),qc=Pc(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Hc(Wc,e.__scopeTooltip),l=Lc(t),[u,d]=v.useState(null),[f,p]=v.useState(void 0),m=wa(),h=v.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,y=v.useRef(!1),[b,S]=wc({prop:r,defaultProp:i??!1,onChange:Pc(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Bc))):c.onClose(),a?.(e)},`onChange`),caller:Wc}),C=v.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),w=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,S(!0)},[S]),T=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,S(!1)},[S]),E=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,S(!0),h.current=0},_)},[_,S]);v.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let D=f??m;return(0,x.jsx)(nc,{...l,children:(0,x.jsx)(Gc,{scope:t,contentId:D,setContentId:p,open:b,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:v.useCallback(()=>{g?T():(window.clearTimeout(h.current),h.current=0)},[T,g]),onOpen:w,onClose:T,disableHoverableContent:g,children:n})})},`Tooltip`),Jc=`TooltipTrigger`,Yc=v.forwardRef(Pc(function(e,t){let{__scopeTooltip:n,...r}=e,i=Kc(Jc,n),a=Hc(Jc,n),o=Lc(n),s=Wn(t,v.useRef(null),i.onTriggerChange),c=v.useRef(!1),l=v.useRef(!1),u=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,x.jsx)(rc,{asChild:!0,...o,children:(0,x.jsx)(ea.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Vi(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:Vi(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:Vi(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:Vi(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Vi(e.onBlur,i.onClose),onClick:Vi(e.onClick,i.onClose)})})},`TooltipTrigger`)),Xc=`TooltipPortal`,[Zc,Qc]=Fc(Xc,{forceMount:void 0}),$c=Pc(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Kc(Xc,t);return(0,x.jsx)(Zc,{scope:t,forceMount:n,children:(0,x.jsx)(uc,{present:n||a.open,children:(0,x.jsx)(oc,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),el=`TooltipContent`,tl=v.forwardRef(Pc(function(e,t){let n=Qc(el,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Kc(el,e.__scopeTooltip);return(0,x.jsx)(uc,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(il,{side:i,...a,ref:t}):(0,x.jsx)(nl,{side:i,...a,ref:t})})},`TooltipContent`)),nl=v.forwardRef(Pc(function(e,t){let n=Kc(el,e.__scopeTooltip),r=Hc(el,e.__scopeTooltip),i=v.useRef(null),a=Wn(t,i),[o,s]=v.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ol(r,al(r,n.getBoundingClientRect())),a=sl(t.getBoundingClientRect()),o=ll([...i,...a]);s(o),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&u){let e=Pc(e=>p(e,u),`handleTriggerLeave`),t=Pc(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),v.useEffect(()=>{if(o){let e=Pc(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!cl(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,x.jsx)(il,{...e,ref:a})},`TooltipContentHoverable`)),rl=Xn(`TooltipContent`),il=v.forwardRef(Pc(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Kc(el,n),u=Lc(n),{onClose:d}=l;v.useEffect(()=>(document.addEventListener(Bc,d),()=>document.removeEventListener(Bc,d)),[d]),v.useEffect(()=>{if(l.trigger){let e=Pc(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return ya(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,x.jsx)(fa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,x.jsxs)(ic,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,x.jsx)(rl,{children:r}),i?(0,x.jsx)(Mc,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function al(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Pc(al,`getExitSideFromRect`);function ol(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Pc(ol,`getPaddedExitPoints`);function sl(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Pc(sl,`getPointsFromRect`);function cl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Pc(cl,`isPointInPolygon`);function ll(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),ul(t)}Pc(ll,`getHull`);function ul(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Pc(ul,`getHullPresorted`);var dl=Uc,fl=qc,pl=Yc,ml=$c,hl=tl;function gl({delayDuration:e=400,...t}){return(0,x.jsx)(dl,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function _l({...e}){return(0,x.jsx)(fl,{"data-slot":`tooltip`,...e})}function vl({...e}){return(0,x.jsx)(pl,{"data-slot":`tooltip-trigger`,...e})}function yl({className:e,sideOffset:t=6,children:n,...r}){return(0,x.jsx)(ml,{children:(0,x.jsx)(hl,{"data-slot":`tooltip-content`,sideOffset:t,className:H(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background duration-150 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:animate-in data-[state=instant-open]:fade-in-0`,e),...r,children:n})})}function bl(e,t){try{return e.getItem(t)}catch{return null}}function xl(e,t,n){try{e.setItem(t,n)}catch{}}function Sl(e,t){try{e.removeItem(t)}catch{}}var Cl=`comprehende.theme`,wl={dark:`github-dark`,light:`github-light`};function Tl(e){return e===`light`||e===`dark`||e===`auto`?e:`auto`}function El(e,t){return e===`auto`?t?`dark`:`light`:e}function Dl(e){document.documentElement.classList.toggle(`dark`,e===`dark`),document.documentElement.style.colorScheme=e}function Ol(){return Tl(bl(localStorage,Cl))}function kl(e){xl(localStorage,Cl,e)}function Al(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches}var jl=(0,v.createContext)(null);function Ml(e){let[t,n]=(0,v.useState)(Ol),[r,i]=(0,v.useState)(Al),a=El(t,r),o=(0,v.useCallback)(e=>{kl(e),n(e)},[]),s=(0,v.useCallback)(()=>{o(t===`auto`?`light`:t===`light`?`dark`:`auto`)},[t,o]);(0,v.useEffect)(()=>{Dl(a)},[a]),(0,v.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>i(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let c=(0,v.useMemo)(()=>({preference:t,resolved:a,setPreference:o,toggleTheme:s}),[t,a,o,s]);return(0,x.jsx)(jl.Provider,{value:c,children:e.children})}function Nl(){let e=(0,v.useContext)(jl);if(e===null)throw Error(`useTheme must be used within ThemeProvider`);return e}function Pl(e){let t=new Map(e.map((e,t)=>[e.id,{group:e,index:t}]));if(!e.some(e=>e.part!==void 0))return[{colorIndex:0,groupIds:Vl(e.map(e=>e.id),t)}];let n=new Map;for(let t of e){let e=t.part??`\0${t.id}`,r=n.get(e)??[];r.push(t.id),n.set(e,r)}let r=[...n.entries()].map(([e,n])=>{let r=Vl(n,t);return{title:e.startsWith(`\0`)?void 0:e,groupIds:r,minOrder:Math.min(...n.map(e=>{let n=t.get(e);return Bl(n?.group,n?.index??0)})),sortKey:r[0]??``}});return r.sort((e,t)=>e.minOrder-t.minOrder||(e.title??e.sortKey).localeCompare(t.title??t.sortKey)),r.map((e,t)=>({colorIndex:t%6,groupIds:e.groupIds,...e.title===void 0?{}:{title:e.title}}))}function Fl(e,t){let n=0;for(let r of e)for(let e of r.groupIds)if(n+=1,e===t)return n;return 0}function Il(e,t,n){let r=new Map(e.map(e=>[e.id,e])),i=(e,t)=>{if(t.has(e))return 0;let a=(r.get(e)?.dependsOn??[]).filter(e=>n.has(e));if(a.length===0)return 0;let o=new Set(t);return o.add(e),1+Math.max(0,...a.map(e=>i(e,o)))};return i(t,new Set)}function Ll(e){let t=new Map;for(let n of e)for(let e of n.groupIds)t.set(e,n.colorIndex);return t}function Rl(e){return`var(--strand-${e%6})`}function zl(e){return e.length>1}function Bl(e,t){return e?.suggestedOrder??t}function Vl(e,t){let n=new Set(e),r=new Set(e),i=new Map;for(let r of e){let e=(t.get(r)?.group.dependsOn??[]).filter(e=>n.has(e));i.set(r,e.length)}let a=[],o=(e,n)=>{let r=t.get(e),i=t.get(n);return Bl(r?.group,r?.index??0)-Bl(i?.group,i?.index??0)||e.localeCompare(n)};for(;r.size>0;){let e=[...r].filter(e=>(i.get(e)??0)===0).sort(o)[0];if(e===void 0){a.push(...[...r].sort(o));break}a.push(e),r.delete(e);for(let n of r)(t.get(n)?.group.dependsOn??[]).includes(e)&&i.set(n,Math.max(0,(i.get(n)??1)-1))}return a}function Hl(e){return e.groups.length>0?{kind:`overview`}:{kind:tn.unassigned}}var W=`group/`;function G(e){let t=(e.startsWith(`#`)?e.slice(1):e).replace(/^\/+/,``);if(t===``)return null;if(t===`overview`)return{kind:`overview`};if(t===tn.unassigned)return{kind:tn.unassigned};if(t===tn.lockfiles)return{kind:tn.lockfiles};if(!t.startsWith(W))return null;let n=t.slice(6);if(n===``)return null;try{let e=decodeURIComponent(n);return e===``?null:{kind:`group`,id:e}}catch{return null}}function Ul(e){return e.kind===`group`?`#${W}${encodeURIComponent(e.id)}`:e.kind===`overview`?`#overview`:`#${e.kind}`}function Wl(e,t){return ql(e,G(t))}function Gl(e,t){let n=new URL(e);return n.hash=Ul(t),n.href}function Kl(e,t,n,r){let i=G(t);if(i!==null&&$l(i,n))return`skip`;let a=i!==null&&$l(ql(e,i),i);return!r||!a?`replace`:`push`}function ql(e,t){return t===null||t.kind===`group`&&!e.groups.some(e=>e.id===t.id)||t.kind===tn.unassigned&&e.unassigned.hunkCount===0&&e.groups.length>0||t.kind===tn.lockfiles&&(e.lockfiles?.fileCount??0)===0?Hl(e):t}function Jl(e,t,n){if(e===null||n===0)return;let r=Yl(e,t),i=r.findIndex(e=>$l(e,t));if(i>=0)return r[i+n];if(n<0)return r[r.length-1]}function Yl(e,t){return[{kind:`overview`},...(Xl(Pl(e.groups),t)?.groupIds??[]).map(e=>({kind:`group`,id:e}))]}function Xl(e,t){return t?.kind===`group`?e.find(e=>e.groupIds.includes(t.id))??e[0]:t?.kind===tn.unassigned||t?.kind===tn.lockfiles?e[e.length-1]:e[0]}function Zl(e,t,n,r){let i=Jl(e,t,r);i!==void 0&&n(i)}function Ql(e,t,n,r){if(e===null||t===null||t.kind===tn.unassigned||t.kind===tn.lockfiles)return;let i=Pl(e.groups);if(!zl(i))return;let a=t.kind===`group`?i.findIndex(e=>e.groupIds.includes(t.id)):r>0?-1:i.length;if(t.kind===`group`&&a<0)return;let o=i[(a+r+i.length)%i.length]?.groupIds[0];o!==void 0&&(t.kind!==`group`||o!==t.id)&&n({kind:`group`,id:o})}function $l(e,t){return t===null?!1:e.kind===`overview`?t.kind===`overview`:e.kind===tn.unassigned?t.kind===tn.unassigned:e.kind===tn.lockfiles?t.kind===tn.lockfiles:e.kind===`group`&&t.kind===`group`&&t.id===e.id}function eu(e,t){let n=tu(e,t);return n.index===void 0?n.title:`${n.index} ${n.title}`}function tu(e,t){if(t===null||t.kind===`overview`)return{title:`Overview`};if(t.kind===`group`){let n=Fl(Pl(e.groups),t.id),r=e.groups.find(e=>e.id===t.id);return{index:n>0?Rt(n):void 0,title:r?.title??`Group`}}return t.kind===tn.unassigned?{title:`Unassigned`}:{title:`Lockfiles`}}function nu(e){if(e.meta.groups.length===0)return null;let t=Jl(e.meta,e.selection,-1),n=Jl(e.meta,e.selection,1);return(0,x.jsxs)(`nav`,{"aria-label":`Previous and next group`,className:e.className??`flex shrink-0 items-center gap-0.5`,children:[(0,x.jsx)(ru,{direction:`prev`,target:t,meta:e.meta,onSelect:e.onSelect}),(0,x.jsx)(ru,{direction:`next`,target:n,meta:e.meta,onSelect:e.onSelect})]})}function ru(e){let t=e.target===void 0,n=e.direction===`prev`?`Previous`:`Next`,r=e.direction===`prev`?`[`:`]`,i=e.target===void 0?void 0:eu(e.meta,e.target),a=i===void 0?`${n} ${r}`:`${n}: ${i} ${r}`,o=(0,x.jsx)(Li,{type:`button`,size:`icon-sm`,variant:`ghost`,disabled:t,"aria-label":a,"data-group-nav":e.direction,onClick:()=>{e.target!==void 0&&e.onSelect(e.target)},children:e.direction===`prev`?(0,x.jsx)(_n,{className:`size-3.5`}):(0,x.jsx)(vn,{className:`size-3.5`})});return t?o:(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:o}),(0,x.jsx)(yl,{children:a})]})}function iu(e){return(0,x.jsx)(`kbd`,{className:H(`font-mono text-[10px] font-normal text-muted-foreground`,e.className),children:e.children})}function au(e){return(0,x.jsxs)(`span`,{className:H(`shrink-0 font-display text-xl leading-none text-foreground`,e.className),children:[`Comprehende`,(0,x.jsx)(`span`,{className:`text-primary`,"aria-hidden":`true`,children:`?`})]})}function ou(e,t){let[n,r]=(0,v.useState)(t<=0?t:0);return(0,v.useEffect)(()=>{if(!e){r(0);return}if(t<=0){r(0);return}r(0);let n=window.setTimeout(()=>r(t),t);return()=>window.clearTimeout(n)},[e,t]),zn(e,n,t)}var su={walker:`_walker_1s58a_11`,"wait-walk":`_wait-walk_1s58a_1`};function cu(e){let t=e.layout??`well`;if(!ou(!0,e.delayMs??(t===`page`?0:180)))return null;let n=t===`inline`?`span`:`div`,r=t===`inline`;return(0,x.jsxs)(n,{className:H(`flex items-center gap-3`,t===`well`&&`px-3 py-5`,r&&`shrink-0 gap-0`,e.className),role:r?void 0:`status`,"aria-live":r?void 0:`polite`,children:[(0,x.jsxs)(`span`,{className:H(`flex shrink-0 gap-[0.28rem]`,r?`h-[1.1rem]`:`h-7`),"aria-hidden":!0,children:[(0,x.jsx)(lu,{kind:`del`,inline:r}),(0,x.jsx)(lu,{kind:`add`,inline:r})]}),r?(0,x.jsx)(`span`,{className:`sr-only`,children:e.label}):(0,x.jsx)(`p`,{className:`m-0 font-mono text-[11px] tracking-wide text-muted-foreground`,children:e.label})]})}function lu(e){return(0,x.jsx)(`span`,{className:H(`relative h-full overflow-hidden rounded-[1px]`,e.inline?`w-0.5`:`w-[3px]`,e.kind===`del`?`bg-del/38`:`bg-add/38`),children:(0,x.jsx)(`span`,{className:H(`absolute inset-x-0 top-[28%] h-[44%] rounded-[inherit]`,su.walker,e.kind===`del`?`bg-del`:`bg-add`)})})}function uu(e){let{meta:t,wrap:n,split:r,onWrap:i,onUnified:a,onSplit:o,onRefresh:s,busy:c=!1,comments:l,onComments:u}=e;return(0,x.jsxs)(`header`,{className:`flex flex-col gap-2 border-b border-border bg-card px-5 py-3 min-[800px]:flex-row min-[800px]:flex-wrap min-[800px]:items-center min-[800px]:justify-between`,children:[(0,x.jsxs)(`div`,{className:`flex min-w-0 items-center gap-4`,children:[(0,x.jsx)(au,{}),(0,x.jsx)(du,{resolved:t.resolved}),(0,x.jsx)(mu,{meta:t}),t.groups.length>0?(0,x.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,x.jsx)(nu,{meta:t,selection:e.selection,onSelect:e.onSelect}),(0,x.jsxs)(`span`,{className:`flex gap-0.5`,children:[(0,x.jsx)(iu,{children:`[`}),(0,x.jsx)(iu,{children:`]`})]})]}):null]}),(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 min-[800px]:justify-end`,children:[(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(Li,{size:`sm`,variant:n?`secondary`:`outline`,"aria-pressed":n,"aria-label":`Wrap lines`,onClick:i,children:[`Wrap`,(0,x.jsx)(iu,{className:`max-sm:hidden`,children:`w`})]})}),(0,x.jsx)(yl,{children:`Wrap long lines`})]}),u===void 0?null:(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(Li,{size:`sm`,variant:l===!0?`secondary`:`outline`,"aria-pressed":l===!0,"aria-label":`Show comments`,onClick:u,children:[`Comments`,(0,x.jsx)(iu,{className:`max-sm:hidden`,children:`c`})]})}),(0,x.jsx)(yl,{children:`Show comments on the diffs`})]}),(0,x.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,x.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-input`,children:[(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(Li,{size:`sm`,variant:r?`ghost`:`secondary`,className:`rounded-none border-0`,onClick:a,"aria-pressed":!r,children:`Unified`})}),(0,x.jsx)(yl,{children:`Unified diff`})]}),(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(Li,{size:`sm`,variant:r?`secondary`:`ghost`,className:`rounded-none border-0`,onClick:o,"aria-pressed":r,children:`Split`})}),(0,x.jsx)(yl,{children:`Side-by-side diff`})]})]}),(0,x.jsx)(iu,{className:`max-sm:hidden`,children:`s`})]}),(0,x.jsx)(pu,{}),c?(0,x.jsx)(cu,{layout:`inline`,label:Rn.review}):null,(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(Li,{size:`sm`,variant:`outline`,onClick:s,"aria-busy":c,children:[`Refresh`,(0,x.jsx)(iu,{className:`max-sm:hidden`,children:`r`})]})}),(0,x.jsx)(yl,{children:c?Rn.review:`Reload review`})]})]})]})}function du(e){let t=Ln(e.resolved.baseRef,e.resolved.baseSha),n=Ln(e.resolved.headRef,e.resolved.headSha);return(0,x.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-1.5 text-sm`,children:[(0,x.jsx)(fu,{...t}),(0,x.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`...`}),(0,x.jsx)(fu,{...n})]})}function fu(e){let[t,n]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!t)return;let e=window.setTimeout(()=>n(!1),1600);return()=>window.clearTimeout(e)},[t]),(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(`button`,{type:`button`,className:`max-w-[10rem] cursor-pointer truncate rounded-sm px-0.5 font-mono text-primary hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none`,"aria-label":`Copy ${e.copy}`,"aria-live":`polite`,onClick:()=>{n(!0),Nn(e.copy).catch(e=>{n(!1),console.error(e)})},children:t?`Copied`:e.display})}),(0,x.jsx)(yl,{className:`max-w-[min(24rem,calc(100vw-2rem))] font-mono`,children:e.tooltip})]})}function pu(e){let{preference:t,toggleTheme:n}=Nl(),r=t===`auto`?`light`:t===`light`?`dark`:`auto`,i=r===`auto`?`Use auto theme`:`Use ${r} theme`,a=r===`auto`?`Follow system`:`Use ${r} theme`,o=e.system??(0,x.jsx)(Tn,{});return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(Li,{size:`icon-sm`,variant:`outline`,"aria-label":i,onClick:n,children:t===`light`?(0,x.jsx)(An,{}):t===`dark`?(0,x.jsx)(En,{}):o})}),(0,x.jsx)(yl,{children:a})]})}function mu(e){let{meta:t}=e,n=t.coverage.unassignedCount>0||t.coverage.staleCount>0||t.coverage.staleSourceCount>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,t.coverage.staleSourceCount>0?`${t.coverage.staleSourceCount} stale comment pins`:null].filter(e=>e!==null).join(` · `);return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(`span`,{className:H(`shrink-0 font-mono text-xs tabular-nums`,n?`text-warn`:`text-muted-foreground`),children:[t.coverage.assignedHunks,`/`,t.coverage.totalHunks]})}),(0,x.jsx)(yl,{children:r})]})}var hu=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`avif`,`ico`]);function gu(e){let t=Vt(e),n=t.lastIndexOf(`.`);if(n<=0)return;let r=t.slice(n+1).toLowerCase();return hu.has(r)?r:void 0}function _u(e){return gu(e)!==void 0}function vu(e){let t=[];for(let n of e){let e=t[t.length-1];if(e!==void 0&&e.sha===n.sha&&e.author===n.author){e.lines+=1;continue}t.push({lineNumber:n.line,sha:n.sha,author:n.author,timestamp:n.timestamp,lines:1})}return t}var yu=`diffs-container`,bu=/(?=^From [a-f0-9]+ .+$)/m,xu=/(?=^diff --git)/gm,Su=/(?<=\n)/,Cu=/^(---|\+\+\+)\s+([^\t\r\n]+)/,wu=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Tu=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Eu=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Du=`header-prefix`,Ou=`header-filename-suffix`,ku=`header-metadata`,Au=`header-custom`,ju={dark:`pierre-dark`,light:`pierre-light`},Mu=`data-theme-css`,Nu=`data-unsafe-css`,Pu=`data-diffs-scrollbar-measure`,Fu=`--diffs-scrollbar-gutter-measured`,Iu=1e5,Lu={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Lu});var Ru=Object.freeze({fromStart:0,fromEnd:0}),zu={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Bu={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Vu=new Map,Hu=new Map,Uu=new Map,Wu=new Set;function Gu(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Wu.has(t))return!1;return!0}function Ku(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Wu.has(n.name))continue;let e=Vu.get(n.name);e??(e=n,Vu.set(n.name,e)),Wu.add(e.name),t.loadLanguageSync(e.data)}}function qu(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Ju=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Xu=Object.getOwnPropertyNames,Zu=Object.prototype.hasOwnProperty,Qu=(e,t)=>{let n={};for(var r in e)Ju(n,r,{get:e[r],enumerable:!0});return t||Ju(n,Symbol.toStringTag,{value:`Module`}),n},$u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Xu(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Zu.call(e,s)&&s!==n&&Ju(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Yu(t,s))||r.enumerable});return e},ed=(e,t,n)=>($u(e,t,`default`),n&&$u(n,t,`default`)),td=`modulepreload`,nd=function(e,t){return new URL(e,t).href},rd={},K=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=nd(t,n),t=s(t),t in rd)return;rd[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:td,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},id=[{id:`abap`,name:`ABAP`,import:(()=>K(()=>import(`./shiki-lang-abap-BuHPl3Px.js`).then(e=>e.t),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>K(()=>import(`./shiki-lang-actionscript-3-DT7i6v_4.js`).then(e=>e.t),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>K(()=>import(`./shiki-lang-ada-QB58RKQb.js`).then(e=>e.t),[],import.meta.url))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>K(()=>import(`./shiki-lang-ahk-Deo8ZsxI.js`).then(e=>e.t),[],import.meta.url))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>K(()=>import(`./shiki-lang-ahk2-DWQ-qmQe.js`).then(e=>e.t),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>K(()=>import(`./shiki-lang-angular-html-BZS7pisj.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>K(()=>import(`./shiki-lang-angular-ts-Bg0EOCRA.js`).then(e=>e.t),__vite__mapDeps([8,4,5,6,7,9,10,3,11,0,1,2]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>K(()=>import(`./shiki-lang-apache-CaeBCo1H.js`).then(e=>e.t),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>K(()=>import(`./shiki-lang-apex-C0P1xrr7.js`).then(e=>e.t),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>K(()=>import(`./shiki-lang-apl-DpghvkS9.js`).then(e=>e.t),__vite__mapDeps([12,2,3,1,13,14,15]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>K(()=>import(`./shiki-lang-applescript-qHXCUv9W.js`).then(e=>e.t),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>K(()=>import(`./shiki-lang-ara-CnKLzTh0.js`).then(e=>e.t),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>K(()=>import(`./shiki-lang-asciidoc-BFyWQdTW.js`).then(e=>e.t),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>K(()=>import(`./shiki-lang-asm-BDAQRHlr.js`).then(e=>e.t),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>K(()=>import(`./shiki-lang-astro-eLzdEfkh.js`).then(e=>e.t),__vite__mapDeps([16,2,3,15,17,18,19]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>K(()=>import(`./shiki-lang-awk-nbK03rsj.js`).then(e=>e.t),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>K(()=>import(`./shiki-lang-ballerina-BvFIoPjv.js`).then(e=>e.t),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>K(()=>import(`./shiki-lang-bat-DeZWaK2t.js`).then(e=>e.n),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>K(()=>import(`./shiki-lang-beancount-D3PEpbaR.js`).then(e=>e.t),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>K(()=>import(`./shiki-lang-berry-q4KduTOe.js`).then(e=>e.t),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>K(()=>import(`./shiki-lang-bibtex-BK_j-Uh8.js`).then(e=>e.n),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>K(()=>import(`./shiki-lang-bicep-BAz0ZWPk.js`).then(e=>e.t),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>K(()=>import(`./shiki-lang-bird2-CexT8W9C.js`).then(e=>e.t),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>K(()=>import(`./shiki-lang-blade-EiwCWvW-.js`).then(e=>e.t),__vite__mapDeps([20,2,3,1,13,14,15,21,22]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>K(()=>import(`./shiki-lang-bsl-BJlZfp3d.js`).then(e=>e.t),__vite__mapDeps([23,24]),import.meta.url))},{id:`c`,name:`C`,import:(()=>K(()=>import(`./shiki-lang-c-cUgVXYtZ.js`).then(e=>e.n),[],import.meta.url))},{id:`c3`,name:`C3`,import:(()=>K(()=>import(`./shiki-lang-c3-DkIGQwpj.js`).then(e=>e.t),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>K(()=>import(`./shiki-lang-cadence-D0f5xasM.js`).then(e=>e.t),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>K(()=>import(`./shiki-lang-cairo-BhNbTAo2.js`).then(e=>e.t),__vite__mapDeps([25,26]),import.meta.url))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>K(()=>import(`./shiki-lang-chapel-C41a-Vfc.js`).then(e=>e.t),__vite__mapDeps([27,28]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>K(()=>import(`./shiki-lang-clarity-D30seMWU.js`).then(e=>e.t),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>K(()=>import(`./shiki-lang-clojure-uuUteQ-I.js`).then(e=>e.n),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>K(()=>import(`./shiki-lang-cmake-TS4v06Lq.js`).then(e=>e.n),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>K(()=>import(`./shiki-lang-cobol-DR4--xqM.js`).then(e=>e.t),__vite__mapDeps([29,1,2,3,14]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>K(()=>import(`./shiki-lang-codeowners-Dq4wI_wj.js`).then(e=>e.t),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>K(()=>import(`./shiki-lang-codeql-C2YFz6nZ.js`).then(e=>e.t),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>K(()=>import(`./shiki-lang-coffee-BoP47XOy.js`).then(e=>e.n),__vite__mapDeps([30,2]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>K(()=>import(`./shiki-lang-common-lisp-BI2P6pYW.js`).then(e=>e.t),[],import.meta.url))},{id:`coq`,name:`Rocq`,import:(()=>K(()=>import(`./shiki-lang-coq-DGJ-LtGn.js`).then(e=>e.t),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>K(()=>import(`./shiki-lang-cpp-Dal4zAhU.js`).then(e=>e.n),__vite__mapDeps([31,32,33,28,34]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>K(()=>import(`./shiki-lang-crystal-C8kllMvh.js`).then(e=>e.t),__vite__mapDeps([35,2,3,1,22,28,36]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>K(()=>import(`./shiki-lang-csharp-xjiDMJUR.js`).then(e=>e.n),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>K(()=>import(`./shiki-lang-css-BtK5ec9f.js`).then(e=>e.n),[],import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>K(()=>import(`./shiki-lang-csv-p-Fkolpm.js`).then(e=>e.n),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>K(()=>import(`./shiki-lang-cue-rpKFDnrP.js`).then(e=>e.t),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>K(()=>import(`./shiki-lang-cypher-COrMSn75.js`).then(e=>e.t),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>K(()=>import(`./shiki-lang-d-i8h2-tT8.js`).then(e=>e.t),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>K(()=>import(`./shiki-lang-dart-Dio4c9vd.js`).then(e=>e.n),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>K(()=>import(`./shiki-lang-dax-CPTkOeIN.js`).then(e=>e.t),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>K(()=>import(`./shiki-lang-desktop-DFiSEBxz.js`).then(e=>e.t),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>K(()=>import(`./shiki-lang-diff-D6COc5hs.js`).then(e=>e.n),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>K(()=>import(`./shiki-lang-docker-XIMjEzG8.js`).then(e=>e.n),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>K(()=>import(`./shiki-lang-dotenv-QSkQX7h5.js`).then(e=>e.t),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>K(()=>import(`./shiki-lang-dream-maker-USSOZfUq.js`).then(e=>e.t),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>K(()=>import(`./shiki-lang-edge-BPDV4Q0u.js`).then(e=>e.t),__vite__mapDeps([37,1,2,3,17,21]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>K(()=>import(`./shiki-lang-elixir-BKE9OPDF.js`).then(e=>e.n),__vite__mapDeps([38,1,2,3]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>K(()=>import(`./shiki-lang-elm-WG-wF2ge.js`).then(e=>e.t),__vite__mapDeps([39,33,28]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>K(()=>import(`./shiki-lang-emacs-lisp-YvLEIlvI.js`).then(e=>e.t),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>K(()=>import(`./shiki-lang-erb-CbW7_yrm.js`).then(e=>e.t),__vite__mapDeps([40,1,2,3,41,13,14,22,28,31,32,33,34,36,42,43,17,19,44,45,46]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>K(()=>import(`./shiki-lang-erlang-tQ2Conzb.js`).then(e=>e.n),__vite__mapDeps([47,48]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>K(()=>import(`./shiki-lang-fennel-ByuP2T_N.js`).then(e=>e.t),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>K(()=>import(`./shiki-lang-fish-Bl6JSWxf.js`).then(e=>e.t),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>K(()=>import(`./shiki-lang-fluent-DcjpW-CJ.js`).then(e=>e.t),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>K(()=>import(`./shiki-lang-fortran-fixed-form-Jm96oYxt.js`).then(e=>e.t),__vite__mapDeps([49,50]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>K(()=>import(`./shiki-lang-fortran-free-form-DBXJeZhO.js`).then(e=>e.n),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>K(()=>import(`./shiki-lang-fsharp-C1Axgpg7.js`).then(e=>e.n),__vite__mapDeps([51,48]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>K(()=>import(`./shiki-lang-gdresource-Cb2Lv_Hg.js`).then(e=>e.t),__vite__mapDeps([52,53,54]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>K(()=>import(`./shiki-lang-gdscript-BqpET1Hp.js`).then(e=>e.n),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>K(()=>import(`./shiki-lang-gdshader-EJVyKmd9.js`).then(e=>e.n),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>K(()=>import(`./shiki-lang-genie-C580asv3.js`).then(e=>e.t),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>K(()=>import(`./shiki-lang-gherkin-1-_7jqIt.js`).then(e=>e.t),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>K(()=>import(`./shiki-lang-git-commit-C1CitGA9.js`).then(e=>e.n),__vite__mapDeps([55,56]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>K(()=>import(`./shiki-lang-git-rebase-CafoN6im.js`).then(e=>e.n),__vite__mapDeps([57,36]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>K(()=>import(`./shiki-lang-gleam-DzCfrYgh.js`).then(e=>e.t),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>K(()=>import(`./shiki-lang-glimmer-js-DFqhoMH-.js`).then(e=>e.t),__vite__mapDeps([58,2,3,1,17]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>K(()=>import(`./shiki-lang-glimmer-ts-BpmACrHW.js`).then(e=>e.t),__vite__mapDeps([59,2,3,1,17]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>K(()=>import(`./shiki-lang-glsl-CZJe7hbK.js`).then(e=>e.n),__vite__mapDeps([33,28]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>K(()=>import(`./shiki-lang-gn-Rjzf9iJq.js`).then(e=>e.t),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>K(()=>import(`./shiki-lang-gnuplot-eeygxHmA.js`).then(e=>e.t),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>K(()=>import(`./shiki-lang-go-NVEOzY7_.js`).then(e=>e.n),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>K(()=>import(`./shiki-lang-graphql-DhZ5TXkF.js`).then(e=>e.n),__vite__mapDeps([43,2,17,19,44]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>K(()=>import(`./shiki-lang-groovy-CEZdlCsP.js`).then(e=>e.n),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>K(()=>import(`./shiki-lang-hack-BmcjITAv.js`).then(e=>e.t),__vite__mapDeps([60,1,2,3,22]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>K(()=>import(`./shiki-lang-haml-HJ2Ueb86.js`).then(e=>e.n),__vite__mapDeps([42,2,3]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>K(()=>import(`./shiki-lang-handlebars-DxaLlHkn.js`).then(e=>e.n),__vite__mapDeps([61,2,3,1,46]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>K(()=>import(`./shiki-lang-haskell-DiddM2MJ.js`).then(e=>e.t),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>K(()=>import(`./shiki-lang-haxe-pMfP0LCc.js`).then(e=>e.n),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>K(()=>import(`./shiki-lang-hcl-Bap936O0.js`).then(e=>e.t),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>K(()=>import(`./shiki-lang-hjson-BYTDlyGA.js`).then(e=>e.t),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>K(()=>import(`./shiki-lang-hlsl-fyyNP_qi.js`).then(e=>e.n),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>K(()=>import(`./shiki-lang-html-CP9Hm1lR.js`).then(e=>e.n),__vite__mapDeps([1,2,3]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>K(()=>import(`./shiki-lang-html-derivative--x4x2jCE.js`).then(e=>e.n),__vite__mapDeps([21,1,2,3]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>K(()=>import(`./shiki-lang-http-CwwtjO5s.js`).then(e=>e.t),__vite__mapDeps([62,13,14,15,36,43,2,17,19,44]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>K(()=>import(`./shiki-lang-hurl-CQo_d2_V.js`).then(e=>e.t),__vite__mapDeps([63,13,14,64,43,2,17,19,44]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>K(()=>import(`./shiki-lang-hxml-CJQUEG21.js`).then(e=>e.t),__vite__mapDeps([65,66]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>K(()=>import(`./shiki-lang-hy-BHZn1Bjp.js`).then(e=>e.t),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>K(()=>import(`./shiki-lang-imba-QC3P1YWQ.js`).then(e=>e.t),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>K(()=>import(`./shiki-lang-ini-kwRikv0S.js`).then(e=>e.n),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>K(()=>import(`./shiki-lang-java-d1M2cgqP.js`).then(e=>e.n),[],import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>K(()=>import(`./shiki-lang-javascript-CoQwDVkE.js`).then(e=>e.n),[],import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>K(()=>import(`./shiki-lang-jinja-oWNRr7NO.js`).then(e=>e.t),__vite__mapDeps([67,68,1,2,3]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>K(()=>import(`./shiki-lang-jison-DlYeb9b8.js`).then(e=>e.t),__vite__mapDeps([69,2]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>K(()=>import(`./shiki-lang-json-yQGkCSm9.js`).then(e=>e.n),[],import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>K(()=>import(`./shiki-lang-json5-BBK18-F7.js`).then(e=>e.t),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>K(()=>import(`./shiki-lang-jsonc-C492qAh6.js`).then(e=>e.n),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>K(()=>import(`./shiki-lang-jsonl-Df74WKjQ.js`).then(e=>e.t),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>K(()=>import(`./shiki-lang-jsonnet-doyqAZP2.js`).then(e=>e.t),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>K(()=>import(`./shiki-lang-jssm-Cn74Pd6Y.js`).then(e=>e.t),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>K(()=>import(`./shiki-lang-jsx-mYZ0_grh.js`).then(e=>e.n),[],import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>K(()=>import(`./shiki-lang-julia-By3XtwRn.js`).then(e=>e.n),__vite__mapDeps([70,2,22,26,31,32,33,28,34,71]),import.meta.url))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>K(()=>import(`./shiki-lang-just-BTkdamae.js`).then(e=>e.t),__vite__mapDeps([72,2,17,26,36,41,3,1,13,14,22,28,31,32,33,34,42,43,19,44,45,46,73]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>K(()=>import(`./shiki-lang-kdl-hCt96Ltw.js`).then(e=>e.t),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>K(()=>import(`./shiki-lang-kotlin-BFL6W1VK.js`).then(e=>e.t),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>K(()=>import(`./shiki-lang-kusto-Bi9Fd-uE.js`).then(e=>e.t),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>K(()=>import(`./shiki-lang-latex-C1gH_y7D.js`).then(e=>e.n),__vite__mapDeps([74,75,71]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>K(()=>import(`./shiki-lang-lean-DJESOId2.js`).then(e=>e.t),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>K(()=>import(`./shiki-lang-less-BlBwe5lT.js`).then(e=>e.n),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>K(()=>import(`./shiki-lang-liquid-_aQQlg5i.js`).then(e=>e.t),__vite__mapDeps([76,2,3,1,15]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>K(()=>import(`./shiki-lang-llvm-BEpgvxue.js`).then(e=>e.t),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>K(()=>import(`./shiki-lang-log-COUzL5MF.js`).then(e=>e.n),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>K(()=>import(`./shiki-lang-logo-BzFyBpUa.js`).then(e=>e.t),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>K(()=>import(`./shiki-lang-lua-D86t0AFA.js`).then(e=>e.n),__vite__mapDeps([45,28]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>K(()=>import(`./shiki-lang-luau-D1iPfPp8.js`).then(e=>e.t),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>K(()=>import(`./shiki-lang-make-CKHn0pN_.js`).then(e=>e.n),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>K(()=>import(`./shiki-lang-markdown-DvqJlRaX.js`).then(e=>e.n),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>K(()=>import(`./shiki-lang-marko-Bx5Ys3zf.js`).then(e=>e.t),__vite__mapDeps([77,3,10,17,78]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>K(()=>import(`./shiki-lang-matlab-Bsmpzlgg.js`).then(e=>e.t),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>K(()=>import(`./shiki-lang-mdc-BD8Hug0K.js`).then(e=>e.t),__vite__mapDeps([79,21,1,2,3,46,48]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>K(()=>import(`./shiki-lang-mdx-D6-XzQ1O.js`).then(e=>e.t),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>K(()=>import(`./shiki-lang-mermaid-CyNo_sGZ.js`).then(e=>e.t),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>K(()=>import(`./shiki-lang-mipsasm-DA63Htym.js`).then(e=>e.t),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>K(()=>import(`./shiki-lang-mojo-COJJ3_fN.js`).then(e=>e.t),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>K(()=>import(`./shiki-lang-moonbit-CuNFBU2r.js`).then(e=>e.t),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>K(()=>import(`./shiki-lang-move-BX2BqAEI.js`).then(e=>e.t),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>K(()=>import(`./shiki-lang-narrat-DRT2PRBR.js`).then(e=>e.t),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>K(()=>import(`./shiki-lang-nextflow-CXbNYeNi.js`).then(e=>e.t),__vite__mapDeps([80,81]),import.meta.url))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>K(()=>import(`./shiki-lang-nextflow-groovy-CBn50lGS.js`).then(e=>e.n),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>K(()=>import(`./shiki-lang-nginx-VuJMgGAK.js`).then(e=>e.t),__vite__mapDeps([82,45,28]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>K(()=>import(`./shiki-lang-nim-gUyAmDNe.js`).then(e=>e.n),__vite__mapDeps([83,2,3,1,13,14,28,33,48]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>K(()=>import(`./shiki-lang-nix-ZWhismn0.js`).then(e=>e.t),__vite__mapDeps([84,85]),import.meta.url))},{id:`nsis`,name:`NSIS`,import:(()=>K(()=>import(`./shiki-lang-nsis-DiLH_ad1.js`).then(e=>e.t),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>K(()=>import(`./shiki-lang-nushell-D3HeAm2_.js`).then(e=>e.t),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>K(()=>import(`./shiki-lang-objective-c-Bf-vgIFL.js`).then(e=>e.n),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>K(()=>import(`./shiki-lang-objective-cpp-BIkOqJvP.js`).then(e=>e.t),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>K(()=>import(`./shiki-lang-ocaml-DWguduvb.js`).then(e=>e.n),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>K(()=>import(`./shiki-lang-odin-BH-7UUWe.js`).then(e=>e.t),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>K(()=>import(`./shiki-lang-openscad-BSzJHkmP.js`).then(e=>e.t),[],import.meta.url))},{id:`org`,name:`Org Markup`,import:(()=>K(()=>import(`./shiki-lang-org-DbleOP5Y.js`).then(e=>e.t),__vite__mapDeps([86,2,3,1,10,14,13,15,17,19,22,28,26,87,30,32,31,33,34,36,88,89,56,90,38,45,46,41,42,43,44,48,47,55,57,91,92,93,71,73,74,75,78,94,83,95,96,97,98,99,100,101,102,103]),import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>K(()=>import(`./shiki-lang-pascal-gTsGvL1D.js`).then(e=>e.t),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>K(()=>import(`./shiki-lang-perl-BKMLvgdT.js`).then(e=>e.n),__vite__mapDeps([73,2,3,1,13,14,22]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>K(()=>import(`./shiki-lang-php-B7Gwh9ef.js`).then(e=>e.n),__vite__mapDeps([97,2,3,1,13,14,15,22]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>K(()=>import(`./shiki-lang-pkl-CopbDshc.js`).then(e=>e.t),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>K(()=>import(`./shiki-lang-plsql-DQMF8idG.js`).then(e=>e.t),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>K(()=>import(`./shiki-lang-po-DwBJCip-.js`).then(e=>e.t),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>K(()=>import(`./shiki-lang-polar-DnF9YeeS.js`).then(e=>e.t),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>K(()=>import(`./shiki-lang-postcss-CXWa9_la.js`).then(e=>e.n),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>K(()=>import(`./shiki-lang-powerquery-MZ135DUG.js`).then(e=>e.t),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>K(()=>import(`./shiki-lang-powershell-BhvOQ-ow.js`).then(e=>e.n),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>K(()=>import(`./shiki-lang-prisma-ehoeHrFh.js`).then(e=>e.t),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>K(()=>import(`./shiki-lang-prolog-CbsViES-.js`).then(e=>e.t),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>K(()=>import(`./shiki-lang-proto-DzSxeFhe.js`).then(e=>e.t),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>K(()=>import(`./shiki-lang-pug-Cx8nw1GZ.js`).then(e=>e.n),__vite__mapDeps([104,2,3,1]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>K(()=>import(`./shiki-lang-puppet-Btc-vtJB.js`).then(e=>e.t),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>K(()=>import(`./shiki-lang-purescript-BRNRwNAr.js`).then(e=>e.t),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>K(()=>import(`./shiki-lang-python-CHKKXXi8.js`).then(e=>e.n),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>K(()=>import(`./shiki-lang-qml-8dXsP_KG.js`).then(e=>e.t),__vite__mapDeps([105,2]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>K(()=>import(`./shiki-lang-qmldir-wsrRkenJ.js`).then(e=>e.t),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>K(()=>import(`./shiki-lang-qss-Cddq0YPK.js`).then(e=>e.t),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>K(()=>import(`./shiki-lang-r-DSZvQ2bf.js`).then(e=>e.n),[],import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>K(()=>import(`./shiki-lang-racket-CPkaj6O_.js`).then(e=>e.t),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>K(()=>import(`./shiki-lang-raku-C-j9AeHY.js`).then(e=>e.n),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>K(()=>import(`./shiki-lang-razor-Cw-zhqTO.js`).then(e=>e.t),__vite__mapDeps([106,1,2,3,88]),import.meta.url))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>K(()=>import(`./shiki-lang-rbs-Bcy0mDBQ.js`).then(e=>e.t),[],import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>K(()=>import(`./shiki-lang-reg-BdP2Aq_3.js`).then(e=>e.t),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>K(()=>import(`./shiki-lang-regexp-Dr8RsTV5.js`).then(e=>e.n),[],import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>K(()=>import(`./shiki-lang-rel-ItxKk1t2.js`).then(e=>e.t),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>K(()=>import(`./shiki-lang-riscv-sAXJO5va.js`).then(e=>e.t),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>K(()=>import(`./shiki-lang-ron-BVZi4ZmK.js`).then(e=>e.t),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>K(()=>import(`./shiki-lang-rosmsg-BwJgk5sN.js`).then(e=>e.t),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>K(()=>import(`./shiki-lang-rst-D5hzYB0l.js`).then(e=>e.t),__vite__mapDeps([107,2,21,1,3,26,108,31,32,33,28,34,36,46,41,13,14,22,42,43,17,19,44,45]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>K(()=>import(`./shiki-lang-ruby-D9gEja1t.js`).then(e=>e.n),__vite__mapDeps([41,2,3,1,13,14,22,28,31,32,33,34,36,42,43,17,19,44,45,46]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>K(()=>import(`./shiki-lang-rust-BzGhc63A.js`).then(e=>e.n),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>K(()=>import(`./shiki-lang-sas-BFWf1cyL.js`).then(e=>e.t),__vite__mapDeps([109,22]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>K(()=>import(`./shiki-lang-sass-fiWvE1E6.js`).then(e=>e.t),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>K(()=>import(`./shiki-lang-scala-KEPZWw7Q.js`).then(e=>e.n),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>K(()=>import(`./shiki-lang-scheme-WjM1Xspu.js`).then(e=>e.t),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>K(()=>import(`./shiki-lang-scss-CG7e8fco.js`).then(e=>e.n),__vite__mapDeps([10,3]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>K(()=>import(`./shiki-lang-sdbl-D-fUhBMJ.js`).then(e=>e.n),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>K(()=>import(`./shiki-lang-shaderlab-CeQUIb-m.js`).then(e=>e.t),__vite__mapDeps([110,111]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>K(()=>import(`./shiki-lang-shellscript-BHRoVZ9B.js`).then(e=>e.n),[],import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>K(()=>import(`./shiki-lang-shellsession-oQPRyNtJ.js`).then(e=>e.t),__vite__mapDeps([112,36]),import.meta.url))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>K(()=>import(`./shiki-lang-smalltalk-BCn5pML6.js`).then(e=>e.t),[],import.meta.url))},{id:`smithy`,name:`Smithy`,import:(()=>K(()=>import(`./shiki-lang-smithy-Bnew5vAI.js`).then(e=>e.t),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>K(()=>import(`./shiki-lang-solidity-DYWBIpKd.js`).then(e=>e.t),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>K(()=>import(`./shiki-lang-soy-BU_I37b3.js`).then(e=>e.t),__vite__mapDeps([113,1,2,3]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>K(()=>import(`./shiki-lang-sparql-CUzHwOAc.js`).then(e=>e.t),__vite__mapDeps([114,115]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>K(()=>import(`./shiki-lang-splunk-CuMQ-bQj.js`).then(e=>e.t),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>K(()=>import(`./shiki-lang-sql-D_91z_KC.js`).then(e=>e.n),[],import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>K(()=>import(`./shiki-lang-ssh-config-E7f5J40j.js`).then(e=>e.t),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>K(()=>import(`./shiki-lang-stata-CcxlnAAd.js`).then(e=>e.t),__vite__mapDeps([116,22]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>K(()=>import(`./shiki-lang-stylus-QdNMd2Ol.js`).then(e=>e.n),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>K(()=>import(`./shiki-lang-surrealql-BY3L-U6I.js`).then(e=>e.t),__vite__mapDeps([117,2]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>K(()=>import(`./shiki-lang-svelte-BraYXbN1.js`).then(e=>e.t),__vite__mapDeps([118,2,3,17,18]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>K(()=>import(`./shiki-lang-swift-GBk9P9bD.js`).then(e=>e.n),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>K(()=>import(`./shiki-lang-system-verilog-CcFNB-9G.js`).then(e=>e.n),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>K(()=>import(`./shiki-lang-systemd-CfyxEp-3.js`).then(e=>e.t),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>K(()=>import(`./shiki-lang-talonscript-EiloZNHt.js`).then(e=>e.t),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>K(()=>import(`./shiki-lang-tasl-D2hiq4aP.js`).then(e=>e.t),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>K(()=>import(`./shiki-lang-tcl-DmPeea8t.js`).then(e=>e.t),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>K(()=>import(`./shiki-lang-templ-CNQsuMTo.js`).then(e=>e.t),__vite__mapDeps([119,2,3,91]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>K(()=>import(`./shiki-lang-terraform-Bk9FujxB.js`).then(e=>e.t),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>K(()=>import(`./shiki-lang-tex-DqCIQlTN.js`).then(e=>e.n),__vite__mapDeps([75,71]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>K(()=>import(`./shiki-lang-toml-CTaoLtIw.js`).then(e=>e.t),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>K(()=>import(`./shiki-lang-ts-tags-kbOGoo3o.js`).then(e=>e.t),__vite__mapDeps([120,17,121,2,3,122,33,28,123,1,124,22,125,13,14]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>K(()=>import(`./shiki-lang-tsv-n2qFIoSV.js`).then(e=>e.t),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>K(()=>import(`./shiki-lang-tsx-DHN5AfF-.js`).then(e=>e.n),[],import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>K(()=>import(`./shiki-lang-turtle-BhxMO6m_.js`).then(e=>e.n),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>K(()=>import(`./shiki-lang-twig-BI3wu5j1.js`).then(e=>e.n),__vite__mapDeps([126,2,3,10,26,41,1,13,14,22,28,31,32,33,34,36,42,43,17,19,44,45,46,97,15]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>K(()=>import(`./shiki-lang-typescript-Bi84_wAX.js`).then(e=>e.n),[],import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>K(()=>import(`./shiki-lang-typespec-BUSudTwB.js`).then(e=>e.t),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>K(()=>import(`./shiki-lang-typst-BeQRnfsh.js`).then(e=>e.t),__vite__mapDeps([127,2,3,1,10,14,13,15,17,19,128,129,22,28,26,87,30,32,31,33,34,36,88,89,56,90,38,45,46,41,42,43,44,48,47,51,55,57,91,92,61,93,130,71,70,73,74,75,78,131,94,95,97,98,99,100,101,103,132,104,133,134,126,135]),import.meta.url))},{id:`v`,name:`V`,import:(()=>K(()=>import(`./shiki-lang-v-DcmtCCfh.js`).then(e=>e.t),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>K(()=>import(`./shiki-lang-vala-ACNpIZyT.js`).then(e=>e.t),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,import:(()=>K(()=>import(`./shiki-lang-vb-UxeHUT4-.js`).then(e=>e.n),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>K(()=>import(`./shiki-lang-verilog-D_z-DWcI.js`).then(e=>e.n),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>K(()=>import(`./shiki-lang-vhdl-DjYxR0oh.js`).then(e=>e.t),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>K(()=>import(`./shiki-lang-viml-35sdc6lh.js`).then(e=>e.t),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>K(()=>import(`./shiki-lang-vue-CXmuYyCC.js`).then(e=>e.t),__vite__mapDeps([136,2,3,1,15,17,21,137,138,139,140]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>K(()=>import(`./shiki-lang-vue-html-D7p54nmB.js`).then(e=>e.t),__vite__mapDeps([141,2]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>K(()=>import(`./shiki-lang-vue-vine-jXgUN14Y.js`).then(e=>e.t),__vite__mapDeps([142,2,3,10,18,78,143]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>K(()=>import(`./shiki-lang-vyper-CkzXvo5f.js`).then(e=>e.t),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>K(()=>import(`./shiki-lang-wasm-YV5MrSFG.js`).then(e=>e.t),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>K(()=>import(`./shiki-lang-wenyan-BEAREdij.js`).then(e=>e.t),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>K(()=>import(`./shiki-lang-wgsl-DKljNrqo.js`).then(e=>e.t),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>K(()=>import(`./shiki-lang-wikitext-zQrLZOLl.js`).then(e=>e.t),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>K(()=>import(`./shiki-lang-wit-oxy4vW-x.js`).then(e=>e.t),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>K(()=>import(`./shiki-lang-wolfram-CBPWnKO2.js`).then(e=>e.t),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>K(()=>import(`./shiki-lang-xml-Dbri-bZ6.js`).then(e=>e.n),__vite__mapDeps([13,14]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>K(()=>import(`./shiki-lang-xsl-HtA9ymS7.js`).then(e=>e.n),__vite__mapDeps([103,13,14]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>K(()=>import(`./shiki-lang-yaml-CC6ddTCm.js`).then(e=>e.n),[],import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>K(()=>import(`./shiki-lang-zenscript-B5ajX4si.js`).then(e=>e.t),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>K(()=>import(`./shiki-lang-zig-DXnhftle.js`).then(e=>e.n),[],import.meta.url))}],ad=Object.fromEntries(id.map(e=>[e.id,e.import])),od=Object.fromEntries(id.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),sd={...ad,...od},cd=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>K(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>K(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>K(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>K(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>K(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>K(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>K(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>K(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>K(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>K(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>K(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>K(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>K(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>K(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>K(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>K(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>K(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>K(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>K(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>K(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>K(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>K(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>K(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>K(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>K(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>K(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>K(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>K(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>K(()=>import(`./horizon-bright-DSNQnXHK.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>K(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>K(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>K(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>K(()=>import(`./kanagawa-wave-BML5mF2J.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>K(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>K(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>K(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>K(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>K(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>K(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>K(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>K(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>K(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>K(()=>import(`./monokai-B_bV9PQ9.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>K(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>K(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>K(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>K(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>K(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>K(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>K(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>K(()=>import(`./red-DX1BQOs8.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>K(()=>import(`./rose-pine-aMsaMD1D.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>K(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>K(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>K(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>K(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>K(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>K(()=>import(`./solarized-dark-UdsmMDCL.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>K(()=>import(`./solarized-light-C1IUL_tW.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>K(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>K(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>K(()=>import(`./vesper-DdrHHSXu.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>K(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>K(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>K(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),ld=s({createOnigurumaEngine:()=>Id,getDefaultWasmLoader:()=>Fd,loadWasm:()=>kd,setDefaultWasmLoader:()=>Pd}),ud=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dd(){return 2147483648}function fd(){return typeof performance<`u`?performance.now():Date.now()}var pd=(e,t)=>e+(t-e%t)%t;async function md(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=dd();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,pd(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:fd,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var hd=Object.defineProperty,gd=(e,t,n)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_d=(e,t,n)=>gd(e,typeof t==`symbol`?t:t+``,n),vd=null;function yd(e){throw new ud(e.UTF8ToString(e.getLastOnigError()))}var bd=class e{constructor(t){_d(this,`utf16Length`),_d(this,`utf8Length`),_d(this,`utf16Value`),_d(this,`utf8Value`),_d(this,`utf16OffsetToUtf8`),_d(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},xd=class e{constructor(t){if(_d(this,`id`,++e.LAST_ID),_d(this,`_onigBinding`),_d(this,`content`),_d(this,`utf16Length`),_d(this,`utf8Length`),_d(this,`utf16OffsetToUtf8`),_d(this,`utf8OffsetToUtf16`),_d(this,`ptr`),!vd)throw new ud(`Must invoke loadWasm first.`);this._onigBinding=vd,this.content=t;let n=new bd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=vd.omalloc(1e4),e._sharedPtrInUse=!0,vd.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(vd)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_d(xd,`LAST_ID`,0),_d(xd,`_sharedPtr`,0),_d(xd,`_sharedPtrInUse`,!1);var Sd=xd,Cd=class{constructor(e){if(_d(this,`_onigBinding`),_d(this,`_ptr`),!vd)throw new ud(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new bd(e[r]);t[r]=i.createString(vd),n[r]=i.utf8Length}let r=vd.omalloc(4*e.length);vd.HEAPU32.set(t,r/4);let i=vd.omalloc(4*e.length);vd.HEAPU32.set(n,i/4);let a=vd.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)vd.ofree(t[n]);vd.ofree(i),vd.ofree(r),a===0&&yd(vd),this._onigBinding=vd,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Sd(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function wd(e){return typeof e.instantiator==`function`}function q(e){return typeof e.default==`function`}function Td(e){return e.data!==void 0}function Ed(e){return typeof Response<`u`&&e instanceof Response}function Dd(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Od;function kd(e){if(Od)return Od;async function t(){vd=await md(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),wd(n)?n=await n.instantiator(t):q(n)?n=await n.default(t):(Td(n)&&(n=n.data),Ed(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await jd(n)(t):await Md(n)(t):Dd(n)||n instanceof WebAssembly.Module?n=await Ad(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Ad(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Od=t(),Od}function Ad(e){return t=>WebAssembly.instantiate(e,t)}function jd(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Md(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Nd;function Pd(e){Nd=e}function Fd(){return Nd}async function Id(e){return e&&await kd(e),{createScanner(e){return new Cd(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Sd(e)}}}var Ld=Qu({});ed(Ld,ld);var J=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rd(e){return zd(e)}function zd(e){return Array.isArray(e)?Bd(e):e instanceof RegExp?e:typeof e==`object`?Vd(e):e}function Bd(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zd(e[n]);return t}function Vd(e){let t={};for(let n in e)t[n]=zd(e[n]);return t}function Hd(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ud(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ud(e.substring(0,e.length-1)):e.substr(~t+1)}var Wd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gd=class{static hasCaptures(e){return e!==null&&(Wd.lastIndex=0,Wd.test(e))}static replaceCaptures(e,t,n){return e.replace(Wd,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kd(e,t){return e<t?-1:+(e>t)}function qd(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kd(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jd(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 Yd(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xd=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nf(e),t)}static createFromParsedTheme(e,t){return of(e,t)}_cachedMatchRoot=new Xd(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$d(e.parent,t.parentScopes));return n?new tf(n.fontStyle,n.foreground,n.background):null}},Qd=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $d(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ef(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ef(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var tf=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nf(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Jd(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jd(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new rf(l,u,e,o,s,c)}}return n}var rf=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},af=(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))(af||{});function of(e,t){e.sort((e,t)=>{let n=Kd(e.scope,t.scope);return n!==0||(n=qd(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new sf(t),o=new tf(n,a.getId(r),a.getId(i)),s=new uf(new lf(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zd(a,o,s)}var sf=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},cf=Object.freeze([]),lf=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||cf,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},uf=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),lf.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qd(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new lf(e,t,n,r,i))}},df=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=pf(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function ff(e){return e}function pf(e){return e}function mf(e,t){let n=[],r=gf(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(hf(i)){let e=[];do e.push(i),i=r.next();while(hf(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function hf(e){return!!e&&!!e.match(/[\w\.:]+/)}function gf(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function _f(e){typeof e.dispose==`function`&&e.dispose()}var vf=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},yf=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},bf=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xf=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new vf(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new bf;for(let n of e)Sf(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof vf){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Sf(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof vf?wf({baseGrammar:a,selfGrammar:i},r):Cf(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new vf(e))}function Cf(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Tf([r],t,n)}}function wf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Tf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Tf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Tf(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hd({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Tf(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=jf(i);switch(a.kind){case 0:wf({...t,selfGrammar:t.baseGrammar},n);break;case 1:wf(t,n);break;case 2:Cf(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Cf(a.ruleName,i,n):wf(i,n)}else a.kind===4?n.add(new yf(a.scopeName,a.ruleName)):n.add(new vf(a.scopeName))}}}var Ef=class{kind=0},Df=class{kind=1},Of=class{constructor(e){this.ruleName=e}kind=2},kf=class{constructor(e){this.scopeName=e}kind=3},Af=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function jf(e){if(e===`$base`)return new Ef;if(e===`$self`)return new Df;let t=e.indexOf(`#`);return t===-1?new kf(e):t===0?new Of(e.substring(1)):new Af(e.substring(0,t),e.substring(t+1))}var Mf=/\\(\d+)/,Nf=/\\(\d+)/g,Pf=-1,Ff=-2;function If(e){return e}function Lf(e){return e}var Rf=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gd.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ud(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:Gd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gd.replaceCaptures(this._contentName,e,t)}},zf=class extends Rf{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Bf=class extends Rf{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Gf(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vf=class extends Rf{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hf=class extends Rf{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Gf(i,this.id),this.beginCaptures=a,this._end=new Gf(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kf;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Uf=class extends Rf{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Gf(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Gf(o,Ff),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kf;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Kf,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Wf=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new zf(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Bf(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hd({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Vf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Uf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Hf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=jf(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Vf||e instanceof Hf||e instanceof Uf)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Gf=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Mf.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Nf.lastIndex=0,this.source.replace(Nf,(e,t)=>Yd(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Kf=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new qf(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new qf(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},qf=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
11
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Jf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Yf=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Jf(e,8),this._embeddedLanguagesMatcher=new Xf(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Jf(0,0);_getBasicScopeAttributes=new Xd(e=>new Jf(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Xf=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Yd(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Zf=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Qf(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=$f(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Zf(i,!0);f()}return new Zf(i,!1);function f(){let o=ep(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Pf){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ap(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Hf){let r=o;ap(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Uf){let r=o;ap(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(ap(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function $f(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Uf&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ip(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Ff){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),ap(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function ep(e,t,n,r,i,a){let o=tp(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=np(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function tp(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=rp(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function np(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=rp(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function rp(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ip(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ap(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Qf(e,p,n&&d.start===0,d.start,f,i,!1,0),_f(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new op(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var op=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function sp(e,t,n,r,i,a,o,s){return new dp(e,t,n,r,i,a,o,s)}function cp(e,t,n,r,i){let a=mf(t,lp),o=Wf.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function lp(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(up(t[r],e))return n=r+1,!0;return!1})}function up(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var dp=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Yf(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=fp(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=mf(e,lp);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)cp(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&cp(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(If(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Lf(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=fp(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Wf.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===mp.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=df.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?pp.createRootAndLookUpScopeName(a,r,this):pp.createRoot(`unknown`,r),t=new mp(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
12
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new gp(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Qf(this,a,i,0,t,s,!0,r);return _f(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function fp(e,t){return e=Rd(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 pp=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Qd.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Qd(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Qd(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),df.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},mp=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?pp.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Lf(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=pp.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,If(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,pp.fromExtension(r,n.contentNameScopesList))}},hp=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):mf(e,lp).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>mf(e,lp).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},gp=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=df.set(n,0,ff(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=df.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},_p=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,sp(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},vp=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new _p(Zd.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Zd.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new hp(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new xf(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},yp=mp.NULL;function bp(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function xp(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Sp(e){return Array.isArray(e)?e:[e]}async function Cp(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function wp(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Tp(e){return e===`ansi`||wp(e)}function Ep(e){return e===`none`}function Dp(e){return Ep(e)}var Op=/(\r?\n)/g;function kp(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Op),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Ap={light:`#333333`,dark:`#bbbbbb`},jp={light:`#fffffe`,dark:`#1e1e1e`},Mp=`__shiki_resolved`;function Np(e){if(e?.[Mp])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Ap.light:Ap.dark,n||=t.type===`light`?jp.light:jp.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Mp,{enumerable:!1,writable:!1,value:!0}),t}async function Pp(e){return[...new Set((await Promise.all(e.filter(e=>!Tp(e)).map(async e=>await Cp(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Fp(e){return(await Promise.all(e.map(async e=>Dp(e)?null:Np(await Cp(e))))).filter(e=>!!e)}function Ip(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new J(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Lp=class extends vp{_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(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Np(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Zd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Ip(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new J(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Rp=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},zp=0;function Bp(e){zp+=1,e.warnings!==!1&&zp>=10&&zp%10==0&&console.warn(`[Shiki] ${zp} 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 J("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Np),i=new Lp(new Rp(e.engine,n),r,n,e.langAlias),a;function o(t){return Ip(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new J(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new J(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Pp(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Fp(e))}function g(){if(t)throw new J(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--zp)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Vp(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Fp(e.themes||[]),Pp(e.langs||[]),e.engine]);return Bp({...e,themes:t,langs:n,engine:r})}var Hp=new WeakMap;function Up(e,t){Hp.set(e,t)}function Wp(e){return Hp.get(e)}var Gp=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Sp(n).map(e=>[e,yp])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Kp(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Kp(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function qp(e,t){if(!(e instanceof Gp))throw new J(`Invalid grammar state`);return e.getInternalStack(t)}var Jp=/,/,Yp=/ /;function Xp(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(wp(e.resolveLangAlias(n.lang||`text`))||Ep(r))return kp(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new J(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new J(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Qp(t,o,i,a,n)}function Zp(...e){if(e.length===2)return Wp(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(wp(i)||Ep(a))throw new J(`Plain language does not have grammar state`);if(i===`ansi`)throw new J(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Gp($p(n,c,o,s,r).stateStack,c.name,o.name)}function Qp(e,t,n,r,i){let a=$p(e,t,n,r,i),o=new Gp(a.stateStack,t.name,n.name);return Up(a.tokens,o),a.tokens}function $p(e,t,n,r,i){let a=bp(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=kp(e),u=i.grammarState?qp(i.grammarState,n.name)??yp:i.grammarContextCode==null?yp:$p(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=xp(r[df.getForeground(s)],a),u=df.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=df.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Jp).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Yp))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?em(t.scopes):tm(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function em(e){return e.map(e=>({scopeName:e}))}function tm(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:im(e,i,t.slice(0,r))}}return n}function nm(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function rm(e,t,n){if(!nm(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nm(e[r],n[i])&&--r,--i;return r===-1}function im(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(rm(e,t,n)){r.push(a);break}return r}function am(e,t,n,r=Xp){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Wp(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=om(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Gp(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Up(s,c),s}function om(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var sm=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],cm=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};cm.prototype.normal={},cm.prototype.property={},cm.prototype.space=void 0;function lm(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new cm(n,r,t)}function um(e){return e.toLowerCase()}var dm=class{constructor(e,t){this.attribute=t,this.property=e}};dm.prototype.attribute=``,dm.prototype.booleanish=!1,dm.prototype.boolean=!1,dm.prototype.commaOrSpaceSeparated=!1,dm.prototype.commaSeparated=!1,dm.prototype.defined=!1,dm.prototype.mustUseProperty=!1,dm.prototype.number=!1,dm.prototype.overloadedBoolean=!1,dm.prototype.property=``,dm.prototype.spaceSeparated=!1,dm.prototype.space=void 0;var fm=s({boolean:()=>Y,booleanish:()=>mm,commaOrSpaceSeparated:()=>vm,commaSeparated:()=>_m,number:()=>X,overloadedBoolean:()=>hm,spaceSeparated:()=>gm}),pm=0,Y=ym(),mm=ym(),hm=ym(),X=ym(),gm=ym(),_m=ym(),vm=ym();function ym(){return 2**++pm}var bm=Object.keys(fm),xm=class extends dm{constructor(e,t,n,r){let i=-1;if(super(e,t),Sm(this,`space`,r),typeof n==`number`)for(;++i<bm.length;){let e=bm[i];Sm(this,bm[i],(n&fm[e])===fm[e])}}};xm.prototype.defined=!0;function Sm(e,t,n){n&&(e[t]=n)}function Cm(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new xm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[um(r)]=r,n[um(a.attribute)]=r}return new cm(t,n,e.space)}var wm=Cm({properties:{ariaActiveDescendant:null,ariaAtomic:mm,ariaAutoComplete:null,ariaBusy:mm,ariaChecked:mm,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:gm,ariaCurrent:null,ariaDescribedBy:gm,ariaDetails:null,ariaDisabled:mm,ariaDropEffect:gm,ariaErrorMessage:null,ariaExpanded:mm,ariaFlowTo:gm,ariaGrabbed:mm,ariaHasPopup:null,ariaHidden:mm,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gm,ariaLevel:X,ariaLive:null,ariaModal:mm,ariaMultiLine:mm,ariaMultiSelectable:mm,ariaOrientation:null,ariaOwns:gm,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:mm,ariaReadOnly:mm,ariaRelevant:null,ariaRequired:mm,ariaRoleDescription:gm,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:mm,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Tm(e,t){return t in e?e[t]:t}function Em(e,t){return Tm(e,t.toLowerCase())}var Dm=Cm({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:_m,acceptCharset:gm,accessKey:gm,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:gm,autoFocus:Y,autoPlay:Y,blocking:gm,capture:null,charSet:null,checked:Y,cite:null,className:gm,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:mm,controls:Y,controlsList:gm,coords:X|_m,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:hm,draggable:mm,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:gm,height:X,hidden:hm,high:X,href:null,hrefLang:null,htmlFor:gm,httpEquiv:gm,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:gm,itemRef:gm,itemScope:Y,itemType:gm,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,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:Y,optimum:X,pattern:null,ping:gm,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:gm,required:Y,reversed:Y,rows:X,rowSpan:X,sandbox:gm,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootCustomElementRegistry:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shadowRootSerializable:Y,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:mm,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:mm,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gm,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:mm,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Y,disablePictureInPicture:Y,disableRemotePlayback:Y,exportParts:_m,part:gm,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:Em}),Om=Cm({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:vm,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:gm,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:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,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:_m,g2:_m,glyphName:_m,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:vm,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,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:X,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:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gm,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vm,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vm,rev:vm,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vm,requiredFeatures:vm,requiredFonts:vm,requiredFormats:vm,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:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:vm,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vm,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vm,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Tm}),km=Cm({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()}}),Am=Cm({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Em}),jm=Cm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Mm={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Nm=/[A-Z]/g,Pm=/-[a-z]/g,Fm=/^data[-\w.:]+$/i;function Im(e,t){let n=um(t),r=t,i=dm;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Fm.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Pm,Rm);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Pm.test(e)){let n=e.replace(Nm,Lm);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=xm}return new i(r,t)}function Lm(e){return`-`+e.toLowerCase()}function Rm(e){return e.charAt(1).toUpperCase()}var zm=lm([wm,Dm,km,Am,jm],`html`),Bm=lm([wm,Om,km,Am,jm],`svg`),Vm={}.hasOwnProperty;function Hm(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Vm.call(t,e)){let n=String(t[e]);i=Vm.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Um=/["&'<>`]/g,Wm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Gm=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Km=/[|\\{}()[\]^$+*?.]/g,qm=new WeakMap;function Jm(e,t){if(e=e.replace(t.subset?Ym(t.subset):Um,r),t.subset||t.escapeOnly)return e;return e.replace(Wm,n).replace(Gm,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Ym(e){let t=qm.get(e);return t||(t=Xm(e),qm.set(e,t)),t}function Xm(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Km,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Zm=/[\dA-Fa-f]/;function Qm(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Zm.test(String.fromCharCode(t))?r:r+`;`}var $m=/\d/;function eh(e,t,n){let r=`&#`+String(e);return n&&t&&!$m.test(String.fromCharCode(t))?r:r+`;`}var th=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),nh={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},rh=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],ih={}.hasOwnProperty,ah={},oh;for(oh in nh)ih.call(nh,oh)&&(ah[nh[oh]]=oh);var sh=/[^\dA-Za-z]/;function ch(e,t,n,r){let i=String.fromCharCode(e);if(ih.call(ah,i)){let e=ah[i],a=`&`+e;return n&&th.includes(e)&&!rh.includes(e)&&(!r||t&&t!==61&&sh.test(String.fromCharCode(t)))?a:a+`;`}return``}function lh(e,t,n){let r=Qm(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ch(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=eh(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function uh(e,t){return Jm(e,Object.assign({format:lh},t))}var dh=/^>|^->|<!--|-->|--!>|<!-$/g,fh=[`>`],ph=[`<`,`>`];function mh(e,t,n,r){return r.settings.bogusComments?`<?`+uh(e.value,Object.assign({},r.settings.characterReferences,{subset:fh}))+`>`:`<!--`+e.value.replace(dh,i)+`-->`;function i(e){return uh(e,Object.assign({},r.settings.characterReferences,{subset:ph}))}}function hh(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function gh(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _h(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function vh(e){return e.join(` `).trim()}var yh=/[ \t\n\f\r]/g;function bh(e){return typeof e==`object`?e.type===`text`&&xh(e.value):xh(e)}function xh(e){return e.replace(yh,``)===``}var Sh=Th(1),Ch=Th(-1),wh=[];function Th(e){return t;function t(t,n,r){let i=t?t.children:wh,a=(n||0)+e,o=i[a];if(!r)for(;o&&bh(o);)a+=e,o=i[a];return o}}var Eh={}.hasOwnProperty;function Dh(e){return t;function t(t,n,r){return Eh.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Oh=Dh({body:jh,caption:kh,colgroup:kh,dd:Fh,dt:Ph,head:kh,html:Ah,li:Nh,optgroup:Lh,option:Rh,p:Mh,rp:Ih,rt:Ih,tbody:Bh,td:Uh,tfoot:Vh,th:Uh,thead:zh,tr:Hh});function kh(e,t,n){let r=Sh(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&bh(r.value.charAt(0)))}function Ah(e,t,n){let r=Sh(n,t);return!r||r.type!==`comment`}function jh(e,t,n){let r=Sh(n,t);return!r||r.type!==`comment`}function Mh(e,t,n){let r=Sh(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 Nh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ph(e,t,n){let r=Sh(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Fh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Ih(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Lh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Rh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function zh(e,t,n){let r=Sh(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Bh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Vh(e,t,n){return!Sh(n,t)}function Hh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Uh(e,t,n){let r=Sh(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Wh=Dh({body:qh,colgroup:Jh,head:Kh,html:Gh,tbody:Yh});function Gh(e){let t=Sh(e,-1);return!t||t.type!==`comment`}function Kh(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function qh(e){let t=Sh(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&bh(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Jh(e,t,n){let r=Ch(n,t),i=Sh(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Oh(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Yh(e,t,n){let r=Ch(n,t),i=Sh(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Oh(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Xh={name:[[`
|
|
13
|
+
\f\r &/=>`.split(``),`
|
|
14
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
15
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
16
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
17
|
+
\f\r &>`.split(``),`\0
|
|
18
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
19
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
20
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Zh(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Bm);let l=Qh(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Wh(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Oh(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Qh(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=$h(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function $h(e,t,n){let r=Im(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=uh(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Xh.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?_h:vh)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=uh(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Xh.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&gh(n,o)>gh(n,e.alternative)&&(o=e.alternative),s=o+uh(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Xh.single:Xh.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var eg=[`<`,`&`];function tg(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:uh(e.value,Object.assign({},r.settings.characterReferences,{subset:eg}))}function ng(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tg(e,t,n,r)}function rg(e,t,n,r){return r.all(e)}var ig=Hm(`type`,{invalid:ag,unknown:og,handlers:{comment:mh,doctype:hh,element:Zh,raw:ng,root:rg,text:tg}});function ag(e){throw Error("Expected node, not `"+e+"`")}function og(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var sg={},cg={},lg=[];function ug(e,t){let n=t||sg,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:dg,all:fg,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||sm,characterReferences:n.characterReferences||cg,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Bm:zm,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function dg(e,t,n){return ig(e,t,n,this)}function fg(e){let t=[],n=e&&e.children||lg,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var pg=/\s+/g;function mg(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(pg)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(pg);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var hg=/:?lang=["']([^"']+)["']/g,gg=/(?:```|~~~)([\w-]+)/g,_g=/\\begin\{([\w-]+)\}/g,vg=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,yg=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function bg(e){let t=kp(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function xg(e,t,n){let r=new Set;for(let t of e.matchAll(hg)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(gg)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(_g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(vg)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(yg.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Sg=[`color`,`background-color`];function Cg(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function wg(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function Tg(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=wg(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return Cg(e,a)})):e}function Eg(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Dg(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Sg.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new J('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Dg(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&af.Italic&&(t[`font-style`]=`italic`),e.fontStyle&af.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&af.Underline&&n.push(`underline`),e.fontStyle&af.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Og(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function kg(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=bg(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new J(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new J(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new J(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Ag(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Tg(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new J(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=jg(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new J(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new J(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&mg(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Ag(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new J(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new J(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function jg(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(jg).join(``):``}var Mg=[kg()];function Ng(e){let t=Pg(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Mg]}function Pg(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Fg=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ig={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Lg(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Rg(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function zg(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)Ig[r]&&t.push({type:`setDecoration`,value:Ig[r]});else if(r<=29){let e=Ig[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Fg[r-30]}});else if(r===38){let n=Rg(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Fg[r-40]}});else if(r===48){let n=Rg(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Fg[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Fg[r-100+8]}})}}return t}function Bg(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Lg(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=zg(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Vg={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 Hg(e=Vg){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Fg.length;e++)r.push(t(Fg[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Ug=/#([0-9a-f]{3,8})/i,Wg=/var\((--[\w-]+-ansi-[\w-]+)\)/,Gg={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 Kg(e,t,n){let r=bp(e,n),i=kp(t),a=Hg(Object.fromEntries(Fg.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Gg[t]]}))),o=Bg();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=xp(i,r),o=xp(o,r),n.decorations.has(`dim`)&&(i=qg(i));let s=af.None;return n.decorations.has(`bold`)&&(s|=af.Bold),n.decorations.has(`italic`)&&(s|=af.Italic),n.decorations.has(`underline`)&&(s|=af.Underline),n.decorations.has(`strikethrough`)&&(s|=af.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function qg(e){let t=e.match(Ug);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(Wg);return n?`var(${n[1]}-dim)`:e}function Jg(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!wp(r)&&!Ep(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Kg(r,t,n)}return Xp(e,t,n)}function Yg(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new J("`themes` option must not be empty");let p=am(e,t,n,Jg);if(c=Wp(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new J(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Eg(e,h,u,l,d))),c&&Up(a,c);let g=f.map(e=>bp(e.theme,n));i=Xg(f,m,g,u,l,`fg`,d),r=Xg(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=bp(n.theme,n);a=Jg(e,t,n);let l=e.getTheme(n.theme);r=xp(l.bg,s),i=xp(l.fg,s),o=l.name,c=Wp(a)}else throw new J("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Xg(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=xp(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new J('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${xp(t[r][a],n[r])||`inherit`}, ${xp(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var Zg=/^\s+$/,Qg=/^(\s*)(.*?)(\s*)$/;function $g(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>$g(e,t,n),codeToTokens:(t,n)=>Yg(e,t,n)}){let i=t;for(let e of Ng(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Yg(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=t_(a):d===`never`&&(a=n_(a)),f&&(a=r_(a));let p={...r,get source(){return i}};for(let e of Ng(n))a=e.tokens?.call(p,a)||a;return e_(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function e_(e,t,n,r=Wp(e)){let i=Ng(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:mg,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
21
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Og(a.htmlStyle||Dg(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Up(m,r),m}function t_(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&af.Underline||i.fontStyle&af.Strikethrough));o&&Zg.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function n_(e){return e.map(e=>e.flatMap(e=>{if(Zg.test(e.content))return e;let t=e.content.match(Qg);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function r_(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Og(e.htmlStyle||Dg(e)),i=Og(n.htmlStyle||Dg(n)),a=e.fontStyle&&(e.fontStyle&af.Underline||e.fontStyle&af.Strikethrough),o=n.fontStyle&&(n.fontStyle&af.Underline||n.fontStyle&af.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var i_=ug;function a_(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>$g(e,t,n),codeToTokens:(t,n)=>Yg(e,t,n)},i=i_($g(e,t,n,r));for(let e of Ng(n))i=e.postprocess?.call(r,i,n)||i;return i}async function o_(e){let t=await Vp(e);return{getLastGrammarState:(...e)=>Zp(t,...e),codeToTokensBase:(e,n)=>Jg(t,e,n),codeToTokensWithThemes:(e,n)=>am(t,e,n),codeToTokens:(e,n)=>Yg(t,e,n),codeToHast:(e,n)=>$g(t,e,n),codeToHtml:(e,n)=>a_(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function s_(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Tp(n))return[];let r=t[n];if(!r)throw new J(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Dp(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new J(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await o_({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function c_(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function l_(e,t){let n=c_(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var u_=s_({langs:sd,themes:cd,engine:()=>(0,Ld.createOnigurumaEngine)(K(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url))}),{codeToHtml:d_,codeToHast:f_,codeToTokens:p_,codeToTokensBase:m_,codeToTokensWithThemes:h_,getSingletonHighlighter:g_,getLastGrammarState:__}=l_(u_,{guessEmbeddedLanguages:xg}),v_=4294967295,y_=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:v_,end:v_,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function b_(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function x_(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var S_=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),C_=String.raw;function w_(e,t){if(e==null)throw Error(t??`Value expected`);return e}var T_=C_`\[\^?`,E_=`c.? | C(?:-.?)?|${C_`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${C_`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${C_`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${C_`o\{[^\}]*\}?`}|${C_`\d{1,3}`}`,D_=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,O_=new RegExp(C_`
|
|
22
|
+
\\ (?:
|
|
23
|
+
${E_}
|
|
24
|
+
| [gk]<[^>]*>?
|
|
25
|
+
| [gk]'[^']*'?
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \( (?:
|
|
29
|
+
\? (?:
|
|
30
|
+
[:=!>({]
|
|
31
|
+
| <[=!]
|
|
32
|
+
| <[^>]*>
|
|
33
|
+
| '[^']*'
|
|
34
|
+
| ~\|?
|
|
35
|
+
| #(?:[^)\\]|\\.?)*
|
|
36
|
+
| [^:)]*[:)]
|
|
37
|
+
)?
|
|
38
|
+
| \*[^\)]*\)?
|
|
39
|
+
)?
|
|
40
|
+
| (?:${D_.source})+
|
|
41
|
+
| ${T_}
|
|
42
|
+
| .
|
|
43
|
+
`.replace(/\s+/g,``),`gsu`),k_=new RegExp(C_`
|
|
44
|
+
\\ (?:
|
|
45
|
+
${E_}
|
|
46
|
+
| .
|
|
47
|
+
)
|
|
48
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
+
| ${T_}
|
|
50
|
+
| &&
|
|
51
|
+
| .
|
|
52
|
+
`.replace(/\s+/g,``),`gsu`);function A_(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=ov(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(O_.lastIndex=0;s=O_.exec(e);){let t=j_(a,e,s[0],O_.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(O_.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?cv(e,u):e).flat(),flags:r}}function j_(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=M_(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:I_(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:X_(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:L_(n)}}if(a===`K`)return{token:W_(`keep`,n)};if(a===`N`||a===`R`)return{token:U_(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:U_(`any`,n)};if(a===`X`)return{token:U_(`text_segment`,n)};let e=P_(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:tv(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ev(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:q_(`group`,n)};if(n===`(?>`)return{token:q_(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:q_(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:q_(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:q_(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:K_(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
53
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:U_(`dot`,n)}:n===`^`||n===`$`?{token:I_(e.singleline?{"^":C_`\A`,$:C_`\Z`}[n]:n,n)}:n===`|`?{token:F_(n)}:D_.test(n)?{tokens:lv(n)}:{token:R_(b_(n),n)}}function M_(e,t,n){let r=[H_(t[1]===`^`,t)],i=1,a;for(k_.lastIndex=n;a=k_.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(H_(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(R_(93,e));else if(i--,r.push(z_(e)),!i)break}else{let t=N_(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:k_.lastIndex||e.length}}function N_(e){if(e[0]===`\\`)return P_(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!S_.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return U_(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?B_(e):e===`&&`?V_(e):R_(b_(e),e)}function P_(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return $_(e);if(`dDhHsSwW`.includes(n))return rv(e);if(e.startsWith(C_`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return iv(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return R_(b_(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return R_(sv(e),e);if(Q_.has(n))return R_(Q_.get(n),e);if(/\d/.test(n))return G_(t,e);if(e===`\\`)throw Error(C_`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return R_(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function F_(e){return{type:`Alternator`,raw:e}}function I_(e,t){return{type:`Assertion`,kind:e,raw:t}}function L_(e){return{type:`Backreference`,raw:e}}function R_(e,t){return{type:`Character`,value:e,raw:t}}function z_(e){return{type:`CharacterClassClose`,raw:e}}function B_(e){return{type:`CharacterClassHyphen`,raw:e}}function V_(e){return{type:`CharacterClassIntersector`,raw:e}}function H_(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function U_(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function W_(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:w_(n.flags),raw:t}}function G_(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function K_(e){return{type:`GroupClose`,raw:e}}function q_(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function J_(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Y_(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function X_(e){return{type:`Subroutine`,raw:e}}var Z_=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),Q_=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function $_(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return R_(b_(t.toUpperCase())-64,e)}function ev(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=av(n),o=av(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),W_(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,q_(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function tv(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=Z_.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return J_(l,r??null,i?.split(`,`)??null,e)}function nv(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Y_(t,n,r,e)}function rv(e){let t=e[1].toLowerCase();return U_({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function iv(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return U_(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function av(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function ov(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function sv(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function cv(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[L_(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(C_`Octal encoded byte above 177 unsupported "${n}"`)}else r=b_(t);a.push(R_(r,(e===0?`\\`:``)+t))}return a}function lv(e){let t=[],n=new RegExp(D_,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(nv(e.slice(0,-1)));continue}}}t.push(nv(e))}return t}function uv(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function dv(e){return fv.has(e.type)}var fv=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function pv(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=A_(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Cv();case`Assertion`:return mv(n);case`Backreference`:return hv(n,a);case`Character`:return Dv(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return gv(n,a,t);case`CharacterClassOpen`:return _v(n,a,t);case`CharacterSet`:return vv(n,a);case`Directive`:return jv(n.kind,{flags:n.flags});case`GroupOpen`:return yv(n,a,t);case`NamedCallout`:return Fv(n.kind,n.tag,n.arguments);case`Quantifier`:return bv(n,a);case`Subroutine`:return xv(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Rv(Mv(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(C_`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(C_`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function mv({kind:e}){return wv(w_({"^":`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===C_`\B`||e===C_`\Y`})}function hv({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i){if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`)}return t.hasNumberedRef=!0,Tv(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return Tv(r)}return i(+r)}function gv(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),kv(o,e);throw Error(`Invalid character class range`)}return Dv(b_(`-`))}function _v({negate:e},t,n){let{tokens:r,walk:i}=t,a=[Ov()],o=r[t.nextIndex],s=Yv(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(Ov()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=Yv(r[t.nextIndex],o)}let c=Ov({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function vv({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Jv(n);if(S_.has(r)&&!o?.has(r))e=`posix`,n=r;else return Bv(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Iv(n,{negate:t}):Av(e,{negate:t})}function yv(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=Vv(e),l=c.type===`AbsenceFunction`,u=Gv(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&x_(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Xv(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Cv()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(Wv(t)||t.type===`CapturingGroup`)throw Error(e)}else if(Wv(t)||Gv(t)&&t.negate)throw Error(e)}}f=Xv(r[t.nextIndex])}return t.nextIndex++,c}function bv({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!dv(a))throw Error(`Quantifier requires a repeatable token`);let o=Lv(e,t,n,a);return i.body.pop(),o}function xv({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=zv(i);return r.push(o),o}function Sv(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Hv(t?.body)}}function Cv(e){return{type:`Alternative`,body:Uv(e?.body)}}function wv(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function Tv(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Ev(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Kv(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Hv(t?.body)}}function Dv(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function Ov(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Uv(e?.body)}}function kv(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function Av(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function jv(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:w_(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Mv(e){return{type:`Flags`,...e}}function Nv(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:Hv(e?.body)}}function Pv(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Hv(e?.body)}}function Fv(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Iv(e,t){let n=!!t?.negate;if(!S_.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Lv(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Rv(e,t){return{type:`Regex`,body:Hv(t?.body),flags:e}}function zv(e){return{type:`Subroutine`,ref:e}}function Bv(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Jv(e));if(!r){if(n.normalizeUnknownPropertyNames)r=qv(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(C_`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function Vv({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return Sv(`repeater`);case`atomic`:return Nv({atomic:!0});case`capturing`:return Ev(i,{name:n});case`group`:return Nv({flags:e});case`lookahead`:case`lookbehind`:return Pv({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Hv(e){if(e===void 0)e=[Cv()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Uv(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function Wv(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Gv(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function Kv(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function qv(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Jv(e){return e.replace(/[- _]+/g,``).toLowerCase()}function Yv(e,t){let n=t;return w_(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Xv(e){return w_(e,`Unclosed group`)}function Zv(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){Qv(c).splice(Math.max(0,$v(s)+l),1),l--,u=!0},removeAllNextSiblings(){return Qv(c).splice($v(s)+1)},removeAllPrevSiblings(){let e=$v(s)+l;return l-=e,Qv(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,$v(s)+l)]=e:w_(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(Qv(c).splice(Math.max(0,$v(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,$v(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function Qv(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function $v(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var ey=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function ty(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function ny(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var ry=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function iy(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===ry.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?ry.CHAR_CLASS:ry.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function ay(e,t,n,r){iy(e,t,n,r)}function oy(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===ry.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function sy(e,t,n){return!!oy(e,t,0,n)}function cy(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var ly=new RegExp(String.raw`(?<noncapturingStart>${ey})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function uy(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(ly.lastIndex=Number.isNaN(c)?0:c+7;f=ly.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),ty(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=iy(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},ry.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var dy=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,fy=new RegExp(String.raw`
|
|
54
|
+
\\(?: \d+
|
|
55
|
+
| c[A-Za-z]
|
|
56
|
+
| [gk]<[^>]+>
|
|
57
|
+
| [pPu]\{[^\}]+\}
|
|
58
|
+
| u[A-Fa-f\d]{4}
|
|
59
|
+
| x[A-Fa-f\d]{2}
|
|
60
|
+
)
|
|
61
|
+
| \((?: \? (?: [:=!>]
|
|
62
|
+
| <(?:[=!]|[^>]+>)
|
|
63
|
+
| [A-Za-z\-]+:
|
|
64
|
+
| \(DEFINE\)
|
|
65
|
+
))?
|
|
66
|
+
| (?<qBase>${dy})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
|
+
| \\?.
|
|
68
|
+
`.replace(/\s+/g,``),`gsu`);function py(e){if(!RegExp(`${dy}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(fy.lastIndex=0;o=fy.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a){if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=ny(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}fy.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var my=String.raw,hy=my`\(\?R=(?<rDepth>[^\)]+)\)|${my`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,gy=my`\(\?<(?![=!])(?<captureName>[^>]+)>`,_y=my`${gy}|(?<unnamed>\()(?!\?)`,vy=new RegExp(my`${gy}|${hy}|\(\?|\\?.`,`gsu`),yy=`Cannot use multiple overlapping recursions`;function by(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(hy,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&sy(e,my`\(\?\(DEFINE\)`,ry.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=sy(e,my`\\[1-9]`,ry.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(vy.lastIndex=0;f=vy.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else{if(m){if(xy(m),l)throw Error(yy);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(vy.lastIndex);if(sy(s,hy,ry.DEFAULT))throw Error(yy);let c=m-1;e=Sy(t,s,c,!1,n,a,d),i=Ty(i,t,c,a.length,0,d);break}if(h){xy(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(yy);break}if(!u)throw Error(my`Recursive \g cannot be used outside the referenced group "${r===`external`?h:my`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=cy(e,p);if(o&&sy(m,my`${gy}|\((?!\?)`,ry.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Sy(_,v,b,!0,n,a,d);i=Ty(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,vy.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),vy.lastIndex),s.set(p,vy.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),vy.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function xy(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Sy(e,t,n,r,i,a,o){let s=new Set;r&&ay(e+t,gy,({groups:{captureName:e}})=>{s.add(e)},ry.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Cy(`(?:${e}`,`forward`,...c)}(?:)${Cy(`${t})`,`backward`,...c)}${t}`}function Cy(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=iy(e,my`${_y}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),wy(i,n),s?e:`(?<${t}${l}>`}return my`\k<${c}${l}>`},ry.DEFAULT)}return c}function wy(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Ty(e,t,n,r,i,a){if(e.size&&r){let o=0;ay(t,_y,()=>o++,ry.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Ey=String.fromCodePoint,Z=String.raw,Dy={},Oy=globalThis.RegExp;Dy.flagGroups=(()=>{try{new Oy(`(?i:)`)}catch{return!1}return!0})(),Dy.unicodeSets=(()=>{try{new Oy(`[[]]`,`v`)}catch{return!1}return!0})(),Dy.bugFlagVLiteralHyphenIsRange=Dy.unicodeSets?(()=>{try{new Oy(Z`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,Dy.bugNestedClassIgnoresNegation=Dy.unicodeSets&&new Oy(`[[^a]]`,`v`).test(`a`);function ky(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ay(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function jy(e,t){return Ny[e]>=Ny[t]}function My(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Ny={ES2025:2025,ES2024:2024,ES2018:2018},Py={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Fy(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!Py[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=Dy.flagGroups?`ES2025`:Dy.unicodeSets?`ES2024`:`ES2018`),t}var Iy=`[ -\r ]`,Ly=new Set([Ey(304),Ey(305)]),Ry=Z`[\p{L}\p{M}\p{N}\p{Pc}]`;function zy(e){if(Ly.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Uy.get(n),a=Vy.get(n),o=Hy.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var By=new Map(`C Other
|
|
69
|
+
Cc Control cntrl
|
|
70
|
+
Cf Format
|
|
71
|
+
Cn Unassigned
|
|
72
|
+
Co Private_Use
|
|
73
|
+
Cs Surrogate
|
|
74
|
+
L Letter
|
|
75
|
+
LC Cased_Letter
|
|
76
|
+
Ll Lowercase_Letter
|
|
77
|
+
Lm Modifier_Letter
|
|
78
|
+
Lo Other_Letter
|
|
79
|
+
Lt Titlecase_Letter
|
|
80
|
+
Lu Uppercase_Letter
|
|
81
|
+
M Mark Combining_Mark
|
|
82
|
+
Mc Spacing_Mark
|
|
83
|
+
Me Enclosing_Mark
|
|
84
|
+
Mn Nonspacing_Mark
|
|
85
|
+
N Number
|
|
86
|
+
Nd Decimal_Number digit
|
|
87
|
+
Nl Letter_Number
|
|
88
|
+
No Other_Number
|
|
89
|
+
P Punctuation punct
|
|
90
|
+
Pc Connector_Punctuation
|
|
91
|
+
Pd Dash_Punctuation
|
|
92
|
+
Pe Close_Punctuation
|
|
93
|
+
Pf Final_Punctuation
|
|
94
|
+
Pi Initial_Punctuation
|
|
95
|
+
Po Other_Punctuation
|
|
96
|
+
Ps Open_Punctuation
|
|
97
|
+
S Symbol
|
|
98
|
+
Sc Currency_Symbol
|
|
99
|
+
Sk Modifier_Symbol
|
|
100
|
+
Sm Math_Symbol
|
|
101
|
+
So Other_Symbol
|
|
102
|
+
Z Separator
|
|
103
|
+
Zl Line_Separator
|
|
104
|
+
Zp Paragraph_Separator
|
|
105
|
+
Zs Space_Separator
|
|
106
|
+
ASCII
|
|
107
|
+
ASCII_Hex_Digit AHex
|
|
108
|
+
Alphabetic Alpha
|
|
109
|
+
Any
|
|
110
|
+
Assigned
|
|
111
|
+
Bidi_Control Bidi_C
|
|
112
|
+
Bidi_Mirrored Bidi_M
|
|
113
|
+
Case_Ignorable CI
|
|
114
|
+
Cased
|
|
115
|
+
Changes_When_Casefolded CWCF
|
|
116
|
+
Changes_When_Casemapped CWCM
|
|
117
|
+
Changes_When_Lowercased CWL
|
|
118
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
119
|
+
Changes_When_Titlecased CWT
|
|
120
|
+
Changes_When_Uppercased CWU
|
|
121
|
+
Dash
|
|
122
|
+
Default_Ignorable_Code_Point DI
|
|
123
|
+
Deprecated Dep
|
|
124
|
+
Diacritic Dia
|
|
125
|
+
Emoji
|
|
126
|
+
Emoji_Component EComp
|
|
127
|
+
Emoji_Modifier EMod
|
|
128
|
+
Emoji_Modifier_Base EBase
|
|
129
|
+
Emoji_Presentation EPres
|
|
130
|
+
Extended_Pictographic ExtPict
|
|
131
|
+
Extender Ext
|
|
132
|
+
Grapheme_Base Gr_Base
|
|
133
|
+
Grapheme_Extend Gr_Ext
|
|
134
|
+
Hex_Digit Hex
|
|
135
|
+
IDS_Binary_Operator IDSB
|
|
136
|
+
IDS_Trinary_Operator IDST
|
|
137
|
+
ID_Continue IDC
|
|
138
|
+
ID_Start IDS
|
|
139
|
+
Ideographic Ideo
|
|
140
|
+
Join_Control Join_C
|
|
141
|
+
Logical_Order_Exception LOE
|
|
142
|
+
Lowercase Lower
|
|
143
|
+
Math
|
|
144
|
+
Noncharacter_Code_Point NChar
|
|
145
|
+
Pattern_Syntax Pat_Syn
|
|
146
|
+
Pattern_White_Space Pat_WS
|
|
147
|
+
Quotation_Mark QMark
|
|
148
|
+
Radical
|
|
149
|
+
Regional_Indicator RI
|
|
150
|
+
Sentence_Terminal STerm
|
|
151
|
+
Soft_Dotted SD
|
|
152
|
+
Terminal_Punctuation Term
|
|
153
|
+
Unified_Ideograph UIdeo
|
|
154
|
+
Uppercase Upper
|
|
155
|
+
Variation_Selector VS
|
|
156
|
+
White_Space space
|
|
157
|
+
XID_Continue XIDC
|
|
158
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Jv(e),e])),Vy=new Map([[`s`,Ey(383)],[Ey(383),`s`]]),Hy=new Map([[Ey(223),Ey(7838)],[Ey(107),Ey(8490)],[Ey(229),Ey(8491)],[Ey(969),Ey(8486)]]),Uy=new Map([Ky(453),Ky(456),Ky(459),Ky(498),...qy(8072,8079),...qy(8088,8095),...qy(8104,8111),Ky(8124),Ky(8140),Ky(8188)]),Wy=new Map([[`alnum`,Z`[\p{Alpha}\p{Nd}]`],[`alpha`,Z`\p{Alpha}`],[`ascii`,Z`\p{ASCII}`],[`blank`,Z`[\p{Zs}\t]`],[`cntrl`,Z`\p{Cc}`],[`digit`,Z`\p{Nd}`],[`graph`,Z`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,Z`\p{Lower}`],[`print`,Z`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,Z`[\p{P}\p{S}]`],[`space`,Z`\p{space}`],[`upper`,Z`\p{Upper}`],[`word`,Z`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,Z`\p{AHex}`]]);function Gy(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Ky(e){let t=Ey(e);return[t.toLowerCase(),t]}function qy(e,t){return Gy(e,t).map(e=>Ky(e))}var Jy=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function Yy(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};$y(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:jy(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};Zv(e,Xy,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return Zv(e,Zy,a),Zv(e,Qy,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Xy={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=Nv();e.body[0].body.push(Pv({negate:!0,body:r}),Bv(`Any`));let i=Nv();i.body[0].body.push(Lv(`greedy`,0,1/0,e)),n(vb(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Ay(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=ob(t.get(e));if(n){let t=Nv({flags:n});t.body[0].body=e.body,e.body=[vb(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(vb(Pv({body:[Cv({body:[wv(`string_end`)]}),Cv({body:[Dv(10)]})]}),t));else if(c===`line_start`)o(vb(hb(Z`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&fb(e))o(vb(Pv({negate:!0}),t));else if(d)throw Error(Z`Uses "\G" in a way that requires a subclass`);else o(_b(wv(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(vb(hb(Z`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${Ry})(?!${Ry})|(?<!${Ry})(?=${Ry}))`,n=`(?:(?<=${Ry})(?=${Ry})|(?<!${Ry})(?!${Ry}))`;o(vb(hb(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!mb(n)&&(n=ab(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!mb(r)&&(r=ab(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(vb(Ov({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(_b(Av(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(vb(gb(hb(Iy),l),t));return}if(s&&(c===`word`||u===`word`)){n(_b(Av(`word`,{negate:l}),t));return}if(c===`any`)n(_b(Bv(`Any`),t));else if(c===`digit`)n(_b(Bv(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(Z`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=Z`\p{RI}{2}|${e}(?:\u200D${e})*`;n(vb(hb(Z`(?>\r\n|${i?Z`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(_b(Bv(`AHex`,{negate:l}),t));else if(c===`newline`)n(vb(hb(l?`[^
|
|
159
|
+
]`:`(?>\r
|
|
160
|
+
?|[
|
|
161
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`){if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${Ey(e.codePointAt(0)-1)}${Ey(e.codePointAt(2)+1)}-\u{10FFFF}`),n(vb(hb(`[${e}]`),t))}else n(vb(gb(hb(Wy.get(u)),l),t))}else if(c===`property`)By.has(Jv(u))||(e.key=`sc`);else if(c===`space`)n(_b(Bv(`space`,{negate:l}),t));else if(c===`word`)n(vb(gb(hb(Ry),l),t));else throw Error(`Unexpected character set kind "${c}"`)}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`){if(!c.enable&&!c.disable)r();else{let e=Nv({flags:c});e.body[0].body=o(),i(vb(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&uv(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(Z`Uses "\K" in a way that's unsupported`);let o=Pv({behind:!0});o.body[0].body=a(),i(vb(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(vb(Pv({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=Nv();t.body[0].body.push(e.body),e.body=vb(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=lb(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(Z`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!mb(n)&&(n=ab(n,t),e.ref=n)}},Zy={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=_b(rb(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Ay(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Ay(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=ky(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!==`CapturingGroup`||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?rb(0):nb(o,r.groupOriginByCopy,null),l=c;if(!s){let e=ob(ib(o,e=>e.type===`Group`&&!!e.flags)),t=e?ky(r.globalFlags,e):r.globalFlags;eb(t,r.currentFlags)||(l=Nv({flags:sb(t)}),l.body[0].body.push(c))}n(vb(l,t),{traverse:!s})}},Qy={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>tb(t,e));i.length?i.length>1?n(vb(Nv({atomic:!0,body:i.reverse().map(e=>Cv({body:[Tv(e.number)]}))}),t)):e.ref=i[0].number:n(vb(Pv({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Ev();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&e.ref!==0&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function $y(e){Zv(e,{"*"({node:e,parent:t}){e.parent=t}})}function eb(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function tb(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=cb(n.parent);for(let r of t){if(r===n)break;if(r===e||ub(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function nb(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=nb(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function rb(e){let t=zv(e);return t.isRecursive=!0,t}function ib(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function ab(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function ob(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function sb({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function cb(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function lb(e){let t=e.find(e=>e.kind===`search_start`||pb(e,{negate:!1})||!db(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=lb(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function ub(e,t){let n=cb(e)??[];for(let e of n)if(e===t||ub(e,t))return!0;return!1}function db({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function fb(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function pb(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&uv(e.body[0],{type:`Assertion`,kind:`search_start`})}function mb(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function hb(e,t){let n=pv(e,{...t,unicodePropertyMap:By}).body;return n.length>1||n[0].body.length>1?Nv({body:n}):n[0].body[0]}function gb(e,t){return e.negate=t,e}function _b(e,t){return e.parent=t,e}function vb(e,t){return $y(e),e.parent=t,e}function yb(e,t){let n=Fy(t),r=jy(n.target,`ES2024`),i=jy(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];Zv(e,bb,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!(!e.flags.ignoreCase&&!o||s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,My(xb[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Ay(f._captureTransfers,e.transferTo,[]).push(t)}),f}var bb={"*":{enter({node:e},t){if(Nb(e)){let n=t.getCurrentModI();t.pushModI(e.flags?ky({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Nb(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Db(Ey(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Ob(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&Jy.has(e.value)&&t.setHasCasedChar()}},xb={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?Z`\B`:Z`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=Ey(e),r=kb(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Db(n)){let e=zy(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);Dy.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Fb)&&(o=[Dv(45),...o.filter(e=>!Fb(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||Dy.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=Nv(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Cv({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(Dy.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=kb(n,i),o=kb(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Ab(Ob(e)).forEach(e=>{s.add(Array.isArray(e)?`${kb(e[0],i)}-${kb(e[1],i)}`:kb(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:Z`[^\n]`;if(e===`digit`)return t?Z`\D`:Z`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Jy.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Z`\P`:Z`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?Z`\W`:Z`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=ky(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${jb(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+Mb(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:Z`\g<${t}&R=${r}>`}},Sb=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),Cb=new Set([`-`,`\\`,`]`,`^`,`[`]),wb=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Tb=new Map([[9,Z`\t`],[10,Z`\n`],[11,Z`\v`],[12,Z`\f`],[13,Z`\r`],[8232,Z`\u2028`],[8233,Z`\u2029`],[65279,Z`\uFEFF`]]),Eb=/^\p{Cased}$/u;function Db(e){return Eb.test(e)}function Ob(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=Ey(e);if(!Db(t))continue;let o=zy(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function kb(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Tb.has(e))return Tb.get(e);if(e<32||e>126&&e<160||e>262143||t&&Pb(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?wb:Cb:Sb,a=Ey(e);return(i.has(a)?`\\`:``)+a}function Ab(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function jb(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function Mb({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function Nb({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function Pb(e){return e>47&&e<58}function Fb({type:e,value:t}){return e===`Character`&&t===45}var Ib=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=Rb(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(Lb(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=zb(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function Lb(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function Rb(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Ay(n,t,{}).transferTo=e;return n}function zb(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function Bb(e,t){let n=Vb(e,t);return n.options?new Ib(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function Vb(e,t){let n=Fy(t),r=Yy(pv(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:By}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=yb(r,n),a=by(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=uy(py(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function Hb(e,t){return Bb(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Ub(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>Hb(e,{target:t.target}),{createScanner(e){return new y_(e,t)},createString(e){return{content:e}}}}async function Wb(e){if(qu())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=Hu.get(e);if(t!=null)return t;try{let t=Uu.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(sd,e)&&(t=sd[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return Vu.has(e)||Vu.set(e,n),n});return Hu.set(e,n),await n}finally{Hu.delete(e)}}function Gb(e){return Vu.get(e)??Wb(e)}function Kb(e=ju){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var qb=new Set;function Jb(e){for(let t of Kb(e))if(!qb.has(t))return!1;return!0}function Yb(e){let t=[],n=new Set;for(let r of Xb(e.themes)){let e=$b(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return Yb({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return Yb({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Xb(e){return Zb(e)?[e]:e}function Zb(e){return $b(e)||Qb(e)}function Qb(e){return typeof e.name==`string`&&typeof e.load==`function`}function $b(e){return typeof e.getThemes==`function`}function ex(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var tx=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},nx=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},rx=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function ix(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new tx(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new nx(i));let c=r,l=s().then(e=>{let a=ex(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new rx(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var ax=ix();function ox(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=ax.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,ax.getResolvedTheme(n)??ax.seedResolvedTheme(n,e);qb.has(n)||(qb.add(n),t.loadThemeSync(e))}}function sx({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:cx(t)}}function cx(e){return async()=>Np(ex(await e()))}var lx=`pierre`,ux=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],dx=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],fx=[...dx,...ux],px=new Set(dx);function mx(e){return px.has(e)?`light`:`dark`}var hx={"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`},gx={"pierre-dark":()=>K(()=>import(`./pierre-dark-CpLgRqie.js`),[],import.meta.url),"pierre-dark-soft":()=>K(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[],import.meta.url),"pierre-dark-vibrant":()=>K(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>K(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[],import.meta.url),"pierre-dark-tritanopia":()=>K(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[],import.meta.url),"pierre-light":()=>K(()=>import(`./pierre-light-CoaEpmwp.js`),[],import.meta.url),"pierre-light-soft":()=>K(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[],import.meta.url),"pierre-light-vibrant":()=>K(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>K(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[],import.meta.url),"pierre-light-tritanopia":()=>K(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[],import.meta.url)};function _x(e){return sx({name:e,collection:lx,colorScheme:mx(e),displayName:hx[e],load:gx[e]})}var vx=Yb({themes:fx.map(e=>_x(e))}),yx=`shiki`,bx=[`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`],xx=`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`.split(`.`),Sx=new Set(bx);function Cx(e){return Sx.has(e)?`light`:`dark`}var wx={andromeeda:()=>K(()=>import(`./andromeeda-vGVdxbeo.js`),[],import.meta.url),"aurora-x":()=>K(()=>import(`./aurora-x-CDeNXAV0.js`),[],import.meta.url),"ayu-dark":()=>K(()=>import(`./ayu-dark-DluEY0Gj.js`),[],import.meta.url),"ayu-light":()=>K(()=>import(`./ayu-light-C3h-C4tm.js`),[],import.meta.url),"ayu-mirage":()=>K(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[],import.meta.url),"catppuccin-frappe":()=>K(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[],import.meta.url),"catppuccin-latte":()=>K(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[],import.meta.url),"catppuccin-macchiato":()=>K(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[],import.meta.url),"catppuccin-mocha":()=>K(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[],import.meta.url),"dark-plus":()=>K(()=>import(`./dark-plus-Cs2F2srj.js`),[],import.meta.url),dracula:()=>K(()=>import(`./dracula-BHWKrbxM.js`),[],import.meta.url),"dracula-soft":()=>K(()=>import(`./dracula-soft-5eyTD99u.js`),[],import.meta.url),"everforest-dark":()=>K(()=>import(`./everforest-dark-sB-x3p7T.js`),[],import.meta.url),"everforest-light":()=>K(()=>import(`./everforest-light-Df2xbC6M.js`),[],import.meta.url),"github-dark":()=>K(()=>import(`./github-dark-C-LZuMrd.js`),[],import.meta.url),"github-dark-default":()=>K(()=>import(`./github-dark-default-DXG-b-1a.js`),[],import.meta.url),"github-dark-dimmed":()=>K(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[],import.meta.url),"github-dark-high-contrast":()=>K(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[],import.meta.url),"github-light":()=>K(()=>import(`./github-light-EUqPIrTm.js`),[],import.meta.url),"github-light-default":()=>K(()=>import(`./github-light-default-BXViO-2h.js`),[],import.meta.url),"github-light-high-contrast":()=>K(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[],import.meta.url),"gruvbox-dark-hard":()=>K(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[],import.meta.url),"gruvbox-dark-medium":()=>K(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[],import.meta.url),"gruvbox-dark-soft":()=>K(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[],import.meta.url),"gruvbox-light-hard":()=>K(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[],import.meta.url),"gruvbox-light-medium":()=>K(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[],import.meta.url),"gruvbox-light-soft":()=>K(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[],import.meta.url),horizon:()=>K(()=>import(`./horizon-CE9ld1lL.js`),[],import.meta.url),"horizon-bright":()=>K(()=>import(`./horizon-bright-DSNQnXHK.js`),[],import.meta.url),houston:()=>K(()=>import(`./houston-CsvMBhTu.js`),[],import.meta.url),"kanagawa-dragon":()=>K(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[],import.meta.url),"kanagawa-lotus":()=>K(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[],import.meta.url),"kanagawa-wave":()=>K(()=>import(`./kanagawa-wave-BML5mF2J.js`),[],import.meta.url),laserwave:()=>K(()=>import(`./laserwave-C_8bwKvT.js`),[],import.meta.url),"light-plus":()=>K(()=>import(`./light-plus-DVQuIRkW.js`),[],import.meta.url),"material-theme":()=>K(()=>import(`./material-theme-Bm3Qr25_.js`),[],import.meta.url),"material-theme-darker":()=>K(()=>import(`./material-theme-darker-2IIEA8gg.js`),[],import.meta.url),"material-theme-lighter":()=>K(()=>import(`./material-theme-lighter-uhdI0v04.js`),[],import.meta.url),"material-theme-ocean":()=>K(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[],import.meta.url),"material-theme-palenight":()=>K(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[],import.meta.url),"min-dark":()=>K(()=>import(`./min-dark-BSWPekZh.js`),[],import.meta.url),"min-light":()=>K(()=>import(`./min-light-DDpmG2fV.js`),[],import.meta.url),monokai:()=>K(()=>import(`./monokai-B_bV9PQ9.js`),[],import.meta.url),"night-owl":()=>K(()=>import(`./night-owl-DhmEMT88.js`),[],import.meta.url),"night-owl-light":()=>K(()=>import(`./night-owl-light-eJ-hLW7d.js`),[],import.meta.url),nord:()=>K(()=>import(`./nord-Cb4Vim4T.js`),[],import.meta.url),"one-dark-pro":()=>K(()=>import(`./one-dark-pro-CLwyXe_n.js`),[],import.meta.url),"one-light":()=>K(()=>import(`./one-light-D7Lr4KcI.js`),[],import.meta.url),plastic:()=>K(()=>import(`./plastic-DQwYfKfQ.js`),[],import.meta.url),poimandres:()=>K(()=>import(`./poimandres-DRFjx7u4.js`),[],import.meta.url),red:()=>K(()=>import(`./red-DX1BQOs8.js`),[],import.meta.url),"rose-pine":()=>K(()=>import(`./rose-pine-aMsaMD1D.js`),[],import.meta.url),"rose-pine-dawn":()=>K(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[],import.meta.url),"rose-pine-moon":()=>K(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[],import.meta.url),"slack-dark":()=>K(()=>import(`./slack-dark-DnToyrRv.js`),[],import.meta.url),"slack-ochin":()=>K(()=>import(`./slack-ochin-B2OO5cIa.js`),[],import.meta.url),"snazzy-light":()=>K(()=>import(`./snazzy-light-4G7pJPwS.js`),[],import.meta.url),"solarized-dark":()=>K(()=>import(`./solarized-dark-UdsmMDCL.js`),[],import.meta.url),"solarized-light":()=>K(()=>import(`./solarized-light-C1IUL_tW.js`),[],import.meta.url),"synthwave-84":()=>K(()=>import(`./synthwave-84-nFMaYfgc.js`),[],import.meta.url),"tokyo-night":()=>K(()=>import(`./tokyo-night-oM2G3aXe.js`),[],import.meta.url),vesper:()=>K(()=>import(`./vesper-DdrHHSXu.js`),[],import.meta.url),"vitesse-black":()=>K(()=>import(`./vitesse-black-fwtXNY1n.js`),[],import.meta.url),"vitesse-dark":()=>K(()=>import(`./vitesse-dark-BZCL-v6S.js`),[],import.meta.url),"vitesse-light":()=>K(()=>import(`./vitesse-light-VbXTXTou.js`),[],import.meta.url)};function Tx(e){return sx({name:e,collection:yx,colorScheme:Cx(e),load:wx[e]})}var Ex=Yb({themes:Object.freeze([...bx.map(e=>Tx(e)),...xx.map(e=>Tx(e))])});function Dx(e){if(qu())throw 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(ax.hasRegisteredTheme(e))return;let t=Ex.getTheme(e);if(t!=null){ax.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function Ox(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function kx(e){Dx(e);let t=await ax.resolveTheme(e);return Ox(e,t),t}function Ax(e){return ax.getResolvedTheme(e)??kx(e)}var jx;async function Mx({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){jx??=u_({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Id(K(()=>import(`./wasm-BnjxR4X6.js`),[],import.meta.url)):Ub()});let r=Px(jx)?await jx:jx;jx=r;let i=[];for(let e of Array.from(new Set(t))){if(e===`text`||e===`ansi`)continue;let t=Gb(e);`then`in t?i.push(t):Ku(t,r)}let a=[];for(let t of e){let e=Ax(t);`then`in e?a.push(e):ox(e,jx)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{Ku(e,r)}),Promise.all(a).then(e=>{ox(e,r)})]),r}function Nx(e){if(!(jx==null||`then`in jx)&&(e==null||Jb(e.theme)&&Gu(e.lang)))return jx}function Px(e=jx){return e!=null&&`then`in e}for(let e of vx.getThemes())ax.registerThemeIfAbsent(e.name,e.load);var Fx=new Set,Ix=null;function Lx(e){Fx.add(e),Ix??=requestAnimationFrame(zx)}function Rx(e){Fx.delete(e)&&Fx.size===0&&Ix!=null&&(cancelAnimationFrame(Ix),Ix=null)}function zx(e){let t=new Set(Fx);Fx.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}Ix=Fx.size>0?requestAnimationFrame(zx):null}function Bx(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function Vx(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function Hx(e,t){let n=e?.theme??ju,r=t?.theme??ju,i=Ux(e),a=Ux(t);return Vx(n,r)&&Bx(e,t,[`theme`,`parseDiffOptions`])&&Bx(i,a)}function Ux(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function Wx(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gx(e){return{type:`text`,value:e}}function Q({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Kx({name:e,width:t=16,height:n=16,properties:r}){return Q({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[Q({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function qx(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Jx(e){return Q({tagName:`div`,properties:{"data-gutter":``},children:e})}function Yx(e,t,n,r={}){return Q({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[Q({tagName:`span`,properties:{"data-line-number-content":``},children:[Gx(`${t}`)]})]})}function Xx(e,t,n){return Q({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 Zx(){return Q({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Kx({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function Qx(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function $x(e){for(let 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}var eS=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(),Rx(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{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){let n=!(e===this.selectedRange||Wx(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||n||i)&&(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}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;(this.isSelectionDirty()||r||i)&&(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let 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=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&$x(e.composedPath())||(bS(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;(t!==`disabled`||o||n!=null||r!=null||i!=null||a!=null)&&(bS(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(bS(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){bS(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}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();bS(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);bS(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=aS(i)&&this.hoveredLine?.lineElement===i.lineElement;iS(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),iS(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),aS(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(sS(i)&&p!=null){p(i);break}if(oS(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!aS(i))break;iS(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!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,bS(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),bS(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),bS(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&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);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=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),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&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;let t=e.composedPath();$x(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.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();let 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();let 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();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Qx(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=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),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){let{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??(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??(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){let e=document.createElement(`div`);e.innerHTML=ug(Zx());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);rS(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let 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(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(uS(t));if(rS(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(rS(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){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(rS(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&$x(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=uS(e);if(t&&$x(n))return;let r=dS(e);return r==null?this.pathFromAnnotationSlot(e):uS(r)}pathFromAnnotationSlot(e){let t=fS(e)?.previousElementSibling;if(t instanceof HTMLElement&&(t.hasAttribute(`data-line`)||t.hasAttribute(`data-column-number`)))return uS(t);let n=mS(pS(e));if(n==null)return;let r=this.targetForSelectionPoint(n);return r==null?void 0:uS(r.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=hS(t)?t:hS(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}Wx(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Lx(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let 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;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{Rx(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!_S(this.renderedSelectedLinesState,n),i=!_S(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(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:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}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,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);cS(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=yS(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=yS(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:lS(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:lS(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:vS(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:vS(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function tS({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:nS({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function nS({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function rS(e){return e!=null&&`kind`in e&&e.kind===`line`}function iS(e){return e!=null&&`kind`in e&&e.kind===`token`}function aS(e){return rS(e)||iS(e)}function oS(e){return`type`in e&&e.type===`line-info`}function sS(e){return`kind`in e&&e.kind===`merge-conflict-action`}function cS(e){return e===`current`||e===`incoming`||e===`both`}function lS(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function uS(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function dS(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function fS(e){let t=e.closest(`[slot^="annotation-"]`),n=(t instanceof HTMLElement&&t.assignedSlot!=null?t.assignedSlot:e.tagName===`SLOT`?e:void 0)?.closest(`[data-line-annotation]`);return n instanceof HTMLElement?n:void 0}function pS(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function mS(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function hS(e){return e!=null&&typeof e.elementFromPoint==`function`}function gS(e,t){return e===t||Wx(e??void 0,t??void 0)}function _S(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&gS(e?.range??null,t.range)}function vS(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function yS(e){let 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 bS(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}console.log(...n)}var xS=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),wS(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?DS(t):OS(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:SS(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:CS(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;(i||a)&&(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&TS(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function SS(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function CS(e){return Math.max(Math.ceil(e),0)}function wS(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?TS(e,{codeWidthChanged:!0,numberWidthChanged:!0}):ES(e))}function TS(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function ES(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 DS(e){e.codeElement.isConnected&&ES(e)}function OS(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`)}function kS(e){return ax.hasResolvedThemes(e)}function AS(e,t){return Vx(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function jS(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 MS(e){return Q({tagName:`div`,children:[Q({tagName:`div`,children:e.annotations?.map(e=>Q({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function NS(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 PS({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return Q({tagName:`div`,children:[t===`custom`?Q({tagName:`slot`,properties:{name:Au}}):FS({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[IS(r)]],properties:i})}function FS({name:e,prevName:t,iconType:n}){let r=[Q({tagName:`slot`,properties:{name:Du}}),Kx({name:NS(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Q({tagName:`div`,children:[Q({tagName:`bdi`,children:[Gx(t)]})],properties:{"data-prev-name":``}})),r.push(Kx({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(Q({tagName:`div`,children:[Q({tagName:`bdi`,children:[Gx(e)]})],properties:{"data-title":``}})),r.push(Q({tagName:`slot`,properties:{name:Ou}})),Q({tagName:`div`,children:r,properties:{"data-header-content":``}})}function IS(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(Q({tagName:`span`,children:[Gx(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(Q({tagName:`span`,children:[Gx(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(Q({tagName:`slot`,properties:{name:ku}})),Q({tagName:`div`,children:t,properties:{"data-metadata":``}})}function LS(e){return Q({tagName:`pre`,properties:RS(e)})}function RS({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`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:${`${a}`.length}ch;`}}var zS=new Map,BS=0,VS={"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 HS(e){if(zS.has(e))return zS.get(e)??`text`;if(VS[e]!=null)return VS[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(zS.has(t[1]))return zS.get(t[1])??`text`;if(VS[t[1]]!=null)return VS[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return zS.has(n)?zS.get(n)??`text`:VS[n]??`text`}function US(){return BS}function WS(){return Object.fromEntries(zS)}function GS(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:Kb(t),preferredHighlighter:n}}function KS(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function qS(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function JS(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}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(Gx(`
|
|
162
|
+
`)),e}var YS=Symbol(`no-token`),XS=Symbol(`multiple-tokens`);function ZS(e){let t=QS(e);if(t!=null)return t;let n=YS,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){eC(e,a);for(let t of e.children)$S(t)}else $S(e);r.push(e),i=[],a=void 0;return}for(let e of i)$S(e);r.push(Q({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==YS){if(e===XS){n=XS;return}if(n===YS){n=e;return}n!==e&&(n=XS)}};for(let t of e.children){let e=t.type===`element`?ZS(t):YS;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function QS(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function $S(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)$S(t)}}function eC(e,t){e.properties[`data-char`]=t}function tC(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+nC(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function nC(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function rC(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=qx(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&ZS(a),i.push(JS(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(aC,iC),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:iC}}var iC=tC({classPrefix:`hl-`}),aC={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function oC(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var sC=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,cC=/^0(?:\.0+)?%?$/;function lC(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function uC(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=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),i]}function dC(e){if(e==null)return null;let t=uC(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function fC(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||sC.test(t))return!0;let n=lC(t);return n!=null&&cC.test(n)}function pC(e,t,n){if(t==null||n==null)return!1;let r=dC(e),i=dC(t),a=dC(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var mC=new WeakMap;function hC(e){let t=mC.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;gC(r,`editor.background`,i),gC(r,`editor.foreground`,a),gC(r,`sideBar.background`,o),gC(r,`sideBar.foreground`,s),gC(r,`input.background`,n[`input.background`]??o),gC(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),gC(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),gC(r,`gitDecoration.addedResourceForeground`,_C(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),gC(r,`gitDecoration.modifiedResourceForeground`,_C(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),gC(r,`gitDecoration.deletedResourceForeground`,_C(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(fC(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(fC(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(vC(l,o)||pC(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return mC.set(e,u),u}function gC(e,t,n){n!=null&&n!==``&&(e[t]=n)}function _C(...e){for(let t of e)if(t!=null&&t!==``)return t}function vC(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function yC({theme:e=ju,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=hC(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${oC(`global`)}fg:${a.fg};`,r+=`${oC(`global`)}bg:${a.bg};`,r+=bC(i,n)}else{let n=t.getTheme(e.dark),i=hC(n);r+=`${oC(`global`)}dark:${i.fg};`,r+=`${oC(`global`)}dark-bg:${i.bg};`,r+=bC(n,`dark`),n=t.getTheme(e.light),i=hC(n),r+=`${oC(`global`)}light:${i.fg};`,r+=`${oC(`global`)}light-bg:${i.bg};`,r+=bC(n,`light`)}return r}function bC(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${oC(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${oC(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${oC(`global`)}${t}modified-color:${a};`),n}function xC(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}var SC=10,CC=13,wC=4,TC=40;function EC(e){let t=[0],n=e.indexOf(`\r`),r=e.indexOf(`
|
|
163
|
+
`),i=0,a=0;for(;n!==-1||r!==-1;){let o;if(n!==-1&&(r===-1||n<r)?r===n+1?(o=r+1,n=e.indexOf(`\r`,o),r=e.indexOf(`
|
|
164
|
+
`,o)):(o=n+1,n=e.indexOf(`\r`,o)):(o=r+1,r=e.indexOf(`
|
|
165
|
+
`,o)),t.push(o),++a===wC){if(o-i<=TC){for(let n=o;n<e.length;n++){let r=e.charCodeAt(n);(r===SC||r===CC)&&(r===CC&&n+1<e.length&&e.charCodeAt(n+1)===SC&&n++,t.push(n+1))}return t}i=o,a=0}}return t}function DC(e){let t=EC(e);return Array.from({length:t.length},(n,r)=>{let i=t[r],a=t[r+1]??e.length;return e.slice(i,a)})}function OC(e,t){for(let n of t)e.push(n)}var kC={forcePlainText:!1};function AC(e,t,{theme:n,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=kC){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=rC(i),f=a?`text`:e.lang??HS(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=yC({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:oC(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:oC(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=xC(t.codeToHast(jC(l?MC(c??DC(e.contents),o,s):e.contents),h)),_=l?Array(o):g;return l&&OC(_,g),{code:_,themeStyles:m,baseThemeType:p}}function jC(e){return e.replace(/\r(?!\n)/g,`
|
|
166
|
+
`)}function MC(e,t,n){if(e.length===0)return``;let r=Math.min(t+n,e.length);return e.slice(t,r).join(``)}function NC(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}var PC=`-1,-1`;function FC(e){return e?.some(e=>e.lineNumber===0)??!1}function IC(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function LC(e){return e.startingLine===0&&e.totalLines>0}function RC(e,t){return e.endsWith(`\r
|
|
167
|
+
`)?t+`\r
|
|
168
|
+
`:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
|
|
169
|
+
`)?t+`
|
|
170
|
+
`:t}function zC(e,t){return Q({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function BC(e){return(e.lang??HS(e.name))===`text`}function VC(e,t){return t.cacheKey==null?e.file===t&&e.sourceContents===t.contents:e.cacheKey===t.cacheKey}var HC=-1,UC=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`file-renderer:${++HC}`;highlighter;file;renderCache;pendingHighlightResult;computedLang=`text`;lineAnnotations={};lineCache;pendingStructuralRows;textDocumentCache=new WeakMap;editSessionActive=!1;get fileCache(){return this.renderCache?.file}constructor(e={theme:ju},t=KS,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=Jb(e.theme??ju)?Nx():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(let t of e){let e=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=e,e.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}beginEditSession(e,t){let{editSessionActive:n,renderCache:r}=this;if(this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.file=e,r==null||n&&r.file===e)return;let{options:i}=this.getRenderOptions(e),a=r.file===e,o=t!=null&&NC(r.file,t),{result:s}=r;if(!r.highlighted||s==null||!AS(r.options,i)||!a&&!o){this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap;return}if(a)return;this.renderCache={...r,file:e,result:{...s,code:[...s.code]}};let{lineCache:c}=this;this.lineCache=c!=null&&t!=null&&VC(c,t)?{cacheKey:void 0,file:e,sourceContents:e.contents,lines:c.lines}:void 0}endEditSession(e){this.editSessionActive=!1,this.pendingHighlightResult=void 0;let{renderCache:t}=this;e!=null&&t!=null&&t.file!==e&&NC(t.file,e)&&(t.file=e)}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.file=void 0,this.endEditSession(),this.textDocumentCache=new WeakMap}clearRenderCache(){this.pendingStructuralRows=void 0,this.renderCache=void 0,this.pendingHighlightResult=void 0}hydrate(e){this.file=e;let{options:t}=this.getRenderOptions(e),n=WC(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength()),r=this.workerManager?.getFileResultCache(e);r!=null&&!AS(t,r.options)&&(r=void 0),this.renderCache??={file:e,hydrated:!0,options:t,highlighted:!n&&!BC(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??(this.computedLang=e.lang??HS(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??ju}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getFileRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getFileRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{tokenizeMaxLineLength:e=1e3}=this.options;return{theme:this.getLocalHighlightTheme(),useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:e}})(),{renderCache:n}=this;return n?.result==null||!NC(e,n.file)||!AS(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getFileForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null)return e;let{renderCache:n}=this;if(n==null)return e;if(NC(n.file,e))return n.file;let r=DC(e.contents),i=e.contents.length===0||BC(e)||WC(r.length,this.getTokenizeMaxLength());return this.canRenderFile(e,t,i)?e:n.file}canRenderFile(e,t,n){let{renderCache:r}=this;return r==null||NC(r.file,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&Jb(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&Jb(t.theme)}getOrCreateLineCache(e){let{lineCache:t}=this;return(t==null||!VC(t,e))&&(t={cacheKey:e.cacheKey,file:e,sourceContents:e.contents,lines:DC(e.contents)}),this.lineCache=t,t.lines}getLineCount(e){let t=this.getOrCreateLineCache(e);return this.textDocumentCache.get(e)?.lineCount??t.length}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return;let{file:i,result:a}=r;if(a==null)return;let o=n?new Map:void 0;this.pendingStructuralRows=o;let s=this.lineCache!=null&&VC(this.lineCache,i)?this.lineCache:void 0;for(let[t,n]of e){if(o==null&&s!=null&&t<s.lines.length){let e=n.map(e=>e[2]).join(``);s.lines[t]=RC(s.lines[t]??``,e)}let e={type:`element`,tagName:`div`,properties:{"data-line":t+1,"data-line-type":`context`,"data-line-index":t},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};o==null?a.code[t]=e:o.set(t,e)}a.baseThemeType=t,r.isDirty=!0,o==null&&s!=null&&(i.contents=s.lines.join(``),s.sourceContents=i.contents)}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;if(this.pendingStructuralRows=void 0,n==null)return;let{file:r,result:i}=n;if(i==null)return;let a=this.lineCache!=null&&VC(this.lineCache,r)?this.lineCache.lines:DC(r.contents),o=DC(e.getText());if(a.length!==o.length){let r=Math.min(a.length,o.length),s=0;for(;s<r&&a[s]===o[s];)s++;let c=0;for(;c<r-s&&a[a.length-1-c]===o[o.length-1-c];)c++;let l=i.code;i.code=Array(o.length);for(let e=0;e<s;e++)i.code[e]=l[e];for(let e=0;e<c;e++)i.code[o.length-1-e]=l[a.length-1-e];if(t!==void 0)for(let[e,n]of t)e<o.length&&(i.code[e]=n);for(let t=s;t<o.length-c;t++)i.code[t]??={type:`element`,tagName:`div`,properties:{"data-line":t+1,"data-line-type":`context`,"data-line-index":t},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:e.getLineText(t)}]}]};for(let e=0;e<i.code.length;e++){let t=i.code[e];t?.type===`element`&&(t.properties[`data-line`]=e+1,t.properties[`data-line-index`]=e)}n.isDirty=!0}this.lineCache={cacheKey:r.cacheKey,file:r,sourceContents:r.contents,lines:o},this.textDocumentCache.set(r,e),r.contents=e.getText()}renderFile(e=this.file,t=zu){if(this.file=e,e==null){this.pendingHighlightResult=void 0;return}let{options:n,forceHighlight:r}=this.getRenderOptions(e),i=this.getReadyRenderResult(e,n);this.pendingHighlightResult=void 0,i!=null&&(this.renderCache={...i,file:e,renderRange:void 0},r=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};let a=this.getOrCreateLineCache(e),o=e.contents.length>0,s=!o||BC(e)||WC(a.length,this.getTokenizeMaxLength()),c=this.canRenderFile(e,n,s),l=!NC(e,this.renderCache.file),u=!jS(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let i=this.renderCache.result==null&&this.renderCache.highlighted&&!s&&!l&&qS(t);c&&!i&&(s||this.renderCache.result==null||!this.renderCache.highlighted&&(l||u))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||u||r)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,a)),this.renderCache.renderRange=t),!s&&o&&(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e)}else{this.computedLang=e.lang??HS(e.name),this.highlighter??=Nx();let t=this.highlighter!=null&&Jb(n.theme),i=this.highlighter!=null&&Gu(this.computedLang),a=!s&&i;if(c&&this.highlighter!=null&&t&&(r||s||!this.renderCache.highlighted&&a||this.renderCache.result==null)){let{result:t,options:n}=this.renderFileWithHighlighter(e,this.highlighter,s||!i);this.renderCache={file:e,options:n,highlighted:a,result:t,renderRange:void 0}}(!t||!s&&!i)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!s)})}return this.renderCache.result==null?void 0:this.processFileResult(this.renderCache.file,t,this.renderCache.result)}async asyncRender(e,t=zu){this.file=e;let{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){let t=WC(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??HS(e.name);let n=this.highlighter!=null&&kS(Kb(this.getLocalHighlightTheme())),r=t||this.highlighter!=null&&Gu(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e);return{result:AC(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let a=this.getLineCount(e),{disableFileHeader:o=!1}=this.options,s=[],c=Jx(),l=Math.min(t.startingLine+t.totalLines,a),u=0,d=LC(t)?IC(this.lineAnnotations):void 0;d!=null&&(c.children.push(Xx(`context`,`annotation`,1)),s.push(MS({type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:d.map(e=>this.annotationSlotName(e))})),u++);for(let r=t.startingLine;r<l;r++){let t=r+1,i=n[r];if(i==null){let n=`FileRenderer.processFileResult: Line doesnt exist`;throw console.error(n,{name:e.name,lineIndex:r,lineNumber:t}),Error(n)}c.children.push(Yx(`context`,t,`${r}`)),s.push(i),u++;let a=this.lineAnnotations[t];a!=null&&(c.children.push(Xx(`context`,`annotation`,1)),s.push(MS({type:`annotation`,hunkIndex:0,lineIndex:t,annotations:a.map(e=>this.annotationSlotName(e))})),u++)}return c.properties.style=`grid-row: span ${u}`,{file:e,gutterAST:c.children??[],contentAST:s,preAST:this.createPreElement(a),headerAST:o?void 0:this.renderHeader(e),totalLines:a,rowCount:u,themeStyles:r,baseThemeType:i,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderHeader(e){let{headerRenderMode:t=`default`,stickyHeader:n=!1}=this.options;return PS({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return ug(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(Q({tagName:`code`,children:this.renderCodeAST(e),properties:{"data-code":``}})),{...e.preAST,children:t}}renderCodeAST(e){let t=Jx();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,zC(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return ug(t?Q({tagName:`code`,children:e,properties:{"data-code":``}}):e)}async initializeHighlighter(){return this.highlighter=await Mx(GS(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){let{file:i,renderCache:a}=this;i!=null&&a!=null&&NC(e,i)&&AS(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&AS(a.options,n)&&NC(a.file,i)||(this.pendingHighlightResult={file:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getFileResultCache(e);if(n!=null&&AS(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&NC(n.file,e)&&AS(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{file:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&NC(e,n.file)&&AS(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){let{disableLineNumbers:t=!1,overflow:n=`scroll`}=this.options;return LS({type:`file`,diffIndicators:`none`,disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function WC(e,t){return e>t}var GC=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
171
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
172
|
+
<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"/>
|
|
173
|
+
</symbol>
|
|
174
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
175
|
+
<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"/>
|
|
176
|
+
</symbol>
|
|
177
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
178
|
+
<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"/>
|
|
179
|
+
</symbol>
|
|
180
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
181
|
+
<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"/>
|
|
182
|
+
</symbol>
|
|
183
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
184
|
+
<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"/>
|
|
185
|
+
</symbol>
|
|
186
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
187
|
+
<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"/>
|
|
188
|
+
</symbol>
|
|
189
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
190
|
+
<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"/>
|
|
191
|
+
</symbol>
|
|
192
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
193
|
+
<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"/>
|
|
194
|
+
</symbol>
|
|
195
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
196
|
+
<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"/>
|
|
197
|
+
</symbol>
|
|
198
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
199
|
+
<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"/>
|
|
200
|
+
</symbol>
|
|
201
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
202
|
+
<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"/>
|
|
203
|
+
</symbol>
|
|
204
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
205
|
+
<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"/>
|
|
206
|
+
</symbol>
|
|
207
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
208
|
+
<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"/>
|
|
209
|
+
</symbol>
|
|
210
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
211
|
+
<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"/>
|
|
212
|
+
</symbol>
|
|
213
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
214
|
+
<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"/>
|
|
215
|
+
</symbol>
|
|
216
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
217
|
+
<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"/>
|
|
218
|
+
</symbol>
|
|
219
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
220
|
+
<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"/>
|
|
221
|
+
</symbol>
|
|
222
|
+
</svg>`;function KC(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function qC(e,t){return e==null||t==null?e===t:YC(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}var JC={};function YC(e=JC,t=JC){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function XC(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function ZC(){let 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 QC(){let e=document.createElement(`style`);return e.setAttribute(Nu,``),e}var $C=`@layer base {
|
|
223
|
+
:host {
|
|
224
|
+
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
225
|
+
"Courier New", monospace;
|
|
226
|
+
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
227
|
+
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
228
|
+
--diffs-mixer: light-dark(#000, #fff);
|
|
229
|
+
--diffs-gap-fallback: 8px;
|
|
230
|
+
--diffs-scrollbar-gutter-fallback: 6px;
|
|
231
|
+
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
232
|
+
--diffs-added-light: #0dbe4e;
|
|
233
|
+
--diffs-added-dark: #5ecc71;
|
|
234
|
+
--diffs-modified-light: #009fff;
|
|
235
|
+
--diffs-modified-dark: #69b1ff;
|
|
236
|
+
--diffs-deleted-light: #ff2e3f;
|
|
237
|
+
--diffs-deleted-dark: #ff6762;
|
|
238
|
+
--diffs-warning-light: #d5a910;
|
|
239
|
+
--diffs-warning-dark: #ffd452;
|
|
240
|
+
color-scheme: light dark;
|
|
241
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
242
|
+
font-size: var(--diffs-font-size, 13px);
|
|
243
|
+
line-height: var(--diffs-line-height, 20px);
|
|
244
|
+
font-feature-settings: var(--diffs-font-features);
|
|
245
|
+
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
246
|
+
--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))));
|
|
247
|
+
--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))));
|
|
248
|
+
--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))));
|
|
249
|
+
--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))));
|
|
250
|
+
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
251
|
+
--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))));
|
|
252
|
+
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
253
|
+
--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)))));
|
|
254
|
+
--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)))));
|
|
255
|
+
--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)))));
|
|
256
|
+
--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))));
|
|
257
|
+
--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)));
|
|
258
|
+
--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))));
|
|
259
|
+
--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)));
|
|
260
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
261
|
+
--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)));
|
|
262
|
+
background-color: var(--diffs-bg);
|
|
263
|
+
color: var(--diffs-fg);
|
|
264
|
+
display: block;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
pre, code, [data-error-wrapper] {
|
|
268
|
+
isolation: isolate;
|
|
269
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
270
|
+
outline: none;
|
|
271
|
+
margin: 0;
|
|
272
|
+
padding: 0;
|
|
273
|
+
display: block;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
pre, code {
|
|
277
|
+
background-color: var(--diffs-bg);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
code {
|
|
281
|
+
contain: content;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
input, button {
|
|
285
|
+
font-family: inherit;
|
|
286
|
+
font-size: inherit;
|
|
287
|
+
line-height: inherit;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
*, :before, :after {
|
|
291
|
+
box-sizing: border-box;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
[data-icon-sprite] {
|
|
295
|
+
display: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
[data-diffs-header], [data-separator] {
|
|
299
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
[data-diffs-header][data-sticky] {
|
|
303
|
+
z-index: 1;
|
|
304
|
+
background-color: var(--diffs-bg);
|
|
305
|
+
position: sticky;
|
|
306
|
+
top: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
[data-file-info] {
|
|
310
|
+
color: var(--fg);
|
|
311
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
312
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
313
|
+
padding: 10px;
|
|
314
|
+
font-weight: 700;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[data-diff], [data-file] {
|
|
318
|
+
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
319
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
320
|
+
|
|
321
|
+
&[data-dehydrated] {
|
|
322
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
326
|
+
background-color: var(--diffs-bg-context);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@supports (-webkit-touch-callout: none) {
|
|
331
|
+
:host {
|
|
332
|
+
--diffs-scrollbar-gutter-fallback: 0px;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[data-line] span, [data-edit-prediction-suffix] span {
|
|
337
|
+
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
338
|
+
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
339
|
+
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
340
|
+
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
341
|
+
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
|
|
345
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
346
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
347
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
348
|
+
--diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
|
|
349
|
+
--diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
|
|
350
|
+
--diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
|
|
351
|
+
--diffs-line-bg: var(--diffs-computed-hovered-line-bg);
|
|
352
|
+
color: var(--diffs-fg);
|
|
353
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
[data-line], [data-no-newline] {
|
|
357
|
+
&[data-decoration-bg] {
|
|
358
|
+
--mix-deco-light: 92%;
|
|
359
|
+
--mix-deco-dark: 85%;
|
|
360
|
+
|
|
361
|
+
&[data-decoration-bg-depth="2"] {
|
|
362
|
+
--mix-deco-light: 88%;
|
|
363
|
+
--mix-deco-dark: 80%;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
&[data-decoration-bg-depth="3"] {
|
|
367
|
+
--mix-deco-light: 85%;
|
|
368
|
+
--mix-deco-dark: 78%;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
--diffs-hover-mix-target: var(--diffs-decoration-bg);
|
|
372
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
373
|
+
var(--diffs-bg) var(--mix-deco-light),
|
|
374
|
+
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
375
|
+
var(--diffs-bg) var(--mix-deco-dark),
|
|
376
|
+
var(--diffs-decoration-bg)));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
381
|
+
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
382
|
+
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
383
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
[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"] {
|
|
387
|
+
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
388
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
392
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
393
|
+
var(--diffs-bg) 78%,
|
|
394
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
395
|
+
var(--diffs-bg) 68%,
|
|
396
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
397
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
401
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
402
|
+
var(--diffs-bg) 78%,
|
|
403
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
404
|
+
var(--diffs-bg) 68%,
|
|
405
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
406
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
410
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
411
|
+
--diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
:where([data-background]) {
|
|
415
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
416
|
+
--mix-light: 91%;
|
|
417
|
+
--mix-dark: 85%;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
& [data-line], & [data-no-newline] {
|
|
421
|
+
--mix-light: 88%;
|
|
422
|
+
--mix-dark: 80%;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
426
|
+
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
427
|
+
|
|
428
|
+
&[data-line-type="change-deletion"] {
|
|
429
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
430
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
431
|
+
|
|
432
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
433
|
+
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
434
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
438
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
439
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
440
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
441
|
+
var(--diffs-diff-line-mix-target)));
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
&[data-line-type="change-addition"] {
|
|
445
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
446
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
447
|
+
|
|
448
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
449
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
450
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
454
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
455
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
456
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
457
|
+
var(--diffs-diff-line-mix-target)));
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
&[data-merge-conflict="current"] {
|
|
461
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
462
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
463
|
+
|
|
464
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
465
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
466
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
470
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
471
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
472
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
473
|
+
var(--diffs-diff-line-mix-target)));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
&[data-merge-conflict="incoming"] {
|
|
477
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
478
|
+
--diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
|
|
479
|
+
|
|
480
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
481
|
+
color: var(--diffs-modified-base);
|
|
482
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
486
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
487
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
488
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
489
|
+
var(--diffs-diff-line-mix-target)));
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
|
|
495
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
496
|
+
--diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
|
|
497
|
+
|
|
498
|
+
&:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
499
|
+
--mix-selection-light: 82%;
|
|
500
|
+
--mix-selection-dark: 75%;
|
|
501
|
+
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
&:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
|
|
505
|
+
--mix-selection-light: 75%;
|
|
506
|
+
--mix-selection-dark: 60%;
|
|
507
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
508
|
+
--diffs-hover-mix-target: var(--diffs-selection-mix-target);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
&:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
512
|
+
--diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
|
|
513
|
+
var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
|
|
514
|
+
var(--mix-selection-light),
|
|
515
|
+
var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
&:where([data-editor-overlay]), &[data-selected-line] {
|
|
519
|
+
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
520
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
521
|
+
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
522
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
523
|
+
var(--diffs-selection-mix-target)));
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
[data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
|
|
528
|
+
--diffs-computed-editor-active-line-bg: color-mix(in lab,
|
|
529
|
+
var(--diffs-computed-selected-line-bg)
|
|
530
|
+
var(--diffs-editor-active-line-source-mix, 100%),
|
|
531
|
+
var(--diffs-selection-emphasis-mix-target));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
@media (pointer: fine) {
|
|
535
|
+
[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] {
|
|
536
|
+
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
537
|
+
var(--diffs-computed-editor-active-line-bg) 97%,
|
|
538
|
+
var(--diffs-hover-mix-target)), color-mix(in lab,
|
|
539
|
+
var(--diffs-computed-editor-active-line-bg) 91%,
|
|
540
|
+
var(--diffs-hover-mix-target)));
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
[data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
|
|
545
|
+
color: var(--diffs-selection-number-fg);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
[data-no-newline] {
|
|
549
|
+
user-select: none;
|
|
550
|
+
|
|
551
|
+
& span {
|
|
552
|
+
opacity: .6;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
557
|
+
grid-template-columns: 1fr 1fr;
|
|
558
|
+
display: grid;
|
|
559
|
+
|
|
560
|
+
& [data-additions] {
|
|
561
|
+
border-left: 1px solid var(--diffs-bg);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
& [data-deletions] {
|
|
565
|
+
border-right: 1px solid var(--diffs-bg);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
[data-code] {
|
|
570
|
+
grid-auto-flow: dense;
|
|
571
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
572
|
+
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
573
|
+
overscroll-behavior-x: none;
|
|
574
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
575
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
576
|
+
padding-bottom: max(0px,
|
|
577
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
578
|
+
var(--diffs-scrollbar-gutter)));
|
|
579
|
+
scrollbar-gutter: stable;
|
|
580
|
+
align-self: flex-start;
|
|
581
|
+
display: grid;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
[data-diffs-scrollbar-measure] {
|
|
585
|
+
opacity: 0;
|
|
586
|
+
pointer-events: none;
|
|
587
|
+
scrollbar-gutter: auto;
|
|
588
|
+
grid-template-columns: none;
|
|
589
|
+
width: 100px;
|
|
590
|
+
height: 100px;
|
|
591
|
+
padding: 0;
|
|
592
|
+
position: absolute;
|
|
593
|
+
top: -200px;
|
|
594
|
+
left: -200px;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
[data-container-size] {
|
|
598
|
+
container-type: inline-size;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
[data-code]::-webkit-scrollbar {
|
|
602
|
+
width: 0;
|
|
603
|
+
height: var(--diffs-scrollbar-gutter);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
[data-code]::-webkit-scrollbar-track {
|
|
607
|
+
background: none;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
611
|
+
background-color: #0000;
|
|
612
|
+
background-clip: content-box;
|
|
613
|
+
border: 1px solid #0000;
|
|
614
|
+
border-radius: 3px;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
618
|
+
background-color: #0000;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
@supports ((-moz-appearance: none)) {
|
|
622
|
+
[data-code] {
|
|
623
|
+
scrollbar-width: thin;
|
|
624
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
625
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
630
|
+
& [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
631
|
+
padding-top: 0;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
[data-gutter] {
|
|
636
|
+
grid-template-rows: subgrid;
|
|
637
|
+
grid-template-columns: subgrid;
|
|
638
|
+
z-index: 3;
|
|
639
|
+
background-color: var(--diffs-bg);
|
|
640
|
+
grid-column: 1;
|
|
641
|
+
display: grid;
|
|
642
|
+
position: relative;
|
|
643
|
+
|
|
644
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
645
|
+
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
[data-content] {
|
|
650
|
+
grid-template-rows: subgrid;
|
|
651
|
+
grid-template-columns: subgrid;
|
|
652
|
+
background-color: var(--diffs-bg);
|
|
653
|
+
grid-column: 2;
|
|
654
|
+
min-width: 0;
|
|
655
|
+
display: grid;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
[data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
659
|
+
grid-auto-flow: dense;
|
|
660
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
661
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
662
|
+
display: grid;
|
|
663
|
+
|
|
664
|
+
& [data-code] {
|
|
665
|
+
display: contents;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
& [data-deletions] {
|
|
669
|
+
& [data-gutter] {
|
|
670
|
+
grid-column: 1;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
& [data-content] {
|
|
674
|
+
border-right: 1px solid var(--diffs-bg);
|
|
675
|
+
grid-column: 2;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
& [data-additions] {
|
|
680
|
+
& [data-gutter] {
|
|
681
|
+
border-left: 1px solid var(--diffs-bg);
|
|
682
|
+
grid-column: 3;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
& [data-content] {
|
|
686
|
+
grid-column: 4;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
|
|
692
|
+
overflow: clip;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
[data-overflow="scroll"] [data-gutter] {
|
|
696
|
+
position: sticky;
|
|
697
|
+
left: 0;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
[data-interactive-lines] [data-line] {
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
705
|
+
cursor: pointer;
|
|
706
|
+
touch-action: none;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
[data-content-buffer], [data-gutter-buffer] {
|
|
710
|
+
user-select: none;
|
|
711
|
+
min-height: 1lh;
|
|
712
|
+
position: relative;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
[data-gutter-buffer] {
|
|
716
|
+
padding-left: 2ch;
|
|
717
|
+
padding-right: 1ch;
|
|
718
|
+
|
|
719
|
+
&:before {
|
|
720
|
+
content: "";
|
|
721
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
722
|
+
display: block;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
[data-gutter-buffer="annotation"] {
|
|
727
|
+
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
728
|
+
min-height: 0;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
[data-gutter-buffer="buffer"] {
|
|
732
|
+
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
[data-content-buffer] {
|
|
736
|
+
background-position: 5px 0;
|
|
737
|
+
background-size: 8px 8px;
|
|
738
|
+
background-origin: border-box;
|
|
739
|
+
background-image: repeating-linear-gradient(-45deg,
|
|
740
|
+
transparent,
|
|
741
|
+
transparent calc(3px * 1.414),
|
|
742
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
743
|
+
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
744
|
+
grid-column: 1;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
[data-separator] {
|
|
748
|
+
box-sizing: content-box;
|
|
749
|
+
background-color: var(--diffs-bg);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
[data-separator="simple"] {
|
|
753
|
+
min-height: 4px;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
757
|
+
background-color: var(--diffs-bg-separator);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
761
|
+
height: 32px;
|
|
762
|
+
position: relative;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
[data-separator-wrapper] {
|
|
766
|
+
user-select: none;
|
|
767
|
+
fill: currentColor;
|
|
768
|
+
background-color: var(--diffs-bg);
|
|
769
|
+
align-items: center;
|
|
770
|
+
height: 100%;
|
|
771
|
+
display: flex;
|
|
772
|
+
position: absolute;
|
|
773
|
+
inset-inline: 0;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
[data-content] [data-separator-wrapper] {
|
|
777
|
+
display: none;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
[data-separator="metadata"] [data-separator-wrapper] {
|
|
781
|
+
background-color: var(--diffs-bg-separator);
|
|
782
|
+
height: 100%;
|
|
783
|
+
color: var(--diffs-fg-number);
|
|
784
|
+
white-space: nowrap;
|
|
785
|
+
text-overflow: ellipsis;
|
|
786
|
+
min-width: min-content;
|
|
787
|
+
padding-inline: 1ch;
|
|
788
|
+
inset-inline: 100% auto;
|
|
789
|
+
overflow: hidden;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
[data-separator="line-info"] {
|
|
793
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
794
|
+
|
|
795
|
+
& [data-separator-wrapper] {
|
|
796
|
+
min-width: 16px;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
801
|
+
margin-block: 0;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
[data-separator="line-info"][data-separator-first] {
|
|
805
|
+
margin-top: 0;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
[data-separator="line-info"][data-separator-last] {
|
|
809
|
+
margin-bottom: 0;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
[data-expand-index] [data-separator-wrapper] {
|
|
813
|
+
grid-template-columns: 32px auto;
|
|
814
|
+
display: grid;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
818
|
+
grid-template-columns: 32px 32px auto;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
[data-expand-button], [data-separator-content] {
|
|
822
|
+
background-color: var(--diffs-bg-separator);
|
|
823
|
+
flex: none;
|
|
824
|
+
align-items: center;
|
|
825
|
+
display: flex;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
[data-expand-index] [data-separator-content]:hover {
|
|
829
|
+
cursor: pointer;
|
|
830
|
+
text-decoration: underline;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
[data-expand-button] {
|
|
834
|
+
cursor: pointer;
|
|
835
|
+
min-width: 32px;
|
|
836
|
+
color: var(--diffs-fg-number);
|
|
837
|
+
border-right: 2px solid var(--diffs-bg);
|
|
838
|
+
flex-shrink: 0;
|
|
839
|
+
justify-content: center;
|
|
840
|
+
align-self: stretch;
|
|
841
|
+
|
|
842
|
+
&:hover {
|
|
843
|
+
color: var(--diffs-fg);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
&[data-expand-all-button] {
|
|
847
|
+
display: none;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
[data-expand-down] [data-icon] {
|
|
852
|
+
transform: scaleY(-1);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
[data-separator-content] {
|
|
856
|
+
height: 100%;
|
|
857
|
+
color: var(--diffs-fg-number);
|
|
858
|
+
flex: auto;
|
|
859
|
+
justify-content: flex-start;
|
|
860
|
+
padding: 0 1ch;
|
|
861
|
+
overflow: hidden;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
865
|
+
& [data-separator-content] {
|
|
866
|
+
user-select: none;
|
|
867
|
+
height: 100%;
|
|
868
|
+
overflow: clip;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
[data-unmodified-lines] {
|
|
873
|
+
text-overflow: ellipsis;
|
|
874
|
+
white-space: nowrap;
|
|
875
|
+
flex: 0 auto;
|
|
876
|
+
min-width: 0;
|
|
877
|
+
display: block;
|
|
878
|
+
overflow: hidden;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
@supports (width: 1cqi) {
|
|
882
|
+
[data-unified] {
|
|
883
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
884
|
+
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
885
|
+
width: 100cqi;
|
|
886
|
+
|
|
887
|
+
& [data-separator-content] {
|
|
888
|
+
border-radius: 6px;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
893
|
+
border-top-left-radius: unset;
|
|
894
|
+
border-bottom-left-radius: unset;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
[data-gutter] {
|
|
899
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
900
|
+
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
& [data-separator="line-info"] [data-separator-content] {
|
|
904
|
+
border-top-left-radius: 6px;
|
|
905
|
+
border-bottom-left-radius: 6px;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
909
|
+
border-top-left-radius: unset;
|
|
910
|
+
border-bottom-left-radius: unset;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
[data-additions] {
|
|
915
|
+
& [data-content] [data-separator="line-info"] {
|
|
916
|
+
background-color: var(--diffs-bg);
|
|
917
|
+
|
|
918
|
+
& [data-separator-wrapper] {
|
|
919
|
+
display: none;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
924
|
+
background-color: var(--diffs-bg-separator);
|
|
925
|
+
border-top-right-radius: 6px;
|
|
926
|
+
border-bottom-right-radius: 6px;
|
|
927
|
+
height: 100%;
|
|
928
|
+
display: block;
|
|
929
|
+
|
|
930
|
+
& [data-separator-content], & [data-expand-button] {
|
|
931
|
+
display: none;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
937
|
+
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
941
|
+
background-color: var(--diffs-bg-separator);
|
|
942
|
+
height: 100%;
|
|
943
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
944
|
+
border-top-right-radius: 6px;
|
|
945
|
+
border-bottom-right-radius: 6px;
|
|
946
|
+
display: block;
|
|
947
|
+
|
|
948
|
+
& [data-separator-content], & [data-expand-button] {
|
|
949
|
+
display: none;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
954
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
955
|
+
border-top-left-radius: 6px;
|
|
956
|
+
border-bottom-left-radius: 6px;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@media (pointer: fine) {
|
|
961
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
962
|
+
&[data-separator-multi-button] {
|
|
963
|
+
& [data-expand-up] {
|
|
964
|
+
border-top-left-radius: 6px;
|
|
965
|
+
border-bottom-left-radius: unset;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
& [data-expand-down] {
|
|
969
|
+
border-bottom-left-radius: 6px;
|
|
970
|
+
border-top-left-radius: unset;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
@media (pointer: coarse) {
|
|
978
|
+
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
979
|
+
grid-template-columns: 34px 34px auto;
|
|
980
|
+
|
|
981
|
+
& [data-separator-content] {
|
|
982
|
+
grid-column: unset;
|
|
983
|
+
grid-row: unset;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
@supports (width: 1cqi) {
|
|
988
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
989
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
990
|
+
border-top-left-radius: 6px;
|
|
991
|
+
border-bottom-left-radius: 6px;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
&[data-separator-multi-button] {
|
|
995
|
+
& [data-expand-up] {
|
|
996
|
+
border-top-left-radius: 6px;
|
|
997
|
+
border-bottom-left-radius: 6px;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
& [data-expand-down] {
|
|
1001
|
+
border-bottom-left-radius: unset;
|
|
1002
|
+
border-top-left-radius: unset;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
@media (pointer: fine) {
|
|
1010
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1011
|
+
grid-template-rows: 50% 50%;
|
|
1012
|
+
display: grid;
|
|
1013
|
+
|
|
1014
|
+
& [data-separator-content] {
|
|
1015
|
+
grid-area: 1 / 2 / -1;
|
|
1016
|
+
min-width: min-content;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
& [data-expand-button] {
|
|
1020
|
+
grid-column: 1;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1025
|
+
grid-template-columns: 34px auto;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
1029
|
+
grid-template-columns: 100% auto;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1033
|
+
& [data-separator-multi-button] {
|
|
1034
|
+
& [data-expand-up] {
|
|
1035
|
+
border-bottom: 1px solid var(--diffs-bg);
|
|
1036
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
& [data-expand-down] {
|
|
1040
|
+
border-top: 1px solid var(--diffs-bg);
|
|
1041
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
1048
|
+
display: none;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
[data-line-annotation] {
|
|
1052
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
1053
|
+
z-index: 2;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
[data-merge-conflict-actions] {
|
|
1057
|
+
z-index: 2;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
[data-separator="custom"] {
|
|
1061
|
+
grid-template-columns: subgrid;
|
|
1062
|
+
display: grid;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
[data-line], [data-column-number], [data-no-newline] {
|
|
1066
|
+
padding-inline: 1ch;
|
|
1067
|
+
position: relative;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
[data-indicators="classic"] [data-line] {
|
|
1071
|
+
padding-inline-start: 2ch;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
[data-indicators="classic"] {
|
|
1075
|
+
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
1076
|
+
&[data-no-newline], &[data-line] {
|
|
1077
|
+
&:before {
|
|
1078
|
+
user-select: none;
|
|
1079
|
+
width: 1ch;
|
|
1080
|
+
height: 1lh;
|
|
1081
|
+
display: inline-block;
|
|
1082
|
+
position: absolute;
|
|
1083
|
+
top: 0;
|
|
1084
|
+
left: 0;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
& [data-line-type="change-addition"] {
|
|
1090
|
+
&[data-line], &[data-no-newline] {
|
|
1091
|
+
&:before {
|
|
1092
|
+
content: "+";
|
|
1093
|
+
color: var(--diffs-addition-base);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
& [data-line-type="change-deletion"] {
|
|
1099
|
+
&[data-line], &[data-no-newline] {
|
|
1100
|
+
&:before {
|
|
1101
|
+
content: "-";
|
|
1102
|
+
color: var(--diffs-deletion-base);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
[data-indicators="bars"] {
|
|
1109
|
+
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
1110
|
+
&[data-column-number] {
|
|
1111
|
+
&:before {
|
|
1112
|
+
content: "";
|
|
1113
|
+
user-select: none;
|
|
1114
|
+
contain: strict;
|
|
1115
|
+
width: 4px;
|
|
1116
|
+
height: 100%;
|
|
1117
|
+
display: block;
|
|
1118
|
+
position: absolute;
|
|
1119
|
+
top: 0;
|
|
1120
|
+
left: 0;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
& [data-line-type="change-deletion"] {
|
|
1126
|
+
&[data-column-number] {
|
|
1127
|
+
&:before {
|
|
1128
|
+
background-image: linear-gradient(0deg,
|
|
1129
|
+
var(--diffs-bg-deletion) 50%,
|
|
1130
|
+
var(--diffs-deletion-base) 50%);
|
|
1131
|
+
background-repeat: repeat;
|
|
1132
|
+
background-size: 2px 2px;
|
|
1133
|
+
background-size: calc(1lh / round(1lh / 2px))
|
|
1134
|
+
calc(1lh / round(1lh / 2px));
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
& [data-line-type="change-addition"] {
|
|
1140
|
+
&[data-column-number] {
|
|
1141
|
+
&:before {
|
|
1142
|
+
background-color: var(--diffs-addition-base);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
[data-overflow="wrap"] {
|
|
1149
|
+
& [data-line] {
|
|
1150
|
+
white-space: pre-wrap;
|
|
1151
|
+
word-break: break-word;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
& [data-annotation-content] {
|
|
1155
|
+
word-break: break-word;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
[data-overflow="scroll"] [data-line] {
|
|
1160
|
+
white-space: pre;
|
|
1161
|
+
min-height: 1lh;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
[data-column-number] {
|
|
1165
|
+
box-sizing: content-box;
|
|
1166
|
+
text-align: right;
|
|
1167
|
+
user-select: none;
|
|
1168
|
+
color: var(--diffs-fg-number);
|
|
1169
|
+
padding-left: 2ch;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
[data-line-number-content] {
|
|
1173
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
1174
|
+
z-index: 1;
|
|
1175
|
+
display: inline-block;
|
|
1176
|
+
position: relative;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
[data-disable-line-numbers] {
|
|
1180
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1181
|
+
min-width: 4px;
|
|
1182
|
+
padding: 0;
|
|
1183
|
+
|
|
1184
|
+
&:before {
|
|
1185
|
+
min-width: 0;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
& [data-line-number-content] {
|
|
1190
|
+
display: none;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
& [data-gutter-utility-slot] {
|
|
1194
|
+
right: unset;
|
|
1195
|
+
justify-content: flex-start;
|
|
1196
|
+
left: 0;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
1200
|
+
left: 6px;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
[data-file][data-disable-line-numbers] {
|
|
1205
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1206
|
+
border-right: 0;
|
|
1207
|
+
min-width: 0;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
[data-diff-span] {
|
|
1212
|
+
box-decoration-break: clone;
|
|
1213
|
+
border-radius: 3px;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
[data-line-type="change-addition"] [data-diff-span] {
|
|
1217
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
[data-line-type="change-deletion"] [data-diff-span] {
|
|
1221
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
1225
|
+
color: var(--diffs-fg);
|
|
1226
|
+
padding-left: 1ch;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
1230
|
+
align-items: center;
|
|
1231
|
+
display: flex;
|
|
1232
|
+
|
|
1233
|
+
&:after {
|
|
1234
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1235
|
+
font-size: .75rem;
|
|
1236
|
+
font-style: normal;
|
|
1237
|
+
line-height: 1.25rem;
|
|
1238
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1239
|
+
padding-left: 1ch;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
[data-merge-conflict="marker-start"]:after {
|
|
1244
|
+
content: "(Current Change)";
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
[data-merge-conflict="marker-end"]:after {
|
|
1248
|
+
content: "(Incoming Change)";
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
[data-merge-conflict-actions-content] {
|
|
1252
|
+
min-height: 1.75rem;
|
|
1253
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1254
|
+
color: var(--diffs-fg);
|
|
1255
|
+
align-items: center;
|
|
1256
|
+
gap: .25rem;
|
|
1257
|
+
padding-inline: .5rem;
|
|
1258
|
+
font-size: .75rem;
|
|
1259
|
+
line-height: 1.2;
|
|
1260
|
+
display: flex;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
[data-merge-conflict-action] {
|
|
1264
|
+
appearance: none;
|
|
1265
|
+
color: var(--diffs-fg-number);
|
|
1266
|
+
font: inherit;
|
|
1267
|
+
cursor: pointer;
|
|
1268
|
+
background: none;
|
|
1269
|
+
border: 0;
|
|
1270
|
+
padding: 0;
|
|
1271
|
+
font-style: normal;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
[data-merge-conflict-action]:hover {
|
|
1275
|
+
color: var(--diffs-fg);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
[data-merge-conflict-action="current"]:hover {
|
|
1279
|
+
color: var(--diffs-addition-base);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
[data-merge-conflict-action="incoming"]:hover {
|
|
1283
|
+
color: var(--diffs-modified-base);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
[data-merge-conflict-action-separator] {
|
|
1287
|
+
color: var(--diffs-fg-number);
|
|
1288
|
+
opacity: .6;
|
|
1289
|
+
user-select: none;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
[data-diffs-header="default"] {
|
|
1293
|
+
background-color: var(--diffs-bg);
|
|
1294
|
+
justify-content: space-between;
|
|
1295
|
+
align-items: center;
|
|
1296
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1297
|
+
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
1298
|
+
z-index: 2;
|
|
1299
|
+
flex-direction: row;
|
|
1300
|
+
padding-inline: 16px;
|
|
1301
|
+
display: flex;
|
|
1302
|
+
position: relative;
|
|
1303
|
+
top: 0;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
[data-header-content] {
|
|
1307
|
+
align-items: center;
|
|
1308
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1309
|
+
white-space: nowrap;
|
|
1310
|
+
flex-direction: row;
|
|
1311
|
+
min-width: 0;
|
|
1312
|
+
display: flex;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
1316
|
+
text-overflow: ellipsis;
|
|
1317
|
+
white-space: nowrap;
|
|
1318
|
+
direction: rtl;
|
|
1319
|
+
min-width: 0;
|
|
1320
|
+
overflow: hidden;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
[data-prev-name] {
|
|
1324
|
+
opacity: .7;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
[data-rename-icon] {
|
|
1328
|
+
fill: currentColor;
|
|
1329
|
+
flex-grow: 0;
|
|
1330
|
+
flex-shrink: 0;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
[data-diffs-header="default"] [data-metadata] {
|
|
1334
|
+
white-space: nowrap;
|
|
1335
|
+
align-items: center;
|
|
1336
|
+
gap: 1ch;
|
|
1337
|
+
display: flex;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
[data-diffs-header="default"] [data-additions-count] {
|
|
1341
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1342
|
+
color: var(--diffs-addition-base);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
[data-diffs-header="default"] [data-deletions-count] {
|
|
1346
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1347
|
+
color: var(--diffs-deletion-base);
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
[data-change-icon] {
|
|
1351
|
+
fill: currentColor;
|
|
1352
|
+
flex-shrink: 0;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
1356
|
+
color: var(--diffs-modified-base);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
[data-change-icon="new"] {
|
|
1360
|
+
color: var(--diffs-addition-base);
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
[data-change-icon="deleted"] {
|
|
1364
|
+
color: var(--diffs-deletion-base);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
[data-change-icon="file"] {
|
|
1368
|
+
opacity: .6;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
[data-annotation-content] {
|
|
1372
|
+
z-index: 2;
|
|
1373
|
+
isolation: isolate;
|
|
1374
|
+
white-space: normal;
|
|
1375
|
+
align-self: flex-start;
|
|
1376
|
+
min-width: 0;
|
|
1377
|
+
display: flow-root;
|
|
1378
|
+
position: relative;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
1382
|
+
width: var(--diffs-column-content-width, auto);
|
|
1383
|
+
left: var(--diffs-column-number-width, 0);
|
|
1384
|
+
position: sticky;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
[data-annotation-slot] {
|
|
1388
|
+
text-wrap-mode: wrap;
|
|
1389
|
+
word-break: normal;
|
|
1390
|
+
white-space-collapse: collapse;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
[data-gutter-utility-slot] {
|
|
1394
|
+
touch-action: none;
|
|
1395
|
+
justify-content: flex-end;
|
|
1396
|
+
display: flex;
|
|
1397
|
+
position: absolute;
|
|
1398
|
+
top: 0;
|
|
1399
|
+
bottom: 0;
|
|
1400
|
+
right: 0;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
[data-utility-button] {
|
|
1404
|
+
appearance: none;
|
|
1405
|
+
cursor: pointer;
|
|
1406
|
+
width: 1lh;
|
|
1407
|
+
height: 1lh;
|
|
1408
|
+
font-size: var(--diffs-font-size, 13px);
|
|
1409
|
+
line-height: var(--diffs-line-height, 20px);
|
|
1410
|
+
background-color: var(--diffs-modified-base);
|
|
1411
|
+
color: var(--diffs-bg);
|
|
1412
|
+
fill: currentColor;
|
|
1413
|
+
z-index: 4;
|
|
1414
|
+
touch-action: none;
|
|
1415
|
+
border: none;
|
|
1416
|
+
border-radius: 4px;
|
|
1417
|
+
justify-content: center;
|
|
1418
|
+
align-items: center;
|
|
1419
|
+
margin-right: calc(-1lh + 1ch);
|
|
1420
|
+
padding: 0;
|
|
1421
|
+
display: flex;
|
|
1422
|
+
position: relative;
|
|
1423
|
+
|
|
1424
|
+
&:before {
|
|
1425
|
+
content: "";
|
|
1426
|
+
display: block;
|
|
1427
|
+
position: absolute;
|
|
1428
|
+
inset: 0 0 0 -4px;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
[data-decoration-bar-stack] {
|
|
1433
|
+
pointer-events: none;
|
|
1434
|
+
isolation: isolate;
|
|
1435
|
+
z-index: 1;
|
|
1436
|
+
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
1437
|
+
box-sizing: content-box;
|
|
1438
|
+
border-left: 2px solid var(--diffs-bg);
|
|
1439
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1440
|
+
width: 6px;
|
|
1441
|
+
position: absolute;
|
|
1442
|
+
top: 0;
|
|
1443
|
+
bottom: 0;
|
|
1444
|
+
right: -2px;
|
|
1445
|
+
|
|
1446
|
+
[data-decoration-bar-depth="1"] & {
|
|
1447
|
+
background-color: color-mix(in lab,
|
|
1448
|
+
var(--diffs-bg) 20%,
|
|
1449
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
[data-decoration-bar-depth="2"] & {
|
|
1453
|
+
background-color: color-mix(in lab,
|
|
1454
|
+
var(--diffs-bg) 45%,
|
|
1455
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
[data-decoration-bar-depth="3"] & {
|
|
1459
|
+
background-color: color-mix(in lab,
|
|
1460
|
+
var(--diffs-bg) 65%,
|
|
1461
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
[data-decoration-bar-start] & {
|
|
1465
|
+
border-top-left-radius: 5px;
|
|
1466
|
+
border-top-right-radius: 5px;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
[data-decoration-bar-end] & {
|
|
1470
|
+
z-index: 3;
|
|
1471
|
+
border-bottom-right-radius: 5px;
|
|
1472
|
+
border-bottom-left-radius: 5px;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
[data-placeholder] {
|
|
1477
|
+
contain: strict;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
[data-error-wrapper] {
|
|
1481
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1482
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1483
|
+
scrollbar-width: none;
|
|
1484
|
+
max-height: 400px;
|
|
1485
|
+
overflow: auto;
|
|
1486
|
+
|
|
1487
|
+
& [data-error-message] {
|
|
1488
|
+
color: var(--diffs-deletion-base);
|
|
1489
|
+
font-size: 18px;
|
|
1490
|
+
font-weight: bold;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
& [data-error-stack] {
|
|
1494
|
+
color: var(--diffs-fg-number);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
@layer theme, rendered, unsafe;
|
|
1500
|
+
`,ew;function tw(e){if(ew!=null)return ew;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(Pu,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),ew=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),ew}function nw(e){return`${Fu}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var rw=`@layer base, theme, rendered, unsafe;`,iw=RegExp(`${cw(Fu)}\\s*:\\s*[^;]+;`);function aw(e){return`${rw}
|
|
1501
|
+
@layer unsafe {
|
|
1502
|
+
${e}
|
|
1503
|
+
}`}function ow(e,t=`system`,n){return`${rw}
|
|
1504
|
+
@layer rendered {
|
|
1505
|
+
:host {${t===`system`?``:`
|
|
1506
|
+
color-scheme: ${t};`}
|
|
1507
|
+
${nw(n)}
|
|
1508
|
+
${e}
|
|
1509
|
+
}
|
|
1510
|
+
}`}function sw(e,t){let n=nw(t);return e.replace(iw,n)}function cw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var lw=new WeakMap;function uw(e){return lw.get(e)??e}function dw({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function fw(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function pw(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}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`)}return i?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`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function mw(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function hw(e,t,n){let r=new Map;for(let i of e){let e=uw(i);r.set(e,n?.slotNames.get(e)??t(i))}return{provided:e,current:e,slotNames:r}}function gw(e,t,n){for(let r of t){let t=uw(r);e.slotNames.has(t)||e.slotNames.set(t,n(r))}e.provided=t,e.current=t}function _w(e,t,n){if(e==null)return n(t);let r=uw(t),i=e.slotNames.get(r);return i??(i=n(t),e.slotNames.set(r,i)),i}function vw(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function yw(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:vw(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function bw(e,t){let 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??=Sw(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Sw(){let e=document.createElement(`style`);return e.setAttribute(Mu,``),e}var Cw=void 0;function ww(){return Cw??=`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;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync($C)),t.adoptedStyleSheets=[e]}connectedCallback(){tw(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(yu,t)}var Tw=[``];function Ew(e){let t={...e};return delete t.cacheKey,t}var Dw=-1,Ow=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++Dw}`;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;editSession;renderedFile;renderRange;enabled=!0;editor;constructor(e={theme:ju},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.fileRenderer=new UC(e,this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager),this.resizeManager=new xS,this.interactionManager=new eS(`file`,tS(e)),this.workerManager?.subscribeToThemeChanges(this)}getAnnotationSlotName=e=>_w(this.editSession?.annotations,e,KS);handleHighlightRender=()=>{this.rerender()};rerender(){this.enabled&&this.file!=null&&this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}getTheme(){return this.workerManager?.getFileRenderOptions().theme??this.options.theme??ju}getLatestFile(e=this.file){return this.editSession?.file??e}getRenderedFile(){return this.renderedFile}getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}updateExternalFile(e,t){if(NC(this.file,e))return!1;let n=this.editSession!=null;return this.file=e,n||this.editor!=null?this.installEditSession(e,n?void 0:this.editor?.__getDocumentContents(e),!0):this.editSession=void 0,this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=hw(t,KS,this.editSession.annotations)),!0}installEditSession(e,t,n=!1){let r=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===e.contents,i=Ew(t??e);this.editSession={file:i,externalReplacement:n&&r,annotations:this.editSession?.annotations??hw(this.lineAnnotations,KS)},this.fileRenderer.beginEditSession(i,r?e:void 0)}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(tS(this.options))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Vx(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,gw(t,e,KS))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.fileRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(e){this.code!=null&&(this.code.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.fileRenderer.getEffectiveCodeOptions()}}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{overflow:e=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:e===`wrap`,columnVariables:this.shouldApplyColumnVariables(e)?`apply`:`measure`}),this.managersDirty=!1}shouldApplyColumnVariables(e){return e===`scroll`&&this.getLatestAnnotations().length>0}cleanUp(e=!1){let t=this.editor;this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(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,e||(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,e||(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,e?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0,this.editSession=void 0,this.renderedFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,file:i,lineAnnotations:a}=e;if(!this.enabled)throw Error(`File.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`File.hydrate: hydrate can only be called before the instance has rendered or hydrated`);this.hydrateElements(t,n);let o=this.editor!=null;o||kw(this.pre,i,this.options.collapsed)||Aw(this.headerElement,i,this.options.disableFileHeader)?this.render({...e,forceRender:o||e.forceRender,preventEmit:!0}):this.hydrationSetup({file:i,lineAnnotations:a}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),fw(e,t);for(let t of Array.from(e.shadowRoot?.children??[])){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t,this.appliedPreAttributes=void 0;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}if(`diffsHeader`in t.dataset){this.headerElement=t,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({file:e,lineAnnotations:t}){this.lineAnnotations=t??this.lineAnnotations,this.file=e,this.fileRenderer.setOptions(yw(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(e),this.renderedFile=e,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(e=this.getLatestFile()){return e==null?Tw:this.fileRenderer.getOrCreateLineCache(e)}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}syncRenderViewToEditor(){let{editor:e,fileContainer:t,renderRange:n}=this,r=this.getLatestAnnotations(),i=this.getLatestFile();if(e==null||t==null||i==null)return;let a=a=>{this.enabled&&this.editor===e&&this.fileContainer===t&&this.getLatestFile()===i&&e.__syncRenderView({highlighter:a,fileContainer:t,file:i,lineAnnotations:r,renderRange:n,externalDocument:this.editSession?.externalReplacement===!0})},o=this.getTheme(),s=i.lang??HS(i.name),c=Nx({theme:o,lang:s});c==null?Mx({themes:Kb(o),langs:Array.from(new Set([`text`,s])),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.externalReplacement=!1)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(){}__attachEditor(e){if(this.editor!=null)throw Error(`File.__attachEditor: an editor is already attached`);this.editor=e;let t=()=>{this.editor=void 0,this.fileRenderer.endEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`File.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){this.editSession==null?this.file!=null&&this.installEditSession(this.file,e.__getDocumentContents(this.file)):this.fileRenderer.beginEditSession(this.editSession.file);let t=this.editSession?.file;this.fileRenderer.editorRenderReady()?(this.fileRenderer.fileCache===t&&(this.renderedFile=t),this.syncRenderViewToEditor()):this.rerender()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,file:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{file:a,annotations:o}=n;if(this.editor!=null)throw Error(`File.__completeEditSession: detach the editor before completing the session`);let s=o?.current,c,l=!1,u;if(t==null)throw Error(`File.__completeEditSession: editor is required for completion`);let d={...a},f={file:d,editor:t,originalFile:r,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(f);try{if(t.__emitEditComplete(f),this.options.onEditComplete?.(f)===`accept`){if(d.cacheKey!=null&&d.cacheKey===r.cacheKey)throw Error(`File.__completeEditSession: an accepted file must not reuse the replaced file cacheKey`);c=d}}catch(e){l=!0,u=e}e&&c!=null&&(this.file=c,s!=null&&(this.lineAnnotations=s)),this.editSession=void 0;let{renderedFile:p,file:m}=this;if(this.fileRenderer.endEditSession(m),p!=null&&m!=null&&p!==m&&NC(p,m)&&(this.renderedFile=m),e&&this.fileContainer!=null&&this.rerender(),l)throw u}applyDocumentChange(e,t){let n=this.editSession?.file;if(n==null)throw Error(`File.applyDocumentChange: requires an active edit session`);this.fileRenderer.beginEditSession(n),this.fileRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}updateRenderCache(e,t,n){let r=this.editSession?.file;if(r==null)throw Error(`File.updateRenderCache: requires an active edit session`);this.fileRenderer.beginEditSession(r),this.fileRenderer.updateRenderCache(e,t,n?.lineCountChangeInFlight)}render({file:e,fileContainer:t,forceRender:n=!1,preventEmit:r=!1,containerWrapper:i,deferManagers:a=!1,lineAnnotations:o,renderRange:s}){if(!this.enabled)throw Error(`File.render: attempting to call render after cleaned up`);this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:c=!1,themeType:l=`system`}=this.options,u=c?void 0:s,d=this.renderRange,f=this.hasThemeChanged(),p=o!=null&&(o.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(o),m=!NC(this.file,e);m&&this.updateExternalFile(e,o);let h=this.getLatestFile(e)??e;if(!c&&!n&&jS(u,this.renderRange)&&!m&&!p&&!f){let e=this.applyCachedThemeState(l);return e&&this.finalizeRender(),e}this.renderRange=u,m&&(this.cachedHeaderHTML=void 0),this.fileRenderer.setOptions(yw(this.options)),this.syncInteractionOptions(),o!=null&&this.setLineAnnotations(o),this.fileRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:g=!1,disableFileHeader:_=!1}=this.options;if(_&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),t=this.getOrCreateFileContainerNode(t,i),this.applyCachedThemeState(l),c){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.fileRenderer.renderFile(h,Bu);e!=null&&this.applyThemeState(t,e.themeStyles,l,e.baseThemeType),e?.headerAST!=null&&this.applyHeaderToDOM(e.headerAST,t,e.file),this.renderedFile=e?.file??h,this.injectUnsafeCSS()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,t)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(t);if(!this.canPartiallyRender(n,p,m||f||!NC(this.renderedFile,h))||!this.applyPartialRender(h,d,u)){let n=this.fileRenderer.renderFile(h,u);if(n==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(t,n.themeStyles,l,n.baseThemeType),n.headerAST!=null&&this.applyHeaderToDOM(n.headerAST,t,n.file),this.applyFullRender(n,e),this.renderedFile=n.file}this.applyBuffers(e,u),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,a||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,t)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;n?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}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(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(e,t,n){return!(e||t||n)}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.file){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||BC(e))return;let n=this.options.tokenizeMaxLength??1e5;this.fileRenderer.getOrCreateLineCache(e).length>n||await t.primeFileHighlightCache(e).catch(e=>{console.error(e)})}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(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!KC(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:XC(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=ZC();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=QC(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=aw(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=tw(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=xw({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:ow(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=sw(this.themeCSSStyle.textContent??``,tw(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&ww()}applyFullRender(e,t){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,e);let n=this.code=dw({code:this.code}),r=this.fileRenderer.renderCodeAST(e);this.editor?.__captureFocusForDOMReplacement();let i=()=>{if(n.childElementCount>=2)for(let e=0;e<2;e++){let t=n.children[e],i=r[e];t.innerHTML=ug(i.children),t.style.cssText=i.properties.style}else n.innerHTML=ug(r);t.contains(n)||t.replaceChildren(n)};this.shouldGuardRebuildScroll()?bw(t,i):i(),this.lastRowCount=e.rowCount}applyPartialRender(e,t,n){if(t==null||n==null)return!1;let{code:r}=this,i=r==null?void 0:this.getColumns(r);if(r==null||i==null)return!1;let a=t.startingLine,o=n.startingLine,s=t.totalLines===1/0?1/0:a+t.totalLines,c=n.totalLines===1/0?1/0:o+n.totalLines,l=Math.max(a,o),u=Math.min(s,c);if(u<=l)return!1;if(!this.trimDOMToOverlap(i.gutter,l,u)||!this.trimDOMToOverlap(i.content,l,u))throw Error(`File.applyPartialRender: failed to trim to overlap`);let{length:d}=i.content.children,f=(t,n)=>{if(!(n<=0))return this.fileRenderer.renderFile(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},p=o<l?f(o,l-o):void 0;if(p===void 0&&o<l)return!1;let m=c===1/0?1/0:Math.max(0,c-u),h=c>u?f(u,m):void 0;return h===void 0&&c>u?!1:(this.cleanupErrorWrapper(),p!=null&&(i.gutter.insertAdjacentHTML(`afterbegin`,this.fileRenderer.renderPartialHTML(p.gutterAST)),i.content.insertAdjacentHTML(`afterbegin`,this.fileRenderer.renderPartialHTML(p.contentAST)),d+=p.rowCount),h!=null&&(i.gutter.insertAdjacentHTML(`beforeend`,this.fileRenderer.renderPartialHTML(h.gutterAST)),i.content.insertAdjacentHTML(`beforeend`,this.fileRenderer.renderPartialHTML(h.contentAST)),d+=h.rowCount),this.lastRowCount!==d&&(i.gutter.style.setProperty(`grid-row`,`span ${d}`),i.content.style.setProperty(`grid-row`,`span ${d}`),this.lastRowCount=d),!0)}getColumns(e){let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}trimDOMToOverlap(e,t,n){let r=this.getDOMBoundaryIndices(e,[t,n]),i=r.get(t)??e.children.length,a=r.get(n)??e.children.length;if(i>a)return!1;for(let t=e.children.length-1;t>=a;--t)e.children[t]?.remove();for(let t=i-1;t>=0;--t)e.children[t]?.remove();return!0}getDOMBoundaryIndices(e,t){let n=[...new Set(t)].sort((e,t)=>e-t),r=new Map;if(n.length===0)return r;let i=0,a=n[i],{children:o}=e;a===0&&(r.set(0,0),i+=1,a=n[i]);for(let e=0;e<o.length;e+=1){let t=o[e];if(!(t instanceof HTMLElement))continue;let s=this.getLineIndexFromDOMNode(t);if(s!=null){for(;a!=null&&s>=a;)r.set(a,e),i+=1,a=n[i];if(i>=n.length)break}}for(let e of n)r.has(e)||r.set(e,o.length);return r}getLineIndexFromDOMNode(e){let t=e.dataset.lineIndex;if(t==null)return;let n=Number(t);return Number.isNaN(n)?void 0:n}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.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(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let r=this.cachedHeaderHTML??ug(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged)return;let{renderHeaderPrefix:i,renderHeaderFilenameSuffix:a,renderCustomHeader:o,renderHeaderMetadata:s}=this.options;if(o!=null){let e=o(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,Au,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{let e=i?.(n)??void 0,r=a?.(n)??void 0,o=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Du,e),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,Ou,r),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,ku,o),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(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}getOrCreateFileContainerNode(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:mw(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):mw(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=GC;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.code=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),e.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(e){this.code=void 0;for(let t of Array.from(e.children))if(t instanceof HTMLElement&&t.hasAttribute(`data-code`)){this.code=t;return}}applyPreNodeAttributes(e,{totalLines:t}){let{overflow:n=`scroll`,disableLineNumbers:r=!1}=this.options,i={type:`file`,split:!1,overflow:n,disableLineNumbers:r,diffIndicators:`none`,disableBackground:!0,totalLines:t};qC(i,this.appliedPreAttributes)||(pw(e,i),this.appliedPreAttributes=i)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function kw(e,t,n=!1){return!n&&e==null&&t!=null}function Aw(e,t,n=!1){return e==null&&t!=null&&!n}function jw(e){return{...Lu,...e}}function Mw(e,t){let n=Nw(e,t);return t?n:e.diffHeaderHeight+n}function Nw(e,t){return e.paddingTop??(t?e.spacing:0)}function Pw(e){return e.paddingBottom??e.spacing}function Fw(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}var Iw=5e3,Lw=new Map,Rw=-1;function zw(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 Bw=class extends Ow{virtualizer;metrics;__id=`virtualized-file:${++Rw}`;renderType=`virtualized`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0,ghostTextRows:Lw};pendingRender;isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=Lu,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){let n=jw(e);(t||!Bx(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.resetLayoutCache(),!0):!1}hasLineAnnotations(){return this.getLatestAnnotations().some(e=>e.lineNumber>0)}hasUniformLineHeights(){let{overflow:e=`scroll`}=this.options;return e===`scroll`&&!this.hasLineAnnotations()&&this.cache.heights.size===0}getLineHeight(e,t=!1){let n=this.cache.heights.get(e);if(n!=null)return n;let r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!Hx(t,e),r=zw(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 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.cache.ghostTextRows=Lw,this.renderRange!=null&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}applyGhostTextRows(e){let{heights:t,ghostTextRows:n}=this.cache;if(n===e)return!1;let{lineHeight:r}=this.metrics,i=!1;for(let a of new Set([...n.keys(),...e.keys()])){let o=n.get(a)??0,s=e.get(a)??0;if(s===o)continue;let c=(t.get(a)??r)-o*r+s*r;c===r?t.delete(a):t.set(a,c),i=!0}return this.cache.ghostTextRows=e,i}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.getLayoutFile()==null)return this.height!==0&&(e=!0),this.height=0,e;let{overflow:t=`scroll`}=this.options;this.top=this.getVirtualizedTop();let n=this.editor?.__getGhostTextRows()??Lw;if(e=this.applyGhostTextRows(n),t===`scroll`&&this.getLatestAnnotations().length===0&&!this.isResizeDebuggingEnabled())return e&&this.computeApproximateSize(!0),e;let{lineHeight:r}=this.metrics;if(this.code==null)return e;let i=this.code.children[1];if(!(i instanceof HTMLElement))return e;let a=FC(this.getLatestAnnotations());if(this.renderRange!=null&&a&&LC(this.renderRange)){let t=Vw(i)??0;t!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=t,e=!0)}else!a&&this.cache.fileAnnotationHeight!==0&&(this.cache.fileAnnotationHeight=0,e=!0);for(let t of i.children){if(!(t instanceof HTMLElement))continue;let i=t.dataset.lineIndex;if(i==null)continue;let a=Number(i),o=t.getBoundingClientRect().height+(n.get(a)??0)*r,s=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(s=!0),o+=t.nextElementSibling.getBoundingClientRect().height);let c=this.getLineHeight(a,s);o!==c&&(e=!0,o===this.metrics.lineHeight*(s?2:1)?this.cache.heights.delete(a):this.cache.heights.set(a,o))}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}));updateCodeViewLayout(e,t,n,r){let i=!NC(this.file,e);i&&this.updateExternalFile(e,r);let{pendingRenderFile:a,layoutFileChanged:o,renderedFileChanged:s,annotationsChanged:c}=this.updatePendingRender(e,r),l=n?.resetFileLayoutCache===!0||o||c;n?.metrics!=null&&(this.metrics=n.metrics,l=!0);let{collapsed:u=!1}=this.options;return this.currentCollapsed!==u&&(this.currentCollapsed=u,l=!0),l&&this.resetLayoutCache(),i&&(this.layoutDirty=!0),!this.forceRenderOverride&&(i||s||c)&&(this.forceRenderOverride=!0),this.top=t,this.computeApproximateSize(!1,a),this.height}getLayoutFile(){return this.pendingRender?.file??this.getRenderedFile()}getLinePosition(e){let t=this.getLayoutFile();if(t==null||e<1)return;let{disableFileHeader:n=!1,collapsed:r=!1}=this.options,i=this.fileRenderer.getLineCount(t)-1,a=Mw(this.metrics,n);if(r||i<0)return{top:a,height:0};let o=Math.min(Math.max(e-1,0),i),{lineHeight:s}=this.metrics;if(a+=this.cache.fileAnnotationHeight,this.hasUniformLineHeights())return{top:a+o*s,height:s};let c=this.getLayoutCheckpointBeforeLineIndex(o);a=c?.top??a;for(let e=c?.lineIndex??0;e<o;e++)a+=this.getLineHeight(e,!1);return{top:a,height:this.getLineHeight(o,!1)}}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutFile();if(t==null||this.renderRange==null)return;let{disableFileHeader:n=!1,collapsed:r=!1}=this.options;if(r||this.renderRange.totalLines<=0)return;let i=this.fileRenderer.getLineCount(t)-1;if(i<0)return;let a=Mw(this.metrics,n),o=Math.min(this.renderRange.startingLine,i),s=Math.min(o+this.renderRange.totalLines-1,i);if(s<o)return;let{fileAnnotationHeight:c}=this.cache;if(this.hasUniformLineHeights()){let{lineHeight:t}=this.metrics,n=a+(o===0?c:this.renderRange.bufferBefore),r=o+Math.max(Math.ceil((e-n)/t),0);return r>s?void 0:{lineNumber:r+1,top:a+c+r*t}}let l=a+(o===0?c:this.renderRange.bufferBefore);for(let t=o;t<=s;t++){if(l>=e)return{lineNumber:t+1,top:l};l+=this.getLineHeight(t)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutFile();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!NC(this.getRenderedFile(),this.getLatestFile()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutFile()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(this.editor?.__getGhostTextRows()??Lw);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,{lineHeight:o}=this.metrics,s=this.fileRenderer.getLineCount(t),c=Mw(this.metrics,i),l=Pw(this.metrics);if(this.height+=c,a){this.layoutDirty=!1;return}if(this.height+=this.cache.fileAnnotationHeight,this.hasUniformLineHeights())this.height+=s*o;else for(let e=0;e<s;e++)this.addLayoutCheckpoint(e,this.height),this.height+=this.getLineHeight(e,!1);if(s>0&&(this.height+=l),this.fileContainer!=null&&n&&!r){let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFile.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFile.computeApproximateSize: computed height doesnt match`,{name:t.name,elementHeight:e.height,computedHeight:this.height})}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(){if(!this.enabled||this.file==null)return;let e=this.getLatestFile(),t=e==null?void 0:this.fileRenderer.getFileForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!NC(this.getRenderedFile(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1);let i=this.getRenderedFile();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}render({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:r,...i}){let a=!NC(this.file,t);a&&(this.updateExternalFile(t,r),this.cachedHeaderHTML=void 0);let{pendingRenderFile:o,layoutFileChanged:s,renderedFileChanged:c,annotationsChanged:l}=this.pendingRender!=null&&this.pendingRender.latestFile===(this.getLatestFile(t)??t)?{pendingRenderFile:this.pendingRender.file,layoutFileChanged:!1,renderedFileChanged:!1,annotationsChanged:!1}:this.updatePendingRender(t,r),{forceRenderOverride:u,isSetup:d}=this;if(this.forceRenderOverride=void 0,(l||s)&&this.resetLayoutCache(),e=this.getOrCreateFileContainerNode(e),d)this.top??=this.getVirtualizedTop(),s&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(!1),this.computeApproximateSize(!1,o));else{this.computeApproximateSize(!1,o);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFile.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!a||!d))return this.pendingRender=void 0,this.renderPlaceholder(this.height);let f=this.virtualizer.getWindowSpecs(),p=this.top??0,m=this.computeRenderRangeFromWindow(o,p,f);return super.render({file:t,fileContainer:e,renderRange:m,lineAnnotations:r,forceRender:(u??n)||l||c||a,...i})}finalizeRender(){if(this.getRenderedFile()!==this.pendingRender?.file)throw Error(`VirtualizedFile.render: rendered a different file than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestFile(e)??e,r=this.getRenderedFile(),i=this.pendingRender?.file??r,a=this.fileRenderer.getFileForNextRender(n);return this.pendingRender={latestFile:n,file:a},{pendingRenderFile:a,annotationsChanged:this.syncLineAnnotations(t),layoutFileChanged:!NC(i,a),renderedFileChanged:!NC(r,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`}addLayoutCheckpoint(e,t){e%Iw===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;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFile: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFile: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFile: invalid checkpoint index`);if(n.lineIndex%t===0)return n}}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}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}){let{disableFileHeader:i=!1}=this.options,{hunkLineCount:a,lineHeight:o}=this.metrics,s=this.fileRenderer.getLineCount(e),c=this.height,l=Mw(this.metrics,i),u=s>0?Pw(this.metrics):0,{fileAnnotationHeight:d}=this.cache,f=l+d,p=Math.max(0,c-l-d-u),m=FC(this.getLatestAnnotations()),h=t+l,g=d>0&&m&&h<r&&h+d>n;if(t<n-c||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:c-l-u};if(s<=a)return{startingLine:0,totalLines:a,bufferBefore:0,bufferAfter:0};let _=Math.ceil(Math.max(r-n,0)/o),v=Math.ceil(_/a)*a+a,y=v/a,b=(n+r)/2;if(this.hasUniformLineHeights()){let e=t+f,i=e+p;if(!g&&!(e<r&&i>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:c-l-u};let m=Math.floor(g&&b<t+f?0:(b-(t+f))/o),h=Math.floor(m/a)-Math.floor(y/2),_=Math.ceil(s/a),x=Math.max(0,Math.min(h,_))*a,S=h<0?v+h*a:v,C=x===0?0:d+x*o,w=Math.min(S,s-x);return{startingLine:x,totalLines:S,bufferBefore:C,bufferAfter:Math.max(0,(s-x-w)*o)}}let x=y,S=[],C=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-v*o*2),a),w=t+(C?.top??f),T=C?.lineIndex??0,E,D,O,k=C?.lineIndex??0;for(let e=k;e<s;e++){let i=T%a===0,o=Math.floor(T/a);if(i&&(S[o]=w-(t+f),O!=null)){if(O<=0)break;O--}let s=this.getLineHeight(e,!1);w>n-s&&w<r&&(E??=o),w+s>b&&(D??=o),O==null&&w>=r&&i&&(O=x),T++,w+=s}if(E==null){if(g)E=0,D=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:c-l-u}}D??=E;let A=Math.round(D-y/2),j=Math.max(0,Math.ceil(s/a)-y),M=Math.max(0,Math.min(A,j)),N=M*a,ee=A<0?v+A*a:v,te=S[M]??0,P=N===0?0:d+te,F=M+ee/a,ne=F<S.length?p-S[F]:p-(w-t-f);return{startingLine:N,totalLines:ee,bufferBefore:P,bufferAfter:Math.max(0,ne)}}};function Vw(e){let t;for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===PC&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}function Hw(e,t){return e?.cacheKey!=null||t?.cacheKey!=null?e?.cacheKey===t?.cacheKey:e===t}function Uw(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Ww(e){return e.map(e=>({...e,hunkContent:e.hunkContent.map(e=>({...e}))}))}function Gw(e){return{...e,hunks:Ww(e.hunks),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function Kw(e,t){return e-(t===0?0:1)}function qw(e,t){return Kw(e,t)+t}var Jw=1;function Yw(e,...t){return`ck${Jw}:${JSON.stringify([e,...t])}`}function Xw(e){return e===``?[]:e.split(Su)}function Zw(e,t,n){let r=e===`clone`?Gw(t):t;if(!r.isPartial)throw Error(`hydratePartialDiff: fileDiff must be partial`);switch(r.type){case`change`:case`rename-changed`:return Qw(r,eT(r,n),tT(r,n));case`rename-pure`:{let e=tT(r,n);nT(r,n);let t=Xw(e.contents);return r.isPartial=!1,r.deletionLines=t,r.additionLines=t,iT(r,null,e),r}}throw Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function Qw(e,t,n){let r=Xw(t.contents),i=Xw(n.contents),{hunks:a,splitLineCount:o,unifiedLineCount:s}=$w(e.hunks,i.length);return e.hunks=a,e.splitLineCount=o,e.unifiedLineCount=s,e.isPartial=!1,e.deletionLines=r,e.additionLines=i,iT(e,t,n),e}function $w(e,t){let n=0,r=0,i=0,a=[];for(let t of e){let e=Math.max(t.additionStart-1,0),o=Math.max(t.deletionStart-1,0),s=e,c=o,l=0,u=0,d=0,f=0,p=[];for(let e of t.hunkContent){if(e.type===`context`){p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.lines,c+=e.lines,d+=e.lines,f+=e.lines;continue}p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.additions,c+=e.deletions,l+=e.additions,u+=e.deletions,d+=Math.max(e.additions,e.deletions),f+=e.additions+e.deletions}let m=Math.max(Kw(t.additionStart,t.additionCount)-i,0);a.push({...t,collapsedBefore:m,additionLineIndex:e,deletionLineIndex:o,additionLines:l,deletionLines:u,hunkContent:p,splitLineStart:n+m,unifiedLineStart:r+m,splitLineCount:d,unifiedLineCount:f}),n+=m+d,r+=m+f,i=qw(t.additionStart,t.additionCount)}if(a.length>0){let e=a[a.length-1],i=qw(e.additionStart,e.additionCount),o=Math.max(t-i,0);n+=o,r+=o}return{hunks:a,splitLineCount:n,unifiedLineCount:r}}function eT(e,t){if(t.oldFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function tT(e,t){if(t.newFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function nT(e,t){if(t.oldFile!==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function rT(e,t,n){return e.cacheKey==null?aT(t,n):`${e.cacheKey}:hydrated`}function iT(e,t,n){let r=rT(e,t,n);if(r==null){delete e.cacheKey;return}e.cacheKey=r}function aT(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?Yw(`hydrated-files`,e.cacheKey,t.cacheKey):void 0:e?.cacheKey??t?.cacheKey}function oT(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var sT=new TextEncoder,cT=new TextDecoder(`utf-8`,{ignoreBOM:!0}),lT=/[\uD800-\uDFFF]/,uT=1024,dT=new Uint8Array(uT);function fT(){dT.length!==uT&&(dT=new Uint8Array(uT))}function pT(e){if(e.length===0)return e;if(lT.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;dT.length<t&&(dT=new Uint8Array(t));let{written:n}=sT.encodeInto(e,dT);return cT.decode(dT.subarray(0,n))}var mT=4096,hT=.5;function gT(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=vT(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}_T(t,e)}}function _T(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function vT(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>mT)return null;let c=[];for(let t=0;t<n;t++)c.push(bT(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(bT(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=xT(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*hT:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var yT=/\s+/g;function bT(e){return e.replace(yT,``)}function xT(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function ST(e,t,n=!1,r){let i=BT(e),a=i?kT(e):AT(e),o,s=[];for(let e of a){if(i&&!xu.test(e)){if(o==null)o=pT(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}if(!i&&!jT(e)){if(o==null)o=pT(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let a=wT(e,{cacheKey:t==null?void 0:r==null?Yw(`patch-file`,t,String(s.length)):Yw(`patch-file`,t,String(r),String(s.length)),isGitDiff:i,throwOnError:n});a!=null&&s.push(a)}return{patchMetadata:o,files:s}}function CT(e,t){try{return wT(e,t)}finally{fT()}}function wT(e,{cacheKey:t,isGitDiff:n=xu.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=VT(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=OT(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=LT(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?DT(i.contents):[],deletionLines:!l&&r!=null&&i!=null?DT(r.contents):[],cacheKey:UT(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Tu),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=pT(r.trim()),n!==r&&(c.prevName=pT(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?wu:Cu):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=pT(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=pT(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=pT(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=pT(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=pT(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=pT(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Eu)??[];t!=null&&(c.prevObjectId=pT(t)),n!=null&&(c.newObjectId=pT(n)),r!=null&&(c.mode=pT(r))}e.startsWith(`rename from `)&&(c.prevName=pT(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=pT(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
1511
|
+
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
1512
|
+
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:UT(p.hunkContext),hunkSpecs:pT(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(!FT(t)||IT(t))break;if(a)throw Error(`parsePatchContent: hunk has more lines than expected`)}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=WT(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=GT(t);(g==null||g.type!==`change`)&&(g=KT(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=GT(t);(g==null||g.type!==`change`)&&(g=KT(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=GT(t);(g==null||g.type!==`context`)&&(g=KT(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=oT(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=oT(c.deletionLines[e]))}}}if(x!==b.additionCount||S!==b.deletionCount){if(a)throw Error(`parsePatchContent: hunk line count mismatch`);console.error(`parsePatchContent: hunk line count mismatch: "${f.trimEnd()}", declared old/new ${b.deletionCount}/${b.additionCount}, parsed old/new ${S}/${x}`);let e=Kw(b.additionStart,b.additionCount)+(x===0?0:1),t=Kw(b.deletionStart,b.deletionCount)+(S===0?0:1);if(!l){let n=e-b.additionStart,r=t-b.deletionStart;b.additionLineIndex+=n,b.deletionLineIndex+=r;for(let e of b.hunkContent)e.additionLineIndex+=n,e.deletionLineIndex+=r}b.additionStart=e,b.deletionStart=t,b.additionCount=x,b.deletionCount=S}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(Kw(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=qw(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=qw(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),gT(c),c}}function TT(e,t,n=!1){let r=[],i=ET(e)?e.split(bu):[e];for(let e of i)try{r.push(ST(e,t,n,t==null?void 0:r.length))}catch(e){if(n)throw e;console.error(e)}finally{fT()}return r}function ET(e){return e.startsWith(`From `)||e.includes(`
|
|
1513
|
+
From `)}function DT(e){let t=OT(e);for(let e=0;e<t.length;e++)t[e]=pT(t[e]);return t}function OT(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
1514
|
+
`,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 kT(e){return VT(e,`diff --git`)}function AT(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=PT(e,r);if(i<=0&&a<=0){if(MT(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=PT(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=LT(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];if(c===`\\`){r=s;continue}c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0)),r=s}return t.push(e.slice(n)),t}function jT(e){return MT(e,0)}function MT(e,t){let n=PT(e,t);return NT(e,t,`---`)&&NT(e,n,`+++`)}function NT(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
|
|
1515
|
+
`||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function PT(e,t){let n=e.indexOf(`
|
|
1516
|
+
`,t);return n===-1?e.length:n+1}function FT(e){let t=e[0];return t===`+`||t===`-`||t===` `}function IT(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
1517
|
+
`&&n!==`\r`)return!1}return!0}function LT(e){if(!e.startsWith(`@@ -`))return;let t=4,n=RT(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=RT(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=RT(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=RT(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=zT(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function RT(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function zT(e){return e.endsWith(`\r
|
|
1518
|
+
`)?e.slice(0,-2):e.endsWith(`
|
|
1519
|
+
`)?e.slice(0,-1):e}function BT(e){return e.startsWith(`diff --git`)||e.includes(`
|
|
1520
|
+
diff --git`)}function VT(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:HT(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=HT(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function HT(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function UT(e){return e==null?e:pT(e)}function WT(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function GT(e){let t=e.slice(1);return pT(t===``?`
|
|
1521
|
+
`:t)}function KT(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var qT=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},JT=new class extends qT{};function YT(e,t,n){return JT.diff(e,t,n)}function XT(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function ZT(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function QT(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function $T(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function eE(e,t){return QT(e,t,``)}function tE(e,t){return $T(e,t,``)}function nE(e,t){return t.slice(0,rE(e,t))}function rE(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function iE(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function aE(e,t){if(t)return sE(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function oE(e,t){if(t)return sE(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function sE(e,t){if(!t)return[oE(e),aE(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=iE(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var cE=`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}`,lE=RegExp(`[${cE}]+|\\s+|[^${cE}]`,`ug`);new class extends qT{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=iE(e,r)}else n=e.match(lE)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&uE(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&uE(n,i,r,null,t.intlSegmenter),e}};function uE(e,t,n,r,i){if(t&&n){let[a,o]=sE(t.value,i),[s,c]=sE(n.value,i);if(e){let r=XT(a,s);e.value=$T(e.value,s,r),t.value=eE(t.value,r),n.value=eE(n.value,r)}if(r){let e=ZT(o,c);r.value=QT(r.value,c,e),t.value=tE(t.value,e),n.value=tE(n.value,e)}}else if(n){if(e){let e=oE(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=oE(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=oE(r.value,i),[a,o]=sE(t.value,i),s=XT(n,a);t.value=eE(t.value,s);let c=ZT(eE(n,s),o);t.value=tE(t.value,c),r.value=QT(r.value,n,c),e.value=$T(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=oE(r.value,i),n=nE(aE(t.value,i),e);t.value=tE(t.value,n)}else if(e){let n=nE(aE(e.value,i),oE(t.value,i));t.value=eE(t.value,n)}}var dE=new class extends qT{tokenize(e){let t=RegExp(`(\\r?\\n)|[${cE}]+|[^\\S\\n\\r]+|[^${cE}]`,`ug`);return e.match(t)||[]}};function fE(e,t,n){return dE.diff(e,t,n)}var pE=new class extends qT{constructor(){super(...arguments),this.tokenize=hE}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
1522
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
1523
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
1524
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
1525
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function mE(e,t,n){return pE.diff(e,t,n)}function hE(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1526
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function gE(e){return e==`.`||e==`!`||e==`?`}new class extends qT{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(gE(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends qT{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends qT{constructor(){super(...arguments),this.tokenize=hE}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(_E(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function _E(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=_E(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=_E(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends qT{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function vE(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function yE(e){if(!vE(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var bE={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function xE(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;mE(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(mE(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||wE(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
1527
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function SE(e,t){if(t||=bE,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>SE(e,t)).join(`
|
|
1528
|
+
`)}let n=[];if(e.isGit){if(t=bE,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+yE(r)+` `+yE(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+yE((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+yE((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+yE((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+yE((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+yE(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+yE(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
1529
|
+
`)+`
|
|
1530
|
+
`}function CE(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;xE(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?SE(e,o.headerOptions):void 0)}}))}else{let s=xE(e,t,n,r,i,a,o);return s?SE(s,o?.headerOptions):void 0}}function wE(e){let t=e.endsWith(`
|
|
1531
|
+
`),n=e.split(`
|
|
1532
|
+
`).map(e=>e+`
|
|
1533
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var TE=`/dev/null`;function EE(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??DE(),a=t??DE(),o=CT(CE(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?Yw(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function DE(){return{name:TE,contents:``}}var OE=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function kE(e,t){return Vx(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function AE(e){return Q({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function jE(e){return Q({tagName:`div`,children:[Q({tagName:`span`,children:[Gx(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function ME(e){return Q({tagName:`div`,children:[Kx({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 NE({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(Q({tagName:`div`,children:[Gx(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(ME(`up`)),s++),o||(e.push(ME(`down`)),s++)):(e.push(ME(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(Q({tagName:`div`,children:[Q({tagName:`span`,children:[Gx(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(Q({tagName:`div`,children:[Gx(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(Q({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(Q({tagName:`slot`,properties:{name:i}})),Q({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function PE(e,t){return`hunk-separator-${e}-${t}`}function FE(e){let t=e.at(-1);return t==null?0:Math.max(qw(t.additionStart,t.additionCount),qw(t.deletionStart,t.deletionCount))}function IE({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 LE({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function RE(e){return[Kw(e.additionStart,e.additionCount)+1,qw(e.additionStart,e.additionCount)+1]}function zE({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function BE(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-qw(t.additionStart,t.additionCount),r=e.deletionLines.length-qw(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function VE({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-qw(n.additionStart,n.additionCount),i=e.deletionLines.length-qw(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function HE({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=VE({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function UE({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=RE(a);if(t<o){let s=zE({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=HE({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=RE(a);return t<o+i.fromStart||t>=o+i.rangeSize}function WE({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=RE(n),l=zE({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=HE({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function GE({type:e,metrics:t}){return t.hunkSeparatorHeight??Fw(e)}function KE({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function qE({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 JE(e){return e!==`simple`&&e!==`metadata`}function YE({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!qE({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=GE({type:e,metrics:t}),a=KE({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function XE({type:e,metrics:t}){if(!JE(e))return;let n=GE({type:e,metrics:t}),r=KE({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function ZE({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=QE({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=Kw(r.deletionStart,r.deletionCount),s=Kw(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=zE({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?HE({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(tD(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,tD(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(tD(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=nD(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(rD({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(tD(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function QE({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=$E({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function $E({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=zE({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?HE({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function eD(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function tD(e,t,n,r,i,a){let[o,s]=eD(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function nD(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function rD({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var iD={forcePlainText:!1};function aD(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=iD){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=yC({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??sD();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}ZE({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&oD({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=cD({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else OC(f.deletionLines,s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else OC(f.additionLines,c)}return{code:f,themeStyles:u,baseThemeType:l}}function oD({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=oT(e),t=oT(t),e.length>s||t.length>s))return;let c=o===`char`?YT(e,t):fE(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(LE({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),LE({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?LE({item:e,arr:l,enableJoin:d,isLastItem:t}):LE({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(IE({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(IE({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function sD(){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 cD({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c,...l}}){let u=s??HS(e.name),d=s??HS(t.name),{state:f,transformers:p}=rC(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:oC(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:oC(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,xC(i.codeToHast(oT(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,xC(i.codeToHast(oT(t.contents),m)))}}function lD(e,t){let n=EE({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 uD(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function dD(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function fD(e,t){return t.length>0&&t.length<e.deletionLines.length&&dD(t)}function pD(e,t,n){let r=e.deletionLines.join(``),i=uD(t.length,r),a=EE({name:e.prevName??e.name,contents:r},{name:e.name,contents:i,lang:e.lang},n);return{hunks:a.hunks,splitLineCount:a.splitLineCount,unifiedLineCount:a.unifiedLineCount,additionLines:t,deletionLines:a.deletionLines,type:a.type}}function mD(e,t){return pD(e,[``],t)}function hD(e,t){if(e.additionLines.length===0)return mD(e,t);if(fD(e,e.additionLines))return pD(e,e.additionLines,t);let n=e.additionLines,r=lD(e,t);return _D(r,n),r}function gD(e){return e.length>1&&e.at(-1)===``}function _D(e,t){if(!gD(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&qw(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,DD(e);return}}}function vD(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return yD(e,lD(e,n));let r=Array.from(t);if(r.length===0)return yD(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||oT(r)===oT(i))return yD(e,lD(e,n))}let i=bD(e,r);if(i.size===0)return yD(e,lD(e,n));for(let t of i)if(!SD(e,t,n))return yD(e,lD(e,n));return DD(e),BE(e)?yD(e,lD(e,n)):yD(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function yD(e,t){return Object.assign(e,t),t}function bD(e,t){let n=new Set;for(let r of t){let t=xD(e,r);if(t==null)return new Set;n.add(t)}return n}function xD(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function SD(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=EE({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(wD(r,s),CD(e,t),!0)}function CD(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
|
|
1534
|
+
`),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
|
|
1535
|
+
`)}function wD(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>TD(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,ED(e)}function TD(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function ED(e){let t=0,n=0;for(let 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 DD(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(Kw(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,ED(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=qw(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-qw(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var OD=new WeakMap;function kD(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function AD(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function jD(e,t){let n=e.hunks,r=e.additionLines,i=kD(r),a=i===r?e:{...e,additionLines:i},o=VD(n,BD(a,t),e.deletionLines.length),s=WD(a,o);if(e.additionLines=i,e.hunks=s,e.editSessionDirty=!0,eO(e),_D(e,r),qD(n,e.hunks))return{regions:o.map(e=>e.previousSpan)}}function MD(e,t,n,r){let i=Array.from(new Set(t)).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(i.length===0)return;let{hunks:a}=e,o,s=0;for(let t of i){for(;s<a.length;){let e=a[s];if(t<XD(e)+e.additionCount)break;s++}let r=a[s],i=r==null?void 0:XD(r);if(i==null||t<i||o!=null&&o!==s)return jD(e,n);o=s}if(o!=null){if(ND(e,i,o,r,n)){e.editSessionDirty=!0;return}return jD(e,n)}}function ND(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=PD(e),o=e.hunks[n];if(o.hunkContent.some(FD))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function PD(e){let t=OD.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return OD.set(e,{lines:e.deletionLines,set:n}),n}function FD(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function ID(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function LD(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=zE({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=ZD(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=HE({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=ZD(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function RD(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=ZD(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,ZD(i)+i.deletionCount,e.deletionLines.length),n}function zD(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?lD(e,t):hD(e,t)),!0)}function BD(e,t){if(AD(e.deletionLines,e.additionLines)==null)return[];let n=EE({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),r=[],i=0,a=0;for(let e of n.hunks){let t=e.additionCount>0?e.additionLineIndex-i:e.deletionLineIndex-a;i+=t,a+=t;for(let t of e.hunkContent){if(t.type===`context`){i+=t.lines,a+=t.lines;continue}let e=TD(t,0,0);e.additions===0&&(e.additionLineIndex=i),e.deletions===0&&(e.deletionLineIndex=a),r.push(e),i+=e.additions,a+=e.deletions}}return r}function VD(e,t,n){let r=e.map((e,t)=>{let n=ZD(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&HD(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=UD(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function HD(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function UD(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 WD(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);KD(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);KD(s,c,i,r),r+=c,i+=c,n.push(GD(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function GD(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:QD(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:$D(t.additionStart,r),deletionStart:QD(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:$D(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${QD(t.deletionStart,i)},${i} +${QD(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return ED(s),s}function KD(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function qD(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(ZD(r)!==ZD(i)||r.deletionCount!==i.deletionCount||XD(r)!==XD(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!JD(r,i))return!0}return!1}function JD(e,t){let n=YD(e),r=YD(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*YD(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function XD(e){return Kw(e.additionStart,e.additionCount)}function ZD(e){return Kw(e.deletionStart,e.deletionCount)}function QD(e,t){return t===0?e:e+1}function $D(e,t){return t===0?e-1:e}function eO(e){DD(e);for(let t=0;t<e.hunks.length;t++)CD(e,t)}function tO(e){let t=e.lang??HS(e.name),n=e.lang??(e.prevName==null?`text`:HS(e.prevName));return t===`text`&&n===`text`}var nO=-1,rO=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++nO}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:ju},t=KS,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=Jb(e.theme??ju)?Nx():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(e,t){let{editSessionActive:n,renderCache:r}=this;if(this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,!e.isPartial&&e.additionLines.length===0){Object.assign(e,mD(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&Hw(r.diff,t),{result:s}=r;if(!r.highlighted||s==null||!kE(r.options,i)||!a&&!o){this.clearRenderCache();return}a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!Hw(t.diff,e)||tO(e)||hO(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!Hw(n,e)||!Hw(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);kE(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let 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)??Ru}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return!1;let{result:i,diff:a}=r;if(i==null)return!1;if(a.isPartial)throw Error(`Could not update render cache for partial diff`);let o=i.code.additionLines,s=this.pendingStructuralRows=n?new Map:void 0,c=[],l=new Map;for(let[t,n]of e){let e=o[t]?.properties??{},r=n.map(e=>e[2]).join(``),i=t<a.additionLines.length,u=i?a.additionLines[t]??``:``,d=oT(u);s==null&&i&&(a.additionLines[t]=RC(u,r),d!==r&&(c.push(t),l.set(t,u)));let f={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};s==null?o[t]=f:s.set(t,f)}let u=!1;if(c.length>0){if(this.editSessionActive){if(a.additionLines.length<=1&&a.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(a,mD(a,this.options.parseDiffOptions)),u=!0;else if(fD(a,a.additionLines))this.applyRecomputePreservingSessionType(a,pD(a,a.additionLines,this.options.parseDiffOptions)),u=!0;else{let e=MD(a,c,this.options.parseDiffOptions,l);this.applyExpansionRemap(e),u=e!=null}}else Object.assign(a,vD(a,c,this.options.parseDiffOptions))}return i.baseThemeType=t,r.isDirty=!0,u}applyExpansionRemap(e){e!=null&&(this.expandedHunks=ID(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;if(this.pendingStructuralRows=void 0,n==null)return;let{diff:r,result:i}=n;if(i==null)return;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r;if(r.additionLines=mO(e),i.code.additionLines=fO(a,r.additionLines,i.code.additionLines,e),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,mD(r,this.options.parseDiffOptions)),i.code.additionLines[0]=pO(0,e.getLineText(0))):this.editSessionActive?this.applySessionDocumentChange(r):Object.assign(r,hD(r,this.options.parseDiffOptions)),t!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n.isDirty=!0}applySessionDocumentChange(e){let{parseDiffOptions:t}=this.options,n=e.additionLines;if(fD(e,n)){this.applyRecomputePreservingSessionType(e,pD(e,n,t));return}this.applyExpansionRemap(jD(e,t))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>MS(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=ju,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Iu,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await Mx(GS(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=hO(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!kE(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!tO(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??(this.computedLang=e.lang??HS(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ju}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!Hw(e,n.diff)||!kE(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(Hw(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||tO(e)||hO(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||Hw(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&Jb(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&Jb(t.theme)}renderDiff(e=this.diff,t=zu){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||tO(e)||hO(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!Hw(e,this.renderCache.diff),d=!jS(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&qS(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,qS(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??HS(e.name),this.highlighter??=Nx();let t=this.highlighter!=null&&Jb(i.theme),n=this.highlighter!=null&&Gu(this.computedLang),r=!c&&n;if(l&&this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=zu){this.diff=e;let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return LS({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=hO(e,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??HS(e.name);let n=this.highlighter!=null&&Jb(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&Gu(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=aD(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(ZE({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=pO(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&Hw(i,e)&&kE(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&kE(a.options,n)&&Hw(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&kE(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&Hw(n.diff,e)&&kE(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Hw(e,n.diff)&&kE(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=gO(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:Jx(),deletionsGutterAST:Jx(),additionsGutterAST:Jx(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=VE({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,Xx(void 0,`buffer`,this.size)),h?.push(AE(this.size))):(x.pushToGutter(`deletions`,Xx(void 0,`buffer`,this.size)),g?.push(AE(this.size))),this.size=0,this.side=void 0}}},w=(e,t,n,r,i)=>{x.pushToGutter(e,Yx(t,n,r,i))};function T(e){C.flush(),a===`unified`?lO(`unified`,e,x):(lO(`deletions`,e,x),lO(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),ZE({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&oO(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=uO(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=uO(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),cO({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&oO(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&sO(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=uO(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=uO(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}cO({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&sO(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),E=_?n.noEOFCRDeletions:!1,D=_?n.noEOFCRAdditions:!1,O=(s?.noEOFCR??!1)||E,k=(o?.noEOFCR??!1)||D;if(k||O){if(a===`split`&&C.flush(),O){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(jE(e)),x.pushToGutter(`unified`,Xx(e,`metadata`,1))):(x.deletionsContentAST.push(jE(e)),x.pushToGutter(`deletions`,Xx(e,`metadata`,1)),k||(x.pushToGutter(`additions`,Xx(void 0,`buffer`,1)),x.additionsContentAST.push(AE(1))))}if(k){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(jE(e)),x.pushToGutter(`unified`,Xx(e,`metadata`,1))):(x.additionsContentAST.push(jE(e)),x.pushToGutter(`additions`,Xx(e,`metadata`,1)),O||(x.pushToGutter(`deletions`,Xx(void 0,`buffer`,1)),x.deletionsContentAST.push(AE(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(FE(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),D=t.bufferBefore>0||t.bufferAfter>0,O=!f&&e.type!==`deleted`,k=!f&&e.type!==`new`,A=x.rowCount>0||D;h=O&&A?h:void 0,g=k&&A?g:void 0,_=f&&A?_:void 0;let j=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&A?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:k&&A?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:O&&A?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:j,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let 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;let i=Jx(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,zC(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(Q({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(Q({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(Q({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return ug(this.renderFullAST(e,t))}renderPartialHTML(e,t){return ug(t==null?e:Q({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(!LC(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(IC(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(IC(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){cO({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}cO({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return PS({fileOrDiff:e,mode:t,stickyHeader:n})}},iO=new Intl.PluralRules(`en-US`);function aO(e){return`${e} unmodified line${iO.select(e)===`one`?``:`s`}`}function oO(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function sO(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function cO({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Xx(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Xx(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Xx(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function lO(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,NE({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(NE({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,NE({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(NE({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=PE(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?aO(n):`More unchanged context may be available`;c.pushToGutter(e,NE({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(NE({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function uO(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function dO(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function fO(e,t,n,r){let i=dO(e),a=dO(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=pO(e,r.getLineText(e));return l}function pO(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 mO(e){let t=[];for(let n=0;n<e.lineCount;n++)t.push(e.getLineText(n,!0));return t}function hO(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function gO(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function _O(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function vO(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 yO(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function bO({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function xO(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:vw(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?`default`:`custom`}}function SO(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function CO(e){let t={...e};return delete t.cacheKey,t}function wO(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??HS(e.name),r=t.lang??HS(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function TO(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function EO(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&TO(n.lines,t.deletionLines)}var DO=-1,OO=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++DO}`;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;editSession;renderedDiff;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:ju},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new xS,this.scrollSyncManager=new OE,this.interactionManager=new eS(`diff`,tS(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??ju}getHunksRendererOptions(e){return xO(e)}createHunksRenderer(e){return new rO(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=Kw(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}continue}for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(tS(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(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Vx(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>_w(this.editSession?.annotations,e,KS);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,gw(t,e,KS))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.getLatestAnnotations().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(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;Rx(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(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.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),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,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=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:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=bO(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||NO(this.pre,jO({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||PO(this.headerElement,MO({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),fw(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?EE(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=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=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;if(e==null||t==null||!SO(e)||this.pendingFiles?.fileDiff===e)return;let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(Zw(`merge`,e,t),this.setHydratedState(t),this.startHydratedEditSession(e)){this.rerender();return}await yO(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()}}startHydratedEditSession(e){if(e.isPartial)throw Error(`FileDiff.startHydratedEditSession: diffs cannot be partial for editing`);if(this.fileDiff!==e)return!1;let{editor:t}=this;return this.editSession?.outgoingDiff==null?t==null||this.editSession!=null?!1:(this.installEditSession(e,t.__getDocumentContents(kO(e)),t.__getDocumentSessionState()),!0):(this.installEditSession(e),!0)}updateExternalDiff(e,t){if(Hw(this.fileDiff,e))return!1;let n=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,n==null?this.editor!=null&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e,this.editor.__getDocumentContents(kO(e)),this.editor.__getDocumentSessionState())):(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=n)),this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=hw(t,KS,this.editSession.annotations)),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:Xw(t.contents),a=n!=null&&EO(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=CO(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&i!=null&&(s.additionLines=i,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,DD(s)),this.editSession={diff:s,annotations:this.editSession?.annotations??hw(this.lineAnnotations,KS),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let l=bO(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!AO(u,this.deletionFile)||!AO(d,this.additionFile)),y=e!=null&&!Hw(e,this.fileDiff),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&jS(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.fileDiff==null)&&(x=EE(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateExternalDiff(e,i):x!=null&&(y=!0,this.updateExternalDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getLatestDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(zD(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,Bu);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??C,this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g||!Hw(this.renderedDiff,C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getLatestDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==i)return;let o=this.editSession?.outgoingDiff,s=this.fileDiff,c=o!=null&&s!=null&&o!==i,l=c?wO(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??HS(i.name),c=Nx({theme:o,lang:s});c==null?Mx({themes:Kb(o),langs:[`text`,s],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}computeEditorRenderRange(e){let t=this.getLatestDiff();if(e==null||t==null||qS(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return ZE({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:n,outgoingDiff:r}={}}=this;if(r!=null&&t!=null){if(!t.isPartial&&wO(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?Ww(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let{fileDiff:t}=this,n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(kO(r)),e.__getDocumentSessionState()),this.editor=e,this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&(this.renderedDiff=i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,fileDiff:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{diff:a,annotations:o}=n;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=o?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=Gw(a),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:r,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===r.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&(this.fileDiff=c,this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),s!=null&&(this.lineAnnotations=s)),this.editSession=void 0,e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getLatestDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=LD(e,this.hunksRenderer.getExpandedHunksMap(),t);return zD(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(RD(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;if(this.hunksRenderer.updateRenderCache(e,t,a)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}i===!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))}detachAdditionLines(){let e=this.editSession?.diff,{fileDiff:t}=this;e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return UE({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return WE({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=RE(o);if(e<s){let c=zE({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=HE({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=RE(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){Lx(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(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||tO(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}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.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!vO(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!_O(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:XC(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=ZC();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:mw(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):mw(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=GC;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.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,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&Hw(r,n)?i:void 0)??ug(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isContainerManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,Au,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Du,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,Ou,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,ku,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=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(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=QC(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=aw(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=tw(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=xw({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:ow(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=sw(this.themeCSSStyle.textContent??``,tw(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&ww()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?bw(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=FO(t[0]),a=FO(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=ug(i),r.content.innerHTML=ug(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=dw({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=dw({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=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=dw({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=FO(r?.[0]),a=FO(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=FO(r?.[0]),a=FO(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=ug(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?bw(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=FO(t[0]),i=FO(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.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(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};qC(u,this.appliedPreAttributes)||(pw(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function kO(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function AO(e,t){return e==null||t==null?e==null&&t==null:Uw(e,t)}function jO({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function MO({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function NO(e,t,n=!1){return!n&&e==null&&t}function PO(e,t,n=!1){return e==null&&t&&!n}function FO(e){if(e!=null&&e.type===`element`)return e.children??[]}function IO({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o,canHydratePartialDiff:s}){let c=Mw(t,n),l=c,u=i?!0:a,d=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=zE({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:u,hunkIndex:n,collapsedContextThreshold:o}),f=(a.fromStart+a.fromEnd)*t.lineHeight;if(c+=f,l+=f,a.collapsedLines>0){let e=YE({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;c+=e,l+=e}c+=i.splitLineCount*t.lineHeight,l+=i.unifiedLineCount*t.lineHeight;let p=LO(i);c+=p.split*t.lineHeight,l+=p.unified*t.lineHeight;let m=n===d?HE({fileDiff:e,hunkIndex:n,expandedHunks:u,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(m!=null){let e=(m.fromStart+m.fromEnd)*t.lineHeight;if(c+=e,l+=e,m.collapsedLines>0){let e=XE({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}else if(n===d&&e.isPartial&&s){let e=XE({type:r,metrics:t})?.totalHeight??0;c+=e,l+=e}}if(e.hunks.length>0){let e=Pw(t);c+=e,l+=e}return{splitHeight:c,unifiedHeight:l}}function LO(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return RO(e,t)}function RO(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}var zO=3e3,BO=new Map,VO=-1,HO=class extends OO{__id=`little-virtualized-file-diff:${++VO}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:BO,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=jw(n)}setMetrics(e,t=!1){let n=jw(e);(t||!Bx(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.resetLayoutCache({includeEstimatedHeights:!1}),!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLatestAnnotations();return FC(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!Hx(t,e),r=n&&XO(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:ZO(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw 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.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=BO,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),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)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},cache:{ghostTextRowsByIndex:n},metrics:{lineHeight:r}}=this,i=this.getRenderedDiff();if(this.fileContainer==null||i==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(i,this.editor?.__getGhostTextRows()??BO);let a=this.getLatestAnnotations();if(t===`scroll`&&a.length===0&&!this.isResizeDebuggingEnabled())return e&&this.computeApproximateSize(!0),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],c=this.hasFileAnnotations(i);if(this.renderRange!=null&&c&&LC(this.renderRange)){let t=UO(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}else!c&&this.setFileAnnotationHeight(0)&&(e=!0);for(let t of s){if(t==null)continue;let i=t.children[1];if(!(i instanceof HTMLElement))continue;let a=o===`split`&&t===this.codeDeletions;for(let t of i.children){if(!(t instanceof HTMLElement))continue;let i=t.dataset.lineIndex;if(i==null)continue;let s=tk(i,o),c=n.get(s)??0;if(a&&c>0)continue;let l=t.getBoundingClientRect().height+c*r,u=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(u=!0),l+=t.nextElementSibling.getBoundingClientRect().height);let d=this.getEstimatedLineHeight(u),f=this.cache.heightDeltas.get(s)??0,p=l-d;p!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=p-f,p===0?this.cache.heightDeltas.delete(s):this.cache.heightDeltas.set(s,p))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.startHydratedEditSession(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateExternalDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d||p)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=jw(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=Mw(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:d,height:0};let m;return ZE({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=YE({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=XE({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??Mw(this.metrics,n)+this.cache.fileAnnotationHeight,u;return ZE({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=YE({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=XE({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!Hw(this.getRenderedDiff(),this.getLatestDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}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()){let n=Zw(`clone`,e,t);if(await yO(()=>this.primeHighlightCache(n)),!this.enabled||this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(Zw(`merge`,e,t),this.setHydratedState(t),!this.startHydratedEditSession(e)&&(await yO(()=>this.primeHighlightCache(e)),!this.enabled||this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}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;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return UE({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}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(){if(!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getLatestDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!Hw(this.getRenderedDiff(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??BO);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,o=Mw(this.metrics,i);if(this.height+=o,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=IO({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:QO(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=bO(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!ek(s,this.deletionFile)||!ek(c,this.additionFile)),u=t??this.fileDiff;t==null&&o&&(l||this.fileDiff==null)&&(u=EE(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!Hw(this.fileDiff,u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateExternalDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.latestDiff===(this.getLatestDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:!1}:this.updatePendingRender(u,r);if((v||g)&&this.resetLayoutCache({includeEstimatedHeights:g}),f)this.top??=this.getVirtualizedTop(),g&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.pendingRender=void 0,this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(this.getRenderedDiff()!==this.pendingRender?.diff)throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!Hw(a,o),renderedDiffChanged:!Hw(r,o)}}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?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}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 $O(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=QO(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=WO(this.cache.heightDeltas),u=Mw(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=qO(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+JO(i,e)*this.metrics.lineHeight+GO(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=zO}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+GO(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=zE({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?YE({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?HE({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?XE({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:YO({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=zE({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=HE({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let 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}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=QO(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=Mw(this.metrics,i),h=e.hunks.length>0?Pw(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],D=(n+r)/2,O=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),k=t+(O?.top??_),A=O?.renderedLineIndex??0,j,M,N;if(ZE({diff:e,diffStyle:l,startingLine:O?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?YE({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;k+=y;let b=A%s===0,x=Math.floor(A/s);if(b&&(E[x]=k-(t+_+y),N!=null)){if(N<=0)return!0;N--}let S=this.getLineHeight(l===`split`?m:h,g);if(k>n-S&&k<r&&(j??=x),M==null&&k+S>D&&(M=x),N==null&&k>=r&&b&&(N=T),A++,k+=S,c>0||v&&d){let e=XE({type:u,metrics:this.metrics});e!=null&&(k<r&&k+e.totalHeight>n&&(j??=x),M==null&&k+e.totalHeight>D&&(M=x),k+=e.totalHeight)}return!1}}),j==null){if(x)j=0,M=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}M??=j;let ee=Math.round(M-w/2),te=Math.max(0,Math.ceil(p/s)-w),P=Math.max(0,Math.min(ee,te)),F=P*s,ne=ee<0?C+ee*s:C,re=E[P]??0,ie=F===0?0:g+re,I=P+ne/s,L=I<E.length?v-E[I]:v-(k-t-_);return{startingLine:F,totalLines:ne,bufferBefore:ie,bufferAfter:Math.max(0,L)}}};function UO(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===PC&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function WO(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function GO({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=KO(e,n);return(t[KO(e,r)]??0)-(t[i]??0)}function KO(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function qO(e){return Math.ceil(e/zO)*zO}function JO(e,t){let n=0;for(let r of e)r<t&&n++;return n}function YO({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function XO(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 ZO(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 QO(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function $O(e){return typeof e==`function`?`custom`:e??`line-info`}function ek(e,t){return e==null||t==null?e==null&&t==null:Uw(e,t)}function tk(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function nk({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function rk(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:ik(n,e.startContentIndex)}}function ik(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function ak(e){let t=[];for(let n of e){let e=Vu.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function ok(e){for(let t of Array.isArray(e)?e:[e])if(!Vu.has(t))return!1;return!0}async function sk(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=Gb(r)??Wb(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function ck(e){return ax.getResolvedThemes(e)}async function lk(e){for(let t of e)Dx(t);let t=await ax.resolveThemes(e);for(let n=0;n<e.length;n++)Ox(e[n],t[n]);return t}function uk(e){let t=(0,v.useRef)(e);return(0,v.useInsertionEffect)(()=>void(t.current=e)),(0,v.useCallback)((...e)=>t.current(...e),[])}var dk=(0,v.createContext)(void 0);function fk(){return(0,v.useContext)(dk)}var pk={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},mk={display:`contents`};function hk(){return null}function gk({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=KS}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,x.jsxs)(x.Fragment,{children:[p==null?(0,x.jsxs)(x.Fragment,{children:[m!=null&&(0,x.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,x.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,x.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,x.jsx)(`div`,{slot:Au,children:p}),o!=null&&l?.map((e,t)=>(0,x.jsx)(`div`,{slot:f(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=_k(t,e);return(0,x.jsx)(`div`,{slot:n,style:mk,children:c(t,d)},n)}),s!=null&&(0,x.jsx)(`div`,{slot:`gutter-utility-slot`,style:pk,children:s(u)})]})}function _k(e,t){let n=rk(e,t);return n==null?void 0:nk({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function vk({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,lineAnnotations:o,renderGutterUtility:s,getHoveredLine:c,getAnnotationSlotName:l=KS}){let u=t?.(e),d=n?.(e),f=r?.(e),p=i?.(e);return(0,x.jsxs)(x.Fragment,{children:[u==null?(0,x.jsxs)(x.Fragment,{children:[d!=null&&(0,x.jsx)(`div`,{slot:`header-prefix`,children:d}),f!=null&&(0,x.jsx)(`div`,{slot:`header-filename-suffix`,children:f}),p!=null&&(0,x.jsx)(`div`,{slot:`header-metadata`,children:p})]}):(0,x.jsx)(`div`,{slot:Au,children:u}),a!=null&&o?.map((e,t)=>(0,x.jsx)(`div`,{slot:l(e),children:a(e)},t)),s!=null&&(0,x.jsx)(`div`,{slot:`gutter-utility-slot`,style:pk,children:s(c)})]})}var yk=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),bk=Symbol(`IGNORE_RESPONSE`),xk=1e4,Sk=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},Ck=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},wk=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=ju,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new yk.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new yk.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){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??ju,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||kE(a,this.renderOptions))return;let o=Kb(e),c=[];if(Vx(a.theme,this.renderOptions.theme)||(c=kS(o)?ck(o):await lk(o)),!s())return;if(this.highlighter!=null)ox(c,this.highlighter);else{let e=await Mx({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof Sk||!s())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){let{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();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.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??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);Dk(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){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=Kb(this.renderOptions.theme),i=[];if(i=kS(r)?ck(r):await lk(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=ok(e)?ak(e):await sk(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Mx({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof Sk||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.activeTaskById.clear();for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,kk(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=US(),i=r>0?WS():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>this.handleWorkerError(o,e)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};o.pendingSetupRequestId=s,this.activeTaskById.set(s,c),this.executeTask(o,c)}))}let a=this.options.workerInitializationTimeout??xk,o;try{await Promise.race([Promise.all(n),new Promise((e,t)=>{o=setTimeout(()=>{t(Error(`WorkerPoolManager: worker initialization timed out after ${a}ms`))},a)})])}finally{o!=null&&clearTimeout(o)}}handleWorkerError(e,t){console.error(`Worker error:`,t,e);let{pendingSetupRequestId:n}=e;if(n==null)return;let r=this.activeTaskById.get(n);r?.type===`initialize`&&(r.reject(kk(t)),this.cleanWorkerAndTask(e,r))}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=Ek(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){let n=this.getFileResultCache(t);BC(t)||n!=null&&AS(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||BC(e)||t!=null&&AS(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return AC(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);tO(t)||n!=null&&kE(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||tO(e)||t!=null&&kE(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:aD(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new Sk;for(let 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(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new Sk;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):Dk(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,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();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{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:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}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{let r=n.filter(e=>!Gu(e));r.length>0&&Mx({themes:Kb(this.renderOptions.theme),langs:[`text`,...r],preferredHighlighter:this.preferredHighlighter}).catch(e=>{console.error(e)});let i=n.filter(t=>!e.langs.has(t));if(i.length>0&&(ok(i)?t.request.resolvedLanguages=ak(i):t.request.resolvedLanguages=await sk(i)),!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(n){this.rejectRenderTaskCallbacks(t,kk(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw bk;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(Dk(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw 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 Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!AS(i,this.getFileRenderOptions()))throw bk;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!kE(i,this.getDiffRenderOptions()))throw bk;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==bk&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Dk(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&&(Dk(t)&&(this.rejectRenderTaskCallbacks(t,new Ck),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){Tk(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of Ek(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),Dk(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,kk(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;let n=US();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=WS())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let 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(let t of e)if(!n.langs.has(t)){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(let t of Ok(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){let 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){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Ck),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Ck),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(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))Dk(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of Ok(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(let t of Ok(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of Ok(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of Ok(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Uw(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Hw(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())Dk(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function Tk(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function Ek(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??HS(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??HS(e.request.diff.name)),t.add(e.request.diff.lang??HS(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function Dk(e){return e?.type===`file`||e?.type===`diff`}function Ok(e){return e.instances}function kk(e){if(e instanceof Error)return e;if(typeof e==`object`&&e){if(`error`in e&&e.error instanceof Error)return e.error;if(`message`in e&&typeof e.message==`string`)return Error(e.message)}return Error(String(e))}var Ak;function jk({poolOptions:e,highlighterOptions:t}){return Ak??=new wk(e,t),Ak}function Mk(){Ak!=null&&(Ak.terminate(),Ak=void 0)}var Nk=(0,v.createContext)(void 0),Pk=0;function Fk({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,v.useState)(()=>{if(!(typeof window>`u`))return jk({poolOptions:t,highlighterOptions:n})});return(0,v.useInsertionEffect)(()=>{if(r!=null)return Pk++,()=>{Pk--}},[r]),(0,v.useEffect)(()=>()=>{Pk===0&&Mk()},[]),(0,x.jsx)(Nk.Provider,{value:r,children:e})}function Ik(e,t){return typeof window>`u`&&t!=null?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,x.jsx)(x.Fragment,{children:e})}var Lk=(0,v.createContext)(void 0);function Rk(){return(0,v.useContext)(Lk)}var zk=typeof window>`u`?v.useEffect:v.useLayoutEffect;function Bk({file:e,options:t,editorOptions:n,editStateKey:r,lineAnnotations:i,selectedLines:a,prerenderedHTML:o,metrics:s,hasGutterRenderUtility:c,hasCustomHeader:l,disableWorkerPool:u,edit:d,onEditChange:f,onEditComplete:p}){let m=Rk(),h=a!==void 0,g=(0,v.useContext)(Nk),_=fk(),y=uk(e=>f?.(e)),b=f==null?void 0:y,x=(0,v.useRef)(null),S=uk(e=>{let t=p?.(e)??`reject`;return t===`accept`&&(x.current={file:{installed:e.file,stale:e.originalFile},annotations:{installed:e.lineAnnotations,stale:e.originalLineAnnotations}}),t}),C=p==null?void 0:S,w=(0,v.useRef)(null),T=(0,v.useRef)(null),E=uk(()=>{if(_==null)throw Error(`File: EditContext is not attached`);return _(`file`,n??{},r)}),D=uk(n=>{if(n!=null){if(w.current!=null)throw Error(`File: An instance should not already exist when a node is created`);m==null?w.current=new Ow(Hk({controlledSelection:h,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:b,onEditComplete:C,options:t}),u?void 0:g,!0):w.current=new Bw(Hk({controlledSelection:h,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:b,onEditComplete:C,options:t}),m,s,u?void 0:g,!0),d&&T.current==null&&(T.current=Uk(w.current,E)),w.current.hydrate({file:e,fileContainer:n,lineAnnotations:i,prerenderedHTML:o})}else{if(w.current==null)throw Error(`File: A File instance should exist when unmounting`);w.current.cleanUp(),w.current=null,T.current=null}});return zk(()=>{let{current:n}=w;if(n==null)return;let r=Hk({controlledSelection:h,hasCustomHeader:l,hasGutterRenderUtility:c,onEditChange:b,onEditComplete:C,options:t}),o=r!==void 0&&!Hx(n.options,r);if(n.setOptions(r),!d&&T.current!=null){let{current:e}=T;T.current=null,e()}let s=Vk(e,i,x);n.render({file:s.file,lineAnnotations:s.lineAnnotations,forceRender:o}),a!==void 0&&n.setSelectedLines(a),d&&T.current==null&&(T.current=Uk(n,E))}),{ref:D,getHoveredLine:(0,v.useCallback)(()=>w.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,v.useCallback)(e=>w.current?.getAnnotationSlotName(e)??KS(e),[])}}function Vk(e,t,n){let{current:r}=n;if(r==null)return{file:e,lineAnnotations:t};let{file:i,annotations:a}=r,o=e;i!=null&&(NC(e,i.stale)?o=i.installed:r.file=null);let s=t;return a!=null&&(t===a.stale?s=a.installed:r.annotations=null),r.file==null&&r.annotations==null&&(n.current=null),{file:o,lineAnnotations:s}}function Hk({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return t||r||n||i!=null||a!=null?{...e,controlledSelection:t,renderCustomHeader:n?hk:e?.renderCustomHeader,renderGutterUtility:r?hk:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}:e}function Uk(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function Wk({file:e,lineAnnotations:t,selectedLines:n,options:r,editorOptions:i,editStateKey:a,metrics:o,className:s,style:c,renderAnnotation:l,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderFilenameSuffix:f,renderHeaderMetadata:p,prerenderedHTML:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:S,getAnnotationSlotName:C}=Bk({file:e,options:r,editorOptions:i,editStateKey:a,metrics:o,lineAnnotations:t,selectedLines:n,prerenderedHTML:m,hasGutterRenderUtility:h!=null,hasCustomHeader:u!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y});return(0,x.jsx)(yu,{ref:b,className:s,style:c,children:Ik(vk({file:e,renderAnnotation:l,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderFilenameSuffix:f,renderHeaderMetadata:p,renderGutterUtility:h,lineAnnotations:t,getHoveredLine:S,getAnnotationSlotName:C}),m)})}var Gk=typeof window>`u`?v.useEffect:v.useLayoutEffect;function Kk({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:m,onEditComplete:h}){let g=Rk(),_=s!==void 0,y=(0,v.useContext)(Nk),b=fk(),x=uk(e=>m?.(e)),S=m==null?void 0:x,C=(0,v.useRef)(null),w=uk(r=>{let i=h?.(r)??`reject`;return i===`accept`&&(C.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),T=h==null?void 0:w,E=(0,v.useMemo)(()=>{if(e!=null)return e;let{current:i}=C,a=i?.filePair;if(i!=null&&a!=null){if(qk(t,n,a.stale)||qk(t,n,a.installed))return a.fileDiff;i.filePair=null}return EE(t??null,n??null,r?.parseDiffOptions)},[e,t,n,r?.parseDiffOptions]),D=(0,v.useRef)(null),O=(0,v.useRef)(null),k=uk(()=>{if(b==null)throw Error(`FileDiff: EditContext is not attached`);return b(`file-diff`,i??{},a)}),A=uk(e=>{if(e!=null){if(D.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);g==null?D.current=new OO(Yk({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),f?void 0:y,!0):D.current=new HO(Yk({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),g,l,f?void 0:y,!0),p&&O.current==null&&(O.current=Xk(D.current,k)),D.current.hydrate({fileDiff:E,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(D.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);D.current.cleanUp(),D.current=null,O.current=null}});return Gk(()=>{let{current:e}=D;if(e==null)return;let t=Yk({controlledSelection:_,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:S,onEditComplete:T,options:r}),n=t!==void 0&&!Hx(e.options,t);if(e.setOptions(t),!p&&O.current!=null){let{current:e}=O;O.current=null,e()}let i=Jk(E,o,C);e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),p&&O.current==null&&(O.current=Xk(e,k))}),{fileDiff:E,ref:A,getHoveredLine:(0,v.useCallback)(()=>D.current?.getHoveredLine(),[]),getAnnotationSlotName:(0,v.useCallback)(e=>D.current?.getAnnotationSlotName(e)??KS(e),[])}}function qk(e,t,n){return NC(e??void 0,n.oldFile??void 0)&&NC(t??void 0,n.newFile??void 0)}function Jk(e,t,n){let{current:r}=n;if(r==null)return{fileDiff:e,lineAnnotations:t};let{fileDiff:i,annotations:a}=r,o=e;i!=null&&(Hw(e,i.stale)?o=i.installed:r.fileDiff=null);let s=t;return a!=null&&(t===a.stale?s=a.installed:r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null),{fileDiff:o,lineAnnotations:s}}function Yk({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return t||r||n||i!=null||a!=null?{...e,controlledSelection:t,renderCustomHeader:n?hk:e?.renderCustomHeader,renderGutterUtility:r?hk:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}:e}function Xk(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function Zk({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:y}){let{ref:b,getHoveredLine:S,getAnnotationSlotName:C}=Kk({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:y});return(0,x.jsx)(yu,{ref:b,className:s,style:c,children:Ik(gk({fileDiff:e,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:a,getHoveredLine:S,getAnnotationSlotName:C}),l)})}function Qk(e){return new Worker(``+new URL(`worker-DrorqVhi.js`,import.meta.url).href,{type:`module`,name:e?.name})}var $k=`line-info-basic`,eA=`
|
|
1536
|
+
[data-expand-button]:focus-visible {
|
|
1537
|
+
outline: 2px solid var(--diffs-modified-base);
|
|
1538
|
+
outline-offset: -2px;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
[data-separator="line-info-basic"] {
|
|
1542
|
+
height: 24px;
|
|
1543
|
+
background: var(--diffs-bg-separator);
|
|
1544
|
+
position: relative;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
[data-diff-type="single"] [data-gutter],
|
|
1548
|
+
[data-diff-type="split"] [data-deletions] [data-gutter] {
|
|
1549
|
+
[data-separator-wrapper] {
|
|
1550
|
+
position: absolute;
|
|
1551
|
+
left: 100%;
|
|
1552
|
+
display: flex;
|
|
1553
|
+
align-items: center;
|
|
1554
|
+
gap: 0;
|
|
1555
|
+
width: max-content;
|
|
1556
|
+
background: transparent;
|
|
1557
|
+
color: var(--diffs-fg-number);
|
|
1558
|
+
font-size: 0.75rem;
|
|
1559
|
+
margin-left: calc(-2ch - 2px);
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1563
|
+
margin-left: calc(-3ch - 2px);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
[data-expand-button],
|
|
1567
|
+
[data-separator-content] {
|
|
1568
|
+
display: flex;
|
|
1569
|
+
align-items: center;
|
|
1570
|
+
min-width: unset;
|
|
1571
|
+
min-height: unset;
|
|
1572
|
+
padding: 0;
|
|
1573
|
+
flex-shrink: 0;
|
|
1574
|
+
border: none;
|
|
1575
|
+
width: auto;
|
|
1576
|
+
height: 100%;
|
|
1577
|
+
background-color: transparent;
|
|
1578
|
+
color: inherit;
|
|
1579
|
+
font: inherit;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
[data-expand-button]:not([data-expand-all-button]) {
|
|
1583
|
+
min-width: 1.4rem;
|
|
1584
|
+
justify-content: center;
|
|
1585
|
+
|
|
1586
|
+
&[data-expand-down]::before {
|
|
1587
|
+
content: "↓";
|
|
1588
|
+
}
|
|
1589
|
+
&[data-expand-up]::before {
|
|
1590
|
+
content: "↑";
|
|
1591
|
+
}
|
|
1592
|
+
&[data-expand-both]::before {
|
|
1593
|
+
content: "↕";
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
svg {
|
|
1597
|
+
display: none;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
[data-separator-content] {
|
|
1602
|
+
margin-left: 0.4ch;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
[data-expand-all-button] {
|
|
1606
|
+
display: flex;
|
|
1607
|
+
position: relative;
|
|
1608
|
+
margin-left: 0.9rem;
|
|
1609
|
+
text-transform: lowercase;
|
|
1610
|
+
|
|
1611
|
+
&:hover {
|
|
1612
|
+
color: var(--diffs-fg);
|
|
1613
|
+
text-decoration: underline;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
[data-expand-all-button]::before {
|
|
1618
|
+
content: "";
|
|
1619
|
+
display: block;
|
|
1620
|
+
position: absolute;
|
|
1621
|
+
top: 50%;
|
|
1622
|
+
left: -0.55rem;
|
|
1623
|
+
width: 3px;
|
|
1624
|
+
height: 3px;
|
|
1625
|
+
margin-top: -1px;
|
|
1626
|
+
border-radius: 2px;
|
|
1627
|
+
background-color: var(--diffs-fg-number);
|
|
1628
|
+
pointer-events: none;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
[data-separator-content]:hover,
|
|
1632
|
+
[data-expand-button]:hover {
|
|
1633
|
+
color: var(--diffs-fg);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
`;function tA(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function nA(e){return e!==`new`&&e!==`deleted`}function rA(e){return{name:e.path,contents:e.content,cacheKey:`${e.side}:${e.ref}:${e.path}`}}async function iA(e,t){if(e.type===`rename-pure`)return{oldFile:null,newFile:rA(await t(e.name,`new`))};let[n,r]=await Promise.all([t(e.name,`old`),t(e.name,`new`)]);return{oldFile:rA(n),newFile:rA(r)}}var aA=2e3,oA=2,sA=2;function cA(e){for(let t of e){if(!hA(t))continue;let e=t.closest(`[data-expand-index]`);if(gA(e))return e}}function lA(e,t){if(t)return!1;for(let t of e)if(hA(t)){if(t.closest(`[data-expand-all-button]`))return!1;if(t.closest(`[data-expand-down]`))return!0}return!1}function uA(e){let t=e.closest(`main`);return t instanceof HTMLElement?t:void 0}function dA(e,t){if(t===0)return;let{style:n}=e,r=n.scrollBehavior;n.scrollBehavior=`auto`,e.scrollTop+=t,n.scrollBehavior=r}function fA(e,t){if(Date.now()-e.createdAt>aA)return`done`;let n=t.shadowRoot;if(n==null)return`wait`;let r=mA(n,e.index);if(r===void 0)return dA(e.scroller,e.scroller.scrollHeight-e.scrollHeight),`done`;let i=r.getBoundingClientRect().top-e.top;return Math.abs(i)<oA?`ok`:(dA(e.scroller,i),`wait`)}function pA(e,t,n,r,i=requestAnimationFrame){let a=0,o=!1,s=()=>{if(!n()||Date.now()-e.createdAt>aA){r();return}let c=fA(e,t);if(c===`done`){r();return}if(c===`wait`)o=!0,a=0;else if(a+=1,o&&a>=sA){r();return}i(s)};i(s)}function mA(e,t){if(!/^\d+$/.test(t))return;let n=e.querySelector(`[data-expand-index="${t}"]`);return gA(n)?n:void 0}function hA(e){return typeof e.closest==`function`}function gA(e){return e!=null&&typeof e.getBoundingClientRect==`function`}function _A(e){return(0,x.jsx)(`div`,{className:`flex flex-col gap-2 px-2 py-1.5 font-sans`,children:e.comments.map(t=>(0,x.jsxs)(`article`,{"data-source-id":t.id,className:H(`rounded-md border border-border bg-card px-2.5 py-2 text-xs leading-relaxed text-foreground`,t.stale&&`border-warn`,e.focusId===t.id&&`ring-2 ring-ring/60`),children:[(0,x.jsxs)(`header`,{className:`mb-1 flex items-baseline gap-2 text-muted-foreground`,children:[(0,x.jsx)(`span`,{className:`font-medium text-foreground`,children:t.author}),t.stale?(0,x.jsx)(`span`,{className:`text-warn`,children:`Pin does not match live git.`}):null,t.url===void 0?null:(0,x.jsx)(`a`,{className:`ml-auto inline-flex items-center gap-0.5 text-primary hover:underline`,href:t.url,target:`_blank`,rel:`noreferrer`,"aria-label":`Open comment`,children:(0,x.jsx)(pn,{className:`size-3`})})]}),(0,x.jsx)(`p`,{className:`whitespace-pre-wrap`,children:t.body})]},t.id))})}var vA={ticket:`Ticket`,pr:`Pull request`,"pr-comment":`Comment`,commit:`Commit`,transcript:`Transcript`},yA={ticket:yn,pr:Sn,"pr-comment":wn,commit:xn,transcript:mn};function bA(e,t,n){return t?e.map(e=>({...e,stale:n.has(e.id)})):[]}function xA(e){let t=new Map;for(let n of e){let e=`${n.side}:${n.line}`,r=t.get(e)??[];r.push(n),t.set(e,r)}return t}var SA=`
|
|
1637
|
+
[data-diffs-header],
|
|
1638
|
+
[data-diff],
|
|
1639
|
+
[data-file],
|
|
1640
|
+
[data-error-wrapper],
|
|
1641
|
+
[data-virtualizer-buffer] {
|
|
1642
|
+
--diffs-header-font-family: var(--font-sans) !important;
|
|
1643
|
+
--diffs-font-family: var(--font-mono) !important;
|
|
1644
|
+
--diffs-bg: var(--diff-canvas) !important;
|
|
1645
|
+
--diffs-light-bg: var(--diff-canvas) !important;
|
|
1646
|
+
--diffs-dark-bg: var(--diff-canvas) !important;
|
|
1647
|
+
--diffs-token-light-bg: transparent;
|
|
1648
|
+
--diffs-token-dark-bg: transparent;
|
|
1649
|
+
--diffs-bg-context-override: var(--diff-canvas);
|
|
1650
|
+
--diffs-bg-hover-override: var(--diff-hover);
|
|
1651
|
+
--diffs-bg-separator-override: var(--diff-hunk);
|
|
1652
|
+
--diffs-bg-buffer-override: var(--diff-hunk);
|
|
1653
|
+
--diffs-bg-addition-override: var(--diff-add-line);
|
|
1654
|
+
--diffs-bg-addition-number-override: var(--diff-add-num);
|
|
1655
|
+
--diffs-bg-addition-hover-override: var(--diff-add-line);
|
|
1656
|
+
--diffs-bg-addition-emphasis-override: var(--diff-add-word);
|
|
1657
|
+
--diffs-bg-deletion-override: var(--diff-del-line);
|
|
1658
|
+
--diffs-bg-deletion-number-override: var(--diff-del-num);
|
|
1659
|
+
--diffs-bg-deletion-hover-override: var(--diff-del-line);
|
|
1660
|
+
--diffs-bg-deletion-emphasis-override: var(--diff-del-word);
|
|
1661
|
+
background-color: var(--diff-canvas) !important;
|
|
1662
|
+
color: var(--diff-fg) !important;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
[data-line-type="change-addition"] {
|
|
1666
|
+
background-color: var(--diff-add-line) !important;
|
|
1667
|
+
}
|
|
1668
|
+
[data-line-type="change-addition"][data-column-number] {
|
|
1669
|
+
background-color: var(--diff-add-num) !important;
|
|
1670
|
+
}
|
|
1671
|
+
[data-line-type="change-deletion"] {
|
|
1672
|
+
background-color: var(--diff-del-line) !important;
|
|
1673
|
+
}
|
|
1674
|
+
[data-line-type="change-deletion"][data-column-number] {
|
|
1675
|
+
background-color: var(--diff-del-num) !important;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
1679
|
+
grid-template-columns: minmax(0, var(--comprehende-split-left, 1fr)) minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
[data-diff-type="split"][data-overflow="wrap"],
|
|
1683
|
+
[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
|
|
1684
|
+
grid-template-columns:
|
|
1685
|
+
var(--diffs-grid-number-column-width)
|
|
1686
|
+
minmax(0, var(--comprehende-split-left, 1fr))
|
|
1687
|
+
var(--diffs-grid-number-column-width)
|
|
1688
|
+
minmax(0, var(--comprehende-split-right, 1fr)) !important;
|
|
1689
|
+
}
|
|
1690
|
+
`,CA=.2,wA=.8;function TA(e){return Math.min(wA,Math.max(CA,e))}function EA(e){let t=(0,v.useMemo)(()=>{let e=typeof navigator>`u`?4:Math.max(1,navigator.hardwareConcurrency||4);return{workerFactory:()=>new Qk,poolSize:Math.max(2,Math.min(6,Math.floor(e/2)))}},[]),n=(0,v.useMemo)(()=>({theme:wl,tokenizeMaxLineLength:1e3,useTokenTransformer:!0,lineDiffType:`none`}),[]);return(0,x.jsx)(Fk,{poolOptions:t,highlighterOptions:n,children:e.children})}function DA(e,t){if(e.trim()!==``)try{return TT(e,`comprehende:${t}:${OA(e)}`)[0]?.files[0]}catch(e){console.error(e);return}}function OA(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length.toString(16)}:${(t>>>0).toString(16)}`}function kA(e){return iA(e,Qt)}var AA=(0,v.memo)(function(e){let t=(0,v.useRef)(e.onPostRender);t.current=e.onPostRender;let n=(0,v.useMemo)(()=>({theme:wl,themeType:e.themeType,diffStyle:e.split?`split`:`unified`,overflow:e.wrap?`wrap`:`scroll`,disableFileHeader:!0,stickyHeader:!1,lineDiffType:`none`,expansionLineCount:10,hunkSeparators:$k,...e.loadFiles?{loadDiffFiles:kA}:{},unsafeCSS:`${SA}\n${eA}`,onPostRender:(e,n,r)=>{r!==`unmount`&&t.current?.(e)}}),[e.loadFiles,e.split,e.themeType,e.wrap]);return(0,x.jsx)(Zk,{className:`block w-full`,fileDiff:e.fileDiff,options:n,lineAnnotations:e.annotations,renderAnnotation:e.annotations===void 0?void 0:NA})}),jA=(0,v.memo)(function(e){let t=(0,v.useMemo)(()=>({name:e.path,contents:e.contents,cacheKey:`${e.path}:${e.contents.length}:${e.contents.slice(0,32)}:${e.annotations?.length??0}`}),[e.annotations?.length,e.contents,e.path]),n=(0,v.useMemo)(()=>({theme:wl,themeType:e.themeType,overflow:e.wrap?`wrap`:`scroll`,disableFileHeader:!0,stickyHeader:!1,unsafeCSS:SA}),[e.themeType,e.wrap]);return(0,x.jsx)(Wk,{className:`block w-full`,file:t,options:n,lineAnnotations:e.annotations,renderAnnotation:e.annotations===void 0?void 0:PA})});function MA(e,t){return[...xA(e).values()].flatMap(e=>{let n=e[0];return n===void 0?[]:[{side:n.side===`old`?`deletions`:`additions`,lineNumber:n.line,metadata:{comments:e,focusId:t}}]})}function NA(e){return(0,x.jsx)(_A,{comments:e.metadata.comments,focusId:e.metadata.focusId})}function PA(e){let t=e.metadata,n=new Date(t.timestamp*1e3).toISOString().slice(0,10);return(0,x.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2 px-2 py-1 font-sans text-[11px] text-muted-foreground`,children:[(0,x.jsx)(`code`,{className:`text-primary`,children:Bt(t.sha)}),(0,x.jsx)(`span`,{className:`min-w-0 truncate`,children:t.author}),(0,x.jsx)(`span`,{className:`shrink-0 tabular-nums`,children:n}),t.lines>1?(0,x.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[t.lines,` lines`]}):null]})}function FA(e){let{resolved:t}=Nl();return(0,x.jsx)(`div`,{className:`min-h-0 min-w-0`,children:(0,x.jsx)(jA,{path:e.path,contents:e.contents,wrap:e.wrap,themeType:t,annotations:e.annotations})})}function IA(e){let{path:t,patch:n,split:r,wrap:i,splitRatio:a,onSplitRatio:o,hydrate:s=!0,comments:c,focusCommentId:l}=e,{resolved:u}=Nl(),d=(0,v.useMemo)(()=>DA(n,t),[n,t]),[f,p]=(0,v.useState)(d),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useRef)(0);(0,v.useEffect)(()=>{p(d)},[d]),(0,v.useEffect)(()=>{if(d===void 0||!s||!tA(d))return;let e=!1;return kA(d).then(t=>{if(!e&&d.isPartial)try{p(Zw(`clone`,d,t))}catch(e){console.error(e)}}).catch(e=>{console.error(e)}),()=>{e=!0}},[d,s]),(0,v.useEffect)(()=>{let e=m.current;if(e===null)return;let t=t=>{let n=t.composedPath();if(lA(n,t.shiftKey))return;let r=cA(n),i=r?.getAttribute(`data-expand-index`),a=uA(e);r!==void 0&&i!=null&&a!==void 0&&(g.current+=1,h.current={scroller:a,top:r.getBoundingClientRect().top,index:i,scrollHeight:a.scrollHeight,createdAt:Date.now()})};return e.addEventListener(`click`,t,!0),()=>e.removeEventListener(`click`,t,!0)},[f!==void 0]);let _=e=>{let t=h.current;if(t===null)return;let n=g.current;h.current=null,pA(t,e,()=>g.current===n,()=>void 0)},y=(0,v.useMemo)(()=>c===void 0||c.length===0?void 0:MA(c,l),[c,l]);if(f===void 0)return(0,x.jsx)(`p`,{className:`px-3 py-2 text-xs text-warn`,children:`Could not render this git patch.`});let b=r&&nA(f.type);return(0,x.jsxs)(`div`,{ref:m,className:`relative min-w-0`,style:{"--comprehende-split-left":`${a}fr`,"--comprehende-split-right":`${1-a}fr`},children:[(0,x.jsx)(AA,{fileDiff:f,split:b,wrap:i,themeType:u,loadFiles:s,annotations:y,onPostRender:_}),b?(0,x.jsx)(LA,{ratio:a,onRatio:o}):null]})}function LA(e){let t=(0,v.useRef)(null),n=n=>{let r=n.currentTarget.parentElement;r!==null&&(n.preventDefault(),n.currentTarget.setPointerCapture(n.pointerId),t.current={startX:n.clientX,start:e.ratio,width:r.getBoundingClientRect().width})},r=n=>{let r=t.current;r!==null&&r.width!==0&&e.onRatio(TA(r.start+(n.clientX-r.startX)/r.width))},i=()=>{t.current=null};return(0,x.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize split diff`,"aria-valuemin":Math.round(CA*100),"aria-valuemax":Math.round(wA*100),"aria-valuenow":Math.round(e.ratio*100),tabIndex:0,className:H(`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 motion-safe:after:transition-colors`),style:{left:`${e.ratio*100}%`},onPointerDown:n,onPointerMove:r,onPointerUp:i,onPointerCancel:i,onDoubleClick:()=>e.onRatio(.5),onKeyDown:t=>{t.key===`ArrowLeft`?(t.preventDefault(),e.onRatio(TA(e.ratio-.05))):t.key===`ArrowRight`?(t.preventDefault(),e.onRatio(TA(e.ratio+.05))):(t.key===`Home`||t.key===`Enter`)&&(t.preventDefault(),e.onRatio(.5))},children:(0,x.jsx)(`div`,{className:`z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border bg-card`,children:(0,x.jsx)(Cn,{className:`size-2.5 text-muted-foreground`})})})}var RA=Object.defineProperty,zA=(e,t)=>RA(e,`name`,{value:t,configurable:!0}),BA=`horizontal`,VA=[`horizontal`,`vertical`],HA=v.forwardRef(zA(function(e,t){let{decorative:n,orientation:r=BA,...i}=e,a=UA(r)?r:BA,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,x.jsx)(ea.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function UA(e){return VA.includes(e)}zA(UA,`isValidOrientation`);var WA=HA;function GA({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,x.jsx)(WA,{"data-slot":`separator`,decorative:n,orientation:t,className:H(`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 KA(e){let{inspector:t,wrap:n,setInspector:r,onClose:i}=e,a=_u(t.path),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!0),m=(0,v.useMemo)(()=>c===null?``:c.map(e=>e.text).join(`
|
|
1691
|
+
`),[c]),h=(0,v.useMemo)(()=>{if(c!==null)return vu(c).map(e=>({lineNumber:e.lineNumber,metadata:{sha:e.sha,author:e.author,timestamp:e.timestamp,lines:e.lines}}))},[c]);return(0,v.useEffect)(()=>{let e=!1;if(d(null),p(!0),s(``),l(null),a){p(!1);return}return t.mode===`file`?Qt(t.path,t.side).then(t=>{e||(s(t.content),p(!1))}).catch(t=>{e||(d(t instanceof Error?t.message:String(t)),p(!1))}):$t(t.path,t.side).then(t=>{e||(l(t.lines),p(!1))}).catch(t=>{e||(d(t instanceof Error?t.message:String(t)),p(!1))}),()=>{e=!0}},[a,t]),(0,x.jsxs)(`div`,{className:`review-inspector flex h-full min-h-0 flex-col`,"aria-busy":f,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-4 pt-3 pb-3 min-[800px]:gap-3 min-[800px]:px-8 min-[800px]:pt-6 min-[800px]:pb-4`,children:[(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(Li,{type:`button`,size:`sm`,variant:`outline`,onClick:i,children:[`Back`,(0,x.jsx)(iu,{className:`max-[799px]:hidden`,children:`esc`})]})}),(0,x.jsx)(yl,{children:`Back to the diff`})]}),(0,x.jsx)(`strong`,{className:`min-w-0 truncate font-mono text-sm font-medium`,children:t.path}),(0,x.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,x.jsx)(Li,{type:`button`,size:`sm`,variant:t.mode===`file`?`secondary`:`ghost`,onClick:()=>r({...t,mode:`file`}),children:`File`}),a?null:(0,x.jsx)(Li,{type:`button`,size:`sm`,variant:t.mode===`blame`?`secondary`:`ghost`,onClick:()=>r({...t,mode:`blame`}),children:`Blame`}),(0,x.jsx)(GA,{orientation:`vertical`,className:`mx-1 h-6`}),(0,x.jsx)(Li,{type:`button`,size:`sm`,variant:t.side===`old`?`secondary`:`ghost`,onClick:()=>r({...t,side:`old`}),children:`Old`}),(0,x.jsx)(Li,{type:`button`,size:`sm`,variant:t.side===`new`?`secondary`:`ghost`,onClick:()=>r({...t,side:`new`}),children:`New`})]})]}),u===null?null:(0,x.jsx)(`p`,{className:`px-4 text-warn min-[800px]:px-8`,children:u}),f&&u===null&&!a?(0,x.jsx)(`div`,{className:`px-4 pt-2 min-[800px]:px-8`,children:(0,x.jsx)(cu,{label:t.mode===`file`?Rn.file:Rn.blame})}):null,a?(0,x.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-4 pb-8 min-[800px]:px-8`,children:(0,x.jsx)(`img`,{src:qt({kind:`image`,path:t.path,side:t.side}),alt:`${t.side} ${t.path}`,className:`h-auto max-w-full bg-[var(--diff-canvas)]`})}):null,!a&&t.mode===`file`&&u===null&&!f?(0,x.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-4 pb-8`,children:(0,x.jsx)(FA,{path:t.path,contents:o,wrap:n})}):null,!a&&t.mode===`blame`&&u===null&&!f&&c!==null?(0,x.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-4 pb-8`,children:(0,x.jsx)(FA,{path:t.path,contents:m,wrap:n,annotations:h})}):null]})}var qA=Object.defineProperty,JA=(e,t)=>qA(e,`name`,{value:t,configurable:!0}),YA=`focusScope.autoFocusOnMount`,XA=`focusScope.autoFocusOnUnmount`,ZA={bubbles:!1,cancelable:!0},QA=v.forwardRef(JA(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=ia(i),u=ia(a),d=v.useRef(null),f=Wn(t,c),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:aj(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||aj(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&aj(s)};JA(e,`handleFocusIn`),JA(t,`handleFocusOut`),JA(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){oj.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(YA,ZA);s.addEventListener(YA,l),s.dispatchEvent(t),t.defaultPrevented||($A(lj(tj(s)),{select:!0}),document.activeElement===e&&aj(s))}return()=>{s.removeEventListener(YA,l),setTimeout(()=>{let t=new CustomEvent(XA,ZA);s.addEventListener(XA,u),s.dispatchEvent(t),t.defaultPrevented||aj(e??document.body,{select:!0}),s.removeEventListener(XA,u),oj.remove(p)},0)}}},[s,l,u,p]);let m=v.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ej(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&aj(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&aj(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,x.jsx)(ea.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function $A(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(aj(r,{select:t}),document.activeElement!==n)return}JA($A,`focusFirst`);function ej(e){let t=tj(e);return[nj(t,e),nj(t.reverse(),e)]}JA(ej,`getTabbableEdges`);function tj(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:JA(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}JA(tj,`getTabbableCandidates`);function nj(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):rj(r,{upTo:t})))return r}JA(nj,`findVisible`);function rj(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}JA(rj,`isHidden`);function ij(e){return e instanceof HTMLInputElement&&`select`in e}JA(ij,`isSelectableInput`);function aj(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ij(e)&&t&&e.select()}}JA(aj,`focus`);var oj=sj();function sj(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=cj(e,t),e.unshift(t)},remove(t){e=cj(e,t),e[0]?.resume()}}}JA(sj,`createFocusScopesStack`);function cj(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}JA(cj,`arrayRemove`);function lj(e){return e.filter(e=>e.tagName!==`A`)}JA(lj,`removeLinks`);var uj=Object.defineProperty,dj=(e,t)=>uj(e,`name`,{value:t,configurable:!0}),fj=0,pj=null;function mj(e){return hj(),e.children}dj(mj,`FocusGuards`);function hj(){v.useEffect(()=>{pj||={start:gj(),end:gj()};let{start:e,end:t}=pj;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),fj++,()=>{fj===1&&(pj?.start.remove(),pj?.end.remove(),pj=null),fj=Math.max(0,fj-1)}},[])}dj(hj,`useFocusGuards`);function gj(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}dj(gj,`createFocusGuard`);var _j=function(){return _j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_j.apply(this,arguments)};function vj(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var bj=`right-scroll-bar-position`,xj=`width-before-scroll-bar`,Sj=`with-scroll-bars-hidden`,Cj=`--removed-body-scroll-bar-size`;function wj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Tj(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ej=typeof window<`u`?v.useLayoutEffect:v.useEffect,Dj=new WeakMap;function Oj(e,t){var n=Tj(t||null,function(t){return e.forEach(function(e){return wj(e,t)})});return Ej(function(){var t=Dj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||wj(e,null)}),i.forEach(function(e){r.has(e)||wj(e,a)})}Dj.set(n,e)},[e]),n}function kj(e){return e}function Aj(e,t){t===void 0&&(t=kj);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function jj(e){e===void 0&&(e={});var t=Aj(null);return t.options=_j({async:!0,ssr:!1},e),t}var Mj=function(e){var t=e.sideCar,n=vj(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,_j({},n))};Mj.isSideCarExport=!0;function Nj(e,t){return e.useMedium(t),Mj}var Pj=jj(),Fj=function(){},Ij=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Fj,onWheelCapture:Fj,onTouchMoveCapture:Fj}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=vj(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Oj([n,t]),w=_j(_j({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:Pj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),_j(_j({},w),{ref:C})):v.createElement(y,_j({},w,{className:c,ref:C}),s))});Ij.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ij.classNames={fullWidth:xj,zeroRight:bj};var Lj=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Rj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Lj();return t&&e.setAttribute(`nonce`,t),e}function zj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Vj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rj())&&(zj(t,n),Bj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hj=function(){var e=Vj();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Uj=function(){var e=Hj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Wj={left:0,top:0,right:0,gap:0},Gj=function(e){return parseInt(e||``,10)||0},Kj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Gj(n),Gj(r),Gj(i)]},qj=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Wj;var t=Kj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Jj=Uj(),Yj=`data-scroll-locked`,Xj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1692
|
+
.${Sj} {
|
|
1693
|
+
overflow: hidden ${r};
|
|
1694
|
+
padding-right: ${s}px ${r};
|
|
1695
|
+
}
|
|
1696
|
+
body[${Yj}] {
|
|
1697
|
+
overflow: hidden ${r};
|
|
1698
|
+
overscroll-behavior: contain;
|
|
1699
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
1700
|
+
padding-left: ${i}px;
|
|
1701
|
+
padding-top: ${a}px;
|
|
1702
|
+
padding-right: ${o}px;
|
|
1703
|
+
margin-left:0;
|
|
1704
|
+
margin-top:0;
|
|
1705
|
+
margin-right: ${s}px ${r};
|
|
1706
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
.${bj} {
|
|
1710
|
+
right: ${s}px ${r};
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
.${xj} {
|
|
1714
|
+
margin-right: ${s}px ${r};
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
.${bj} .${bj} {
|
|
1718
|
+
right: 0 ${r};
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
.${xj} .${xj} {
|
|
1722
|
+
margin-right: 0 ${r};
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
body[${Yj}] {
|
|
1726
|
+
${Cj}: ${s}px;
|
|
1727
|
+
}
|
|
1728
|
+
`},Zj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Qj=function(){v.useEffect(function(){return document.body.setAttribute(Yj,(Zj()+1).toString()),function(){var e=Zj()-1;e<=0?document.body.removeAttribute(Yj):document.body.setAttribute(Yj,e.toString())}},[])},$j=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Qj();var a=v.useMemo(function(){return qj(i)},[i]);return v.createElement(Jj,{styles:Xj(a,!t,i,n?``:`!important`)})},eM=!1;if(typeof window<`u`)try{var tM=Object.defineProperty({},"passive",{get:function(){return eM=!0,!0}});window.addEventListener(`test`,tM,tM),window.removeEventListener(`test`,tM,tM)}catch{eM=!1}var nM=eM?{passive:!1}:!1,rM=function(e){return e.tagName===`TEXTAREA`},iM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!rM(e)&&n[t]===`visible`)},aM=function(e){return iM(e,`overflowY`)},oM=function(e){return iM(e,`overflowX`)},sM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),uM(e,r)){var i=dM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cM=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},lM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},uM=function(e,t){return e===`v`?aM(t):oM(t)},dM=function(e,t){return e===`v`?cM(t):lM(t)},fM=function(e,t){return e===`h`&&t===`rtl`?-1:1},pM=function(e,t,n,r,i){var a=fM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=dM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&uM(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},mM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hM=function(e){return[e.deltaX,e.deltaY]},gM=function(e){return e&&`current`in e?e.current:e},_M=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vM=function(e){return`
|
|
1729
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
1730
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
1731
|
+
`},yM=0,bM=[];function xM(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(yM++)[0],a=v.useState(Uj)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=yj([e.lockRef.current],(e.shards||[]).map(gM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=mM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=sM(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=sM(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return pM(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(bM.length&&bM[bM.length-1]===a){var r=`deltaY`in n?hM(n):mM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&_M(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(gM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:SM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=mM(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,hM(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,mM(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return bM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,nM),document.addEventListener(`touchmove`,c,nM),document.addEventListener(`touchstart`,u,nM),function(){bM=bM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,nM),document.removeEventListener(`touchmove`,c,nM),document.removeEventListener(`touchstart`,u,nM)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:vM(i)}):null,p?v.createElement($j,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function SM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var CM=Nj(Pj,xM),wM=v.forwardRef(function(e,t){return v.createElement(Ij,_j({},e,{ref:t,sideCar:CM}))});wM.classNames=Ij.classNames;var TM=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},EM=new WeakMap,DM=new WeakMap,OM={},kM=0,AM=function(e){return e&&(e.host||AM(e.parentNode))},jM=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=AM(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},MM=function(e,t,n,r){var i=jM(t,Array.isArray(e)?e:[e]);OM[n]||(OM[n]=new WeakMap);var a=OM[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(EM.get(e)||0)+1,l=(a.get(e)||0)+1;EM.set(e,c),a.set(e,l),o.push(e),c===1&&i&&DM.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),kM++,function(){o.forEach(function(e){var t=EM.get(e)-1,i=a.get(e)-1;EM.set(e,t),a.set(e,i),t||(DM.has(e)||e.removeAttribute(r),DM.delete(e)),i||e.removeAttribute(n)}),kM--,kM||(EM=new WeakMap,EM=new WeakMap,DM=new WeakMap,OM={})}},NM=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||TM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),MM(r,i,n,`aria-hidden`)):function(){return null}},PM=Object.defineProperty,FM=(e,t)=>PM(e,`name`,{value:t,configurable:!0}),IM=`Dialog`,[LM,RM]=Yi(IM),[zM,BM]=LM(IM),VM=FM(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=wc({prop:r,defaultProp:i??!1,onChange:a,caller:IM}),[d,f]=v.useState(0),[p,m]=v.useState(0);return(0,x.jsx)(zM,{scope:t,triggerRef:s,contentRef:c,contentId:wa(),titleId:wa(),descriptionId:wa(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),HM=`DialogPortal`,[UM,WM]=LM(HM,{forceMount:void 0}),GM=FM(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=BM(HM,t);return(0,x.jsx)(UM,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,x.jsx)(uc,{present:n||a.open,children:(0,x.jsx)(oc,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),KM=`DialogOverlay`,qM=v.forwardRef(FM(function(e,t){let n=WM(KM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=BM(KM,e.__scopeDialog);return a.modal?(0,x.jsx)(uc,{present:r||a.open,children:(0,x.jsx)(YM,{...i,ref:t})}):null},`DialogOverlay`)),JM=qn(`DialogOverlay.RemoveScroll`),YM=v.forwardRef(FM(function(e,t){let{__scopeDialog:n,...r}=e,i=BM(KM,n),a=Wn(t,pa());return(0,x.jsx)(wM,{as:JM,allowPinchZoom:!0,shards:[i.contentRef],children:(0,x.jsx)(ea.div,{"data-state":sN(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),XM=`DialogContent`,ZM=v.forwardRef(FM(function(e,t){let n=WM(XM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=BM(XM,e.__scopeDialog);return(0,x.jsx)(uc,{present:r||a.open,children:a.modal?(0,x.jsx)(QM,{...i,ref:t}):(0,x.jsx)($M,{...i,ref:t})})},`DialogContent`)),QM=v.forwardRef(FM(function(e,t){let n=BM(XM,e.__scopeDialog),r=v.useRef(null),i=Wn(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return NM(e)},[]),(0,x.jsx)(eN,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Vi(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Vi(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Vi(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),$M=v.forwardRef(FM(function(e,t){let n=BM(XM,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,x.jsx)(eN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),eN=v.forwardRef(FM(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=BM(XM,n);return hj(),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(QA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,x.jsx)(fa,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":sN(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),tN=`DialogTitle`,nN=v.forwardRef(FM(function(e,t){let{__scopeDialog:n,...r}=e,i=BM(tN,n),{setTitleCount:a}=i;return ya(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,x.jsx)(ea.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),rN=`DialogDescription`,iN=v.forwardRef(FM(function(e,t){let{__scopeDialog:n,...r}=e,i=BM(rN,n),{setDescriptionCount:a}=i;return ya(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,x.jsx)(ea.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),aN=`DialogClose`,oN=v.forwardRef(FM(function(e,t){let{__scopeDialog:n,...r}=e,i=BM(aN,n);return(0,x.jsx)(ea.button,{type:`button`,...r,ref:t,onClick:Vi(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function sN(e){return e?`open`:`closed`}FM(sN,`getState`);function cN(e){return(0,x.jsx)(VM,{"data-slot":`sheet`,...e})}function lN(e){return(0,x.jsx)(GM,{"data-slot":`sheet-portal`,...e})}function uN({className:e,...t}){return(0,x.jsx)(qM,{"data-slot":`sheet-overlay`,className:H(`fixed inset-0 z-50 bg-foreground/25 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function dN({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,x.jsxs)(lN,{children:[(0,x.jsx)(uN,{}),(0,x.jsxs)(ZM,{"data-slot":`sheet-content`,className:H(`fixed z-50 flex flex-col bg-card shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-300`,n===`right`&&`inset-y-0 right-0 h-full w-[min(20rem,88vw)] border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right`,n===`left`&&`inset-y-0 left-0 h-full w-[min(20rem,88vw)] border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r?(0,x.jsxs)(oN,{className:`absolute top-3 right-3 rounded-md p-1 opacity-70 hover:bg-accent hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none`,children:[(0,x.jsx)(Mn,{className:`size-4`}),(0,x.jsx)(`span`,{className:`sr-only`,children:`Close`})]}):null]})]})}function fN({className:e,...t}){return(0,x.jsx)(`div`,{"data-slot":`sheet-header`,className:H(`flex flex-col gap-1 px-4 py-3`,e),...t})}function pN({className:e,...t}){return(0,x.jsx)(nN,{"data-slot":`sheet-title`,className:H(`font-display text-base font-medium text-foreground`,e),...t})}function mN({className:e,...t}){return(0,x.jsx)(iN,{"data-slot":`sheet-description`,className:H(`text-sm text-muted-foreground`,e),...t})}var hN=`comprehende:rail-collapsed`;function gN(){return bl(localStorage,hN)===`1`}function _N(e){xl(localStorage,hN,e?`1`:`0`)}function vN(e){return Vt(e)}function yN(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function bN(e,t=3){return e.length<=t+1?{shown:[...e],rest:0}:{shown:e.slice(0,t),rest:e.length-t}}function xN(e){if(e.paths.length===0)return null;let{shown:t,rest:n}=bN(e.paths);return(0,x.jsxs)(`span`,{className:`mt-1 flex min-w-0 items-baseline gap-1 font-mono text-[11px] leading-snug text-muted-foreground`,"aria-hidden":!0,children:[(0,x.jsx)(`span`,{className:`min-w-0 truncate`,children:t.map(vN).join(` · `)}),n>0?(0,x.jsxs)(`span`,{className:`shrink-0 opacity-70`,children:[`+`,n]}):null]})}function SN(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}var CN=`underline-offset-2 hover:underline`;function wN(e){return(0,x.jsx)(`a`,{href:Ul(e.selection),className:H(`focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none`,e.className),style:e.style,"aria-label":e.ariaLabel,"aria-current":e.ariaCurrent,onClick:t=>{SN(t)&&(t.preventDefault(),e.onSelect(e.selection))},children:e.children})}var TN={itemActive:`_itemActive_xc7sz_1`,selection:`_selection_xc7sz_5`};function EN(e){let{meta:t,selection:n,parts:r,onSelect:i}=e,a=zl(r),o=a?Ll(r):new Map,s=new Map(t.groups.map(e=>[e.id,e])),c=t.document.lookFor?.length??0;return(0,x.jsx)(`nav`,{className:H(`h-full overflow-auto bg-card`,e.compact===!0?`py-3`:`py-6`,e.className),children:(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`span`,{className:TN.selection,"aria-hidden":!0}),(0,x.jsx)(`ul`,{className:`mb-6 list-none p-0`,children:(0,x.jsx)(`li`,{children:(0,x.jsx)(DN,{active:n?.kind===`overview`,selection:{kind:`overview`},onSelect:i,title:`Overview`,count:zt(t.document.size),lookForCount:c})})}),(0,x.jsxs)(`ul`,{className:`mb-6 list-none p-0`,children:[r.map(e=>{let t=e.groupIds[0];return(0,x.jsxs)(`li`,{className:a?`mb-3 last:mb-0`:void 0,children:[a&&e.title!==void 0&&t!==void 0?(0,x.jsxs)(wN,{selection:{kind:`group`,id:t},onSelect:i,className:`mx-2 mb-1 flex w-[calc(100%-16px)] items-center gap-2 px-2.5 py-1 text-left font-mono text-[11px] tracking-[0.14em] uppercase text-muted-foreground min-[800px]:mx-3 min-[800px]:w-[calc(100%-24px)] min-[800px]:px-3`,ariaLabel:`Open part ${e.title}`,children:[(0,x.jsx)(`span`,{"aria-hidden":!0,className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:Rl(e.colorIndex)}}),(0,x.jsx)(`span`,{children:e.title})]}):null,(0,x.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.groupIds.map(e=>{let t=s.get(e);return t===void 0?null:(0,x.jsx)(`li`,{children:(0,x.jsx)(DN,{active:n?.kind===`group`&&n.id===t.id,selection:{kind:`group`,id:t.id},onSelect:i,index:Rt(Fl(r,t.id)),title:t.title,files:t.files,count:t.staleCount>0?`${t.staleCount} stale`:void 0,lookForCount:t.lookFor.length,colorIndex:o.get(t.id)})},t.id)})})]},e.groupIds.join(`\0`))}),t.unassigned.hunkCount>0?(0,x.jsx)(`li`,{children:(0,x.jsx)(DN,{active:n?.kind===tn.unassigned,selection:{kind:tn.unassigned},onSelect:i,title:`Unassigned`,files:t.unassigned.files,count:String(t.unassigned.hunkCount),warn:!0})}):null,t.lockfiles.fileCount>0?(0,x.jsx)(`li`,{children:(0,x.jsx)(DN,{active:n?.kind===tn.lockfiles,selection:{kind:tn.lockfiles},onSelect:i,title:`Lockfiles`,files:t.lockfiles.files,count:String(t.lockfiles.fileCount),muted:!0})}):null]})]})})}function DN(e){let t=e.colorIndex,n=e.files??[],r=e.lookForCount??0,i=t!==void 0||e.active,a=t===void 0?e.muted?`var(--muted-foreground)`:void 0:Rl(t),o=n.length>0?`${e.title}, ${n.length} files${e.count===void 0?``:`, ${e.count}`}${r>0?`, ${r} look for`:``}`:r>0?`${e.title}, ${r} look for`:void 0;return(0,x.jsxs)(wN,{selection:e.selection,onSelect:e.onSelect,ariaLabel:o,ariaCurrent:e.active?`page`:void 0,className:H(`group relative z-1 mx-2 mb-0.5 flex h-auto w-[calc(100%-16px)] min-w-0 items-start justify-start gap-2 rounded-md px-2.5 py-1.5 text-left font-normal whitespace-normal no-underline min-[800px]:mx-3 min-[800px]:mb-1 min-[800px]:w-[calc(100%-24px)] min-[800px]:gap-2.5 min-[800px]:px-3 min-[800px]:py-2`,!e.active&&`hover:bg-accent`,e.active&&H(TN.itemActive,`text-foreground`),e.warn&&`text-warn hover:text-warn`),children:[i?(0,x.jsx)(`span`,{className:H(`pointer-events-none absolute inset-y-1.5 left-0 z-1 w-0.5 rounded-full bg-[var(--strand,var(--primary))] transition-opacity duration-[var(--motion)] ease-[var(--motion-ease)]`,t!==void 0&&!e.active&&`opacity-45`),style:a===void 0?void 0:{"--strand":a},"aria-hidden":!0}):null,e.index===void 0?null:(0,x.jsx)(`span`,{className:`mt-px w-5 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums`,children:e.index}),(0,x.jsxs)(`span`,{className:`min-w-0 flex-1 text-left leading-snug`,children:[(0,x.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2.5`,children:[(0,x.jsx)(`span`,{className:`min-w-0 flex-1`,children:e.title}),e.count===void 0?null:(0,x.jsx)(`span`,{className:H(`mt-px shrink-0 text-[11px] tabular-nums text-muted-foreground`,e.warn&&`text-warn`),children:e.count})]}),(0,x.jsx)(xN,{paths:n}),r>0?(0,x.jsxs)(`span`,{className:`mt-1 block font-mono text-[11px] leading-snug text-muted-foreground`,children:[`Look for · `,r]}):null]})]})}function ON(e){let[t,n]=(0,v.useState)(!1),r=tu(e.meta,e.selection);return(0,x.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,x.jsxs)(`header`,{className:`flex h-11 shrink-0 items-center gap-2 border-b border-border bg-card px-2`,children:[(0,x.jsx)(Li,{type:`button`,size:`icon-sm`,variant:`ghost`,"aria-label":`Open groups`,"aria-expanded":t,onClick:()=>n(!0),children:(0,x.jsx)(Dn,{})}),(0,x.jsxs)(`p`,{className:`flex min-w-0 flex-1 items-baseline gap-2`,children:[r.index===void 0?null:(0,x.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground tabular-nums`,children:r.index}),(0,x.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r.title})]}),(0,x.jsx)(nu,{meta:e.meta,selection:e.selection,onSelect:e.onSelect}),(0,x.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,x.jsx)(Li,{type:`button`,size:`icon-sm`,variant:e.wrap?`secondary`:`outline`,"aria-pressed":e.wrap,"aria-label":`Wrap lines`,onClick:e.onWrap,children:(0,x.jsx)(jn,{})}),e.onComments===void 0?null:(0,x.jsx)(Li,{type:`button`,size:`icon-sm`,variant:e.comments===!0?`secondary`:`outline`,"aria-pressed":e.comments===!0,"aria-label":`Show comments`,onClick:e.onComments,children:(0,x.jsx)(wn,{})}),(0,x.jsx)(pu,{system:(0,x.jsx)(On,{})})]})]}),(0,x.jsx)(`div`,{className:`min-h-0 flex-1 [[data-motion=scene]_&]:[view-transition-name:review-scene]`,children:e.children}),(0,x.jsx)(cN,{open:t,onOpenChange:n,children:(0,x.jsxs)(dN,{side:`left`,showCloseButton:!1,className:`p-0`,children:[(0,x.jsxs)(fN,{className:`border-b border-border`,children:[(0,x.jsx)(pN,{children:`Groups`}),(0,x.jsx)(mN,{className:`sr-only`,children:`Review groups in this change.`})]}),(0,x.jsx)(EN,{meta:e.meta,selection:e.selection,parts:e.parts,onSelect:t=>{e.onSelect(t),n(!1)},compact:!0,className:`min-h-0 flex-1`})]})})]})}function kN(e){return`Answer the following questions by using ${e}`}function AN(e){return kN(qt(e===`overview`?{kind:`agent-md`,target:`overview`}:{kind:`agent-md`,target:`group`,group:e.group}))}var jN=`source:`;function MN(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function NN(){return RegExp(`\\]\\(\\s*${MN(jN)}([^)\\s]+)(?:\\s+"[^"]*")?\\s*\\)`,`g`)}function PN(e){return e.kind===`pr-comment`&&e.path!==void 0&&e.side!==void 0&&e.line!==void 0}function FN(e){let t=[];for(let n of e.matchAll(NN())){let e=n[1];e!==void 0&&e!==``&&t.push(e)}return t}function IN(e){if(e===void 0||!e.startsWith(`source:`))return;let t=e.slice(7);return t===``?void 0:t}function LN(e){return(e??[]).filter(PN)}function RN(e,t){if(!PN(t))return;let n=e.groups.filter(e=>(e.sources??[]).includes(t.id)),r=e.groups.filter(e=>e.hunkRefs.some(e=>e.path===t.path||e.oldPath===t.path));return(r.filter(e=>n.some(t=>t.id===e.id))[0]??r[0]??n[0])?.id}function zN(e){let t=e.sources??[],n=[e.why,e.summary,...e.lookFor??[]].flatMap(FN);return[...new Set([...t,...n])]}var BN=/^(Subtle|Breaking|Race|Perf)\.\s+(.*)$/;function VN(e){let t=BN.exec(e);if(t===null)return{body:e};let n=t[1],r=t[2];return n===void 0||r===void 0||r===``?{body:e}:{tag:n,body:r}}function HN(e,t){return e.kind===`document`?`document:${t}`:`group:${e.id}:${t}`}function UN(e){return e.kind===`document`?{kind:`overview`}:{kind:`group`,id:e.id}}function WN(e,t){return(t??[]).map((t,n)=>{let r=VN(t),i={key:HN(e,n),owner:e,index:n,text:t,body:r.body,sourceIds:FN(t)};return r.tag!==void 0&&(i.tag=r.tag),i})}function GN(e,t){let n=WN({kind:`document`},e.lookFor),r=Pl(t),i=new Map(t.map(e=>[e.id,e]));for(let e of r)for(let t of e.groupIds){let e=i.get(t);if(e===void 0)continue;let a={kind:`group`,id:e.id,title:e.title,index:Fl(r,e.id)};e.part!==void 0&&(a.part=e.part),n.push(...WN(a,e.lookFor))}return n}function KN(e,t,n,r){if(PN(e)){let t=RN(n,e);if(t!==void 0)return{selection:{kind:`group`,id:t},commentId:e.id}}let i=t.filter(t=>t.sourceIds.includes(e.id)),a=i.find(e=>e.owner.kind===`group`&&e.owner.id===r);if(a!==void 0)return{selection:UN(a.owner),lookForKey:a.key};if(r!==void 0){let t=n.groups.find(e=>e.id===r);if(t!==void 0&&zN(t).includes(e.id))return{selection:{kind:`group`,id:r}}}let o=i.find(e=>e.owner.kind===`group`);if(o!==void 0)return{selection:UN(o.owner),lookForKey:o.key};let s=n.groups.find(t=>(t.sources??[]).includes(e.id));if(s!==void 0)return{selection:{kind:`group`,id:s.id}};let c=i.find(e=>e.owner.kind===`document`);return c===void 0?{selection:{kind:`overview`}}:{selection:UN(c.owner),lookForKey:c.key}}function qN(e,t){let n=new Map(e.map(e=>[e.id,e])),r=n.get(t);return r===void 0?{dependsOn:[],dependents:[]}:{dependsOn:(r.dependsOn??[]).flatMap(e=>JN(n,e)),dependents:e.flatMap(e=>(e.dependsOn??[]).includes(t)?JN(n,e.id):[])}}function JN(e,t){let n=e.get(t);return n===void 0?[]:[{id:t,title:n.title}]}var YN=1600,XN={label:`Ask AI about this`,copied:`Copied`,hint:`Copy a prompt for your coding agent`};function ZN(e){let[t,n]=(0,v.useState)(!1),r=`${XN.hint}. ${e.scope===`group`?`This group.`:`This review.`}`;(0,v.useEffect)(()=>{n(!1)},[e.prompt]),(0,v.useEffect)(()=>{if(!t)return;let e=window.setTimeout(()=>n(!1),YN);return()=>window.clearTimeout(e)},[t]);let i=t?XN.copied:XN.label;return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(Li,{type:`button`,size:`sm`,variant:`outline`,className:`shrink-0 max-[799px]:size-8 max-[799px]:px-0`,"aria-label":r,"aria-live":`polite`,"data-cta":`ask`,onClick:()=>{n(!0),Nn(e.prompt).catch(e=>{n(!1),console.error(e)})},children:[(0,x.jsx)(kn,{"aria-hidden":!0,className:`size-3.5`}),(0,x.jsx)(`span`,{className:`max-[799px]:hidden`,children:i})]})}),(0,x.jsx)(yl,{children:t?XN.copied:r})]})}var QN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$N=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eP={};function tP(e,t){return((t||eP).jsx?$N:QN).test(e)}var nP=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
1732
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),rP=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(nP());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),iP=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),aP=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(rP()),r=iP();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),oP=cP(`end`),sP=cP(`start`);function cP(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function lP(e){let t=sP(e),n=oP(e);if(t&&n)return{start:t,end:n}}function uP(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?fP(e.position):`start`in e||`end`in e?fP(e):`line`in e||`column`in e?dP(e):``}function dP(e){return pP(e&&e.line)+`:`+pP(e&&e.column)}function fP(e){return dP(e&&e.start)+`-`+dP(e&&e.end)}function pP(e){return e&&typeof e==`number`?e:1}var mP=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=uP(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};mP.prototype.file=``,mP.prototype.name=``,mP.prototype.reason=``,mP.prototype.message=``,mP.prototype.stack=``,mP.prototype.column=void 0,mP.prototype.line=void 0,mP.prototype.ancestors=void 0,mP.prototype.cause=void 0,mP.prototype.fatal=void 0,mP.prototype.place=void 0,mP.prototype.ruleId=void 0,mP.prototype.source=void 0;var hP=l(aP(),1),gP={}.hasOwnProperty,_P=new Map,vP=/[A-Z]/g,yP=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bP=new Set([`td`,`th`]),xP=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function SP(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=NP(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=MP(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Bm:zm,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=CP(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function CP(e,t,n){if(t.type===`element`)return wP(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return TP(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return DP(e,t,n);if(t.type===`mdxjsEsm`)return EP(e,t);if(t.type===`root`)return OP(e,t,n);if(t.type===`text`)return kP(e,t)}function wP(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Bm,e.schema=i),e.ancestors.push(t);let a=zP(e,t.tagName,!1),o=PP(e,t),s=IP(e,t);return yP.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!bh(e)})),AP(e,o,a,t),jP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function TP(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}BP(e,t.position)}function EP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);BP(e,t.position)}function DP(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Bm,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:zP(e,t.name,!0),o=FP(e,t),s=IP(e,t);return AP(e,o,a,t),jP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function OP(e,t,n){let r={};return jP(r,IP(e,t)),e.create(t,e.Fragment,r,n)}function kP(e,t){return t.value}function AP(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jP(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function MP(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function NP(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=sP(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function PP(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&gP.call(t.properties,i)){let a=LP(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bP.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function FP(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else BP(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else BP(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function IP(e,t){let n=[],r=-1,i=e.passKeys?new Map:_P;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=CP(e,a,o);s!==void 0&&n.push(s)}return n}function LP(e,t,n){let r=Im(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_h(n):vh(n)),r.property===`style`){let t=typeof n==`object`?n:RP(e,String(n));return e.stylePropertyNameCase===`css`&&(t=VP(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Mm[r.property]||r.property:r.attribute,n]}}function RP(e,t){try{return(0,hP.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new mP("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=xP+`#cannot-parse-style-attribute`,r}}function zP(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=tP(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=tP(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return gP.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);BP(e)}function BP(e,t){let n=new mP("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=xP+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function VP(e){let t={},n;for(n in e)gP.call(e,n)&&(t[HP(n)]=e[n]);return t}function HP(e){let t=e.replace(vP,UP);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function UP(e){return`-`+e.toLowerCase()}var WP={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},GP={};function KP(e,t){let n=t||GP;return qP(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function qP(e,t,n){if(YP(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return JP(e.children,t,n)}return Array.isArray(e)?JP(e,t,n):``}function JP(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=qP(e[i],t,n);return r.join(``)}function YP(e){return!!(e&&typeof e==`object`)}var XP=document.createElement(`i`);function ZP(e){let t=`&`+e+`;`;XP.innerHTML=t;let n=XP.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function QP(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function $P(e,t){return e.length>0?(QP(e,e.length,0,t),e):t}var eF={}.hasOwnProperty;function tF(e){let t={},n=-1;for(;++n<e.length;)nF(t,e[n]);return t}function nF(e,t){let n;for(n in t){let r=(eF.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){eF.call(r,a)||(r[a]=[]);let e=i[a];rF(r[a],Array.isArray(e)?e:e?[e]:[])}}}function rF(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);QP(e,0,0,r)}function iF(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function aF(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var oF=_F(/[A-Za-z]/),sF=_F(/[\dA-Za-z]/),cF=_F(/[#-'*+\--9=?A-Z^-~]/);function lF(e){return e!==null&&(e<32||e===127)}var uF=_F(/\d/),dF=_F(/[\dA-Fa-f]/),fF=_F(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function pF(e){return e!==null&&(e<0||e===32)}function mF(e){return e===-2||e===-1||e===32}var hF=_F(/\p{P}|\p{S}/u),gF=_F(/\s/);function _F(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function vF(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&sF(e.charCodeAt(n+1))&&sF(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function yF(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return mF(r)?(e.enter(n),s(r)):t(r)}function s(r){return mF(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var bF={tokenize:xF};function xF(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),yF(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var SF={tokenize:wF},CF={tokenize:TF};function wF(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return QP(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(CF,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(CF,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;QP(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function TF(e,t,n){return yF(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function EF(e){if(e===null||pF(e)||gF(e))return 1;if(hF(e))return 2}function DF(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var OF={name:`attention`,resolveAll:kF,tokenize:AF};function kF(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};jF(d,-c),jF(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=$P(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=$P(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=$P(l,DF(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=$P(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=$P(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,QP(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function AF(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=EF(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=EF(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function jF(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var MF={name:`autolink`,tokenize:NF};function NF(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return oF(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||sF(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||sF(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||lF(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):cF(t)?(e.consume(t),l):n(t)}function u(e){return sF(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||sF(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var PF={partial:!0,tokenize:FF};function FF(e,t,n){return r;function r(t){return mF(t)?yF(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var IF={continuation:{tokenize:RF},exit:zF,name:`blockQuote`,tokenize:LF};function LF(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return mF(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function RF(e,t,n){let r=this;return i;function i(t){return mF(t)?yF(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(IF,t,n)(r)}}function zF(e){e.exit(`blockQuote`)}var BF={name:`characterEscape`,tokenize:VF};function VF(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return fF(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var HF={name:`characterReference`,tokenize:UF};function UF(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=sF,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=dF,u):(e.enter(`characterReferenceValue`),a=7,o=uF,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===sF&&!ZP(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var WF={partial:!0,tokenize:qF},GF={concrete:!0,name:`codeFenced`,tokenize:KF};function KF(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),mF(t)?yF(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(WF,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):mF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),yF(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&mF(t)?yF(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(WF,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),mF(t)?yF(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),mF(t)?yF(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function qF(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var JF={name:`codeIndented`,tokenize:XF},YF={partial:!0,tokenize:ZF};function XF(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),yF(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(YF,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ZF(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):yF(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var QF={name:`codeText`,previous:eI,resolve:$F,tokenize:tI};function $F(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function eI(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function tI(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var nI=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&rI(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),rI(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rI(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);rI(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);rI(this.left,t.reverse())}}}};function rI(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function iI(e){let t={},n=-1,r,i,a,o,s,c,l,u=new nI(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,aI(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return QP(e,0,1/0,u.slice(0)),!l}function aI(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var oI={resolve:cI,tokenize:lI},sI={partial:!0,tokenize:uI};function cI(e){return iI(e),e}function lI(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(sI,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function uI(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),yF(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function dI(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||lF(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||pF(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||lF(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function fI(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!mF(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function pI(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),yF(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function mI(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):mF(i)?yF(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var hI={name:`definition`,tokenize:_I},gI={partial:!0,tokenize:vI};function _I(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return fI.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=aF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return pF(t)?mI(e,l)(t):l(t)}function l(t){return dI(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(gI,d,d)(t)}function d(t){return mF(t)?yF(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function vI(e,t,n){return r;function r(t){return pF(t)?mI(e,i)(t):n(t)}function i(t){return pI(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return mF(t)?yF(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var yI={name:`hardBreakEscape`,tokenize:bI};function bI(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var xI={name:`headingAtx`,resolve:SI,tokenize:CI};function SI(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},QP(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function CI(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||pF(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):mF(n)?yF(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||pF(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var wI=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),TI=[`pre`,`script`,`style`,`textarea`],EI={concrete:!0,name:`htmlFlow`,resolveTo:kI,tokenize:AI},DI={partial:!0,tokenize:MI},OI={partial:!0,tokenize:jI};function kI(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function AI(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):oF(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):oF(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return oF(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||pF(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&TI.includes(l)?(i=1,r.interrupt?t(s):O(s)):wI.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||sF(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return mF(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||oF(t)?(e.consume(t),b):mF(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||sF(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):mF(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):mF(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||pF(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||mF(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):mF(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(DI,ne,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(OI,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return TI.includes(n)?(e.consume(t),F):O(t)}return oF(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function jI(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function MI(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(PF,t,n)}}var NI={name:`htmlText`,tokenize:PI};function PI(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):oF(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):oF(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return oF(t)?(e.consume(t),S):n(t)}function S(t){return t===45||sF(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):mF(t)?(e.consume(t),C):M(t)}function w(t){return t===45||sF(t)?(e.consume(t),w):t===47||t===62||pF(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||oF(t)?(e.consume(t),E):$(t)?(o=T,N(t)):mF(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||sF(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):mF(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):mF(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||pF(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||pF(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return mF(t)?yF(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var FI={name:`labelEnd`,resolveAll:zI,resolveTo:BI,tokenize:VI},II={tokenize:HI},LI={tokenize:UI},RI={tokenize:WI};function zI(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&QP(e,0,e.length,n),e}function BI(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=$P(s,e.slice(a+1,a+r+3)),s=$P(s,[[`enter`,u,t]]),s=$P(s,DF(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=$P(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=$P(s,e.slice(o+1)),s=$P(s,[[`exit`,c,t]]),QP(e,a,e.length,s),e}function VI(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(aF(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(II,u,o?u:d)(t):t===91?e.attempt(LI,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(RI,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function HI(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return pF(t)?mI(e,a)(t):a(t)}function a(t){return t===41?u(t):dI(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return pF(t)?mI(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?pI(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return pF(t)?mI(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function UI(e,t,n){let r=this;return i;function i(t){return fI.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(aF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function WI(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var GI={name:`labelStartImage`,resolveAll:FI.resolveAll,tokenize:KI};function KI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var qI={name:`labelStartLink`,resolveAll:FI.resolveAll,tokenize:JI};function JI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var YI={name:`lineEnding`,tokenize:XI};function XI(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),yF(e,t,`linePrefix`)}}var ZI={name:`thematicBreak`,tokenize:QI};function QI(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),mF(t)?yF(e,s,`whitespace`)(t):s(t))}}var $I={continuation:{tokenize:rL},exit:aL,name:`list`,tokenize:nL},eL={partial:!0,tokenize:oL},tL={partial:!0,tokenize:iL};function nL(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:uF(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ZI,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return uF(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(PF,r.interrupt?n:u,e.attempt(eL,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return mF(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function rL(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(PF,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yF(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!mF(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tL,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,yF(e,e.attempt($I,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function iL(e,t,n){let r=this;return yF(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function aL(e){e.exit(this.containerState.type)}function oL(e,t,n){let r=this;return yF(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!mF(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var sL={name:`setextUnderline`,resolveTo:cL,tokenize:lL};function cL(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function lL(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),mF(t)?yF(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var uL={tokenize:dL};function dL(e){let t=this,n=e.attempt(PF,r,e.attempt(this.parser.constructs.flowInitial,i,yF(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oI,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var fL={resolveAll:gL()},pL=hL(`string`),mL=hL(`text`);function hL(e){return{resolveAll:gL(e===`text`?_L:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function gL(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function _L(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var vL=s({attentionMarkers:()=>EL,contentInitial:()=>bL,disable:()=>DL,document:()=>yL,flow:()=>SL,flowInitial:()=>xL,insideSpan:()=>TL,string:()=>CL,text:()=>wL}),yL={42:$I,43:$I,45:$I,48:$I,49:$I,50:$I,51:$I,52:$I,53:$I,54:$I,55:$I,56:$I,57:$I,62:IF},bL={91:hI},xL={[-2]:JF,[-1]:JF,32:JF},SL={35:xI,42:ZI,45:[sL,ZI],60:EI,61:sL,95:ZI,96:GF,126:GF},CL={38:HF,92:BF},wL={[-5]:YI,[-4]:YI,[-3]:YI,33:GI,38:HF,42:OF,60:[MF,NI],91:qI,92:[yI,BF],93:FI,95:OF,96:QF},TL={null:[OF,fL]},EL={null:[42,95]},DL={null:[]};function OL(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=$P(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=DF(a,l.events,l),l.events):[]}function f(e,t){return AL(p(e),t)}function p(e){return kL(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&QP(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function kL(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function AL(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1733
|
+
`;break;case-3:o=`\r
|
|
1734
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function jL(e){let t={constructs:tF([vL,...(e||{}).extensions||[]]),content:n(bF),defined:[],document:n(SF),flow:n(uL),lazy:{},string:n(pL),text:n(mL)};return t;function n(e){return n;function n(n){return OL(t,e,n)}}}function ML(e){for(;!iI(e););return e}var NL=/[\0\t\n\r]/g;function PL(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(NL.lastIndex=u,c=NL.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var FL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function IL(e){return e.replace(FL,LL)}function LL(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return iF(n.slice(t?2:1),t?16:10)}return ZP(n)||e}var RL={}.hasOwnProperty;function zL(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),BL(n)(ML(jL(n).document().write(PL()(e,t,!0))))}function BL(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:I,characterReferenceMarkerNumeric:I,characterReferenceValue:L,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};HL(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];RL.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||WL).call(a,void 0,e[0])}for(r.position={start:VL(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:VL(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:VL(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||WL).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+uP({start:e.start,end:e.end})+`): it’s not open`);n.position.end=VL(e.end)}function u(){return KP(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=aF(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:VL(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=VL(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=VL(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=IL(t),n.identifier=aF(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=aF(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function I(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=iF(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ZP(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=VL(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function VL(e){return{line:e.line,column:e.column,offset:e.offset}}function HL(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?HL(e,r):UL(e,r)}}function UL(e,t){let n;for(n in t)if(RL.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function WL(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+uP({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uP({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+uP({start:t.start,end:t.end})+`) is still open`)}function GL(e){let t=this;t.parser=n;function n(n){return zL(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function KL(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function qL(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
1735
|
+
`}]}function JL(e,t){let n=t.value?t.value+`
|
|
1736
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function YL(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XL(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZL(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=vF(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function QL(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $L(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function eR(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function tR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eR(e,t);let i={src:vF(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function nR(e,t){let n={src:vF(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rR(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eR(e,t);let i={href:vF(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function aR(e,t){let n={href:vF(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oR(e,t,n){let r=e.all(t),i=n?sR(n):cR(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1737
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1738
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function sR(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=cR(n[r])}return t}function cR(e){return e.spread??e.children.length>1}function lR(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function uR(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dR(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fR(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pR(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=sP(t.children[1]),o=oP(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function mR(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function hR(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var gR=9,_R=32;function vR(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(yR(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(yR(t.slice(i),i>0,!1)),a.join(``)}function yR(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===gR||t===_R;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===gR||t===_R;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function bR(e,t){let n={type:`text`,value:vR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function xR(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var SR={blockquote:KL,break:qL,code:JL,delete:YL,emphasis:XL,footnoteReference:ZL,heading:QL,html:$L,imageReference:tR,image:nR,inlineCode:rR,linkReference:iR,link:aR,listItem:oR,list:lR,paragraph:uR,root:dR,strong:fR,table:pR,tableCell:hR,tableRow:mR,text:bR,thematicBreak:xR,toml:CR,yaml:CR,definition:CR,footnoteDefinition:CR};function CR(){}var wR=typeof self==`object`?self:globalThis,TR=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new wR[e](t)},ER=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof wR[e]==`function`?TR(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(TR(a,o),i)};return r},DR=e=>ER(new Map,e)(0),OR=``,{toString:kR}={},{keys:AR}=Object,jR=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=kR.call(e).slice(8,-1);switch(n){case`Array`:return[1,OR];case`Object`:return[2,OR];case`Date`:return[3,OR];case`RegExp`:return[4,OR];case`Map`:return[5,OR];case`Set`:return[6,OR];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},MR=([e,t])=>e===0&&(t===`function`||t===`symbol`),NR=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=jR(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of AR(r))(e||!MR(jR(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?OR:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(MR(jR(n))||MR(jR(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!MR(jR(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},PR=(e,{json:t,lossy:n}={})=>{let r=[];return NR(!(t||n),!!t,new Map,r)(e),r},FR=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?DR(PR(e,t)):structuredClone(e):(e,t)=>DR(PR(e,t));function IR(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function LR(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function RR(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||IR,r=e.options.footnoteBackLabel||LR,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=vF(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...FR(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
1739
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
1740
|
+
`}]}}var zR=(function(e){if(e==null)return WR;if(typeof e==`function`)return UR(e);if(typeof e==`object`)return Array.isArray(e)?BR(e):VR(e);if(typeof e==`string`)return HR(e);throw Error(`Expected function, string, or object as test`)});function BR(e){let t=[],n=-1;for(;++n<e.length;)t[n]=zR(e[n]);return UR(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function VR(e){let t=e;return UR(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function HR(e){return UR(t);function t(t){return t&&t.type===e}}function UR(e){return t;function t(t,n,r){return!!(GR(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function WR(){return!0}function GR(e){return typeof e==`object`&&!!e&&`type`in e}function KR(e){return e}var qR=[];function JR(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=zR(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+KR(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=qR,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=YR(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function YR(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?qR:[e]}function XR(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),JR(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var ZR={}.hasOwnProperty,QR={};function $R(e,t){let n=t||QR,r=new Map,i=new Map,a={all:s,applyData:tz,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...SR,...n.handlers},one:o,options:n,patch:ez,wrap:rz};return XR(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(ZR.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=FR(n);return r.children=a.all(e),r}return FR(e)}return(a.options.unknownHandler||nz)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=iz(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=iz(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function ez(e,t){e.position&&(t.position=lP(e))}function tz(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,FR(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function nz(e,t){let n=t.data||{},r=`value`in t&&!(ZR.call(n,`hProperties`)||ZR.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rz(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
1741
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
1742
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
1743
|
+
`}),n}function iz(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function az(e,t){let n=$R(e,t),r=n.one(e,void 0),i=RR(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
1744
|
+
`},i)),a}function oz(e,t){return e&&`run`in e?async function(n,r){let i=az(n,{file:r,...t});await e.run(i,r)}:function(n,r){return az(n,{file:r,...e||t})}}function sz(e){if(e)throw e}var cz=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function lz(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function uz(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?dz(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function dz(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var fz={basename:pz,dirname:mz,extname:hz,join:gz,sep:`/`};function pz(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);yz(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function mz(e){if(yz(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function hz(e){yz(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function gz(...e){let t=-1,n;for(;++t<e.length;)yz(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:_z(n)}function _z(e){yz(e);let t=e.codePointAt(0)===47,n=vz(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function vz(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function yz(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var bz={cwd:xz};function xz(){return`/`}function Sz(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Cz(e){if(typeof e==`string`)e=new URL(e);else if(!Sz(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return wz(e)}function wz(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Tz=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Ez=class{constructor(e){let t;t=e?Sz(e)?{path:e}:typeof e==`string`||Az(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:bz.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Tz.length;){let e=Tz[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Tz.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?fz.basename(this.path):void 0}set basename(e){Oz(e,`basename`),Dz(e,`basename`),this.path=fz.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?fz.dirname(this.path):void 0}set dirname(e){kz(this.basename,`dirname`),this.path=fz.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?fz.extname(this.path):void 0}set extname(e){if(Dz(e,`extname`),kz(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=fz.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Sz(e)&&(e=Cz(e)),Oz(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?fz.basename(this.path,this.extname):void 0}set stem(e){Oz(e,`stem`),Dz(e,`stem`),this.path=fz.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new mP(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Dz(e,t){if(e&&e.includes(fz.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+fz.sep+"`")}function Oz(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function kz(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Az(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var jz=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Mz=l(cz(),1),Nz={}.hasOwnProperty,Pz=new class e extends jz{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=uz()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Mz.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Lz(`data`,this.frozen),this.namespace[e]=t,this):Nz.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Lz(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Bz(e),n=this.parser||this.Parser;return Fz(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Fz(`process`,this.parser||this.Parser),Iz(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Bz(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Hz(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Fz(`processSync`,this.parser||this.Parser),Iz(`processSync`,this.compiler||this.Compiler),this.process(e,r),zz(`processSync`,`process`,t),n;function r(e,r){t=!0,sz(e),n=r}}run(e,t,n){Rz(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Bz(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),zz(`runSync`,`run`,n),r;function i(e,t){sz(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Bz(t),r=this.compiler||this.Compiler;return Iz(`stringify`,r),Rz(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Lz(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Mz.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];lz(o)&&lz(r)&&(r=(0,Mz.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Fz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Iz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Lz(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rz(e){if(!lz(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function zz(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bz(e){return Vz(e)?e:new Ez(e)}function Vz(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Hz(e){return typeof e==`string`||Uz(e)}function Uz(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Wz=[],Gz={allowDangerousHtml:!0},Kz=/^(https?|ircs?|mailto|xmpp)$/i,qz=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Jz(e){let t=Yz(e),n=Xz(e);return Zz(t.runSync(t.parse(n),n),e)}function Yz(e){let t=e.rehypePlugins||Wz,n=e.remarkPlugins||Wz,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gz}:Gz;return Pz().use(GL).use(n).use(oz,r).use(t)}function Xz(e){let t=e.children||``,n=new Ez;return typeof t==`string`?n.value=t:``+t,n}function Zz(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Qz;for(let e of qz)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return XR(e,l),SP(e,{Fragment:x.Fragment,components:i,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in WP)if(Object.hasOwn(WP,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=WP[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Qz(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Kz.test(e.slice(0,t))?e:``}var $z=[`code`,`em`,`strong`,`a`];function eB(e){return e.replace(/\s+/g,` `).trim()}var tB=(0,v.createContext)(null);function nB(e){return(0,x.jsx)(tB.Provider,{value:e.value,children:e.children})}function rB(){return(0,v.useContext)(tB)}function iB(e){let{source:t,stale:n=!1,onCite:r,children:i}=e,a=yA[t.kind],o=t.path!==void 0&&t.side!==void 0&&t.line!==void 0,s=H(`cursor-pointer font-medium text-primary underline-offset-2 hover:underline`,n&&`text-warn`);return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(`span`,{role:`link`,tabIndex:0,className:s,onClick:e=>{if(e.preventDefault(),e.stopPropagation(),o){r?.(t);return}t.url!==void 0&&window.open(t.url,`_blank`,`noopener,noreferrer`)},children:[(0,x.jsx)(a,{"aria-hidden":!0,className:`mr-[0.18em] inline size-[0.8em] align-[-0.12em]`}),i]})}),(0,x.jsxs)(yl,{className:`max-w-sm space-y-1 border border-border bg-popover px-3 py-2 text-popover-foreground shadow-card`,children:[(0,x.jsx)(`p`,{className:`font-mono text-[10px] tracking-[0.14em] uppercase text-muted-foreground`,children:vA[t.kind]}),(0,x.jsx)(`p`,{className:`font-medium text-foreground`,children:t.label}),t.gist===void 0?null:(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:t.gist}),n?(0,x.jsx)(`p`,{className:`text-warn`,children:`This source id is missing from the review document.`}):null,t.url===void 0?null:(0,x.jsxs)(`a`,{className:`inline-flex items-center gap-0.5 text-primary hover:underline`,href:t.url,target:`_blank`,rel:`noreferrer`,children:[`Open`,(0,x.jsx)(pn,{className:`size-3`})]})]})]})}function aB(e){return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(`span`,{className:`text-warn`,children:e.children})}),(0,x.jsx)(yl,{children:`Unknown source. The id is not in the review document.`})]})}var oB=`mx-[0.08em] box-decoration-clone rounded-[0.22em] bg-[color-mix(in_srgb,var(--foreground)_8%,transparent)] px-[0.32em] py-[0.12em] font-mono text-[0.86em] font-medium not-italic`;function sB(e){return e.startsWith(`source:`)?e:Qz(e)}function cB(e){let t=eB(e.text),n=rB();if(t===``)return null;let r={code:({children:e})=>(0,v.createElement)(`code`,{className:oB},e),strong:({children:e})=>(0,v.createElement)(`strong`,{className:`font-semibold`},e),a:({href:e,children:t})=>{let r=IN(e);if(r===void 0)return e===void 0||e===``?(0,v.createElement)(`span`,null,t):(0,v.createElement)(`a`,{href:e,className:`text-primary hover:underline`,target:`_blank`,rel:`noreferrer`},t);let i=n?.byId.get(r);return i===void 0?(0,v.createElement)(aB,{children:t}):(0,v.createElement)(iB,{source:i,onCite:n?.onCite,children:t})}};return(0,v.createElement)(Jz,{skipHtml:!0,unwrapDisallowed:!0,allowedElements:[...$z],urlTransform:sB,components:r,children:t})}var lB=`m-0 leading-[1.45] text-pretty text-foreground`,uB=`m-0 list-none divide-y divide-border p-0`;function dB(e){return(0,x.jsx)(`p`,{id:e.id,className:H(`font-mono text-[11px] leading-[1.45] text-muted-foreground`,e.className),children:e.children})}function fB(e){let t=(0,v.useId)(),n=e.kickerId??t;return(0,x.jsxs)(`section`,{className:H(`mb-4 grid grid-cols-[5.75rem_minmax(0,1fr)] items-baseline gap-x-4 last:mb-0 max-[799px]:grid-cols-1 max-[799px]:gap-y-1`,e.className),"aria-labelledby":n,children:[(0,x.jsx)(dB,{id:n,children:e.kicker}),(0,x.jsx)(`div`,{className:`min-w-0`,children:e.children})]})}function pB(e){let{claims:t,focusKey:n,className:r}=e,i=(0,v.useId)();if((0,v.useEffect)(()=>{if(n===void 0)return;let e=document.querySelector(`[data-lookfor="${CSS.escape(n)}"]`);if(!(e instanceof HTMLElement))return;let t=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;e.scrollIntoView({block:`center`,behavior:t?`instant`:`smooth`})},[n]),t.length===0)return null;let a=t.some(e=>e.tag!==void 0);return(0,x.jsx)(fB,{kicker:`Look for`,kickerId:i,className:r,children:(0,x.jsx)(`ol`,{className:uB,children:t.map(e=>{let t=e.key===n;return(0,x.jsxs)(`li`,{"data-lookfor":e.key,"aria-current":t?`location`:void 0,className:H(`-mx-2 rounded-sm px-2 py-2`,a&&`grid grid-cols-[4.75rem_minmax(0,1fr)] items-baseline gap-x-2`,t&&`bg-accent`),children:[a?(0,x.jsx)(mB,{tag:e.tag}):null,(0,x.jsx)(`div`,{className:lB,children:(0,x.jsx)(cB,{text:e.body})})]},e.key)})})})}function mB(e){if(e.tag===void 0)return(0,x.jsx)(`span`,{className:e.className});let t=e.tag===`Breaking`||e.tag===`Race`;return(0,x.jsx)(`span`,{className:H(`font-mono text-[11px] leading-[1.45] tracking-[0.14em] uppercase`,t?`text-warn`:`text-muted-foreground`,e.className),children:e.tag})}function hB(e){let{ids:t,sources:n,mixed:r=!1,parts:i=[],className:a}=e,o=rB(),s=o?.onOpenSource,c=o?.selectionForSource;if(t.length===0)return null;let l=new Map(n.map(e=>[e.id,e])),u=t.flatMap(e=>{let t=l.get(e);return t===void 0?[]:[t]});return u.length===0?null:(0,x.jsx)(fB,{kicker:`Sources`,className:a,children:(0,x.jsx)(`ul`,{className:uB,children:u.map(e=>{let t=r?i.find(t=>t.title===e.part):void 0,n=e.gist??e.title,a=s!==void 0&&c!==void 0&&(e.url===void 0||n!==void 0);return(0,x.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2 py-1 leading-[1.45]`,children:[t===void 0?null:(0,x.jsx)(`span`,{"aria-hidden":!0,className:`mt-[0.3em] size-2 shrink-0 rounded-full`,style:{backgroundColor:Rl(t.colorIndex)}}),e.url===void 0?a?null:(0,x.jsx)(`span`,{className:`max-w-[40%] shrink-0 truncate text-foreground`,children:e.label}):(0,x.jsx)(`a`,{className:H(`max-w-[40%] shrink-0 truncate text-foreground`,CN),href:e.url,target:`_blank`,rel:`noreferrer`,children:e.label}),a?(0,x.jsxs)(wN,{selection:c(e),onSelect:()=>s(e),className:`flex min-w-0 flex-1 items-baseline gap-2`,ariaLabel:`Open ${e.label} in the review`,children:[e.url===void 0?(0,x.jsx)(`span`,{className:H(`max-w-[40%] shrink-0 truncate text-foreground`,CN),children:e.label}):null,n===void 0?null:(0,x.jsx)(`span`,{className:`min-w-0 flex-1 text-pretty font-normal text-muted-foreground`,children:n})]}):n===void 0?null:(0,x.jsx)(`span`,{className:`min-w-0 flex-1 text-pretty text-muted-foreground`,children:n})]},e.id)})})})}function gB(e){return(0,x.jsxs)(`div`,{className:e.className,children:[e.kicker===void 0?null:e.kickerExtra===void 0?(0,x.jsx)(dB,{className:`mb-2`,children:e.kicker}):(0,x.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,x.jsx)(dB,{children:e.kicker}),e.kickerExtra]}),(0,x.jsx)(`h1`,{className:`mb-3 font-display text-title-sm tracking-[-0.015em] text-balance text-foreground min-[800px]:text-title`,children:e.title}),e.children]})}function _B(e){let{group:t,groups:n,document:r,onOpenGroup:i,focusLookForKey:a}=e,o=Pl(n),s=zl(o),c=Fl(o,t.id),l=qN(n,t.id),u=r.groups.find(e=>e.id===t.id),d=u===void 0?t.sources:zN(u),f=s?t.part:void 0,p={kind:`group`,id:t.id,title:t.title,index:c,...t.part===void 0?{}:{part:t.part}};return(0,x.jsx)(gB,{kicker:f===void 0?Rt(c):`${f} · ${Rt(c)}`,title:t.title,kickerExtra:(0,x.jsx)(ZN,{prompt:AN({group:t.id}),scope:`group`}),children:(0,x.jsxs)(`div`,{children:[(0,x.jsx)(fB,{kicker:`Why`,children:(0,x.jsx)(`p`,{className:lB,children:(0,x.jsx)(cB,{text:t.why})})}),(0,x.jsx)(fB,{kicker:`What`,children:(0,x.jsx)(`p`,{className:lB,children:(0,x.jsx)(cB,{text:t.summary})})}),(0,x.jsx)(pB,{claims:WN(p,t.lookFor),focusKey:a}),(0,x.jsx)(hB,{ids:d,sources:r.sources??[]}),(0,x.jsx)(vB,{label:`Depends on`,hops:l.dependsOn,parts:o,onOpenGroup:i}),(0,x.jsx)(vB,{label:`Needed by`,hops:l.dependents,parts:o,onOpenGroup:i}),t.staleCount>0?(0,x.jsxs)(`p`,{className:`mt-3 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 vB(e){return e.hops.length===0?null:(0,x.jsx)(fB,{kicker:e.label,children:(0,x.jsx)(`p`,{className:`m-0 leading-[1.45] text-muted-foreground`,children:e.hops.map((t,n)=>{let r=Fl(e.parts,t.id),i=r>0?`${Rt(r)} ${t.title}`:t.title;return(0,x.jsxs)(`span`,{children:[n>0?`, `:``,(0,x.jsx)(wN,{selection:{kind:`group`,id:t.id},onSelect:()=>e.onOpenGroup(t.id),className:`text-primary ${CN}`,children:i})]},t.id)})})})}function yB(e){let{meta:t,parts:n,onOpenGroup:r,focusLookForKey:i}=e,a=zl(n),o=new Map(t.groups.map(e=>[e.id,e])),s=t.document.why,c=t.document.sources??[];return(0,x.jsxs)(`div`,{className:`mb-5 [[data-motion=group]_&]:[view-transition-name:review-overview]`,children:[(0,x.jsxs)(gB,{kicker:`${zt(t.document.size)} · ${t.files.length} files`,title:t.document.title,kickerExtra:(0,x.jsx)(ZN,{prompt:AN(`overview`),scope:`overview`}),children:[s===void 0?null:(0,x.jsx)(fB,{kicker:`Why`,kickerId:`review-why`,children:(0,x.jsx)(`p`,{className:lB,children:(0,x.jsx)(cB,{text:s})})}),(0,x.jsx)(fB,{kicker:`What`,kickerId:`review-what`,children:(0,x.jsx)(`p`,{className:lB,children:(0,x.jsx)(cB,{text:t.document.summary})})}),(0,x.jsx)(pB,{claims:WN({kind:`document`},t.document.lookFor),focusKey:i}),(0,x.jsx)(hB,{ids:c.map(e=>e.id),sources:c,mixed:a,parts:n})]}),(0,x.jsx)(`div`,{className:a?`mt-8 grid grid-flow-col auto-cols-[minmax(16rem,1fr)] items-start gap-4 overflow-x-auto pb-1`:`mt-8`,children:n.map(e=>(0,x.jsx)(bB,{part:e,parts:n,mixed:a,groups:t.groups,byId:o,onOpenGroup:r},e.groupIds.join(`\0`)))})]})}function bB(e){let{part:t,mixed:n,groups:r,byId:i,onOpenGroup:a}=e,o=Rl(t.colorIndex),s=t.groupIds[0];return(0,x.jsxs)(`section`,{className:H(`min-w-0`,n&&`rounded-md border border-border py-2`),style:n?xB(o):void 0,"aria-label":t.title,children:[n&&t.title!==void 0&&s!==void 0?(0,x.jsxs)(wN,{selection:{kind:`group`,id:s},onSelect:()=>a(s),className:`mb-1 flex w-full items-center gap-2 px-4 pt-2 text-left font-mono text-[11px] tracking-[0.14em] uppercase text-muted-foreground`,ariaLabel:`Open part ${t.title}`,children:[(0,x.jsx)(`span`,{"aria-hidden":!0,className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:o}}),(0,x.jsx)(`span`,{children:t.title})]}):null,(0,x.jsx)(`ol`,{className:H(`m-0 list-none p-0`,!n&&`divide-y divide-border`),children:t.groupIds.map(o=>{let s=i.get(o);if(s===void 0)return null;let c=Fl(e.parts,o),l=Il(r,o,new Set(t.groupIds));return(0,x.jsx)(`li`,{className:n?`mb-2 last:mb-0`:void 0,children:(0,x.jsxs)(wN,{selection:{kind:`group`,id:s.id},onSelect:()=>a(s.id),className:H(`group flex h-auto w-full min-w-0 items-start justify-start rounded-md px-4 text-left font-normal whitespace-normal no-underline`,`gap-3 rounded-none py-2.5 min-[800px]:py-3`,n&&`rounded-md`),style:l>0?{paddingInlineStart:`${16+Math.min(l,3)*12}px`}:void 0,children:[(0,x.jsx)(`span`,{className:`mt-px w-5 shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground`,children:Rt(c)}),(0,x.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,x.jsx)(`strong`,{className:`block font-medium text-foreground`,children:s.title}),(0,x.jsx)(`span`,{className:`mt-0.5 block leading-[1.45] text-muted-foreground line-clamp-2`,children:(0,x.jsx)(cB,{text:s.summary})})]})]})},s.id)})})]})}function xB(e){return{"--strand":e,borderLeftWidth:3,borderLeftColor:e,backgroundColor:`color-mix(in srgb, ${e} 8%, var(--card))`}}function SB(e){return/^(@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@)/.exec(e)?.[1]??e}function CB(e){let t=[],n=/^(?:export\s+)?(?:async\s+)?(?:function|class|type|interface|enum)\s+([A-Za-z_][\w]*)/;for(let r of e){let e=n.exec(r.trim())?.[1];e!==void 0&&!t.includes(e)&&t.push(e)}return t}function wB(e){let t=0,n=0;for(let r of e)r.kind===`add`?t+=1:r.kind===`del`&&(n+=1);return{added:t,removed:n}}function TB(e){let t=0;return e.map(e=>{let n=wB(e.hunks.flatMap(e=>e.lines)),r={path:e.path,kind:e.kind??`text`,status:e.status??`modified`,patch:e.patch,added:e.added??n.added,removed:e.removed??n.removed,hunkCount:Math.max(e.hunks.length,1),firstIndex:t,complete:e.complete!==!1,hunks:e.hunks};return e.oldPath!==void 0&&(r.oldPath=e.oldPath),t+=r.hunkCount,r})}function EB(e,t){return e.findIndex(e=>t>=e.firstIndex&&t<e.firstIndex+e.hunkCount)}function DB(e){let{files:t,activeHunk:n,viewedPaths:r}=e,i=Math.max(0,EB(t,n));return(0,x.jsxs)(`div`,{className:`mt-3`,children:[(0,x.jsx)(`nav`,{"aria-label":`Files in group`,className:`-mx-4 mb-4 overflow-x-auto border-y border-border bg-card`,children:(0,x.jsx)(`ul`,{className:`flex gap-1 px-3 py-2`,children:t.map((t,n)=>{let a=r.has(t.path),o=n===i;return(0,x.jsx)(`li`,{className:`shrink-0`,children:(0,x.jsx)(`button`,{type:`button`,onClick:()=>e.onSelect(t.firstIndex),className:H(`max-w-[11rem] truncate rounded-md px-2 py-1 font-mono text-[11px] leading-tight`,o?`bg-accent text-foreground`:`text-muted-foreground`,a&&!o&&`opacity-60`),children:vN(t.path)})},t.path)})})}),(0,x.jsx)(`div`,{className:`space-y-5`,children:e.children})]})}function OB(e){let{file:t}=e;return t.kind===`image`?(0,x.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:t.status}):(0,x.jsxs)(`span`,{className:`font-mono text-[11px] tabular-nums`,children:[(0,x.jsxs)(`span`,{className:`text-del`,children:[`−`,t.removed]}),` `,(0,x.jsxs)(`span`,{className:`text-add`,children:[`+`,t.added]})]})}function kB(e){let{files:t,activeHunk:n,viewedPaths:r}=e,i=Math.max(0,EB(t,n)),a=(0,v.useRef)(null),[o,s]=(0,v.useState)(()=>{try{let e=new URLSearchParams(window.location.search).get(`rail`);if(e===`collapsed`)return!0;if(e===`open`)return!1}catch{}try{return gN()}catch{return!1}}),c=()=>{let e=!o;s(e);try{_N(e)}catch{}try{let t=new URL(window.location.href);e?t.searchParams.set(`rail`,`collapsed`):t.searchParams.delete(`rail`),window.history.replaceState(null,``,t)}catch{}};return(0,v.useEffect)(()=>{(a.current?.querySelector(`[data-rail="${i}"]`))?.scrollIntoView({block:`nearest`,behavior:`instant`})},[i]),o?(0,x.jsxs)(`div`,{className:`mt-4 flex min-h-0 gap-0 max-sm:flex-col`,children:[(0,x.jsx)(`div`,{className:`min-w-0 flex-1 space-y-8`,children:e.children}),(0,x.jsxs)(`div`,{className:`sticky top-4 flex h-[calc(100vh-8rem)] shrink-0 self-start flex-col items-center gap-3 border-l border-border bg-card py-3`,style:{width:`44px`},children:[(0,x.jsx)(Li,{size:`icon-sm`,variant:`ghost`,className:`size-7`,"aria-label":`Expand file list`,onClick:c,children:(0,x.jsx)(vn,{className:`size-4 rotate-180`})}),(0,x.jsxs)(`div`,{className:`font-mono text-[10px] leading-none text-muted-foreground [writing-mode:vertical-lr]`,children:[t.length,` files`]})]})]}):(0,x.jsxs)(`div`,{className:`mt-4 flex min-h-0 gap-6 max-sm:flex-col`,children:[(0,x.jsx)(`div`,{className:`min-w-0 flex-1 space-y-8`,children:e.children}),(0,x.jsxs)(`nav`,{ref:a,"aria-label":`Files in group`,className:`flex h-[calc(100vh-7rem)] w-[300px] shrink-0 flex-col overflow-hidden rounded-lg border border-border bg-card shadow-card sticky top-4 self-start max-lg:w-[240px] max-sm:w-full max-sm:h-auto max-sm:max-h-[40vh]`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3 py-2`,children:[(0,x.jsxs)(`p`,{className:`flex-1 font-mono text-[11px] tabular-nums text-muted-foreground`,children:[t.filter(e=>r.has(e.path)).length,` of `,t.length,` viewed`]}),(0,x.jsx)(Li,{size:`icon-sm`,variant:`ghost`,className:`size-7 shrink-0`,"aria-label":`Collapse file list`,onClick:c,children:(0,x.jsx)(vn,{className:`size-4`})})]}),(0,x.jsx)(`div`,{className:`flex-1 overflow-auto py-2`,children:(0,x.jsx)(`ul`,{className:`space-y-0.5 px-2`,children:t.map((t,n)=>{let a=r.has(t.path);return(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{"data-rail":n,onClick:()=>e.onSelect(t.firstIndex),className:H(`flex w-full items-start gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors`,n===i?`bg-accent text-foreground`:`text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,x.jsx)(bn,{className:`mt-0.5 size-3.5 shrink-0`}),(0,x.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,x.jsx)(`span`,{className:H(`block truncate font-mono text-xs leading-tight`,a&&`opacity-60`),children:vN(t.path)}),yN(t.path)?(0,x.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-tight opacity-50`,children:yN(t.path)}):null,(0,x.jsxs)(`span`,{className:`mt-0.5 flex items-center gap-1.5`,children:[(0,x.jsx)(OB,{file:t}),t.hunkCount>1?(0,x.jsxs)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:[t.hunkCount,` hunks`]}):null]})]}),(0,x.jsx)(`span`,{role:`checkbox`,"aria-checked":a,tabIndex:0,onClick:n=>{n.stopPropagation(),e.onViewed(t.path,!a)},onKeyDown:n=>{(n.key===` `||n.key===`Enter`)&&(n.preventDefault(),n.stopPropagation(),e.onViewed(t.path,!a))},className:H(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border transition-colors`,a?`border-primary bg-primary text-primary-foreground`:`border-input bg-background`),"aria-label":a?`Mark as not viewed`:`Mark as viewed`,children:a?(0,x.jsx)(hn,{className:`size-2.5`}):null})]})},t.path)})})})]})]})}var AB=.35,jB=8;function MB(e,t,n,r,i=jB){let a=n*r,o=new Uint8ClampedArray(a*4),s=0;for(let n=0;n<a;n+=1){let r=n*4,a=e[r+3]??0,c=t[r+3]??0,l=a===0&&c===0,u=Math.abs((e[r]??0)-(t[r]??0)),d=Math.abs((e[r+1]??0)-(t[r+1]??0)),f=Math.abs((e[r+2]??0)-(t[r+2]??0)),p=Math.abs(a-c);if(l||Math.max(u,d,f,p)<=i){let e=NB(t[r]??0,t[r+1]??0,t[r+2]??0),n=Math.round(e*AB);o[r]=n,o[r+1]=n,o[r+2]=n,o[r+3]=255;continue}if(s+=1,a===0&&c>0){o[r]=26,o[r+1]=127,o[r+2]=55,o[r+3]=255;continue}if(c===0&&a>0){o[r]=207,o[r+1]=34,o[r+2]=46,o[r+3]=255;continue}o[r]=200,o[r+1]=40,o[r+2]=160,o[r+3]=255}return{pixels:o,changed:s,total:a}}function NB(e,t,n){return Math.round(.2126*e+.7152*t+.0722*n)}function PB(e,t,n,r){if(e<=0||t<=0||n<=0||r<=0)return{width:0,height:0,scale:1};let i=Math.min(1,n/e,r/t);return{width:Math.max(1,Math.round(e*i)),height:Math.max(1,Math.round(t*i)),scale:i}}function FB(e,t,n,r){return PB(e,t,Math.floor(Math.max(0,n-1)/2),r)}function IB(e,t,n){let r=`${e} × ${t}`;return n>=.995?r:`${r} at ${Math.round(n*100)}%`}var LB={stage:`_stage_2307v_2`};function RB(e){let{path:t,status:n}=e,r=n!==`added`,i=n!==`deleted`,a=r?qt({kind:`image`,path:t,side:`old`}):void 0,o=i?qt({kind:`image`,path:t,side:`new`}):void 0,s=a!==void 0&&o!==void 0,c=KB(a),l=KB(o),u=qB(),[d,f]=(0,v.useState)(`side-by-side`),[p,m]=(0,v.useState)(50),h=Math.max(c.naturalWidth,l.naturalWidth),g=Math.max(c.naturalHeight,l.naturalHeight),_=d===`side-by-side`||!s?FB(h,g,u.width,u.maxHeight):PB(h,g,u.width,u.maxHeight),y=_.width>0&&(c.ok||l.ok),b=c.error&&l.error?`These images are not in this clone. Fetch Git LFS objects, then refresh.`:c.error?`The old image is not in this clone. Fetch Git LFS objects, then refresh.`:l.error?`The new image is not in this clone. Fetch Git LFS objects, then refresh.`:null;return(0,x.jsxs)(`div`,{ref:u.ref,className:`min-w-0`,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-border px-3 py-2`,children:[s?(0,x.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-input`,children:[(0,x.jsx)(zB,{active:d===`side-by-side`,onClick:()=>f(`side-by-side`),hint:`Old and new at the same size`,children:`Side by side`}),(0,x.jsx)(zB,{active:d===`slider`,onClick:()=>f(`slider`),hint:`Drag to reveal new over old`,children:`Slider`}),(0,x.jsx)(zB,{active:d===`diff`,onClick:()=>f(`diff`),hint:`Pixels that differ`,children:`Diff`})]}):(0,x.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:n===`added`?`Added`:`Deleted`}),y?(0,x.jsx)(`span`,{className:`ml-auto font-mono text-[11px] tabular-nums text-muted-foreground`,children:IB(h,g,_.scale)}):null]}),b===null?null:(0,x.jsx)(`p`,{className:`px-3 py-2 text-sm text-warn`,children:b}),!y&&b===null?(0,x.jsx)(`p`,{className:`px-3 py-2 text-sm text-muted-foreground`,children:`Reading image…`}):null,(0,x.jsxs)(`div`,{className:`flex w-full justify-center`,children:[y&&(d===`side-by-side`||!s)?(0,x.jsxs)(`div`,{className:`flex`,children:[r?(0,x.jsx)(BB,{label:`Old`,width:_.width,height:_.height,rule:i,children:a!==void 0&&!c.error?(0,x.jsx)(HB,{src:a,alt:`Old`,width:_.width,height:_.height}):(0,x.jsx)(UB,{})}):(0,x.jsx)(BB,{label:`Old`,width:_.width,height:_.height,children:(0,x.jsx)(UB,{text:`Added — no old image`})}),i?(0,x.jsx)(BB,{label:`New`,width:_.width,height:_.height,children:o!==void 0&&!l.error?(0,x.jsx)(HB,{src:o,alt:`New`,width:_.width,height:_.height}):(0,x.jsx)(UB,{})}):(0,x.jsx)(BB,{label:`New`,width:_.width,height:_.height,children:(0,x.jsx)(UB,{text:`Deleted — no new image`})})]}):null,y&&d===`slider`&&s&&a!==void 0&&o!==void 0?(0,x.jsx)(WB,{oldUrl:a,newUrl:o,width:_.width,height:_.height,wipe:p,onWipe:m}):null,y&&d===`diff`&&s&&c.element!==null&&l.element!==null?(0,x.jsx)(GB,{oldImage:c.element,newImage:l.element,naturalWidth:h,naturalHeight:g,width:_.width,height:_.height}):null]})]})}function zB(e){return(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(Li,{type:`button`,size:`sm`,variant:e.active?`secondary`:`ghost`,className:`rounded-none border-0`,"aria-pressed":e.active,onClick:e.onClick,children:e.children})}),(0,x.jsx)(yl,{children:e.hint})]})}function BB(e){return(0,x.jsxs)(`figure`,{className:H(`w-fit shrink-0`,e.rule===!0&&`border-r border-border`),children:[(0,x.jsx)(`figcaption`,{className:`border-b border-border px-3 py-1 font-mono text-[11px] text-muted-foreground`,children:e.label}),(0,x.jsx)(VB,{width:e.width,height:e.height,children:e.children})]})}function VB(e){return(0,x.jsx)(`div`,{ref:e.ref,className:H(LB.stage,`relative shrink-0 overflow-hidden`,e.className),style:{width:e.width,height:e.height},onPointerDown:e.onPointerDown,onPointerMove:e.onPointerMove,children:e.children})}function HB(e){return(0,x.jsx)(`img`,{src:e.src,alt:e.alt,width:e.width,height:e.height,className:`absolute top-0 left-0 max-w-none`,style:{width:e.width,height:e.height,objectFit:`contain`,objectPosition:`left top`}})}function UB(e){return(0,x.jsx)(`p`,{className:`flex h-full items-center px-3 text-sm text-muted-foreground`,children:e.text??`Image missing`})}function WB(e){let{oldUrl:t,newUrl:n,width:r,height:i,wipe:a,onWipe:o}=e,s=(0,v.useId)(),c=(0,v.useRef)(null),l=e=>{let t=c.current;if(t===null)return;let n=t.getBoundingClientRect();n.width!==0&&o(Math.min(100,Math.max(0,(e-n.left)/n.width*100)))};return(0,x.jsxs)(`figure`,{className:`mx-auto w-fit shrink-0`,children:[(0,x.jsxs)(VB,{ref:c,width:r,height:i,className:`cursor-col-resize touch-none`,onPointerDown:e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),l(e.clientX)},onPointerMove:e=>{e.buttons!==0&&l(e.clientX)},children:[(0,x.jsx)(HB,{src:t,alt:`Old`,width:r,height:i}),(0,x.jsx)(`div`,{className:`absolute inset-y-0 left-0 overflow-hidden`,style:{width:`${a}%`},children:(0,x.jsx)(HB,{src:n,alt:`New`,width:r,height:i})}),(0,x.jsxs)(`div`,{className:`pointer-events-none absolute inset-y-0`,style:{left:`${a}%`},"aria-hidden":!0,children:[(0,x.jsx)(`span`,{className:`absolute inset-y-0 left-0 w-px -translate-x-1/2 bg-primary`}),(0,x.jsx)(`span`,{className:`absolute top-1/2 left-0 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border border-primary bg-card`})]})]}),(0,x.jsxs)(`label`,{className:`flex w-full items-center gap-3 px-3 py-2 font-mono text-[11px] text-muted-foreground`,htmlFor:s,children:[`Old`,(0,x.jsx)(`input`,{id:s,type:`range`,min:0,max:100,value:a,"aria-label":`Wipe between old and new`,className:`min-w-0 flex-1 accent-primary`,onChange:e=>o(Number(e.target.value))}),`New`]})]})}function GB(e){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{let n=t.current;if(n===null)return;let i=e.naturalWidth,a=e.naturalHeight;n.width=i,n.height=a;let o=n.getContext(`2d`);if(o===null)return;let s=MB(YB(e.oldImage,i,a),YB(e.newImage,i,a),i,a),c=o.createImageData(i,a);c.data.set(s.pixels),o.putImageData(c,0,0),r({changed:s.changed,total:s.total})},[e.naturalHeight,e.naturalWidth,e.newImage,e.oldImage]),(0,x.jsxs)(`figure`,{className:`mx-auto w-fit shrink-0`,children:[(0,x.jsx)(VB,{width:e.width,height:e.height,children:(0,x.jsx)(`canvas`,{ref:t,className:`block size-full`})}),n===null?null:(0,x.jsxs)(`figcaption`,{className:`px-3 py-2 font-mono text-[11px] tabular-nums text-muted-foreground`,children:[n.changed.toLocaleString(),` of `,n.total.toLocaleString(),` pixels differ`]})]})}function KB(e){let[t,n]=(0,v.useState)({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return(0,v.useEffect)(()=>{if(e===void 0){n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0});return}let t=!1;return n({ok:!1,error:!1,element:null,naturalWidth:0,naturalHeight:0}),JB(e).then(e=>{t||n({ok:!0,error:!1,element:e,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight})}).catch(()=>{t||n({ok:!1,error:!0,element:null,naturalWidth:0,naturalHeight:0})}),()=>{t=!0}},[e]),t}function qB(){let e=(0,v.useRef)(null),[t,n]=(0,v.useState)({width:0,maxHeight:0});return(0,v.useLayoutEffect)(()=>{let t=e.current;if(t===null)return;let r=()=>{let e=Math.floor(t.clientWidth),r=Math.max(120,Math.round(window.innerHeight*.7));n(t=>t.width===e&&t.maxHeight===r?t:{width:e,maxHeight:r})};r();let i=new ResizeObserver(r);return i.observe(t),window.addEventListener(`resize`,r),()=>{i.disconnect(),window.removeEventListener(`resize`,r)}},[]),{ref:e,width:t.width,maxHeight:t.maxHeight}}function JB(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=()=>n(Error(`image load failed`)),r.src=e})}function YB(e,t,n){let r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);return i===null?new Uint8ClampedArray(t*n*4):(i.clearRect(0,0,t,n),i.drawImage(e,0,0),i.getImageData(0,0,t,n).data)}var XB=dr(`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-[color,background-color,border-color,box-shadow,opacity] duration-[var(--motion)] ease-[var(--motion-ease)] 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 ZB({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,x.jsx)(n?Jn:`span`,{"data-slot":`badge`,className:H(XB({variant:t}),e),...r})}var QB=`duration-[var(--motion)] ease-[var(--motion-ease)]`;function $B(e){let{file:t,active:n,index:r,split:i,splitRatio:a,wrap:o,viewed:s,onSplitRatio:c,onOpen:l,onViewed:u,comments:d,focusCommentId:f}=e,p=t.kind===`lockfile`,[m,h]=(0,v.useState)(s||p),[g,_]=(0,v.useState)(t.patch),[y,b]=(0,v.useState)(null),S=t.hunks[0],C=CB(t.hunks.flatMap(e=>e.lines.filter(e=>e.kind===`add`).map(e=>e.text))),w=t.oldPath===void 0?t.path:`${t.oldPath} → ${t.path}`,T=(0,v.useId)(),E=(0,v.useMemo)(()=>(d??[]).filter(e=>e.path===t.path||e.path===t.oldPath),[d,t.oldPath,t.path]),D=f!==void 0&&E.some(e=>e.id===f);return(0,v.useEffect)(()=>{h(s||p)},[p,s]),(0,v.useEffect)(()=>{D&&h(!1)},[D]),(0,v.useEffect)(()=>{if(m||!p||g!==``||y!==null)return;let e=!1;return Zt(t.path).then(t=>{e||_(t.patch)}).catch(t=>{e||b(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[m,p,t.path,g,y]),(0,x.jsxs)(`article`,{className:H(`overflow-hidden rounded-lg border bg-card shadow-card transition-[border-color]`,QB,n?`border-primary`:`border-border`),"data-hunk":r,children:[(0,x.jsxs)(`header`,{className:H(`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=>{e.target instanceof Element&&e.target.closest(`button, input, label, a`)!==null||h(e=>!e)},children:[(0,x.jsx)(Li,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`size-6`,"aria-expanded":!m,"aria-controls":T,"aria-label":m?`Expand file`:`Collapse file`,onClick:()=>h(e=>!e),children:(0,x.jsx)(gn,{className:H(`size-4 transition-transform`,QB,m&&`-rotate-90`)})}),(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsx)(Li,{type:`button`,variant:`link`,className:H(`h-auto p-0 font-mono text-sm transition-colors`,QB,s&&`text-muted-foreground`),onClick:()=>l(t.path),children:w})}),(0,x.jsx)(yl,{children:`Open file`})]}),(0,x.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:t.kind===`image`?`image`:t.kind===`lockfile`?`lockfile`:t.hunkCount===1&&S!==void 0?SB(S.header):`${t.hunkCount} hunks`}),t.kind===`image`?(0,x.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:t.status}):(0,x.jsxs)(`span`,{className:`font-mono text-[11px] tabular-nums`,children:[(0,x.jsxs)(`span`,{className:`text-del`,children:[`−`,t.removed]}),` `,(0,x.jsxs)(`span`,{className:`text-add`,children:[`+`,t.added]})]}),C.length>0?C.map(e=>(0,x.jsx)(ZB,{variant:`outline`,className:`font-mono font-normal`,children:e},e)):null,(0,x.jsxs)(_l,{children:[(0,x.jsx)(vl,{asChild:!0,children:(0,x.jsxs)(`label`,{className:`ml-auto flex shrink-0 cursor-pointer items-center gap-1.5 text-xs text-muted-foreground select-none`,children:[(0,x.jsx)(`input`,{type:`checkbox`,className:`size-3.5 accent-primary`,checked:s,onChange:e=>u(t.path,e.target.checked)}),(0,x.jsx)(`span`,{className:`max-[799px]:hidden`,children:`Viewed`})]})}),(0,x.jsxs)(yl,{children:[s?`Mark as not viewed`:`Mark as viewed`,` (v)`]})]})]}),(0,x.jsx)(`div`,{id:T,hidden:m,children:m?null:t.kind===`image`?(0,x.jsx)(RB,{path:t.path,status:t.status}):y===null?p&&g===``?(0,x.jsx)(cu,{label:Rn.lockfile}):(0,x.jsx)(IA,{path:t.path,patch:g,split:i,wrap:o,splitRatio:a,onSplitRatio:c,hydrate:t.complete,comments:E,focusCommentId:f}):(0,x.jsx)(`p`,{className:`px-3 py-2 text-sm text-warn`,children:y})})]})}var eV=`(max-width: 799px)`;function tV(){let[e,t]=(0,v.useState)(()=>window.matchMedia(eV).matches);return(0,v.useEffect)(()=>{let e=window.matchMedia(eV),n=()=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function nV(e){let{group:t,bucket:n,groups:r,strandColor:i,loading:a,hunkError:o,files:s,activeHunk:c,split:l,splitRatio:u,wrap:d,viewedPaths:f}=e,p=n===tn.lockfiles,m=i??(p?`var(--muted-foreground)`:n===tn.unassigned?`var(--warn)`:`var(--primary)`),h=s.filter(e=>f.has(e.path)).length,g=tV();(0,v.useEffect)(()=>{let t=e.focusCommentId;if(t===void 0||a)return;let n=0,r=()=>{let e=document.querySelector(`[data-source-id="${CSS.escape(t)}"]`);if(e instanceof HTMLElement){e.scrollIntoView({block:`center`,behavior:`smooth`});return}n+=1,n<90&&requestAnimationFrame(r)};requestAnimationFrame(r)},[a,e.focusCommentId,s]);let _=(t,n)=>(0,x.jsx)($B,{file:t,active:n,index:t.firstIndex,split:l,splitRatio:u,wrap:d,viewed:f.has(t.path),onSplitRatio:e.onSplitRatio,onOpen:e.onOpenFile,onViewed:e.onViewed,comments:e.comments,focusCommentId:e.focusCommentId},t.path);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`mb-4 flex items-stretch gap-3 min-[800px]:mb-5 min-[800px]:gap-4`,children:[(0,x.jsx)(`span`,{className:`w-[3px] flex-none rounded-px [[data-motion=group]_&]:[view-transition-name:review-strand]`,style:{backgroundColor:m},"aria-hidden":!0}),(0,x.jsx)(`div`,{className:`min-w-0 flex-1 [[data-motion=group]_&]:[view-transition-name:review-copy]`,children:t===null?p?(0,x.jsx)(gB,{kicker:`Lockfiles`,title:`Generated lockfiles`}):(0,x.jsx)(gB,{kicker:`Unassigned`,title:`Not in any group`,children:(0,x.jsx)(`p`,{className:`leading-[1.45] text-foreground`,children:`These hunks are in git and in no group. Fix the review document. Never the diff.`})}):(0,x.jsx)(_B,{group:t,groups:r,document:e.document,onOpenGroup:e.onOpenGroup,focusLookForKey:e.focusLookForKey})})]}),o===null?null:(0,x.jsx)(`p`,{className:`mt-4 text-warn`,children:o}),a?(0,x.jsx)(`article`,{className:`mt-8 overflow-hidden rounded-lg border border-border bg-card shadow-card`,children:(0,x.jsx)(cu,{label:Rn.group})}):null,!a&&s.length===0&&o===null?(0,x.jsx)(`p`,{className:`mt-8 text-muted-foreground`,children:`No hunks in this group.`}):null,!a&&s.length>0&&!g?(0,x.jsxs)(`p`,{className:`mt-4 font-mono text-[11px] tabular-nums text-muted-foreground`,children:[h,` of `,s.length,` files viewed`,(0,x.jsx)(`span`,{className:`hidden sm:inline`,children:` · j/k to move, v to toggle`})]}):null,!a&&s.length>0?g?(0,x.jsx)(DB,{files:s,activeHunk:c,viewedPaths:f,onSelect:e.onScrollToHunk,children:s.map(e=>_(e,c>=e.firstIndex&&c<e.firstIndex+e.hunkCount))}):(0,x.jsx)(kB,{files:s,activeHunk:c,viewedPaths:f,onSelect:e.onScrollToHunk,onViewed:e.onViewed,children:s.map(e=>_(e,c>=e.firstIndex&&c<e.firstIndex+e.hunkCount))}):null]})}function rV(e){let t=e.compact===!0?`px-4 py-4`:`px-10 py-8`;return e.inspector===null?(0,x.jsx)(`main`,{ref:e.mainRef,className:H(`h-full overflow-auto`,t,e.className),"aria-busy":e.hunksLoading,children:e.selection?.kind===`overview`?(0,x.jsx)(yB,{meta:e.meta,parts:e.parts,onOpenGroup:t=>e.onSelect({kind:`group`,id:t}),focusLookForKey:e.focusLookForKey}):(0,x.jsx)(nV,{group:e.selectedGroup,bucket:e.selection?.kind===tn.lockfiles?tn.lockfiles:e.selection?.kind===tn.unassigned?tn.unassigned:void 0,groups:e.meta.groups,strandColor:e.strandColor,loading:e.hunksLoading,hunkError:e.hunkError,files:e.hunksLoading?[]:e.files,activeHunk:e.activeHunk,split:e.split,splitRatio:e.splitRatio,wrap:e.wrap,viewedPaths:e.viewedPaths,onScrollToHunk:e.onScrollToHunk,onOpenGroup:t=>e.onSelect({kind:`group`,id:t}),onOpenFile:e.onOpenFile,onSplitRatio:e.onSplitRatio,onViewed:e.onViewed,document:e.meta.document,comments:e.comments,focusCommentId:e.focusCommentId,focusLookForKey:e.focusLookForKey})}):(0,x.jsx)(KA,{inspector:e.inspector,wrap:e.wrap,setInspector:e.setInspector,onClose:e.onCloseInspector})}var iV=0;function aV(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function oV(e){let t=e?.reducedMotion??aV(),n=e?.startViewTransition??(typeof document>`u`?void 0:document.startViewTransition);return!t&&typeof n==`function`}function sV(e,t){if(!oV()){e();return}let n=document.startViewTransition;if(typeof n!=`function`){e();return}let r=document.documentElement,i=++iV;r.dataset.motion=t;try{n.call(document,()=>{(0,Zi.flushSync)(e)}).finished.finally(()=>{i===iV&&delete r.dataset.motion})}catch{i===iV&&delete r.dataset.motion,e()}}function cV(e,t){return`comprehende.viewed.${e}.${t}`}function lV(e){if(e===null||e===``)return new Set;try{let t=JSON.parse(e);return!Array.isArray(t)||t.some(e=>typeof e!=`string`)?new Set:new Set(t)}catch{return new Set}}function uV(e){return JSON.stringify([...e].sort())}function dV(e,t,n){let r=new Set(e);return n?r.add(t):r.delete(t),r}function fV(e){return mV(e),lV(bl(sessionStorage,e))}function pV(e,t){mV(e),xl(sessionStorage,e,uV(t))}function mV(e){Sl(localStorage,e)}function hV(e,t){let n=e!==void 0&&t!==void 0?cV(e,t):null,[r,i]=(0,v.useState)(()=>n===null?new Set:fV(n));return(0,v.useEffect)(()=>{i(n===null?new Set:fV(n))},[n]),{viewedPaths:r,setFileViewed:(0,v.useCallback)((e,t)=>{n!==null&&i(r=>{let i=dV(r,e,t);return pV(n,i),i})},[n])}}function gV({className:e,...t}){return(0,x.jsx)(Dt,{"data-slot":`resizable-panel-group`,className:H(`flex h-full w-full aria-[orientation=vertical]:flex-col`,e),...t})}function _V({...e}){return(0,x.jsx)(Pt,{"data-slot":`resizable-panel`,...e})}function vV({withHandle:e=!1,className:t,...n}){return(0,x.jsx)(Lt,{"data-slot":`resizable-handle`,className:H(`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 after:transition-[background-color] after:duration-[var(--motion)] after:ease-[var(--motion-ease)] 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?(0,x.jsx)(`div`,{className:`bg-border z-10 flex h-8 w-3 items-center justify-center rounded-sm border border-border`,children:(0,x.jsx)(Cn,{className:`size-2.5 text-muted-foreground`})}):null})}function yV(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(.5),[y,b]=(0,v.useState)(!0),[S,C]=(0,v.useState)(null),[w,T]=(0,v.useState)(null),[E,D]=(0,v.useState)(0),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(!0),M=(0,v.useRef)(null),N=(0,v.useRef)(!1),ee=(0,v.useRef)(null),te=tV(),{defaultLayout:P,onLayoutChanged:F}=At({id:`comprehende-shell-overlay`,panelIds:[`stack`,`main`],onlySaveAfterUserInteractions:!0}),ne=(0,v.useCallback)(async()=>{j(!0),r(null);try{let e=await Yt();t(e),a(t=>t??Wl(e,window.location.hash))}catch(e){r(e instanceof Error?e.message:String(e))}finally{j(!1)}},[]);(0,v.useEffect)(()=>{ne()},[ne]),(0,v.useEffect)(()=>{if(e===null||i===null)return;let t=Kl(e,window.location.hash,i,N.current);if(ee.current=Ul(i),N.current=!0,t===`skip`)return;let n=Gl(window.location.href,i);if(t===`replace`){history.replaceState(null,``,n);return}history.pushState(null,``,n)},[e,i]);let re=i?.kind===`group`?i.id:i?.kind===tn.unassigned?tn.unassigned:i?.kind===tn.lockfiles?tn.lockfiles:null;(0,v.useEffect)(()=>{if(re===null){s([]),l(null);return}let e=!1;return d(null),Xt(re).then(t=>{e||(s(t.files),l(re),D(0))}).catch(t=>{e||(s([]),l(re),d(t instanceof Error?t.message:String(t)))}),()=>{e=!0}},[re]);let ie=re!==null&&re!==c,I=(0,v.useCallback)(e=>{$l(e,i)&&O===null||sV(()=>{a(e),k(null)},O===null?`group`:`scene`)},[O,i]),L=(0,v.useCallback)(e=>{T(null),I(e)},[I]);(0,v.useEffect)(()=>{let t=()=>{if(e===null)return;let t=Wl(e,window.location.hash),n=Ul(t);ee.current!==n&&(ee.current=n,L(t))};return window.addEventListener(`hashchange`,t),window.addEventListener(`popstate`,t),()=>{window.removeEventListener(`hashchange`,t),window.removeEventListener(`popstate`,t)}},[e,L]);let ae=(0,v.useCallback)(e=>{sV(()=>{k({path:e,mode:`file`,side:`new`})},`scene`)},[]),oe=(0,v.useCallback)(()=>{O!==null&&sV(()=>k(null),`scene`)},[O]),{viewedPaths:se,setFileViewed:ce}=hV(e?.resolved.baseSha,e?.resolved.headSha),le=(0,v.useCallback)(e=>{D(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let t=M.current,n=(t??document).querySelector(`[data-hunk="${e}"]`);if(n===null||t===null){n?.scrollIntoView({block:`start`,behavior:`instant`});return}let r=t.getBoundingClientRect(),i=n.getBoundingClientRect().top-r.top+t.scrollTop-8;t.scrollTo({top:i,behavior:`instant`})})})},[]);(0,v.useEffect)(()=>{let t=t=>{if(t.metaKey||t.ctrlKey||t.altKey)return;let n=t.target;if(!(n instanceof HTMLElement&&(n.isContentEditable||n.closest(`input, textarea, select`)!==null))){if(t.key===`w`)p(e=>!e);else if(t.key===`c`)LN(e?.document.sources).length>0&&b(e=>!e);else if(t.key===`s`)h(e=>(e||_(.5),!e));else if(t.key===`r`)ne();else if(t.key===`o`)L({kind:`overview`});else if(t.key===`u`)L({kind:tn.unassigned});else if(t.key===`Escape`)oe();else if(t.key===`[`&&!t.repeat)t.preventDefault(),Zl(e,i,L,-1);else if(t.key===`]`&&!t.repeat)t.preventDefault(),Zl(e,i,L,1);else if(t.key===`{`&&!t.repeat)t.preventDefault(),Ql(e,i,L,-1);else if(t.key===`}`&&!t.repeat)t.preventDefault(),Ql(e,i,L,1);else if(O!==null)return;else if(t.key===`j`){let e=TB(o),t=EB(e,E),n=e[Math.min(e.length-1,Math.max(t,0)+1)];n!==void 0&&le(n.firstIndex)}else if(t.key===`k`){let e=TB(o),t=EB(e,E),n=e[Math.max(0,(t===-1?0:t)-1)];n!==void 0&&le(n.firstIndex)}else if(t.key===`v`){let e=TB(o),t=e[Math.max(0,EB(e,E))];t!==void 0&&ce(t.path,!se.has(t.path))}}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[E,oe,O,o,ne,e,le,L,i,ce,se]),(0,v.useEffect)(()=>{w===null&&M.current?.scrollTo({top:0})},[w,i]);let ue=(0,v.useMemo)(()=>e===null||i?.kind!==`group`?null:e.groups.find(e=>e.id===i.id)??null,[e,i]),de=(0,v.useMemo)(()=>TB(o),[o]),fe=(0,v.useMemo)(()=>Pl(e?.groups??[]),[e]),pe=(0,v.useMemo)(()=>Ll(fe),[fe]),me=zl(fe)&&ue!==null?pe.get(ue.id):void 0,he=(0,v.useMemo)(()=>new Set((e?.staleSources??[]).map(e=>e.id)),[e]),ge=(0,v.useMemo)(()=>LN(e?.document.sources),[e]),_e=(0,v.useMemo)(()=>bA(ge,y,he),[ge,y,he]),ve=(0,v.useMemo)(()=>e===null?[]:GN(e.document,e.groups),[e]),ye=(0,v.useCallback)(t=>{if(e===null)return;let n=i?.kind===`group`?i.id:void 0;return KN(t,ve,e.document,n)},[ve,e,i]),be=(0,v.useCallback)(e=>{let t=ye(e);t!==void 0&&(T(t.lookForKey??null),t.commentId===void 0?C(null):(b(!0),C(t.commentId)),I(t.selection))},[I,ye]),xe=(0,v.useMemo)(()=>({byId:new Map((e?.document.sources??[]).map(e=>[e.id,e])),staleIds:he,onCite:be,onOpenSource:be,selectionForSource:e=>ye(e)?.selection??{kind:`overview`}}),[e,be,he,ye]);if(A&&e===null)return(0,x.jsxs)(bV,{children:[(0,x.jsx)(`p`,{className:`mb-5`,children:(0,x.jsx)(au,{})}),(0,x.jsx)(cu,{layout:`page`,label:Rn.review})]});if(n!==null&&e===null)return(0,x.jsx)(bV,{className:`text-warn`,children:n});if(e===null)return null;let Se=m&&!te,Ce=(0,x.jsx)(rV,{inspector:O,wrap:f,setInspector:k,onCloseInspector:oe,mainRef:M,hunksLoading:ie,compact:te,selection:i,meta:e,parts:fe,selectedGroup:ue,strandColor:me===void 0?void 0:Rl(me),hunkError:u,files:de,activeHunk:E,split:Se,splitRatio:g,viewedPaths:se,onScrollToHunk:le,onSelect:L,onOpenFile:ae,onSplitRatio:_,onViewed:ce,comments:_e,focusCommentId:S??void 0,focusLookForKey:w??void 0});return(0,x.jsx)(gl,{children:(0,x.jsx)(nB,{value:xe,children:(0,x.jsx)(`div`,{className:`flex h-full min-h-0 flex-col`,"aria-busy":A||ie,children:te?(0,x.jsx)(ON,{meta:e,selection:i,parts:fe,onSelect:L,wrap:f,onWrap:()=>p(e=>!e),comments:y,onComments:ge.length>0?()=>b(e=>!e):void 0,children:Ce}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(uu,{meta:e,selection:i,onSelect:L,wrap:f,split:m,onWrap:()=>p(e=>!e),onUnified:()=>h(!1),onSplit:()=>{h(!0),m||_(.5)},onRefresh:()=>void ne(),busy:A,comments:y,onComments:ge.length>0?()=>b(e=>!e):void 0}),(0,x.jsxs)(gV,{className:`min-h-0 flex-1`,defaultLayout:P,onLayoutChanged:F,children:[(0,x.jsx)(_V,{id:`stack`,defaultSize:`20`,minSize:`14%`,className:`min-h-0 min-w-0`,children:(0,x.jsx)(EN,{meta:e,selection:i,parts:fe,onSelect:L})}),(0,x.jsx)(vV,{withHandle:!0}),(0,x.jsx)(_V,{id:`main`,defaultSize:`80`,minSize:`40%`,className:`min-h-0 min-w-0`,children:(0,x.jsx)(`div`,{className:`h-full min-h-0 [[data-motion=scene]_&]:[view-transition-name:review-scene]`,children:Ce})})]})]})})})})}function bV(e){return(0,x.jsx)(`div`,{className:H(`px-10 py-8 text-muted-foreground`,e.className),children:e.children})}var xV=document.getElementById(`root`);if(xV===null)throw Error(`missing #root`);(0,y.createRoot)(xV).render((0,x.jsx)(v.StrictMode,{children:(0,x.jsx)(Ml,{children:(0,x.jsx)(EA,{children:(0,x.jsx)(yV,{})})})}));export{s as t};
|