grepmind-app 0.1.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/context.d.ts +43 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +230 -0
- package/dist/context.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +120 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/secrets.d.ts +21 -0
- package/dist/middleware/secrets.d.ts.map +1 -0
- package/dist/middleware/secrets.js +38 -0
- package/dist/middleware/secrets.js.map +1 -0
- package/dist/routes/code.d.ts +61 -0
- package/dist/routes/code.d.ts.map +1 -0
- package/dist/routes/code.js +974 -0
- package/dist/routes/code.js.map +1 -0
- package/dist/routes/code.test.d.ts +7 -0
- package/dist/routes/code.test.d.ts.map +1 -0
- package/dist/routes/code.test.js +418 -0
- package/dist/routes/code.test.js.map +1 -0
- package/dist/routes/events.d.ts +30 -0
- package/dist/routes/events.d.ts.map +1 -0
- package/dist/routes/events.js +152 -0
- package/dist/routes/events.js.map +1 -0
- package/dist/routes/git.d.ts +47 -0
- package/dist/routes/git.d.ts.map +1 -0
- package/dist/routes/git.js +246 -0
- package/dist/routes/git.js.map +1 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +6 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/notes.d.ts +38 -0
- package/dist/routes/notes.d.ts.map +1 -0
- package/dist/routes/notes.js +829 -0
- package/dist/routes/notes.js.map +1 -0
- package/dist/routes/project.d.ts +35 -0
- package/dist/routes/project.d.ts.map +1 -0
- package/dist/routes/project.js +675 -0
- package/dist/routes/project.js.map +1 -0
- package/dist/routes/sync-handler.d.ts +46 -0
- package/dist/routes/sync-handler.d.ts.map +1 -0
- package/dist/routes/sync-handler.js +178 -0
- package/dist/routes/sync-handler.js.map +1 -0
- package/dist/routes/sync.d.ts +31 -0
- package/dist/routes/sync.d.ts.map +1 -0
- package/dist/routes/sync.js +329 -0
- package/dist/routes/sync.js.map +1 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +93 -0
- package/dist/server.js.map +1 -0
- package/dist/tesst.d.ts +2 -0
- package/dist/tesst.d.ts.map +1 -0
- package/dist/tesst.js +2 -0
- package/dist/tesst.js.map +1 -0
- package/dist/web/assets/apl-B4CMkyY2.js +2 -0
- package/dist/web/assets/apl-B4CMkyY2.js.map +1 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js +2 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js.map +1 -0
- package/dist/web/assets/asn1-EdZsLKOL.js +2 -0
- package/dist/web/assets/asn1-EdZsLKOL.js.map +1 -0
- package/dist/web/assets/asterisk-B-8jnY81.js +2 -0
- package/dist/web/assets/asterisk-B-8jnY81.js.map +1 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js +2 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js.map +1 -0
- package/dist/web/assets/clike-B9uivgTg.js +2 -0
- package/dist/web/assets/clike-B9uivgTg.js.map +1 -0
- package/dist/web/assets/clojure-BMjYHr_A.js +2 -0
- package/dist/web/assets/clojure-BMjYHr_A.js.map +1 -0
- package/dist/web/assets/cmake-BQqOBYOt.js +2 -0
- package/dist/web/assets/cmake-BQqOBYOt.js.map +1 -0
- package/dist/web/assets/cobol-CWcv1MsR.js +2 -0
- package/dist/web/assets/cobol-CWcv1MsR.js.map +1 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js +2 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js.map +1 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js +2 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js.map +1 -0
- package/dist/web/assets/crystal-SjHAIU92.js +2 -0
- package/dist/web/assets/crystal-SjHAIU92.js.map +1 -0
- package/dist/web/assets/css-BnMrqG3P.js +2 -0
- package/dist/web/assets/css-BnMrqG3P.js.map +1 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js +2 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js.map +1 -0
- package/dist/web/assets/d-pRatUO7H.js +2 -0
- package/dist/web/assets/d-pRatUO7H.js.map +1 -0
- package/dist/web/assets/diff-DbItnlRl.js +2 -0
- package/dist/web/assets/diff-DbItnlRl.js.map +1 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js +2 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js.map +1 -0
- package/dist/web/assets/dtd-DF_7sFjM.js +2 -0
- package/dist/web/assets/dtd-DF_7sFjM.js.map +1 -0
- package/dist/web/assets/dylan-DwRh75JA.js +2 -0
- package/dist/web/assets/dylan-DwRh75JA.js.map +1 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js +2 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js.map +1 -0
- package/dist/web/assets/ecl-Cabwm37j.js +2 -0
- package/dist/web/assets/ecl-Cabwm37j.js.map +1 -0
- package/dist/web/assets/eiffel-CnydiIhH.js +2 -0
- package/dist/web/assets/eiffel-CnydiIhH.js.map +1 -0
- package/dist/web/assets/elm-vLlmbW-K.js +2 -0
- package/dist/web/assets/elm-vLlmbW-K.js.map +1 -0
- package/dist/web/assets/erlang-BNw1qcRV.js +2 -0
- package/dist/web/assets/erlang-BNw1qcRV.js.map +1 -0
- package/dist/web/assets/factor-kuTfRLto.js +2 -0
- package/dist/web/assets/factor-kuTfRLto.js.map +1 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js +2 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js.map +1 -0
- package/dist/web/assets/forth-Ffai-XNe.js +2 -0
- package/dist/web/assets/forth-Ffai-XNe.js.map +1 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js +2 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js.map +1 -0
- package/dist/web/assets/gas-Bneqetm1.js +2 -0
- package/dist/web/assets/gas-Bneqetm1.js.map +1 -0
- package/dist/web/assets/gherkin-heZmZLOM.js +2 -0
- package/dist/web/assets/gherkin-heZmZLOM.js.map +1 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js +2 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js.map +1 -0
- package/dist/web/assets/haskell-BWDZoCOh.js +2 -0
- package/dist/web/assets/haskell-BWDZoCOh.js.map +1 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js +2 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js.map +1 -0
- package/dist/web/assets/http-DBlCnlav.js +2 -0
- package/dist/web/assets/http-DBlCnlav.js.map +1 -0
- package/dist/web/assets/idl-BEugSyMb.js +2 -0
- package/dist/web/assets/idl-BEugSyMb.js.map +1 -0
- package/dist/web/assets/index-6L7rK6RK.js +2 -0
- package/dist/web/assets/index-6L7rK6RK.js.map +1 -0
- package/dist/web/assets/index-B1YTM6Ei.js +2 -0
- package/dist/web/assets/index-B1YTM6Ei.js.map +1 -0
- package/dist/web/assets/index-B7vcMomf.js +509 -0
- package/dist/web/assets/index-B7vcMomf.js.map +1 -0
- package/dist/web/assets/index-BcZ8RTQK.js +2 -0
- package/dist/web/assets/index-BcZ8RTQK.js.map +1 -0
- package/dist/web/assets/index-C7GrfZtu.js +2 -0
- package/dist/web/assets/index-C7GrfZtu.js.map +1 -0
- package/dist/web/assets/index-C7fIfqkz.js +2 -0
- package/dist/web/assets/index-C7fIfqkz.js.map +1 -0
- package/dist/web/assets/index-C9-Eilv-.js +2 -0
- package/dist/web/assets/index-C9-Eilv-.js.map +1 -0
- package/dist/web/assets/index-CC-t7RnM.js +4 -0
- package/dist/web/assets/index-CC-t7RnM.js.map +1 -0
- package/dist/web/assets/index-CLbc4ChH.js +2 -0
- package/dist/web/assets/index-CLbc4ChH.js.map +1 -0
- package/dist/web/assets/index-CMXahjWH.js +2 -0
- package/dist/web/assets/index-CMXahjWH.js.map +1 -0
- package/dist/web/assets/index-CfYzSHJA.css +1 -0
- package/dist/web/assets/index-ClDYe_wE.js +2 -0
- package/dist/web/assets/index-ClDYe_wE.js.map +1 -0
- package/dist/web/assets/index-CxykdbB_.js +2 -0
- package/dist/web/assets/index-CxykdbB_.js.map +1 -0
- package/dist/web/assets/index-D3WXxnT1.js +2 -0
- package/dist/web/assets/index-D3WXxnT1.js.map +1 -0
- package/dist/web/assets/index-D4qNbgAX.js +2 -0
- package/dist/web/assets/index-D4qNbgAX.js.map +1 -0
- package/dist/web/assets/index-DCiUPvZt.js +2 -0
- package/dist/web/assets/index-DCiUPvZt.js.map +1 -0
- package/dist/web/assets/index-DJpCPEwr.js +3 -0
- package/dist/web/assets/index-DJpCPEwr.js.map +1 -0
- package/dist/web/assets/index-EuUS3D16.js +8 -0
- package/dist/web/assets/index-EuUS3D16.js.map +1 -0
- package/dist/web/assets/index-WATjATUO.js +2 -0
- package/dist/web/assets/index-WATjATUO.js.map +1 -0
- package/dist/web/assets/javascript-qCveANmP.js +2 -0
- package/dist/web/assets/javascript-qCveANmP.js.map +1 -0
- package/dist/web/assets/julia-DuME0IfC.js +2 -0
- package/dist/web/assets/julia-DuME0IfC.js.map +1 -0
- package/dist/web/assets/livescript-BwQOo05w.js +2 -0
- package/dist/web/assets/livescript-BwQOo05w.js.map +1 -0
- package/dist/web/assets/lua-BgMRiT3U.js +2 -0
- package/dist/web/assets/lua-BgMRiT3U.js.map +1 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js +2 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js.map +1 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js +2 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js.map +1 -0
- package/dist/web/assets/mirc-CjQqDB4T.js +2 -0
- package/dist/web/assets/mirc-CjQqDB4T.js.map +1 -0
- package/dist/web/assets/mllike-CXdrOF99.js +2 -0
- package/dist/web/assets/mllike-CXdrOF99.js.map +1 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js +2 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js.map +1 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js +2 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js.map +1 -0
- package/dist/web/assets/mumps-BT43cFF4.js +2 -0
- package/dist/web/assets/mumps-BT43cFF4.js.map +1 -0
- package/dist/web/assets/nginx-DdIZxoE0.js +2 -0
- package/dist/web/assets/nginx-DdIZxoE0.js.map +1 -0
- package/dist/web/assets/nsis-LdVXkNf5.js +2 -0
- package/dist/web/assets/nsis-LdVXkNf5.js.map +1 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js +2 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js.map +1 -0
- package/dist/web/assets/octave-Ck1zUtKM.js +2 -0
- package/dist/web/assets/octave-Ck1zUtKM.js.map +1 -0
- package/dist/web/assets/oz-BzwKVEFT.js +2 -0
- package/dist/web/assets/oz-BzwKVEFT.js.map +1 -0
- package/dist/web/assets/pascal--L3eBynH.js +2 -0
- package/dist/web/assets/pascal--L3eBynH.js.map +1 -0
- package/dist/web/assets/perl-CdXCOZ3F.js +2 -0
- package/dist/web/assets/perl-CdXCOZ3F.js.map +1 -0
- package/dist/web/assets/pig-CevX1Tat.js +2 -0
- package/dist/web/assets/pig-CevX1Tat.js.map +1 -0
- package/dist/web/assets/powershell-CFHJl5sT.js +2 -0
- package/dist/web/assets/powershell-CFHJl5sT.js.map +1 -0
- package/dist/web/assets/properties-C78fOPTZ.js +2 -0
- package/dist/web/assets/properties-C78fOPTZ.js.map +1 -0
- package/dist/web/assets/protobuf-ChK-085T.js +2 -0
- package/dist/web/assets/protobuf-ChK-085T.js.map +1 -0
- package/dist/web/assets/pug-DukmZTjD.js +2 -0
- package/dist/web/assets/pug-DukmZTjD.js.map +1 -0
- package/dist/web/assets/puppet-DMA9R1ak.js +2 -0
- package/dist/web/assets/puppet-DMA9R1ak.js.map +1 -0
- package/dist/web/assets/python-BuPzkPfP.js +2 -0
- package/dist/web/assets/python-BuPzkPfP.js.map +1 -0
- package/dist/web/assets/q-pXgVlZs6.js +2 -0
- package/dist/web/assets/q-pXgVlZs6.js.map +1 -0
- package/dist/web/assets/r-DUYO_cvP.js +2 -0
- package/dist/web/assets/r-DUYO_cvP.js.map +1 -0
- package/dist/web/assets/rpm-CTu-6PCP.js +2 -0
- package/dist/web/assets/rpm-CTu-6PCP.js.map +1 -0
- package/dist/web/assets/ruby-B2Rjki9n.js +2 -0
- package/dist/web/assets/ruby-B2Rjki9n.js.map +1 -0
- package/dist/web/assets/sas-B4kiWyti.js +2 -0
- package/dist/web/assets/sas-B4kiWyti.js.map +1 -0
- package/dist/web/assets/scheme-C41bIUwD.js +2 -0
- package/dist/web/assets/scheme-C41bIUwD.js.map +1 -0
- package/dist/web/assets/shell-CjFT_Tl9.js +2 -0
- package/dist/web/assets/shell-CjFT_Tl9.js.map +1 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js +2 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js.map +1 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js +2 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js.map +1 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js +2 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js.map +1 -0
- package/dist/web/assets/solr-DehyRSwq.js +2 -0
- package/dist/web/assets/solr-DehyRSwq.js.map +1 -0
- package/dist/web/assets/sparql-DkYu6x3z.js +2 -0
- package/dist/web/assets/sparql-DkYu6x3z.js.map +1 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js +2 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js.map +1 -0
- package/dist/web/assets/sql-D0XecflT.js +2 -0
- package/dist/web/assets/sql-D0XecflT.js.map +1 -0
- package/dist/web/assets/stex-C3f8Ysf7.js +2 -0
- package/dist/web/assets/stex-C3f8Ysf7.js.map +1 -0
- package/dist/web/assets/stylus-B533Al4x.js +2 -0
- package/dist/web/assets/stylus-B533Al4x.js.map +1 -0
- package/dist/web/assets/swift-BzpIVaGY.js +2 -0
- package/dist/web/assets/swift-BzpIVaGY.js.map +1 -0
- package/dist/web/assets/tcl-DVfN8rqt.js +2 -0
- package/dist/web/assets/tcl-DVfN8rqt.js.map +1 -0
- package/dist/web/assets/textile-CnDTJFAw.js +2 -0
- package/dist/web/assets/textile-CnDTJFAw.js.map +1 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js +2 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js.map +1 -0
- package/dist/web/assets/tiki-DGYXhP31.js +2 -0
- package/dist/web/assets/tiki-DGYXhP31.js.map +1 -0
- package/dist/web/assets/toml-Bm5Em-hy.js +2 -0
- package/dist/web/assets/toml-Bm5Em-hy.js.map +1 -0
- package/dist/web/assets/troff-wAsdV37c.js +2 -0
- package/dist/web/assets/troff-wAsdV37c.js.map +1 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js +2 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js.map +1 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js +2 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js.map +1 -0
- package/dist/web/assets/turtle-B1tBg_DP.js +2 -0
- package/dist/web/assets/turtle-B1tBg_DP.js.map +1 -0
- package/dist/web/assets/vb-CmGdzxic.js +2 -0
- package/dist/web/assets/vb-CmGdzxic.js.map +1 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js +2 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js.map +1 -0
- package/dist/web/assets/velocity-D8B20fx6.js +2 -0
- package/dist/web/assets/velocity-D8B20fx6.js.map +1 -0
- package/dist/web/assets/verilog-C6RDOZhf.js +2 -0
- package/dist/web/assets/verilog-C6RDOZhf.js.map +1 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js +2 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js.map +1 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js +2 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js.map +1 -0
- package/dist/web/assets/xquery-CQfU5ijd.js +2 -0
- package/dist/web/assets/xquery-CQfU5ijd.js.map +1 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js +2 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js.map +1 -0
- package/dist/web/assets/z80-Hz9HOZM7.js +2 -0
- package/dist/web/assets/z80-Hz9HOZM7.js.map +1 -0
- package/dist/web/index.html +23 -0
- package/package.json +75 -0
- package/public/.gitkeep +0 -0
- package/public/assets/apl-B4CMkyY2.js +2 -0
- package/public/assets/apl-B4CMkyY2.js.map +1 -0
- package/public/assets/asciiarmor-Df11BRmG.js +2 -0
- package/public/assets/asciiarmor-Df11BRmG.js.map +1 -0
- package/public/assets/asn1-EdZsLKOL.js +2 -0
- package/public/assets/asn1-EdZsLKOL.js.map +1 -0
- package/public/assets/asterisk-B-8jnY81.js +2 -0
- package/public/assets/asterisk-B-8jnY81.js.map +1 -0
- package/public/assets/brainfuck-C4LP7Hcl.js +2 -0
- package/public/assets/brainfuck-C4LP7Hcl.js.map +1 -0
- package/public/assets/clike-B9uivgTg.js +2 -0
- package/public/assets/clike-B9uivgTg.js.map +1 -0
- package/public/assets/clojure-BMjYHr_A.js +2 -0
- package/public/assets/clojure-BMjYHr_A.js.map +1 -0
- package/public/assets/cmake-BQqOBYOt.js +2 -0
- package/public/assets/cmake-BQqOBYOt.js.map +1 -0
- package/public/assets/cobol-CWcv1MsR.js +2 -0
- package/public/assets/cobol-CWcv1MsR.js.map +1 -0
- package/public/assets/coffeescript-S37ZYGWr.js +2 -0
- package/public/assets/coffeescript-S37ZYGWr.js.map +1 -0
- package/public/assets/commonlisp-DBKNyK5s.js +2 -0
- package/public/assets/commonlisp-DBKNyK5s.js.map +1 -0
- package/public/assets/crystal-SjHAIU92.js +2 -0
- package/public/assets/crystal-SjHAIU92.js.map +1 -0
- package/public/assets/css-BnMrqG3P.js +2 -0
- package/public/assets/css-BnMrqG3P.js.map +1 -0
- package/public/assets/cypher-C_CwsFkJ.js +2 -0
- package/public/assets/cypher-C_CwsFkJ.js.map +1 -0
- package/public/assets/d-pRatUO7H.js +2 -0
- package/public/assets/d-pRatUO7H.js.map +1 -0
- package/public/assets/diff-DbItnlRl.js +2 -0
- package/public/assets/diff-DbItnlRl.js.map +1 -0
- package/public/assets/dockerfile-BKs6k2Af.js +2 -0
- package/public/assets/dockerfile-BKs6k2Af.js.map +1 -0
- package/public/assets/dtd-DF_7sFjM.js +2 -0
- package/public/assets/dtd-DF_7sFjM.js.map +1 -0
- package/public/assets/dylan-DwRh75JA.js +2 -0
- package/public/assets/dylan-DwRh75JA.js.map +1 -0
- package/public/assets/ebnf-CDyGwa7X.js +2 -0
- package/public/assets/ebnf-CDyGwa7X.js.map +1 -0
- package/public/assets/ecl-Cabwm37j.js +2 -0
- package/public/assets/ecl-Cabwm37j.js.map +1 -0
- package/public/assets/eiffel-CnydiIhH.js +2 -0
- package/public/assets/eiffel-CnydiIhH.js.map +1 -0
- package/public/assets/elm-vLlmbW-K.js +2 -0
- package/public/assets/elm-vLlmbW-K.js.map +1 -0
- package/public/assets/erlang-BNw1qcRV.js +2 -0
- package/public/assets/erlang-BNw1qcRV.js.map +1 -0
- package/public/assets/factor-kuTfRLto.js +2 -0
- package/public/assets/factor-kuTfRLto.js.map +1 -0
- package/public/assets/fcl-Kvtd6kyn.js +2 -0
- package/public/assets/fcl-Kvtd6kyn.js.map +1 -0
- package/public/assets/forth-Ffai-XNe.js +2 -0
- package/public/assets/forth-Ffai-XNe.js.map +1 -0
- package/public/assets/fortran-DYz_wnZ1.js +2 -0
- package/public/assets/fortran-DYz_wnZ1.js.map +1 -0
- package/public/assets/gas-Bneqetm1.js +2 -0
- package/public/assets/gas-Bneqetm1.js.map +1 -0
- package/public/assets/gherkin-heZmZLOM.js +2 -0
- package/public/assets/gherkin-heZmZLOM.js.map +1 -0
- package/public/assets/groovy-D9Dt4D0W.js +2 -0
- package/public/assets/groovy-D9Dt4D0W.js.map +1 -0
- package/public/assets/haskell-BWDZoCOh.js +2 -0
- package/public/assets/haskell-BWDZoCOh.js.map +1 -0
- package/public/assets/haxe-H-WmDvRZ.js +2 -0
- package/public/assets/haxe-H-WmDvRZ.js.map +1 -0
- package/public/assets/http-DBlCnlav.js +2 -0
- package/public/assets/http-DBlCnlav.js.map +1 -0
- package/public/assets/idl-BEugSyMb.js +2 -0
- package/public/assets/idl-BEugSyMb.js.map +1 -0
- package/public/assets/index-BHi_kGSi.js +8 -0
- package/public/assets/index-BHi_kGSi.js.map +1 -0
- package/public/assets/index-BMLAwwWL.js +2 -0
- package/public/assets/index-BMLAwwWL.js.map +1 -0
- package/public/assets/index-BNSDh5mD.js +2 -0
- package/public/assets/index-BNSDh5mD.js.map +1 -0
- package/public/assets/index-BR0D24wt.js +2 -0
- package/public/assets/index-BR0D24wt.js.map +1 -0
- package/public/assets/index-BdLsiQv5.js +2 -0
- package/public/assets/index-BdLsiQv5.js.map +1 -0
- package/public/assets/index-BjnJos4J.js +2 -0
- package/public/assets/index-BjnJos4J.js.map +1 -0
- package/public/assets/index-CM3gGvbH.js +509 -0
- package/public/assets/index-CM3gGvbH.js.map +1 -0
- package/public/assets/index-CV8De3J9.js +2 -0
- package/public/assets/index-CV8De3J9.js.map +1 -0
- package/public/assets/index-ChuKVzLw.js +2 -0
- package/public/assets/index-ChuKVzLw.js.map +1 -0
- package/public/assets/index-CpfmaE2d.js +2 -0
- package/public/assets/index-CpfmaE2d.js.map +1 -0
- package/public/assets/index-D90_xI0s.js +2 -0
- package/public/assets/index-D90_xI0s.js.map +1 -0
- package/public/assets/index-DR3bJemi.js +4 -0
- package/public/assets/index-DR3bJemi.js.map +1 -0
- package/public/assets/index-DlsEbLHk.css +1 -0
- package/public/assets/index-MR5aWKcm.js +2 -0
- package/public/assets/index-MR5aWKcm.js.map +1 -0
- package/public/assets/index-MrhuDMHQ.js +2 -0
- package/public/assets/index-MrhuDMHQ.js.map +1 -0
- package/public/assets/index-NbLWR4tH.js +2 -0
- package/public/assets/index-NbLWR4tH.js.map +1 -0
- package/public/assets/index-VnBXaSng.js +3 -0
- package/public/assets/index-VnBXaSng.js.map +1 -0
- package/public/assets/index-XEgqkWdk.js +2 -0
- package/public/assets/index-XEgqkWdk.js.map +1 -0
- package/public/assets/index-zHvewZlp.js +2 -0
- package/public/assets/index-zHvewZlp.js.map +1 -0
- package/public/assets/javascript-qCveANmP.js +2 -0
- package/public/assets/javascript-qCveANmP.js.map +1 -0
- package/public/assets/julia-DuME0IfC.js +2 -0
- package/public/assets/julia-DuME0IfC.js.map +1 -0
- package/public/assets/livescript-BwQOo05w.js +2 -0
- package/public/assets/livescript-BwQOo05w.js.map +1 -0
- package/public/assets/lua-BgMRiT3U.js +2 -0
- package/public/assets/lua-BgMRiT3U.js.map +1 -0
- package/public/assets/mathematica-DTrFuWx2.js +2 -0
- package/public/assets/mathematica-DTrFuWx2.js.map +1 -0
- package/public/assets/mbox-CNhZ1qSd.js +2 -0
- package/public/assets/mbox-CNhZ1qSd.js.map +1 -0
- package/public/assets/mirc-CjQqDB4T.js +2 -0
- package/public/assets/mirc-CjQqDB4T.js.map +1 -0
- package/public/assets/mllike-CXdrOF99.js +2 -0
- package/public/assets/mllike-CXdrOF99.js.map +1 -0
- package/public/assets/modelica-Dc1JOy9r.js +2 -0
- package/public/assets/modelica-Dc1JOy9r.js.map +1 -0
- package/public/assets/mscgen-BA5vi2Kp.js +2 -0
- package/public/assets/mscgen-BA5vi2Kp.js.map +1 -0
- package/public/assets/mumps-BT43cFF4.js +2 -0
- package/public/assets/mumps-BT43cFF4.js.map +1 -0
- package/public/assets/nginx-DdIZxoE0.js +2 -0
- package/public/assets/nginx-DdIZxoE0.js.map +1 -0
- package/public/assets/nsis-LdVXkNf5.js +2 -0
- package/public/assets/nsis-LdVXkNf5.js.map +1 -0
- package/public/assets/ntriples-BfvgReVJ.js +2 -0
- package/public/assets/ntriples-BfvgReVJ.js.map +1 -0
- package/public/assets/octave-Ck1zUtKM.js +2 -0
- package/public/assets/octave-Ck1zUtKM.js.map +1 -0
- package/public/assets/oz-BzwKVEFT.js +2 -0
- package/public/assets/oz-BzwKVEFT.js.map +1 -0
- package/public/assets/pascal--L3eBynH.js +2 -0
- package/public/assets/pascal--L3eBynH.js.map +1 -0
- package/public/assets/perl-CdXCOZ3F.js +2 -0
- package/public/assets/perl-CdXCOZ3F.js.map +1 -0
- package/public/assets/pig-CevX1Tat.js +2 -0
- package/public/assets/pig-CevX1Tat.js.map +1 -0
- package/public/assets/powershell-CFHJl5sT.js +2 -0
- package/public/assets/powershell-CFHJl5sT.js.map +1 -0
- package/public/assets/properties-C78fOPTZ.js +2 -0
- package/public/assets/properties-C78fOPTZ.js.map +1 -0
- package/public/assets/protobuf-ChK-085T.js +2 -0
- package/public/assets/protobuf-ChK-085T.js.map +1 -0
- package/public/assets/pug-DukmZTjD.js +2 -0
- package/public/assets/pug-DukmZTjD.js.map +1 -0
- package/public/assets/puppet-DMA9R1ak.js +2 -0
- package/public/assets/puppet-DMA9R1ak.js.map +1 -0
- package/public/assets/python-BuPzkPfP.js +2 -0
- package/public/assets/python-BuPzkPfP.js.map +1 -0
- package/public/assets/q-pXgVlZs6.js +2 -0
- package/public/assets/q-pXgVlZs6.js.map +1 -0
- package/public/assets/r-DUYO_cvP.js +2 -0
- package/public/assets/r-DUYO_cvP.js.map +1 -0
- package/public/assets/rpm-CTu-6PCP.js +2 -0
- package/public/assets/rpm-CTu-6PCP.js.map +1 -0
- package/public/assets/ruby-B2Rjki9n.js +2 -0
- package/public/assets/ruby-B2Rjki9n.js.map +1 -0
- package/public/assets/sas-B4kiWyti.js +2 -0
- package/public/assets/sas-B4kiWyti.js.map +1 -0
- package/public/assets/scheme-C41bIUwD.js +2 -0
- package/public/assets/scheme-C41bIUwD.js.map +1 -0
- package/public/assets/shell-CjFT_Tl9.js +2 -0
- package/public/assets/shell-CjFT_Tl9.js.map +1 -0
- package/public/assets/sieve-C3Gn_uJK.js +2 -0
- package/public/assets/sieve-C3Gn_uJK.js.map +1 -0
- package/public/assets/simple-mode-GW_nhZxv.js +2 -0
- package/public/assets/simple-mode-GW_nhZxv.js.map +1 -0
- package/public/assets/smalltalk-CnHTOXQT.js +2 -0
- package/public/assets/smalltalk-CnHTOXQT.js.map +1 -0
- package/public/assets/solr-DehyRSwq.js +2 -0
- package/public/assets/solr-DehyRSwq.js.map +1 -0
- package/public/assets/sparql-DkYu6x3z.js +2 -0
- package/public/assets/sparql-DkYu6x3z.js.map +1 -0
- package/public/assets/spreadsheet-BCZA_wO0.js +2 -0
- package/public/assets/spreadsheet-BCZA_wO0.js.map +1 -0
- package/public/assets/sql-D0XecflT.js +2 -0
- package/public/assets/sql-D0XecflT.js.map +1 -0
- package/public/assets/stex-C3f8Ysf7.js +2 -0
- package/public/assets/stex-C3f8Ysf7.js.map +1 -0
- package/public/assets/stylus-B533Al4x.js +2 -0
- package/public/assets/stylus-B533Al4x.js.map +1 -0
- package/public/assets/swift-BzpIVaGY.js +2 -0
- package/public/assets/swift-BzpIVaGY.js.map +1 -0
- package/public/assets/tcl-DVfN8rqt.js +2 -0
- package/public/assets/tcl-DVfN8rqt.js.map +1 -0
- package/public/assets/textile-CnDTJFAw.js +2 -0
- package/public/assets/textile-CnDTJFAw.js.map +1 -0
- package/public/assets/tiddlywiki-DO-Gjzrf.js +2 -0
- package/public/assets/tiddlywiki-DO-Gjzrf.js.map +1 -0
- package/public/assets/tiki-DGYXhP31.js +2 -0
- package/public/assets/tiki-DGYXhP31.js.map +1 -0
- package/public/assets/toml-Bm5Em-hy.js +2 -0
- package/public/assets/toml-Bm5Em-hy.js.map +1 -0
- package/public/assets/troff-wAsdV37c.js +2 -0
- package/public/assets/troff-wAsdV37c.js.map +1 -0
- package/public/assets/ttcn-CfJYG6tj.js +2 -0
- package/public/assets/ttcn-CfJYG6tj.js.map +1 -0
- package/public/assets/ttcn-cfg-B9xdYoR4.js +2 -0
- package/public/assets/ttcn-cfg-B9xdYoR4.js.map +1 -0
- package/public/assets/turtle-B1tBg_DP.js +2 -0
- package/public/assets/turtle-B1tBg_DP.js.map +1 -0
- package/public/assets/vb-CmGdzxic.js +2 -0
- package/public/assets/vb-CmGdzxic.js.map +1 -0
- package/public/assets/vbscript-BuJXcnF6.js +2 -0
- package/public/assets/vbscript-BuJXcnF6.js.map +1 -0
- package/public/assets/velocity-D8B20fx6.js +2 -0
- package/public/assets/velocity-D8B20fx6.js.map +1 -0
- package/public/assets/verilog-C6RDOZhf.js +2 -0
- package/public/assets/verilog-C6RDOZhf.js.map +1 -0
- package/public/assets/vhdl-lSbBsy5d.js +2 -0
- package/public/assets/vhdl-lSbBsy5d.js.map +1 -0
- package/public/assets/webidl-ZXfAyPTL.js +2 -0
- package/public/assets/webidl-ZXfAyPTL.js.map +1 -0
- package/public/assets/xquery-CQfU5ijd.js +2 -0
- package/public/assets/xquery-CQfU5ijd.js.map +1 -0
- package/public/assets/yacas-BJ4BC0dw.js +2 -0
- package/public/assets/yacas-BJ4BC0dw.js.map +1 -0
- package/public/assets/z80-Hz9HOZM7.js +2 -0
- package/public/assets/z80-Hz9HOZM7.js.map +1 -0
- package/public/index.html +15 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DukmZTjD.js","assets/javascript-qCveANmP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function lz(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Zh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dR={exports:{}},vm={},hR={exports:{}},Ie={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var kf=Symbol.for("react.element"),cz=Symbol.for("react.portal"),uz=Symbol.for("react.fragment"),fz=Symbol.for("react.strict_mode"),dz=Symbol.for("react.profiler"),hz=Symbol.for("react.provider"),pz=Symbol.for("react.context"),mz=Symbol.for("react.forward_ref"),gz=Symbol.for("react.suspense"),Oz=Symbol.for("react.memo"),yz=Symbol.for("react.lazy"),$S=Symbol.iterator;function vz(t){return t===null||typeof t!="object"?null:(t=$S&&t[$S]||t["@@iterator"],typeof t=="function"?t:null)}var pR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mR=Object.assign,gR={};function Bl(t,e,n){this.props=t,this.context=e,this.refs=gR,this.updater=n||pR}Bl.prototype.isReactComponent={};Bl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Bl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function OR(){}OR.prototype=Bl.prototype;function H0(t,e,n){this.props=t,this.context=e,this.refs=gR,this.updater=n||pR}var G0=H0.prototype=new OR;G0.constructor=H0;mR(G0,Bl.prototype);G0.isPureReactComponent=!0;var QS=Array.isArray,yR=Object.prototype.hasOwnProperty,K0={current:null},vR={key:!0,ref:!0,__self:!0,__source:!0};function xR(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)yR.call(e,r)&&!vR.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:kf,type:t,key:s,ref:o,props:i,_owner:K0.current}}function xz(t,e){return{$$typeof:kf,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function J0(t){return typeof t=="object"&&t!==null&&t.$$typeof===kf}function bz(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var AS=/\/+/g;function Wg(t,e){return typeof t=="object"&&t!==null&&t.key!=null?bz(""+t.key):e.toString(36)}function lh(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case kf:case cz:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Wg(o,0):r,QS(i)?(n="",t!=null&&(n=t.replace(AS,"$&/")+"/"),lh(i,e,n,"",function(c){return c})):i!=null&&(J0(i)&&(i=xz(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(AS,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",QS(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Wg(s,a);o+=lh(s,e,n,l,i)}else if(l=vz(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Wg(s,a++),o+=lh(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function nd(t,e,n){if(t==null)return t;var r=[],i=0;return lh(t,r,"","",function(s){return e.call(n,s,i++)}),r}function wz(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var on={current:null},ch={transition:null},Sz={ReactCurrentDispatcher:on,ReactCurrentBatchConfig:ch,ReactCurrentOwner:K0};function bR(){throw Error("act(...) is not supported in production builds of React.")}Ie.Children={map:nd,forEach:function(t,e,n){nd(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return nd(t,function(){e++}),e},toArray:function(t){return nd(t,function(e){return e})||[]},only:function(t){if(!J0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ie.Component=Bl;Ie.Fragment=uz;Ie.Profiler=dz;Ie.PureComponent=H0;Ie.StrictMode=fz;Ie.Suspense=gz;Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sz;Ie.act=bR;Ie.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=mR({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=K0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)yR.call(e,l)&&!vR.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:kf,type:t.type,key:i,ref:s,props:r,_owner:o}};Ie.createContext=function(t){return t={$$typeof:pz,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:hz,_context:t},t.Consumer=t};Ie.createElement=xR;Ie.createFactory=function(t){var e=xR.bind(null,t);return e.type=t,e};Ie.createRef=function(){return{current:null}};Ie.forwardRef=function(t){return{$$typeof:mz,render:t}};Ie.isValidElement=J0;Ie.lazy=function(t){return{$$typeof:yz,_payload:{_status:-1,_result:t},_init:wz}};Ie.memo=function(t,e){return{$$typeof:Oz,type:t,compare:e===void 0?null:e}};Ie.startTransition=function(t){var e=ch.transition;ch.transition={};try{t()}finally{ch.transition=e}};Ie.unstable_act=bR;Ie.useCallback=function(t,e){return on.current.useCallback(t,e)};Ie.useContext=function(t){return on.current.useContext(t)};Ie.useDebugValue=function(){};Ie.useDeferredValue=function(t){return on.current.useDeferredValue(t)};Ie.useEffect=function(t,e){return on.current.useEffect(t,e)};Ie.useId=function(){return on.current.useId()};Ie.useImperativeHandle=function(t,e,n){return on.current.useImperativeHandle(t,e,n)};Ie.useInsertionEffect=function(t,e){return on.current.useInsertionEffect(t,e)};Ie.useLayoutEffect=function(t,e){return on.current.useLayoutEffect(t,e)};Ie.useMemo=function(t,e){return on.current.useMemo(t,e)};Ie.useReducer=function(t,e,n){return on.current.useReducer(t,e,n)};Ie.useRef=function(t){return on.current.useRef(t)};Ie.useState=function(t){return on.current.useState(t)};Ie.useSyncExternalStore=function(t,e,n){return on.current.useSyncExternalStore(t,e,n)};Ie.useTransition=function(){return on.current.useTransition()};Ie.version="18.3.1";hR.exports=Ie;var g=hR.exports;const ee=zl(g),eb=lz({__proto__:null,default:ee},[g]);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var kz=g,Cz=Symbol.for("react.element"),Pz=Symbol.for("react.fragment"),Tz=Object.prototype.hasOwnProperty,Ez=kz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rz={key:!0,ref:!0,__self:!0,__source:!0};function wR(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Tz.call(e,r)&&!Rz.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Cz,type:t,key:s,ref:o,props:i,_owner:Ez.current}}vm.Fragment=Pz;vm.jsx=wR;vm.jsxs=wR;dR.exports=vm;var p=dR.exports,uv={},SR={exports:{}},Hn={},kR={exports:{}},CR={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(t){function e(j,A){var P=j.length;j.push(A);e:for(;0<P;){var M=P-1>>>1,$=j[M];if(0<i($,A))j[M]=A,j[P]=$,P=M;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var A=j[0],P=j.pop();if(P!==A){j[0]=P;e:for(var M=0,$=j.length,R=$>>>1;M<R;){var q=2*(M+1)-1,H=j[q],ie=q+1,Y=j[ie];if(0>i(H,P))ie<$&&0>i(Y,H)?(j[M]=Y,j[ie]=P,M=ie):(j[M]=H,j[q]=P,M=q);else if(ie<$&&0>i(Y,P))j[M]=Y,j[ie]=P,M=ie;else break e}}return A}function i(j,A){var P=j.sortIndex-A.sortIndex;return P!==0?P:j.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,d=3,h=!1,O=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=j)r(c),A.sortIndex=A.expirationTime,e(l,A);else break;A=n(c)}}function S(j){if(m=!1,b(j),!O)if(n(l)!==null)O=!0,W(k);else{var A=n(c);A!==null&&F(S,A.startTime-j)}}function k(j,A){O=!1,m&&(m=!1,y(_),_=-1),h=!0;var P=d;try{for(b(A),f=n(l);f!==null&&(!(f.expirationTime>A)||j&&!N());){var M=f.callback;if(typeof M=="function"){f.callback=null,d=f.priorityLevel;var $=M(f.expirationTime<=A);A=t.unstable_now(),typeof $=="function"?f.callback=$:f===n(l)&&r(l),b(A)}else r(l);f=n(l)}if(f!==null)var R=!0;else{var q=n(c);q!==null&&F(S,q.startTime-A),R=!1}return R}finally{f=null,d=P,h=!1}}var w=!1,C=null,_=-1,I=5,E=-1;function N(){return!(t.unstable_now()-E<I)}function Q(){if(C!==null){var j=t.unstable_now();E=j;var A=!0;try{A=C(!0,j)}finally{A?L():(w=!1,C=null)}}else w=!1}var L;if(typeof v=="function")L=function(){v(Q)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,X=z.port2;z.port1.onmessage=Q,L=function(){X.postMessage(null)}}else L=function(){x(Q,0)};function W(j){C=j,w||(w=!0,L())}function F(j,A){_=x(function(){j(t.unstable_now())},A)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){O||h||(O=!0,W(k))},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(j){switch(d){case 1:case 2:case 3:var A=3;break;default:A=d}var P=d;d=A;try{return j()}finally{d=P}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,A){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=d;d=j;try{return A()}finally{d=P}},t.unstable_scheduleCallback=function(j,A,P){var M=t.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?M+P:M):P=M,j){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=P+$,j={id:u++,callback:A,priorityLevel:j,startTime:P,expirationTime:$,sortIndex:-1},P>M?(j.sortIndex=P,e(c,j),n(l)===null&&j===n(c)&&(m?(y(_),_=-1):m=!0,F(S,P-M))):(j.sortIndex=$,e(l,j),O||h||(O=!0,W(k))),j},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(j){var A=d;return function(){var P=d;d=A;try{return j.apply(this,arguments)}finally{d=P}}}})(CR);kR.exports=CR;var _z=kR.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var $z=g,Yn=_z;function G(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var PR=new Set,wu={};function ra(t,e){cl(t,e),cl(t+"Capture",e)}function cl(t,e){for(wu[t]=e,t=0;t<e.length;t++)PR.add(e[t])}var Wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fv=Object.prototype.hasOwnProperty,Qz=/^[: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]*$/,IS={},NS={};function Az(t){return fv.call(NS,t)?!0:fv.call(IS,t)?!1:Qz.test(t)?NS[t]=!0:(IS[t]=!0,!1)}function Iz(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Nz(t,e,n,r){if(e===null||typeof e>"u"||Iz(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function an(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Dt[t]=new an(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Dt[e]=new an(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Dt[t]=new an(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Dt[t]=new an(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Dt[t]=new an(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Dt[t]=new an(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Dt[t]=new an(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Dt[t]=new an(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Dt[t]=new an(t,5,!1,t.toLowerCase(),null,!1,!1)});var tb=/[\-:]([a-z])/g;function nb(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(tb,nb);Dt[e]=new an(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(tb,nb);Dt[e]=new an(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(tb,nb);Dt[e]=new an(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Dt[t]=new an(t,1,!1,t.toLowerCase(),null,!1,!1)});Dt.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Dt[t]=new an(t,1,!1,t.toLowerCase(),null,!0,!0)});function rb(t,e,n,r){var i=Dt.hasOwnProperty(e)?Dt[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Nz(e,n,i,r)&&(n=null),r||i===null?Az(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var rs=$z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rd=Symbol.for("react.element"),Ea=Symbol.for("react.portal"),Ra=Symbol.for("react.fragment"),ib=Symbol.for("react.strict_mode"),dv=Symbol.for("react.profiler"),TR=Symbol.for("react.provider"),ER=Symbol.for("react.context"),sb=Symbol.for("react.forward_ref"),hv=Symbol.for("react.suspense"),pv=Symbol.for("react.suspense_list"),ob=Symbol.for("react.memo"),ys=Symbol.for("react.lazy"),RR=Symbol.for("react.offscreen"),jS=Symbol.iterator;function pc(t){return t===null||typeof t!="object"?null:(t=jS&&t[jS]||t["@@iterator"],typeof t=="function"?t:null)}var lt=Object.assign,qg;function Lc(t){if(qg===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);qg=e&&e[1]||""}return`
|
|
35
|
+
`+qg+t}var Yg=!1;function Ug(t,e){if(!t||Yg)return"";Yg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
36
|
+
`),s=r.stack.split(`
|
|
37
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
38
|
+
`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Yg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Lc(t):""}function jz(t){switch(t.tag){case 5:return Lc(t.type);case 16:return Lc("Lazy");case 13:return Lc("Suspense");case 19:return Lc("SuspenseList");case 0:case 2:case 15:return t=Ug(t.type,!1),t;case 11:return t=Ug(t.type.render,!1),t;case 1:return t=Ug(t.type,!0),t;default:return""}}function mv(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ra:return"Fragment";case Ea:return"Portal";case dv:return"Profiler";case ib:return"StrictMode";case hv:return"Suspense";case pv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ER:return(t.displayName||"Context")+".Consumer";case TR:return(t._context.displayName||"Context")+".Provider";case sb:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ob:return e=t.displayName||null,e!==null?e:mv(t.type)||"Memo";case ys:e=t._payload,t=t._init;try{return mv(t(e))}catch{}}return null}function Mz(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mv(e);case 8:return e===ib?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function zs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _R(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Dz(t){var e=_R(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function id(t){t._valueTracker||(t._valueTracker=Dz(t))}function $R(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=_R(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Wh(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function gv(t,e){var n=e.checked;return lt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function MS(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=zs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function QR(t,e){e=e.checked,e!=null&&rb(t,"checked",e,!1)}function Ov(t,e){QR(t,e);var n=zs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?yv(t,e.type,n):e.hasOwnProperty("defaultValue")&&yv(t,e.type,zs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function DS(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function yv(t,e,n){(e!=="number"||Wh(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var zc=Array.isArray;function Fa(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+zs(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function vv(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(G(91));return lt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function LS(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(G(92));if(zc(n)){if(1<n.length)throw Error(G(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:zs(n)}}function AR(t,e){var n=zs(e.value),r=zs(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function zS(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function IR(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xv(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?IR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var sd,NR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(sd=sd||document.createElement("div"),sd.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=sd.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Su(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Gc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lz=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(t){Lz.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Gc[e]=Gc[t]})});function jR(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Gc.hasOwnProperty(t)&&Gc[t]?(""+e).trim():e+"px"}function MR(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=jR(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var zz=lt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bv(t,e){if(e){if(zz[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(G(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(G(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(G(61))}if(e.style!=null&&typeof e.style!="object")throw Error(G(62))}}function wv(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Sv=null;function ab(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var kv=null,Xa=null,Za=null;function BS(t){if(t=Tf(t)){if(typeof kv!="function")throw Error(G(280));var e=t.stateNode;e&&(e=km(e),kv(t.stateNode,t.type,e))}}function DR(t){Xa?Za?Za.push(t):Za=[t]:Xa=t}function LR(){if(Xa){var t=Xa,e=Za;if(Za=Xa=null,BS(t),e)for(t=0;t<e.length;t++)BS(e[t])}}function zR(t,e){return t(e)}function BR(){}var Hg=!1;function VR(t,e,n){if(Hg)return t(e,n);Hg=!0;try{return zR(t,e,n)}finally{Hg=!1,(Xa!==null||Za!==null)&&(BR(),LR())}}function ku(t,e){var n=t.stateNode;if(n===null)return null;var r=km(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(G(231,e,typeof n));return n}var Cv=!1;if(Wi)try{var mc={};Object.defineProperty(mc,"passive",{get:function(){Cv=!0}}),window.addEventListener("test",mc,mc),window.removeEventListener("test",mc,mc)}catch{Cv=!1}function Bz(t,e,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Kc=!1,qh=null,Yh=!1,Pv=null,Vz={onError:function(t){Kc=!0,qh=t}};function Fz(t,e,n,r,i,s,o,a,l){Kc=!1,qh=null,Bz.apply(Vz,arguments)}function Xz(t,e,n,r,i,s,o,a,l){if(Fz.apply(this,arguments),Kc){if(Kc){var c=qh;Kc=!1,qh=null}else throw Error(G(198));Yh||(Yh=!0,Pv=c)}}function ia(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function FR(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function VS(t){if(ia(t)!==t)throw Error(G(188))}function Zz(t){var e=t.alternate;if(!e){if(e=ia(t),e===null)throw Error(G(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return VS(i),t;if(s===r)return VS(i),e;s=s.sibling}throw Error(G(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?t:e}function XR(t){return t=Zz(t),t!==null?ZR(t):null}function ZR(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=ZR(t);if(e!==null)return e;t=t.sibling}return null}var WR=Yn.unstable_scheduleCallback,FS=Yn.unstable_cancelCallback,Wz=Yn.unstable_shouldYield,qz=Yn.unstable_requestPaint,ft=Yn.unstable_now,Yz=Yn.unstable_getCurrentPriorityLevel,lb=Yn.unstable_ImmediatePriority,qR=Yn.unstable_UserBlockingPriority,Uh=Yn.unstable_NormalPriority,Uz=Yn.unstable_LowPriority,YR=Yn.unstable_IdlePriority,xm=null,xi=null;function Hz(t){if(xi&&typeof xi.onCommitFiberRoot=="function")try{xi.onCommitFiberRoot(xm,t,void 0,(t.current.flags&128)===128)}catch{}}var Dr=Math.clz32?Math.clz32:Jz,Gz=Math.log,Kz=Math.LN2;function Jz(t){return t>>>=0,t===0?32:31-(Gz(t)/Kz|0)|0}var od=64,ad=4194304;function Bc(t){switch(t&-t){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Hh(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Bc(a):(s&=o,s!==0&&(r=Bc(s)))}else o=n&~i,o!==0?r=Bc(o):s!==0&&(r=Bc(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Dr(e),i=1<<n,r|=t[n],e&=~i;return r}function eB(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tB(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Dr(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=eB(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Tv(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function UR(){var t=od;return od<<=1,!(od&4194240)&&(od=64),t}function Gg(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Cf(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Dr(e),t[e]=n}function nB(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Dr(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function cb(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Dr(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Ve=0;function HR(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var GR,ub,KR,JR,e_,Ev=!1,ld=[],_s=null,$s=null,Qs=null,Cu=new Map,Pu=new Map,ws=[],rB="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 submit".split(" ");function XS(t,e){switch(t){case"focusin":case"focusout":_s=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":Cu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pu.delete(e.pointerId)}}function gc(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Tf(e),e!==null&&ub(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function iB(t,e,n,r,i){switch(e){case"focusin":return _s=gc(_s,t,e,n,r,i),!0;case"dragenter":return $s=gc($s,t,e,n,r,i),!0;case"mouseover":return Qs=gc(Qs,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Cu.set(s,gc(Cu.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Pu.set(s,gc(Pu.get(s)||null,t,e,n,r,i)),!0}return!1}function t_(t){var e=Co(t.target);if(e!==null){var n=ia(e);if(n!==null){if(e=n.tag,e===13){if(e=FR(n),e!==null){t.blockedOn=e,e_(t.priority,function(){KR(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function uh(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Rv(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Sv=r,n.target.dispatchEvent(r),Sv=null}else return e=Tf(n),e!==null&&ub(e),t.blockedOn=n,!1;e.shift()}return!0}function ZS(t,e,n){uh(t)&&n.delete(e)}function sB(){Ev=!1,_s!==null&&uh(_s)&&(_s=null),$s!==null&&uh($s)&&($s=null),Qs!==null&&uh(Qs)&&(Qs=null),Cu.forEach(ZS),Pu.forEach(ZS)}function Oc(t,e){t.blockedOn===e&&(t.blockedOn=null,Ev||(Ev=!0,Yn.unstable_scheduleCallback(Yn.unstable_NormalPriority,sB)))}function Tu(t){function e(i){return Oc(i,t)}if(0<ld.length){Oc(ld[0],t);for(var n=1;n<ld.length;n++){var r=ld[n];r.blockedOn===t&&(r.blockedOn=null)}}for(_s!==null&&Oc(_s,t),$s!==null&&Oc($s,t),Qs!==null&&Oc(Qs,t),Cu.forEach(e),Pu.forEach(e),n=0;n<ws.length;n++)r=ws[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ws.length&&(n=ws[0],n.blockedOn===null);)t_(n),n.blockedOn===null&&ws.shift()}var Wa=rs.ReactCurrentBatchConfig,Gh=!0;function oB(t,e,n,r){var i=Ve,s=Wa.transition;Wa.transition=null;try{Ve=1,fb(t,e,n,r)}finally{Ve=i,Wa.transition=s}}function aB(t,e,n,r){var i=Ve,s=Wa.transition;Wa.transition=null;try{Ve=4,fb(t,e,n,r)}finally{Ve=i,Wa.transition=s}}function fb(t,e,n,r){if(Gh){var i=Rv(t,e,n,r);if(i===null)aO(t,e,r,Kh,n),XS(t,r);else if(iB(i,t,e,n,r))r.stopPropagation();else if(XS(t,r),e&4&&-1<rB.indexOf(t)){for(;i!==null;){var s=Tf(i);if(s!==null&&GR(s),s=Rv(t,e,n,r),s===null&&aO(t,e,r,Kh,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else aO(t,e,r,null,n)}}var Kh=null;function Rv(t,e,n,r){if(Kh=null,t=ab(r),t=Co(t),t!==null)if(e=ia(t),e===null)t=null;else if(n=e.tag,n===13){if(t=FR(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Kh=t,null}function n_(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Yz()){case lb:return 1;case qR:return 4;case Uh:case Uz:return 16;case YR:return 536870912;default:return 16}default:return 16}}var Cs=null,db=null,fh=null;function r_(){if(fh)return fh;var t,e=db,n=e.length,r,i="value"in Cs?Cs.value:Cs.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return fh=i.slice(t,1<r?1-r:void 0)}function dh(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function cd(){return!0}function WS(){return!1}function Gn(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?cd:WS,this.isPropagationStopped=WS,this}return lt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cd)},persist:function(){},isPersistent:cd}),e}var Vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hb=Gn(Vl),Pf=lt({},Vl,{view:0,detail:0}),lB=Gn(Pf),Kg,Jg,yc,bm=lt({},Pf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pb,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==yc&&(yc&&t.type==="mousemove"?(Kg=t.screenX-yc.screenX,Jg=t.screenY-yc.screenY):Jg=Kg=0,yc=t),Kg)},movementY:function(t){return"movementY"in t?t.movementY:Jg}}),qS=Gn(bm),cB=lt({},bm,{dataTransfer:0}),uB=Gn(cB),fB=lt({},Pf,{relatedTarget:0}),eO=Gn(fB),dB=lt({},Vl,{animationName:0,elapsedTime:0,pseudoElement:0}),hB=Gn(dB),pB=lt({},Vl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mB=Gn(pB),gB=lt({},Vl,{data:0}),YS=Gn(gB),OB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yB={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"},vB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=vB[t])?!!e[t]:!1}function pb(){return xB}var bB=lt({},Pf,{key:function(t){if(t.key){var e=OB[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=dh(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?yB[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pb,charCode:function(t){return t.type==="keypress"?dh(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?dh(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),wB=Gn(bB),SB=lt({},bm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),US=Gn(SB),kB=lt({},Pf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pb}),CB=Gn(kB),PB=lt({},Vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),TB=Gn(PB),EB=lt({},bm,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),RB=Gn(EB),_B=[9,13,27,32],mb=Wi&&"CompositionEvent"in window,Jc=null;Wi&&"documentMode"in document&&(Jc=document.documentMode);var $B=Wi&&"TextEvent"in window&&!Jc,i_=Wi&&(!mb||Jc&&8<Jc&&11>=Jc),HS=" ",GS=!1;function s_(t,e){switch(t){case"keyup":return _B.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function o_(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var _a=!1;function QB(t,e){switch(t){case"compositionend":return o_(e);case"keypress":return e.which!==32?null:(GS=!0,HS);case"textInput":return t=e.data,t===HS&&GS?null:t;default:return null}}function AB(t,e){if(_a)return t==="compositionend"||!mb&&s_(t,e)?(t=r_(),fh=db=Cs=null,_a=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return i_&&e.locale!=="ko"?null:e.data;default:return null}}var IB={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 KS(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!IB[t.type]:e==="textarea"}function a_(t,e,n,r){DR(r),e=Jh(e,"onChange"),0<e.length&&(n=new hb("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var eu=null,Eu=null;function NB(t){y_(t,0)}function wm(t){var e=Aa(t);if($R(e))return t}function jB(t,e){if(t==="change")return e}var l_=!1;if(Wi){var tO;if(Wi){var nO="oninput"in document;if(!nO){var JS=document.createElement("div");JS.setAttribute("oninput","return;"),nO=typeof JS.oninput=="function"}tO=nO}else tO=!1;l_=tO&&(!document.documentMode||9<document.documentMode)}function ek(){eu&&(eu.detachEvent("onpropertychange",c_),Eu=eu=null)}function c_(t){if(t.propertyName==="value"&&wm(Eu)){var e=[];a_(e,Eu,t,ab(t)),VR(NB,e)}}function MB(t,e,n){t==="focusin"?(ek(),eu=e,Eu=n,eu.attachEvent("onpropertychange",c_)):t==="focusout"&&ek()}function DB(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return wm(Eu)}function LB(t,e){if(t==="click")return wm(e)}function zB(t,e){if(t==="input"||t==="change")return wm(e)}function BB(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Br=typeof Object.is=="function"?Object.is:BB;function Ru(t,e){if(Br(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fv.call(e,i)||!Br(t[i],e[i]))return!1}return!0}function tk(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function nk(t,e){var n=tk(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tk(n)}}function u_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?u_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function f_(){for(var t=window,e=Wh();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Wh(t.document)}return e}function gb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function VB(t){var e=f_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&u_(n.ownerDocument.documentElement,n)){if(r!==null&&gb(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=nk(n,s);var o=nk(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var FB=Wi&&"documentMode"in document&&11>=document.documentMode,$a=null,_v=null,tu=null,$v=!1;function rk(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$v||$a==null||$a!==Wh(r)||(r=$a,"selectionStart"in r&&gb(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}),tu&&Ru(tu,r)||(tu=r,r=Jh(_v,"onSelect"),0<r.length&&(e=new hb("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=$a)))}function ud(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Qa={animationend:ud("Animation","AnimationEnd"),animationiteration:ud("Animation","AnimationIteration"),animationstart:ud("Animation","AnimationStart"),transitionend:ud("Transition","TransitionEnd")},rO={},d_={};Wi&&(d_=document.createElement("div").style,"AnimationEvent"in window||(delete Qa.animationend.animation,delete Qa.animationiteration.animation,delete Qa.animationstart.animation),"TransitionEvent"in window||delete Qa.transitionend.transition);function Sm(t){if(rO[t])return rO[t];if(!Qa[t])return t;var e=Qa[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in d_)return rO[t]=e[n];return t}var h_=Sm("animationend"),p_=Sm("animationiteration"),m_=Sm("animationstart"),g_=Sm("transitionend"),O_=new Map,ik="abort auxClick 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(" ");function Js(t,e){O_.set(t,e),ra(e,[t])}for(var iO=0;iO<ik.length;iO++){var sO=ik[iO],XB=sO.toLowerCase(),ZB=sO[0].toUpperCase()+sO.slice(1);Js(XB,"on"+ZB)}Js(h_,"onAnimationEnd");Js(p_,"onAnimationIteration");Js(m_,"onAnimationStart");Js("dblclick","onDoubleClick");Js("focusin","onFocus");Js("focusout","onBlur");Js(g_,"onTransitionEnd");cl("onMouseEnter",["mouseout","mouseover"]);cl("onMouseLeave",["mouseout","mouseover"]);cl("onPointerEnter",["pointerout","pointerover"]);cl("onPointerLeave",["pointerout","pointerover"]);ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ra("onBeforeInput",["compositionend","keypress","textInput","paste"]);ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vc="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(" "),WB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vc));function sk(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Xz(r,e,void 0,t),t.currentTarget=null}function y_(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;sk(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;sk(i,a,c),s=l}}}if(Yh)throw t=Pv,Yh=!1,Pv=null,t}function Je(t,e){var n=e[jv];n===void 0&&(n=e[jv]=new Set);var r=t+"__bubble";n.has(r)||(v_(e,t,2,!1),n.add(r))}function oO(t,e,n){var r=0;e&&(r|=4),v_(n,t,r,e)}var fd="_reactListening"+Math.random().toString(36).slice(2);function _u(t){if(!t[fd]){t[fd]=!0,PR.forEach(function(n){n!=="selectionchange"&&(WB.has(n)||oO(n,!1,t),oO(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[fd]||(e[fd]=!0,oO("selectionchange",!1,e))}}function v_(t,e,n,r){switch(n_(e)){case 1:var i=oB;break;case 4:i=aB;break;default:i=fb}n=i.bind(null,e,n,t),i=void 0,!Cv||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function aO(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Co(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}VR(function(){var c=s,u=ab(n),f=[];e:{var d=O_.get(t);if(d!==void 0){var h=hb,O=t;switch(t){case"keypress":if(dh(n)===0)break e;case"keydown":case"keyup":h=wB;break;case"focusin":O="focus",h=eO;break;case"focusout":O="blur",h=eO;break;case"beforeblur":case"afterblur":h=eO;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=qS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=uB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=CB;break;case h_:case p_:case m_:h=hB;break;case g_:h=TB;break;case"scroll":h=lB;break;case"wheel":h=RB;break;case"copy":case"cut":case"paste":h=mB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=US}var m=(e&4)!==0,x=!m&&t==="scroll",y=m?d!==null?d+"Capture":null:d;m=[];for(var v=c,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=ku(v,y),S!=null&&m.push($u(v,S,b)))),x)break;v=v.return}0<m.length&&(d=new h(d,O,null,n,u),f.push({event:d,listeners:m}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",d&&n!==Sv&&(O=n.relatedTarget||n.fromElement)&&(Co(O)||O[qi]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(O=n.relatedTarget||n.toElement,h=c,O=O?Co(O):null,O!==null&&(x=ia(O),O!==x||O.tag!==5&&O.tag!==6)&&(O=null)):(h=null,O=c),h!==O)){if(m=qS,S="onMouseLeave",y="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(m=US,S="onPointerLeave",y="onPointerEnter",v="pointer"),x=h==null?d:Aa(h),b=O==null?d:Aa(O),d=new m(S,v+"leave",h,n,u),d.target=x,d.relatedTarget=b,S=null,Co(u)===c&&(m=new m(y,v+"enter",O,n,u),m.target=b,m.relatedTarget=x,S=m),x=S,h&&O)t:{for(m=h,y=O,v=0,b=m;b;b=ha(b))v++;for(b=0,S=y;S;S=ha(S))b++;for(;0<v-b;)m=ha(m),v--;for(;0<b-v;)y=ha(y),b--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=ha(m),y=ha(y)}m=null}else m=null;h!==null&&ok(f,d,h,m,!1),O!==null&&x!==null&&ok(f,x,O,m,!0)}}e:{if(d=c?Aa(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var k=jB;else if(KS(d))if(l_)k=zB;else{k=DB;var w=MB}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=LB);if(k&&(k=k(t,c))){a_(f,k,n,u);break e}w&&w(t,d,c),t==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&yv(d,"number",d.value)}switch(w=c?Aa(c):window,t){case"focusin":(KS(w)||w.contentEditable==="true")&&($a=w,_v=c,tu=null);break;case"focusout":tu=_v=$a=null;break;case"mousedown":$v=!0;break;case"contextmenu":case"mouseup":case"dragend":$v=!1,rk(f,n,u);break;case"selectionchange":if(FB)break;case"keydown":case"keyup":rk(f,n,u)}var C;if(mb)e:{switch(t){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else _a?s_(t,n)&&(_="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(i_&&n.locale!=="ko"&&(_a||_!=="onCompositionStart"?_==="onCompositionEnd"&&_a&&(C=r_()):(Cs=u,db="value"in Cs?Cs.value:Cs.textContent,_a=!0)),w=Jh(c,_),0<w.length&&(_=new YS(_,t,null,n,u),f.push({event:_,listeners:w}),C?_.data=C:(C=o_(n),C!==null&&(_.data=C)))),(C=$B?QB(t,n):AB(t,n))&&(c=Jh(c,"onBeforeInput"),0<c.length&&(u=new YS("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=C))}y_(f,e)})}function $u(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Jh(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ku(t,n),s!=null&&r.unshift($u(t,s,i)),s=ku(t,e),s!=null&&r.push($u(t,s,i))),t=t.return}return r}function ha(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ok(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=ku(n,s),l!=null&&o.unshift($u(n,l,a))):i||(l=ku(n,s),l!=null&&o.push($u(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var qB=/\r\n?/g,YB=/\u0000|\uFFFD/g;function ak(t){return(typeof t=="string"?t:""+t).replace(qB,`
|
|
39
|
+
`).replace(YB,"")}function dd(t,e,n){if(e=ak(e),ak(t)!==e&&n)throw Error(G(425))}function ep(){}var Qv=null,Av=null;function Iv(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Nv=typeof setTimeout=="function"?setTimeout:void 0,UB=typeof clearTimeout=="function"?clearTimeout:void 0,lk=typeof Promise=="function"?Promise:void 0,HB=typeof queueMicrotask=="function"?queueMicrotask:typeof lk<"u"?function(t){return lk.resolve(null).then(t).catch(GB)}:Nv;function GB(t){setTimeout(function(){throw t})}function lO(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Tu(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Tu(e)}function As(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function ck(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Fl=Math.random().toString(36).slice(2),ci="__reactFiber$"+Fl,Qu="__reactProps$"+Fl,qi="__reactContainer$"+Fl,jv="__reactEvents$"+Fl,KB="__reactListeners$"+Fl,JB="__reactHandles$"+Fl;function Co(t){var e=t[ci];if(e)return e;for(var n=t.parentNode;n;){if(e=n[qi]||n[ci]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=ck(t);t!==null;){if(n=t[ci])return n;t=ck(t)}return e}t=n,n=t.parentNode}return null}function Tf(t){return t=t[ci]||t[qi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Aa(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(G(33))}function km(t){return t[Qu]||null}var Mv=[],Ia=-1;function eo(t){return{current:t}}function et(t){0>Ia||(t.current=Mv[Ia],Mv[Ia]=null,Ia--)}function Ge(t,e){Ia++,Mv[Ia]=t.current,t.current=e}var Bs={},Ut=eo(Bs),bn=eo(!1),No=Bs;function ul(t,e){var n=t.type.contextTypes;if(!n)return Bs;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function wn(t){return t=t.childContextTypes,t!=null}function tp(){et(bn),et(Ut)}function uk(t,e,n){if(Ut.current!==Bs)throw Error(G(168));Ge(Ut,e),Ge(bn,n)}function x_(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(G(108,Mz(t)||"Unknown",i));return lt({},n,r)}function np(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Bs,No=Ut.current,Ge(Ut,t),Ge(bn,bn.current),!0}function fk(t,e,n){var r=t.stateNode;if(!r)throw Error(G(169));n?(t=x_(t,e,No),r.__reactInternalMemoizedMergedChildContext=t,et(bn),et(Ut),Ge(Ut,t)):et(bn),Ge(bn,n)}var Di=null,Cm=!1,cO=!1;function b_(t){Di===null?Di=[t]:Di.push(t)}function eV(t){Cm=!0,b_(t)}function to(){if(!cO&&Di!==null){cO=!0;var t=0,e=Ve;try{var n=Di;for(Ve=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Di=null,Cm=!1}catch(i){throw Di!==null&&(Di=Di.slice(t+1)),WR(lb,to),i}finally{Ve=e,cO=!1}}return null}var Na=[],ja=0,rp=null,ip=0,rr=[],ir=0,jo=null,Bi=1,Vi="";function Oo(t,e){Na[ja++]=ip,Na[ja++]=rp,rp=t,ip=e}function w_(t,e,n){rr[ir++]=Bi,rr[ir++]=Vi,rr[ir++]=jo,jo=t;var r=Bi;t=Vi;var i=32-Dr(r)-1;r&=~(1<<i),n+=1;var s=32-Dr(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Bi=1<<32-Dr(e)+i|n<<i|r,Vi=s+t}else Bi=1<<s|n<<i|r,Vi=t}function Ob(t){t.return!==null&&(Oo(t,1),w_(t,1,0))}function yb(t){for(;t===rp;)rp=Na[--ja],Na[ja]=null,ip=Na[--ja],Na[ja]=null;for(;t===jo;)jo=rr[--ir],rr[ir]=null,Vi=rr[--ir],rr[ir]=null,Bi=rr[--ir],rr[ir]=null}var Zn=null,zn=null,rt=!1,Nr=null;function S_(t,e){var n=ar(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function dk(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Zn=t,zn=As(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Zn=t,zn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=jo!==null?{id:Bi,overflow:Vi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ar(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Zn=t,zn=null,!0):!1;default:return!1}}function Dv(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Lv(t){if(rt){var e=zn;if(e){var n=e;if(!dk(t,e)){if(Dv(t))throw Error(G(418));e=As(n.nextSibling);var r=Zn;e&&dk(t,e)?S_(r,n):(t.flags=t.flags&-4097|2,rt=!1,Zn=t)}}else{if(Dv(t))throw Error(G(418));t.flags=t.flags&-4097|2,rt=!1,Zn=t}}}function hk(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Zn=t}function hd(t){if(t!==Zn)return!1;if(!rt)return hk(t),rt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Iv(t.type,t.memoizedProps)),e&&(e=zn)){if(Dv(t))throw k_(),Error(G(418));for(;e;)S_(t,e),e=As(e.nextSibling)}if(hk(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(G(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){zn=As(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}zn=null}}else zn=Zn?As(t.stateNode.nextSibling):null;return!0}function k_(){for(var t=zn;t;)t=As(t.nextSibling)}function fl(){zn=Zn=null,rt=!1}function vb(t){Nr===null?Nr=[t]:Nr.push(t)}var tV=rs.ReactCurrentBatchConfig;function vc(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(G(309));var r=n.stateNode}if(!r)throw Error(G(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,t))}return t}function pd(t,e){throw t=Object.prototype.toString.call(e),Error(G(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function pk(t){var e=t._init;return e(t._payload)}function C_(t){function e(y,v){if(t){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function n(y,v){if(!t)return null;for(;v!==null;)e(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function i(y,v){return y=Ms(y,v),y.index=0,y.sibling=null,y}function s(y,v,b){return y.index=b,t?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=2,v):b):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,v,b,S){return v===null||v.tag!==6?(v=gO(b,y.mode,S),v.return=y,v):(v=i(v,b),v.return=y,v)}function l(y,v,b,S){var k=b.type;return k===Ra?u(y,v,b.props.children,S,b.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ys&&pk(k)===v.type)?(S=i(v,b.props),S.ref=vc(y,v,b),S.return=y,S):(S=vh(b.type,b.key,b.props,null,y.mode,S),S.ref=vc(y,v,b),S.return=y,S)}function c(y,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=OO(b,y.mode,S),v.return=y,v):(v=i(v,b.children||[]),v.return=y,v)}function u(y,v,b,S,k){return v===null||v.tag!==7?(v=Qo(b,y.mode,S,k),v.return=y,v):(v=i(v,b),v.return=y,v)}function f(y,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=gO(""+v,y.mode,b),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case rd:return b=vh(v.type,v.key,v.props,null,y.mode,b),b.ref=vc(y,null,v),b.return=y,b;case Ea:return v=OO(v,y.mode,b),v.return=y,v;case ys:var S=v._init;return f(y,S(v._payload),b)}if(zc(v)||pc(v))return v=Qo(v,y.mode,b,null),v.return=y,v;pd(y,v)}return null}function d(y,v,b,S){var k=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(y,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case rd:return b.key===k?l(y,v,b,S):null;case Ea:return b.key===k?c(y,v,b,S):null;case ys:return k=b._init,d(y,v,k(b._payload),S)}if(zc(b)||pc(b))return k!==null?null:u(y,v,b,S,null);pd(y,b)}return null}function h(y,v,b,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,a(v,y,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case rd:return y=y.get(S.key===null?b:S.key)||null,l(v,y,S,k);case Ea:return y=y.get(S.key===null?b:S.key)||null,c(v,y,S,k);case ys:var w=S._init;return h(y,v,b,w(S._payload),k)}if(zc(S)||pc(S))return y=y.get(b)||null,u(v,y,S,k,null);pd(v,S)}return null}function O(y,v,b,S){for(var k=null,w=null,C=v,_=v=0,I=null;C!==null&&_<b.length;_++){C.index>_?(I=C,C=null):I=C.sibling;var E=d(y,C,b[_],S);if(E===null){C===null&&(C=I);break}t&&C&&E.alternate===null&&e(y,C),v=s(E,v,_),w===null?k=E:w.sibling=E,w=E,C=I}if(_===b.length)return n(y,C),rt&&Oo(y,_),k;if(C===null){for(;_<b.length;_++)C=f(y,b[_],S),C!==null&&(v=s(C,v,_),w===null?k=C:w.sibling=C,w=C);return rt&&Oo(y,_),k}for(C=r(y,C);_<b.length;_++)I=h(C,y,_,b[_],S),I!==null&&(t&&I.alternate!==null&&C.delete(I.key===null?_:I.key),v=s(I,v,_),w===null?k=I:w.sibling=I,w=I);return t&&C.forEach(function(N){return e(y,N)}),rt&&Oo(y,_),k}function m(y,v,b,S){var k=pc(b);if(typeof k!="function")throw Error(G(150));if(b=k.call(b),b==null)throw Error(G(151));for(var w=k=null,C=v,_=v=0,I=null,E=b.next();C!==null&&!E.done;_++,E=b.next()){C.index>_?(I=C,C=null):I=C.sibling;var N=d(y,C,E.value,S);if(N===null){C===null&&(C=I);break}t&&C&&N.alternate===null&&e(y,C),v=s(N,v,_),w===null?k=N:w.sibling=N,w=N,C=I}if(E.done)return n(y,C),rt&&Oo(y,_),k;if(C===null){for(;!E.done;_++,E=b.next())E=f(y,E.value,S),E!==null&&(v=s(E,v,_),w===null?k=E:w.sibling=E,w=E);return rt&&Oo(y,_),k}for(C=r(y,C);!E.done;_++,E=b.next())E=h(C,y,_,E.value,S),E!==null&&(t&&E.alternate!==null&&C.delete(E.key===null?_:E.key),v=s(E,v,_),w===null?k=E:w.sibling=E,w=E);return t&&C.forEach(function(Q){return e(y,Q)}),rt&&Oo(y,_),k}function x(y,v,b,S){if(typeof b=="object"&&b!==null&&b.type===Ra&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case rd:e:{for(var k=b.key,w=v;w!==null;){if(w.key===k){if(k=b.type,k===Ra){if(w.tag===7){n(y,w.sibling),v=i(w,b.props.children),v.return=y,y=v;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ys&&pk(k)===w.type){n(y,w.sibling),v=i(w,b.props),v.ref=vc(y,w,b),v.return=y,y=v;break e}n(y,w);break}else e(y,w);w=w.sibling}b.type===Ra?(v=Qo(b.props.children,y.mode,S,b.key),v.return=y,y=v):(S=vh(b.type,b.key,b.props,null,y.mode,S),S.ref=vc(y,v,b),S.return=y,y=S)}return o(y);case Ea:e:{for(w=b.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=i(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else e(y,v);v=v.sibling}v=OO(b,y.mode,S),v.return=y,y=v}return o(y);case ys:return w=b._init,x(y,v,w(b._payload),S)}if(zc(b))return O(y,v,b,S);if(pc(b))return m(y,v,b,S);pd(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,b),v.return=y,y=v):(n(y,v),v=gO(b,y.mode,S),v.return=y,y=v),o(y)):n(y,v)}return x}var dl=C_(!0),P_=C_(!1),sp=eo(null),op=null,Ma=null,xb=null;function bb(){xb=Ma=op=null}function wb(t){var e=sp.current;et(sp),t._currentValue=e}function zv(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function qa(t,e){op=t,xb=Ma=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(On=!0),t.firstContext=null)}function mr(t){var e=t._currentValue;if(xb!==t)if(t={context:t,memoizedValue:e,next:null},Ma===null){if(op===null)throw Error(G(308));Ma=t,op.dependencies={lanes:0,firstContext:t}}else Ma=Ma.next=t;return e}var Po=null;function Sb(t){Po===null?Po=[t]:Po.push(t)}function T_(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Sb(e)):(n.next=i.next,i.next=n),e.interleaved=n,Yi(t,r)}function Yi(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var vs=!1;function kb(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function E_(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Fi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Is(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Le&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Yi(t,n)}return i=r.interleaved,i===null?(e.next=e,Sb(r)):(e.next=i.next,i.next=e),r.interleaved=e,Yi(t,n)}function hh(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cb(t,n)}}function mk(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function ap(t,e,n,r){var i=t.updateQueue;vs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,u=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var O=t,m=a;switch(d=e,h=n,m.tag){case 1:if(O=m.payload,typeof O=="function"){f=O.call(h,f,d);break e}f=O;break e;case 3:O.flags=O.flags&-65537|128;case 0:if(O=m.payload,d=typeof O=="function"?O.call(h,f,d):O,d==null)break e;f=lt({},f,d);break e;case 2:vs=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Do|=o,t.lanes=o,t.memoizedState=f}}function gk(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(G(191,i));i.call(r)}}}var Ef={},bi=eo(Ef),Au=eo(Ef),Iu=eo(Ef);function To(t){if(t===Ef)throw Error(G(174));return t}function Cb(t,e){switch(Ge(Iu,e),Ge(Au,t),Ge(bi,Ef),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:xv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=xv(e,t)}et(bi),Ge(bi,e)}function hl(){et(bi),et(Au),et(Iu)}function R_(t){To(Iu.current);var e=To(bi.current),n=xv(e,t.type);e!==n&&(Ge(Au,t),Ge(bi,n))}function Pb(t){Au.current===t&&(et(bi),et(Au))}var st=eo(0);function lp(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var uO=[];function Tb(){for(var t=0;t<uO.length;t++)uO[t]._workInProgressVersionPrimary=null;uO.length=0}var ph=rs.ReactCurrentDispatcher,fO=rs.ReactCurrentBatchConfig,Mo=0,ot=null,xt=null,Ct=null,cp=!1,nu=!1,Nu=0,nV=0;function Lt(){throw Error(G(321))}function Eb(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Br(t[n],e[n]))return!1;return!0}function Rb(t,e,n,r,i,s){if(Mo=s,ot=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ph.current=t===null||t.memoizedState===null?oV:aV,t=n(r,i),nu){s=0;do{if(nu=!1,Nu=0,25<=s)throw Error(G(301));s+=1,Ct=xt=null,e.updateQueue=null,ph.current=lV,t=n(r,i)}while(nu)}if(ph.current=up,e=xt!==null&&xt.next!==null,Mo=0,Ct=xt=ot=null,cp=!1,e)throw Error(G(300));return t}function _b(){var t=Nu!==0;return Nu=0,t}function ai(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?ot.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function gr(){if(xt===null){var t=ot.alternate;t=t!==null?t.memoizedState:null}else t=xt.next;var e=Ct===null?ot.memoizedState:Ct.next;if(e!==null)Ct=e,xt=t;else{if(t===null)throw Error(G(310));xt=t,t={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Ct===null?ot.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function ju(t,e){return typeof e=="function"?e(t):e}function dO(t){var e=gr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=xt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((Mo&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,ot.lanes|=u,Do|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Br(r,e.memoizedState)||(On=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,ot.lanes|=s,Do|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function hO(t){var e=gr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Br(s,e.memoizedState)||(On=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function __(){}function $_(t,e){var n=ot,r=gr(),i=e(),s=!Br(r.memoizedState,i);if(s&&(r.memoizedState=i,On=!0),r=r.queue,$b(I_.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Ct!==null&&Ct.memoizedState.tag&1){if(n.flags|=2048,Mu(9,A_.bind(null,n,r,i,e),void 0,null),Et===null)throw Error(G(349));Mo&30||Q_(n,e,i)}return i}function Q_(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ot.updateQueue,e===null?(e={lastEffect:null,stores:null},ot.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function A_(t,e,n,r){e.value=n,e.getSnapshot=r,N_(e)&&j_(t)}function I_(t,e,n){return n(function(){N_(e)&&j_(t)})}function N_(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Br(t,n)}catch{return!0}}function j_(t){var e=Yi(t,1);e!==null&&Lr(e,t,1,-1)}function Ok(t){var e=ai();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ju,lastRenderedState:t},e.queue=t,t=t.dispatch=sV.bind(null,ot,t),[e.memoizedState,t]}function Mu(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ot.updateQueue,e===null?(e={lastEffect:null,stores:null},ot.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function M_(){return gr().memoizedState}function mh(t,e,n,r){var i=ai();ot.flags|=t,i.memoizedState=Mu(1|e,n,void 0,r===void 0?null:r)}function Pm(t,e,n,r){var i=gr();r=r===void 0?null:r;var s=void 0;if(xt!==null){var o=xt.memoizedState;if(s=o.destroy,r!==null&&Eb(r,o.deps)){i.memoizedState=Mu(e,n,s,r);return}}ot.flags|=t,i.memoizedState=Mu(1|e,n,s,r)}function yk(t,e){return mh(8390656,8,t,e)}function $b(t,e){return Pm(2048,8,t,e)}function D_(t,e){return Pm(4,2,t,e)}function L_(t,e){return Pm(4,4,t,e)}function z_(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function B_(t,e,n){return n=n!=null?n.concat([t]):null,Pm(4,4,z_.bind(null,e,t),n)}function Qb(){}function V_(t,e){var n=gr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Eb(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function F_(t,e){var n=gr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Eb(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function X_(t,e,n){return Mo&21?(Br(n,e)||(n=UR(),ot.lanes|=n,Do|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,On=!0),t.memoizedState=n)}function rV(t,e){var n=Ve;Ve=n!==0&&4>n?n:4,t(!0);var r=fO.transition;fO.transition={};try{t(!1),e()}finally{Ve=n,fO.transition=r}}function Z_(){return gr().memoizedState}function iV(t,e,n){var r=js(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},W_(t))q_(e,n);else if(n=T_(t,e,n,r),n!==null){var i=tn();Lr(n,t,r,i),Y_(n,e,r)}}function sV(t,e,n){var r=js(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(W_(t))q_(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Br(a,o)){var l=e.interleaved;l===null?(i.next=i,Sb(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=T_(t,e,i,r),n!==null&&(i=tn(),Lr(n,t,r,i),Y_(n,e,r))}}function W_(t){var e=t.alternate;return t===ot||e!==null&&e===ot}function q_(t,e){nu=cp=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Y_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cb(t,n)}}var up={readContext:mr,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},oV={readContext:mr,useCallback:function(t,e){return ai().memoizedState=[t,e===void 0?null:e],t},useContext:mr,useEffect:yk,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,mh(4194308,4,z_.bind(null,e,t),n)},useLayoutEffect:function(t,e){return mh(4194308,4,t,e)},useInsertionEffect:function(t,e){return mh(4,2,t,e)},useMemo:function(t,e){var n=ai();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=ai();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=iV.bind(null,ot,t),[r.memoizedState,t]},useRef:function(t){var e=ai();return t={current:t},e.memoizedState=t},useState:Ok,useDebugValue:Qb,useDeferredValue:function(t){return ai().memoizedState=t},useTransition:function(){var t=Ok(!1),e=t[0];return t=rV.bind(null,t[1]),ai().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ot,i=ai();if(rt){if(n===void 0)throw Error(G(407));n=n()}else{if(n=e(),Et===null)throw Error(G(349));Mo&30||Q_(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,yk(I_.bind(null,r,s,t),[t]),r.flags|=2048,Mu(9,A_.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=ai(),e=Et.identifierPrefix;if(rt){var n=Vi,r=Bi;n=(r&~(1<<32-Dr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Nu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=nV++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},aV={readContext:mr,useCallback:V_,useContext:mr,useEffect:$b,useImperativeHandle:B_,useInsertionEffect:D_,useLayoutEffect:L_,useMemo:F_,useReducer:dO,useRef:M_,useState:function(){return dO(ju)},useDebugValue:Qb,useDeferredValue:function(t){var e=gr();return X_(e,xt.memoizedState,t)},useTransition:function(){var t=dO(ju)[0],e=gr().memoizedState;return[t,e]},useMutableSource:__,useSyncExternalStore:$_,useId:Z_,unstable_isNewReconciler:!1},lV={readContext:mr,useCallback:V_,useContext:mr,useEffect:$b,useImperativeHandle:B_,useInsertionEffect:D_,useLayoutEffect:L_,useMemo:F_,useReducer:hO,useRef:M_,useState:function(){return hO(ju)},useDebugValue:Qb,useDeferredValue:function(t){var e=gr();return xt===null?e.memoizedState=t:X_(e,xt.memoizedState,t)},useTransition:function(){var t=hO(ju)[0],e=gr().memoizedState;return[t,e]},useMutableSource:__,useSyncExternalStore:$_,useId:Z_,unstable_isNewReconciler:!1};function Ar(t,e){if(t&&t.defaultProps){e=lt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Bv(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:lt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Tm={isMounted:function(t){return(t=t._reactInternals)?ia(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=tn(),i=js(t),s=Fi(r,i);s.payload=e,n!=null&&(s.callback=n),e=Is(t,s,i),e!==null&&(Lr(e,t,i,r),hh(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=tn(),i=js(t),s=Fi(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Is(t,s,i),e!==null&&(Lr(e,t,i,r),hh(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=tn(),r=js(t),i=Fi(n,r);i.tag=2,e!=null&&(i.callback=e),e=Is(t,i,r),e!==null&&(Lr(e,t,r,n),hh(e,t,r))}};function vk(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Ru(n,r)||!Ru(i,s):!0}function U_(t,e,n){var r=!1,i=Bs,s=e.contextType;return typeof s=="object"&&s!==null?s=mr(s):(i=wn(e)?No:Ut.current,r=e.contextTypes,s=(r=r!=null)?ul(t,i):Bs),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Tm,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function xk(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Tm.enqueueReplaceState(e,e.state,null)}function Vv(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},kb(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=mr(s):(s=wn(e)?No:Ut.current,i.context=ul(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Bv(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Tm.enqueueReplaceState(i,i.state,null),ap(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function pl(t,e){try{var n="",r=e;do n+=jz(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
40
|
+
Error generating stack: `+s.message+`
|
|
41
|
+
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function pO(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Fv(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var cV=typeof WeakMap=="function"?WeakMap:Map;function H_(t,e,n){n=Fi(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){dp||(dp=!0,Jv=r),Fv(t,e)},n}function G_(t,e,n){n=Fi(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Fv(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Fv(t,e),typeof r!="function"&&(Ns===null?Ns=new Set([this]):Ns.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function bk(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new cV;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=SV.bind(null,t,e,n),e.then(t,t))}function wk(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Sk(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Fi(-1,1),e.tag=2,Is(n,e,1))),n.lanes|=1),t)}var uV=rs.ReactCurrentOwner,On=!1;function Kt(t,e,n,r){e.child=t===null?P_(e,null,n,r):dl(e,t.child,n,r)}function kk(t,e,n,r,i){n=n.render;var s=e.ref;return qa(e,i),r=Rb(t,e,n,r,s,i),n=_b(),t!==null&&!On?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ui(t,e,i)):(rt&&n&&Ob(e),e.flags|=1,Kt(t,e,r,i),e.child)}function Ck(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!zb(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,K_(t,e,s,r,i)):(t=vh(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ru,n(o,r)&&t.ref===e.ref)return Ui(t,e,i)}return e.flags|=1,t=Ms(s,r),t.ref=e.ref,t.return=e,e.child=t}function K_(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Ru(s,r)&&t.ref===e.ref)if(On=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(On=!0);else return e.lanes=t.lanes,Ui(t,e,i)}return Xv(t,e,n,r,i)}function J_(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(La,Nn),Nn|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ge(La,Nn),Nn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ge(La,Nn),Nn|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Ge(La,Nn),Nn|=r;return Kt(t,e,i,n),e.child}function e$(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Xv(t,e,n,r,i){var s=wn(n)?No:Ut.current;return s=ul(e,s),qa(e,i),n=Rb(t,e,n,r,s,i),r=_b(),t!==null&&!On?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Ui(t,e,i)):(rt&&r&&Ob(e),e.flags|=1,Kt(t,e,n,i),e.child)}function Pk(t,e,n,r,i){if(wn(n)){var s=!0;np(e)}else s=!1;if(qa(e,i),e.stateNode===null)gh(t,e),U_(e,n,r),Vv(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=mr(c):(c=wn(n)?No:Ut.current,c=ul(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&xk(e,o,r,c),vs=!1;var d=e.memoizedState;o.state=d,ap(e,r,o,i),l=e.memoizedState,a!==r||d!==l||bn.current||vs?(typeof u=="function"&&(Bv(e,n,u,r),l=e.memoizedState),(a=vs||vk(e,n,a,r,d,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,E_(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ar(e.type,a),o.props=c,f=e.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=mr(l):(l=wn(n)?No:Ut.current,l=ul(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==l)&&xk(e,o,r,l),vs=!1,d=e.memoizedState,o.state=d,ap(e,r,o,i);var O=e.memoizedState;a!==f||d!==O||bn.current||vs?(typeof h=="function"&&(Bv(e,n,h,r),O=e.memoizedState),(c=vs||vk(e,n,c,r,d,O,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,O,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,O,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=O),o.props=r,o.state=O,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return Zv(t,e,n,r,s,i)}function Zv(t,e,n,r,i,s){e$(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&fk(e,n,!1),Ui(t,e,s);r=e.stateNode,uV.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=dl(e,t.child,null,s),e.child=dl(e,null,a,s)):Kt(t,e,a,s),e.memoizedState=r.state,i&&fk(e,n,!0),e.child}function t$(t){var e=t.stateNode;e.pendingContext?uk(t,e.pendingContext,e.pendingContext!==e.context):e.context&&uk(t,e.context,!1),Cb(t,e.containerInfo)}function Tk(t,e,n,r,i){return fl(),vb(i),e.flags|=256,Kt(t,e,n,r),e.child}var Wv={dehydrated:null,treeContext:null,retryLane:0};function qv(t){return{baseLanes:t,cachePool:null,transitions:null}}function n$(t,e,n){var r=e.pendingProps,i=st.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ge(st,i&1),t===null)return Lv(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=_m(o,r,0,null),t=Qo(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=qv(n),e.memoizedState=Wv,t):Ab(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return fV(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Ms(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Ms(a,s):(s=Qo(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?qv(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Wv,r}return s=t.child,t=s.sibling,r=Ms(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Ab(t,e){return e=_m({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function md(t,e,n,r){return r!==null&&vb(r),dl(e,t.child,null,n),t=Ab(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fV(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=pO(Error(G(422))),md(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=_m({mode:"visible",children:r.children},i,0,null),s=Qo(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&dl(e,t.child,null,o),e.child.memoizedState=qv(o),e.memoizedState=Wv,s);if(!(e.mode&1))return md(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(G(419)),r=pO(s,r,void 0),md(t,e,o,r)}if(a=(o&t.childLanes)!==0,On||a){if(r=Et,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Yi(t,i),Lr(r,t,i,-1))}return Lb(),r=pO(Error(G(421))),md(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=kV.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,zn=As(i.nextSibling),Zn=e,rt=!0,Nr=null,t!==null&&(rr[ir++]=Bi,rr[ir++]=Vi,rr[ir++]=jo,Bi=t.id,Vi=t.overflow,jo=e),e=Ab(e,r.children),e.flags|=4096,e)}function Ek(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),zv(t.return,e,n)}function mO(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function r$(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Kt(t,e,r.children,n),r=st.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ek(t,n,e);else if(t.tag===19)Ek(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Ge(st,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&lp(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),mO(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&lp(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}mO(e,!0,n,null,s);break;case"together":mO(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function gh(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ui(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Do|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(G(153));if(e.child!==null){for(t=e.child,n=Ms(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ms(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function dV(t,e,n){switch(e.tag){case 3:t$(e),fl();break;case 5:R_(e);break;case 1:wn(e.type)&&np(e);break;case 4:Cb(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Ge(sp,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Ge(st,st.current&1),e.flags|=128,null):n&e.child.childLanes?n$(t,e,n):(Ge(st,st.current&1),t=Ui(t,e,n),t!==null?t.sibling:null);Ge(st,st.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return r$(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(st,st.current),r)break;return null;case 22:case 23:return e.lanes=0,J_(t,e,n)}return Ui(t,e,n)}var i$,Yv,s$,o$;i$=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Yv=function(){};s$=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,To(bi.current);var s=null;switch(n){case"input":i=gv(t,i),r=gv(t,r),s=[];break;case"select":i=lt({},i,{value:void 0}),r=lt({},r,{value:void 0}),s=[];break;case"textarea":i=vv(t,i),r=vv(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ep)}bv(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wu.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wu.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Je("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};o$=function(t,e,n,r){n!==r&&(e.flags|=4)};function xc(t,e){if(!rt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function zt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function hV(t,e,n){var r=e.pendingProps;switch(yb(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(e),null;case 1:return wn(e.type)&&tp(),zt(e),null;case 3:return r=e.stateNode,hl(),et(bn),et(Ut),Tb(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(hd(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Nr!==null&&(nx(Nr),Nr=null))),Yv(t,e),zt(e),null;case 5:Pb(e);var i=To(Iu.current);if(n=e.type,t!==null&&e.stateNode!=null)s$(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(G(166));return zt(e),null}if(t=To(bi.current),hd(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[ci]=e,r[Qu]=s,t=(e.mode&1)!==0,n){case"dialog":Je("cancel",r),Je("close",r);break;case"iframe":case"object":case"embed":Je("load",r);break;case"video":case"audio":for(i=0;i<Vc.length;i++)Je(Vc[i],r);break;case"source":Je("error",r);break;case"img":case"image":case"link":Je("error",r),Je("load",r);break;case"details":Je("toggle",r);break;case"input":MS(r,s),Je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Je("invalid",r);break;case"textarea":LS(r,s),Je("invalid",r)}bv(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&dd(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&dd(r.textContent,a,t),i=["children",""+a]):wu.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Je("scroll",r)}switch(n){case"input":id(r),DS(r,s,!0);break;case"textarea":id(r),zS(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ep)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=IR(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[ci]=e,t[Qu]=r,i$(t,e,!1,!1),e.stateNode=t;e:{switch(o=wv(n,r),n){case"dialog":Je("cancel",t),Je("close",t),i=r;break;case"iframe":case"object":case"embed":Je("load",t),i=r;break;case"video":case"audio":for(i=0;i<Vc.length;i++)Je(Vc[i],t);i=r;break;case"source":Je("error",t),i=r;break;case"img":case"image":case"link":Je("error",t),Je("load",t),i=r;break;case"details":Je("toggle",t),i=r;break;case"input":MS(t,r),i=gv(t,r),Je("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=lt({},r,{value:void 0}),Je("invalid",t);break;case"textarea":LS(t,r),i=vv(t,r),Je("invalid",t);break;default:i=r}bv(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?MR(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&NR(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Su(t,l):typeof l=="number"&&Su(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wu.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Je("scroll",t):l!=null&&rb(t,s,l,o))}switch(n){case"input":id(t),DS(t,r,!1);break;case"textarea":id(t),zS(t);break;case"option":r.value!=null&&t.setAttribute("value",""+zs(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?Fa(t,!!r.multiple,s,!1):r.defaultValue!=null&&Fa(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=ep)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return zt(e),null;case 6:if(t&&e.stateNode!=null)o$(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(G(166));if(n=To(Iu.current),To(bi.current),hd(e)){if(r=e.stateNode,n=e.memoizedProps,r[ci]=e,(s=r.nodeValue!==n)&&(t=Zn,t!==null))switch(t.tag){case 3:dd(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&dd(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ci]=e,e.stateNode=r}return zt(e),null;case 13:if(et(st),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(rt&&zn!==null&&e.mode&1&&!(e.flags&128))k_(),fl(),e.flags|=98560,s=!1;else if(s=hd(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(G(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(G(317));s[ci]=e}else fl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;zt(e),s=!1}else Nr!==null&&(nx(Nr),Nr=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||st.current&1?wt===0&&(wt=3):Lb())),e.updateQueue!==null&&(e.flags|=4),zt(e),null);case 4:return hl(),Yv(t,e),t===null&&_u(e.stateNode.containerInfo),zt(e),null;case 10:return wb(e.type._context),zt(e),null;case 17:return wn(e.type)&&tp(),zt(e),null;case 19:if(et(st),s=e.memoizedState,s===null)return zt(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)xc(s,!1);else{if(wt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=lp(t),o!==null){for(e.flags|=128,xc(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Ge(st,st.current&1|2),e.child}t=t.sibling}s.tail!==null&&ft()>ml&&(e.flags|=128,r=!0,xc(s,!1),e.lanes=4194304)}else{if(!r)if(t=lp(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),xc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!rt)return zt(e),null}else 2*ft()-s.renderingStartTime>ml&&n!==1073741824&&(e.flags|=128,r=!0,xc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ft(),e.sibling=null,n=st.current,Ge(st,r?n&1|2:n&1),e):(zt(e),null);case 22:case 23:return Db(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Nn&1073741824&&(zt(e),e.subtreeFlags&6&&(e.flags|=8192)):zt(e),null;case 24:return null;case 25:return null}throw Error(G(156,e.tag))}function pV(t,e){switch(yb(e),e.tag){case 1:return wn(e.type)&&tp(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return hl(),et(bn),et(Ut),Tb(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Pb(e),null;case 13:if(et(st),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(G(340));fl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return et(st),null;case 4:return hl(),null;case 10:return wb(e.type._context),null;case 22:case 23:return Db(),null;case 24:return null;default:return null}}var gd=!1,Xt=!1,mV=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Da(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ct(t,e,r)}else n.current=null}function Uv(t,e,n){try{n()}catch(r){ct(t,e,r)}}var Rk=!1;function gV(t,e){if(Qv=Gh,t=f_(),gb(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===i&&(a=o),d===s&&++u===r&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Av={focusedElem:t,selectionRange:n},Gh=!1,ce=e;ce!==null;)if(e=ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ce=t;else for(;ce!==null;){e=ce;try{var O=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(O!==null){var m=O.memoizedProps,x=O.memoizedState,y=e.stateNode,v=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:Ar(e.type,m),x);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(S){ct(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ce=t;break}ce=e.return}return O=Rk,Rk=!1,O}function ru(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Uv(e,n,s)}i=i.next}while(i!==r)}}function Em(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Hv(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function a$(t){var e=t.alternate;e!==null&&(t.alternate=null,a$(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ci],delete e[Qu],delete e[jv],delete e[KB],delete e[JB])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function l$(t){return t.tag===5||t.tag===3||t.tag===4}function _k(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||l$(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Gv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ep));else if(r!==4&&(t=t.child,t!==null))for(Gv(t,e,n),t=t.sibling;t!==null;)Gv(t,e,n),t=t.sibling}function Kv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Kv(t,e,n),t=t.sibling;t!==null;)Kv(t,e,n),t=t.sibling}var Qt=null,Ir=!1;function fs(t,e,n){for(n=n.child;n!==null;)c$(t,e,n),n=n.sibling}function c$(t,e,n){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(xm,n)}catch{}switch(n.tag){case 5:Xt||Da(n,e);case 6:var r=Qt,i=Ir;Qt=null,fs(t,e,n),Qt=r,Ir=i,Qt!==null&&(Ir?(t=Qt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Qt.removeChild(n.stateNode));break;case 18:Qt!==null&&(Ir?(t=Qt,n=n.stateNode,t.nodeType===8?lO(t.parentNode,n):t.nodeType===1&&lO(t,n),Tu(t)):lO(Qt,n.stateNode));break;case 4:r=Qt,i=Ir,Qt=n.stateNode.containerInfo,Ir=!0,fs(t,e,n),Qt=r,Ir=i;break;case 0:case 11:case 14:case 15:if(!Xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Uv(n,e,o),i=i.next}while(i!==r)}fs(t,e,n);break;case 1:if(!Xt&&(Da(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ct(n,e,a)}fs(t,e,n);break;case 21:fs(t,e,n);break;case 22:n.mode&1?(Xt=(r=Xt)||n.memoizedState!==null,fs(t,e,n),Xt=r):fs(t,e,n);break;default:fs(t,e,n)}}function $k(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new mV),e.forEach(function(r){var i=CV.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Er(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Qt=a.stateNode,Ir=!1;break e;case 3:Qt=a.stateNode.containerInfo,Ir=!0;break e;case 4:Qt=a.stateNode.containerInfo,Ir=!0;break e}a=a.return}if(Qt===null)throw Error(G(160));c$(s,o,i),Qt=null,Ir=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ct(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)u$(e,t),e=e.sibling}function u$(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Er(e,t),ei(t),r&4){try{ru(3,t,t.return),Em(3,t)}catch(m){ct(t,t.return,m)}try{ru(5,t,t.return)}catch(m){ct(t,t.return,m)}}break;case 1:Er(e,t),ei(t),r&512&&n!==null&&Da(n,n.return);break;case 5:if(Er(e,t),ei(t),r&512&&n!==null&&Da(n,n.return),t.flags&32){var i=t.stateNode;try{Su(i,"")}catch(m){ct(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&QR(i,s),wv(a,o);var c=wv(a,s);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?MR(i,f):u==="dangerouslySetInnerHTML"?NR(i,f):u==="children"?Su(i,f):rb(i,u,f,c)}switch(a){case"input":Ov(i,s);break;case"textarea":AR(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Fa(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?Fa(i,!!s.multiple,s.defaultValue,!0):Fa(i,!!s.multiple,s.multiple?[]:"",!1))}i[Qu]=s}catch(m){ct(t,t.return,m)}}break;case 6:if(Er(e,t),ei(t),r&4){if(t.stateNode===null)throw Error(G(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(m){ct(t,t.return,m)}}break;case 3:if(Er(e,t),ei(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Tu(e.containerInfo)}catch(m){ct(t,t.return,m)}break;case 4:Er(e,t),ei(t);break;case 13:Er(e,t),ei(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(jb=ft())),r&4&&$k(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Xt=(c=Xt)||u,Er(e,t),Xt=c):Er(e,t),ei(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(ce=t,u=t.child;u!==null;){for(f=ce=u;ce!==null;){switch(d=ce,h=d.child,d.tag){case 0:case 11:case 14:case 15:ru(4,d,d.return);break;case 1:Da(d,d.return);var O=d.stateNode;if(typeof O.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,O.props=e.memoizedProps,O.state=e.memoizedState,O.componentWillUnmount()}catch(m){ct(r,n,m)}}break;case 5:Da(d,d.return);break;case 22:if(d.memoizedState!==null){Ak(f);continue}}h!==null?(h.return=d,ce=h):Ak(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=jR("display",o))}catch(m){ct(t,t.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){ct(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Er(e,t),ei(t),r&4&&$k(t);break;case 21:break;default:Er(e,t),ei(t)}}function ei(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(l$(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Su(i,""),r.flags&=-33);var s=_k(t);Kv(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=_k(t);Gv(t,a,o);break;default:throw Error(G(161))}}catch(l){ct(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function OV(t,e,n){ce=t,f$(t)}function f$(t,e,n){for(var r=(t.mode&1)!==0;ce!==null;){var i=ce,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||gd;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Xt;a=gd;var c=Xt;if(gd=o,(Xt=l)&&!c)for(ce=i;ce!==null;)o=ce,l=o.child,o.tag===22&&o.memoizedState!==null?Ik(i):l!==null?(l.return=o,ce=l):Ik(i);for(;s!==null;)ce=s,f$(s),s=s.sibling;ce=i,gd=a,Xt=c}Qk(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ce=s):Qk(t)}}function Qk(t){for(;ce!==null;){var e=ce;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Xt||Em(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Xt)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Ar(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&gk(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}gk(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Tu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Xt||e.flags&512&&Hv(e)}catch(d){ct(e,e.return,d)}}if(e===t){ce=null;break}if(n=e.sibling,n!==null){n.return=e.return,ce=n;break}ce=e.return}}function Ak(t){for(;ce!==null;){var e=ce;if(e===t){ce=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ce=n;break}ce=e.return}}function Ik(t){for(;ce!==null;){var e=ce;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Em(4,e)}catch(l){ct(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){ct(e,i,l)}}var s=e.return;try{Hv(e)}catch(l){ct(e,s,l)}break;case 5:var o=e.return;try{Hv(e)}catch(l){ct(e,o,l)}}}catch(l){ct(e,e.return,l)}if(e===t){ce=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ce=a;break}ce=e.return}}var yV=Math.ceil,fp=rs.ReactCurrentDispatcher,Ib=rs.ReactCurrentOwner,dr=rs.ReactCurrentBatchConfig,Le=0,Et=null,mt=null,jt=0,Nn=0,La=eo(0),wt=0,Du=null,Do=0,Rm=0,Nb=0,iu=null,hn=null,jb=0,ml=1/0,Mi=null,dp=!1,Jv=null,Ns=null,Od=!1,Ps=null,hp=0,su=0,ex=null,Oh=-1,yh=0;function tn(){return Le&6?ft():Oh!==-1?Oh:Oh=ft()}function js(t){return t.mode&1?Le&2&&jt!==0?jt&-jt:tV.transition!==null?(yh===0&&(yh=UR()),yh):(t=Ve,t!==0||(t=window.event,t=t===void 0?16:n_(t.type)),t):1}function Lr(t,e,n,r){if(50<su)throw su=0,ex=null,Error(G(185));Cf(t,n,r),(!(Le&2)||t!==Et)&&(t===Et&&(!(Le&2)&&(Rm|=n),wt===4&&Ss(t,jt)),Sn(t,r),n===1&&Le===0&&!(e.mode&1)&&(ml=ft()+500,Cm&&to()))}function Sn(t,e){var n=t.callbackNode;tB(t,e);var r=Hh(t,t===Et?jt:0);if(r===0)n!==null&&FS(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&FS(n),e===1)t.tag===0?eV(Nk.bind(null,t)):b_(Nk.bind(null,t)),HB(function(){!(Le&6)&&to()}),n=null;else{switch(HR(r)){case 1:n=lb;break;case 4:n=qR;break;case 16:n=Uh;break;case 536870912:n=YR;break;default:n=Uh}n=v$(n,d$.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function d$(t,e){if(Oh=-1,yh=0,Le&6)throw Error(G(327));var n=t.callbackNode;if(Ya()&&t.callbackNode!==n)return null;var r=Hh(t,t===Et?jt:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=pp(t,r);else{e=r;var i=Le;Le|=2;var s=p$();(Et!==t||jt!==e)&&(Mi=null,ml=ft()+500,$o(t,e));do try{bV();break}catch(a){h$(t,a)}while(!0);bb(),fp.current=s,Le=i,mt!==null?e=0:(Et=null,jt=0,e=wt)}if(e!==0){if(e===2&&(i=Tv(t),i!==0&&(r=i,e=tx(t,i))),e===1)throw n=Du,$o(t,0),Ss(t,r),Sn(t,ft()),n;if(e===6)Ss(t,r);else{if(i=t.current.alternate,!(r&30)&&!vV(i)&&(e=pp(t,r),e===2&&(s=Tv(t),s!==0&&(r=s,e=tx(t,s))),e===1))throw n=Du,$o(t,0),Ss(t,r),Sn(t,ft()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(G(345));case 2:yo(t,hn,Mi);break;case 3:if(Ss(t,r),(r&130023424)===r&&(e=jb+500-ft(),10<e)){if(Hh(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){tn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Nv(yo.bind(null,t,hn,Mi),e);break}yo(t,hn,Mi);break;case 4:if(Ss(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Dr(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=ft()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yV(r/1960))-r,10<r){t.timeoutHandle=Nv(yo.bind(null,t,hn,Mi),r);break}yo(t,hn,Mi);break;case 5:yo(t,hn,Mi);break;default:throw Error(G(329))}}}return Sn(t,ft()),t.callbackNode===n?d$.bind(null,t):null}function tx(t,e){var n=iu;return t.current.memoizedState.isDehydrated&&($o(t,e).flags|=256),t=pp(t,e),t!==2&&(e=hn,hn=n,e!==null&&nx(e)),t}function nx(t){hn===null?hn=t:hn.push.apply(hn,t)}function vV(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Br(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ss(t,e){for(e&=~Nb,e&=~Rm,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Dr(e),r=1<<n;t[n]=-1,e&=~r}}function Nk(t){if(Le&6)throw Error(G(327));Ya();var e=Hh(t,0);if(!(e&1))return Sn(t,ft()),null;var n=pp(t,e);if(t.tag!==0&&n===2){var r=Tv(t);r!==0&&(e=r,n=tx(t,r))}if(n===1)throw n=Du,$o(t,0),Ss(t,e),Sn(t,ft()),n;if(n===6)throw Error(G(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,yo(t,hn,Mi),Sn(t,ft()),null}function Mb(t,e){var n=Le;Le|=1;try{return t(e)}finally{Le=n,Le===0&&(ml=ft()+500,Cm&&to())}}function Lo(t){Ps!==null&&Ps.tag===0&&!(Le&6)&&Ya();var e=Le;Le|=1;var n=dr.transition,r=Ve;try{if(dr.transition=null,Ve=1,t)return t()}finally{Ve=r,dr.transition=n,Le=e,!(Le&6)&&to()}}function Db(){Nn=La.current,et(La)}function $o(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,UB(n)),mt!==null)for(n=mt.return;n!==null;){var r=n;switch(yb(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&tp();break;case 3:hl(),et(bn),et(Ut),Tb();break;case 5:Pb(r);break;case 4:hl();break;case 13:et(st);break;case 19:et(st);break;case 10:wb(r.type._context);break;case 22:case 23:Db()}n=n.return}if(Et=t,mt=t=Ms(t.current,null),jt=Nn=e,wt=0,Du=null,Nb=Rm=Do=0,hn=iu=null,Po!==null){for(e=0;e<Po.length;e++)if(n=Po[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Po=null}return t}function h$(t,e){do{var n=mt;try{if(bb(),ph.current=up,cp){for(var r=ot.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}cp=!1}if(Mo=0,Ct=xt=ot=null,nu=!1,Nu=0,Ib.current=null,n===null||n.return===null){wt=1,Du=e,mt=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=jt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=wk(o);if(h!==null){h.flags&=-257,Sk(h,o,a,s,e),h.mode&1&&bk(s,c,e),e=h,l=c;var O=e.updateQueue;if(O===null){var m=new Set;m.add(l),e.updateQueue=m}else O.add(l);break e}else{if(!(e&1)){bk(s,c,e),Lb();break e}l=Error(G(426))}}else if(rt&&a.mode&1){var x=wk(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Sk(x,o,a,s,e),vb(pl(l,a));break e}}s=l=pl(l,a),wt!==4&&(wt=2),iu===null?iu=[s]:iu.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var y=H_(s,l,e);mk(s,y);break e;case 1:a=l;var v=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ns===null||!Ns.has(b)))){s.flags|=65536,e&=-e,s.lanes|=e;var S=G_(s,a,e);mk(s,S);break e}}s=s.return}while(s!==null)}g$(n)}catch(k){e=k,mt===n&&n!==null&&(mt=n=n.return);continue}break}while(!0)}function p$(){var t=fp.current;return fp.current=up,t===null?up:t}function Lb(){(wt===0||wt===3||wt===2)&&(wt=4),Et===null||!(Do&268435455)&&!(Rm&268435455)||Ss(Et,jt)}function pp(t,e){var n=Le;Le|=2;var r=p$();(Et!==t||jt!==e)&&(Mi=null,$o(t,e));do try{xV();break}catch(i){h$(t,i)}while(!0);if(bb(),Le=n,fp.current=r,mt!==null)throw Error(G(261));return Et=null,jt=0,wt}function xV(){for(;mt!==null;)m$(mt)}function bV(){for(;mt!==null&&!Wz();)m$(mt)}function m$(t){var e=y$(t.alternate,t,Nn);t.memoizedProps=t.pendingProps,e===null?g$(t):mt=e,Ib.current=null}function g$(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=pV(n,e),n!==null){n.flags&=32767,mt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{wt=6,mt=null;return}}else if(n=hV(n,e,Nn),n!==null){mt=n;return}if(e=e.sibling,e!==null){mt=e;return}mt=e=t}while(e!==null);wt===0&&(wt=5)}function yo(t,e,n){var r=Ve,i=dr.transition;try{dr.transition=null,Ve=1,wV(t,e,n,r)}finally{dr.transition=i,Ve=r}return null}function wV(t,e,n,r){do Ya();while(Ps!==null);if(Le&6)throw Error(G(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(G(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(nB(t,s),t===Et&&(mt=Et=null,jt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Od||(Od=!0,v$(Uh,function(){return Ya(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=dr.transition,dr.transition=null;var o=Ve;Ve=1;var a=Le;Le|=4,Ib.current=null,gV(t,n),u$(n,t),VB(Av),Gh=!!Qv,Av=Qv=null,t.current=n,OV(n),qz(),Le=a,Ve=o,dr.transition=s}else t.current=n;if(Od&&(Od=!1,Ps=t,hp=i),s=t.pendingLanes,s===0&&(Ns=null),Hz(n.stateNode),Sn(t,ft()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(dp)throw dp=!1,t=Jv,Jv=null,t;return hp&1&&t.tag!==0&&Ya(),s=t.pendingLanes,s&1?t===ex?su++:(su=0,ex=t):su=0,to(),null}function Ya(){if(Ps!==null){var t=HR(hp),e=dr.transition,n=Ve;try{if(dr.transition=null,Ve=16>t?16:t,Ps===null)var r=!1;else{if(t=Ps,Ps=null,hp=0,Le&6)throw Error(G(331));var i=Le;for(Le|=4,ce=t.current;ce!==null;){var s=ce,o=s.child;if(ce.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ce=c;ce!==null;){var u=ce;switch(u.tag){case 0:case 11:case 15:ru(8,u,s)}var f=u.child;if(f!==null)f.return=u,ce=f;else for(;ce!==null;){u=ce;var d=u.sibling,h=u.return;if(a$(u),u===c){ce=null;break}if(d!==null){d.return=h,ce=d;break}ce=h}}}var O=s.alternate;if(O!==null){var m=O.child;if(m!==null){O.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}ce=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ce=o;else e:for(;ce!==null;){if(s=ce,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ru(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,ce=y;break e}ce=s.return}}var v=t.current;for(ce=v;ce!==null;){o=ce;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ce=b;else e:for(o=v;ce!==null;){if(a=ce,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Em(9,a)}}catch(k){ct(a,a.return,k)}if(a===o){ce=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,ce=S;break e}ce=a.return}}if(Le=i,to(),xi&&typeof xi.onPostCommitFiberRoot=="function")try{xi.onPostCommitFiberRoot(xm,t)}catch{}r=!0}return r}finally{Ve=n,dr.transition=e}}return!1}function jk(t,e,n){e=pl(n,e),e=H_(t,e,1),t=Is(t,e,1),e=tn(),t!==null&&(Cf(t,1,e),Sn(t,e))}function ct(t,e,n){if(t.tag===3)jk(t,t,n);else for(;e!==null;){if(e.tag===3){jk(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ns===null||!Ns.has(r))){t=pl(n,t),t=G_(e,t,1),e=Is(e,t,1),t=tn(),e!==null&&(Cf(e,1,t),Sn(e,t));break}}e=e.return}}function SV(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=tn(),t.pingedLanes|=t.suspendedLanes&n,Et===t&&(jt&n)===n&&(wt===4||wt===3&&(jt&130023424)===jt&&500>ft()-jb?$o(t,0):Nb|=n),Sn(t,e)}function O$(t,e){e===0&&(t.mode&1?(e=ad,ad<<=1,!(ad&130023424)&&(ad=4194304)):e=1);var n=tn();t=Yi(t,e),t!==null&&(Cf(t,e,n),Sn(t,n))}function kV(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),O$(t,n)}function CV(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(e),O$(t,n)}var y$;y$=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||bn.current)On=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return On=!1,dV(t,e,n);On=!!(t.flags&131072)}else On=!1,rt&&e.flags&1048576&&w_(e,ip,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;gh(t,e),t=e.pendingProps;var i=ul(e,Ut.current);qa(e,n),i=Rb(null,e,r,t,i,n);var s=_b();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,wn(r)?(s=!0,np(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kb(e),i.updater=Tm,e.stateNode=i,i._reactInternals=e,Vv(e,r,t,n),e=Zv(null,e,r,!0,s,n)):(e.tag=0,rt&&s&&Ob(e),Kt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(gh(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=TV(r),t=Ar(r,t),i){case 0:e=Xv(null,e,r,t,n);break e;case 1:e=Pk(null,e,r,t,n);break e;case 11:e=kk(null,e,r,t,n);break e;case 14:e=Ck(null,e,r,Ar(r.type,t),n);break e}throw Error(G(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ar(r,i),Xv(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ar(r,i),Pk(t,e,r,i,n);case 3:e:{if(t$(e),t===null)throw Error(G(387));r=e.pendingProps,s=e.memoizedState,i=s.element,E_(t,e),ap(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=pl(Error(G(423)),e),e=Tk(t,e,r,n,i);break e}else if(r!==i){i=pl(Error(G(424)),e),e=Tk(t,e,r,n,i);break e}else for(zn=As(e.stateNode.containerInfo.firstChild),Zn=e,rt=!0,Nr=null,n=P_(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fl(),r===i){e=Ui(t,e,n);break e}Kt(t,e,r,n)}e=e.child}return e;case 5:return R_(e),t===null&&Lv(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Iv(r,i)?o=null:s!==null&&Iv(r,s)&&(e.flags|=32),e$(t,e),Kt(t,e,o,n),e.child;case 6:return t===null&&Lv(e),null;case 13:return n$(t,e,n);case 4:return Cb(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=dl(e,null,r,n):Kt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ar(r,i),kk(t,e,r,i,n);case 7:return Kt(t,e,e.pendingProps,n),e.child;case 8:return Kt(t,e,e.pendingProps.children,n),e.child;case 12:return Kt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ge(sp,r._currentValue),r._currentValue=o,s!==null)if(Br(s.value,o)){if(s.children===i.children&&!bn.current){e=Ui(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Fi(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),zv(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(G(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),zv(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Kt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,qa(e,n),i=mr(i),r=r(i),e.flags|=1,Kt(t,e,r,n),e.child;case 14:return r=e.type,i=Ar(r,e.pendingProps),i=Ar(r.type,i),Ck(t,e,r,i,n);case 15:return K_(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ar(r,i),gh(t,e),e.tag=1,wn(r)?(t=!0,np(e)):t=!1,qa(e,n),U_(e,r,i),Vv(e,r,i,n),Zv(null,e,r,!0,t,n);case 19:return r$(t,e,n);case 22:return J_(t,e,n)}throw Error(G(156,e.tag))};function v$(t,e){return WR(t,e)}function PV(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 ar(t,e,n,r){return new PV(t,e,n,r)}function zb(t){return t=t.prototype,!(!t||!t.isReactComponent)}function TV(t){if(typeof t=="function")return zb(t)?1:0;if(t!=null){if(t=t.$$typeof,t===sb)return 11;if(t===ob)return 14}return 2}function Ms(t,e){var n=t.alternate;return n===null?(n=ar(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function vh(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")zb(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ra:return Qo(n.children,i,s,e);case ib:o=8,i|=8;break;case dv:return t=ar(12,n,e,i|2),t.elementType=dv,t.lanes=s,t;case hv:return t=ar(13,n,e,i),t.elementType=hv,t.lanes=s,t;case pv:return t=ar(19,n,e,i),t.elementType=pv,t.lanes=s,t;case RR:return _m(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case TR:o=10;break e;case ER:o=9;break e;case sb:o=11;break e;case ob:o=14;break e;case ys:o=16,r=null;break e}throw Error(G(130,t==null?t:typeof t,""))}return e=ar(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Qo(t,e,n,r){return t=ar(7,t,r,e),t.lanes=n,t}function _m(t,e,n,r){return t=ar(22,t,r,e),t.elementType=RR,t.lanes=n,t.stateNode={isHidden:!1},t}function gO(t,e,n){return t=ar(6,t,null,e),t.lanes=n,t}function OO(t,e,n){return e=ar(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function EV(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gg(0),this.expirationTimes=Gg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bb(t,e,n,r,i,s,o,a,l){return t=new EV(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ar(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kb(s),t}function RV(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ea,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function x$(t){if(!t)return Bs;t=t._reactInternals;e:{if(ia(t)!==t||t.tag!==1)throw Error(G(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(wn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(G(171))}if(t.tag===1){var n=t.type;if(wn(n))return x_(t,n,e)}return e}function b$(t,e,n,r,i,s,o,a,l){return t=Bb(n,r,!0,t,i,s,o,a,l),t.context=x$(null),n=t.current,r=tn(),i=js(n),s=Fi(r,i),s.callback=e??null,Is(n,s,i),t.current.lanes=i,Cf(t,i,r),Sn(t,r),t}function $m(t,e,n,r){var i=e.current,s=tn(),o=js(i);return n=x$(n),e.context===null?e.context=n:e.pendingContext=n,e=Fi(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Is(i,e,o),t!==null&&(Lr(t,i,o,s),hh(t,i,o)),o}function mp(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Mk(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Vb(t,e){Mk(t,e),(t=t.alternate)&&Mk(t,e)}function _V(){return null}var w$=typeof reportError=="function"?reportError:function(t){console.error(t)};function Fb(t){this._internalRoot=t}Qm.prototype.render=Fb.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(G(409));$m(t,e,null,null)};Qm.prototype.unmount=Fb.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Lo(function(){$m(null,t,null,null)}),e[qi]=null}};function Qm(t){this._internalRoot=t}Qm.prototype.unstable_scheduleHydration=function(t){if(t){var e=JR();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ws.length&&e!==0&&e<ws[n].priority;n++);ws.splice(n,0,t),n===0&&t_(t)}};function Xb(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Am(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Dk(){}function $V(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=mp(o);s.call(c)}}var o=b$(e,r,t,0,null,!1,!1,"",Dk);return t._reactRootContainer=o,t[qi]=o.current,_u(t.nodeType===8?t.parentNode:t),Lo(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=mp(l);a.call(c)}}var l=Bb(t,0,!1,null,null,!1,!1,"",Dk);return t._reactRootContainer=l,t[qi]=l.current,_u(t.nodeType===8?t.parentNode:t),Lo(function(){$m(e,l,n,r)}),l}function Im(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=mp(o);a.call(l)}}$m(e,o,t,i)}else o=$V(n,e,t,i,r);return mp(o)}GR=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Bc(e.pendingLanes);n!==0&&(cb(e,n|1),Sn(e,ft()),!(Le&6)&&(ml=ft()+500,to()))}break;case 13:Lo(function(){var r=Yi(t,1);if(r!==null){var i=tn();Lr(r,t,1,i)}}),Vb(t,1)}};ub=function(t){if(t.tag===13){var e=Yi(t,134217728);if(e!==null){var n=tn();Lr(e,t,134217728,n)}Vb(t,134217728)}};KR=function(t){if(t.tag===13){var e=js(t),n=Yi(t,e);if(n!==null){var r=tn();Lr(n,t,e,r)}Vb(t,e)}};JR=function(){return Ve};e_=function(t,e){var n=Ve;try{return Ve=t,e()}finally{Ve=n}};kv=function(t,e,n){switch(e){case"input":if(Ov(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=km(r);if(!i)throw Error(G(90));$R(r),Ov(r,i)}}}break;case"textarea":AR(t,n);break;case"select":e=n.value,e!=null&&Fa(t,!!n.multiple,e,!1)}};zR=Mb;BR=Lo;var QV={usingClientEntryPoint:!1,Events:[Tf,Aa,km,DR,LR,Mb]},bc={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AV={bundleType:bc.bundleType,version:bc.version,rendererPackageName:bc.rendererPackageName,rendererConfig:bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:rs.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=XR(t),t===null?null:t.stateNode},findFiberByHostInstance:bc.findFiberByHostInstance||_V,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{xm=yd.inject(AV),xi=yd}catch{}}Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QV;Hn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xb(e))throw Error(G(200));return RV(t,e,null,n)};Hn.createRoot=function(t,e){if(!Xb(t))throw Error(G(299));var n=!1,r="",i=w$;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Bb(t,1,!1,null,null,n,!1,r,i),t[qi]=e.current,_u(t.nodeType===8?t.parentNode:t),new Fb(e)};Hn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(G(188)):(t=Object.keys(t).join(","),Error(G(268,t)));return t=XR(e),t=t===null?null:t.stateNode,t};Hn.flushSync=function(t){return Lo(t)};Hn.hydrate=function(t,e,n){if(!Am(e))throw Error(G(200));return Im(null,t,e,!0,n)};Hn.hydrateRoot=function(t,e,n){if(!Xb(t))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=w$;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=b$(e,null,t,1,n??null,i,!1,s,o),t[qi]=e.current,_u(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Qm(e)};Hn.render=function(t,e,n){if(!Am(e))throw Error(G(200));return Im(null,t,e,!1,n)};Hn.unmountComponentAtNode=function(t){if(!Am(t))throw Error(G(40));return t._reactRootContainer?(Lo(function(){Im(null,null,t,!1,function(){t._reactRootContainer=null,t[qi]=null})}),!0):!1};Hn.unstable_batchedUpdates=Mb;Hn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Am(n))throw Error(G(200));if(t==null||t._reactInternals===void 0)throw Error(G(38));return Im(t,e,n,!1,r)};Hn.version="18.3.1-next-f1338f8080-20240426";function S$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S$)}catch(t){console.error(t)}}S$(),SR.exports=Hn;var Xl=SR.exports;const k$=zl(Xl);var Lk=Xl;uv.createRoot=Lk.createRoot,uv.hydrateRoot=Lk.hydrateRoot;/**
|
|
42
|
+
* react-router v7.13.0
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/var zk="popstate";function IV(t={}){function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return rx("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Lu(i)}return jV(e,n,null,t)}function at(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Vr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function NV(){return Math.random().toString(36).substring(2,10)}function Bk(t,e){return{usr:t.state,key:t.key,idx:e}}function rx(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Zl(e):e,state:n,key:e&&e.key||r||NV()}}function Lu({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zl(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function jV(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function f(){a="POP";let x=u(),y=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:y})}function d(x,y){a="PUSH";let v=rx(m.location,x,y);c=u()+1;let b=Bk(v,c),S=m.createHref(v);try{o.pushState(b,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(x,y){a="REPLACE";let v=rx(m.location,x,y);c=u();let b=Bk(v,c),S=m.createHref(v);o.replaceState(b,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function O(x){return MV(x)}let m={get action(){return a},get location(){return t(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(zk,f),l=x,()=>{i.removeEventListener(zk,f),l=null}},createHref(x){return e(i,x)},createURL:O,encodeLocation(x){let y=O(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(x){return o.go(x)}};return m}function MV(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),at(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Lu(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function C$(t,e,n="/"){return DV(t,e,n,!1)}function DV(t,e,n,r){let i=typeof e=="string"?Zl(e):e,s=Hi(i.pathname||"/",n);if(s==null)return null;let o=P$(t);LV(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=HV(s);a=YV(o[l],c,r)}return a}function P$(t,e=[],n=[],r="",i=!1){let s=(o,a,l=i,c)=>{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&l)return;at(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Xi([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(at(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),P$(o.children,e,d,f,l)),!(o.path==null&&!o.index)&&e.push({path:f,score:WV(f,o.index),routesMeta:d})};return t.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of T$(o.path))s(o,a,!0,c)}),e}function T$(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=T$(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function LV(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:qV(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var zV=/^:[\w-]+$/,BV=3,VV=2,FV=1,XV=10,ZV=-2,Vk=t=>t==="*";function WV(t,e){let n=t.split("/"),r=n.length;return n.some(Vk)&&(r+=ZV),e&&(r+=VV),n.filter(i=>!Vk(i)).reduce((i,s)=>i+(zV.test(s)?BV:s===""?FV:XV),r)}function qV(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function YV(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",f=gp({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),d=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=gp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:Xi([s,f.pathname]),pathnameBase:eF(Xi([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=Xi([s,f.pathnameBase]))}return o}function gp(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=UV(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},d)=>{if(u==="*"){let O=a[d]||"";o=s.slice(0,s.length-O.length).replace(/(.)\/+$/,"$1")}const h=a[d];return f&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function UV(t,e=!1,n=!0){Vr(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function HV(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Vr(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Hi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var GV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function KV(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Zl(t):t,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Fk(n.substring(1),"/"):s=Fk(n,e)):s=e,{pathname:s,search:tF(r),hash:nF(i)}}function Fk(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function yO(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function JV(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function E$(t){let e=JV(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function R$(t,e,n,r=!1){let i;typeof t=="string"?i=Zl(t):(i={...t},at(!i.pathname||!i.pathname.includes("?"),yO("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),yO("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),yO("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?e[f]:"/"}let l=KV(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var Xi=t=>t.join("/").replace(/\/\/+/g,"/"),eF=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tF=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nF=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,rF=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function iF(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function sF(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $$(t,e){let n=t;if(typeof n!="string"||!GV.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(_$)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=Hi(o.pathname,e);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{Vr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Q$=["POST","PUT","PATCH","DELETE"];new Set(Q$);var oF=["GET",...Q$];new Set(oF);var Wl=g.createContext(null);Wl.displayName="DataRouter";var Nm=g.createContext(null);Nm.displayName="DataRouterState";var aF=g.createContext(!1),A$=g.createContext({isTransitioning:!1});A$.displayName="ViewTransition";var lF=g.createContext(new Map);lF.displayName="Fetchers";var cF=g.createContext(null);cF.displayName="Await";var vr=g.createContext(null);vr.displayName="Navigation";var Rf=g.createContext(null);Rf.displayName="Location";var Ci=g.createContext({outlet:null,matches:[],isDataRoute:!1});Ci.displayName="Route";var Zb=g.createContext(null);Zb.displayName="RouteError";var I$="REACT_ROUTER_ERROR",uF="REDIRECT",fF="ROUTE_ERROR_RESPONSE";function dF(t){if(t.startsWith(`${I$}:${uF}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function hF(t){if(t.startsWith(`${I$}:${fF}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new rF(e.status,e.statusText,e.data)}catch{}}function pF(t,{relative:e}={}){at(_f(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=g.useContext(vr),{hash:i,pathname:s,search:o}=$f(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:Xi([n,s])),r.createHref({pathname:a,search:o,hash:i})}function _f(){return g.useContext(Rf)!=null}function no(){return at(_f(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Rf).location}var N$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j$(t){g.useContext(vr).static||g.useLayoutEffect(t)}function ql(){let{isDataRoute:t}=g.useContext(Ci);return t?EF():mF()}function mF(){at(_f(),"useNavigate() may be used only in the context of a <Router> component.");let t=g.useContext(Wl),{basename:e,navigator:n}=g.useContext(vr),{matches:r}=g.useContext(Ci),{pathname:i}=no(),s=JSON.stringify(E$(r)),o=g.useRef(!1);return j$(()=>{o.current=!0}),g.useCallback((l,c={})=>{if(Vr(o.current,N$),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=R$(l,JSON.parse(s),i,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:Xi([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,s,i,t])}g.createContext(null);function gF(){let{matches:t}=g.useContext(Ci),e=t[t.length-1];return e?e.params:{}}function $f(t,{relative:e}={}){let{matches:n}=g.useContext(Ci),{pathname:r}=no(),i=JSON.stringify(E$(n));return g.useMemo(()=>R$(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function OF(t,e){return M$(t,e)}function M$(t,e,n,r,i){var v;at(_f(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=g.useContext(vr),{matches:o}=g.useContext(Ci),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",f=a&&a.route;{let b=f&&f.path||"";L$(c,!f||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
+
|
|
52
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=no(),h;if(e){let b=typeof e=="string"?Zl(e):e;at(u==="/"||((v=b.pathname)==null?void 0:v.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),h=b}else h=d;let O=h.pathname||"/",m=O;if(u!=="/"){let b=u.replace(/^\//,"").split("/");m="/"+O.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=C$(t,{pathname:m});Vr(f||x!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Vr(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=wF(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Xi([u,s.encodeLocation?s.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Xi([u,s.encodeLocation?s.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,n,r,i);return e&&y?g.createElement(Rf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},y):y}function yF(){let t=TF(),e=iF(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:s},"ErrorBoundary")," or"," ",g.createElement("code",{style:s},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},e),n?g.createElement("pre",{style:i},n):null,o)}var vF=g.createElement(yF,null),D$=class extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=hF(t.digest);n&&(t=n)}let e=t!==void 0?g.createElement(Ci.Provider,{value:this.props.routeContext},g.createElement(Zb.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?g.createElement(xF,{error:t},e):e}};D$.contextType=aF;var vO=new WeakMap;function xF({children:t,error:e}){let{basename:n}=g.useContext(vr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=dF(e.digest);if(r){let i=vO.get(e);if(i)throw i;let s=$$(r.location,n);if(_$&&!vO.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw vO.set(e,o),o}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function bF({routeContext:t,match:e,children:n}){let r=g.useContext(Wl);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),g.createElement(Ci.Provider,{value:t},n)}function wF(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n==null?void 0:n.errors;if(o!=null){let u=s.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);at(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let a=!1,l=-1;if(n)for(let u=0;u<s.length;u++){let f=s[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=u),f.route.id){let{loaderData:d,errors:h}=n,O=f.route.loader&&!d.hasOwnProperty(f.route.id)&&(!h||h[f.route.id]===void 0);if(f.route.lazy||O){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(u,f)=>{var d,h;r(u,{location:n.location,params:((h=(d=n.matches)==null?void 0:d[0])==null?void 0:h.params)??{},unstable_pattern:sF(n.matches),errorInfo:f})}:void 0;return s.reduceRight((u,f,d)=>{let h,O=!1,m=null,x=null;n&&(h=o&&f.route.id?o[f.route.id]:void 0,m=f.route.errorElement||vF,a&&(l<0&&d===0?(L$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,x=null):l===d&&(O=!0,x=f.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,d+1)),v=()=>{let b;return h?b=m:O?b=x:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,g.createElement(bF,{match:f,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?g.createElement(D$,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):v()},null)}function Wb(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SF(t){let e=g.useContext(Wl);return at(e,Wb(t)),e}function kF(t){let e=g.useContext(Nm);return at(e,Wb(t)),e}function CF(t){let e=g.useContext(Ci);return at(e,Wb(t)),e}function qb(t){let e=CF(t),n=e.matches[e.matches.length-1];return at(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function PF(){return qb("useRouteId")}function TF(){var r;let t=g.useContext(Zb),e=kF("useRouteError"),n=qb("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function EF(){let{router:t}=SF("useNavigate"),e=qb("useNavigate"),n=g.useRef(!1);return j$(()=>{n.current=!0}),g.useCallback(async(i,s={})=>{Vr(n.current,N$),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Xk={};function L$(t,e,n){!e&&!Xk[t]&&(Xk[t]=!0,Vr(!1,n))}g.memo(RF);function RF({routes:t,future:e,state:n,onError:r}){return M$(t,void 0,n,r,e)}function ix(t){at(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _F({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){at(!_f(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=Zl(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:h="default"}=n,O=g.useMemo(()=>{let m=Hi(c,a);return m==null?null:{location:{pathname:m,search:u,hash:f,state:d,key:h},navigationType:r}},[a,c,u,f,d,h,r]);return Vr(O!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:g.createElement(vr.Provider,{value:l},g.createElement(Rf.Provider,{children:e,value:O}))}function $F({children:t,location:e}){return OF(sx(t),e)}function sx(t,e=[]){let n=[];return g.Children.forEach(t,(r,i)=>{if(!g.isValidElement(r))return;let s=[...e,i];if(r.type===g.Fragment){n.push.apply(n,sx(r.props.children,s));return}at(r.type===ix,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=sx(r.props.children,s)),n.push(o)}),n}var xh="get",bh="application/x-www-form-urlencoded";function jm(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function QF(t){return jm(t)&&t.tagName.toLowerCase()==="button"}function AF(t){return jm(t)&&t.tagName.toLowerCase()==="form"}function IF(t){return jm(t)&&t.tagName.toLowerCase()==="input"}function NF(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function jF(t,e){return t.button===0&&(!e||e==="_self")&&!NF(t)}function ox(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function MF(t,e){let n=ox(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var vd=null;function DF(){if(vd===null)try{new FormData(document.createElement("form"),0),vd=!1}catch{vd=!0}return vd}var LF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xO(t){return t!=null&&!LF.has(t)?(Vr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bh}"`),null):t}function zF(t,e){let n,r,i,s,o;if(AF(t)){let a=t.getAttribute("action");r=a?Hi(a,e):null,n=t.getAttribute("method")||xh,i=xO(t.getAttribute("enctype"))||bh,s=new FormData(t)}else if(QF(t)||IF(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?Hi(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||xh,i=xO(t.getAttribute("formenctype"))||xO(a.getAttribute("enctype"))||bh,s=new FormData(a,t),!DF()){let{name:c,type:u,value:f}=t;if(u==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,f)}}else{if(jm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=xh,r=null,i=bh,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yb(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function BF(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&Hi(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function VF(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FF(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function XF(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await VF(s,n);return o.links?o.links():[]}return[]}));return YF(r.flat(1).filter(FF).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Zk(t,e,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{var f;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function ZF(t,e,{includeHydrateFallback:n}={}){return WF(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function WF(t){return[...new Set(t)]}function qF(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function YF(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(qF(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function z$(){let t=g.useContext(Wl);return Yb(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function UF(){let t=g.useContext(Nm);return Yb(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Ub=g.createContext(void 0);Ub.displayName="FrameworkContext";function B$(){let t=g.useContext(Ub);return Yb(t,"You must render this element inside a <HydratedRouter> element"),t}function HF(t,e){let n=g.useContext(Ub),[r,i]=g.useState(!1),[s,o]=g.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=e,d=g.useRef(null);g.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let m=y=>{y.forEach(v=>{o(v.isIntersecting)})},x=new IntersectionObserver(m,{threshold:.5});return d.current&&x.observe(d.current),()=>{x.disconnect()}}},[t]),g.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},O=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,d,{}]:[s,d,{onFocus:wc(a,h),onBlur:wc(l,O),onMouseEnter:wc(c,h),onMouseLeave:wc(u,O),onTouchStart:wc(f,h)}]:[!1,d,{}]}function wc(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function GF({page:t,...e}){let{router:n}=z$(),r=g.useMemo(()=>C$(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?g.createElement(JF,{page:t,matches:r,...e}):null}function KF(t){let{manifest:e,routeModules:n}=B$(),[r,i]=g.useState([]);return g.useEffect(()=>{let s=!1;return XF(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function JF({page:t,matches:e,...n}){let r=no(),{future:i,manifest:s,routeModules:o}=B$(),{basename:a}=z$(),{loaderData:l,matches:c}=UF(),u=g.useMemo(()=>Zk(t,e,c,s,r,"data"),[t,e,c,s,r]),f=g.useMemo(()=>Zk(t,e,c,s,r,"assets"),[t,e,c,s,r]),d=g.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let m=new Set,x=!1;if(e.forEach(v=>{var S;let b=s.routes[v.route.id];!b||!b.hasLoader||(!u.some(k=>k.route.id===v.route.id)&&v.route.id in l&&((S=o[v.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?x=!0:m.add(v.route.id))}),m.size===0)return[];let y=BF(t,a,i.unstable_trailingSlashAwareDataRequests,"data");return x&&m.size>0&&y.searchParams.set("_routes",e.filter(v=>m.has(v.route.id)).map(v=>v.route.id).join(",")),[y.pathname+y.search]},[a,i.unstable_trailingSlashAwareDataRequests,l,r,s,u,e,t,o]),h=g.useMemo(()=>ZF(f,s),[f,s]),O=KF(f);return g.createElement(g.Fragment,null,d.map(m=>g.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),h.map(m=>g.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),O.map(({key:m,link:x})=>g.createElement("link",{key:m,nonce:n.nonce,...x,crossOrigin:x.crossOrigin??n.crossOrigin})))}function eX(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var tX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{tX&&(window.__reactRouterVersion="7.13.0")}catch{}function nX({basename:t,children:e,unstable_useTransitions:n,window:r}){let i=g.useRef();i.current==null&&(i.current=IV({window:r,v5Compat:!0}));let s=i.current,[o,a]=g.useState({action:s.action,location:s.location}),l=g.useCallback(c=>{n===!1?a(c):g.startTransition(()=>a(c))},[n]);return g.useLayoutEffect(()=>s.listen(l),[s,l]),g.createElement(_F,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var V$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F$=g.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d,...h},O){let{basename:m,unstable_useTransitions:x}=g.useContext(vr),y=typeof c=="string"&&V$.test(c),v=$$(c,m);c=v.to;let b=pF(c,{relative:i}),[S,k,w]=HF(r,h),C=oX(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:x});function _(E){e&&e(E),E.defaultPrevented||C(E)}let I=g.createElement("a",{...h,...w,href:v.absoluteURL||b,onClick:v.isExternal||s?e:_,ref:eX(O,k),target:l,"data-discover":!y&&n==="render"?"true":void 0});return S&&!y?g.createElement(g.Fragment,null,I,g.createElement(GF,{page:b})):I});F$.displayName="Link";var rX=g.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let f=$f(o,{relative:c.relative}),d=no(),h=g.useContext(Nm),{navigator:O,basename:m}=g.useContext(vr),x=h!=null&&dX(f)&&a===!0,y=O.encodeLocation?O.encodeLocation(f).pathname:f.pathname,v=d.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(v=v.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=Hi(b,m)||b);const S=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let k=v===y||!i&&v.startsWith(y)&&v.charAt(S)==="/",w=b!=null&&(b===y||!i&&b.startsWith(y)&&b.charAt(y.length)==="/"),C={isActive:k,isPending:w,isTransitioning:x},_=k?e:void 0,I;typeof r=="function"?I=r(C):I=[r,k?"active":null,w?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(C):s;return g.createElement(F$,{...c,"aria-current":_,className:I,ref:u,style:E,to:o,viewTransition:a},typeof l=="function"?l(C):l)});rX.displayName="NavLink";var iX=g.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=xh,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d,...h},O)=>{let{unstable_useTransitions:m}=g.useContext(vr),x=uX(),y=fX(a,{relative:c}),v=o.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&V$.test(a),S=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let w=k.nativeEvent.submitter,C=(w==null?void 0:w.getAttribute("formmethod"))||o,_=()=>x(w||k.currentTarget,{fetcherKey:e,method:C,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d});m&&n!==!1?g.startTransition(()=>_()):_()};return g.createElement("form",{ref:O,method:v,action:y,onSubmit:r?l:S,...h,"data-discover":!b&&t==="render"?"true":void 0})});iX.displayName="Form";function sX(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function X$(t){let e=g.useContext(Wl);return at(e,sX(t)),e}function oX(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=ql(),u=no(),f=$f(t,{relative:s});return g.useCallback(d=>{if(jF(d,e)){d.preventDefault();let h=n!==void 0?n:Lu(u)===Lu(f),O=()=>c(t,{replace:h,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?g.startTransition(()=>O()):O()}},[u,c,f,n,r,e,t,i,s,o,a,l])}function aX(t){Vr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=g.useRef(ox(t)),n=g.useRef(!1),r=no(),i=g.useMemo(()=>MF(r.search,n.current?null:e.current),[r.search]),s=ql(),o=g.useCallback((a,l)=>{const c=ox(typeof a=="function"?a(new URLSearchParams(i)):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}var lX=0,cX=()=>`__${String(++lX)}__`;function uX(){let{router:t}=X$("useSubmit"),{basename:e}=g.useContext(vr),n=PF(),r=t.fetch,i=t.navigate;return g.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:u,body:f}=zF(s,e);if(o.navigate===!1){let d=o.fetcherKey||cX();await r(d,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:f,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:f,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function fX(t,{relative:e}={}){let{basename:n}=g.useContext(vr),r=g.useContext(Ci);at(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...$f(t||".",{relative:e})},o=no();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let u=a.toString();s.search=u?`?${u}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Xi([n,s.pathname])),Lu(s)}function dX(t,{relative:e}={}){let n=g.useContext(A$);at(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=X$("useViewTransitionState"),i=$f(t,{relative:e});if(!n.isTransitioning)return!1;let s=Hi(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Hi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gp(i.pathname,o)!=null||gp(i.pathname,s)!=null}const hX={},Wk=t=>{let e;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const h=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(O=>O(e,h))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(hX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},pX=t=>t?Wk(t):Wk;var Z$={exports:{}},W$={},q$={exports:{}},Y$={};/**
|
|
53
|
+
* @license React
|
|
54
|
+
* use-sync-external-store-shim.production.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var gl=g;function mX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gX=typeof Object.is=="function"?Object.is:mX,OX=gl.useState,yX=gl.useEffect,vX=gl.useLayoutEffect,xX=gl.useDebugValue;function bX(t,e){var n=e(),r=OX({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return vX(function(){i.value=n,i.getSnapshot=e,bO(i)&&s({inst:i})},[t,n,e]),yX(function(){return bO(i)&&s({inst:i}),t(function(){bO(i)&&s({inst:i})})},[t]),xX(n),n}function bO(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!gX(t,n)}catch{return!0}}function wX(t,e){return e()}var SX=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wX:bX;Y$.useSyncExternalStore=gl.useSyncExternalStore!==void 0?gl.useSyncExternalStore:SX;q$.exports=Y$;var U$=q$.exports;/**
|
|
61
|
+
* @license React
|
|
62
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/var Mm=g,kX=U$;function CX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var PX=typeof Object.is=="function"?Object.is:CX,TX=kX.useSyncExternalStore,EX=Mm.useRef,RX=Mm.useEffect,_X=Mm.useMemo,$X=Mm.useDebugValue;W$.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=EX(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=_X(function(){function l(h){if(!c){if(c=!0,u=h,h=r(h),i!==void 0&&o.hasValue){var O=o.value;if(i(O,h))return f=O}return f=h}if(O=f,PX(u,h))return O;var m=r(h);return i!==void 0&&i(O,m)?(u=h,O):(u=h,f=m)}var c=!1,u,f,d=n===void 0?null:n;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,n,r,i]);var a=TX(t,s[0],s[1]);return RX(function(){o.hasValue=!0,o.value=a},[a]),$X(a),a};Z$.exports=W$;var QX=Z$.exports;const AX=zl(QX),H$={},{useDebugValue:IX}=ee,{useSyncExternalStoreWithSelector:NX}=AX;let qk=!1;const jX=t=>t;function MX(t,e=jX,n){(H$?"production":void 0)!=="production"&&n&&!qk&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),qk=!0);const r=NX(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return IX(r),r}const Yk=t=>{(H$?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?pX(t):t,n=(r,i)=>MX(e,r,i);return Object.assign(n,e),n},sa=t=>t?Yk(t):Yk,DX={};function LX(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const zu=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return zu(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return zu(r)(n)}}}},zX=(t,e)=>(n,r,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,y)=>({...y,...x}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return t((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...x)},r,i);const u=zu(s.serialize),f=()=>{const x=s.partialize({...r()});let y;const v=u({state:x,version:s.version}).then(b=>c.setItem(s.name,b)).catch(b=>{y=b});if(y)throw y;return v},d=i.setState;i.setState=(x,y)=>{d(x,y),f()};const h=t((...x)=>{n(...x),f()},r,i);let O;const m=()=>{var x;if(!c)return;o=!1,a.forEach(v=>v(r()));const y=((x=s.onRehydrateStorage)==null?void 0:x.call(s,r()))||void 0;return zu(c.getItem.bind(c))(s.name).then(v=>{if(v)return s.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var b;return O=s.merge(v,(b=r())!=null?b:h),n(O,!0),f()}).then(()=>{y==null||y(O,void 0),o=!0,l.forEach(v=>v(O))}).catch(v=>{y==null||y(void 0,v)})};return i.persist={setOptions:x=>{s={...s,...x},x.getStorage&&(c=x.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(l.add(x),()=>{l.delete(x)})},m(),O||h},BX=(t,e)=>(n,r,i)=>{let s={storage:LX(()=>localStorage),partialize:m=>m,version:0,merge:(m,x)=>({...x,...m}),...e},o=!1;const a=new Set,l=new Set;let c=s.storage;if(!c)return t((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,i);const u=()=>{const m=s.partialize({...r()});return c.setItem(s.name,{state:m,version:s.version})},f=i.setState;i.setState=(m,x)=>{f(m,x),u()};const d=t((...m)=>{n(...m),u()},r,i);i.getInitialState=()=>d;let h;const O=()=>{var m,x;if(!c)return;o=!1,a.forEach(v=>{var b;return v((b=r())!=null?b:d)});const y=((x=s.onRehydrateStorage)==null?void 0:x.call(s,(m=r())!=null?m:d))||void 0;return zu(c.getItem.bind(c))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return[!0,s.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var b;const[S,k]=v;if(h=s.merge(k,(b=r())!=null?b:d),n(h,!0),S)return u()}).then(()=>{y==null||y(h,void 0),h=r(),o=!0,l.forEach(v=>v(h))}).catch(v=>{y==null||y(void 0,v)})};return i.persist={setOptions:m=>{s={...s,...m},m.storage&&(c=m.storage)},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>O(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||O(),h||d},VX=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((DX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),zX(t,e)):BX(t,e),G$=VX,Dm=sa()(G$(t=>({voyageApiKey:null,localaiApiKey:null,ollamaBaseUrl:null,s3AccessKeyId:null,s3SecretAccessKey:null,s3SessionToken:null,s3Region:null,s3Endpoint:null,setVoyageApiKey:e=>t({voyageApiKey:e}),setLocalaiApiKey:e=>t({localaiApiKey:e}),setOllamaBaseUrl:e=>t({ollamaBaseUrl:e}),setS3AccessKeyId:e=>t({s3AccessKeyId:e}),setS3SecretAccessKey:e=>t({s3SecretAccessKey:e}),setS3SessionToken:e=>t({s3SessionToken:e}),setS3Region:e=>t({s3Region:e}),setS3Endpoint:e=>t({s3Endpoint:e}),clearSecrets:()=>t({voyageApiKey:null,localaiApiKey:null,ollamaBaseUrl:null,s3AccessKeyId:null,s3SecretAccessKey:null,s3SessionToken:null,s3Region:null,s3Endpoint:null})}),{name:"rag-secrets"}));function FX(){const t=Dm.getState();if(t.voyageApiKey!==null||t.localaiApiKey!==null||t.ollamaBaseUrl!==null)return t;try{const e=localStorage.getItem("rag-secrets");if(e)return JSON.parse(e).state||t}catch{}return t}function Ao(){const t=FX(),e={};return t.voyageApiKey&&(e["x-voyage-api-key"]=t.voyageApiKey),t.localaiApiKey&&(e["x-localai-api-key"]=t.localaiApiKey),t.ollamaBaseUrl&&(e["x-ollama-base-url"]=t.ollamaBaseUrl),t.s3AccessKeyId&&(e["x-s3-access-key-id"]=t.s3AccessKeyId),t.s3SecretAccessKey&&(e["x-s3-secret-access-key"]=t.s3SecretAccessKey),t.s3SessionToken&&(e["x-s3-session-token"]=t.s3SessionToken),t.s3Region&&(e["x-s3-region"]=t.s3Region),t.s3Endpoint&&(e["x-s3-endpoint"]=t.s3Endpoint),e}async function wO(t,e){const n=await fetch(t,{...e,headers:{"Content-Type":"application/json",...Ao(),...e==null?void 0:e.headers}});if(!n.ok){const r=await n.json().catch(()=>({message:"Request failed"}));throw new Error(r.message||`HTTP ${n.status}`)}return n.json()}const oa=sa()(G$((t,e)=>({currentProject:null,isLoading:!1,isClosing:!1,error:null,recentProjects:[],fetchCurrentProject:async()=>{t({isLoading:!0,error:null});try{const n=await wO("/api/project/current");t({currentProject:n,isLoading:!1}),n&&e().addRecentProject({path:n.path,name:n.name,lastOpened:n.openedAt})}catch(n){t({isLoading:!1,error:n instanceof Error?n.message:"Failed to fetch project"})}},openProject:async n=>{t({isLoading:!0,error:null});try{const r=await wO("/api/project/open",{method:"POST",body:JSON.stringify({path:n})});t({currentProject:r,isLoading:!1}),e().addRecentProject({path:r.path,name:r.name,lastOpened:r.openedAt})}catch(r){throw t({isLoading:!1,error:r instanceof Error?r.message:"Failed to open project"}),r}},closeProject:async()=>{t({isClosing:!0,error:null,currentProject:null});try{await wO("/api/project/close",{method:"POST"})}catch{}finally{t({isClosing:!1})}return!0},clearError:()=>{t({error:null})},addRecentProject:n=>{t(r=>{const i=r.recentProjects.filter(s=>s.path!==n.path);return{recentProjects:[n,...i].slice(0,10)}})},removeRecentProject:n=>{t(r=>({recentProjects:r.recentProjects.filter(i=>i.path!==n)}))},clearRecentProjects:()=>{t({recentProjects:[]})}}),{name:"rag-project",partialize:t=>({recentProjects:t.recentProjects})}));let Ai=null,ho=null,SO=0,kO=0,Uk=0;const XX=3e4,ZX=1e4,Qf=sa((t,e)=>({notesSyncProgress:null,codeSyncProgress:null,lastCompleted:null,lockStatus:null,recoveryInfo:null,isConnected:!1,lastHeartbeat:null,syncNotes:async(n={})=>{t({notesSyncProgress:{target:"notes",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});try{const r=await fetch("/api/notes/sync",{method:"POST",headers:{"Content-Type":"application/json",...Ao()},body:JSON.stringify({resume:n.resume,force:n.force})});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.message||"Sync failed")}}catch(r){t(i=>({notesSyncProgress:i.notesSyncProgress?{...i.notesSyncProgress,status:"error",error:r instanceof Error?r.message:"Sync failed"}:null}))}},syncCode:async(n={})=>{t({codeSyncProgress:{target:"code",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});try{const r=await fetch("/api/code/sync",{method:"POST",headers:{"Content-Type":"application/json",...Ao()},body:JSON.stringify({resume:n.resume,force:n.force})});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.message||"Sync failed")}}catch(r){t(i=>({codeSyncProgress:i.codeSyncProgress?{...i.codeSyncProgress,status:"error",error:r instanceof Error?r.message:"Sync failed"}:null}))}},syncAll:async()=>{await Promise.all([e().syncNotes(),e().syncCode()])},pauseSync:async()=>{try{const n=await fetch("/api/sync/pause",{method:"POST"});if(!n.ok)return!1;const r=await n.json();return r.success&&t(i=>{var s,o;return{notesSyncProgress:((s=i.notesSyncProgress)==null?void 0:s.status)==="syncing"?{...i.notesSyncProgress,status:"paused",paused:!0}:i.notesSyncProgress,codeSyncProgress:((o=i.codeSyncProgress)==null?void 0:o.status)==="syncing"?{...i.codeSyncProgress,status:"paused",paused:!0}:i.codeSyncProgress}}),r.success}catch{return!1}},resumeSync:async()=>{try{const n=await fetch("/api/sync/resume",{method:"POST"});if(!n.ok)return!1;const r=await n.json();return r.success&&t(i=>{var s,o;return{notesSyncProgress:((s=i.notesSyncProgress)==null?void 0:s.status)==="paused"?{...i.notesSyncProgress,status:"syncing",paused:!1}:i.notesSyncProgress,codeSyncProgress:((o=i.codeSyncProgress)==null?void 0:o.status)==="paused"?{...i.codeSyncProgress,status:"syncing",paused:!1}:i.codeSyncProgress}}),r.success}catch{return!1}},cancelSync:async()=>{try{const n=await fetch("/api/sync/cancel",{method:"POST"});return n.ok?(await n.json()).success:!1}catch{return!1}},checkSyncStatus:async()=>{try{const n=await fetch("/api/sync/status");if(!n.ok)return;const r=await n.json();if(t({lockStatus:r.lock,lastCompleted:r.lastCompleted||null}),r.current){const i={target:r.current.type,status:r.current.paused?"paused":"syncing",paused:r.current.paused,phase:r.current.phase,current:r.current.currentFile,added:r.current.added,updated:r.current.updated,deleted:r.current.deleted,total:r.current.totalFiles,processed:r.current.processedFiles,progress:r.current.totalFiles>0?Math.round(r.current.processedFiles/r.current.totalFiles*100):0,taskId:r.current.taskId,estimatedRemainingMs:r.current.estimatedRemainingMs};r.current.type==="notes"?t({notesSyncProgress:i}):t({codeSyncProgress:i})}}catch{}},checkRecovery:async()=>{try{const n=await fetch("/api/sync/recover",{method:"POST"});if(n.ok){const r=await n.json();r.needsRecovery?t({recoveryInfo:r}):t({recoveryInfo:null})}}catch{}},forceUnlock:async(n=!1)=>{try{const r=await fetch("/api/sync/force-unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:n})});return r.ok?(await r.json()).success:!1}catch{return!1}},resetProgress:n=>{!n||n==="all"?t({notesSyncProgress:null,codeSyncProgress:null}):n==="notes"?t({notesSyncProgress:null}):n==="code"&&t({codeSyncProgress:null})},connect:()=>{Ai&&Ai.close(),ho&&(clearInterval(ho),ho=null),e().checkSyncStatus(),e().checkRecovery(),Ai=new EventSource("/api/events"),Ai.onopen=()=>{t({isConnected:!0}),SO=Date.now(),kO=0,e().checkSyncStatus(),e().checkRecovery()},Ai.onerror=()=>{t({isConnected:!1});const r=Math.min(1e3*Math.pow(2,kO),XX);kO++,setTimeout(()=>{e().isConnected===!1&&e().connect()},r)},Uk=Date.now(),ho=setInterval(()=>{var o,a;const r=e(),i=((o=r.notesSyncProgress)==null?void 0:o.status)==="syncing"||((a=r.codeSyncProgress)==null?void 0:a.status)==="syncing",s=Date.now()-Uk<ZX;(i&&Date.now()-SO>3e3||s)&&r.checkSyncStatus()},2e3),["heartbeat","sync:notes:started","sync:notes:progress","sync:notes:completed","sync:notes:error","sync:code:started","sync:code:progress","sync:code:completed","sync:code:error","reindex:notes:started","reindex:notes:progress","reindex:notes:completed","reindex:notes:error","reindex:code:started","reindex:code:progress","reindex:code:completed","reindex:code:error","project:opened","project:closed","file:indexed","file:removed"].forEach(r=>{Ai.addEventListener(r,i=>{const s=i;try{const o=JSON.parse(s.data);SO=Date.now(),e().handleSSEEvent({type:r,data:o})}catch{}})})},disconnect:()=>{Ai&&(Ai.close(),Ai=null),ho&&(clearInterval(ho),ho=null),t({isConnected:!1})},handleSSEEvent:n=>{const{type:r,data:i}=n;switch(r){case"heartbeat":t({lastHeartbeat:new Date().toISOString()});break;case"sync:notes:started":t({notesSyncProgress:{target:"notes",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});break;case"sync:notes:progress":{const s=i;t(o=>({notesSyncProgress:o.notesSyncProgress?{...o.notesSyncProgress,phase:s.phase??o.notesSyncProgress.phase,current:s.current??o.notesSyncProgress.current,progress:s.progress??o.notesSyncProgress.progress,added:s.added??o.notesSyncProgress.added,updated:s.updated??o.notesSyncProgress.updated,deleted:s.deleted??o.notesSyncProgress.deleted,total:s.total??o.notesSyncProgress.total,processed:s.processed??o.notesSyncProgress.processed}:null}));break}case"sync:notes:completed":t(s=>({notesSyncProgress:s.notesSyncProgress?{...s.notesSyncProgress,status:"completed",progress:100,phase:"done",...i}:null}));break;case"sync:notes:error":t(s=>({notesSyncProgress:s.notesSyncProgress?{...s.notesSyncProgress,status:"error",error:i.error||"Sync failed"}:null}));break;case"sync:code:started":{const s=i;t({codeSyncProgress:{target:"code",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0,branch:s.branch,isMainBranch:s.isMainBranch,mode:s.mode}});break}case"sync:code:progress":{const s=i;t(o=>({codeSyncProgress:o.codeSyncProgress?{...o.codeSyncProgress,phase:s.phase??o.codeSyncProgress.phase,current:s.current??o.codeSyncProgress.current,progress:s.progress??o.codeSyncProgress.progress,added:s.added??o.codeSyncProgress.added,updated:s.updated??o.codeSyncProgress.updated,deleted:s.deleted??o.codeSyncProgress.deleted,total:s.total??o.codeSyncProgress.total,processed:s.processed??o.codeSyncProgress.processed,branch:s.branch??o.codeSyncProgress.branch,isMainBranch:s.isMainBranch??o.codeSyncProgress.isMainBranch,mode:s.mode??o.codeSyncProgress.mode}:null}));break}case"sync:code:completed":{const s=i;t(o=>({codeSyncProgress:o.codeSyncProgress?{...o.codeSyncProgress,status:"completed",progress:100,phase:"done",added:s.added??o.codeSyncProgress.added,deleted:s.deleted??o.codeSyncProgress.deleted,branch:s.branch??o.codeSyncProgress.branch,isMainBranch:s.isMainBranch??o.codeSyncProgress.isMainBranch,mode:s.mode??o.codeSyncProgress.mode}:null}));break}case"sync:code:error":t(s=>({codeSyncProgress:s.codeSyncProgress?{...s.codeSyncProgress,status:"error",error:i.error||"Sync failed"}:null}));break}}}));async function CO(t){const e=await fetch(t);if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}async function WX(t,e){const n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e?JSON.stringify(e):void 0});if(!n.ok){const r=await n.json().catch(()=>({message:"Request failed"}));throw new Error(r.message||`HTTP ${n.status}`)}return n.json()}async function qX(t){const e=await fetch(t,{method:"DELETE"});if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}const Af=sa((t,e)=>({activeTab:"notes",noteFiles:[],codeFiles:[],isLoadingNotes:!1,isLoadingCode:!1,selectedFile:null,selectedFileContent:null,notesHistory:[],notesHistoryIndex:-1,codeHistory:[],codeHistoryIndex:-1,selectedPaths:[],filterQuery:"",isReindexing:!1,reindexingPaths:[],error:null,setActiveTab:n=>{t({activeTab:n}),n==="notes"&&e().noteFiles.length===0?e().fetchNoteFiles():n==="code"&&e().codeFiles.length===0&&e().fetchCodeFiles()},setFilterQuery:n=>{t({filterQuery:n})},fetchNoteFiles:async n=>{t({isLoadingNotes:!0,error:null});try{const r=new URLSearchParams;n&&r.set("folder",n);const i=await CO(`/api/notes/files?${r}`);t({noteFiles:i,isLoadingNotes:!1})}catch(r){t({isLoadingNotes:!1,error:r instanceof Error?r.message:"Failed to fetch notes"})}},fetchCodeFiles:async(n,r)=>{t({isLoadingCode:!0,error:null});try{const i=new URLSearchParams;n&&i.set("folder",n),r&&i.set("language",r);const s=await CO(`/api/code/files?${i}`);t({codeFiles:s,isLoadingCode:!1})}catch(i){t({isLoadingCode:!1,error:i instanceof Error?i.message:"Failed to fetch code files"})}},selectFile:async n=>{if(!n){t({selectedFile:null,selectedFileContent:null});return}t({selectedFile:n,selectedFileContent:null});try{const{activeTab:r}=e(),s=await CO(`${r==="notes"?"/api/notes/files":"/api/code/file"}/${encodeURIComponent(n)}`);t({selectedFileContent:s.content})}catch(r){t({error:r instanceof Error?r.message:"Failed to load file content"})}},navigateToFile:async n=>{const{activeTab:r,notesHistory:i,notesHistoryIndex:s,codeHistory:o,codeHistoryIndex:a}=e(),l=r==="notes"?i:o,c=r==="notes"?s:a,u=[...l.slice(0,c+1),n],f=u.length-1;t(r==="notes"?{notesHistory:u,notesHistoryIndex:f}:{codeHistory:u,codeHistoryIndex:f}),await e().selectFile(n)},clearSelection:()=>{t({selectedFile:null,selectedFileContent:null})},refreshFiles:async()=>{const{activeTab:n,fetchNoteFiles:r,fetchCodeFiles:i}=e();n==="notes"?await r():await i()},canGoBack:()=>{const{activeTab:n,notesHistoryIndex:r,codeHistoryIndex:i}=e();return(n==="notes"?r:i)>0},canGoForward:()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o}=e();return(n==="notes"?i:o)<(n==="notes"?r:s).length-1},goBack:async()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o,selectFile:a}=e(),l=n==="notes"?r:s,c=n==="notes"?i:o;if(c<=0)return;const u=c-1,f=l[u];t(n==="notes"?{notesHistoryIndex:u}:{codeHistoryIndex:u}),await a(f)},goForward:async()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o,selectFile:a}=e(),l=n==="notes"?r:s,c=n==="notes"?i:o;if(c>=l.length-1)return;const u=c+1,f=l[u];t(n==="notes"?{notesHistoryIndex:u}:{codeHistoryIndex:u}),await a(f)},toggleSelection:n=>{t(r=>({selectedPaths:r.selectedPaths.includes(n)?r.selectedPaths.filter(s=>s!==n):[...r.selectedPaths,n]}))},selectRange:(n,r)=>{const{activeTab:i,noteFiles:s,codeFiles:o,filterQuery:a}=e(),l=i==="notes"?s:o,u=(a?l.filter(x=>x.name.toLowerCase().includes(a.toLowerCase())||x.relativePath.toLowerCase().includes(a.toLowerCase())):l).map(x=>x.relativePath),f=u.indexOf(n),d=u.indexOf(r);if(f===-1||d===-1)return;const h=Math.min(f,d),O=Math.max(f,d),m=u.slice(h,O+1);t({selectedPaths:m})},clearMultiSelection:()=>{t({selectedPaths:[]})},selectAll:()=>{const{activeTab:n,noteFiles:r,codeFiles:i,filterQuery:s}=e(),o=n==="notes"?r:i,a=s?o.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())||l.relativePath.toLowerCase().includes(s.toLowerCase())):o;t({selectedPaths:a.map(l=>l.relativePath)})},reindexFiles:async n=>{if(n.length===0)return;const{activeTab:r,refreshFiles:i}=e();t({isReindexing:!0,reindexingPaths:n,error:null});try{await WX(r==="notes"?"/api/notes/reindex":"/api/code/reindex",{paths:n}),await i(),t({isReindexing:!1,reindexingPaths:[],selectedPaths:[]})}catch(s){t({isReindexing:!1,reindexingPaths:[],error:s instanceof Error?s.message:"Reindex failed"})}},removeFiles:async n=>{if(n.length===0)return;const{activeTab:r,refreshFiles:i}=e();t({error:null});try{const s=r==="notes"?"/api/notes/files":"/api/code/files";for(const o of n)await qX(`${s}/${encodeURIComponent(o)}`);await i(),t({selectedPaths:[]})}catch(s){t({error:s instanceof Error?s.message:"Remove failed"})}}})),K$="rag-project-slugs";function YX(t){const e=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,20),n=Math.random().toString(36).slice(2,6);return`${e}-${n}`}function J$(){try{const t=localStorage.getItem(K$);return t?JSON.parse(t):{}}catch{return{}}}function UX(t){localStorage.setItem(K$,JSON.stringify(t))}function Op(t,e){const n=J$();if(n[t])return n[t];const r=YX(e);return n[t]=r,UX(n),r}function HX(t){const e=J$();for(const[n,r]of Object.entries(e))if(r===t)return n;return null}function GX(){const t=ql(),{projectSlug:e}=gF(),[n]=aX(),{currentProject:r,openProject:i,closeProject:s,recentProjects:o}=oa(),{activeTab:a,selectedFile:l,setActiveTab:c,navigateToFile:u}=Af(),f=g.useRef(!0),d=g.useRef(!1),h=g.useRef(!e);g.useEffect(()=>{if(!f.current)return;f.current=!1,(async()=>{if(!e){h.current=!0;return}h.current=!1;const x=HX(e);if(x){if(d.current=!0,!r||r.path!==x)try{await i(x)}catch{t("/",{replace:!0});return}const y=n.get("tab");y&&(y==="notes"||y==="code")&&c(y);const v=n.get("file");v&&setTimeout(()=>{u(v)},100),d.current=!1}else{const y=o.find(v=>v.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")===e.split("-").slice(0,-1).join("-"));if(y){d.current=!0;try{await i(y.path)}catch{t("/",{replace:!0})}d.current=!1}else t("/",{replace:!0})}})()},[e,n,r,i,s,o,c,u,t]),g.useEffect(()=>{h.current=!e},[e]);const O=g.useCallback(()=>{if(!d.current&&!(h.current&&!e)&&r){const m=Op(r.path,r.name),x=new URLSearchParams;a!=="notes"&&x.set("tab",a),l&&x.set("file",l);const y=x.toString(),v=`/${m}${y?`?${y}`:""}`;t(v,{replace:!0})}},[r,a,l,t,e]);return g.useEffect(()=>{O()},[O]),{projectSlug:e,urlFile:n.get("file"),urlTab:n.get("tab")}}/**
|
|
69
|
+
* @license lucide-react v0.469.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const KX=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eQ=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
74
|
+
* @license lucide-react v0.469.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/var JX={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"};/**
|
|
79
|
+
* @license lucide-react v0.469.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const eZ=g.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>g.createElement("svg",{ref:l,...JX,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:eQ("lucide",i),...a},[...o.map(([c,u])=>g.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
84
|
+
* @license lucide-react v0.469.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const fe=(t,e)=>{const n=g.forwardRef(({className:r,...i},s)=>g.createElement(eZ,{ref:s,iconNode:e,className:eQ(`lucide-${KX(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
|
|
89
|
+
* @license lucide-react v0.469.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const tZ=fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
94
|
+
* @license lucide-react v0.469.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const Hb=fe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
99
|
+
* @license lucide-react v0.469.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const nZ=fe("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
|
|
104
|
+
* @license lucide-react v0.469.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const rZ=fe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
109
|
+
* @license lucide-react v0.469.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const iZ=fe("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
|
|
114
|
+
* @license lucide-react v0.469.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const Bu=fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
119
|
+
* @license lucide-react v0.469.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const aa=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
124
|
+
* @license lucide-react v0.469.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const Lm=fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
129
|
+
* @license lucide-react v0.469.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const sZ=fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
134
|
+
* @license lucide-react v0.469.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const Or=fe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
139
|
+
* @license lucide-react v0.469.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const Gi=fe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
144
|
+
* @license lucide-react v0.469.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const ou=fe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
149
|
+
* @license lucide-react v0.469.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const If=fe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
154
|
+
* @license lucide-react v0.469.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const tQ=fe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
159
|
+
* @license lucide-react v0.469.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const oZ=fe("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
164
|
+
* @license lucide-react v0.469.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const rn=fe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
169
|
+
* @license lucide-react v0.469.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const aZ=fe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
174
|
+
* @license lucide-react v0.469.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const nQ=fe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
179
|
+
* @license lucide-react v0.469.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const lZ=fe("Diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);/**
|
|
184
|
+
* @license lucide-react v0.469.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const cZ=fe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
189
|
+
* @license lucide-react v0.469.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const PO=fe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
194
|
+
* @license lucide-react v0.469.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const TO=fe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
199
|
+
* @license lucide-react v0.469.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const uZ=fe("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
|
|
204
|
+
* @license lucide-react v0.469.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const sn=fe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
209
|
+
* @license lucide-react v0.469.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const fZ=fe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
214
|
+
* @license lucide-react v0.469.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const Gb=fe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
219
|
+
* @license lucide-react v0.469.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const wh=fe("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
224
|
+
* @license lucide-react v0.469.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const dZ=fe("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
229
|
+
* @license lucide-react v0.469.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const zm=fe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
234
|
+
* @license lucide-react v0.469.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const Vu=fe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
239
|
+
* @license lucide-react v0.469.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const rQ=fe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
244
|
+
* @license lucide-react v0.469.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const hZ=fe("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
|
|
249
|
+
* @license lucide-react v0.469.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const Kb=fe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
254
|
+
* @license lucide-react v0.469.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const pZ=fe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
259
|
+
* @license lucide-react v0.469.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const mZ=fe("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
|
|
264
|
+
* @license lucide-react v0.469.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const gZ=fe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
269
|
+
* @license lucide-react v0.469.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const Un=fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
274
|
+
* @license lucide-react v0.469.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const Sc=fe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
279
|
+
* @license lucide-react v0.469.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const OZ=fe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
284
|
+
* @license lucide-react v0.469.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const yZ=fe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
289
|
+
* @license lucide-react v0.469.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const yp=fe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
294
|
+
* @license lucide-react v0.469.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const vZ=fe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
299
|
+
* @license lucide-react v0.469.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const xZ=fe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
304
|
+
* @license lucide-react v0.469.0 - ISC
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the ISC license.
|
|
307
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/const ui=fe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
309
|
+
* @license lucide-react v0.469.0 - ISC
|
|
310
|
+
*
|
|
311
|
+
* This source code is licensed under the ISC license.
|
|
312
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
+
*/const bZ=fe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
314
|
+
* @license lucide-react v0.469.0 - ISC
|
|
315
|
+
*
|
|
316
|
+
* This source code is licensed under the ISC license.
|
|
317
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
+
*/const Jb=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
319
|
+
* @license lucide-react v0.469.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/const Hk=fe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
324
|
+
* @license lucide-react v0.469.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/const iQ=fe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
329
|
+
* @license lucide-react v0.469.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const wZ=fe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
334
|
+
* @license lucide-react v0.469.0 - ISC
|
|
335
|
+
*
|
|
336
|
+
* This source code is licensed under the ISC license.
|
|
337
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
+
*/const SZ=fe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
339
|
+
* @license lucide-react v0.469.0 - ISC
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the ISC license.
|
|
342
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/const kZ=fe("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
|
|
344
|
+
* @license lucide-react v0.469.0 - ISC
|
|
345
|
+
*
|
|
346
|
+
* This source code is licensed under the ISC license.
|
|
347
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
+
*/const CZ=fe("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"}]]);/**
|
|
349
|
+
* @license lucide-react v0.469.0 - ISC
|
|
350
|
+
*
|
|
351
|
+
* This source code is licensed under the ISC license.
|
|
352
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
+
*/const ew=fe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
354
|
+
* @license lucide-react v0.469.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/const sQ=fe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
359
|
+
* @license lucide-react v0.469.0 - ISC
|
|
360
|
+
*
|
|
361
|
+
* This source code is licensed under the ISC license.
|
|
362
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
+
*/const PZ=fe("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
|
|
364
|
+
* @license lucide-react v0.469.0 - ISC
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the ISC license.
|
|
367
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const TZ=fe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
369
|
+
* @license lucide-react v0.469.0 - ISC
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the ISC license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/const EZ=fe("Variable",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]]);/**
|
|
374
|
+
* @license lucide-react v0.469.0 - ISC
|
|
375
|
+
*
|
|
376
|
+
* This source code is licensed under the ISC license.
|
|
377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
+
*/const RZ=fe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
379
|
+
* @license lucide-react v0.469.0 - ISC
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the ISC license.
|
|
382
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/const _Z=fe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
384
|
+
* @license lucide-react v0.469.0 - ISC
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the ISC license.
|
|
387
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/const Ol=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Gk(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function kn(...t){return e=>{let n=!1;const r=t.map(i=>{const s=Gk(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Gk(t[i],null)}}}}function Ce(...t){return g.useCallback(kn(...t),t)}var $Z=Symbol.for("react.lazy"),vp=eb[" use ".trim().toString()];function QZ(t){return typeof t=="object"&&t!==null&&"then"in t}function oQ(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===$Z&&"_payload"in t&&QZ(t._payload)}function Bm(t){const e=IZ(t),n=g.forwardRef((r,i)=>{let{children:s,...o}=r;oQ(s)&&typeof vp=="function"&&(s=vp(s._payload));const a=g.Children.toArray(s),l=a.find(jZ);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}var AZ=Bm("Slot");function IZ(t){const e=g.forwardRef((n,r)=>{let{children:i,...s}=n;if(oQ(i)&&typeof vp=="function"&&(i=vp(i._payload)),g.isValidElement(i)){const o=DZ(i),a=MZ(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var NZ=Symbol("radix.slottable");function jZ(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===NZ}function MZ(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function DZ(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function aQ(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=aQ(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function lQ(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=aQ(t))&&(r&&(r+=" "),r+=e);return r}const Kk=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Jk=lQ,tw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Jk(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=Kk(u)||Kk(f);return i[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(O=>{let[m,x]=O;return Array.isArray(x)?x.includes({...s,...a}[m]):{...s,...a}[m]===x})?[...c,f,d]:c},[]);return Jk(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},nw="-",LZ=t=>{const e=BZ(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(nw);return a[0]===""&&a.length!==1&&a.shift(),cQ(a,e)||zZ(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},cQ=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?cQ(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(nw);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},eC=/^\[(.+)\]$/,zZ=t=>{if(eC.test(t)){const e=eC.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},BZ=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return FZ(Object.entries(t.classGroups),n).forEach(([s,o])=>{ax(o,r,s,e)}),r},ax=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:tC(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(VZ(i)){ax(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{ax(o,tC(e,s),n,r)})})},tC=(t,e)=>{let n=t;return e.split(nw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},VZ=t=>t.isThemeGetter,FZ=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,i]}):t,XZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},uQ="!",ZZ=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,f;for(let x=0;x<a.length;x++){let y=a[x];if(c===0){if(y===i&&(r||a.slice(x,x+s)===e)){l.push(a.slice(u,x)),u=x+s;continue}if(y==="/"){f=x;continue}}y==="["?c++:y==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(uQ),O=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:O,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},WZ=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},qZ=t=>({cache:XZ(t.cacheSize),parseClassName:ZZ(t),...LZ(t)}),YZ=/\s+/,UZ=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=t.trim().split(YZ);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(c);let O=!!h,m=r(O?d.substring(0,h):d);if(!m){if(!O){a=c+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=c+(a.length>0?" "+a:a);continue}O=!1}const x=WZ(u).join(":"),y=f?x+uQ:x,v=y+m;if(s.includes(v))continue;s.push(v);const b=i(m,O);for(let S=0;S<b.length;++S){const k=b[S];s.push(y+k)}a=c+(a.length>0?" "+a:a)}return a};function HZ(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=fQ(e))&&(r&&(r+=" "),r+=n);return r}const fQ=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=fQ(t[r]))&&(n&&(n+=" "),n+=e);return n};function GZ(t,...e){let n,r,i,s=o;function o(l){const c=e.reduce((u,f)=>f(u),t());return n=qZ(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=UZ(l,n);return i(l,u),u}return function(){return s(HZ.apply(null,arguments))}}const Ke=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},dQ=/^\[(?:([a-z-]+):)?(.+)\]$/i,KZ=/^\d+\/\d+$/,JZ=new Set(["px","full","screen"]),eW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tW=/\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$/,nW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ii=t=>Ua(t)||JZ.has(t)||KZ.test(t),ds=t=>Yl(t,"length",dW),Ua=t=>!!t&&!Number.isNaN(Number(t)),EO=t=>Yl(t,"number",Ua),kc=t=>!!t&&Number.isInteger(Number(t)),sW=t=>t.endsWith("%")&&Ua(t.slice(0,-1)),Se=t=>dQ.test(t),hs=t=>eW.test(t),oW=new Set(["length","size","percentage"]),aW=t=>Yl(t,oW,hQ),lW=t=>Yl(t,"position",hQ),cW=new Set(["image","url"]),uW=t=>Yl(t,cW,pW),fW=t=>Yl(t,"",hW),Cc=()=>!0,Yl=(t,e,n)=>{const r=dQ.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},dW=t=>tW.test(t)&&!nW.test(t),hQ=()=>!1,hW=t=>rW.test(t),pW=t=>iW.test(t),mW=()=>{const t=Ke("colors"),e=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),i=Ke("borderColor"),s=Ke("borderRadius"),o=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),c=Ke("grayscale"),u=Ke("hueRotate"),f=Ke("invert"),d=Ke("gap"),h=Ke("gradientColorStops"),O=Ke("gradientColorStopPositions"),m=Ke("inset"),x=Ke("margin"),y=Ke("opacity"),v=Ke("padding"),b=Ke("saturate"),S=Ke("scale"),k=Ke("sepia"),w=Ke("skew"),C=Ke("space"),_=Ke("translate"),I=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",Se,e],Q=()=>[Se,e],L=()=>["",Ii,ds],z=()=>["auto",Ua,Se],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Se],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Ua,Se];return{cacheSize:500,separator:":",theme:{colors:[Cc],spacing:[Ii,ds],blur:["none","",hs,Se],brightness:M(),borderColor:[t],borderRadius:["none","","full",hs,Se],borderSpacing:Q(),borderWidth:L(),contrast:M(),grayscale:A(),hueRotate:M(),invert:A(),gap:Q(),gradientColorStops:[t],gradientColorStopPositions:[sW,ds],inset:N(),margin:N(),opacity:M(),padding:Q(),saturate:M(),scale:M(),sepia:A(),skew:M(),space:Q(),translate:Q()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[hs]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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"],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(),Se]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kc,Se]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",kc,Se]}],"grid-cols":[{"grid-cols":[Cc]}],"col-start-end":[{col:["auto",{span:["full",kc,Se]},Se]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Cc]}],"row-start-end":[{row:["auto",{span:[kc,Se]},Se]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,e]}],"min-w":[{"min-w":[Se,e,"min","max","fit"]}],"max-w":[{"max-w":[Se,e,"none","full","min","max","fit","prose",{screen:[hs]},hs]}],h:[{h:[Se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",hs,ds]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",EO]}],"font-family":[{font:[Cc]}],"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:["tighter","tight","normal","wide","wider","widest",Se]}],"line-clamp":[{"line-clamp":["none",Ua,EO]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ii,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ii,ds]}],"underline-offset":[{"underline-offset":["auto",Ii,Se]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),lW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uW]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[O]}],"gradient-via-pos":[{via:[O]}],"gradient-to-pos":[{to:[O]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Ii,Se]}],"outline-w":[{outline:[Ii,ds]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ii,ds]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",hs,fW]}],"shadow-color":[{shadow:[Cc]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",hs,Se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Se]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[kc,Se]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",Se]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"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",Se]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Ii,ds,EO]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},gW=GZ(mW);function le(...t){return gW(lQ(t))}function OW(t){const e=new Date,n=new Date(t),r=e.getTime()-n.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),o=Math.floor(s/60),a=Math.floor(o/24);return i<60?"just now":s<60?`${s}m ago`:o<24?`${o}h ago`:a<7?`${a}d ago`:n.toLocaleDateString()}function yW(t,e=40){if(!t)return"";if(t.length<=e)return t;const n=t.split("/");if(n.length<=2)return t;const r=n[0],i=n.slice(-2).join("/");return r.length+i.length+4>e?`.../${i}`:`${r}/.../${i}`}function vW(t,e){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>t(...r),e)}}const xW=tw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background 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-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=g.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...i},s)=>{const o=r?AZ:"button";return p.jsx(o,{className:le(xW({variant:e,size:n,className:t})),ref:s,...i})});Qe.displayName="Button";function ne(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function bW(t,e){const n=g.createContext(e),r=s=>{const{children:o,...a}=s,l=g.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function i(s){const o=g.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function Cn(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o),l=n.length;n=[...n,o];const c=f=>{var y;const{scope:d,children:h,...O}=f,m=((y=d==null?void 0:d[t])==null?void 0:y[l])||a,x=g.useMemo(()=>O,Object.values(O));return p.jsx(m.Provider,{value:x,children:h})};c.displayName=s+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[l])||a,O=g.useContext(h);if(O)return O;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,wW(i,...e)]}function wW(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function SW(t){const e=kW(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(PW);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function kW(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=EW(i),a=TW(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var CW=Symbol("radix.slottable");function PW(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===CW}function TW(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function EW(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var RW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=RW.reduce((t,e)=>{const n=SW(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function pQ(t,e){t&&Xl.flushSync(()=>t.dispatchEvent(e))}function Zt(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function _W(t,e=globalThis==null?void 0:globalThis.document){const n=Zt(t);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var $W="DismissableLayer",lx="dismissableLayer.update",QW="dismissableLayer.pointerDownOutside",AW="dismissableLayer.focusOutside",nC,mQ=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ul=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,c=g.useContext(mQ),[u,f]=g.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=g.useState({}),O=Ce(e,C=>f(C)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),v=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,k=jW(C=>{const _=C.target,I=[...c.branches].some(E=>E.contains(_));!S||I||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},d),w=MW(C=>{const _=C.target;[...c.branches].some(E=>E.contains(_))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},d);return _W(C=>{v===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),g.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(nC=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),rC(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=nC)}},[u,d,n,c]),g.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),rC())},[u,c]),g.useEffect(()=>{const C=()=>h({});return document.addEventListener(lx,C),()=>document.removeEventListener(lx,C)},[]),p.jsx(ue.div,{...l,ref:O,style:{pointerEvents:b?S?"auto":"none":void 0,...t.style},onFocusCapture:ne(t.onFocusCapture,w.onFocusCapture),onBlurCapture:ne(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:ne(t.onPointerDownCapture,k.onPointerDownCapture)})});Ul.displayName=$W;var IW="DismissableLayerBranch",NW=g.forwardRef((t,e)=>{const n=g.useContext(mQ),r=g.useRef(null),i=Ce(e,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ue.div,{...t,ref:i})});NW.displayName=IW;function jW(t,e=globalThis==null?void 0:globalThis.document){const n=Zt(t),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){gQ(QW,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function MW(t,e=globalThis==null?void 0:globalThis.document){const n=Zt(t),r=g.useRef(!1);return g.useEffect(()=>{const i=s=>{s.target&&!r.current&&gQ(AW,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rC(){const t=new CustomEvent(lx);document.dispatchEvent(t)}function gQ(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?pQ(i,s):i.dispatchEvent(s)}var Rt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},DW=eb[" useId ".trim().toString()]||(()=>{}),LW=0;function qt(t){const[e,n]=g.useState(DW());return Rt(()=>{n(r=>r??String(LW++))},[t]),e?`radix-${e}`:""}const zW=["top","right","bottom","left"],Vs=Math.min,Dn=Math.max,xp=Math.round,xd=Math.floor,wi=t=>({x:t,y:t}),BW={left:"right",right:"left",bottom:"top",top:"bottom"},VW={start:"end",end:"start"};function cx(t,e,n){return Dn(t,Vs(e,n))}function Ki(t,e){return typeof t=="function"?t(e):t}function Ji(t){return t.split("-")[0]}function Hl(t){return t.split("-")[1]}function rw(t){return t==="x"?"y":"x"}function iw(t){return t==="y"?"height":"width"}const FW=new Set(["top","bottom"]);function mi(t){return FW.has(Ji(t))?"y":"x"}function sw(t){return rw(mi(t))}function XW(t,e,n){n===void 0&&(n=!1);const r=Hl(t),i=sw(t),s=iw(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=bp(o)),[o,bp(o)]}function ZW(t){const e=bp(t);return[ux(t),e,ux(e)]}function ux(t){return t.replace(/start|end/g,e=>VW[e])}const iC=["left","right"],sC=["right","left"],WW=["top","bottom"],qW=["bottom","top"];function YW(t,e,n){switch(t){case"top":case"bottom":return n?e?sC:iC:e?iC:sC;case"left":case"right":return e?WW:qW;default:return[]}}function UW(t,e,n,r){const i=Hl(t);let s=YW(Ji(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(ux)))),s}function bp(t){return t.replace(/left|right|bottom|top/g,e=>BW[e])}function HW(t){return{top:0,right:0,bottom:0,left:0,...t}}function OQ(t){return typeof t!="number"?HW(t):{top:t,right:t,bottom:t,left:t}}function wp(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function oC(t,e,n){let{reference:r,floating:i}=t;const s=mi(e),o=sw(e),a=iw(o),l=Ji(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Hl(e)){case"start":h[o]-=d*(n&&c?-1:1);break;case"end":h[o]+=d*(n&&c?-1:1);break}return h}async function GW(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Ki(e,t),O=OQ(h),x=a[d?f==="floating"?"reference":"floating":f],y=wp(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},k=wp(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-k.top+O.top)/S.y,bottom:(k.bottom-y.bottom+O.bottom)/S.y,left:(y.left-k.left+O.left)/S.x,right:(k.right-y.right+O.right)/S.x}}const KW=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=oC(c,r,l),d=r,h={},O=0;for(let x=0;x<a.length;x++){var m;const{name:y,fn:v}=a[x],{x:b,y:S,data:k,reset:w}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...o,detectOverflow:(m=o.detectOverflow)!=null?m:GW},elements:{reference:t,floating:e}});u=b??u,f=S??f,h={...h,[y]:{...h[y],...k}},w&&O<=50&&(O++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:u,y:f}=oC(c,d,l)),x=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}},JW=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ki(t,e)||{};if(c==null)return{};const f=OQ(u),d={x:n,y:r},h=sw(i),O=iw(h),m=await o.getDimensions(c),x=h==="y",y=x?"top":"left",v=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=s.reference[O]+s.reference[h]-d[h]-s.floating[O],k=d[h]-s.reference[h],w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=w?w[b]:0;(!C||!await(o.isElement==null?void 0:o.isElement(w)))&&(C=a.floating[b]||s.floating[O]);const _=S/2-k/2,I=C/2-m[O]/2-1,E=Vs(f[y],I),N=Vs(f[v],I),Q=E,L=C-m[O]-N,z=C/2-m[O]/2+_,X=cx(Q,z,L),W=!l.arrow&&Hl(i)!=null&&z!==X&&s.reference[O]/2-(z<Q?E:N)-m[O]/2<0,F=W?z<Q?z-Q:z-L:0;return{[h]:d[h]+F,data:{[h]:X,centerOffset:z-X-F,...W&&{alignmentOffset:F}},reset:W}}}),e9=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:m=!0,...x}=Ki(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ji(i),v=mi(a),b=Ji(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=d||(b||!m?[bp(a)]:ZW(a)),w=O!=="none";!d&&w&&k.push(...UW(a,m,O,S));const C=[a,...k],_=await l.detectOverflow(e,x),I=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(_[y]),f){const z=XW(i,o,S);I.push(_[z[0]],_[z[1]])}if(E=[...E,{placement:i,overflows:I}],!I.every(z=>z<=0)){var N,Q;const z=(((N=s.flip)==null?void 0:N.index)||0)+1,X=C[z];if(X&&(!(f==="alignment"?v!==mi(X):!1)||E.every(j=>mi(j.placement)===v?j.overflows[0]>0:!0)))return{data:{index:z,overflows:E},reset:{placement:X}};let W=(Q=E.filter(F=>F.overflows[0]<=0).sort((F,j)=>F.overflows[1]-j.overflows[1])[0])==null?void 0:Q.placement;if(!W)switch(h){case"bestFit":{var L;const F=(L=E.filter(j=>{if(w){const A=mi(j.placement);return A===v||A==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(A=>A>0).reduce((A,P)=>A+P,0)]).sort((j,A)=>j[1]-A[1])[0])==null?void 0:L[0];F&&(W=F);break}case"initialPlacement":W=a;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function aC(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function lC(t){return zW.some(e=>t[e]>=0)}const t9=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=Ki(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=aC(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lC(a)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),a=aC(o,n.floating);return{data:{escapedOffsets:a,escaped:lC(a)}}}default:return{}}}}},yQ=new Set(["left","top"]);async function n9(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ji(n),a=Hl(n),l=mi(n)==="y",c=yQ.has(o)?-1:1,u=s&&l?-1:1,f=Ki(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:O}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof O=="number"&&(h=a==="end"?O*-1:O),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const r9=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await n9(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},i9=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...c}=Ki(t,e),u={x:n,y:r},f=await s.detectOverflow(e,c),d=mi(Ji(i)),h=rw(d);let O=u[h],m=u[d];if(o){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=O+f[y],S=O-f[v];O=cx(b,O,S)}if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=m+f[y],S=m-f[v];m=cx(b,m,S)}const x=l.fn({...e,[h]:O,[d]:m});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[d]:a}}}}}},s9=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ki(t,e),u={x:n,y:r},f=mi(i),d=rw(f);let h=u[d],O=u[f];const m=Ki(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=d==="y"?"height":"width",S=s.reference[d]-s.floating[b]+x.mainAxis,k=s.reference[d]+s.reference[b]-x.mainAxis;h<S?h=S:h>k&&(h=k)}if(c){var y,v;const b=d==="y"?"width":"height",S=yQ.has(Ji(i)),k=s.reference[f]-s.floating[b]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:x.crossAxis),w=s.reference[f]+s.reference[b]+(S?0:((v=o.offset)==null?void 0:v[f])||0)-(S?x.crossAxis:0);O<k?O=k:O>w&&(O=w)}return{[d]:h,[f]:O}}}},o9=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Ki(t,e),u=await o.detectOverflow(e,c),f=Ji(i),d=Hl(i),h=mi(i)==="y",{width:O,height:m}=s.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=d==="end"?"top":"bottom");const v=m-u.top-u.bottom,b=O-u.left-u.right,S=Vs(m-u[x],v),k=Vs(O-u[y],b),w=!e.middlewareData.shift;let C=S,_=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=v),w&&!d){const E=Dn(u.left,0),N=Dn(u.right,0),Q=Dn(u.top,0),L=Dn(u.bottom,0);h?_=O-2*(E!==0||N!==0?E+N:Dn(u.left,u.right)):C=m-2*(Q!==0||L!==0?Q+L:Dn(u.top,u.bottom))}await l({...e,availableWidth:_,availableHeight:C});const I=await o.getDimensions(a.floating);return O!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Vm(){return typeof window<"u"}function Gl(t){return vQ(t)?(t.nodeName||"").toLowerCase():"#document"}function Wn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Pi(t){var e;return(e=(vQ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function vQ(t){return Vm()?t instanceof Node||t instanceof Wn(t).Node:!1}function Fr(t){return Vm()?t instanceof Element||t instanceof Wn(t).Element:!1}function ki(t){return Vm()?t instanceof HTMLElement||t instanceof Wn(t).HTMLElement:!1}function cC(t){return!Vm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Wn(t).ShadowRoot}const a9=new Set(["inline","contents"]);function Nf(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Xr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!a9.has(i)}const l9=new Set(["table","td","th"]);function c9(t){return l9.has(Gl(t))}const u9=[":popover-open",":modal"];function Fm(t){return u9.some(e=>{try{return t.matches(e)}catch{return!1}})}const f9=["transform","translate","scale","rotate","perspective"],d9=["transform","translate","scale","rotate","perspective","filter"],h9=["paint","layout","strict","content"];function ow(t){const e=aw(),n=Fr(t)?Xr(t):t;return f9.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||d9.some(r=>(n.willChange||"").includes(r))||h9.some(r=>(n.contain||"").includes(r))}function p9(t){let e=Fs(t);for(;ki(e)&&!yl(e);){if(ow(e))return e;if(Fm(e))return null;e=Fs(e)}return null}function aw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const m9=new Set(["html","body","#document"]);function yl(t){return m9.has(Gl(t))}function Xr(t){return Wn(t).getComputedStyle(t)}function Xm(t){return Fr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fs(t){if(Gl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cC(t)&&t.host||Pi(t);return cC(e)?e.host:e}function xQ(t){const e=Fs(t);return yl(e)?t.ownerDocument?t.ownerDocument.body:t.body:ki(e)&&Nf(e)?e:xQ(e)}function Fu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=xQ(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Wn(i);if(s){const a=fx(o);return e.concat(o,o.visualViewport||[],Nf(i)?i:[],a&&n?Fu(a):[])}return e.concat(i,Fu(i,[],n))}function fx(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function bQ(t){const e=Xr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ki(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=xp(n)!==s||xp(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function lw(t){return Fr(t)?t:t.contextElement}function Ha(t){const e=lw(t);if(!ki(e))return wi(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=bQ(e);let o=(s?xp(n.width):n.width)/r,a=(s?xp(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const g9=wi(0);function wQ(t){const e=Wn(t);return!aw()||!e.visualViewport?g9:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function O9(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Wn(t)?!1:e}function zo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=lw(t);let o=wi(1);e&&(r?Fr(r)&&(o=Ha(r)):o=Ha(t));const a=O9(s,n,r)?wQ(s):wi(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=Wn(s),h=r&&Fr(r)?Wn(r):r;let O=d,m=fx(O);for(;m&&r&&h!==O;){const x=Ha(m),y=m.getBoundingClientRect(),v=Xr(m),b=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,S=y.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,f*=x.y,l+=b,c+=S,O=Wn(m),m=fx(O)}}return wp({width:u,height:f,x:l,y:c})}function Zm(t,e){const n=Xm(t).scrollLeft;return e?e.left+n:zo(Pi(t)).left+n}function SQ(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Zm(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function y9(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Pi(r),a=e?Fm(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=wi(1);const u=wi(0),f=ki(r);if((f||!f&&!s)&&((Gl(r)!=="body"||Nf(o))&&(l=Xm(r)),ki(r))){const h=zo(r);c=Ha(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const d=o&&!f&&!s?SQ(o,l):wi(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function v9(t){return Array.from(t.getClientRects())}function x9(t){const e=Pi(t),n=Xm(t),r=t.ownerDocument.body,i=Dn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Dn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Zm(t);const a=-n.scrollTop;return Xr(r).direction==="rtl"&&(o+=Dn(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const uC=25;function b9(t,e){const n=Wn(t),r=Pi(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=aw();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Zm(r);if(c<=0){const u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,O=Math.abs(r.clientWidth-f.clientWidth-h);O<=uC&&(s-=O)}else c<=uC&&(s+=c);return{width:s,height:o,x:a,y:l}}const w9=new Set(["absolute","fixed"]);function S9(t,e){const n=zo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=ki(t)?Ha(t):wi(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function fC(t,e,n){let r;if(e==="viewport")r=b9(t,n);else if(e==="document")r=x9(Pi(t));else if(Fr(e))r=S9(e,n);else{const i=wQ(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return wp(r)}function kQ(t,e){const n=Fs(t);return n===e||!Fr(n)||yl(n)?!1:Xr(n).position==="fixed"||kQ(n,e)}function k9(t,e){const n=e.get(t);if(n)return n;let r=Fu(t,[],!1).filter(a=>Fr(a)&&Gl(a)!=="body"),i=null;const s=Xr(t).position==="fixed";let o=s?Fs(t):t;for(;Fr(o)&&!yl(o);){const a=Xr(o),l=ow(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&w9.has(i.position)||Nf(o)&&!l&&kQ(t,o))?r=r.filter(u=>u!==o):i=a,o=Fs(o)}return e.set(t,r),r}function C9(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?Fm(e)?[]:k9(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=fC(e,u,i);return c.top=Dn(f.top,c.top),c.right=Vs(f.right,c.right),c.bottom=Vs(f.bottom,c.bottom),c.left=Dn(f.left,c.left),c},fC(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function P9(t){const{width:e,height:n}=bQ(t);return{width:e,height:n}}function T9(t,e,n){const r=ki(e),i=Pi(e),s=n==="fixed",o=zo(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=wi(0);function c(){l.x=Zm(i)}if(r||!r&&!s)if((Gl(e)!=="body"||Nf(i))&&(a=Xm(e)),r){const h=zo(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?SQ(i,a):wi(0),f=o.left+a.scrollLeft-l.x-u.x,d=o.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:o.width,height:o.height}}function RO(t){return Xr(t).position==="static"}function dC(t,e){if(!ki(t)||Xr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Pi(t)===n&&(n=n.ownerDocument.body),n}function CQ(t,e){const n=Wn(t);if(Fm(t))return n;if(!ki(t)){let i=Fs(t);for(;i&&!yl(i);){if(Fr(i)&&!RO(i))return i;i=Fs(i)}return n}let r=dC(t,e);for(;r&&c9(r)&&RO(r);)r=dC(r,e);return r&&yl(r)&&RO(r)&&!ow(r)?n:r||p9(t)||n}const E9=async function(t){const e=this.getOffsetParent||CQ,n=this.getDimensions,r=await n(t.floating);return{reference:T9(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function R9(t){return Xr(t).direction==="rtl"}const _9={convertOffsetParentRelativeRectToViewportRelativeRect:y9,getDocumentElement:Pi,getClippingRect:C9,getOffsetParent:CQ,getElementRects:E9,getClientRects:v9,getDimensions:P9,getScale:Ha,isElement:Fr,isRTL:R9};function PQ(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function $9(t,e){let n=null,r;const i=Pi(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||e(),!d||!h)return;const O=xd(f),m=xd(i.clientWidth-(u+d)),x=xd(i.clientHeight-(f+h)),y=xd(u),b={rootMargin:-O+"px "+-m+"px "+-x+"px "+-y+"px",threshold:Dn(0,Vs(1,l))||1};let S=!0;function k(w){const C=w[0].intersectionRatio;if(C!==l){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!PQ(c,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(k,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,b)}n.observe(t)}return o(!0),s}function Q9(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=lw(t),u=i||s?[...c?Fu(c):[],...Fu(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?$9(c,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let O,m=l?zo(t):null;l&&x();function x(){const y=zo(t);m&&!PQ(m,y)&&n(),m=y,O=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(O)}}const A9=r9,I9=i9,N9=e9,j9=o9,M9=t9,hC=JW,D9=s9,L9=(t,e,n)=>{const r=new Map,i={platform:_9,...n},s={...i.platform,_c:r};return KW(t,e,{...i,platform:s})};var z9=typeof document<"u",B9=function(){},Sh=z9?g.useLayoutEffect:B9;function Sp(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Sp(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!Sp(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function TQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pC(t,e){const n=TQ(t);return Math.round(e*n)/n}function _O(t){const e=g.useRef(t);return Sh(()=>{e.current=t}),e}function V9(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=g.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=g.useState(r);Sp(d,r)||h(r);const[O,m]=g.useState(null),[x,y]=g.useState(null),v=g.useCallback(j=>{j!==w.current&&(w.current=j,m(j))},[]),b=g.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),S=s||O,k=o||x,w=g.useRef(null),C=g.useRef(null),_=g.useRef(u),I=l!=null,E=_O(l),N=_O(i),Q=_O(c),L=g.useCallback(()=>{if(!w.current||!C.current)return;const j={placement:e,strategy:n,middleware:d};N.current&&(j.platform=N.current),L9(w.current,C.current,j).then(A=>{const P={...A,isPositioned:Q.current!==!1};z.current&&!Sp(_.current,P)&&(_.current=P,Xl.flushSync(()=>{f(P)}))})},[d,e,n,N,Q]);Sh(()=>{c===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[c]);const z=g.useRef(!1);Sh(()=>(z.current=!0,()=>{z.current=!1}),[]),Sh(()=>{if(S&&(w.current=S),k&&(C.current=k),S&&k){if(E.current)return E.current(S,k,L);L()}},[S,k,L,E,I]);const X=g.useMemo(()=>({reference:w,floating:C,setReference:v,setFloating:b}),[v,b]),W=g.useMemo(()=>({reference:S,floating:k}),[S,k]),F=g.useMemo(()=>{const j={position:n,left:0,top:0};if(!W.floating)return j;const A=pC(W.floating,u.x),P=pC(W.floating,u.y);return a?{...j,transform:"translate("+A+"px, "+P+"px)",...TQ(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:P}},[n,a,W.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:L,refs:X,elements:W,floatingStyles:F}),[u,L,X,W,F])}const F9=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?hC({element:r.current,padding:i}).fn(n):{}:r?hC({element:r,padding:i}).fn(n):{}}}},X9=(t,e)=>({...A9(t),options:[t,e]}),Z9=(t,e)=>({...I9(t),options:[t,e]}),W9=(t,e)=>({...D9(t),options:[t,e]}),q9=(t,e)=>({...N9(t),options:[t,e]}),Y9=(t,e)=>({...j9(t),options:[t,e]}),U9=(t,e)=>({...M9(t),options:[t,e]}),H9=(t,e)=>({...F9(t),options:[t,e]});var G9="Arrow",EQ=g.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return p.jsx(ue.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});EQ.displayName=G9;var K9=EQ;function RQ(t){const[e,n]=g.useState(void 0);return Rt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var cw="Popper",[_Q,ro]=Cn(cw),[J9,$Q]=_Q(cw),QQ=t=>{const{__scopePopper:e,children:n}=t,[r,i]=g.useState(null);return p.jsx(J9,{scope:e,anchor:r,onAnchorChange:i,children:n})};QQ.displayName=cw;var AQ="PopperAnchor",IQ=g.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=$Q(AQ,n),o=g.useRef(null),a=Ce(e,o),l=g.useRef(null);return g.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||o.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(ue.div,{...i,ref:a})});IQ.displayName=AQ;var uw="PopperContent",[e6,t6]=_Q(uw),NQ=g.forwardRef((t,e)=>{var Y,pe,me,ye,Pe,Ne;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:O,...m}=t,x=$Q(uw,n),[y,v]=g.useState(null),b=Ce(e,St=>v(St)),[S,k]=g.useState(null),w=RQ(S),C=(w==null?void 0:w.width)??0,_=(w==null?void 0:w.height)??0,I=r+(s!=="center"?"-"+s:""),E=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(c)?c:[c],Q=N.length>0,L={padding:E,boundary:N.filter(r6),altBoundary:Q},{refs:z,floatingStyles:X,placement:W,isPositioned:F,middlewareData:j}=V9({strategy:"fixed",placement:I,whileElementsMounted:(...St)=>Q9(...St,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[X9({mainAxis:i+_,alignmentAxis:o}),l&&Z9({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?W9():void 0,...L}),l&&q9({...L}),Y9({...L,apply:({elements:St,rects:ln,availableWidth:Gr,availableHeight:Sr})=>{const{width:Kr,height:co}=ln.reference,$i=St.floating.style;$i.setProperty("--radix-popper-available-width",`${Gr}px`),$i.setProperty("--radix-popper-available-height",`${Sr}px`),$i.setProperty("--radix-popper-anchor-width",`${Kr}px`),$i.setProperty("--radix-popper-anchor-height",`${co}px`)}}),S&&H9({element:S,padding:a}),i6({arrowWidth:C,arrowHeight:_}),d&&U9({strategy:"referenceHidden",...L})]}),[A,P]=DQ(W),M=Zt(O);Rt(()=>{F&&(M==null||M())},[F,M]);const $=(Y=j.arrow)==null?void 0:Y.x,R=(pe=j.arrow)==null?void 0:pe.y,q=((me=j.arrow)==null?void 0:me.centerOffset)!==0,[H,ie]=g.useState();return Rt(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:F?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ye=j.transformOrigin)==null?void 0:ye.x,(Pe=j.transformOrigin)==null?void 0:Pe.y].join(" "),...((Ne=j.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(e6,{scope:n,placedSide:A,onArrowChange:k,arrowX:$,arrowY:R,shouldHideArrow:q,children:p.jsx(ue.div,{"data-side":A,"data-align":P,...m,ref:b,style:{...m.style,animation:F?void 0:"none"}})})})});NQ.displayName=uw;var jQ="PopperArrow",n6={top:"bottom",right:"left",bottom:"top",left:"right"},MQ=g.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=t6(jQ,r),o=n6[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(K9,{...i,ref:n,style:{...i.style,display:"block"}})})});MQ.displayName=jQ;function r6(t){return t!==null}var i6=t=>({name:"transformOrigin",options:t,fn(e){var x,y,v;const{placement:n,rects:r,middlewareData:i}=e,o=((x=i.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=DQ(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let O="",m="";return c==="bottom"?(O=o?f:`${d}px`,m=`${-l}px`):c==="top"?(O=o?f:`${d}px`,m=`${r.floating.height+l}px`):c==="right"?(O=`${-l}px`,m=o?f:`${h}px`):c==="left"&&(O=`${r.floating.width+l}px`,m=o?f:`${h}px`),{data:{x:O,y:m}}}});function DQ(t){const[e,n="center"]=t.split("-");return[e,n]}var LQ=QQ,jf=IQ,Wm=NQ,qm=MQ,s6="Portal",Mf=g.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=g.useState(!1);Rt(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?k$.createPortal(p.jsx(ue.div,{...r,ref:e}),o):null});Mf.displayName=s6;function o6(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}var _t=t=>{const{present:e,children:n}=t,r=a6(e),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Ce(r.ref,l6(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:s}):null};_t.displayName="Presence";function a6(t){const[e,n]=g.useState(),r=g.useRef(null),i=g.useRef(t),s=g.useRef("none"),o=t?"mounted":"unmounted",[a,l]=o6(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=bd(r.current);s.current=a==="mounted"?c:"none"},[a]),Rt(()=>{const c=r.current,u=i.current;if(u!==t){const d=s.current,h=bd(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Rt(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=h=>{const m=bd(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(l("ANIMATION_END"),!i.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},d=h=>{h.target===e&&(s.current=bd(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function bd(t){return(t==null?void 0:t.animationName)||"none"}function l6(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var c6=Symbol("radix.slottable");function u6(t){const e=({children:n})=>p.jsx(p.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=c6,e}var f6=eb[" useInsertionEffect ".trim().toString()]||Rt;function Xs({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=d6({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const u=g.useRef(t!==void 0);g.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=g.useCallback(u=>{var f;if(a){const d=h6(u)?u(t):u;d!==t&&((f=o.current)==null||f.call(o,d))}else s(u)},[a,t,s,o]);return[l,c]}function d6({defaultProp:t,onChange:e}){const[n,r]=g.useState(t),i=g.useRef(n),s=g.useRef(e);return f6(()=>{s.current=e},[e]),g.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function h6(t){return typeof t=="function"}var zQ=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"}),p6="VisuallyHidden",BQ=g.forwardRef((t,e)=>p.jsx(ue.span,{...t,ref:e,style:{...zQ,...t.style}}));BQ.displayName=p6;var m6=BQ,[Ym]=Cn("Tooltip",[ro]),Um=ro(),VQ="TooltipProvider",g6=700,dx="tooltip.open",[O6,fw]=Ym(VQ),FQ=t=>{const{__scopeTooltip:e,delayDuration:n=g6,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,o=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(O6,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:s})};FQ.displayName=VQ;var Xu="Tooltip",[y6,Hm]=Ym(Xu),XQ=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=t,l=fw(Xu,t.__scopeTooltip),c=Um(e),[u,f]=g.useState(null),d=qt(),h=g.useRef(0),O=o??l.disableHoverableContent,m=a??l.delayDuration,x=g.useRef(!1),[y,v]=Xs({prop:r,defaultProp:i??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(dx))):l.onClose(),s==null||s(C)},caller:Xu}),b=g.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),S=g.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,v(!0)},[v]),k=g.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v(!1)},[v]),w=g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,v(!0),h.current=0},m)},[m,v]);return g.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(LQ,{...c,children:p.jsx(y6,{scope:e,contentId:d,open:y,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayedRef.current?w():S()},[l.isOpenDelayedRef,w,S]),onTriggerLeave:g.useCallback(()=>{O?k():(window.clearTimeout(h.current),h.current=0)},[k,O]),onOpen:S,onClose:k,disableHoverableContent:O,children:n})})};XQ.displayName=Xu;var hx="TooltipTrigger",ZQ=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Hm(hx,n),s=fw(hx,n),o=Um(n),a=g.useRef(null),l=Ce(e,a,i.onTriggerChange),c=g.useRef(!1),u=g.useRef(!1),f=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jf,{asChild:!0,...o,children:p.jsx(ue.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:ne(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:ne(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:ne(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ne(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:ne(t.onBlur,i.onClose),onClick:ne(t.onClick,i.onClose)})})});ZQ.displayName=hx;var v6="TooltipPortal",[fxe,x6]=Ym(v6,{forceMount:void 0}),vl="TooltipContent",WQ=g.forwardRef((t,e)=>{const n=x6(vl,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,o=Hm(vl,t.__scopeTooltip);return p.jsx(_t,{present:r||o.open,children:o.disableHoverableContent?p.jsx(qQ,{side:i,...s,ref:e}):p.jsx(b6,{side:i,...s,ref:e})})}),b6=g.forwardRef((t,e)=>{const n=Hm(vl,t.__scopeTooltip),r=fw(vl,t.__scopeTooltip),i=g.useRef(null),s=Ce(e,i),[o,a]=g.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:f}=r,d=g.useCallback(()=>{a(null),f(!1)},[f]),h=g.useCallback((O,m)=>{const x=O.currentTarget,y={x:O.clientX,y:O.clientY},v=P6(y,x.getBoundingClientRect()),b=T6(y,v),S=E6(m.getBoundingClientRect()),k=_6([...b,...S]);a(k),f(!0)},[f]);return g.useEffect(()=>()=>d(),[d]),g.useEffect(()=>{if(l&&u){const O=x=>h(x,u),m=x=>h(x,l);return l.addEventListener("pointerleave",O),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",O),u.removeEventListener("pointerleave",m)}}},[l,u,h,d]),g.useEffect(()=>{if(o){const O=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),b=!R6(y,o);v?d():b&&(d(),c())};return document.addEventListener("pointermove",O),()=>document.removeEventListener("pointermove",O)}},[l,u,o,c,d]),p.jsx(qQ,{...t,ref:s})}),[w6,S6]=Ym(Xu,{isInside:!1}),k6=u6("TooltipContent"),qQ=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=Hm(vl,n),c=Um(n),{onClose:u}=l;return g.useEffect(()=>(document.addEventListener(dx,u),()=>document.removeEventListener(dx,u)),[u]),g.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),p.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Wm,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(k6,{children:r}),p.jsx(w6,{scope:n,isInside:!0,children:p.jsx(m6,{id:l.contentId,role:"tooltip",children:i||r})})]})})});WQ.displayName=vl;var YQ="TooltipArrow",C6=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Um(n);return S6(YQ,n).isInside?null:p.jsx(qm,{...i,...r,ref:e})});C6.displayName=YQ;function P6(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function T6(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function E6(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function R6(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,f=l.x,d=l.y;u>r!=d>r&&n<(f-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function _6(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$6(e)}function $6(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Q6=FQ,A6=XQ,I6=ZQ,UQ=WQ;const Zu=Q6,Bn=A6,Vn=I6,yn=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(UQ,{ref:r,sideOffset:e,className:le("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));yn.displayName=UQ.displayName;async function Ts(t,e){const n=Ao(),r=await fetch(t,{...e,headers:{"Content-Type":"application/json",...n,...e==null?void 0:e.headers}});if(!r.ok){const i=await r.json().catch(()=>({message:"Request failed"}));throw new Error(i.message||`HTTP ${r.status}`)}return r.json()}const Ga={async get(t,e){return Ts(t,{...e,method:"GET"})},async post(t,e,n){return Ts(t,{...n,method:"POST",body:e?JSON.stringify(e):void 0})},async put(t,e,n){return Ts(t,{...n,method:"PUT",body:e?JSON.stringify(e):void 0})},async delete(t,e){return Ts(t,{...e,method:"DELETE"})}},kp=sa((t,e)=>({query:"",scope:"notes",mode:"hybrid",language:null,pathFilter:null,tags:[],results:{notes:[],code:[]},isSearching:!1,error:null,limit:10,offset:0,hasMore:!1,isCommandPaletteOpen:!1,setQuery:n=>t({query:n}),setScope:n=>t({scope:n}),setMode:n=>t({mode:n}),setLanguage:n=>t({language:n}),setPathFilter:n=>t({pathFilter:n}),setTags:n=>t({tags:n}),search:async()=>{const n=e();if(!n.query.trim()){t({results:{notes:[],code:[]}});return}t({isSearching:!0,error:null,offset:0});try{const r={notes:[],code:[]};console.log("[Search] Starting search with query:",n.query,"scope:",n.scope,"mode:",n.mode);const i=new URLSearchParams({q:n.query,limit:String(n.limit)}),s=n.mode==="text"?"text":n.mode==="semantic"?"semantic":"hybrid";if(n.scope==="all"||n.scope==="notes")try{if(n.mode==="grep"){const a=new URLSearchParams({pattern:n.query,limit:String(n.limit)});n.pathFilter&&a.set("folder",n.pathFilter);const l=await Ts(`/api/notes/grep?${a}`);console.log("[Search] Grep response:",l),r.notes=(l.results??[]).flatMap(c=>c.matches.map(u=>{var f;return{path:c.path,section:`Line ${u.line}`,score:1,content:u.content,title:((f=c.path.split("/").pop())==null?void 0:f.replace(".md",""))||c.path,tags:[],links:[]}}))}else{const a=new URLSearchParams(i);a.set("mode",s),n.pathFilter&&a.set("folder",n.pathFilter),n.tags.length>0&&a.set("tags",n.tags.join(","));const l=await Ts(`/api/notes/search?${a}`);console.log("[Search] Notes response:",l),r.notes=l.results??[]}}catch(a){console.error("Notes search failed:",a)}if(n.scope==="all"||n.scope==="code")try{if(n.mode==="grep"){const a=new URLSearchParams({pattern:n.query,limit:String(n.limit)});n.language&&a.set("language",n.language);const l=await Ts(`/api/code/grep?${a}`);console.log("[Search] Code grep response:",l),r.code=(l.results??[]).flatMap(c=>c.matches.map((u,f)=>({id:`${c.relativePath}:${u.line}:${f}`,name:c.relativePath.split("/").pop()||c.relativePath,type:c.language,path:c.path,relativePath:c.relativePath,signature:null,docstring:null,startLine:u.line,endLine:u.line,score:1,content:u.content})))}else{const a=new URLSearchParams(i);a.set("mode",s),n.pathFilter&&a.set("path",n.pathFilter),n.language&&a.set("language",n.language);const l=await Ts(`/api/code/search?${a}`);console.log("[Search] Code response:",l),r.code=(l.results??[]).filter(c=>c==null?void 0:c.symbol).map(c=>({id:c.symbol.id,name:c.symbol.name,type:c.symbol.type,path:c.symbol.path,relativePath:c.symbol.relativePath,signature:c.symbol.signature,docstring:c.symbol.docstring,startLine:c.symbol.startLine,endLine:c.symbol.endLine,score:c.score,content:c.content}))}}catch(a){console.error("Code search failed:",a)}const o=r.notes.length+r.code.length;console.log("[Search] Final results:",r,"total:",o),t({results:r,isSearching:!1,hasMore:o>=n.limit})}catch(r){t({isSearching:!1,error:r instanceof Error?r.message:"Search failed"})}},loadMore:async()=>{const n=e();if(!n.hasMore||n.isSearching)return;const r=n.offset+n.limit;t({isSearching:!0,offset:r});try{t({isSearching:!1,hasMore:!1})}catch(i){t({isSearching:!1,error:i instanceof Error?i.message:"Failed to load more"})}},clearResults:()=>{t({query:"",results:{notes:[],code:[]},offset:0,hasMore:!1})},resetResults:()=>{t({results:{notes:[],code:[]},offset:0,hasMore:!1})},openCommandPalette:()=>t({isCommandPaletteOpen:!0}),closeCommandPalette:()=>t({isCommandPaletteOpen:!1}),toggleCommandPalette:()=>t(n=>({isCommandPaletteOpen:!n.isCommandPaletteOpen}))}));typeof window<"u"&&document.addEventListener("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),kp.getState().toggleCommandPalette()),t.key==="Escape"&&kp.getState().closeCommandPalette()});const N6={name:"",vaultPaths:["./vault"],lancedb:{dbPath:"./.lancedb"},embedding:{provider:"wasm"},code:{enabled:!1,include:["**/*.ts","**/*.tsx","**/*.js","**/*.jsx"],exclude:["node_modules/**","dist/**",".git/**"]},gitSync:{enabled:!0,autoSyncOnStartup:!0}},Kl=sa((t,e)=>({isOpen:!1,mode:"edit",activeTab:"general",config:null,originalConfig:null,projectPath:null,isDirty:!1,errors:{},isLoading:!1,isSaving:!1,createPath:"",openSettings:async()=>{t({isOpen:!0,mode:"edit",activeTab:"general",isLoading:!0,errors:{}}),await e().loadConfig()},openCreateWizard:()=>{t({isOpen:!0,mode:"create",activeTab:"general",config:{...N6},originalConfig:null,projectPath:null,createPath:"",isDirty:!1,errors:{},isLoading:!1})},closeModal:()=>{t({isOpen:!1,config:null,originalConfig:null,projectPath:null,isDirty:!1,errors:{},isLoading:!1,isSaving:!1,createPath:""})},setActiveTab:n=>{t({activeTab:n})},loadConfig:async()=>{t({isLoading:!0});try{const n=await fetch("/api/project/config",{headers:{...Ao()}});if(!n.ok){const i=await n.json().catch(()=>({}));throw new Error(i.message||"Failed to load config")}const r=await n.json();t({config:r.config,originalConfig:JSON.parse(JSON.stringify(r.config)),projectPath:r.path,isDirty:!1,isLoading:!1})}catch(n){t({isLoading:!1,errors:{_general:n instanceof Error?n.message:"Failed to load config"}})}},updateConfig:(n,r)=>{const{config:i,originalConfig:s}=e();if(!i)return;const o={...i,[n]:r};t({config:o,isDirty:JSON.stringify(o)!==JSON.stringify(s)})},updateNestedConfig:(n,r)=>{const{config:i,originalConfig:s}=e();if(!i)return;const o=i[n],a={...i,[n]:{...typeof o=="object"&&o!==null?o:{},...r}};t({config:a,isDirty:JSON.stringify(a)!==JSON.stringify(s)})},saveConfig:async()=>{var a;const{config:n,mode:r,createPath:i}=e();if(!n)return!1;const s={};if(r==="create"&&!(i!=null&&i.trim()))return s._general="Project path is required",t({errors:s}),!1;const o=Dm.getState();if(n.embedding.provider==="voyage"&&!((a=o.voyageApiKey)!=null&&a.trim())&&(s.voyageApiKey="Voyage API key is required"),Object.keys(s).length>0)return t({errors:s}),!1;t({isSaving:!0,errors:{}});try{if(r==="create"){const l={path:i,config:{name:n.name,vaultPaths:n.vaultPaths,lancedb:n.lancedb,embedding:n.embedding,code:n.code,gitSync:n.gitSync}},c=await fetch("/api/project/create",{method:"POST",headers:{"Content-Type":"application/json",...Ao()},body:JSON.stringify(l)});if(!c.ok){const f=await c.json().catch(()=>({}));throw new Error(f.message||"Failed to create project")}const u=await c.json();return t({isSaving:!1,config:u.config,originalConfig:JSON.parse(JSON.stringify(u.config)),projectPath:u.path,isDirty:!1}),!0}else{const l=await fetch("/api/project/config",{method:"PUT",headers:{"Content-Type":"application/json",...Ao()},body:JSON.stringify(n)});if(!l.ok){const u=await l.json().catch(()=>({}));throw new Error(u.message||"Failed to save config")}const c=await l.json();return t({isSaving:!1,config:c.config,originalConfig:JSON.parse(JSON.stringify(c.config)),isDirty:!1}),!0}}catch(l){return t({isSaving:!1,errors:{_general:l instanceof Error?l.message:"Failed to save config"}}),!1}},resetConfig:()=>{const{originalConfig:n}=e();n&&t({config:JSON.parse(JSON.stringify(n)),isDirty:!1,errors:{}})},setError:(n,r)=>{t(i=>({errors:r?{...i.errors,[n]:r}:Object.fromEntries(Object.entries(i.errors).filter(([s])=>s!==n))}))},clearErrors:()=>{t({errors:{}})},setCreatePath:n=>{t({createPath:n})},createProject:async()=>e().saveConfig()}));var $O="focusScope.autoFocusOnMount",QO="focusScope.autoFocusOnUnmount",mC={bubbles:!1,cancelable:!0},j6="FocusScope",Df=g.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=g.useState(null),c=Zt(i),u=Zt(s),f=g.useRef(null),d=Ce(e,m=>l(m)),h=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let m=function(b){if(h.paused||!a)return;const S=b.target;a.contains(S)?f.current=S:Os(f.current,{select:!0})},x=function(b){if(h.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||Os(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&Os(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),v.disconnect()}}},[r,a,h.paused]),g.useEffect(()=>{if(a){OC.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent($O,mC);a.addEventListener($O,c),a.dispatchEvent(y),y.defaultPrevented||(M6(V6(HQ(a)),{select:!0}),document.activeElement===m&&Os(a))}return()=>{a.removeEventListener($O,c),setTimeout(()=>{const y=new CustomEvent(QO,mC);a.addEventListener(QO,u),a.dispatchEvent(y),y.defaultPrevented||Os(m??document.body,{select:!0}),a.removeEventListener(QO,u),OC.remove(h)},0)}}},[a,c,u,h]);const O=g.useCallback(m=>{if(!n&&!r||h.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const v=m.currentTarget,[b,S]=D6(v);b&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&Os(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&Os(S,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return p.jsx(ue.div,{tabIndex:-1,...o,ref:d,onKeyDown:O})});Df.displayName=j6;function M6(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Os(r,{select:e}),document.activeElement!==n)return}function D6(t){const e=HQ(t),n=gC(e,t),r=gC(e.reverse(),t);return[n,r]}function HQ(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function gC(t,e){for(const n of t)if(!L6(n,{upTo:e}))return n}function L6(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function z6(t){return t instanceof HTMLInputElement&&"select"in t}function Os(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&z6(t)&&e&&t.select()}}var OC=B6();function B6(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=yC(t,e),t.unshift(e)},remove(e){var n;t=yC(t,e),(n=t[0])==null||n.resume()}}}function yC(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function V6(t){return t.filter(e=>e.tagName!=="A")}var AO=0;function Gm(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??vC()),document.body.insertAdjacentElement("beforeend",t[1]??vC()),AO++,()=>{AO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),AO--}},[])}function vC(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var fi=function(){return fi=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},fi.apply(this,arguments)};function GQ(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function F6(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var kh="right-scroll-bar-position",Ch="width-before-scroll-bar",X6="with-scroll-bars-hidden",Z6="--removed-body-scroll-bar-size";function IO(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function W6(t,e){var n=g.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var q6=typeof window<"u"?g.useLayoutEffect:g.useEffect,xC=new WeakMap;function Y6(t,e){var n=W6(null,function(r){return t.forEach(function(i){return IO(i,r)})});return q6(function(){var r=xC.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(a){s.has(a)||IO(a,null)}),s.forEach(function(a){i.has(a)||IO(a,o)})}xC.set(n,t)},[t]),n}function U6(t){return t}function H6(t,e){e===void 0&&(e=U6);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function G6(t){t===void 0&&(t={});var e=H6(null);return e.options=fi({async:!0,ssr:!1},t),e}var KQ=function(t){var e=t.sideCar,n=GQ(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,fi({},n))};KQ.isSideCarExport=!0;function K6(t,e){return t.useMedium(e),KQ}var JQ=G6(),NO=function(){},Km=g.forwardRef(function(t,e){var n=g.useRef(null),r=g.useState({onScrollCapture:NO,onWheelCapture:NO,onTouchMoveCapture:NO}),i=r[0],s=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,O=t.noIsolation,m=t.inert,x=t.allowPinchZoom,y=t.as,v=y===void 0?"div":y,b=t.gapMode,S=GQ(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,w=Y6([n,e]),C=fi(fi({},S),i);return g.createElement(g.Fragment,null,u&&g.createElement(k,{sideCar:JQ,removeScrollBar:c,shards:f,noRelative:h,noIsolation:O,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(a),fi(fi({},C),{ref:w})):g.createElement(v,fi({},C,{className:l,ref:w}),a))});Km.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Km.classNames={fullWidth:Ch,zeroRight:kh};var J6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function e7(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=J6();return e&&t.setAttribute("nonce",e),t}function t7(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function n7(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var r7=function(){var t=0,e=null;return{add:function(n){t==0&&(e=e7())&&(t7(e,n),n7(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},i7=function(){var t=r7();return function(e,n){g.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},eA=function(){var t=i7(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},s7={left:0,top:0,right:0,gap:0},jO=function(t){return parseInt(t||"",10)||0},o7=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[jO(n),jO(r),jO(i)]},a7=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return s7;var e=o7(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},l7=eA(),Ka="data-scroll-locked",c7=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
389
|
+
.`.concat(X6,` {
|
|
390
|
+
overflow: hidden `).concat(r,`;
|
|
391
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
392
|
+
}
|
|
393
|
+
body[`).concat(Ka,`] {
|
|
394
|
+
overflow: hidden `).concat(r,`;
|
|
395
|
+
overscroll-behavior: contain;
|
|
396
|
+
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
397
|
+
padding-left: `.concat(i,`px;
|
|
398
|
+
padding-top: `).concat(s,`px;
|
|
399
|
+
padding-right: `).concat(o,`px;
|
|
400
|
+
margin-left:0;
|
|
401
|
+
margin-top:0;
|
|
402
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
403
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.`).concat(kh,` {
|
|
407
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.`).concat(Ch,` {
|
|
411
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.`).concat(kh," .").concat(kh,` {
|
|
415
|
+
right: 0 `).concat(r,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.`).concat(Ch," .").concat(Ch,` {
|
|
419
|
+
margin-right: 0 `).concat(r,`;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
body[`).concat(Ka,`] {
|
|
423
|
+
`).concat(Z6,": ").concat(a,`px;
|
|
424
|
+
}
|
|
425
|
+
`)},bC=function(){var t=parseInt(document.body.getAttribute(Ka)||"0",10);return isFinite(t)?t:0},u7=function(){g.useEffect(function(){return document.body.setAttribute(Ka,(bC()+1).toString()),function(){var t=bC()-1;t<=0?document.body.removeAttribute(Ka):document.body.setAttribute(Ka,t.toString())}},[])},f7=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;u7();var s=g.useMemo(function(){return a7(i)},[i]);return g.createElement(l7,{styles:c7(s,!e,i,n?"":"!important")})},px=!1;if(typeof window<"u")try{var wd=Object.defineProperty({},"passive",{get:function(){return px=!0,!0}});window.addEventListener("test",wd,wd),window.removeEventListener("test",wd,wd)}catch{px=!1}var pa=px?{passive:!1}:!1,d7=function(t){return t.tagName==="TEXTAREA"},tA=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!d7(t)&&n[e]==="visible")},h7=function(t){return tA(t,"overflowY")},p7=function(t){return tA(t,"overflowX")},wC=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=nA(t,r);if(i){var s=rA(t,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},m7=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},g7=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},nA=function(t,e){return t==="v"?h7(e):p7(e)},rA=function(t,e){return t==="v"?m7(e):g7(e)},O7=function(t,e){return t==="h"&&e==="rtl"?-1:1},y7=function(t,e,n,r,i){var s=O7(t,window.getComputedStyle(e).direction),o=s*r,a=n.target,l=e.contains(a),c=!1,u=o>0,f=0,d=0;do{if(!a)break;var h=rA(t,a),O=h[0],m=h[1],x=h[2],y=m-x-s*O;(O||y)&&nA(t,a)&&(f+=y,d+=O);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(c=!0),c},Sd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},SC=function(t){return[t.deltaX,t.deltaY]},kC=function(t){return t&&"current"in t?t.current:t},v7=function(t,e){return t[0]===e[0]&&t[1]===e[1]},x7=function(t){return`
|
|
426
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
427
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
428
|
+
`)},b7=0,ma=[];function w7(t){var e=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(b7++)[0],s=g.useState(eA)[0],o=g.useRef(t);g.useEffect(function(){o.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=F6([t.lockRef.current],(t.shards||[]).map(kC),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=g.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Sd(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-y[0],S="deltaY"in m?m.deltaY:v[1]-y[1],k,w=m.target,C=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&w.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,E=I?I===w||I.contains(w):!1;if(E)return!1;var N=wC(C,w);if(!N)return!0;if(N?k=C:(k=C==="v"?"h":"v",N=wC(C,w)),!N)return!1;if(!r.current&&"changedTouches"in m&&(b||S)&&(r.current=k),!k)return!0;var Q=r.current||k;return y7(Q,x,m,Q==="h"?b:S)},[]),l=g.useCallback(function(m){var x=m;if(!(!ma.length||ma[ma.length-1]!==s)){var y="deltaY"in x?SC(x):Sd(x),v=e.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&v7(k.delta,y)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(kC).filter(Boolean).filter(function(k){return k.contains(x.target)}),S=b.length>0?a(x,b[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),c=g.useCallback(function(m,x,y,v){var b={name:m,delta:x,target:y,should:v,shadowParent:S7(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(S){return S!==b})},1)},[]),u=g.useCallback(function(m){n.current=Sd(m),r.current=void 0},[]),f=g.useCallback(function(m){c(m.type,SC(m),m.target,a(m,t.lockRef.current))},[]),d=g.useCallback(function(m){c(m.type,Sd(m),m.target,a(m,t.lockRef.current))},[]);g.useEffect(function(){return ma.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pa),document.addEventListener("touchmove",l,pa),document.addEventListener("touchstart",u,pa),function(){ma=ma.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,pa),document.removeEventListener("touchmove",l,pa),document.removeEventListener("touchstart",u,pa)}},[]);var h=t.removeScrollBar,O=t.inert;return g.createElement(g.Fragment,null,O?g.createElement(s,{styles:x7(i)}):null,h?g.createElement(f7,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function S7(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const k7=K6(JQ,w7);var Lf=g.forwardRef(function(t,e){return g.createElement(Km,fi({},t,{ref:e,sideCar:k7}))});Lf.classNames=Km.classNames;var C7=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ga=new WeakMap,kd=new WeakMap,Cd={},MO=0,iA=function(t){return t&&(t.host||iA(t.parentNode))},P7=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=iA(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},T7=function(t,e,n,r){var i=P7(e,Array.isArray(t)?t:[t]);Cd[n]||(Cd[n]=new WeakMap);var s=Cd[n],o=[],a=new Set,l=new Set(i),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(r),O=h!==null&&h!=="false",m=(ga.get(d)||0)+1,x=(s.get(d)||0)+1;ga.set(d,m),s.set(d,x),o.push(d),m===1&&O&&kd.set(d,!0),x===1&&d.setAttribute(n,"true"),O||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(e),a.clear(),MO++,function(){o.forEach(function(f){var d=ga.get(f)-1,h=s.get(f)-1;ga.set(f,d),s.set(f,h),d||(kd.has(f)||f.removeAttribute(r),kd.delete(f)),h||f.removeAttribute(n)}),MO--,MO||(ga=new WeakMap,ga=new WeakMap,kd=new WeakMap,Cd={})}},Jm=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=C7(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),T7(r,i,n,"aria-hidden")):function(){return null}};function E7(t){const e=R7(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find($7);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function R7(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=A7(i),a=Q7(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var _7=Symbol("radix.slottable");function $7(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===_7}function Q7(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function A7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var eg="Dialog",[sA]=Cn(eg),[I7,qr]=sA(eg),oA=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=g.useRef(null),l=g.useRef(null),[c,u]=Xs({prop:r,defaultProp:i??!1,onChange:s,caller:eg});return p.jsx(I7,{scope:e,triggerRef:a,contentRef:l,contentId:qt(),titleId:qt(),descriptionId:qt(),open:c,onOpenChange:u,onOpenToggle:g.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};oA.displayName=eg;var aA="DialogTrigger",N7=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(aA,n),s=Ce(e,i.triggerRef);return p.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":pw(i.open),...r,ref:s,onClick:ne(t.onClick,i.onOpenToggle)})});N7.displayName=aA;var dw="DialogPortal",[j7,lA]=sA(dw,{forceMount:void 0}),cA=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=qr(dw,e);return p.jsx(j7,{scope:e,forceMount:n,children:g.Children.map(r,o=>p.jsx(_t,{present:n||s.open,children:p.jsx(Mf,{asChild:!0,container:i,children:o})}))})};cA.displayName=dw;var Cp="DialogOverlay",uA=g.forwardRef((t,e)=>{const n=lA(Cp,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=qr(Cp,t.__scopeDialog);return s.modal?p.jsx(_t,{present:r||s.open,children:p.jsx(D7,{...i,ref:e})}):null});uA.displayName=Cp;var M7=E7("DialogOverlay.RemoveScroll"),D7=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(Cp,n);return p.jsx(Lf,{as:M7,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(ue.div,{"data-state":pw(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Bo="DialogContent",fA=g.forwardRef((t,e)=>{const n=lA(Bo,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=qr(Bo,t.__scopeDialog);return p.jsx(_t,{present:r||s.open,children:s.modal?p.jsx(L7,{...i,ref:e}):p.jsx(z7,{...i,ref:e})})});fA.displayName=Bo;var L7=g.forwardRef((t,e)=>{const n=qr(Bo,t.__scopeDialog),r=g.useRef(null),i=Ce(e,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return Jm(s)},[]),p.jsx(dA,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ne(t.onFocusOutside,s=>s.preventDefault())})}),z7=g.forwardRef((t,e)=>{const n=qr(Bo,t.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return p.jsx(dA,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),dA=g.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=qr(Bo,n),l=g.useRef(null),c=Ce(e,l);return Gm(),p.jsxs(p.Fragment,{children:[p.jsx(Df,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(Ul,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pw(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(B7,{titleId:a.titleId}),p.jsx(F7,{contentRef:l,descriptionId:a.descriptionId})]})]})}),hw="DialogTitle",hA=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(hw,n);return p.jsx(ue.h2,{id:i.titleId,...r,ref:e})});hA.displayName=hw;var pA="DialogDescription",mA=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(pA,n);return p.jsx(ue.p,{id:i.descriptionId,...r,ref:e})});mA.displayName=pA;var gA="DialogClose",OA=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(gA,n);return p.jsx(ue.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,()=>i.onOpenChange(!1))})});OA.displayName=gA;function pw(t){return t?"open":"closed"}var yA="DialogTitleWarning",[dxe,vA]=bW(yA,{contentName:Bo,titleName:hw,docsSlug:"dialog"}),B7=({titleId:t})=>{const e=vA(yA),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
429
|
+
|
|
430
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
431
|
+
|
|
432
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},V7="DialogDescriptionWarning",F7=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vA(V7).contentName}}.`;return g.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},xA=oA,bA=cA,mw=uA,gw=fA,wA=hA,SA=mA,X7=OA;const Wu=xA,Z7=bA,kA=g.forwardRef(({className:t,...e},n)=>p.jsx(mw,{ref:n,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));kA.displayName=mw.displayName;const xl=g.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(Z7,{children:[p.jsx(kA,{}),p.jsxs(gw,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,p.jsxs(X7,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(Ol,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xl.displayName=gw.displayName;const Vo=({className:t,...e})=>p.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Vo.displayName="DialogHeader";const Fo=({className:t,...e})=>p.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Fo.displayName="DialogFooter";const Xo=g.forwardRef(({className:t,...e},n)=>p.jsx(wA,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",t),...e}));Xo.displayName=wA.displayName;const Zo=g.forwardRef(({className:t,...e},n)=>p.jsx(SA,{ref:n,className:le("text-sm text-muted-foreground",t),...e}));Zo.displayName=SA.displayName;var tg="Collapsible",[W7]=Cn(tg),[q7,Ow]=W7(tg),CA=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l,c]=Xs({prop:r,defaultProp:i??!1,onChange:o,caller:tg});return p.jsx(q7,{scope:n,disabled:s,contentId:qt(),open:l,onOpenToggle:g.useCallback(()=>c(u=>!u),[c]),children:p.jsx(ue.div,{"data-state":vw(l),"data-disabled":s?"":void 0,...a,ref:e})})});CA.displayName=tg;var PA="CollapsibleTrigger",TA=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Ow(PA,n);return p.jsx(ue.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":vw(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:ne(t.onClick,i.onOpenToggle)})});TA.displayName=PA;var yw="CollapsibleContent",EA=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ow(yw,t.__scopeCollapsible);return p.jsx(_t,{present:n||i.open,children:({present:s})=>p.jsx(Y7,{...r,ref:e,present:s})})});EA.displayName=yw;var Y7=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,o=Ow(yw,n),[a,l]=g.useState(r),c=g.useRef(null),u=Ce(e,c),f=g.useRef(0),d=f.current,h=g.useRef(0),O=h.current,m=o.open||a,x=g.useRef(m),y=g.useRef(void 0);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),Rt(()=>{const v=c.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,h.current=b.width,x.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),l(r)}},[o.open,r]),p.jsx(ue.div,{"data-state":vw(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":O?`${O}px`:void 0,...t.style},children:m&&i})});function vw(t){return t?"open":"closed"}var U7=CA;const xw=U7,bw=TA,ww=EA;function H7(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=f=>{var y;const{scope:d,children:h,...O}=f,m=((y=d==null?void 0:d[t])==null?void 0:y[l])||a,x=g.useMemo(()=>O,Object.values(O));return p.jsx(m.Provider,{value:x,children:h})};c.displayName=s+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[l])||a,O=g.useContext(h);if(O)return O;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,G7(i,...e)]}function G7(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var K7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RA=K7.reduce((t,e)=>{const n=Bm(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),Sw="Progress",kw=100,[J7]=H7(Sw),[e8,t8]=J7(Sw),_A=g.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=n8,...o}=t;(i||i===0)&&!CC(i)&&console.error(r8(`${i}`,"Progress"));const a=CC(i)?i:kw;r!==null&&!PC(r,a)&&console.error(i8(`${r}`,"Progress"));const l=PC(r,a)?r:null,c=Pp(l)?s(l,a):void 0;return p.jsx(e8,{scope:n,value:l,max:a,children:p.jsx(RA.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Pp(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":AA(l,a),"data-value":l??void 0,"data-max":a,...o,ref:e})})});_A.displayName=Sw;var $A="ProgressIndicator",QA=g.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,i=t8($A,n);return p.jsx(RA.div,{"data-state":AA(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:e})});QA.displayName=$A;function n8(t,e){return`${Math.round(t/e*100)}%`}function AA(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Pp(t){return typeof t=="number"}function CC(t){return Pp(t)&&!isNaN(t)&&t>0}function PC(t,e){return Pp(t)&&!isNaN(t)&&t<=e&&t>=0}function r8(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${kw}\`.`}function i8(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
433
|
+
- a positive number
|
|
434
|
+
- less than the value passed to \`max\` (or ${kw} if no \`max\` prop is set)
|
|
435
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
436
|
+
|
|
437
|
+
Defaulting to \`null\`.`}var IA=_A,s8=QA;const Cw=g.forwardRef(({className:t,value:e,...n},r)=>p.jsx(IA,{ref:r,className:le("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:p.jsx(s8,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));Cw.displayName=IA.displayName;var o8=g.createContext(void 0);function zf(t){const e=g.useContext(o8);return t||e||"ltr"}function mx(t,[e,n]){return Math.min(n,Math.max(e,t))}function a8(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}var Pw="ScrollArea",[NA]=Cn(Pw),[l8,xr]=NA(Pw),jA=g.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...o}=t,[a,l]=g.useState(null),[c,u]=g.useState(null),[f,d]=g.useState(null),[h,O]=g.useState(null),[m,x]=g.useState(null),[y,v]=g.useState(0),[b,S]=g.useState(0),[k,w]=g.useState(!1),[C,_]=g.useState(!1),I=Ce(e,N=>l(N)),E=zf(i);return p.jsx(l8,{scope:n,type:r,dir:E,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:u,content:f,onContentChange:d,scrollbarX:h,onScrollbarXChange:O,scrollbarXEnabled:k,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:C,onScrollbarYEnabledChange:_,onCornerWidthChange:v,onCornerHeightChange:S,children:p.jsx(ue.div,{dir:E,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...t.style}})})});jA.displayName=Pw;var MA="ScrollAreaViewport",DA=g.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=t,o=xr(MA,n),a=g.useRef(null),l=Ce(e,a,o.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(ue.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:p.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});DA.displayName=MA;var Ti="ScrollAreaScrollbar",Tw=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,a=t.orientation==="horizontal";return g.useEffect(()=>(a?s(!0):o(!0),()=>{a?s(!1):o(!1)}),[a,s,o]),i.type==="hover"?p.jsx(c8,{...r,ref:e,forceMount:n}):i.type==="scroll"?p.jsx(u8,{...r,ref:e,forceMount:n}):i.type==="auto"?p.jsx(LA,{...r,ref:e,forceMount:n}):i.type==="always"?p.jsx(Ew,{...r,ref:e}):null});Tw.displayName=Ti;var c8=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),[s,o]=g.useState(!1);return g.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},u=()=>{l=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(_t,{present:n||s,children:p.jsx(LA,{"data-state":s?"visible":"hidden",...r,ref:e})})}),u8=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),s=t.orientation==="horizontal",o=rg(()=>l("SCROLL_END"),100),[a,l]=a8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),g.useEffect(()=>{const c=i.viewport,u=s?"scrollLeft":"scrollTop";if(c){let f=c[u];const d=()=>{const h=c[u];f!==h&&(l("SCROLL"),o()),f=h};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[i.viewport,s,l,o]),p.jsx(_t,{present:n||a!=="hidden",children:p.jsx(Ew,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:ne(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ne(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),LA=g.forwardRef((t,e)=>{const n=xr(Ti,t.__scopeScrollArea),{forceMount:r,...i}=t,[s,o]=g.useState(!1),a=t.orientation==="horizontal",l=rg(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:u)}},10);return bl(n.viewport,l),bl(n.content,l),p.jsx(_t,{present:r||s,children:p.jsx(Ew,{"data-state":s?"visible":"hidden",...i,ref:e})})}),Ew=g.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=xr(Ti,t.__scopeScrollArea),s=g.useRef(null),o=g.useRef(0),[a,l]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=XA(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:d=>s.current=d,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:d=>o.current=d};function f(d,h){return g8(d,o.current,a,h)}return n==="horizontal"?p.jsx(f8,{...u,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const d=i.viewport.scrollLeft,h=TC(d,a,i.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:d=>{i.viewport&&(i.viewport.scrollLeft=d)},onDragScroll:d=>{i.viewport&&(i.viewport.scrollLeft=f(d,i.dir))}}):n==="vertical"?p.jsx(d8,{...u,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const d=i.viewport.scrollTop,h=TC(d,a);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:d=>{i.viewport&&(i.viewport.scrollTop=d)},onDragScroll:d=>{i.viewport&&(i.viewport.scrollTop=f(d))}}):null}),f8=g.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,s=xr(Ti,t.__scopeScrollArea),[o,a]=g.useState(),l=g.useRef(null),c=Ce(e,l,s.onScrollbarXChange);return g.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(BA,{"data-orientation":"horizontal",...i,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ng(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(s.viewport){const d=s.viewport.scrollLeft+u.deltaX;t.onWheelScroll(d),WA(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ep(o.paddingLeft),paddingEnd:Ep(o.paddingRight)}})}})}),d8=g.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,s=xr(Ti,t.__scopeScrollArea),[o,a]=g.useState(),l=g.useRef(null),c=Ce(e,l,s.onScrollbarYChange);return g.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(BA,{"data-orientation":"vertical",...i,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ng(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(s.viewport){const d=s.viewport.scrollTop+u.deltaY;t.onWheelScroll(d),WA(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ep(o.paddingTop),paddingEnd:Ep(o.paddingBottom)}})}})}),[h8,zA]=NA(Ti),BA=g.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...d}=t,h=xr(Ti,n),[O,m]=g.useState(null),x=Ce(e,I=>m(I)),y=g.useRef(null),v=g.useRef(""),b=h.viewport,S=r.content-r.viewport,k=Zt(u),w=Zt(l),C=rg(f,10);function _(I){if(y.current){const E=I.clientX-y.current.left,N=I.clientY-y.current.top;c({x:E,y:N})}}return g.useEffect(()=>{const I=E=>{const N=E.target;(O==null?void 0:O.contains(N))&&k(E,S)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,O,S,k]),g.useEffect(w,[r,w]),bl(O,C),bl(h.content,C),p.jsx(h8,{scope:n,scrollbar:O,hasThumb:i,onThumbChange:Zt(s),onThumbPointerUp:Zt(o),onThumbPositionChange:w,onThumbPointerDown:Zt(a),children:p.jsx(ue.div,{...d,ref:x,style:{position:"absolute",...d.style},onPointerDown:ne(t.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=O.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:ne(t.onPointerMove,_),onPointerUp:ne(t.onPointerUp,I=>{const E=I.target;E.hasPointerCapture(I.pointerId)&&E.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),Tp="ScrollAreaThumb",VA=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=zA(Tp,t.__scopeScrollArea);return p.jsx(_t,{present:n||i.hasThumb,children:p.jsx(p8,{ref:e,...r})})}),p8=g.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,s=xr(Tp,n),o=zA(Tp,n),{onThumbPositionChange:a}=o,l=Ce(e,f=>o.onThumbChange(f)),c=g.useRef(void 0),u=rg(()=>{c.current&&(c.current(),c.current=void 0)},100);return g.useEffect(()=>{const f=s.viewport;if(f){const d=()=>{if(u(),!c.current){const h=O8(f,a);c.current=h,a()}};return a(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,u,a]),p.jsx(ue.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ne(t.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),O=f.clientX-h.left,m=f.clientY-h.top;o.onThumbPointerDown({x:O,y:m})}),onPointerUp:ne(t.onPointerUp,o.onThumbPointerUp)})});VA.displayName=Tp;var Rw="ScrollAreaCorner",FA=g.forwardRef((t,e)=>{const n=xr(Rw,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(m8,{...t,ref:e}):null});FA.displayName=Rw;var m8=g.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,i=xr(Rw,n),[s,o]=g.useState(0),[a,l]=g.useState(0),c=!!(s&&a);return bl(i.scrollbarX,()=>{var f;const u=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(u),l(u)}),bl(i.scrollbarY,()=>{var f;const u=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(u),o(u)}),c?p.jsx(ue.div,{...r,ref:e,style:{width:s,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Ep(t){return t?parseInt(t,10):0}function XA(t,e){const n=t/e;return isNaN(n)?0:n}function ng(t){const e=XA(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function g8(t,e,n,r="ltr"){const i=ng(n),s=i/2,o=e||s,a=i-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,f=r==="ltr"?[0,u]:[u*-1,0];return ZA([l,c],f)(t)}function TC(t,e,n="ltr"){const r=ng(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,a=s-r,l=n==="ltr"?[0,o]:[o*-1,0],c=mx(t,l);return ZA([0,o],[0,a])(c)}function ZA(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function WA(t,e){return t>0&&t<e}var O8=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,a=n.top!==s.top;(o||a)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function rg(t,e){const n=Zt(t),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function bl(t,e){const n=Zt(e);Rt(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}var qA=jA,y8=DA,v8=FA;const Jl=g.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(qA,{ref:r,className:le("relative overflow-hidden",t),...n,children:[p.jsx(y8,{className:"h-full w-full rounded-[inherit]",children:e}),p.jsx(YA,{}),p.jsx(v8,{})]}));Jl.displayName=qA.displayName;const YA=g.forwardRef(({className:t,orientation:e="vertical",...n},r)=>p.jsx(Tw,{ref:r,orientation:e,className:le("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:p.jsx(VA,{className:"relative flex-1 rounded-full bg-border"})}));YA.displayName=Tw.displayName;var x8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],b8=x8.reduce((t,e)=>{const n=Bm(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),w8="Separator",EC="horizontal",S8=["horizontal","vertical"],UA=g.forwardRef((t,e)=>{const{decorative:n,orientation:r=EC,...i}=t,s=k8(r)?r:EC,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(b8.div,{"data-orientation":s,...a,...i,ref:e})});UA.displayName=w8;function k8(t){return S8.includes(t)}var HA=UA;const GA=g.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},i)=>p.jsx(HA,{ref:i,decorative:n,orientation:e,className:le("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));GA.displayName=HA.displayName;const C8=tw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500/10 text-green-600 dark:text-green-400",warning:"border-transparent bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",info:"border-transparent bg-blue-500/10 text-blue-600 dark:text-blue-400"}},defaultVariants:{variant:"default"}});function gt({className:t,variant:e,...n}){return p.jsx("div",{className:le(C8({variant:e}),t),...n})}function RC(t){const e=P8(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(E8);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function P8(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=_8(i),a=R8(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var T8=Symbol("radix.slottable");function E8(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===T8}function R8(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function _8(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function _w(t){const e=t+"CollectionProvider",[n,r]=Cn(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:y}=m,v=ee.useRef(null),b=ee.useRef(new Map).current;return p.jsx(i,{scope:x,itemMap:b,collectionRef:v,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=RC(a),c=ee.forwardRef((m,x)=>{const{scope:y,children:v}=m,b=s(a,y),S=Ce(x,b.collectionRef);return p.jsx(l,{ref:S,children:v})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",d=RC(u),h=ee.forwardRef((m,x)=>{const{scope:y,children:v,...b}=m,S=ee.useRef(null),k=Ce(x,S),w=s(u,y);return ee.useEffect(()=>(w.itemMap.set(S,{ref:S,...b}),()=>void w.itemMap.delete(S))),p.jsx(d,{[f]:"",ref:k,children:v})});h.displayName=u;function O(m){const x=s(t+"CollectionConsumer",m);return ee.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((w,C)=>b.indexOf(w.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},O,r]}var DO="rovingFocusGroup.onEntryFocus",$8={bubbles:!1,cancelable:!0},Bf="RovingFocusGroup",[gx,KA,Q8]=_w(Bf),[A8,ec]=Cn(Bf,[Q8]),[I8,N8]=A8(Bf),JA=g.forwardRef((t,e)=>p.jsx(gx.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(gx.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(j8,{...t,ref:e})})}));JA.displayName=Bf;var j8=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=t,d=g.useRef(null),h=Ce(e,d),O=zf(s),[m,x]=Xs({prop:o,defaultProp:a??null,onChange:l,caller:Bf}),[y,v]=g.useState(!1),b=Zt(c),S=KA(n),k=g.useRef(!1),[w,C]=g.useState(0);return g.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(DO,b),()=>_.removeEventListener(DO,b)},[b]),p.jsx(I8,{scope:n,orientation:r,dir:O,loop:i,currentTabStopId:m,onItemFocus:g.useCallback(_=>x(_),[x]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>C(_=>_-1),[]),children:p.jsx(ue.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ne(t.onMouseDown,()=>{k.current=!0}),onFocus:ne(t.onFocus,_=>{const I=!k.current;if(_.target===_.currentTarget&&I&&!y){const E=new CustomEvent(DO,$8);if(_.currentTarget.dispatchEvent(E),!E.defaultPrevented){const N=S().filter(W=>W.focusable),Q=N.find(W=>W.active),L=N.find(W=>W.id===m),X=[Q,L,...N].filter(Boolean).map(W=>W.ref.current);nI(X,u)}}k.current=!1}),onBlur:ne(t.onBlur,()=>v(!1))})})}),eI="RovingFocusGroupItem",tI=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=t,l=qt(),c=s||l,u=N8(eI,n),f=u.currentTabStopId===c,d=KA(n),{onFocusableItemAdd:h,onFocusableItemRemove:O,currentTabStopId:m}=u;return g.useEffect(()=>{if(r)return h(),()=>O()},[r,h,O]),p.jsx(gx.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:p.jsx(ue.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:ne(t.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ne(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ne(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=L8(x,u.orientation,u.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=d().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const S=b.indexOf(x.currentTarget);b=u.loop?z8(b,S+1):b.slice(S+1)}setTimeout(()=>nI(b))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:m!=null}):o})})});tI.displayName=eI;var M8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D8(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function L8(t,e,n){const r=D8(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return M8[r]}function nI(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function z8(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var $w=JA,Qw=tI;function rI(t){const e=g.useRef({value:t,previous:t});return g.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var Aw="Radio",[B8,iI]=Cn(Aw),[V8,F8]=B8(Aw),sI=g.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,form:c,...u}=t,[f,d]=g.useState(null),h=Ce(e,x=>d(x)),O=g.useRef(!1),m=f?c||!!f.closest("form"):!0;return p.jsxs(V8,{scope:n,checked:i,disabled:o,children:[p.jsx(ue.button,{type:"button",role:"radio","aria-checked":i,"data-state":cI(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:h,onClick:ne(t.onClick,x=>{i||l==null||l(),m&&(O.current=x.isPropagationStopped(),O.current||x.stopPropagation())})}),m&&p.jsx(lI,{control:f,bubbles:!O.current,name:r,value:a,checked:i,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});sI.displayName=Aw;var oI="RadioIndicator",aI=g.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,s=F8(oI,n);return p.jsx(_t,{present:r||s.checked,children:p.jsx(ue.span,{"data-state":cI(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});aI.displayName=oI;var X8="RadioBubbleInput",lI=g.forwardRef(({__scopeRadio:t,control:e,checked:n,bubbles:r=!0,...i},s)=>{const o=g.useRef(null),a=Ce(o,s),l=rI(n),c=RQ(e);return g.useEffect(()=>{const u=o.current;if(!u)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const O=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(O)}},[l,n,r]),p.jsx(ue.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});lI.displayName=X8;function cI(t){return t?"checked":"unchecked"}var Z8=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ig="RadioGroup",[W8]=Cn(ig,[ec,iI]),uI=ec(),fI=iI(),[q8,Y8]=W8(ig),dI=g.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:f,...d}=t,h=uI(n),O=zf(c),[m,x]=Xs({prop:s,defaultProp:i??null,onChange:f,caller:ig});return p.jsx(q8,{scope:n,name:r,required:o,disabled:a,value:m,onValueChange:x,children:p.jsx($w,{asChild:!0,...h,orientation:l,dir:O,loop:u,children:p.jsx(ue.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:O,...d,ref:e})})})});dI.displayName=ig;var hI="RadioGroupItem",pI=g.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,s=Y8(hI,n),o=s.disabled||r,a=uI(n),l=fI(n),c=g.useRef(null),u=Ce(e,c),f=s.value===i.value,d=g.useRef(!1);return g.useEffect(()=>{const h=m=>{Z8.includes(m.key)&&(d.current=!0)},O=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",O),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",O)}},[]),p.jsx(Qw,{asChild:!0,...a,focusable:!o,active:f,children:p.jsx(sI,{disabled:o,required:s.required,checked:f,...l,...i,name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:ne(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ne(i.onFocus,()=>{var h;d.current&&((h=c.current)==null||h.click())})})})});pI.displayName=hI;var U8="RadioGroupIndicator",mI=g.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=fI(n);return p.jsx(aI,{...i,...r,ref:e})});mI.displayName=U8;var gI=dI,OI=pI,H8=mI;const yI=g.forwardRef(({className:t,...e},n)=>p.jsx(gI,{className:le("grid gap-2",t),...e,ref:n}));yI.displayName=gI.displayName;const vI=g.forwardRef(({className:t,...e},n)=>p.jsx(OI,{ref:n,className:le("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:p.jsx(H8,{className:"flex items-center justify-center",children:p.jsx(ou,{className:"h-2.5 w-2.5 fill-current text-current"})})}));vI.displayName=OI.displayName;var G8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K8=G8.reduce((t,e)=>{const n=Bm(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),J8="Label",xI=g.forwardRef((t,e)=>p.jsx(K8.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));xI.displayName=J8;var bI=xI;const eq=tw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),nt=g.forwardRef(({className:t,...e},n)=>p.jsx(bI,{ref:n,className:le(eq(),t),...e}));nt.displayName=bI.displayName;function tq({checked:t,onCheckedChange:e,className:n}){return p.jsx("button",{role:"switch","aria-checked":t,onClick:()=>e(!t),className:le("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t?"bg-primary":"bg-input",n),children:p.jsx("span",{className:le("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",t?"translate-x-4":"translate-x-0")})})}function wI(t){if(!t)return"Never";const e=new Date(t),r=new Date().getTime()-e.getTime(),i=Math.floor(r/6e4),s=Math.floor(i/60),o=Math.floor(s/24);return i<1?"Just now":i<60?`${i}m ago`:s<24?`${s}h ago`:o<7?`${o}d ago`:e.toLocaleDateString()}function _C({type:t,selected:e,count:n,lastSync:r,disabled:i}){const s=t==="notes"?sn:rn,o=t==="notes"?"Docs":"Code",a=t==="notes"?"text-blue-500":"text-orange-500",l=t==="notes"?"Markdown files from vault":"Source code symbols";return p.jsxs(nt,{htmlFor:`sync-${t}`,className:le("flex items-start gap-3 rounded-lg border p-4 cursor-pointer transition-colors",e&&!i&&"border-primary bg-primary/5",i&&"opacity-50 cursor-not-allowed"),children:[p.jsx(vI,{value:t,id:`sync-${t}`,disabled:i,className:"mt-0.5"}),p.jsxs("div",{className:"flex-1 space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(s,{className:le("h-4 w-4",a)}),p.jsx("span",{className:"font-medium",children:o}),i&&p.jsx(gt,{variant:"secondary",className:"text-[10px]",children:"Not configured"})]}),p.jsx("p",{className:"text-sm text-muted-foreground",children:l}),p.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(nQ,{className:"h-3 w-3"}),n," indexed"]}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(If,{className:"h-3 w-3"}),wI(r)]})]})]})]})}function ti(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function nq({type:t}){switch(t){case"success":return p.jsx(Gi,{className:"h-3.5 w-3.5 text-green-500 flex-shrink-0"});case"error":return p.jsx(Or,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"});case"warning":return p.jsx(Or,{className:"h-3.5 w-3.5 text-yellow-500 flex-shrink-0"});default:return p.jsx(ui,{className:"h-3.5 w-3.5 text-blue-500 flex-shrink-0"})}}function SI(t){if(t.includes("not found: No such file or directory"))return"Index corrupted. Please clear the index and re-sync.";if(t.includes("LanceError")||t.includes("lance error"))return"Database error. Try clearing the index and re-syncing.";if(t.includes("ENOENT")||t.includes("EACCES"))return"File access error. Check file permissions.";if(t.includes("ENOSPC"))return"Disk full. Free up space and try again.";if(t.includes("Task not active"))return"Sync task was interrupted. Please try again.";if(t.length>150){const e=t.split(`
|
|
438
|
+
`)[0];return e.length>150?e.slice(0,147)+"...":e}return t}function kI(t){switch(t){case"analyzing":return"Analyzing changes...";case"embedding":return"Generating embeddings...";case"indexing":return"Indexing files...";case"deleting":return"Removing deleted files...";case"graph":return"Building code graph...";case"loading":return"Loading chunks...";case"parsing":return"Parsing files...";case"resolving":return"Resolving imports...";case"semantic":return"Semantic analysis...";case"building":return"Building structure...";case"tree":return"Building file tree...";case"stats":return"Computing statistics...";case"done":return"Done";default:return"Processing..."}}function rq({progress:t,type:e}){const n=e==="notes"?sn:rn,r=e==="notes"?"Docs":"Code",i=e==="notes"?"text-blue-500":"text-orange-500",s=t.status==="completed",o=t.status==="error",a=t.status==="syncing",l=t.status==="paused";return p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(n,{className:le("h-5 w-5",i)}),p.jsx("span",{className:"font-medium",children:r})]}),s&&p.jsx(gt,{variant:"success",children:"Complete"}),o&&p.jsx(gt,{variant:"destructive",children:"Error"}),l&&p.jsx(gt,{variant:"outline",children:"Paused"}),a&&p.jsx(gt,{variant:"secondary",children:kI(t.phase)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Cw,{value:t.progress,className:"flex-1 h-2"}),p.jsxs("span",{className:"text-sm font-medium font-mono min-w-[4rem] text-right",children:[t.processed,"/",t.total]})]}),t.current&&(a||l)&&p.jsx("p",{className:"text-sm text-muted-foreground truncate font-mono",children:t.current})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsxs("p",{className:"text-xs text-muted-foreground",children:[e==="notes"?"Docs":"Symbols",":"]}),p.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(xZ,{className:"h-3.5 w-3.5 text-green-500"}),p.jsxs("span",{children:[t.added," added"]})]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(wZ,{className:"h-3.5 w-3.5 text-blue-500"}),p.jsxs("span",{children:[t.updated," updated"]})]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(ew,{className:"h-3.5 w-3.5 text-red-500"}),p.jsxs("span",{children:[t.deleted," deleted"]})]})]})]}),o&&t.error&&p.jsx("div",{className:"rounded-md bg-red-500/10 p-3 text-sm text-red-600 dark:text-red-400",children:SI(t.error)})]})}function iq({open:t,onOpenChange:e}){const{notesSyncProgress:n,codeSyncProgress:r,syncNotes:i,syncCode:s,pauseSync:o,resumeSync:a,cancelSync:l,resetProgress:c,checkSyncStatus:u,lastCompleted:f}=Qf(),[d,h]=g.useState("select"),[O,m]=g.useState("notes"),[x,y]=g.useState(!1),[v,b]=g.useState({notesCount:0,codeCount:0,notesLastSync:null,codeLastSync:null,codeEnabled:!1}),[S,k]=g.useState([]),w=g.useRef(null),C=O==="notes"?n:r,_=(C==null?void 0:C.status)==="syncing",I=(C==null?void 0:C.status)==="paused",E=d==="progress"&&(C==null?void 0:C.status)==="completed",N=(C==null?void 0:C.status)==="error",Q=_||I;g.useEffect(()=>{t&&(k([]),u(),fetch("/api/project/stats").then(M=>M.json()).then(M=>{b({notesCount:M.notesCount??0,codeCount:M.codeCount??0,notesLastSync:M.notesLastSync??null,codeLastSync:M.codeLastSync??null,codeEnabled:M.codeEnabled??!1})}).catch(()=>{}))},[t,u]),g.useEffect(()=>{if(!t)return;const M=(n==null?void 0:n.status)==="syncing"||(n==null?void 0:n.status)==="paused",$=(r==null?void 0:r.status)==="syncing"||(r==null?void 0:r.status)==="paused";M&&d==="select"?(m("notes"),h("progress")):$&&d==="select"&&(m("code"),h("progress"))},[t,n==null?void 0:n.status,r==null?void 0:r.status,d]);const L=g.useRef(void 0);g.useEffect(()=>{if(C!=null&&C.current&&_&&d==="progress"){const M={timestamp:ti(new Date),message:C.current,type:"info",file:C.current};k($=>[...$.slice(-199),M])}},[C==null?void 0:C.current,_,d]),g.useEffect(()=>{if(!_||d!=="progress")return;const M=C==null?void 0:C.phase;if(M&&M!==L.current){L.current=M;const $=kI(M),R={timestamp:ti(new Date),message:`Phase: ${$}`,type:"info"};k(q=>[...q.slice(-199),R])}},[C==null?void 0:C.phase,_,d]),g.useEffect(()=>{if(I&&d==="progress"){const M={timestamp:ti(new Date),message:"Sync paused",type:"warning"};k($=>[...$.slice(-99),M])}},[I,d]),g.useEffect(()=>{if(E&&C){const M=O==="notes"?"docs":"symbols",$={timestamp:ti(new Date),message:`Sync completed: ${C.added} ${M} added, ${C.updated} updated, ${C.deleted} deleted`,type:"success"};k(R=>[...R.slice(-99),$])}},[E,C==null?void 0:C.status,O]),g.useEffect(()=>{if(N&&(C!=null&&C.error)){const M={timestamp:ti(new Date),message:`Error: ${SI(C.error)}`,type:"error"};k($=>[...$.slice(-199),M])}},[N,C==null?void 0:C.error]),g.useEffect(()=>{var M;(M=w.current)==null||M.scrollIntoView({behavior:"smooth"})},[S]);const z=g.useCallback(()=>{e(!1),Q||(h("select"),k([]),y(!1),setTimeout(()=>{c("all")},500))},[Q,e,c]),X=()=>{h("progress"),k([{timestamp:ti(new Date),message:`Starting ${O} sync${x&&O==="code"?" (force)":""}...`,type:"info"}]),O==="notes"?i({force:x}):s({force:x})},W=async()=>{await o()&&k($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Pause requested...",type:"info"}])},F=async()=>{await a()&&k($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Resuming sync...",type:"info"}])},j=async()=>{await l()&&k($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Cancelling sync...",type:"warning"}])},A=()=>{k([{timestamp:ti(new Date),message:"Retrying sync...",type:"info"}]),O==="notes"?i():s()},P=O==="notes"||v.codeEnabled;return p.jsx(Wu,{open:t,onOpenChange:z,children:p.jsx(xl,{className:"max-w-[846px] gap-3",children:d==="select"?p.jsxs(p.Fragment,{children:[p.jsxs(Vo,{children:[p.jsxs(Xo,{className:"flex items-center gap-2",children:[p.jsx(ui,{className:"h-5 w-5"}),"Sync Index"]}),p.jsx(Zo,{children:"Select what to synchronize with the search index."})]}),f&&p.jsxs(xw,{className:"rounded-lg border bg-muted/20",children:[p.jsxs(bw,{className:"flex items-center justify-between w-full px-4 py-3 hover:bg-muted/50 transition-colors [&[data-state=open]>svg.chevron]:rotate-180",children:[p.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[p.jsx(If,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Last Sync:"}),p.jsx("span",{className:"capitalize text-muted-foreground",children:f.type}),p.jsx("span",{className:"text-muted-foreground",children:"•"}),p.jsxs("span",{className:"flex items-center gap-1",children:[f.status==="completed"?p.jsx(Gi,{className:"h-3 w-3 text-green-500"}):p.jsx(Or,{className:"h-3 w-3 text-red-500"}),p.jsx("span",{className:f.status==="completed"?"text-green-600":"text-red-600",children:f.status==="completed"?"Success":"Failed"})]}),p.jsx("span",{className:"text-muted-foreground",children:"•"}),p.jsx("span",{className:"text-muted-foreground",children:wI(new Date(f.completedAt).toISOString())})]}),p.jsx(aa,{className:"chevron h-4 w-4 text-muted-foreground transition-transform duration-200"})]}),p.jsx(ww,{children:p.jsx("div",{className:"px-4 pb-3 pt-1 border-t",children:p.jsxs("div",{className:"grid grid-cols-2 gap-1 text-sm mt-2",children:[p.jsx("div",{className:"text-muted-foreground",children:"Started:"}),p.jsx("div",{children:new Date(f.startedAt).toLocaleString()}),p.jsx("div",{className:"text-muted-foreground",children:"Completed:"}),p.jsx("div",{children:new Date(f.completedAt).toLocaleString()}),p.jsx("div",{className:"text-muted-foreground",children:"Duration:"}),p.jsxs("div",{children:[Math.round((f.completedAt-f.startedAt)/1e3),"s"]}),p.jsx("div",{className:"text-muted-foreground",children:"Total Files:"}),p.jsx("div",{children:f.totalFiles}),p.jsx("div",{className:"text-muted-foreground",children:"Changes:"}),p.jsxs("div",{children:[f.stats.added>0&&p.jsxs("span",{className:"text-green-600",children:["+",f.stats.added," added"]}),f.stats.added>0&&f.stats.deleted>0&&p.jsx("span",{className:"mx-1",children:"•"}),f.stats.deleted>0&&p.jsxs("span",{className:"text-red-600",children:["-",f.stats.deleted," deleted"]}),f.stats.added===0&&f.stats.deleted===0&&p.jsx("span",{className:"text-muted-foreground",children:"No changes"})]})]})})})]}),p.jsxs(yI,{value:O,onValueChange:M=>m(M),className:"space-y-1",children:[p.jsx(_C,{type:"notes",selected:O==="notes",count:v.notesCount,lastSync:v.notesLastSync}),p.jsx(_C,{type:"code",selected:O==="code",count:v.codeCount,lastSync:v.codeLastSync,disabled:!v.codeEnabled})]}),p.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{htmlFor:"force-reindex",className:"flex items-center gap-2",children:[p.jsx(ew,{className:"h-4 w-4 text-orange-500"}),"Force Full Reindex"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Clear existing index and rebuild from scratch"})]}),p.jsx(tq,{checked:x,onCheckedChange:y})]}),p.jsxs(Fo,{children:[p.jsx(Qe,{variant:"outline",onClick:z,children:"Cancel"}),p.jsxs(Qe,{onClick:X,disabled:!P,children:[p.jsx(ui,{className:"h-4 w-4 mr-2"}),"Start Sync"]})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs(Vo,{children:[p.jsxs(Xo,{className:"flex items-center gap-2",children:[_&&p.jsx(ui,{className:"h-5 w-5 animate-spin"}),I&&p.jsx(yp,{className:"h-5 w-5 text-yellow-500"}),E&&p.jsx(Gi,{className:"h-5 w-5 text-green-500"}),N&&!Q&&p.jsx(Or,{className:"h-5 w-5 text-red-500"}),I?"Sync Paused":"Syncing Index"]}),p.jsxs(Zo,{children:[_&&"Synchronizing files with the index...",I&&"Sync paused. Click Resume to continue.",E&&"Sync completed successfully.",N&&!Q&&"Sync encountered errors."]})]}),p.jsxs("div",{className:"space-y-4",children:[C?p.jsx(rq,{progress:C,type:O}):p.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-md border",children:[O==="notes"?p.jsx(sn,{className:"h-5 w-5 text-blue-500"}):p.jsx(rn,{className:"h-5 w-5 text-orange-500"}),p.jsx("span",{className:"font-medium",children:O==="notes"?"Docs":"Code"}),p.jsx(ui,{className:"h-4 w-4 animate-spin ml-auto text-muted-foreground"}),p.jsx("span",{className:"text-sm text-muted-foreground",children:"Starting..."})]}),S.length>0&&p.jsxs(p.Fragment,{children:[p.jsx(GA,{}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-sm font-medium",children:"Log"}),p.jsx(Jl,{className:"h-[150px] rounded-md border bg-muted/30",children:p.jsxs("div",{className:"p-3 space-y-1 font-mono text-xs",children:[S.map((M,$)=>p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"text-muted-foreground w-16 flex-shrink-0",children:M.timestamp}),p.jsx(nq,{type:M.type}),p.jsx("span",{className:le("flex-1",M.type==="error"&&"text-red-500",M.type==="success"&&"text-green-500",M.type==="warning"&&"text-yellow-500"),children:M.message})]},$)),p.jsx("div",{ref:w})]})})]})]})]}),p.jsxs(Fo,{className:"flex-wrap gap-2",children:[Q&&p.jsxs("div",{className:"flex gap-2 mr-auto",children:[I?p.jsxs(Qe,{variant:"outline",size:"sm",onClick:F,children:[p.jsx(vZ,{className:"h-4 w-4 mr-1"}),"Resume"]}):p.jsxs(Qe,{variant:"outline",size:"sm",onClick:W,children:[p.jsx(yp,{className:"h-4 w-4 mr-1"}),"Pause"]}),p.jsxs(Qe,{variant:"outline",size:"sm",onClick:j,children:[p.jsx(SZ,{className:"h-4 w-4 mr-1"}),"Cancel"]})]}),N&&!Q&&p.jsxs(Qe,{variant:"outline",onClick:A,children:[p.jsx(ui,{className:"h-4 w-4 mr-2"}),"Retry"]}),p.jsx(Qe,{variant:Q?"outline":"default",onClick:z,disabled:Q,children:Q?I?"Paused...":"Syncing...":"Close"})]})]})})})}function sq(){const[t,e]=g.useState(!1);return{isOpen:t,setIsOpen:e,openSyncDialog:()=>{e(!0)}}}function CI(){const t=ql(),{currentProject:e,closeProject:n,clearError:r}=oa(),{openCommandPalette:i}=kp(),{notesSyncProgress:s,codeSyncProgress:o}=Qf(),{openSettings:a,openCreateWizard:l}=Kl(),[c,u]=g.useState(()=>{const C=localStorage.getItem("theme");return C?C==="dark":document.documentElement.classList.contains("dark")}),{isOpen:f,setIsOpen:d,openSyncDialog:h}=sq(),O=Dm(C=>C.voyageApiKey),m=(e==null?void 0:e.embeddingProvider)==="voyage"&&!(O!=null&&O.trim()),x=()=>{r(),t("/"),n().catch(console.error)},y=(s==null?void 0:s.status)==="syncing"||(o==null?void 0:o.status)==="syncing",v=(s==null?void 0:s.status)==="paused"||(o==null?void 0:o.status)==="paused",b=(s==null?void 0:s.status)==="completed"||(o==null?void 0:o.status)==="completed",S=y||v,k=(s==null?void 0:s.status)==="syncing"||(s==null?void 0:s.status)==="paused"?s:(o==null?void 0:o.status)==="syncing"||(o==null?void 0:o.status)==="paused"?o:null,w=()=>{const C=!c;u(C),document.documentElement.classList.toggle("dark",C),localStorage.setItem("theme",C?"dark":"light")};return p.jsxs("header",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[p.jsxs("div",{className:"flex h-14 items-center px-4 gap-4",children:[p.jsx("div",{className:"flex items-center gap-2 min-w-[200px]",children:p.jsx(Zu,{children:e?p.jsxs(p.Fragment,{children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"sm",onClick:x,className:"h-7 px-2 text-muted-foreground hover:text-foreground",children:p.jsx(yZ,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Close Project"})]}),p.jsx("span",{className:"font-semibold text-sm",children:e.name})]}):p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"font-semibold text-lg",children:"Grepmind"}),p.jsxs(Qe,{variant:"outline",size:"sm",onClick:l,className:"ml-2",children:[p.jsx(wh,{className:"h-4 w-4 mr-2"}),"Create Project"]})]})})}),p.jsx("div",{className:"flex-1 flex justify-center",children:p.jsxs("button",{onClick:i,className:"w-full max-w-md flex items-center gap-2 h-9 px-3 rounded-md border border-input bg-background text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[p.jsx(Jb,{className:"h-4 w-4"}),p.jsx("span",{className:"flex-1 text-left",children:"Search docs, code, symbols..."}),p.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:[p.jsx("span",{className:"text-xs",children:"Cmd"}),"K"]})]})}),p.jsx("div",{className:"flex items-center gap-2 min-w-[200px] justify-end",children:p.jsxs(Zu,{children:[e&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs(Qe,{variant:"ghost",size:S?"sm":"icon",onClick:h,className:S?"gap-1.5 px-2":"",children:[v?p.jsx(yp,{className:"h-4 w-4 text-yellow-500"}):y?p.jsx(ui,{className:"h-4 w-4 animate-spin text-blue-500"}):b?p.jsx(Gi,{className:"h-4 w-4 text-green-500"}):p.jsx(ui,{className:"h-4 w-4"}),S&&k&&p.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[k.processed,"/",k.total]})]})}),p.jsx(yn,{children:v?"Sync Paused":y?"Syncing...":b?"Synced":"Sync Index"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",onClick:w,children:c?p.jsx(CZ,{className:"h-4 w-4"}):p.jsx(OZ,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Toggle Dark Mode"})]}),e&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs(Qe,{variant:"ghost",size:"icon",onClick:a,className:"relative",children:[p.jsx(iQ,{className:"h-4 w-4"}),m&&p.jsx(sQ,{className:"h-3 w-3 text-yellow-500 absolute -top-0.5 -right-0.5"})]})}),p.jsx(yn,{children:m?"Settings - API key required":"Project Settings"})]})]})})]}),p.jsx(iq,{open:f,onOpenChange:d})]})}var sg="Tabs",[oq]=Cn(sg,[ec]),PI=ec(),[aq,Iw]=oq(sg),TI=g.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=zf(a),[f,d]=Xs({prop:r,onChange:i,defaultProp:s??"",caller:sg});return p.jsx(aq,{scope:n,baseId:qt(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:l,children:p.jsx(ue.div,{dir:u,"data-orientation":o,...c,ref:e})})});TI.displayName=sg;var EI="TabsList",RI=g.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,s=Iw(EI,n),o=PI(n);return p.jsx($w,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(ue.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:e})})});RI.displayName=EI;var _I="TabsTrigger",$I=g.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=t,o=Iw(_I,n),a=PI(n),l=II(o.baseId,r),c=NI(o.baseId,r),u=r===o.value;return p.jsx(Qw,{asChild:!0,...a,focusable:!i,active:u,children:p.jsx(ue.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:e,onMouseDown:ne(t.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ne(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ne(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(r)})})})});$I.displayName=_I;var QI="TabsContent",AI=g.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=t,a=Iw(QI,n),l=II(a.baseId,r),c=NI(a.baseId,r),u=r===a.value,f=g.useRef(u);return g.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),p.jsx(_t,{present:i||u,children:({present:d})=>p.jsx(ue.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});AI.displayName=QI;function II(t,e){return`${t}-trigger-${e}`}function NI(t,e){return`${t}-content-${e}`}var lq=TI,jI=RI,MI=$I,DI=AI;const Rp=lq,og=g.forwardRef(({className:t,...e},n)=>p.jsx(jI,{ref:n,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));og.displayName=jI.displayName;const wl=g.forwardRef(({className:t,...e},n)=>p.jsx(MI,{ref:n,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));wl.displayName=MI.displayName;const Ja=g.forwardRef(({className:t,...e},n)=>p.jsx(DI,{ref:n,className:le("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=inactive]:hidden",t),...e}));Ja.displayName=DI.displayName;const LI=g.createContext(null);function Kn(){const t=g.useContext(LI);if(t===null)throw new Error("No Tree Api Provided");return t}const zI=g.createContext(null);function cq(){const t=g.useContext(zI);if(t===null)throw new Error("Provide a NodesContext");return t}const BI=g.createContext(null);function uq(){const t=g.useContext(BI);if(t===null)throw new Error("Provide a DnDContext");return t}const VI=g.createContext(0);function FI(){g.useContext(VI)}function Ph(t,e,n){return Math.max(Math.min(t,n),e)}function XI(t){return t&&t.isLeaf}function ZI(t){return t&&t.isInternal&&!t.isOpen}function WI(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const qI=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},YI=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Nw(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Nw(n,e);if(r)return r}return null}function _p(t,e){if(e(t),t.children)for(let n of t.children)_p(n,e)}function UI(t){const e=GI(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=fq(e,r);break}n==null||n.focus()}function HI(t){const e=GI(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=dq(e,r);break}n==null||n.focus()}function fq(t,e){return e+1<t.length?t[e+1]:t[0]}function dq(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function GI(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function Fc(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function KI(t){return t===null?null:xo(t)}function xo(t){return typeof t=="string"?t:t.id}function JI(t,...e){if(t)return t(...e)}function eN(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function tN(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function nN(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const hq=Object.freeze(Object.defineProperty({__proto__:null,access:Fc,bound:Ph,dfs:Nw,focusNextElement:UI,focusPrevElement:HI,getInsertIndex:tN,getInsertParentId:nN,identify:xo,identifyNull:KI,indexOf:YI,isClosed:ZI,isDescendant:qI,isItem:XI,isOpenWithEmptyChildren:WI,safeRun:JI,waitFor:eN,walk:_p},Symbol.toStringTag,{value:"Module"})),pq={display:"flex",alignItems:"center",zIndex:1},mq={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},gq={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},Oq=ee.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return p.jsxs("div",{style:Object.assign(Object.assign({},pq),i),children:[p.jsx("div",{style:Object.assign({},gq)}),p.jsx("div",{style:Object.assign({},mq)})]})});function yq({node:t,attrs:e,innerRef:n,children:r}){return p.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function vq(t){return p.jsxs("div",{ref:t.dragHandle,style:t.style,children:[p.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?p.jsx(bq,Object.assign({},t)):p.jsx(xq,Object.assign({},t))]})}function xq(t){return p.jsx(p.Fragment,{children:p.jsx("span",{children:t.node.data.name})})}function bq({node:t}){const e=g.useRef();return g.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),p.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function LO(t){return{type:"EDIT",id:t}}function wq(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Oa(t){return{type:"FOCUS",id:t}}function Sq(){return{type:"TREE_BLUR"}}function kq(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class $p{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===qu}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new $p(Object.assign({},this))}edit(){return this.tree.edit(this)}}const qu="__REACT_ARBORIST_INTERNAL_ROOT__";function $C(t){var e;function n(s,o,a){const l=t.accessId(s),c=new $p({tree:t,data:s,level:o,parent:a,id:l,children:null,isDraggable:t.isDraggable(s),rowIndex:null}),u=t.accessChildren(s);return u&&(c.children=u.map(f=>n(f,o+1,c))),c}const r=new $p({tree:t,id:qu,data:{id:qu},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(s=>n(s,0,r)),r}const Ox={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function QC(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function Cq(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:QC(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:QC(t.unfiltered,e)}):t}const Sl=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Rr={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:xo(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(xo)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(xo)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:xo(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:xo(t)})};function Pq(t=Sl().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const kl={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function Tq(t=Sl().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return Sl().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const Eq={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},Rq=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},_q=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function rN({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return p.jsxs($q,{isDragging:i,children:[p.jsx(Qq,{offset:t,children:p.jsx(Iq,{id:n,dragIds:r})}),p.jsx(Aq,{mouse:e,count:r.length})]})}const $q=g.memo(function(e){return e.isDragging?p.jsx("div",{style:Eq,children:e.children}):null});function Qq(t){return p.jsx("div",{className:"row preview",style:Rq(t.offset),children:t.children})}function Aq(t){const{count:e,mouse:n}=t;return e>1?p.jsx("div",{className:"selected-count",style:_q(n),children:e}):null}const Iq=g.memo(function(e){const n=Kn(),r=n.get(e.id);return r?p.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Cl(){return Cl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Cl.apply(null,arguments)}function AC(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yx(t,e){return yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},yx(t,e)}function Nq(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yx(t,e)}var IC=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function jq(t,e){return!!(t===e||IC(t)&&IC(e))}function Mq(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!jq(t[n],e[n]))return!1;return!0}function zO(t,e){e===void 0&&(e=Mq);var n,r=[],i,s=!1;function o(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return s&&n===this&&e(a,r)||(i=t.apply(this,a),s=!0,n=this,r=a),i}return o}function Dq(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Lq=typeof performance=="object"&&typeof performance.now=="function",NC=Lq?function(){return performance.now()}:function(){return Date.now()};function jC(t){cancelAnimationFrame(t.id)}function zq(t,e){var n=NC();function r(){NC()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var BO=-1;function MC(t){if(t===void 0&&(t=!1),BO===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),BO=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return BO}var ya=null;function DC(t){if(t===void 0&&(t=!1),ya===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?ya="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?ya="negative":ya="positive-ascending"),document.body.removeChild(e),ya}return ya}var Bq=150,Vq=function(e,n){return e};function Fq(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,s=t.getOffsetForIndexAndAlignment,o=t.getStartIndexForOffset,a=t.getStopIndexForStartIndex,l=t.initInstanceProps,c=t.shouldResetStyleCacheOnItemSizeChange,u=t.validateProps;return e=function(f){Nq(d,f);function d(O){var m;return m=f.call(this,O)||this,m._instanceProps=l(m.props,AC(m)),m._outerRef=void 0,m._resetIsScrollingTimeoutId=null,m.state={instance:AC(m),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof m.props.initialScrollOffset=="number"?m.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},m._callOnItemsRendered=void 0,m._callOnItemsRendered=zO(function(x,y,v,b){return m.props.onItemsRendered({overscanStartIndex:x,overscanStopIndex:y,visibleStartIndex:v,visibleStopIndex:b})}),m._callOnScroll=void 0,m._callOnScroll=zO(function(x,y,v){return m.props.onScroll({scrollDirection:x,scrollOffset:y,scrollUpdateWasRequested:v})}),m._getItemStyle=void 0,m._getItemStyle=function(x){var y=m.props,v=y.direction,b=y.itemSize,S=y.layout,k=m._getItemStyleCache(c&&b,c&&S,c&&v),w;if(k.hasOwnProperty(x))w=k[x];else{var C=n(m.props,x,m._instanceProps),_=i(m.props,x,m._instanceProps),I=v==="horizontal"||S==="horizontal",E=v==="rtl",N=I?C:0;k[x]=w={position:"absolute",left:E?void 0:N,right:E?N:void 0,top:I?0:C,height:I?"100%":_,width:I?_:"100%"}}return w},m._getItemStyleCache=void 0,m._getItemStyleCache=zO(function(x,y,v){return{}}),m._onScrollHorizontal=function(x){var y=x.currentTarget,v=y.clientWidth,b=y.scrollLeft,S=y.scrollWidth;m.setState(function(k){if(k.scrollOffset===b)return null;var w=m.props.direction,C=b;if(w==="rtl")switch(DC()){case"negative":C=-b;break;case"positive-descending":C=S-v-b;break}return C=Math.max(0,Math.min(C,S-v)),{isScrolling:!0,scrollDirection:k.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._onScrollVertical=function(x){var y=x.currentTarget,v=y.clientHeight,b=y.scrollHeight,S=y.scrollTop;m.setState(function(k){if(k.scrollOffset===S)return null;var w=Math.max(0,Math.min(S,b-v));return{isScrolling:!0,scrollDirection:k.scrollOffset<w?"forward":"backward",scrollOffset:w,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._outerRefSetter=function(x){var y=m.props.outerRef;m._outerRef=x,typeof y=="function"?y(x):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=x)},m._resetIsScrollingDebounced=function(){m._resetIsScrollingTimeoutId!==null&&jC(m._resetIsScrollingTimeoutId),m._resetIsScrollingTimeoutId=zq(m._resetIsScrolling,Bq)},m._resetIsScrolling=function(){m._resetIsScrollingTimeoutId=null,m.setState({isScrolling:!1},function(){m._getItemStyleCache(-1,null)})},m}d.getDerivedStateFromProps=function(m,x){return Xq(m,x),u(m),null};var h=d.prototype;return h.scrollTo=function(m){m=Math.max(0,m),this.setState(function(x){return x.scrollOffset===m?null:{scrollDirection:x.scrollOffset<m?"forward":"backward",scrollOffset:m,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(m,x){x===void 0&&(x="auto");var y=this.props,v=y.itemCount,b=y.layout,S=this.state.scrollOffset;m=Math.max(0,Math.min(m,v-1));var k=0;if(this._outerRef){var w=this._outerRef;b==="vertical"?k=w.scrollWidth>w.clientWidth?MC():0:k=w.scrollHeight>w.clientHeight?MC():0}this.scrollTo(s(this.props,m,x,S,this._instanceProps,k))},h.componentDidMount=function(){var m=this.props,x=m.direction,y=m.initialScrollOffset,v=m.layout;if(typeof y=="number"&&this._outerRef!=null){var b=this._outerRef;x==="horizontal"||v==="horizontal"?b.scrollLeft=y:b.scrollTop=y}this._callPropsCallbacks()},h.componentDidUpdate=function(){var m=this.props,x=m.direction,y=m.layout,v=this.state,b=v.scrollOffset,S=v.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var k=this._outerRef;if(x==="horizontal"||y==="horizontal")if(x==="rtl")switch(DC()){case"negative":k.scrollLeft=-b;break;case"positive-ascending":k.scrollLeft=b;break;default:var w=k.clientWidth,C=k.scrollWidth;k.scrollLeft=C-w-b;break}else k.scrollLeft=b;else k.scrollTop=b}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&jC(this._resetIsScrollingTimeoutId)},h.render=function(){var m=this.props,x=m.children,y=m.className,v=m.direction,b=m.height,S=m.innerRef,k=m.innerElementType,w=m.innerTagName,C=m.itemCount,_=m.itemData,I=m.itemKey,E=I===void 0?Vq:I,N=m.layout,Q=m.outerElementType,L=m.outerTagName,z=m.style,X=m.useIsScrolling,W=m.width,F=this.state.isScrolling,j=v==="horizontal"||N==="horizontal",A=j?this._onScrollHorizontal:this._onScrollVertical,P=this._getRangeToRender(),M=P[0],$=P[1],R=[];if(C>0)for(var q=M;q<=$;q++)R.push(g.createElement(x,{data:_,key:E(q,_),index:q,isScrolling:X?F:void 0,style:this._getItemStyle(q)}));var H=r(this.props,this._instanceProps);return g.createElement(Q||L||"div",{className:y,onScroll:A,ref:this._outerRefSetter,style:Cl({position:"relative",height:b,width:W,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:v},z)},g.createElement(k||w||"div",{children:R,ref:S,style:{height:j?"100%":H,pointerEvents:F?"none":void 0,width:j?H:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var m=this.props.itemCount;if(m>0){var x=this._getRangeToRender(),y=x[0],v=x[1],b=x[2],S=x[3];this._callOnItemsRendered(y,v,b,S)}}if(typeof this.props.onScroll=="function"){var k=this.state,w=k.scrollDirection,C=k.scrollOffset,_=k.scrollUpdateWasRequested;this._callOnScroll(w,C,_)}},h._getRangeToRender=function(){var m=this.props,x=m.itemCount,y=m.overscanCount,v=this.state,b=v.isScrolling,S=v.scrollDirection,k=v.scrollOffset;if(x===0)return[0,0,0,0];var w=o(this.props,k,this._instanceProps),C=a(this.props,w,k,this._instanceProps),_=!b||S==="backward"?Math.max(1,y):1,I=!b||S==="forward"?Math.max(1,y):1;return[Math.max(0,w-_),Math.max(0,Math.min(x-1,C+I)),w,C]},d}(g.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var Xq=function(e,n){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,n.instance},Zq=Fq({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,s,o){var a=e.direction,l=e.height,c=e.itemCount,u=e.itemSize,f=e.layout,d=e.width,h=a==="horizontal"||f==="horizontal",O=h?d:l,m=Math.max(0,c*u-O),x=Math.min(m,n*u),y=Math.max(0,n*u-O+u+o);switch(r==="smart"&&(i>=y-O&&i<=x+O?r="auto":r="center"),r){case"start":return x;case"end":return y;case"center":{var v=Math.round(y+(x-y)/2);return v<Math.ceil(O/2)?0:v>m+Math.floor(O/2)?m:v}case"auto":default:return i>=y&&i<=x?i:i<y?y:x}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,s=e.height,o=e.itemCount,a=e.itemSize,l=e.layout,c=e.width,u=i==="horizontal"||l==="horizontal",f=n*a,d=u?c:s,h=Math.ceil((d+r-f)/a);return Math.max(0,Math.min(o-1,n+h-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function Wq(){var t,e;const n=Kn(),i=uq().cursor;if(!i||i.type!=="line")return null;const s=n.indent,o=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),a=s*i.level,l=n.renderCursor;return p.jsx(l,{top:o,left:a,indent:s})}var qq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Yq=g.forwardRef(function(e,n){const{children:r}=e,i=qq(e,["children"]),s=Kn();return p.jsxs("div",Object.assign({ref:n},i,{onClick:o=>{o.currentTarget===o.target&&s.deselectAll()},children:[p.jsx(Uq,{}),r]}))}),Uq=()=>{const t=Kn();return p.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:p.jsx(Wq,{})})};var Hq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Gq=g.forwardRef(function(e,n){var r,i,s,o,{style:a}=e,l=Hq(e,["style"]);const c=Kn(),u=(i=(r=c.props.padding)!==null&&r!==void 0?r:c.props.paddingTop)!==null&&i!==void 0?i:0,f=(o=(s=c.props.padding)!==null&&s!==void 0?s:c.props.paddingBottom)!==null&&o!==void 0?o:0;return p.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},a),{height:`${parseFloat(a.height)+u+f}px`})},l))});var iN=g.createContext({dragDropManager:void 0}),sr;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(sr||(sr={}));function we(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!t){var s;if(e===void 0)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;s=new Error(e.replace(/%s/g,function(){return r[o++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var jw="dnd-core/INIT_COORDS",ag="dnd-core/BEGIN_DRAG",Mw="dnd-core/PUBLISH_DRAG_SOURCE",lg="dnd-core/HOVER",cg="dnd-core/DROP",ug="dnd-core/END_DRAG";function LC(t,e){return{type:jw,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Th(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Th=function(n){return typeof n}:Th=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Th(t)}function Kq(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n||null},t)}function Jq(t,e){return t.filter(function(n){return n!==e})}function sN(t){return Th(t)==="object"}function eY(t,e){var n=new Map,r=function(o){n.set(o,n.has(o)?n.get(o)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(s,o){s===1&&i.push(o)}),i}function tY(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var nY={type:jw,payload:{clientOffset:null,sourceClientOffset:null}};function rY(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,s=i===void 0?!0:i,o=r.clientOffset,a=r.getSourceClientOffset,l=t.getMonitor(),c=t.getRegistry();t.dispatch(LC(o)),iY(n,l,c);var u=aY(n,l);if(u===null){t.dispatch(nY);return}var f=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");sY(a),f=a(u)}t.dispatch(LC(o,f));var d=c.getSource(u),h=d.beginDrag(l,u);if(h!=null){oY(h),c.pinSource(u);var O=c.getSourceType(u);return{type:ag,payload:{itemType:O,item:h,sourceId:u,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!s}}}}}function iY(t,e,n){we(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){we(n.getSource(r),"Expected sourceIds to be registered.")})}function sY(t){we(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function oY(t){we(sN(t),"Item must be an object.")}function aY(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function lY(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Mw}}}function vx(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function cY(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;uY(n);var s=n.slice(0),o=t.getMonitor(),a=t.getRegistry();fY(s,o,a);var l=o.getItemType();return dY(s,a,l),hY(s,o,a),{type:lg,payload:{targetIds:s,clientOffset:i||null}}}}function uY(t){we(Array.isArray(t),"Expected targetIds to be an array.")}function fY(t,e,n){we(e.isDragging(),"Cannot call hover while not dragging."),we(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];we(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var s=n.getTarget(i);we(s,"Expected targetIds to be registered.")}}function dY(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],s=e.getTargetType(i);vx(s,n)||t.splice(r,1)}}function hY(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function zC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function BC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zC(Object(n),!0).forEach(function(r){pY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mY(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();gY(r);var s=vY(r);s.forEach(function(o,a){var l=OY(o,a,i,r),c={type:cg,payload:{dropResult:BC(BC({},n),l)}};t.dispatch(c)})}}function gY(t){we(t.isDragging(),"Cannot call drop while not dragging."),we(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function OY(t,e,n,r){var i=n.getTarget(t),s=i?i.drop(r,t):void 0;return yY(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function yY(t){we(typeof t>"u"||sN(t),"Drop result must either be an object or undefined.")}function vY(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function xY(t){return function(){var n=t.getMonitor(),r=t.getRegistry();bY(n);var i=n.getSourceId();if(i!=null){var s=r.getSource(i,!0);s.endDrag(n,i),r.unpinSource()}return{type:ug}}}function bY(t){we(t.isDragging(),"Cannot call endDrag while not dragging.")}function wY(t){return{beginDrag:rY(t),publishDragSource:lY(t),hover:cY(t),drop:mY(t),endDrag:xY(t)}}function SY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kY(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function CY(t,e,n){return e&&kY(t.prototype,e),t}function Pc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var PY=function(){function t(e,n){var r=this;SY(this,t),Pc(this,"store",void 0),Pc(this,"monitor",void 0),Pc(this,"backend",void 0),Pc(this,"isSetUp",!1),Pc(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return CY(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(o){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=o.apply(n,l);typeof u<"u"&&r(u)}}var s=wY(this);return Object.keys(s).reduce(function(o,a){var l=s[a];return o[a]=i(l),o},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function tr(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var VC=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),FC=function(){return Math.random().toString(36).substring(7).split("").join(".")},XC={INIT:"@@redux/INIT"+FC(),REPLACE:"@@redux/REPLACE"+FC()};function TY(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function oN(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(tr(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(tr(1));return n(oN)(t,e)}if(typeof t!="function")throw new Error(tr(2));var i=t,s=e,o=[],a=o,l=!1;function c(){a===o&&(a=o.slice())}function u(){if(l)throw new Error(tr(3));return s}function f(m){if(typeof m!="function")throw new Error(tr(4));if(l)throw new Error(tr(5));var x=!0;return c(),a.push(m),function(){if(x){if(l)throw new Error(tr(6));x=!1,c();var v=a.indexOf(m);a.splice(v,1),o=null}}}function d(m){if(!TY(m))throw new Error(tr(7));if(typeof m.type>"u")throw new Error(tr(8));if(l)throw new Error(tr(9));try{l=!0,s=i(s,m)}finally{l=!1}for(var x=o=a,y=0;y<x.length;y++){var v=x[y];v()}return m}function h(m){if(typeof m!="function")throw new Error(tr(10));i=m,d({type:XC.REPLACE})}function O(){var m,x=f;return m={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(tr(11));function b(){v.next&&v.next(u())}b();var S=x(b);return{unsubscribe:S}}},m[VC]=function(){return this},m}return d({type:XC.INIT}),r={dispatch:d,subscribe:f,getState:u,replaceReducer:h},r[VC]=O,r}var EY=function(e,n){return e===n};function RY(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function _Y(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:EY;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function ZC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function WC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ZC(Object(n),!0).forEach(function(r){$Y(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ZC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $Y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qC={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function QY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qC,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case jw:case ag:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case lg:return RY(t.clientOffset,n.clientOffset)?t:WC(WC({},t),{},{clientOffset:n.clientOffset});case ug:case cg:return qC;default:return t}}var Dw="dnd-core/ADD_SOURCE",Lw="dnd-core/ADD_TARGET",zw="dnd-core/REMOVE_SOURCE",fg="dnd-core/REMOVE_TARGET";function AY(t){return{type:Dw,payload:{sourceId:t}}}function IY(t){return{type:Lw,payload:{targetId:t}}}function NY(t){return{type:zw,payload:{sourceId:t}}}function jY(t){return{type:fg,payload:{targetId:t}}}function YC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?YC(Object(n),!0).forEach(function(r){MY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):YC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function MY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var DY={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function LY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DY,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case ag:return nr(nr({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Mw:return nr(nr({},t),{},{isSourcePublic:!0});case lg:return nr(nr({},t),{},{targetIds:n.targetIds});case fg:return t.targetIds.indexOf(n.targetId)===-1?t:nr(nr({},t),{},{targetIds:Jq(t.targetIds,n.targetId)});case cg:return nr(nr({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case ug:return nr(nr({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function zY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Dw:case Lw:return t+1;case zw:case fg:return t-1;default:return t}}var Qp=[],Bw=[];Qp.__IS_NONE__=!0;Bw.__IS_ALL__=!0;function BY(t,e){if(t===Qp)return!1;if(t===Bw||typeof e>"u")return!0;var n=tY(e,t);return n.length>0}function VY(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case lg:break;case Dw:case Lw:case fg:case zw:return Qp;case ag:case Mw:case ug:case cg:default:return Bw}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,s=i===void 0?[]:i,o=eY(r,s),a=o.length>0||!_Y(r,s);if(!a)return Qp;var l=s[s.length-1],c=r[r.length-1];return l!==c&&(l&&o.push(l),c&&o.push(c)),o}function FY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function UC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function HC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?UC(Object(n),!0).forEach(function(r){XY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function XY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ZY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:VY(t.dirtyHandlerIds,{type:e.type,payload:HC(HC({},e.payload),{},{prevTargetIds:Kq(t,"dragOperation.targetIds",[])})}),dragOffset:QY(t.dragOffset,e),refCount:zY(t.refCount,e),dragOperation:LY(t.dragOperation,e),stateId:FY(t.stateId)}}function WY(t,e){return{x:t.x+e.x,y:t.y+e.y}}function aN(t,e){return{x:t.x-e.x,y:t.y-e.y}}function qY(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:aN(WY(e,r),n)}function YY(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:aN(e,n)}function UY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HY(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function GY(t,e,n){return e&&HY(t.prototype,e),t}function GC(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var KY=function(){function t(e,n){UY(this,t),GC(this,"store",void 0),GC(this,"registry",void 0),this.store=e,this.registry=n}return GY(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},s=i.handlerIds;we(typeof n=="function","listener must be a function."),we(typeof s>"u"||Array.isArray(s),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var c=r.store.getState(),u=c.stateId;try{var f=u===o||u===o+1&&!BY(c.dirtyHandlerIds,s);f||n()}finally{o=u}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;we(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,s=function(){var a=r.store.getState().dragOffset;a!==i&&(i=a,n())};return this.store.subscribe(s)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return we(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(we(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),s=this.getItemType();return vx(i,s)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(we(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),s=this.getItemType();return i!==s?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var s=this.registry.getTargetType(n),o=this.getItemType();if(o&&!vx(s,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var l=a.indexOf(n);return i?l===a.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return qY(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return YY(this.store.getState().dragOffset)}}]),t}(),JY=0;function eU(){return JY++}function Eh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Eh=function(n){return typeof n}:Eh=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eh(t)}function tU(t){we(typeof t.canDrag=="function","Expected canDrag to be a function."),we(typeof t.beginDrag=="function","Expected beginDrag to be a function."),we(typeof t.endDrag=="function","Expected endDrag to be a function.")}function nU(t){we(typeof t.canDrop=="function","Expected canDrop to be a function."),we(typeof t.hover=="function","Expected hover to be a function."),we(typeof t.drop=="function","Expected beginDrag to be a function.")}function xx(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return xx(n,!1)});return}we(typeof t=="string"||Eh(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const KC=typeof global<"u"?global:self,lN=KC.MutationObserver||KC.WebKitMutationObserver;function cN(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function rU(t){let e=1;const n=new lN(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const iU=typeof lN=="function"?rU:cN;class sU{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=iU(this.flush),this.requestErrorThrow=cN(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class oU{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class aU{create(e){const n=this.freeTasks,r=n.length?n.pop():new oU(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const uN=new sU,lU=new aU(uN.registerPendingError);function cU(t){uN.enqueueTask(lU.create(t))}function uU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dU(t,e,n){return e&&fU(t.prototype,e),t}function va(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hU(t,e){return OU(t)||gU(t,e)||mU(t,e)||pU()}function pU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
439
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mU(t,e){if(t){if(typeof t=="string")return JC(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JC(t,e)}}function JC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gU(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function OU(t){if(Array.isArray(t))return t}function yU(t){var e=eU().toString();switch(t){case sr.SOURCE:return"S".concat(e);case sr.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function eP(t){switch(t[0]){case"S":return sr.SOURCE;case"T":return sr.TARGET;default:we(!1,"Cannot parse handler ID: ".concat(t))}}function tP(t,e){var n=t.entries(),r=!1;do{var i=n.next(),s=i.done,o=hU(i.value,2),a=o[1];if(a===e)return!0;r=!!s}while(!r);return!1}var vU=function(){function t(e){uU(this,t),va(this,"types",new Map),va(this,"dragSources",new Map),va(this,"dropTargets",new Map),va(this,"pinnedSourceId",null),va(this,"pinnedSource",null),va(this,"store",void 0),this.store=e}return dU(t,[{key:"addSource",value:function(n,r){xx(n),tU(r);var i=this.addHandler(sr.SOURCE,n,r);return this.store.dispatch(AY(i)),i}},{key:"addTarget",value:function(n,r){xx(n,!0),nU(r);var i=this.addHandler(sr.TARGET,n,r);return this.store.dispatch(IY(i)),i}},{key:"containsHandler",value:function(n){return tP(this.dragSources,n)||tP(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;we(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,s=i?this.pinnedSource:this.dragSources.get(n);return s}},{key:"getTarget",value:function(n){return we(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return we(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return we(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=eP(n);return r===sr.SOURCE}},{key:"isTargetId",value:function(n){var r=eP(n);return r===sr.TARGET}},{key:"removeSource",value:function(n){var r=this;we(this.getSource(n),"Expected an existing source."),this.store.dispatch(NY(n)),cU(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){we(this.getTarget(n),"Expected an existing target."),this.store.dispatch(jY(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);we(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){we(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var s=yU(n);return this.types.set(s,r),n===sr.SOURCE?this.dragSources.set(s,i):n===sr.TARGET&&this.dropTargets.set(s,i),s}}]),t}();function xU(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=bU(r),s=new KY(i,new vU(i)),o=new PY(i,s),a=t(o,e,n);return o.receiveBackend(a),o}function bU(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return oN(ZY,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var wU=["children"];function SU(t,e){return TU(t)||PU(t,e)||CU(t,e)||kU()}function kU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CU(t,e){if(t){if(typeof t=="string")return nP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nP(t,e)}}function nP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function PU(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function TU(t){if(Array.isArray(t))return t}function EU(t,e){if(t==null)return{};var n=RU(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function RU(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var rP=0,Rh=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),_U=g.memo(function(e){var n=e.children,r=EU(e,wU),i=$U(r),s=SU(i,2),o=s[0],a=s[1];return g.useEffect(function(){if(a){var l=fN();return++rP,function(){--rP===0&&(l[Rh]=null)}}},[]),p.jsx(iN.Provider,Object.assign({value:o},{children:n}),void 0)});function $U(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=QU(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function QU(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fN(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[Rh]||(i[Rh]={dragDropManager:xU(t,e,n,r)}),i[Rh]}function fN(){return typeof global<"u"?global:window}function AU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function NU(t,e,n){return e&&IU(t.prototype,e),t}function iP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var VO=!1,FO=!1,jU=function(){function t(e){AU(this,t),iP(this,"internalMonitor",void 0),iP(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return NU(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){we(!VO,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return VO=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{VO=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;we(!FO,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return FO=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{FO=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function MU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function LU(t,e,n){return e&&DU(t.prototype,e),t}function sP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var XO=!1,zU=function(){function t(e){MU(this,t),sP(this,"internalMonitor",void 0),sP(this,"targetId",null),this.internalMonitor=e.getMonitor()}return LU(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;we(!XO,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return XO=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{XO=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function BU(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function VU(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!g.isValidElement(e)){var r=e;return t(r,n),r}var i=e;BU(i);var s=n?function(o){return t(o,n)}:t;return FU(i,s)}}function dN(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=VU(r);e[n]=function(){return i}}}),e}function oP(t,e){typeof t=="function"?t(e):t.current=e}function FU(t,e){var n=t.ref;return we(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?g.cloneElement(t,{ref:function(i){oP(n,i),oP(e,i)}}):g.cloneElement(t,{ref:e})}function _h(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_h=function(n){return typeof n}:_h=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_h(t)}function bx(t){return t!==null&&_h(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function wx(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),l=0;l<s.length;l++){var c=s[l];if(!a(c))return!1;var u=t[c],f=e[c];if(i=void 0,i===!1||i===void 0&&u!==f)return!1}return!0}function XU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function WU(t,e,n){return e&&ZU(t.prototype,e),t}function Bt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qU=function(){function t(e){var n=this;XU(this,t),Bt(this,"hooks",dN({dragSource:function(i,s){n.clearDragSource(),n.dragSourceOptions=s||null,bx(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,s){n.clearDragPreview(),n.dragPreviewOptions=s||null,bx(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),Bt(this,"handlerId",null),Bt(this,"dragSourceRef",null),Bt(this,"dragSourceNode",void 0),Bt(this,"dragSourceOptionsInternal",null),Bt(this,"dragSourceUnsubscribe",void 0),Bt(this,"dragPreviewRef",null),Bt(this,"dragPreviewNode",void 0),Bt(this,"dragPreviewOptionsInternal",null),Bt(this,"dragPreviewUnsubscribe",void 0),Bt(this,"lastConnectedHandlerId",null),Bt(this,"lastConnectedDragSource",null),Bt(this,"lastConnectedDragSourceOptions",null),Bt(this,"lastConnectedDragPreview",null),Bt(this,"lastConnectedDragPreviewOptions",null),Bt(this,"backend",void 0),this.backend=e}return WU(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!wx(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!wx(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function YU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function UU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function HU(t,e,n){return e&&UU(t.prototype,e),t}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var GU=function(){function t(e){var n=this;YU(this,t),ni(this,"hooks",dN({dropTarget:function(i,s){n.clearDropTarget(),n.dropTargetOptions=s,bx(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),ni(this,"handlerId",null),ni(this,"dropTargetRef",null),ni(this,"dropTargetNode",void 0),ni(this,"dropTargetOptionsInternal",null),ni(this,"unsubscribeDropTarget",void 0),ni(this,"lastConnectedHandlerId",null),ni(this,"lastConnectedDropTarget",null),ni(this,"lastConnectedDropTargetOptions",null),ni(this,"backend",void 0),this.backend=e}return HU(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!wx(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function KU(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function JU(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Wo=typeof window<"u"?g.useLayoutEffect:g.useEffect;function $h(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$h=function(n){return typeof n}:$h=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$h(t)}function eH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tH(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nH(t,e,n){return e&&tH(t.prototype,e),t}function ZO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rH=function(){function t(e,n,r){eH(this,t),ZO(this,"spec",void 0),ZO(this,"monitor",void 0),ZO(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return nH(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,s=null;return $h(r.item)==="object"?s=r.item:typeof r.item=="function"?s=r.item(i):s={},(n=s)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,s=this.monitor,o=i.isDragging;return o?o(s):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,s=n.end;s&&s(r.getItem(),r),i.reconnect()}}]),t}();function iH(t,e,n){var r=g.useMemo(function(){return new rH(t,e,n)},[e,n]);return g.useEffect(function(){r.spec=t},[t]),r}function la(){var t=g.useContext(iN),e=t.dragDropManager;return we(e!=null,"Expected drag drop context"),e}function sH(t){return g.useMemo(function(){var e=t.type;return we(e!=null,"spec.type must be defined"),e},[t])}function oH(t,e){return uH(t)||cH(t,e)||lH(t,e)||aH()}function aH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
441
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lH(t,e){if(t){if(typeof t=="string")return aP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aP(t,e)}}function aP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function uH(t){if(Array.isArray(t))return t}function fH(t,e,n){var r=la(),i=iH(t,e,n),s=sH(t);Wo(function(){if(s!=null){var a=JU(s,i,r),l=oH(a,2),c=l[0],u=l[1];return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,i,s])}function dH(t){return gH(t)||mH(t)||pH(t)||hH()}function hH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
442
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pH(t,e){if(t){if(typeof t=="string")return Sx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sx(t,e)}}function mH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gH(t){if(Array.isArray(t))return Sx(t)}function Sx(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function hN(t,e){var n=dH(e||[]);return e==null&&typeof t!="function"&&n.push(t),g.useMemo(function(){return typeof t=="function"?t():t},n)}function OH(){var t=la();return g.useMemo(function(){return new jU(t)},[t])}function yH(t,e){var n=la(),r=g.useMemo(function(){return new qU(n.getBackend())},[n]);return Wo(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),Wo(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var vH=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const xH=zl(vH);function bH(t,e){return CH(t)||kH(t,e)||SH(t,e)||wH()}function wH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
443
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SH(t,e){if(t){if(typeof t=="string")return lP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lP(t,e)}}function lP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function CH(t){if(Array.isArray(t))return t}function pN(t,e,n){var r=g.useState(function(){return e(t)}),i=bH(r,2),s=i[0],o=i[1],a=g.useCallback(function(){var l=e(t);xH(s,l)||(o(l),n&&n())},[s,t,n]);return Wo(a),[s,a]}function PH(t,e){return _H(t)||RH(t,e)||EH(t,e)||TH()}function TH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
444
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EH(t,e){if(t){if(typeof t=="string")return cP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cP(t,e)}}function cP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function RH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function _H(t){if(Array.isArray(t))return t}function $H(t,e,n){var r=pN(t,e,n),i=PH(r,2),s=i[0],o=i[1];return Wo(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(o,{handlerIds:[l]})},[t,o]),s}function mN(t,e,n){return $H(e,t||function(){return{}},function(){return n.reconnect()})}function QH(t){return g.useMemo(function(){return t.hooks.dragSource()},[t])}function AH(t){return g.useMemo(function(){return t.hooks.dragPreview()},[t])}function IH(t,e){var n=hN(t,e);we(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var r=OH(),i=yH(n.options,n.previewOptions);return fH(n,r,i),[mN(n.collect,r,i),QH(i),AH(i)]}function NH(t){var e=t.accept;return g.useMemo(function(){return we(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function jH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MH(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function DH(t,e,n){return e&&MH(t.prototype,e),t}function uP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var LH=function(){function t(e,n){jH(this,t),uP(this,"spec",void 0),uP(this,"monitor",void 0),this.spec=e,this.monitor=n}return DH(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function zH(t,e){var n=g.useMemo(function(){return new LH(t,e)},[e]);return g.useEffect(function(){n.spec=t},[t]),n}function BH(t,e){return ZH(t)||XH(t,e)||FH(t,e)||VH()}function VH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
445
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FH(t,e){if(t){if(typeof t=="string")return fP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fP(t,e)}}function fP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function XH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function ZH(t){if(Array.isArray(t))return t}function WH(t,e,n){var r=la(),i=zH(t,e),s=NH(t);Wo(function(){var a=KU(s,i,r),l=BH(a,2),c=l[0],u=l[1];return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,i,n,s.map(function(o){return o.toString()}).join("|")])}function qH(){var t=la();return g.useMemo(function(){return new zU(t)},[t])}function YH(t){var e=la(),n=g.useMemo(function(){return new GU(e.getBackend())},[e]);return Wo(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function UH(t){return g.useMemo(function(){return t.hooks.dropTarget()},[t])}function gN(t,e){var n=hN(t,e),r=qH(),i=YH(n.options);return WH(n,r,i),[mN(n.collect,r,i),UH(i)]}function HH(t,e){return eG(t)||JH(t,e)||KH(t,e)||GH()}function GH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
446
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KH(t,e){if(t){if(typeof t=="string")return dP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dP(t,e)}}function dP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function JH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function eG(t){if(Array.isArray(t))return t}function tG(t){var e=la(),n=e.getMonitor(),r=pN(n,t),i=HH(r,2),s=i[0],o=i[1];return g.useEffect(function(){return n.subscribeToOffsetChange(o)}),g.useEffect(function(){return n.subscribeToStateChange(o)}),s}function ON(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function nG(t,e){return t.filter(function(n){return n!==e})}function rG(t,e){var n=new Set,r=function(o){return n.add(o)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(s){return i.push(s)}),i}function iG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oG(t,e,n){return e&&sG(t.prototype,e),t}function hP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var aG=function(){function t(e){iG(this,t),hP(this,"entered",[]),hP(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return oG(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,s=function(a){return r.isNodeInDocument(a)&&(!a.contains||a.contains(n))};return this.entered=rG(this.entered.filter(s),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=nG(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),lG=ON(function(){return/firefox/i.test(navigator.userAgent)}),yN=ON(function(){return!!window.safari});function cG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fG(t,e,n){return e&&uG(t.prototype,e),t}function Tc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pP=function(){function t(e,n){cG(this,t),Tc(this,"xs",void 0),Tc(this,"ys",void 0),Tc(this,"c1s",void 0),Tc(this,"c2s",void 0),Tc(this,"c3s",void 0);for(var r=e.length,i=[],s=0;s<r;s++)i.push(s);i.sort(function(_,I){return e[_]<e[I]?-1:1});for(var o=[],a=[],l,c,u=0;u<r-1;u++)l=e[u+1]-e[u],c=n[u+1]-n[u],o.push(l),a.push(c/l);for(var f=[a[0]],d=0;d<o.length-1;d++){var h=a[d],O=a[d+1];if(h*O<=0)f.push(0);else{l=o[d];var m=o[d+1],x=l+m;f.push(3*x/((x+m)/h+(x+l)/O))}}f.push(a[a.length-1]);for(var y=[],v=[],b,S=0;S<f.length-1;S++){b=a[S];var k=f[S],w=1/o[S],C=k+f[S+1]-b-b;y.push((b-k-C)*w),v.push(C*w*w)}this.xs=e,this.ys=n,this.c1s=f,this.c2s=y,this.c3s=v}return fG(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,s=this.c1s,o=this.c2s,a=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var c=0,u=a.length-1,f;c<=u;){f=Math.floor(.5*(c+u));var d=r[f];if(d<n)c=f+1;else if(d>n)u=f-1;else return i[f]}l=Math.max(0,u);var h=n-r[l],O=h*h;return i[l]+s[l]*h+o[l]*O+a[l]*h*O}}]),t}(),dG=1;function vN(t){var e=t.nodeType===dG?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Pd(t){return{x:t.clientX,y:t.clientY}}function hG(t){var e;return t.nodeName==="IMG"&&(lG()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function pG(t,e,n,r){var i=t?e.width:n,s=t?e.height:r;return yN()&&t&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function mG(t,e,n,r,i){var s=hG(e),o=s?t:e,a=vN(o),l={x:n.x-a.x,y:n.y-a.y},c=t.offsetWidth,u=t.offsetHeight,f=r.anchorX,d=r.anchorY,h=pG(s,e,c,u),O=h.dragPreviewWidth,m=h.dragPreviewHeight,x=function(){var C=new pP([0,.5,1],[l.y,l.y/u*m,l.y+m-u]),_=C.interpolate(d);return yN()&&s&&(_+=(window.devicePixelRatio-1)*m),_},y=function(){var C=new pP([0,.5,1],[l.x,l.x/c*O,l.x+O-c]);return C.interpolate(f)},v=i.offsetX,b=i.offsetY,S=v===0||v,k=b===0||b;return{x:S?v:y(),y:k?b:x()}}var xN="__NATIVE_FILE__",bN="__NATIVE_URL__",wN="__NATIVE_TEXT__",SN="__NATIVE_HTML__";const mP=Object.freeze(Object.defineProperty({__proto__:null,FILE:xN,HTML:SN,TEXT:wN,URL:bN},Symbol.toStringTag,{value:"Module"}));function WO(t,e,n){var r=e.reduce(function(i,s){return i||t.getData(s)},"");return r??n}var xa;function Td(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kx=(xa={},Td(xa,xN,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Td(xa,SN,{exposeProperties:{html:function(e,n){return WO(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Td(xa,bN,{exposeProperties:{urls:function(e,n){return WO(e,n,"").split(`
|
|
447
|
+
`)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Td(xa,wN,{exposeProperties:{text:function(e,n){return WO(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),xa);function gG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function OG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yG(t,e,n){return e&&OG(t.prototype,e),t}function gP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vG=function(){function t(e){gG(this,t),gP(this,"item",void 0),gP(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return yG(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(s){i[s]={value:r.config.exposeProperties[s](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function xG(t,e){var n=new vG(kx[t]);return n.loadDataTransfer(e),n}function qO(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(kx).filter(function(n){var r=kx[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function bG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function SG(t,e,n){return e&&wG(t.prototype,e),t}function YO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kG=function(){function t(e,n){bG(this,t),YO(this,"ownerDocument",null),YO(this,"globalContext",void 0),YO(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return SG(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function OP(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?OP(Object(n),!0).forEach(function(r){Re(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):OP(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function CG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function TG(t,e,n){return e&&PG(t.prototype,e),t}function Re(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var EG=function(){function t(e,n,r){var i=this;CG(this,t),Re(this,"options",void 0),Re(this,"actions",void 0),Re(this,"monitor",void 0),Re(this,"registry",void 0),Re(this,"enterLeaveCounter",void 0),Re(this,"sourcePreviewNodes",new Map),Re(this,"sourcePreviewNodeOptions",new Map),Re(this,"sourceNodes",new Map),Re(this,"sourceNodeOptions",new Map),Re(this,"dragStartSourceIds",null),Re(this,"dropTargetIds",[]),Re(this,"dragEnterTargetIds",[]),Re(this,"currentNativeSource",null),Re(this,"currentNativeHandle",null),Re(this,"currentDragSourceNode",null),Re(this,"altKeyPressed",!1),Re(this,"mouseMoveTimeoutTimer",null),Re(this,"asyncEndDragFrameId",null),Re(this,"dragOverTargetIds",null),Re(this,"lastClientOffset",null),Re(this,"hoverRafId",null),Re(this,"getSourceClientOffset",function(s){var o=i.sourceNodes.get(s);return o&&vN(o)||null}),Re(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),Re(this,"isNodeInDocument",function(s){return!!(s&&i.document&&i.document.body&&i.document.body.contains(s))}),Re(this,"endDragIfSourceWasRemovedFromDOM",function(){var s=i.currentDragSourceNode;s==null||i.isNodeInDocument(s)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),Re(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),Re(this,"handleTopDragStart",function(s){if(!s.defaultPrevented){var o=i.dragStartSourceIds;i.dragStartSourceIds=null;var a=Pd(s);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:a});var l=s.dataTransfer,c=qO(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var u=i.monitor.getSourceId(),f=i.sourceNodes.get(u),d=i.sourcePreviewNodes.get(u)||f;if(d){var h=i.getCurrentSourcePreviewNodeOptions(),O=h.anchorX,m=h.anchorY,x=h.offsetX,y=h.offsetY,v={anchorX:O,anchorY:m},b={offsetX:x,offsetY:y},S=mG(f,d,a,v,b);l.setDragImage(d,S.x,S.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(s.target);var k=i.getCurrentSourcePreviewNodeOptions(),w=k.captureDraggingState;w?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(c)i.beginDragNativeItem(c);else{if(l&&!l.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}}}),Re(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),Re(this,"handleTopDragEnterCapture",function(s){i.dragEnterTargetIds=[];var o=i.enterLeaveCounter.enter(s.target);if(!(!o||i.monitor.isDragging())){var a=s.dataTransfer,l=qO(a);l&&i.beginDragNativeItem(l,a)}}),Re(this,"handleTopDragEnter",function(s){var o=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=s.altKey,o.length>0&&i.actions.hover(o,{clientOffset:Pd(s)});var a=o.some(function(l){return i.monitor.canDropOnTarget(l)});a&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),Re(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),Re(this,"handleTopDragOver",function(s){var o=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}i.altKeyPressed=s.altKey,i.lastClientOffset=Pd(s),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(o||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var a=(o||[]).some(function(l){return i.monitor.canDropOnTarget(l)});a?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))}),Re(this,"handleTopDragLeaveCapture",function(s){i.isDraggingNativeItem()&&s.preventDefault();var o=i.enterLeaveCounter.leave(s.target);o&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),Re(this,"handleTopDropCapture",function(s){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var o;s.preventDefault(),(o=i.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}else qO(s.dataTransfer)&&s.preventDefault();i.enterLeaveCounter.reset()}),Re(this,"handleTopDrop",function(s){var o=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(o,{clientOffset:Pd(s)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),Re(this,"handleSelectStart",function(s){var o=s.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(s.preventDefault(),o.dragDrop()))}),this.options=new kG(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new aG(this.isNodeInDocument)}return TG(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var s=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){s.sourcePreviewNodes.delete(n),s.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var s=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var o=function(c){return s.handleDragStart(c,n)},a=function(c){return s.handleSelectStart(c)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",o),r.addEventListener("selectstart",a),function(){s.sourceNodes.delete(n),s.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",o),r.removeEventListener("selectstart",a),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,s=function(c){return i.handleDragEnter(c,n)},o=function(c){return i.handleDragOver(c,n)},a=function(c){return i.handleDrop(c,n)};return r.addEventListener("dragenter",s),r.addEventListener("dragover",o),r.addEventListener("drop",a),function(){r.removeEventListener("dragenter",s),r.removeEventListener("dragover",o),r.removeEventListener("drop",a)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return yP({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return yP({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(mP).some(function(r){return mP[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=xG(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var s;return(s=r.rootElement)===null||s===void 0?void 0:s.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Ed;function RG(){return Ed||(Ed=new Image,Ed.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Ed}var _G=function(e,n,r){return new EG(e,n,r)};function $G(t){const e=Kn(),n=e.selectedIds,[r,i,s]=IH(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const o=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch(kl.dragStart(t.id,o)),{id:t.id,dragIds:o}},end:()=>{e.hideCursor(),e.dispatch(kl.dragEnd())}}),[n,t]);return g.useEffect(()=>{s(RG())},[s]),i}function QG(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),s=n.height,o=i<s/2,a=!o,l=s/4,c=i>l&&i<s-l;return{x:r,inTopHalf:o,inBottomHalf:a,inMiddle:c,atTop:!c&&o,atBottom:!c&&a}}function AG(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Rd(t,e){return{parentId:t||null,index:e}}function ba(t,e){return{type:"line",index:t,level:e}}function IG(t){return{type:"highlight",id:t}}function UO(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,s=YI(r)+1;return{parentId:i,index:s}}function kN(t){var e;const n=QG(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:s,nextNode:o,prevNode:a}=t,[l,c]=AG(s,a,o,n);if(s&&s.isInternal&&n.inMiddle)return{drop:Rd(s.id,null),cursor:IG(s.id)};if(!l)return{drop:Rd((e=c==null?void 0:c.parent)===null||e===void 0?void 0:e.id,0),cursor:ba(0,0)};if(XI(l)){const u=Ph(i,(c==null?void 0:c.level)||0,l.level);return{drop:UO(l,u),cursor:ba(l.rowIndex+1,u)}}if(ZI(l)){const u=Ph(i,(c==null?void 0:c.level)||0,l.level);return{drop:UO(l,u),cursor:ba(l.rowIndex+1,u)}}if(WI(l)){const u=Ph(i,0,l.level+1);return u>l.level?{drop:Rd(l.id,0),cursor:ba(l.rowIndex+1,u)}:{drop:UO(l,u),cursor:ba(l.rowIndex+1,u)}}return{drop:Rd(l==null?void 0:l.id,0),cursor:ba(l.rowIndex+1,l.level+1)}}function NG(t,e){const n=Kn(),[r,i]=gN(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(s,o)=>{const a=o.getClientOffset();if(!t.current||!a)return;const{cursor:l,drop:c}=kN({element:t.current,offset:a,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});c&&n.dispatch(kl.hovering(c.parentId,c.index)),o.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:l,dragIds:c}=n.state.dnd;JI(n.props.onMove,{dragIds:c,parentId:a===qu?null:a,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(a)}),n.open(a)}}),[e,t.current,n.props]);return i}function jG(t){const e=Kn(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return g.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const MG=ee.memo(function({index:e,style:n}){FI(),cq();const r=Kn(),i=jG(e),s=g.useRef(null),o=$G(i),a=NG(s,i),l=g.useCallback(m=>{s.current=m,a(m)},[a]),c=r.indent*i.level,u=g.useMemo(()=>({paddingLeft:c}),[c]),f=g.useMemo(()=>{var m,x;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((x=(m=r.props.padding)!==null&&m!==void 0?m:r.props.paddingTop)!==null&&x!==void 0?x:0)})},[n,r.props.padding,r.props.paddingTop]),d={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:f,tabIndex:-1,className:r.props.rowClassName};g.useEffect(()=>{var m;!i.isEditing&&i.isFocused&&((m=s.current)===null||m===void 0||m.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,s.current]);const h=r.renderNode,O=r.renderRow;return p.jsx(O,{node:i,innerRef:l,attrs:d,children:p.jsx(h,{node:i,tree:r,style:u,dragHandle:o})})});let HO="",vP=null;function CN(){FI();const t=Kn();return p.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let s=t.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=t.lastNode),t.focus(s,{scroll:!1}),t.delete(Array.from(i))}else{const s=t.focusedNode;if(s){const o=s.nextSibling,a=s.parent;t.focus(o||a,{scroll:!1}),t.delete(s)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),UI(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),HI(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const s=t.focusedNode;s?s.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const s=t.focusedNode;s?s.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(vP),HO+=e.key,vP=setTimeout(()=>{HO=""},600);const r=t.visibleNodes.find(i=>{const s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(HO):!1});r&&t.focus(r.id)},children:p.jsx(Zq,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:Yq,innerElementType:Gq,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:MG})})}function xP(t){return t.isFiltered?LG(t.root,t.isMatch.bind(t)):DG(t.root)}function DG(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(PN),e}function LG(t,e){const n={},r=[];function i(o){if(!o.isRoot&&e(o)){n[o.id]=!0;let l=o.parent;for(;l;)n[l.id]=!0,l=l.parent}if(o.children)for(let l of o.children)i(l)}function s(o){var a;o.level>=0&&n[o.id]&&r.push(o),o.isOpen&&((a=o.children)===null||a===void 0||a.forEach(s))}return i(t),s(t),r.forEach(PN),r}function PN(t,e){t.rowIndex=e}const bP=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var GO=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const{safeRun:kt,identify:Ni,identifyNull:_r}=hq;class au{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=$C(this),this.visibleNodes=xP(this),this.idToIndex=bP(this.visibleNodes)}update(e){this.props=e,this.root=$C(this),this.visibleNodes=xP(this),this.idToIndex=bP(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=Fc(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=Fc(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,s=this.indexOf(n);if(s===null)return[];const o=Math.min(i,s),a=Math.max(i,s);return this.visibleNodes.slice(o,a+1)}indexOf(e){const n=KI(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return GO(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?nN(this):e.parentId,s=(n=e.index)!==null&&n!==void 0?n:tN(this),o=(r=e.type)!==null&&r!==void 0?r:"leaf",a=yield kt(this.props.onCreate,{type:o,parentId:i,index:s,parentNode:this.get(i)});a&&(this.focus(a),setTimeout(()=>{this.edit(a).then(()=>{this.select(a),this.activate(a)})}))})}delete(e){return GO(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(Ni),i=r.map(s=>this.get(s)).filter(s=>!!s);yield kt(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=Ni(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(LO(n)),new Promise(r=>{au.editPromise=r})}submit(e,n){return GO(this,void 0,void 0,function*(){if(!e)return;const r=Ni(e);yield kt(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(LO(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(LO(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(_r(e));n&&kt(this.props.onActivate,n)}resolveEdit(e){const n=au.editPromise;n&&n(e),au.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Oa(Ni(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&kt(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,s=this.visibleStopIndex-r;let o=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;o>r?o=r:o=Math.max(r-s,0),this.focus(this.at(o))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,s=i-r;let o=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;o<i?o=i:o=Math.min(o+s,this.visibleNodes.length-1),this.focus(this.at(o))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=Ni(e);r&&this.dispatch(Oa(i)),this.dispatch(Rr.only(i)),this.dispatch(Rr.anchor(i)),this.dispatch(Rr.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&kt(this.props.onFocus,this.focusedNode),kt(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=Ni(e);this.dispatch(Rr.remove(n)),kt(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(_r(e));n&&(this.dispatch(Oa(n.id)),this.dispatch(Rr.add(n.id)),this.dispatch(Rr.anchor(n.id)),this.dispatch(Rr.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&kt(this.props.onFocus,this.focusedNode),kt(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=Ni(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Oa(n)),this.dispatch(Rr.remove(this.nodesBetween(r,i))),this.dispatch(Rr.add(this.nodesBetween(r,_r(n)))),this.dispatch(Rr.mostRecent(n)),this.scrollTo(n),this.focusedNode&&kt(this.props.onFocus,this.focusedNode),kt(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),kt(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Oa((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&kt(this.props.onFocus,this.focusedNode),kt(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(Ni)),i=_r(e.anchor),s=_r(e.mostRecent);this.dispatch(Rr.set({ids:r,anchor:i,mostRecent:s})),kt(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const s of r)if(!s||!n||s.isInternal&&qI(n,s))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch(kl.cursor({type:"none"}))}showCursor(e){this.dispatch(kl.cursor(e))}open(e){const n=_r(e);n&&(this.isOpen(n)||(this.dispatch(Ox.open(n,this.isFiltered)),kt(this.props.onToggle,n)))}close(e){const n=_r(e);n&&this.isOpen(n)&&(this.dispatch(Ox.close(n,this.isFiltered)),kt(this.props.onToggle,n))}toggle(e){const n=_r(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=_r(e);if(!n)return;const r=Nw(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){_p(this.root,e=>{e.isInternal&&e.open()})}closeAll(){_p(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=Ni(e);return this.openParents(r),eN(()=>r in this.idToIndex).then(()=>{var i;const s=this.idToIndex[r];s!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(s,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===qu)return!0;const s=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:s}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!Fc(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!Fc(e,n)}isDragging(e){const n=_r(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=_r(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Oa(e.id))}onBlur(){this.dispatch(Sq())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||CN}get renderRow(){return this.props.renderRow||yq}get renderNode(){return this.props.children||vq}get renderDragPreview(){return this.props.renderDragPreview||rN}get renderCursor(){return this.props.renderCursor||Oq}}function Vt(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var zG=typeof Symbol=="function"&&Symbol.observable||"@@observable",wP=zG,KO=()=>Math.random().toString(36).substring(7).split("").join("."),BG={INIT:`@@redux/INIT${KO()}`,REPLACE:`@@redux/REPLACE${KO()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${KO()}`},Ap=BG;function VG(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function TN(t,e,n){if(typeof t!="function")throw new Error(Vt(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Vt(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Vt(1));return n(TN)(t,e)}let r=t,i=e,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((x,y)=>{o.set(y,x)}))}function u(){if(l)throw new Error(Vt(3));return i}function f(x){if(typeof x!="function")throw new Error(Vt(4));if(l)throw new Error(Vt(5));let y=!0;c();const v=a++;return o.set(v,x),function(){if(y){if(l)throw new Error(Vt(6));y=!1,c(),o.delete(v),s=null}}}function d(x){if(!VG(x))throw new Error(Vt(7));if(typeof x.type>"u")throw new Error(Vt(8));if(typeof x.type!="string")throw new Error(Vt(17));if(l)throw new Error(Vt(9));try{l=!0,i=r(i,x)}finally{l=!1}return(s=o).forEach(v=>{v()}),x}function h(x){if(typeof x!="function")throw new Error(Vt(10));r=x,d({type:Ap.REPLACE})}function O(){const x=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Vt(11));function v(){const S=y;S.next&&S.next(u())}return v(),{unsubscribe:x(v)}},[wP](){return this}}}return d({type:Ap.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[wP]:O}}function FG(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Ap.INIT})>"u")throw new Error(Vt(12));if(typeof n(void 0,{type:Ap.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Vt(13))})}function SP(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let i;try{FG(n)}catch(s){i=s}return function(o={},a){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=o[f],O=d(h,a);if(typeof O>"u")throw a&&a.type,new Error(Vt(14));c[f]=O,l=l||O!==h}return l=l||r.length!==Object.keys(o).length,l?c:o}}function XG(t=Sl().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const ZG=SP({nodes:SP({focus:kq,edit:wq,open:Cq,selection:Pq,drag:XG}),dnd:Tq}),WG=Sl();function qG({treeProps:t,imperativeHandle:e,children:n}){const r=g.useRef(null),i=g.useRef(null),s=g.useRef(TN(ZG,Sl(t))),o=U$.useSyncExternalStore(s.current.subscribe,s.current.getState,()=>WG),a=g.useMemo(()=>new au(s.current,t,r,i),[]),l=g.useRef(0);return g.useMemo(()=>{l.current+=1,a.update(t)},[...Object.values(t),o.nodes.open]),g.useImperativeHandle(e,()=>a),g.useEffect(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),g.useEffect(()=>{a.props.searchTerm||s.current.dispatch(Ox.clear(!0))},[a.props.searchTerm]),p.jsx(LI.Provider,{value:a,children:p.jsx(VI.Provider,{value:l.current,children:p.jsx(zI.Provider,{value:o.nodes,children:p.jsx(BI.Provider,{value:o.dnd,children:p.jsx(_U,Object.assign({backend:_G,options:{rootElement:a.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function YG(){const t=Kn(),[,e]=gN(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:s,drop:o}=kN({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});o&&t.dispatch(kl.hovering(o.parentId,o.index)),r.canDrop()?s&&t.showCursor(s):t.hideCursor()}}),[t]);e(t.listEl)}function UG(t){return YG(),t.children}function HG(){const e=Kn().props.renderContainer||CN;return p.jsx(p.Fragment,{children:p.jsx(e,{})})}function GG(){const t=Kn(),{offset:e,mouse:n,item:r,isDragging:i}=tG(o=>({offset:o.getSourceClientOffset(),mouse:o.getClientOffset(),item:o.getItem(),isDragging:o.isDragging()})),s=t.props.renderDragPreview||rN;return p.jsx(s,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class KG{constructor(e){this.root=JG(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function JG(t){const e=new EN({id:"ROOT"},null);return e.children=t.map(n=>Vw(n,e)),e}function Vw(t,e){const n=new EN(t,e);return t.children&&(n.children=t.children.map(r=>Vw(r,n))),n}class EN{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const s=Vw(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,s),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let eK=0;function tK(t){const[e,n]=g.useState(t),r=g.useMemo(()=>new KG(e),[e]);return[e,{onMove:c=>{for(const u of c.dragIds)r.move({id:u,parentId:c.parentId,index:c.index});n(r.data)},onRename:({name:c,id:u})=>{r.update({id:u,changes:{name:c}}),n(r.data)},onCreate:({parentId:c,index:u,type:f})=>{const d={id:`simple-tree-id-${eK++}`,name:""};return f==="internal"&&(d.children=[]),r.create({parentId:c,index:u,data:d}),n(r.data),d},onDelete:c=>{c.ids.forEach(u=>r.drop({id:u})),n(r.data)}}]}function nK(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
448
|
+
Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=tK(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function rK(t,e){const n=nK(t);return p.jsxs(qG,{treeProps:n,imperativeHandle:e,children:[p.jsx(UG,{children:p.jsx(HG,{})}),p.jsx(GG,{})]})}const iK=g.forwardRef(rK),fn=g.forwardRef(({className:t,type:e,...n},r)=>p.jsx("input",{type:e,className:le("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));fn.displayName="Input";function sK({status:t}){if(!t)return null;const e={indexed:{icon:p.jsx(Gi,{className:"h-3 w-3 text-green-500 flex-shrink-0"}),label:"Indexed"},modified:{icon:p.jsx(If,{className:"h-3 w-3 text-yellow-500 flex-shrink-0"}),label:"Modified since last index"},unindexed:{icon:p.jsx(Or,{className:"h-3 w-3 text-gray-400 flex-shrink-0"}),label:"Not indexed"},indexing:{icon:p.jsx(Un,{className:"h-3 w-3 text-blue-500 animate-spin flex-shrink-0"}),label:"Indexing..."}},{icon:n,label:r}=e[t];return p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx("span",{className:"flex-shrink-0 cursor-help",children:n})}),p.jsx(yn,{side:"left",children:p.jsx("p",{children:r})})]})}function oK({type:t,isOpen:e,activeTab:n}){return t==="directory"?e?p.jsx(Gb,{className:"h-4 w-4 text-yellow-500 flex-shrink-0"}):p.jsx(zm,{className:"h-4 w-4 text-yellow-500 flex-shrink-0"}):n==="notes"?p.jsx(sn,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):p.jsx(rn,{className:"h-4 w-4 text-orange-500 flex-shrink-0"})}const aK=g.forwardRef(function({node:e,style:n,tree:r,isSelected:i,isMultiSelected:s,isIndexing:o,activeTab:a,onSelect:l,onContextMenu:c},u){const f=r.isOpen(e.id),d=e.type==="directory",h=v=>{d&&r.toggle(e.id),l(e,v)},O=v=>{v.preventDefault(),c(e,v)},x=(e.relativePath.split("/").length-1)*16+8,y=o?"indexing":e.indexStatus;return p.jsxs("div",{ref:u,style:{...n,paddingLeft:x},className:le("flex items-center gap-2 h-7 pr-2 rounded-sm cursor-pointer select-none","hover:bg-accent/50 transition-colors",i&&"bg-accent",s&&"bg-accent/70",o&&"bg-blue-500/10"),onClick:h,onContextMenu:O,children:[d?p.jsx("button",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:v=>{v.stopPropagation(),r.toggle(e.id)},children:f?p.jsx(aa,{className:"h-3 w-3 text-muted-foreground"}):p.jsx(Lm,{className:"h-3 w-3 text-muted-foreground"})}):p.jsx("div",{className:"w-4 flex-shrink-0"}),p.jsx(oK,{type:e.type,isOpen:f,activeTab:a}),p.jsx("span",{className:le("flex-1 truncate text-sm",o&&"text-blue-600 dark:text-blue-400"),children:e.name}),e.type==="file"&&y&&y!=="indexed"&&p.jsx(sK,{status:y})]})});function lK(t,e){const n=new Map,r=[...t].sort((o,a)=>o.relativePath.localeCompare(a.relativePath));for(const o of r){const a=o.relativePath.split("/");for(let l=0;l<a.length;l++){const c=l===a.length-1,u=a.slice(0,l+1).join("/");if(!n.has(u)){const f={id:u,path:o.path.substring(0,o.path.length-o.relativePath.length+u.length),name:a[l],relativePath:u,type:c?"file":"directory",children:c?void 0:[]};if(c&&(f.indexStatus=o.indexStatus,f.size=o.size,f.lastIndexed=o.lastIndexed,e==="notes"?f.chunks=o.chunks:(f.symbols=o.symbols,f.language=o.language)),n.set(u,f),l>0){const d=a.slice(0,l).join("/"),h=n.get(d);h&&h.children&&h.children.push(f)}}}}const i=Array.from(n.values()).filter(o=>!o.relativePath.includes("/")),s=o=>o.sort((a,l)=>a.type!==l.type?a.type==="directory"?-1:1:a.name.localeCompare(l.name)).map(a=>(a.children&&a.children.length>0&&(a.children=s(a.children)),a));return s(i)}function cK(t,e){if(!e)return t;const n=e.toLowerCase(),r=i=>{var l;const s=i.name.toLowerCase().includes(n),o=i.relativePath.toLowerCase().includes(n);if(i.type==="file")return s||o?i:null;const a=(l=i.children)==null?void 0:l.map(r).filter(c=>c!==null);return a&&a.length>0?{...i,children:a}:s||o?i:null};return t.map(r).filter(i=>i!==null)}function kP({files:t,activeTab:e,isLoading:n,selectedFile:r,filterQuery:i,onFilterChange:s,onSelectFile:o,onReindex:a,onRemove:l}){const c=g.useRef(null),u=g.useRef(null),f=g.useRef(),[d,h]=g.useState(400),[O,m]=g.useState(i),[x,y]=g.useState([]),[v,b]=g.useState(null),[S,k]=g.useState(null),{notesSyncProgress:w,codeSyncProgress:C}=Qf(),_=e==="notes"?w==null?void 0:w.current:C==null?void 0:C.current,I=g.useCallback(j=>{m(j),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{s(j)},200)},[s]);g.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),g.useEffect(()=>{m(i)},[i]),g.useLayoutEffect(()=>{const j=u.current;if(!j)return;const A=new ResizeObserver(P=>{const M=P[0];M&&h(M.contentRect.height)});return A.observe(j),()=>A.disconnect()},[]);const E=g.useMemo(()=>{const j=lK(t,e);return cK(j,O)},[t,e,O]),N=g.useCallback((j,A)=>{const P=A.metaKey||A.ctrlKey,M=A.shiftKey;j.type==="file"?P?y($=>$.some(q=>q.id===j.id)?$.filter(q=>q.id!==j.id):[...$,j]):M&&x.length>0?y($=>$.some(R=>R.id===j.id)?$:[...$,j]):(y([j]),o(j.relativePath)):!P&&!M&&y([])},[x,o]),Q=g.useCallback((j,A)=>{A.preventDefault(),b(j),k({x:A.clientX,y:A.clientY}),x.some(P=>P.id===j.id)||y([j])},[x]),L=g.useCallback(()=>{const j=x.length>0?x.map(A=>A.relativePath):v?[v.relativePath]:[];j.length>0&&a(j),k(null)},[x,v,a]),z=g.useCallback(()=>{const j=x.length>0?x.filter(A=>A.type==="file").map(A=>A.relativePath):(v==null?void 0:v.type)==="file"?[v.relativePath]:[];j.length>0&&l(j),k(null)},[x,v,l]),X=g.useCallback(()=>{v&&window.open(`vscode://file/${v.path}`,"_blank"),k(null)},[v]),W=g.useCallback(()=>{v&&navigator.clipboard.writeText(v.relativePath),k(null)},[v]);g.useEffect(()=>{const j=()=>k(null);if(S)return document.addEventListener("click",j),()=>document.removeEventListener("click",j)},[S]),g.useEffect(()=>{if(!r||!c.current)return;const j=r.split("/");for(let A=1;A<j.length;A++){const P=j.slice(0,A).join("/");c.current.open(P)}setTimeout(()=>{var A;(A=c.current)==null||A.scrollTo(r)},50)},[r]);const F=g.useCallback(({node:j,style:A,dragHandle:P})=>{const M=j.data,$=r===M.relativePath,R=x.some(H=>H.id===M.id),q=_===M.relativePath;return p.jsx(aK,{node:M,style:A,dragHandle:P,tree:{isOpen:()=>j.isOpen,toggle:()=>j.toggle()},isSelected:$,isMultiSelected:R&&!$,isIndexing:q,activeTab:e,onSelect:N,onContextMenu:Q})},[r,x,e,N,Q,_]);return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsx("div",{className:"p-2 border-b",children:p.jsxs("div",{className:"relative",children:[p.jsx(fZ,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),p.jsx(fn,{placeholder:"Filter files...",value:O,onChange:j=>I(j.target.value),className:"pl-8 h-9"})]})}),p.jsx("div",{ref:u,className:"flex-1 overflow-hidden",children:n?p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(Un,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):E.length===0?p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:i?"No matching files":"No files found"}):p.jsx(iK,{ref:c,data:E,openByDefault:!1,width:"100%",height:d,indent:16,rowHeight:28,overscanCount:5,disableDrag:!0,disableDrop:!0,disableMultiSelection:!1,className:"h-full",children:F})}),S&&v&&p.jsxs("div",{className:"fixed z-50 min-w-[180px] rounded-md border bg-popover p-1 shadow-md",style:{left:S.x,top:S.y},onClick:j=>j.stopPropagation(),children:[v.type==="file"&&p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:()=>{o(v.relativePath),k(null)},children:"Preview"}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:X,children:"Open in Editor"}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:W,children:"Copy Path"}),p.jsx("div",{className:"-mx-1 my-1 h-px bg-border"})]}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:L,children:x.length>1?`Reindex ${x.length} items`:"Reindex"}),(v.type==="file"||x.some(j=>j.type==="file"))&&p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none text-destructive hover:bg-accent",onClick:z,children:"Remove from Index"})]})]})}function uK(t){const e=fK(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(hK);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function fK(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=mK(i),a=pK(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var dK=Symbol("radix.slottable");function hK(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dK}function pK(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function mK(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Cx=["Enter"," "],gK=["ArrowDown","PageUp","Home"],RN=["ArrowUp","PageDown","End"],OK=[...gK,...RN],yK={ltr:[...Cx,"ArrowRight"],rtl:[...Cx,"ArrowLeft"]},vK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},dg="Menu",[Yu,xK,bK]=_w(dg),[ca,_N]=Cn(dg,[bK,ro,ec]),Fw=ro(),$N=ec(),[hxe,ua]=ca(dg),[pxe,Vf]=ca(dg),wK="MenuAnchor",Xw=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Fw(n);return p.jsx(jf,{...i,...r,ref:e})});Xw.displayName=wK;var Zw="MenuPortal",[SK,QN]=ca(Zw,{forceMount:void 0}),AN=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=ua(Zw,e);return p.jsx(SK,{scope:e,forceMount:n,children:p.jsx(_t,{present:n||s.open,children:p.jsx(Mf,{asChild:!0,container:i,children:r})})})};AN.displayName=Zw;var hr="MenuContent",[kK,Ww]=ca(hr),IN=g.forwardRef((t,e)=>{const n=QN(hr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=ua(hr,t.__scopeMenu),o=Vf(hr,t.__scopeMenu);return p.jsx(Yu.Provider,{scope:t.__scopeMenu,children:p.jsx(_t,{present:r||s.open,children:p.jsx(Yu.Slot,{scope:t.__scopeMenu,children:o.modal?p.jsx(CK,{...i,ref:e}):p.jsx(PK,{...i,ref:e})})})})}),CK=g.forwardRef((t,e)=>{const n=ua(hr,t.__scopeMenu),r=g.useRef(null),i=Ce(e,r);return g.useEffect(()=>{const s=r.current;if(s)return Jm(s)},[]),p.jsx(qw,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ne(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),PK=g.forwardRef((t,e)=>{const n=ua(hr,t.__scopeMenu);return p.jsx(qw,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),TK=uK("MenuContent.ScrollLock"),qw=g.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:O,...m}=t,x=ua(hr,n),y=Vf(hr,n),v=Fw(n),b=$N(n),S=xK(n),[k,w]=g.useState(null),C=g.useRef(null),_=Ce(e,C,x.onContentChange),I=g.useRef(0),E=g.useRef(""),N=g.useRef(0),Q=g.useRef(null),L=g.useRef("right"),z=g.useRef(0),X=O?Lf:g.Fragment,W=O?{as:TK,allowPinchZoom:!0}:void 0,F=A=>{var Y,pe;const P=E.current+A,M=S().filter(me=>!me.disabled),$=document.activeElement,R=(Y=M.find(me=>me.ref.current===$))==null?void 0:Y.textValue,q=M.map(me=>me.textValue),H=LK(q,P,R),ie=(pe=M.find(me=>me.textValue===H))==null?void 0:pe.ref.current;(function me(ye){E.current=ye,window.clearTimeout(I.current),ye!==""&&(I.current=window.setTimeout(()=>me(""),1e3))})(P),ie&&setTimeout(()=>ie.focus())};g.useEffect(()=>()=>window.clearTimeout(I.current),[]),Gm();const j=g.useCallback(A=>{var M,$;return L.current===((M=Q.current)==null?void 0:M.side)&&BK(A,($=Q.current)==null?void 0:$.area)},[]);return p.jsx(kK,{scope:n,searchRef:E,onItemEnter:g.useCallback(A=>{j(A)&&A.preventDefault()},[j]),onItemLeave:g.useCallback(A=>{var P;j(A)||((P=C.current)==null||P.focus(),w(null))},[j]),onTriggerLeave:g.useCallback(A=>{j(A)&&A.preventDefault()},[j]),pointerGraceTimerRef:N,onPointerGraceIntentChange:g.useCallback(A=>{Q.current=A},[]),children:p.jsx(X,{...W,children:p.jsx(Df,{asChild:!0,trapped:i,onMountAutoFocus:ne(s,A=>{var P;A.preventDefault(),(P=C.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:p.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:p.jsx($w,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:w,onEntryFocus:ne(l,A=>{y.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Wm,{role:"menu","aria-orientation":"vertical","data-state":HN(x.open),"data-radix-menu-content":"",dir:y.dir,...v,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:ne(m.onKeyDown,A=>{const M=A.target.closest("[data-radix-menu-content]")===A.currentTarget,$=A.ctrlKey||A.altKey||A.metaKey,R=A.key.length===1;M&&(A.key==="Tab"&&A.preventDefault(),!$&&R&&F(A.key));const q=C.current;if(A.target!==q||!OK.includes(A.key))return;A.preventDefault();const ie=S().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);RN.includes(A.key)&&ie.reverse(),MK(ie)}),onBlur:ne(t.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(I.current),E.current="")}),onPointerMove:ne(t.onPointerMove,Uu(A=>{const P=A.target,M=z.current!==A.clientX;if(A.currentTarget.contains(P)&&M){const $=A.clientX>z.current?"right":"left";L.current=$,z.current=A.clientX}}))})})})})})})});IN.displayName=hr;var EK="MenuGroup",Yw=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{role:"group",...r,ref:e})});Yw.displayName=EK;var RK="MenuLabel",NN=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{...r,ref:e})});NN.displayName=RK;var Ip="MenuItem",CP="menu.itemSelect",hg=g.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=g.useRef(null),o=Vf(Ip,t.__scopeMenu),a=Ww(Ip,t.__scopeMenu),l=Ce(e,s),c=g.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const d=new CustomEvent(CP,{bubbles:!0,cancelable:!0});f.addEventListener(CP,h=>r==null?void 0:r(h),{once:!0}),pQ(f,d),d.defaultPrevented?c.current=!1:o.onClose()}};return p.jsx(jN,{...i,ref:l,disabled:n,onClick:ne(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),c.current=!0},onPointerUp:ne(t.onPointerUp,f=>{var d;c.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ne(t.onKeyDown,f=>{const d=a.searchRef.current!=="";n||d&&f.key===" "||Cx.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});hg.displayName=Ip;var jN=g.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=Ww(Ip,n),a=$N(n),l=g.useRef(null),c=Ce(e,l),[u,f]=g.useState(!1),[d,h]=g.useState("");return g.useEffect(()=>{const O=l.current;O&&h((O.textContent??"").trim())},[s.children]),p.jsx(Yu.ItemSlot,{scope:n,disabled:r,textValue:i??d,children:p.jsx(Qw,{asChild:!0,...a,focusable:!r,children:p.jsx(ue.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:ne(t.onPointerMove,Uu(O=>{r?o.onItemLeave(O):(o.onItemEnter(O),O.defaultPrevented||O.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(t.onPointerLeave,Uu(O=>o.onItemLeave(O))),onFocus:ne(t.onFocus,()=>f(!0)),onBlur:ne(t.onBlur,()=>f(!1))})})})}),_K="MenuCheckboxItem",MN=g.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return p.jsx(VN,{scope:t.__scopeMenu,checked:n,children:p.jsx(hg,{role:"menuitemcheckbox","aria-checked":Np(n)?"mixed":n,...i,ref:e,"data-state":Hw(n),onSelect:ne(i.onSelect,()=>r==null?void 0:r(Np(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MN.displayName=_K;var DN="MenuRadioGroup",[$K,QK]=ca(DN,{value:void 0,onValueChange:()=>{}}),LN=g.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=Zt(r);return p.jsx($K,{scope:t.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Yw,{...i,ref:e})})});LN.displayName=DN;var zN="MenuRadioItem",BN=g.forwardRef((t,e)=>{const{value:n,...r}=t,i=QK(zN,t.__scopeMenu),s=n===i.value;return p.jsx(VN,{scope:t.__scopeMenu,checked:s,children:p.jsx(hg,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":Hw(s),onSelect:ne(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});BN.displayName=zN;var Uw="MenuItemIndicator",[VN,AK]=ca(Uw,{checked:!1}),FN=g.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=AK(Uw,n);return p.jsx(_t,{present:r||Np(s.checked)||s.checked===!0,children:p.jsx(ue.span,{...i,ref:e,"data-state":Hw(s.checked)})})});FN.displayName=Uw;var IK="MenuSeparator",XN=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});XN.displayName=IK;var NK="MenuArrow",ZN=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Fw(n);return p.jsx(qm,{...i,...r,ref:e})});ZN.displayName=NK;var jK="MenuSub",[mxe,WN]=ca(jK),Xc="MenuSubTrigger",qN=g.forwardRef((t,e)=>{const n=ua(Xc,t.__scopeMenu),r=Vf(Xc,t.__scopeMenu),i=WN(Xc,t.__scopeMenu),s=Ww(Xc,t.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},u=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>u,[u]),g.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),p.jsx(Xw,{asChild:!0,...c,children:p.jsx(jN,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":HN(n.open),...t,ref:kn(e,i.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ne(t.onPointerMove,Uu(f=>{s.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:ne(t.onPointerLeave,Uu(f=>{var h,O;u();const d=(h=n.content)==null?void 0:h.getBoundingClientRect();if(d){const m=(O=n.content)==null?void 0:O.dataset.side,x=m==="right",y=x?-5:5,v=d[x?"left":"right"],b=d[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:v,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x:v,y:d.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ne(t.onKeyDown,f=>{var h;const d=s.searchRef.current!=="";t.disabled||d&&f.key===" "||yK[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});qN.displayName=Xc;var YN="MenuSubContent",UN=g.forwardRef((t,e)=>{const n=QN(hr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=ua(hr,t.__scopeMenu),o=Vf(hr,t.__scopeMenu),a=WN(YN,t.__scopeMenu),l=g.useRef(null),c=Ce(e,l);return p.jsx(Yu.Provider,{scope:t.__scopeMenu,children:p.jsx(_t,{present:r||s.open,children:p.jsx(Yu.Slot,{scope:t.__scopeMenu,children:p.jsx(qw,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ne(t.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ne(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ne(t.onKeyDown,u=>{var h;const f=u.currentTarget.contains(u.target),d=vK[o.dir].includes(u.key);f&&d&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),u.preventDefault())})})})})})});UN.displayName=YN;function HN(t){return t?"open":"closed"}function Np(t){return t==="indeterminate"}function Hw(t){return Np(t)?"indeterminate":t?"checked":"unchecked"}function MK(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function DK(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function LK(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=DK(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function zK(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,f=l.x,d=l.y;u>r!=d>r&&n<(f-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function BK(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return zK(n,e)}function Uu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var VK=Xw,FK=AN,XK=IN,ZK=Yw,WK=NN,qK=hg,YK=MN,UK=LN,HK=BN,GK=FN,KK=XN,JK=ZN,eJ=qN,tJ=UN,GN="ContextMenu",[nJ]=Cn(GN,[_N]),Pn=_N(),[gxe,KN]=nJ(GN),JN="ContextMenuTrigger",rJ=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=t,s=KN(JN,n),o=Pn(n),a=g.useRef({x:0,y:0}),l=g.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),c=g.useRef(0),u=g.useCallback(()=>window.clearTimeout(c.current),[]),f=d=>{a.current={x:d.clientX,y:d.clientY},s.onOpenChange(!0)};return g.useEffect(()=>u,[u]),g.useEffect(()=>void(r&&u()),[r,u]),p.jsxs(p.Fragment,{children:[p.jsx(VK,{...o,virtualRef:l}),p.jsx(ue.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:ne(t.onContextMenu,d=>{u(),f(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:ne(t.onPointerDown,_d(d=>{u(),c.current=window.setTimeout(()=>f(d),700)})),onPointerMove:r?t.onPointerMove:ne(t.onPointerMove,_d(u)),onPointerCancel:r?t.onPointerCancel:ne(t.onPointerCancel,_d(u)),onPointerUp:r?t.onPointerUp:ne(t.onPointerUp,_d(u))})]})});rJ.displayName=JN;var iJ="ContextMenuPortal",ej=t=>{const{__scopeContextMenu:e,...n}=t,r=Pn(e);return p.jsx(FK,{...r,...n})};ej.displayName=iJ;var tj="ContextMenuContent",nj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=KN(tj,n),s=Pn(n),o=g.useRef(!1);return p.jsx(XK,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{var l;(l=t.onCloseAutoFocus)==null||l.call(t,a),!a.defaultPrevented&&o.current&&a.preventDefault(),o.current=!1},onInteractOutside:a=>{var l;(l=t.onInteractOutside)==null||l.call(t,a),!a.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nj.displayName=tj;var sJ="ContextMenuGroup",oJ=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(ZK,{...i,...r,ref:e})});oJ.displayName=sJ;var aJ="ContextMenuLabel",rj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(WK,{...i,...r,ref:e})});rj.displayName=aJ;var lJ="ContextMenuItem",ij=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(qK,{...i,...r,ref:e})});ij.displayName=lJ;var cJ="ContextMenuCheckboxItem",sj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(YK,{...i,...r,ref:e})});sj.displayName=cJ;var uJ="ContextMenuRadioGroup",fJ=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(UK,{...i,...r,ref:e})});fJ.displayName=uJ;var dJ="ContextMenuRadioItem",oj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(HK,{...i,...r,ref:e})});oj.displayName=dJ;var hJ="ContextMenuItemIndicator",aj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(GK,{...i,...r,ref:e})});aj.displayName=hJ;var pJ="ContextMenuSeparator",lj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(KK,{...i,...r,ref:e})});lj.displayName=pJ;var mJ="ContextMenuArrow",gJ=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(JK,{...i,...r,ref:e})});gJ.displayName=mJ;var OJ="ContextMenuSubTrigger",cj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(eJ,{...i,...r,ref:e})});cj.displayName=OJ;var yJ="ContextMenuSubContent",uj=g.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(tJ,{...i,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uj.displayName=yJ;function _d(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var vJ=ej,fj=nj,dj=rj,hj=ij,pj=sj,mj=oj,gj=aj,Oj=lj,yj=cj,vj=uj;const xJ=g.forwardRef(({className:t,inset:e,children:n,...r},i)=>p.jsxs(yj,{ref:i,className:le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,p.jsx(Lm,{className:"ml-auto h-4 w-4"})]}));xJ.displayName=yj.displayName;const bJ=g.forwardRef(({className:t,...e},n)=>p.jsx(vj,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));bJ.displayName=vj.displayName;const wJ=g.forwardRef(({className:t,...e},n)=>p.jsx(vJ,{children:p.jsx(fj,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));wJ.displayName=fj.displayName;const SJ=g.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(hj,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));SJ.displayName=hj.displayName;const kJ=g.forwardRef(({className:t,children:e,checked:n,...r},i)=>p.jsxs(pj,{ref:i,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(gj,{children:p.jsx(Bu,{className:"h-4 w-4"})})}),e]}));kJ.displayName=pj.displayName;const CJ=g.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(mj,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(gj,{children:p.jsx(ou,{className:"h-2 w-2 fill-current"})})}),e]}));CJ.displayName=mj.displayName;const PJ=g.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(dj,{ref:r,className:le("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));PJ.displayName=dj.displayName;const TJ=g.forwardRef(({className:t,...e},n)=>p.jsx(Oj,{ref:n,className:le("-mx-1 my-1 h-px bg-border",t),...e}));TJ.displayName=Oj.displayName;function EJ(){const{activeTab:t,setActiveTab:e,filterQuery:n,setFilterQuery:r,fetchNoteFiles:i,fetchCodeFiles:s,isLoadingNotes:o,isLoadingCode:a,selectedFile:l,navigateToFile:c,noteFiles:u,codeFiles:f,reindexFiles:d,removeFiles:h}=Af();g.useEffect(()=>{i()},[i]);const O=x=>{d(x)},m=x=>{h(x)};return p.jsx("aside",{className:"w-72 border-r flex flex-col bg-muted/10",children:p.jsxs(Rp,{value:t,onValueChange:x=>{e(x),x==="code"&&f.length===0&&s()},className:"flex-1 flex flex-col overflow-hidden",children:[p.jsx("div",{className:"p-2 border-b flex-shrink-0",children:p.jsxs(og,{className:"w-full",children:[p.jsxs(wl,{value:"notes",className:"flex-1 gap-1",children:[p.jsx(sn,{className:"h-4 w-4"}),"Docs"]}),p.jsxs(wl,{value:"code",className:"flex-1 gap-1",children:[p.jsx(rn,{className:"h-4 w-4"}),"Code"]})]})}),p.jsx(Ja,{value:"notes",className:"flex-1 m-0 overflow-hidden flex flex-col",children:p.jsx(kP,{files:u,activeTab:"notes",isLoading:o,selectedFile:l,filterQuery:n,onFilterChange:r,onSelectFile:c,onReindex:O,onRemove:m})}),p.jsx(Ja,{value:"code",className:"flex-1 m-0 overflow-hidden flex flex-col",children:p.jsx(kP,{files:f,activeTab:"code",isLoading:a,selectedFile:l,filterQuery:n,onFilterChange:r,onSelectFile:c,onReindex:O,onRemove:m})})]})})}function RJ(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _J=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$J=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QJ={};function PP(t,e){return(QJ.jsx?$J:_J).test(t)}const AJ=/[ \t\n\f\r]/g;function IJ(t){return typeof t=="object"?t.type==="text"?TP(t.value):!1:TP(t)}function TP(t){return t.replace(AJ,"")===""}let Ff=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Ff.prototype.normal={};Ff.prototype.property={};Ff.prototype.space=void 0;function xj(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ff(n,r,e)}function Px(t){return t.toLowerCase()}class Tn{constructor(e,n){this.attribute=n,this.property=e}}Tn.prototype.attribute="";Tn.prototype.booleanish=!1;Tn.prototype.boolean=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.defined=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.number=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.property="";Tn.prototype.spaceSeparated=!1;Tn.prototype.space=void 0;let NJ=0;const ke=fa(),pt=fa(),Tx=fa(),K=fa(),Ue=fa(),el=fa(),In=fa();function fa(){return 2**++NJ}const Ex=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:pt,commaOrSpaceSeparated:In,commaSeparated:el,number:K,overloadedBoolean:Tx,spaceSeparated:Ue},Symbol.toStringTag,{value:"Module"})),JO=Object.keys(Ex);class Gw extends Tn{constructor(e,n,r,i){let s=-1;if(super(e,n),EP(this,"space",i),typeof r=="number")for(;++s<JO.length;){const o=JO[s];EP(this,JO[s],(r&Ex[o])===Ex[o])}}}Gw.prototype.defined=!0;function EP(t,e,n){n&&(t[e]=n)}function tc(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new Gw(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Px(r)]=r,n[Px(s.attribute)]=r}return new Ff(e,n,t.space)}const bj=tc({properties:{ariaActiveDescendant:null,ariaAtomic:pt,ariaAutoComplete:null,ariaBusy:pt,ariaChecked:pt,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:Ue,ariaCurrent:null,ariaDescribedBy:Ue,ariaDetails:null,ariaDisabled:pt,ariaDropEffect:Ue,ariaErrorMessage:null,ariaExpanded:pt,ariaFlowTo:Ue,ariaGrabbed:pt,ariaHasPopup:null,ariaHidden:pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ue,ariaLevel:K,ariaLive:null,ariaModal:pt,ariaMultiLine:pt,ariaMultiSelectable:pt,ariaOrientation:null,ariaOwns:Ue,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:pt,ariaReadOnly:pt,ariaRelevant:null,ariaRequired:pt,ariaRoleDescription:Ue,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:pt,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function wj(t,e){return e in t?t[e]:e}function Sj(t,e){return wj(t,e.toLowerCase())}const jJ=tc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:el,acceptCharset:Ue,accessKey:Ue,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:Ue,autoFocus:ke,autoPlay:ke,blocking:Ue,capture:null,charSet:null,checked:ke,cite:null,className:Ue,cols:K,colSpan:null,content:null,contentEditable:pt,controls:ke,controlsList:Ue,coords:K|el,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:Tx,draggable:pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:Ue,height:K,hidden:Tx,high:K,href:null,hrefLang:null,htmlFor:Ue,httpEquiv:Ue,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:Ue,itemRef:Ue,itemScope:ke,itemType:Ue,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,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:ke,optimum:K,pattern:null,ping:Ue,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:Ue,required:ke,reversed:ke,rows:K,rowSpan:K,sandbox:Ue,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:pt,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ue,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:pt,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ke,disableRemotePlayback:ke,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:Sj}),MJ=tc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:In,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:Ue,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:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,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:el,g2:el,glyphName:el,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,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:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ue,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,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:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wj}),kj=tc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Cj=tc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Sj}),Pj=tc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),DJ={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"},LJ=/[A-Z]/g,RP=/-[a-z]/g,zJ=/^data[-\w.:]+$/i;function BJ(t,e){const n=Px(e);let r=e,i=Tn;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zJ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(RP,FJ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!RP.test(s)){let o=s.replace(LJ,VJ);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Gw}return new i(r,e)}function VJ(t){return"-"+t.toLowerCase()}function FJ(t){return t.charAt(1).toUpperCase()}const XJ=xj([bj,jJ,kj,Cj,Pj],"html"),Kw=xj([bj,MJ,kj,Cj,Pj],"svg");function ZJ(t){return t.join(" ").trim()}var Jw={},_P=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,WJ=/\n/g,qJ=/^\s*/,YJ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,UJ=/^:\s*/,HJ=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,GJ=/^[;\s]*/,KJ=/^\s+|\s+$/g,JJ=`
|
|
449
|
+
`,$P="/",QP="*",bo="",eee="comment",tee="declaration";function nee(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(O){var m=O.match(WJ);m&&(n+=m.length);var x=O.lastIndexOf(JJ);r=~x?O.length-x:r+O.length}function s(){var O={line:n,column:r};return function(m){return m.position=new o(O),c(),m}}function o(O){this.start=O,this.end={line:n,column:r},this.source=e.source}o.prototype.content=t;function a(O){var m=new Error(e.source+":"+n+":"+r+": "+O);if(m.reason=O,m.filename=e.source,m.line=n,m.column=r,m.source=t,!e.silent)throw m}function l(O){var m=O.exec(t);if(m){var x=m[0];return i(x),t=t.slice(x.length),m}}function c(){l(qJ)}function u(O){var m;for(O=O||[];m=f();)m!==!1&&O.push(m);return O}function f(){var O=s();if(!($P!=t.charAt(0)||QP!=t.charAt(1))){for(var m=2;bo!=t.charAt(m)&&(QP!=t.charAt(m)||$P!=t.charAt(m+1));)++m;if(m+=2,bo===t.charAt(m-1))return a("End of comment missing");var x=t.slice(2,m-2);return r+=2,i(x),t=t.slice(m),r+=2,O({type:eee,comment:x})}}function d(){var O=s(),m=l(YJ);if(m){if(f(),!l(UJ))return a("property missing ':'");var x=l(HJ),y=O({type:tee,property:AP(m[0].replace(_P,bo)),value:x?AP(x[0].replace(_P,bo)):bo});return l(GJ),y}}function h(){var O=[];u(O);for(var m;m=d();)m!==!1&&(O.push(m),u(O));return O}return c(),h()}function AP(t){return t?t.replace(KJ,bo):bo}var ree=nee,iee=Zh&&Zh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.default=oee;const see=iee(ree);function oee(t,e){let n=null;if(!t||typeof t!="string")return n;const r=(0,see.default)(t),i=typeof e=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(n=n||{},n[o]=a)}),n}var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.camelCase=void 0;var aee=/^--[a-zA-Z0-9_-]+$/,lee=/-([a-z])/g,cee=/^[^-]+$/,uee=/^-(webkit|moz|ms|o|khtml)-/,fee=/^-(ms)-/,dee=function(t){return!t||cee.test(t)||aee.test(t)},hee=function(t,e){return e.toUpperCase()},IP=function(t,e){return"".concat(e,"-")},pee=function(t,e){return e===void 0&&(e={}),dee(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(fee,IP):t=t.replace(uee,IP),t.replace(lee,hee))};pg.camelCase=pee;var mee=Zh&&Zh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},gee=mee(Jw),Oee=pg;function Rx(t,e){var n={};return!t||typeof t!="string"||(0,gee.default)(t,function(r,i){r&&i&&(n[(0,Oee.camelCase)(r,e)]=i)}),n}Rx.default=Rx;var yee=Rx;const vee=zl(yee),Tj=Ej("end"),e1=Ej("start");function Ej(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xee(t){const e=e1(t),n=Tj(t);if(e&&n)return{start:e,end:n}}function lu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?NP(t.position):"start"in t||"end"in t?NP(t):"line"in t||"column"in t?_x(t):""}function _x(t){return jP(t&&t.line)+":"+jP(t&&t.column)}function NP(t){return _x(t&&t.start)+"-"+_x(t&&t.end)}function jP(t){return t&&typeof t=="number"?t:1}class Ht extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=lu(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ht.prototype.file="";Ht.prototype.name="";Ht.prototype.reason="";Ht.prototype.message="";Ht.prototype.stack="";Ht.prototype.column=void 0;Ht.prototype.line=void 0;Ht.prototype.ancestors=void 0;Ht.prototype.cause=void 0;Ht.prototype.fatal=void 0;Ht.prototype.place=void 0;Ht.prototype.ruleId=void 0;Ht.prototype.source=void 0;const t1={}.hasOwnProperty,bee=new Map,wee=/[A-Z]/g,See=new Set(["table","tbody","thead","tfoot","tr"]),kee=new Set(["td","th"]),Rj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Cee(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Aee(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Qee(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Kw:XJ,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=_j(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function _j(t,e,n){if(e.type==="element")return Pee(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Tee(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Ree(t,e,n);if(e.type==="mdxjsEsm")return Eee(t,e);if(e.type==="root")return _ee(t,e,n);if(e.type==="text")return $ee(t,e)}function Pee(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kw,t.schema=i),t.ancestors.push(e);const s=Qj(t,e.tagName,!1),o=Iee(t,e);let a=r1(t,e);return See.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!IJ(l):!0})),$j(t,o,s,e),n1(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function Tee(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Hu(t,e.position)}function Eee(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Hu(t,e.position)}function Ree(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Kw,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:Qj(t,e.name,!0),o=Nee(t,e),a=r1(t,e);return $j(t,o,s,e),n1(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function _ee(t,e,n){const r={};return n1(r,r1(t,e)),t.create(e,t.Fragment,r,n)}function $ee(t,e){return e.value}function $j(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function n1(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Qee(t,e,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:e;return a?c(s,o,a):c(s,o)}}function Aee(t,e){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=e1(r);return e(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Iee(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&t1.call(e.properties,i)){const s=jee(t,i,e.properties[i]);if(s){const[o,a]=s;t.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&kee.has(e.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Nee(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else Hu(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const a=r.value.data.estree.body[0];a.type,s=t.evaluater.evaluateExpression(a.expression)}else Hu(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function r1(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:bee;for(;++r<e.children.length;){const s=e.children[r];let o;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=_j(t,s,o);a!==void 0&&n.push(a)}return n}function jee(t,e,n){const r=BJ(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?RJ(n):ZJ(n)),r.property==="style"){let i=typeof n=="object"?n:Mee(t,String(n));return t.stylePropertyNameCase==="css"&&(i=Dee(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?DJ[r.property]||r.property:r.attribute,n]}}function Mee(t,e){try{return vee(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new Ht("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Rj+"#cannot-parse-style-attribute",i}}function Qj(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const a=PP(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=PP(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return t1.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);Hu(t)}function Hu(t,e){const n=new Ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Rj+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dee(t){const e={};let n;for(n in t)t1.call(t,n)&&(e[Lee(n)]=t[n]);return e}function Lee(t){let e=t.replace(wee,zee);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function zee(t){return"-"+t.toLowerCase()}const ey={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"]},Bee={};function i1(t,e){const n=Bee,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Aj(t,r,i)}function Aj(t,e,n){if(Vee(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return MP(t.children,e,n)}return Array.isArray(t)?MP(t,e,n):""}function MP(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=Aj(t[i],e,n);return r.join("")}function Vee(t){return!!(t&&typeof t=="object")}const DP=document.createElement("i");function s1(t){const e="&"+t+";";DP.innerHTML=e;const n=DP.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function qn(t,e,n,r){const i=t.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function or(t,e){return t.length>0?(qn(t,t.length,0,e),t):e}const LP={}.hasOwnProperty;function Ij(t){const e={};let n=-1;for(;++n<t.length;)Fee(e,t[n]);return e}function Fee(t,e){let n;for(n in e){const i=(LP.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let o;if(s)for(o in s){LP.call(i,o)||(i[o]=[]);const a=s[o];Xee(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Xee(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);qn(t,0,0,r)}function Nj(t,e){const n=Number.parseInt(t,e);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 zr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const en=io(/[A-Za-z]/),Wt=io(/[\dA-Za-z]/),Zee=io(/[#-'*+\--9=?A-Z^-~]/);function jp(t){return t!==null&&(t<32||t===127)}const $x=io(/\d/),Wee=io(/[\dA-Fa-f]/),qee=io(/[!-/:-@[-`{-~]/);function ge(t){return t!==null&&t<-2}function Ye(t){return t!==null&&(t<0||t===32)}function Ae(t){return t===-2||t===-1||t===32}const mg=io(new RegExp("\\p{P}|\\p{S}","u")),qo=io(/\s/);function io(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function nc(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let o="";if(s===37&&Wt(t.charCodeAt(n+1))&&Wt(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=t.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Me(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Ae(l)?(t.enter(n),a(l)):e(l)}function a(l){return Ae(l)&&s++<i?(t.consume(l),a):(t.exit(n),e(l))}}const Yee={tokenize:Uee};function Uee(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Me(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),s(a)}function s(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return ge(a)?(t.consume(a),t.exit("chunkText"),s):(t.consume(a),o)}}const Hee={tokenize:Gee},zP={tokenize:Kee};function Gee(t){const e=this,n=[];let r=0,i,s,o;return a;function a(b){if(r<n.length){const S=n[r];return e.containerState=S[1],t.attempt(S[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&v();const S=e.events.length;let k=S,w;for(;k--;)if(e.events[k][0]==="exit"&&e.events[k][1].type==="chunkFlow"){w=e.events[k][1].end;break}y(r);let C=S;for(;C<e.events.length;)e.events[C][1].end={...w},C++;return qn(e.events,k+1,0,e.events.slice(S)),e.events.length=C,c(b)}return a(b)}function c(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return O(b);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(zP,u,f)(b)}function u(b){return i&&v(),y(r),d(b)}function f(b){return e.parser.lazy[e.now().line]=r!==n.length,o=e.now().offset,O(b)}function d(b){return e.containerState={},t.attempt(zP,h,O)(b)}function h(b){return r++,n.push([e.currentConstruct,e.containerState]),d(b)}function O(b){if(b===null){i&&v(),y(0),t.consume(b);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(b)}function m(b){if(b===null){x(t.exit("chunkFlow"),!0),y(0),t.consume(b);return}return ge(b)?(t.consume(b),x(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(b),m)}function x(b,S){const k=e.sliceStream(b);if(S&&k.push(null),b.previous=s,s&&(s.next=b),s=b,i.defineSkip(b.start),i.write(k),e.parser.lazy[b.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<o&&(!i.events[w][1].end||i.events[w][1].end.offset>o))return;const C=e.events.length;let _=C,I,E;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){if(I){E=e.events[_][1].end;break}I=!0}for(y(r),w=C;w<e.events.length;)e.events[w][1].end={...E},w++;qn(e.events,_+1,0,e.events.slice(C)),e.events.length=w}}function y(b){let S=n.length;for(;S-- >b;){const k=n[S];e.containerState=k[1],k[0].exit.call(e,t)}n.length=b}function v(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function Kee(t,e,n){return Me(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pl(t){if(t===null||Ye(t)||qo(t))return 1;if(mg(t))return 2}function gg(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const Qx={name:"attention",resolveAll:Jee,tokenize:ete};function Jee(t,e){let n=-1,r,i,s,o,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},d={...t[n][1].start};BP(f,-l),BP(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:d},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},t[r][1].end={...o.start},t[n][1].start={...a.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=or(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=or(c,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),c=or(c,gg(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=or(c,[["exit",s,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=or(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,qn(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function ete(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Pl(r);let s;return o;function o(l){return s=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===s)return t.consume(l),a;const c=t.exit("attentionSequence"),u=Pl(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?f:f&&(i||!d)),c._close=!!(s===42?d:d&&(u||!f)),e(l)}}function BP(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const tte={name:"autolink",tokenize:nte};function nte(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return en(h)?(t.consume(h),o):h===64?n(h):c(h)}function o(h){return h===43||h===45||h===46||Wt(h)?(r=1,a(h)):c(h)}function a(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||Wt(h))&&r++<32?(t.consume(h),a):(r=0,c(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||jp(h)?n(h):(t.consume(h),l)}function c(h){return h===64?(t.consume(h),u):Zee(h)?(t.consume(h),c):n(h)}function u(h){return Wt(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,u):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):d(h)}function d(h){if((h===45||Wt(h))&&r++<63){const O=h===45?d:f;return t.consume(h),O}return n(h)}}const Xf={partial:!0,tokenize:rte};function rte(t,e,n){return r;function r(s){return Ae(s)?Me(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||ge(s)?e(s):n(s)}}const jj={continuation:{tokenize:ste},exit:ote,name:"blockQuote",tokenize:ite};function ite(t,e,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Ae(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function ste(t,e,n){const r=this;return i;function i(o){return Ae(o)?Me(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(jj,e,n)(o)}}function ote(t){t.exit("blockQuote")}const Mj={name:"characterEscape",tokenize:ate};function ate(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return qee(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const Dj={name:"characterReference",tokenize:lte};function lte(t,e,n){const r=this;let i=0,s,o;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),s=31,o=Wt,u(f))}function c(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=Wee,u):(t.enter("characterReferenceValue"),s=7,o=$x,u(f))}function u(f){if(f===59&&i){const d=t.exit("characterReferenceValue");return o===Wt&&!s1(r.sliceSerialize(d))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(f)&&i++<s?(t.consume(f),u):n(f)}}const VP={partial:!0,tokenize:ute},FP={concrete:!0,name:"codeFenced",tokenize:cte};function cte(t,e,n){const r=this,i={partial:!0,tokenize:k};let s=0,o=0,a;return l;function l(w){return c(w)}function c(w){const C=r.events[r.events.length-1];return s=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,a=w,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(w)}function u(w){return w===a?(o++,t.consume(w),u):o<3?n(w):(t.exit("codeFencedFenceSequence"),Ae(w)?Me(t,f,"whitespace")(w):f(w))}function f(w){return w===null||ge(w)?(t.exit("codeFencedFence"),r.interrupt?e(w):t.check(VP,m,S)(w)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===null||ge(w)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(w)):Ae(w)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Me(t,h,"whitespace")(w)):w===96&&w===a?n(w):(t.consume(w),d)}function h(w){return w===null||ge(w)?f(w):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),O(w))}function O(w){return w===null||ge(w)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(w)):w===96&&w===a?n(w):(t.consume(w),O)}function m(w){return t.attempt(i,S,x)(w)}function x(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),y}function y(w){return s>0&&Ae(w)?Me(t,v,"linePrefix",s+1)(w):v(w)}function v(w){return w===null||ge(w)?t.check(VP,m,S)(w):(t.enter("codeFlowValue"),b(w))}function b(w){return w===null||ge(w)?(t.exit("codeFlowValue"),v(w)):(t.consume(w),b)}function S(w){return t.exit("codeFenced"),e(w)}function k(w,C,_){let I=0;return E;function E(X){return w.enter("lineEnding"),w.consume(X),w.exit("lineEnding"),N}function N(X){return w.enter("codeFencedFence"),Ae(X)?Me(w,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):Q(X)}function Q(X){return X===a?(w.enter("codeFencedFenceSequence"),L(X)):_(X)}function L(X){return X===a?(I++,w.consume(X),L):I>=o?(w.exit("codeFencedFenceSequence"),Ae(X)?Me(w,z,"whitespace")(X):z(X)):_(X)}function z(X){return X===null||ge(X)?(w.exit("codeFencedFence"),C(X)):_(X)}}}function ute(t,e,n){const r=this;return i;function i(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const ty={name:"codeIndented",tokenize:dte},fte={partial:!0,tokenize:hte};function dte(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),Me(t,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):ge(c)?t.attempt(fte,o,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||ge(c)?(t.exit("codeFlowValue"),o(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function hte(t,e,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ge(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):Me(t,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):ge(o)?i(o):n(o)}}const pte={name:"codeText",previous:gte,resolve:mte,tokenize:Ote};function mte(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function gte(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ote(t,e,n){let r=0,i,s;return o;function o(f){return t.enter("codeText"),t.enter("codeTextSequence"),a(f)}function a(f){return f===96?(t.consume(f),r++,a):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(s=t.enter("codeTextSequence"),i=0,u(f)):ge(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ge(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),c)}function u(f){return f===96?(t.consume(f),i++,u):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",c(f))}}class yte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new 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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ec(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ec(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ec(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){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Ec(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ec(this.left,n.reverse())}}}function Ec(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function Lj(t){const e={};let n=-1,r,i,s,o,a,l,c;const u=new yte(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,vte(u,n)),n=e[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return qn(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function vte(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,f,d=-1,h=n,O=0,m=0;const x=[m];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(m=d+1,x.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):x.pop(),d=x.length;d--;){const y=a.slice(x[d],x[d+1]),v=s.pop();l.push([v,v+y.length-1]),t.splice(v,2,y)}for(l.reverse(),d=-1;++d<l.length;)c[O+l[d][0]]=O+l[d][1],O+=l[d][1]-l[d][0]-1;return c}const xte={resolve:wte,tokenize:Ste},bte={partial:!0,tokenize:kte};function wte(t){return Lj(t),t}function Ste(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):ge(a)?t.check(bte,o,s)(a):(t.consume(a),i)}function s(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function o(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function kte(t,e,n){const r=this;return i;function i(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),Me(t,s,"linePrefix")}function s(o){if(o===null||ge(o))return n(o);const 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?e(o):t.interrupt(r.parser.constructs.flow,n,e)(o)}}function zj(t,e,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(y),t.exit(s),d):y===null||y===32||y===41||jp(y)?n(y):(t.enter(r),t.enter(o),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(y))}function d(y){return y===62?(t.enter(s),t.consume(y),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(t.exit("chunkString"),t.exit(a),d(y)):y===null||y===60||ge(y)?n(y):(t.consume(y),y===92?O:h)}function O(y){return y===60||y===62||y===92?(t.consume(y),h):h(y)}function m(y){return!u&&(y===null||y===41||Ye(y))?(t.exit("chunkString"),t.exit(a),t.exit(o),t.exit(r),e(y)):u<c&&y===40?(t.consume(y),u++,m):y===41?(t.consume(y),u--,m):y===null||y===32||y===40||jp(y)?n(y):(t.consume(y),y===92?x:m)}function x(y){return y===40||y===41||y===92?(t.consume(y),m):m(y)}}function Bj(t,e,n,r,i,s){const o=this;let a=0,l;return c;function c(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),u}function u(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):ge(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ge(h)||a++>999?(t.exit("chunkString"),u(h)):(t.consume(h),l||(l=!Ae(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(t.consume(h),a++,f):f(h)}}function Vj(t,e,n,r,i,s){let o;return a;function a(d){return d===34||d===39||d===40?(t.enter(r),t.enter(i),t.consume(d),t.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):(t.enter(s),c(d))}function c(d){return d===o?(t.exit(s),l(o)):d===null?n(d):ge(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Me(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===o||d===null||ge(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===o||d===92?(t.consume(d),u):u(d)}}function cu(t,e){let n;return r;function r(i){return ge(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Ae(i)?Me(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Cte={name:"definition",tokenize:Tte},Pte={partial:!0,tokenize:Ete};function Tte(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),o(h)}function o(h){return Bj.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return Ye(h)?cu(t,c)(h):c(h)}function c(h){return zj(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return t.attempt(Pte,f,f)(h)}function f(h){return Ae(h)?Me(t,d,"whitespace")(h):d(h)}function d(h){return h===null||ge(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function Ete(t,e,n){return r;function r(a){return Ye(a)?cu(t,i)(a):n(a)}function i(a){return Vj(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Ae(a)?Me(t,o,"whitespace")(a):o(a)}function o(a){return a===null||ge(a)?e(a):n(a)}}const Rte={name:"hardBreakEscape",tokenize:_te};function _te(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return ge(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const $te={name:"headingAtx",resolve:Qte,tokenize:Ate};function Qte(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},qn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function Ate(t,e,n){let r=0;return i;function i(u){return t.enter("atxHeading"),s(u)}function s(u){return t.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(t.consume(u),o):u===null||Ye(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||ge(u)?(t.exit("atxHeading"),e(u)):Ae(u)?Me(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Ye(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const Ite=["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"],XP=["pre","script","style","textarea"],Nte={concrete:!0,name:"htmlFlow",resolveTo:Dte,tokenize:Lte},jte={partial:!0,tokenize:Bte},Mte={partial:!0,tokenize:zte};function Dte(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Lte(t,e,n){const r=this;let i,s,o,a,l;return c;function c(R){return u(R)}function u(R){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(R),f}function f(R){return R===33?(t.consume(R),d):R===47?(t.consume(R),s=!0,m):R===63?(t.consume(R),i=3,r.interrupt?e:P):en(R)?(t.consume(R),o=String.fromCharCode(R),x):n(R)}function d(R){return R===45?(t.consume(R),i=2,h):R===91?(t.consume(R),i=5,a=0,O):en(R)?(t.consume(R),i=4,r.interrupt?e:P):n(R)}function h(R){return R===45?(t.consume(R),r.interrupt?e:P):n(R)}function O(R){const q="CDATA[";return R===q.charCodeAt(a++)?(t.consume(R),a===q.length?r.interrupt?e:Q:O):n(R)}function m(R){return en(R)?(t.consume(R),o=String.fromCharCode(R),x):n(R)}function x(R){if(R===null||R===47||R===62||Ye(R)){const q=R===47,H=o.toLowerCase();return!q&&!s&&XP.includes(H)?(i=1,r.interrupt?e(R):Q(R)):Ite.includes(o.toLowerCase())?(i=6,q?(t.consume(R),y):r.interrupt?e(R):Q(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):s?v(R):b(R))}return R===45||Wt(R)?(t.consume(R),o+=String.fromCharCode(R),x):n(R)}function y(R){return R===62?(t.consume(R),r.interrupt?e:Q):n(R)}function v(R){return Ae(R)?(t.consume(R),v):E(R)}function b(R){return R===47?(t.consume(R),E):R===58||R===95||en(R)?(t.consume(R),S):Ae(R)?(t.consume(R),b):E(R)}function S(R){return R===45||R===46||R===58||R===95||Wt(R)?(t.consume(R),S):k(R)}function k(R){return R===61?(t.consume(R),w):Ae(R)?(t.consume(R),k):b(R)}function w(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(t.consume(R),l=R,C):Ae(R)?(t.consume(R),w):_(R)}function C(R){return R===l?(t.consume(R),l=null,I):R===null||ge(R)?n(R):(t.consume(R),C)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ye(R)?k(R):(t.consume(R),_)}function I(R){return R===47||R===62||Ae(R)?b(R):n(R)}function E(R){return R===62?(t.consume(R),N):n(R)}function N(R){return R===null||ge(R)?Q(R):Ae(R)?(t.consume(R),N):n(R)}function Q(R){return R===45&&i===2?(t.consume(R),W):R===60&&i===1?(t.consume(R),F):R===62&&i===4?(t.consume(R),M):R===63&&i===3?(t.consume(R),P):R===93&&i===5?(t.consume(R),A):ge(R)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(jte,$,L)(R)):R===null||ge(R)?(t.exit("htmlFlowData"),L(R)):(t.consume(R),Q)}function L(R){return t.check(Mte,z,$)(R)}function z(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),X}function X(R){return R===null||ge(R)?L(R):(t.enter("htmlFlowData"),Q(R))}function W(R){return R===45?(t.consume(R),P):Q(R)}function F(R){return R===47?(t.consume(R),o="",j):Q(R)}function j(R){if(R===62){const q=o.toLowerCase();return XP.includes(q)?(t.consume(R),M):Q(R)}return en(R)&&o.length<8?(t.consume(R),o+=String.fromCharCode(R),j):Q(R)}function A(R){return R===93?(t.consume(R),P):Q(R)}function P(R){return R===62?(t.consume(R),M):R===45&&i===2?(t.consume(R),P):Q(R)}function M(R){return R===null||ge(R)?(t.exit("htmlFlowData"),$(R)):(t.consume(R),M)}function $(R){return t.exit("htmlFlow"),e(R)}}function zte(t,e,n){const r=this;return i;function i(o){return ge(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}function Bte(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Xf,e,n)}}const Vte={name:"htmlText",tokenize:Fte};function Fte(t,e,n){const r=this;let i,s,o;return a;function a(P){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(P),l}function l(P){return P===33?(t.consume(P),c):P===47?(t.consume(P),k):P===63?(t.consume(P),b):en(P)?(t.consume(P),_):n(P)}function c(P){return P===45?(t.consume(P),u):P===91?(t.consume(P),s=0,O):en(P)?(t.consume(P),v):n(P)}function u(P){return P===45?(t.consume(P),h):n(P)}function f(P){return P===null?n(P):P===45?(t.consume(P),d):ge(P)?(o=f,F(P)):(t.consume(P),f)}function d(P){return P===45?(t.consume(P),h):f(P)}function h(P){return P===62?W(P):P===45?d(P):f(P)}function O(P){const M="CDATA[";return P===M.charCodeAt(s++)?(t.consume(P),s===M.length?m:O):n(P)}function m(P){return P===null?n(P):P===93?(t.consume(P),x):ge(P)?(o=m,F(P)):(t.consume(P),m)}function x(P){return P===93?(t.consume(P),y):m(P)}function y(P){return P===62?W(P):P===93?(t.consume(P),y):m(P)}function v(P){return P===null||P===62?W(P):ge(P)?(o=v,F(P)):(t.consume(P),v)}function b(P){return P===null?n(P):P===63?(t.consume(P),S):ge(P)?(o=b,F(P)):(t.consume(P),b)}function S(P){return P===62?W(P):b(P)}function k(P){return en(P)?(t.consume(P),w):n(P)}function w(P){return P===45||Wt(P)?(t.consume(P),w):C(P)}function C(P){return ge(P)?(o=C,F(P)):Ae(P)?(t.consume(P),C):W(P)}function _(P){return P===45||Wt(P)?(t.consume(P),_):P===47||P===62||Ye(P)?I(P):n(P)}function I(P){return P===47?(t.consume(P),W):P===58||P===95||en(P)?(t.consume(P),E):ge(P)?(o=I,F(P)):Ae(P)?(t.consume(P),I):W(P)}function E(P){return P===45||P===46||P===58||P===95||Wt(P)?(t.consume(P),E):N(P)}function N(P){return P===61?(t.consume(P),Q):ge(P)?(o=N,F(P)):Ae(P)?(t.consume(P),N):I(P)}function Q(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(t.consume(P),i=P,L):ge(P)?(o=Q,F(P)):Ae(P)?(t.consume(P),Q):(t.consume(P),z)}function L(P){return P===i?(t.consume(P),i=void 0,X):P===null?n(P):ge(P)?(o=L,F(P)):(t.consume(P),L)}function z(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||Ye(P)?I(P):(t.consume(P),z)}function X(P){return P===47||P===62||Ye(P)?I(P):n(P)}function W(P){return P===62?(t.consume(P),t.exit("htmlTextData"),t.exit("htmlText"),e):n(P)}function F(P){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),j}function j(P){return Ae(P)?Me(t,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):A(P)}function A(P){return t.enter("htmlTextData"),o(P)}}const o1={name:"labelEnd",resolveAll:qte,resolveTo:Yte,tokenize:Ute},Xte={tokenize:Hte},Zte={tokenize:Gte},Wte={tokenize:Kte};function qte(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&qn(t,0,t.length,n),t}function Yte(t,e){let n=t.length,r=0,i,s,o,a;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},u={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[o-2][1].start}};return a=[["enter",l,e],["enter",c,e]],a=or(a,t.slice(s+1,s+r+3)),a=or(a,[["enter",u,e]]),a=or(a,gg(e.parser.constructs.insideSpan.null,t.slice(s+r+4,o-3),e)),a=or(a,[["exit",u,e],t[o-2],t[o-1],["exit",c,e]]),a=or(a,t.slice(o+1)),a=or(a,[["exit",l,e]]),qn(t,s,t.length,a),t}function Ute(t,e,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(d){return s?s._inactive?f(d):(o=r.parser.defined.includes(zr(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):n(d)}function l(d){return d===40?t.attempt(Xte,u,o?u:f)(d):d===91?t.attempt(Zte,u,o?c:f)(d):o?u(d):f(d)}function c(d){return t.attempt(Wte,u,f)(d)}function u(d){return e(d)}function f(d){return s._balanced=!0,n(d)}}function Hte(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Ye(f)?cu(t,s)(f):s(f)}function s(f){return f===41?u(f):zj(t,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Ye(f)?cu(t,l)(f):u(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?Vj(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return Ye(f)?cu(t,u)(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function Gte(t,e,n){const r=this;return i;function i(a){return Bj.call(r,t,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function o(a){return n(a)}}function Kte(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const Jte={name:"labelStartImage",resolveAll:o1.resolveAll,tokenize:ene};function ene(t,e,n){const r=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),s}function s(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const tne={name:"labelStartLink",resolveAll:o1.resolveAll,tokenize:nne};function nne(t,e,n){const r=this;return i;function i(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const ny={name:"lineEnding",tokenize:rne};function rne(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Me(t,e,"linePrefix")}}const Qh={name:"thematicBreak",tokenize:ine};function ine(t,e,n){let r=0,i;return s;function s(c){return t.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ge(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),Ae(c)?Me(t,a,"whitespace")(c):a(c))}}const cn={continuation:{tokenize:lne},exit:une,name:"list",tokenize:ane},sne={partial:!0,tokenize:fne},one={partial:!0,tokenize:cne};function ane(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const O=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(O==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:$x(h)){if(r.containerState.type||(r.containerState.type=O,t.enter(O,{_container:!0})),O==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(Qh,n,c)(h):c(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return $x(h)&&++o<10?(t.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),c(h)):n(h)}function c(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(Xf,r.interrupt?n:u,t.attempt(sne,d,f))}function u(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function f(h){return Ae(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function lne(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Xf,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Me(t,e,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Ae(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(one,e,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Me(t,t.attempt(cn,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function cne(t,e,n){const r=this;return Me(t,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):n(s)}}function une(t){t.exit(this.containerState.type)}function fne(t,e,n){const r=this;return Me(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Ae(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const ZP={name:"setextUnderline",resolveTo:dne,tokenize:hne};function dne(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",o,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=o,t.push(["exit",o,e]),t}function hne(t,e,n){const r=this;let i;return s;function s(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Ae(c)?Me(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ge(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const pne={tokenize:mne};function mne(t){const e=this,n=t.attempt(Xf,r,t.attempt(this.parser.constructs.flowInitial,i,Me(t,t.attempt(this.parser.constructs.flow,i,t.attempt(xte,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const gne={resolveAll:Xj()},One=Fj("string"),yne=Fj("text");function Fj(t){return{resolveAll:Xj(t==="text"?vne:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Xj(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function vne(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}const xne={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:jj},bne={91:Cte},wne={[-2]:ty,[-1]:ty,32:ty},Sne={35:$te,42:Qh,45:[ZP,Qh],60:Nte,61:ZP,95:Qh,96:FP,126:FP},kne={38:Dj,92:Mj},Cne={[-5]:ny,[-4]:ny,[-3]:ny,33:Jte,38:Dj,42:Qx,60:[tte,Vte],91:tne,92:[Rte,Mj],93:o1,95:Qx,96:pte},Pne={null:[Qx,gne]},Tne={null:[42,95]},Ene={null:[]},Rne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Tne,contentInitial:bne,disable:Ene,document:xne,flow:Sne,flowInitial:wne,insideSpan:Pne,string:kne,text:Cne},Symbol.toStringTag,{value:"Module"}));function _ne(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:C(k),check:C(w),consume:v,enter:b,exit:S,interrupt:C(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:O,parser:t,previous:null,sliceSerialize:d,sliceStream:h,write:f};let u=e.tokenize.call(c,l);return e.resolveAll&&s.push(e),c;function f(N){return o=or(o,N),x(),o[o.length-1]!==null?[]:(_(e,0),c.events=gg(s,c.events,c),c.events)}function d(N,Q){return Qne(h(N),Q)}function h(N){return $ne(o,N)}function O(){const{_bufferIndex:N,_index:Q,line:L,column:z,offset:X}=r;return{_bufferIndex:N,_index:Q,line:L,column:z,offset:X}}function m(N){i[N.line]=N.column,E()}function x(){let N;for(;r._index<o.length;){const Q=o[r._index];if(typeof Q=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<Q.length;)y(Q.charCodeAt(r._bufferIndex));else y(Q)}}function y(N){u=u(N)}function v(N){ge(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,E()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=N}function b(N,Q){const L=Q||{};return L.type=N,L.start=O(),c.events.push(["enter",L,c]),a.push(L),L}function S(N){const Q=a.pop();return Q.end=O(),c.events.push(["exit",Q,c]),Q}function k(N,Q){_(N,Q.from)}function w(N,Q){Q.restore()}function C(N,Q){return L;function L(z,X,W){let F,j,A,P;return Array.isArray(z)?$(z):"tokenize"in z?$([z]):M(z);function M(ie){return Y;function Y(pe){const me=pe!==null&&ie[pe],ye=pe!==null&&ie.null,Pe=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return $(Pe)(pe)}}function $(ie){return F=ie,j=0,ie.length===0?W:R(ie[j])}function R(ie){return Y;function Y(pe){return P=I(),A=ie,ie.partial||(c.currentConstruct=ie),ie.name&&c.parser.constructs.disable.null.includes(ie.name)?H():ie.tokenize.call(Q?Object.assign(Object.create(c),Q):c,l,q,H)(pe)}}function q(ie){return N(A,P),X}function H(ie){return P.restore(),++j<F.length?R(F[j]):W}}}function _(N,Q){N.resolveAll&&!s.includes(N)&&s.push(N),N.resolve&&qn(c.events,Q,c.events.length-Q,N.resolve(c.events.slice(Q),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function I(){const N=O(),Q=c.previous,L=c.currentConstruct,z=c.events.length,X=Array.from(a);return{from:z,restore:W};function W(){r=N,c.previous=Q,c.currentConstruct=L,c.events.length=z,a=X,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $ne(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(n===i)o=[t[n].slice(r,s)];else{if(o=t.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(t[i].slice(0,s))}return o}function Qne(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
450
|
+
`;break}case-3:{o=`\r
|
|
451
|
+
`;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function Ane(t){const r={constructs:Ij([Rne,...(t||{}).extensions||[]]),content:i(Yee),defined:[],document:i(Hee),flow:i(pne),lazy:{},string:i(One),text:i(yne)};return r;function i(s){return o;function o(a){return _ne(r,s,a)}}}function Ine(t){for(;!Lj(t););return t}const WP=/[\0\t\n\r]/g;function Nne(){let t=1,e="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,f,d,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(WP.lastIndex=f,c=WP.exec(s),d=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(d),!c){e=s.slice(f);break}if(h===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(s.slice(f,d)),t+=d-f),h){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=d+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const jne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Mne(t){return t.replace(jne,Dne)}function Dne(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Nj(n.slice(s?2:1),s?16:10)}return s1(n)||t}const Zj={}.hasOwnProperty;function Lne(t,e,n){return typeof e!="string"&&(n=e,e=void 0),zne(n)(Ine(Ane(n).document().write(Nne()(t,e,!0))))}function zne(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s($i),autolinkProtocol:I,autolinkEmail:I,atxHeading:s(Gr),blockQuote:s(ye),characterEscape:I,characterReference:I,codeFenced:s(Pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Pe,o),codeText:s(Ne,o),codeTextData:I,data:I,codeFlowValue:I,definition:s(St),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(ln),hardBreakEscape:s(Sr),hardBreakTrailing:s(Sr),htmlFlow:s(Kr,o),htmlFlowData:I,htmlText:s(Kr,o),htmlTextData:I,image:s(co),label:o,link:s($i),listItem:s(uo),listItemValue:d,listOrdered:s(hc,f),listUnordered:s(hc),paragraph:s(td),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Gr),strong:s(Qi),thematicBreak:s(Xg)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:ie,characterReference:Y,codeFenced:l(x),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:O,codeFlowValue:E,codeIndented:l(y),codeText:l(X),codeTextData:E,data:E,definition:l(),definitionDestinationString:S,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(Q),hardBreakTrailing:l(Q),htmlFlow:l(L),htmlFlowData:E,htmlText:l(z),htmlTextData:E,image:l(F),label:A,labelText:j,lineEnding:N,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:q,resourceDestinationString:P,resourceTitleString:M,resource:$,setextHeading:l(_),setextHeadingLineSequence:C,setextHeadingText:w,strong:l(),thematicBreak:l()}};Wj(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(V){let te={type:"root",children:[]};const xe={stack:[te],tokenStack:[],config:e,enter:a,exit:c,buffer:o,resume:u,data:n},Ee=[];let ze=-1;for(;++ze<V.length;)if(V[ze][1].type==="listOrdered"||V[ze][1].type==="listUnordered")if(V[ze][0]==="enter")Ee.push(ze);else{const Rn=Ee.pop();ze=i(V,Rn,ze)}for(ze=-1;++ze<V.length;){const Rn=e[V[ze][0]];Zj.call(Rn,V[ze][1].type)&&Rn[V[ze][1].type].call(Object.assign({sliceSerialize:V[ze][2].sliceSerialize},xe),V[ze][1])}if(xe.tokenStack.length>0){const Rn=xe.tokenStack[xe.tokenStack.length-1];(Rn[1]||qP).call(xe,void 0,Rn[0])}for(te.position={start:ps(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:ps(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<e.transforms.length;)te=e.transforms[ze](te)||te;return te}function i(V,te,xe){let Ee=te-1,ze=-1,Rn=!1,Jr,_n,er,os;for(;++Ee<=xe;){const ht=V[Ee];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?ze++:ze--,os=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(Jr&&!os&&!ze&&!er&&(er=Ee),os=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:os=void 0}if(!ze&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||ze===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(Jr){let as=Ee;for(_n=void 0;as--;){const kr=V[as];if(kr[1].type==="lineEnding"||kr[1].type==="lineEndingBlank"){if(kr[0]==="exit")continue;_n&&(V[_n][1].type="lineEndingBlank",Rn=!0),kr[1].type="lineEnding",_n=as}else if(!(kr[1].type==="linePrefix"||kr[1].type==="blockQuotePrefix"||kr[1].type==="blockQuotePrefixWhitespace"||kr[1].type==="blockQuoteMarker"||kr[1].type==="listItemIndent"))break}er&&(!_n||er<_n)&&(Jr._spread=!0),Jr.end=Object.assign({},_n?V[_n][1].start:ht[1].end),V.splice(_n||Ee,0,["exit",Jr,ht[2]]),Ee++,xe++}if(ht[1].type==="listItemPrefix"){const as={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};Jr=as,V.splice(Ee,0,["enter",as,ht[2]]),Ee++,xe++,er=void 0,os=!0}}}return V[te][1]._spread=Rn,xe}function s(V,te){return xe;function xe(Ee){a.call(this,V(Ee),Ee),te&&te.call(this,Ee)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(V,te,xe){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([te,xe||void 0]),V.position={start:ps(te.start),end:void 0}}function l(V){return te;function te(xe){V&&V.call(this,xe),c.call(this,xe)}}function c(V,te){const xe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==V.type&&(te?te.call(this,V,Ee[0]):(Ee[1]||qP).call(this,V,Ee[0]));else throw new Error("Cannot close `"+V.type+"` ("+lu({start:V.start,end:V.end})+"): it’s not open");xe.position.end=ps(V.end)}function u(){return i1(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(V){if(this.data.expectingFirstListItemValue){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function h(){const V=this.resume(),te=this.stack[this.stack.length-1];te.lang=V}function O(){const V=this.resume(),te=this.stack[this.stack.length-1];te.meta=V}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V.replace(/(\r?\n|\r)$/g,"")}function v(V){const te=this.resume(),xe=this.stack[this.stack.length-1];xe.label=te,xe.identifier=zr(this.sliceSerialize(V)).toLowerCase()}function b(){const V=this.resume(),te=this.stack[this.stack.length-1];te.title=V}function S(){const V=this.resume(),te=this.stack[this.stack.length-1];te.url=V}function k(V){const te=this.stack[this.stack.length-1];if(!te.depth){const xe=this.sliceSerialize(V).length;te.depth=xe}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function C(V){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function I(V){const xe=this.stack[this.stack.length-1].children;let Ee=xe[xe.length-1];(!Ee||Ee.type!=="text")&&(Ee=Fg(),Ee.position={start:ps(V.start),end:void 0},xe.push(Ee)),this.stack.push(Ee)}function E(V){const te=this.stack.pop();te.value+=this.sliceSerialize(V),te.position.end=ps(V.end)}function N(V){const te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=te.children[te.children.length-1];xe.position.end=ps(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(te.type)&&(I.call(this,V),E.call(this,V))}function Q(){this.data.atHardBreak=!0}function L(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function z(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function X(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function W(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=te,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function F(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=te,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function j(V){const te=this.sliceSerialize(V),xe=this.stack[this.stack.length-2];xe.label=Mne(te),xe.identifier=zr(te).toLowerCase()}function A(){const V=this.stack[this.stack.length-1],te=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Ee=V.children;xe.children=Ee}else xe.alt=te}function P(){const V=this.resume(),te=this.stack[this.stack.length-1];te.url=V}function M(){const V=this.resume(),te=this.stack[this.stack.length-1];te.title=V}function $(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function q(V){const te=this.resume(),xe=this.stack[this.stack.length-1];xe.label=te,xe.identifier=zr(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function H(V){this.data.characterReferenceType=V.type}function ie(V){const te=this.sliceSerialize(V),xe=this.data.characterReferenceType;let Ee;xe?(Ee=Nj(te,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=s1(te);const ze=this.stack[this.stack.length-1];ze.value+=Ee}function Y(V){const te=this.stack.pop();te.position.end=ps(V.end)}function pe(V){E.call(this,V);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(V)}function me(V){E.call(this,V);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(V)}function ye(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ne(){return{type:"inlineCode",value:""}}function St(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ln(){return{type:"emphasis",children:[]}}function Gr(){return{type:"heading",depth:0,children:[]}}function Sr(){return{type:"break"}}function Kr(){return{type:"html",value:""}}function co(){return{type:"image",title:null,url:"",alt:null}}function $i(){return{type:"link",title:null,url:"",children:[]}}function hc(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function uo(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function td(){return{type:"paragraph",children:[]}}function Qi(){return{type:"strong",children:[]}}function Fg(){return{type:"text",value:""}}function Xg(){return{type:"thematicBreak"}}}function ps(t){return{line:t.line,column:t.column,offset:t.offset}}function Wj(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?Wj(t,r):Bne(t,r)}}function Bne(t,e){let n;for(n in e)if(Zj.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function qP(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+lu({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+lu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+lu({start:e.start,end:e.end})+") is still open")}function Vne(t){const e=this;e.parser=n;function n(r){return Lne(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function Fne(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function Xne(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
452
|
+
`}]}function Zne(t,e){const n=e.value?e.value+`
|
|
453
|
+
`:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function Wne(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function qne(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Yne(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=nc(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let o,a=t.footnoteCounts.get(r);a===void 0?(a=0,t.footnoteOrder.push(r),o=t.footnoteOrder.length):o=s+1,a+=1,t.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function Une(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Hne(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function qj(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Gne(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return qj(t,e);const i={src:nc(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}function Kne(t,e){const n={src:nc(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function Jne(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function ere(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return qj(t,e);const i={href:nc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function tre(t,e){const n={href:nc(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function nre(t,e,n){const r=t.all(e),i=n?rre(n):Yj(e),s={},o=[];if(typeof e.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
454
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
455
|
+
`});const c={type:"element",tagName:"li",properties:s,children:o};return t.patch(e,c),t.applyData(e,c)}function rre(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=Yj(n[r])}return e}function Yj(t){const e=t.spread;return e??t.children.length>1}function ire(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function sre(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function ore(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function are(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function lre(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=e1(e.children[1]),l=Tj(e.children[e.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function cre(t,e,n){const r=n?n.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:e.children.length;let l=-1;const c=[];for(;++l<a;){const f=e.children[l],d={},h=o?o[l]:void 0;h&&(d.align=h);let O={type:"element",tagName:s,properties:d,children:[]};f&&(O.children=t.all(f),t.patch(f,O),O=t.applyData(f,O)),c.push(O)}const u={type:"element",tagName:"tr",properties:{},children:t.wrap(c,!0)};return t.patch(e,u),t.applyData(e,u)}function ure(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const YP=9,UP=32;function fre(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const s=[];for(;r;)s.push(HP(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return s.push(HP(e.slice(i),i>0,!1)),s.join("")}function HP(t,e,n){let r=0,i=t.length;if(e){let s=t.codePointAt(r);for(;s===YP||s===UP;)r++,s=t.codePointAt(r)}if(n){let s=t.codePointAt(i-1);for(;s===YP||s===UP;)i--,s=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function dre(t,e){const n={type:"text",value:fre(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function hre(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const pre={blockquote:Fne,break:Xne,code:Zne,delete:Wne,emphasis:qne,footnoteReference:Yne,heading:Une,html:Hne,imageReference:Gne,image:Kne,inlineCode:Jne,linkReference:ere,link:tre,listItem:nre,list:ire,paragraph:sre,root:ore,strong:are,table:lre,tableCell:ure,tableRow:cre,text:dre,thematicBreak:hre,toml:$d,yaml:$d,definition:$d,footnoteDefinition:$d};function $d(){}const Uj=-1,Og=0,uu=1,Mp=2,a1=3,l1=4,c1=5,u1=6,Hj=7,Gj=8,GP=typeof self=="object"?self:globalThis,mre=(t,e)=>{const n=(i,s)=>(t.set(s,i),i),r=i=>{if(t.has(i))return t.get(i);const[s,o]=e[i];switch(s){case Og:case Uj:return n(o,i);case uu:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Mp:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case a1:return n(new Date(o),i);case l1:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case c1:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case u1:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case Hj:{const{name:a,message:l}=o;return n(new GP[a](l),i)}case Gj:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new GP[s](o),i)};return r},KP=t=>mre(new Map,t)(0),wa="",{toString:gre}={},{keys:Ore}=Object,Rc=t=>{const e=typeof t;if(e!=="object"||!t)return[Og,e];const n=gre.call(t).slice(8,-1);switch(n){case"Array":return[uu,wa];case"Object":return[Mp,wa];case"Date":return[a1,wa];case"RegExp":return[l1,wa];case"Map":return[c1,wa];case"Set":return[u1,wa];case"DataView":return[uu,n]}return n.includes("Array")?[uu,n]:n.includes("Error")?[Hj,n]:[Mp,n]},Qd=([t,e])=>t===Og&&(e==="function"||e==="symbol"),yre=(t,e,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=Rc(o);switch(a){case Og:{let u=o;switch(l){case"bigint":a=Gj,u=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([Uj],o)}return i([a,u],o)}case uu:{if(l){let d=o;return l==="DataView"?d=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(o)),i([l,[...d]],o)}const u=[],f=i([a,u],o);for(const d of o)u.push(s(d));return f}case Mp:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const u=[],f=i([a,u],o);for(const d of Ore(o))(t||!Qd(Rc(o[d])))&&u.push([s(d),s(o[d])]);return f}case a1:return i([a,o.toISOString()],o);case l1:{const{source:u,flags:f}=o;return i([a,{source:u,flags:f}],o)}case c1:{const u=[],f=i([a,u],o);for(const[d,h]of o)(t||!(Qd(Rc(d))||Qd(Rc(h))))&&u.push([s(d),s(h)]);return f}case u1:{const u=[],f=i([a,u],o);for(const d of o)(t||!Qd(Rc(d)))&&u.push(s(d));return f}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},JP=(t,{json:e,lossy:n}={})=>{const r=[];return yre(!(e||n),!!e,new Map,r)(t),r},Dp=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?KP(JP(t,e)):structuredClone(t):(t,e)=>KP(JP(t,e));function vre(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function xre(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function bre(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||vre,r=t.options.footnoteBackLabel||xre,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<t.footnoteOrder.length;){const c=t.footnoteById.get(t.footnoteOrder[l]);if(!c)continue;const u=t.all(c),f=String(c.identifier).toUpperCase(),d=nc(f.toLowerCase());let h=0;const O=[],m=t.footnoteCounts.get(f);for(;m!==void 0&&++h<=m;){O.length>0&&O.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,h);typeof v=="string"&&(v={type:"text",value:v}),O.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const x=u[u.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const v=x.children[x.children.length-1];v&&v.type==="text"?v.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...O)}else u.push(...O);const y={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Dp(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
456
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
|
|
457
|
+
`}]}}const yg=function(t){if(t==null)return Cre;if(typeof t=="function")return vg(t);if(typeof t=="object")return Array.isArray(t)?wre(t):Sre(t);if(typeof t=="string")return kre(t);throw new Error("Expected function, string, or object as test")};function wre(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=yg(t[n]);return vg(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function Sre(t){const e=t;return vg(n);function n(r){const i=r;let s;for(s in t)if(i[s]!==e[s])return!1;return!0}}function kre(t){return vg(e);function e(n){return n&&n.type===t}}function vg(t){return e;function e(n,r,i){return!!(Pre(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Cre(){return!0}function Pre(t){return t!==null&&typeof t=="object"&&"type"in t}const Kj=[],Tre=!0,Ax=!1,Ere="skip";function Jj(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const s=yg(i),o=r?-1:1;a(t,void 0,[])();function a(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=Kj,O,m,x;if((!e||s(l,c,u[u.length-1]||void 0))&&(h=Rre(n(l,u)),h[0]===Ax))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==Ere)for(m=(r?y.children.length:-1)+o,x=u.concat(y);m>-1&&m<y.children.length;){const v=y.children[m];if(O=a(v,m,x)(),O[0]===Ax)return O;m=typeof O[1]=="number"?O[1]:m+o}}return h}}}function Rre(t){return Array.isArray(t)?t:typeof t=="number"?[Tre,t]:t==null?Kj:[t]}function f1(t,e,n,r){let i,s,o;typeof e=="function"&&typeof n!="function"?(s=void 0,o=e,i=n):(s=e,o=n,i=r),Jj(t,s,a,i);function a(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return o(l,f,u)}}const Ix={}.hasOwnProperty,_re={};function $re(t,e){const n=e||_re,r=new Map,i=new Map,s=new Map,o={...pre,...n.handlers},a={all:c,applyData:Are,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:Qre,wrap:Nre};return f1(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:i,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),a;function l(u,f){const d=u.type,h=a.handlers[d];if(Ix.call(a.handlers,d)&&h)return h(a,u,f);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in u){const{children:m,...x}=u,y=Dp(x);return y.children=a.all(u),y}return Dp(u)}return(a.options.unknownHandler||Ire)(a,u,f)}function c(u){const f=[];if("children"in u){const d=u.children;let h=-1;for(;++h<d.length;){const O=a.one(d[h],u);if(O){if(h&&d[h-1].type==="break"&&(!Array.isArray(O)&&O.type==="text"&&(O.value=eT(O.value)),!Array.isArray(O)&&O.type==="element")){const m=O.children[0];m&&m.type==="text"&&(m.value=eT(m.value))}Array.isArray(O)?f.push(...O):f.push(O)}}}return f}}function Qre(t,e){t.position&&(e.position=xee(t))}function Are(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Dp(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Ire(t,e){const n=e.data||{},r="value"in e&&!(Ix.call(n,"hProperties")||Ix.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Nre(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
|
|
458
|
+
`});++r<t.length;)r&&n.push({type:"text",value:`
|
|
459
|
+
`}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
460
|
+
`}),n}function eT(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function tT(t,e){const n=$re(t,e),r=n.one(t,void 0),i=bre(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
461
|
+
`},i),s}function jre(t,e){return t&&"run"in t?async function(n,r){const i=tT(n,{file:r,...e});await t.run(i,r)}:function(n,r){return tT(n,{file:r,...t||e})}}function nT(t){if(t)throw t}var Ah=Object.prototype.hasOwnProperty,eM=Object.prototype.toString,rT=Object.defineProperty,iT=Object.getOwnPropertyDescriptor,sT=function(e){return typeof Array.isArray=="function"?Array.isArray(e):eM.call(e)==="[object Array]"},oT=function(e){if(!e||eM.call(e)!=="[object Object]")return!1;var n=Ah.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ah.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||Ah.call(e,i)},aT=function(e,n){rT&&n.name==="__proto__"?rT(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},lT=function(e,n){if(n==="__proto__")if(Ah.call(e,n)){if(iT)return iT(e,n).value}else return;return e[n]},Mre=function t(){var e,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=lT(a,n),i=lT(e,n),a!==i&&(u&&i&&(oT(i)||(s=sT(i)))?(s?(s=!1,o=r&&sT(r)?r:[]):o=r&&oT(r)?r:{},aT(a,{name:n,newValue:t(u,o,i)})):typeof i<"u"&&aT(a,{name:n,newValue:i}));return a};const ry=zl(Mre);function Nx(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Dre(){const t=[],e={run:n,use:r};return e;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=t[++s];let f=-1;if(l){o(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?Lre(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Lre(t,e){let n;return r;function r(...o){const a=t.length>o.length;let l;a&&o.push(i);try{l=t.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,e(o,...a))}function s(o){i(null,o)}}const li={basename:zre,dirname:Bre,extname:Vre,join:Fre,sep:"/"};function zre(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Zf(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let o=-1,a=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(t.codePointAt(i)===e.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=t.length),t.slice(n,r)}function Bre(t){if(Zf(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Vre(t){Zf(t);let e=t.length,n=-1,r=0,i=-1,s=0,o;for(;e--;){const a=t.codePointAt(e);if(a===47){if(o){r=e+1;break}continue}n<0&&(o=!0,n=e+1),a===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function Fre(...t){let e=-1,n;for(;++e<t.length;)Zf(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":Xre(n)}function Xre(t){Zf(t);const e=t.codePointAt(0)===47;let n=Zre(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Zre(t,e){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=t.length;){if(o<t.length)a=t.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,o):n=t.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Zf(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Wre={cwd:qre};function qre(){return"/"}function jx(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Yre(t){if(typeof t=="string")t=new URL(t);else if(!jx(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Ure(t)}function Ure(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const iy=["history","path","basename","stem","extname","dirname"];class tM{constructor(e){let n;e?jx(e)?n={path:e}:typeof e=="string"||Hre(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Wre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<iy.length;){const s=iy[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)iy.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?li.basename(this.path):void 0}set basename(e){oy(e,"basename"),sy(e,"basename"),this.path=li.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?li.dirname(this.path):void 0}set dirname(e){cT(this.basename,"dirname"),this.path=li.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?li.extname(this.path):void 0}set extname(e){if(sy(e,"extname"),cT(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=li.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){jx(e)&&(e=Yre(e)),oy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?li.basename(this.path,this.extname):void 0}set stem(e){oy(e,"stem"),sy(e,"stem"),this.path=li.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Ht(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function sy(t,e){if(t&&t.includes(li.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+li.sep+"`")}function oy(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function cT(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Hre(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Gre=function(t){const r=this.constructor.prototype,i=r[t],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},Kre={}.hasOwnProperty;class d1 extends Gre{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=Dre()}copy(){const e=new d1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(ry(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(cy("data",this.frozen),this.namespace[e]=n,this):Kre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cy("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Ad(e),r=this.parser||this.Parser;return ay("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),ay("process",this.parser||this.Parser),ly("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Ad(e),l=r.parse(a);r.run(l,a,function(u,f,d){if(u||!f||!d)return c(u);const h=f,O=r.stringify(h,d);tie(O)?d.value=O:d.result=O,c(u,d)});function c(u,f){u||!f?o(u):s?s(f):n(void 0,f)}}}processSync(e){let n=!1,r;return this.freeze(),ay("processSync",this.parser||this.Parser),ly("processSync",this.compiler||this.Compiler),this.process(e,i),fT("processSync","process",n),r;function i(s,o){n=!0,nT(s),r=o}}run(e,n,r){uT(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=Ad(n);i.run(e,l,c);function c(u,f,d){const h=f||e;u?a(u):o?o(h):r(void 0,h,d)}}}runSync(e,n){let r=!1,i;return this.run(e,n,s),fT("runSync","run",r),i;function s(o,a){nT(o),i=a,r=!0}}stringify(e,n){this.freeze();const r=Ad(n),i=this.compiler||this.Compiler;return ly("stringify",i),uT(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(cy("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ry(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];s(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[h,...O]=u;const m=r[d][1];Nx(m)&&Nx(h)&&(h=ry(!0,m,h)),r[d]=[c,h,...O]}}}}const Jre=new d1().freeze();function ay(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function ly(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function cy(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uT(t){if(!Nx(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function fT(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Ad(t){return eie(t)?t:new tM(t)}function eie(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function tie(t){return typeof t=="string"||nie(t)}function nie(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const rie="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dT=[],hT={allowDangerousHtml:!0},iie=/^(https?|ircs?|mailto|xmpp)$/i,sie=[{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:"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 oie(t){const e=aie(t),n=lie(t);return cie(e.runSync(e.parse(n),n),t)}function aie(t){const e=t.rehypePlugins||dT,n=t.remarkPlugins||dT,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...hT}:hT;return Jre().use(Vne).use(n).use(jre,r).use(e)}function lie(t){const e=t.children||"",n=new tM;return typeof e=="string"&&(n.value=e),n}function cie(t,e){const n=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,o=e.skipHtml,a=e.unwrapDisallowed,l=e.urlTransform||uie;for(const u of sie)Object.hasOwn(e,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+rie+u.id,void 0);return e.className&&(t={type:"element",tagName:"div",properties:{className:e.className},children:t.type==="root"?t.children:[t]}),f1(t,c),Cee(t,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function c(u,f,d){if(u.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let h;for(h in ey)if(Object.hasOwn(ey,h)&&Object.hasOwn(u.properties,h)){const O=u.properties[h],m=ey[h];(m===null||m.includes(u.tagName))&&(u.properties[h]=l(String(O||""),h,u))}}if(u.type==="element"){let h=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(u,f,d)),h&&d&&typeof f=="number")return a&&u.children?d.children.splice(f,1,...u.children):d.children.splice(f,1),f}}}function uie(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||r!==-1&&e>r||iie.test(t.slice(0,e))?t:""}function pT(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function fie(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function die(t,e,n){const i=yg((n||{}).ignore||[]),s=hie(e);let o=-1;for(;++o<s.length;)Jj(t,"text",a);function a(c,u){let f=-1,d;for(;++f<u.length;){const h=u[f],O=d?d.children:void 0;if(i(h,O?O.indexOf(h):void 0,d))return;d=h}if(d)return l(c,u)}function l(c,u){const f=u[u.length-1],d=s[o][0],h=s[o][1];let O=0;const x=f.children.indexOf(c);let y=!1,v=[];d.lastIndex=0;let b=d.exec(c.value);for(;b;){const S=b.index,k={index:b.index,input:b.input,stack:[...u,c]};let w=h(...b,k);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?d.lastIndex=S+1:(O!==S&&v.push({type:"text",value:c.value.slice(O,S)}),Array.isArray(w)?v.push(...w):w&&v.push(w),O=S+b[0].length,y=!0),!d.global)break;b=d.exec(c.value)}return y?(O<c.value.length&&v.push({type:"text",value:c.value.slice(O)}),f.children.splice(x,1,...v)):v=[c],x+v.length}}function hie(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([pie(i[0]),mie(i[1])])}return e}function pie(t){return typeof t=="string"?new RegExp(fie(t),"g"):t}function mie(t){return typeof t=="function"?t:function(){return t}}const uy="phrasing",fy=["autolink","link","image","label"];function gie(){return{transforms:[Sie],enter:{literalAutolink:yie,literalAutolinkEmail:dy,literalAutolinkHttp:dy,literalAutolinkWww:dy},exit:{literalAutolink:wie,literalAutolinkEmail:bie,literalAutolinkHttp:vie,literalAutolinkWww:xie}}}function Oie(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:fy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uy,notInConstruct:fy},{character:":",before:"[ps]",after:"\\/",inConstruct:uy,notInConstruct:fy}]}}function yie(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function dy(t){this.config.enter.autolinkProtocol.call(this,t)}function vie(t){this.config.exit.autolinkProtocol.call(this,t)}function xie(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function bie(t){this.config.exit.autolinkEmail.call(this,t)}function wie(t){this.exit(t)}function Sie(t){die(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kie],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Cie]],{ignore:["link","linkReference"]})}function kie(t,e,n,r,i){let s="";if(!nM(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!Pie(n)))return!1;const o=Tie(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function Cie(t,e,n,r){return!nM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function Pie(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Tie(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=pT(t,"(");let s=pT(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function nM(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||qo(n)||mg(n))&&(!e||n!==47)}rM.peek=jie;function Eie(){this.buffer()}function Rie(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function _ie(){this.buffer()}function $ie(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Qie(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zr(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Aie(t){this.exit(t)}function Iie(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zr(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Nie(t){this.exit(t)}function jie(){return"["}function rM(t,e,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(t),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function Mie(){return{enter:{gfmFootnoteCallString:Eie,gfmFootnoteCall:Rie,gfmFootnoteDefinitionLabelString:_ie,gfmFootnoteDefinition:$ie},exit:{gfmFootnoteCallString:Qie,gfmFootnoteCall:Aie,gfmFootnoteDefinitionLabelString:Iie,gfmFootnoteDefinition:Nie}}}function Die(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:rM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((e?`
|
|
462
|
+
`:" ")+s.indentLines(s.containerFlow(r,a.current()),e?iM:Lie))),c(),l}}function Lie(t,e,n){return e===0?t:iM(t,e,n)}function iM(t,e,n){return(n?"":" ")+t}const zie=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sM.peek=Zie;function Bie(){return{canContainEols:["delete"],enter:{strikethrough:Fie},exit:{strikethrough:Xie}}}function Vie(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zie}],handlers:{delete:sM}}}function Fie(t){this.enter({type:"delete",children:[]},t)}function Xie(t){this.exit(t)}function sM(t,e,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function Zie(){return"~"}function Wie(t){return t.length}function qie(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||Wie,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<t.length;){const m=[],x=[];let y=-1;for(t[u].length>c&&(c=t[u].length);++y<t[u].length;){const v=Yie(t[u][y]);if(n.alignDelimiters!==!1){const b=i(v);x[y]=b,(l[y]===void 0||b>l[y])&&(l[y]=b)}m.push(v)}o[u]=m,a[u]=x}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)s[f]=mT(r[f]);else{const m=mT(r);for(;++f<c;)s[f]=m}f=-1;const d=[],h=[];for(;++f<c;){const m=s[f];let x="",y="";m===99?(x=":",y=":"):m===108?x=":":m===114&&(y=":");let v=n.alignDelimiters===!1?1:Math.max(1,l[f]-x.length-y.length);const b=x+"-".repeat(v)+y;n.alignDelimiters!==!1&&(v=x.length+v+y.length,v>l[f]&&(l[f]=v),h[f]=v),d[f]=b}o.splice(1,0,d),a.splice(1,0,h),u=-1;const O=[];for(;++u<o.length;){const m=o[u],x=a[u];f=-1;const y=[];for(;++f<c;){const v=m[f]||"";let b="",S="";if(n.alignDelimiters!==!1){const k=l[f]-(x[f]||0),w=s[f];w===114?b=" ".repeat(k):w===99?k%2?(b=" ".repeat(k/2+.5),S=" ".repeat(k/2-.5)):(b=" ".repeat(k/2),S=b):S=" ".repeat(k)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(b),y.push(v),n.alignDelimiters!==!1&&y.push(S),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&y.push("|")}O.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return O.join(`
|
|
463
|
+
`)}function Yie(t){return t==null?"":String(t)}function mT(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Uie(t,e,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(t,s.current()),Hie);return i(),o}function Hie(t,e,n){return">"+(n?"":" ")+t}function Gie(t,e){return gT(t,e.inConstruct,!0)&&!gT(t,e.notInConstruct,!1)}function gT(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function OT(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
464
|
+
`&&Gie(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
465
|
+
`}function Kie(t,e){const n=String(t);let r=n.indexOf(e),i=r,s=0,o=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+e.length,r=n.indexOf(e,i);return o}function Jie(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function ese(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function tse(t,e,n,r){const i=ese(n),s=t.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Jie(t,n)){const f=n.enter("codeIndented"),d=n.indentLines(s,nse);return f(),d}const a=n.createTracker(r),l=i.repeat(Math.max(Kie(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const f=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){const f=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
|
|
466
|
+
`,encode:["`"],...a.current()})),f()}return u+=a.move(`
|
|
467
|
+
`),s&&(u+=a.move(s+`
|
|
468
|
+
`)),u+=a.move(l),c(),u}function nse(t,e,n){return(n?"":" ")+t}function h1(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function rse(t,e,n,r){const i=h1(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
|
|
469
|
+
`,...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function ise(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Gu(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Lp(t,e,n){const r=Pl(t),i=Pl(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}oM.peek=sse;function oM(t,e,n,r){const i=ise(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(t,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Lp(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Gu(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Lp(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Gu(f));const h=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+h}function sse(t,e,n){return n.options.emphasis||"*"}function ose(t,e){let n=!1;return f1(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ax}),!!((!t.depth||t.depth<3)&&i1(t)&&(e.options.setext||n))}function ase(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(r);if(ose(t,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(t,{...s.current(),before:`
|
|
470
|
+
`,after:`
|
|
471
|
+
`});return f(),u(),d+`
|
|
472
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
473
|
+
`))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
|
|
474
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=Gu(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}aM.peek=lse;function aM(t){return t.value||""}function lse(){return"<"}lM.peek=cse;function lM(t,e,n,r){const i=h1(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function cse(){return"!"}cM.peek=use;function cM(t,e,n,r){const i=t.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?l+=a.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function use(){return"!"}uM.peek=fse;function uM(t,e,n){let r=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function fse(){return"`"}function fM(t,e){const n=i1(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}dM.peek=dse;function dM(t,e,n,r){const i=h1(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(fM(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(t,{before:f,after:">",...o.current()})),f+=o.move(">"),a(),n.stack=u,f}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(t,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(t.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(t.url,{before:c,after:t.title?" ":")",...o.current()}))),l(),t.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(t.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function dse(t,e,n){return fM(t,n)?"<":"["}hM.peek=hse;function hM(t,e,n,r){const i=t.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?l+=a.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function hse(){return"["}function p1(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function pse(t){const e=p1(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function mse(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function pM(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function gse(t,e,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=t.ordered?mse(n):p1(n);const a=t.ordered?o==="."?")":".":pse(n);let l=e&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),pM(n)===o&&u){let f=-1;for(;++f<t.children.length;){const d=t.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(t,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function Ose(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function yse(t,e,n,r){const i=Ose(n);let s=n.bulletCurrent||p1(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(f,d,h){return d?(h?"":" ".repeat(o))+f:(h?s:s+" ".repeat(o-s.length))+f}}function vse(t,e,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(t,r);return s(),i(),o}const xse=yg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function bse(t,e,n,r){return(t.children.some(function(o){return xse(o)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function wse(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}mM.peek=Sse;function mM(t,e,n,r){const i=wse(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(t,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Lp(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Gu(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Lp(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Gu(f));const h=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+h}function Sse(t,e,n){return n.options.strong||"*"}function kse(t,e,n,r){return n.safe(t.value,r)}function Cse(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Pse(t,e,n){const r=(pM(n)+(n.options.ruleSpaces?" ":"")).repeat(Cse(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gM={blockquote:Uie,break:OT,code:tse,definition:rse,emphasis:oM,hardBreak:OT,heading:ase,html:aM,image:lM,imageReference:cM,inlineCode:uM,link:dM,linkReference:hM,list:gse,listItem:yse,paragraph:vse,root:bse,strong:mM,text:kse,thematicBreak:Pse};function Tse(){return{enter:{table:Ese,tableData:yT,tableHeader:yT,tableRow:_se},exit:{codeText:$se,table:Rse,tableData:hy,tableHeader:hy,tableRow:hy}}}function Ese(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function Rse(t){this.exit(t),this.data.inTable=void 0}function _se(t){this.enter({type:"tableRow",children:[]},t)}function hy(t){this.exit(t)}function yT(t){this.enter({type:"tableCell",children:[]},t)}function $se(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Qse));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Qse(t,e){return e==="|"?e:t}function Ase(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
475
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:a}};function o(h,O,m,x){return c(u(h,m,x),h.align)}function a(h,O,m,x){const y=f(h,m,x),v=c([y]);return v.slice(0,v.indexOf(`
|
|
476
|
+
`))}function l(h,O,m,x){const y=m.enter("tableCell"),v=m.enter("phrasing"),b=m.containerPhrasing(h,{...x,before:s,after:s});return v(),y(),b}function c(h,O){return qie(h,{align:O,alignDelimiters:r,padding:n,stringLength:i})}function u(h,O,m){const x=h.children;let y=-1;const v=[],b=O.enter("table");for(;++y<x.length;)v[y]=f(x[y],O,m);return b(),v}function f(h,O,m){const x=h.children;let y=-1;const v=[],b=O.enter("tableRow");for(;++y<x.length;)v[y]=l(x[y],h,O,m);return b(),v}function d(h,O,m){let x=gM.inlineCode(h,O,m);return m.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function Ise(){return{exit:{taskListCheckValueChecked:vT,taskListCheckValueUnchecked:vT,paragraph:jse}}}function Nse(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mse}}}function vT(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function jse(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function Mse(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=gM.listItem(t,e,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Dse(){return[gie(),Mie(),Bie(),Tse(),Ise()]}function Lse(t){return{extensions:[Oie(),Die(t),Vie(),Ase(t),Nse()]}}const zse={tokenize:Wse,partial:!0},OM={tokenize:qse,partial:!0},yM={tokenize:Yse,partial:!0},vM={tokenize:Use,partial:!0},Bse={tokenize:Hse,partial:!0},xM={name:"wwwAutolink",tokenize:Xse,previous:wM},bM={name:"protocolAutolink",tokenize:Zse,previous:SM},is={name:"emailAutolink",tokenize:Fse,previous:kM},Ei={};function Vse(){return{text:Ei}}let po=48;for(;po<123;)Ei[po]=is,po++,po===58?po=65:po===91&&(po=97);Ei[43]=is;Ei[45]=is;Ei[46]=is;Ei[95]=is;Ei[72]=[is,bM];Ei[104]=[is,bM];Ei[87]=[is,xM];Ei[119]=[is,xM];function Fse(t,e,n){const r=this;let i,s;return o;function o(f){return!Mx(f)||!kM.call(r,r.previous)||m1(r.events)?n(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return Mx(f)?(t.consume(f),a):f===64?(t.consume(f),l):n(f)}function l(f){return f===46?t.check(Bse,u,c)(f):f===45||f===95||Wt(f)?(s=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),i=!0,l}function u(f){return s&&i&&en(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):n(f)}}function Xse(t,e,n){const r=this;return i;function i(o){return o!==87&&o!==119||!wM.call(r,r.previous)||m1(r.events)?n(o):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(zse,t.attempt(OM,t.attempt(yM,s),n),n)(o))}function s(o){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(o)}}function Zse(t,e,n){const r=this;let i="",s=!1;return o;function o(f){return(f===72||f===104)&&SM.call(r,r.previous)&&!m1(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):n(f)}function a(f){if(en(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return n(f)}function l(f){return f===47?(t.consume(f),s?c:(s=!0,l)):n(f)}function c(f){return f===null||jp(f)||Ye(f)||qo(f)||mg(f)?n(f):t.attempt(OM,t.attempt(yM,u),n)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function Wse(t,e,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,t.consume(o),i):o===46&&r===3?(t.consume(o),s):n(o)}function s(o){return o===null?n(o):e(o)}}function qse(t,e,n){let r,i,s;return o;function o(c){return c===46||c===95?t.check(vM,l,a)(c):c===null||Ye(c)||qo(c)||c!==45&&mg(c)?l(c):(s=!0,t.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),t.consume(c),o}function l(c){return i||r||!s?n(c):e(c)}}function Yse(t,e){let n=0,r=0;return i;function i(o){return o===40?(n++,t.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(vM,e,s)(o):o===null||Ye(o)||qo(o)?e(o):(t.consume(o),i)}function s(o){return o===41&&r++,t.consume(o),i}}function Use(t,e,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),r):a===38?(t.consume(a),s):a===93?(t.consume(a),i):a===60||a===null||Ye(a)||qo(a)?e(a):n(a)}function i(a){return a===null||a===40||a===91||Ye(a)||qo(a)?e(a):r(a)}function s(a){return en(a)?o(a):n(a)}function o(a){return a===59?(t.consume(a),r):en(a)?(t.consume(a),o):n(a)}}function Hse(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Wt(s)?n(s):e(s)}}function wM(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ye(t)}function SM(t){return!en(t)}function kM(t){return!(t===47||Mx(t))}function Mx(t){return t===43||t===45||t===46||t===95||Wt(t)}function m1(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Gse={tokenize:soe,partial:!0};function Kse(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:noe,continuation:{tokenize:roe},exit:ioe}},text:{91:{name:"gfmFootnoteCall",tokenize:toe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Jse,resolveTo:eoe}}}}function Jse(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=zr(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function eoe(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...a),t}function toe(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(f){if(s>999||f===93&&!o||f===null||f===91||Ye(f))return n(f);if(f===93){t.exit("chunkString");const d=t.exit("gfmFootnoteCallString");return i.includes(zr(r.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(f)}return Ye(f)||(o=!0),s++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),s++,c):c(f)}}function noe(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(O){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(O),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(O){return O===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(O),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(O)}function u(O){if(o>999||O===93&&!a||O===null||O===91||Ye(O))return n(O);if(O===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return s=zr(r.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(O),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Ye(O)||(a=!0),o++,t.consume(O),O===92?f:u}function f(O){return O===91||O===92||O===93?(t.consume(O),o++,u):u(O)}function d(O){return O===58?(t.enter("definitionMarker"),t.consume(O),t.exit("definitionMarker"),i.includes(s)||i.push(s),Me(t,h,"gfmFootnoteDefinitionWhitespace")):n(O)}function h(O){return e(O)}}function roe(t,e,n){return t.check(Xf,e,t.attempt(Gse,e,n))}function ioe(t){t.exit("gfmFootnoteDefinition")}function soe(t,e,n){const r=this;return Me(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function ooe(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",f,a]],h=a.parser.constructs.insideSpan.null;h&&qn(d,d.length,0,gg(h,o.slice(c+1,l),a)),qn(d,d.length,0,[["exit",f,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),qn(o,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let f=0;return d;function d(O){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(O):(o.enter("strikethroughSequenceTemporary"),h(O))}function h(O){const m=Pl(c);if(O===126)return f>1?l(O):(o.consume(O),f++,h);if(f<2&&!n)return l(O);const x=o.exit("strikethroughSequenceTemporary"),y=Pl(O);return x._open=!y||y===2&&!!m,x._close=!m||m===2&&!!y,a(O)}}}class aoe{constructor(){this.map=[]}add(e,n,r){loe(this,e,n,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function loe(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function coe(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function uoe(){return{flow:{null:{name:"table",tokenize:foe,resolveAll:doe}}}}function foe(t,e,n){const r=this;let i=0,s=0,o;return a;function a(E){let N=r.events.length-1;for(;N>-1;){const z=r.events[N][1].type;if(z==="lineEnding"||z==="linePrefix")N--;else break}const Q=N>-1?r.events[N][1].type:null,L=Q==="tableHead"||Q==="tableRow"?w:l;return L===w&&r.parser.lazy[r.now().line]?n(E):L(E)}function l(E){return t.enter("tableHead"),t.enter("tableRow"),c(E)}function c(E){return E===124||(o=!0,s+=1),u(E)}function u(E){return E===null?n(E):ge(E)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),h):n(E):Ae(E)?Me(t,u,"whitespace")(E):(s+=1,o&&(o=!1,i+=1),E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),o=!0,u):(t.enter("data"),f(E)))}function f(E){return E===null||E===124||Ye(E)?(t.exit("data"),u(E)):(t.consume(E),E===92?d:f)}function d(E){return E===92||E===124?(t.consume(E),f):f(E)}function h(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(t.enter("tableDelimiterRow"),o=!1,Ae(E)?Me(t,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):O(E))}function O(E){return E===45||E===58?x(E):E===124?(o=!0,t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),m):k(E)}function m(E){return Ae(E)?Me(t,x,"whitespace")(E):x(E)}function x(E){return E===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),y):E===45?(s+=1,y(E)):E===null||ge(E)?S(E):k(E)}function y(E){return E===45?(t.enter("tableDelimiterFiller"),v(E)):k(E)}function v(E){return E===45?(t.consume(E),v):E===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(E))}function b(E){return Ae(E)?Me(t,S,"whitespace")(E):S(E)}function S(E){return E===124?O(E):E===null||ge(E)?!o||i!==s?k(E):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(E)):k(E)}function k(E){return n(E)}function w(E){return t.enter("tableRow"),C(E)}function C(E){return E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),C):E===null||ge(E)?(t.exit("tableRow"),e(E)):Ae(E)?Me(t,C,"whitespace")(E):(t.enter("data"),_(E))}function _(E){return E===null||E===124||Ye(E)?(t.exit("data"),C(E)):(t.consume(E),E===92?I:_)}function I(E){return E===92||E===124?(t.consume(E),_):_(E)}}function doe(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,f;const d=new aoe;for(;++n<t.length;){const h=t[n],O=h[1];h[0]==="enter"?O.type==="tableHead"?(a=!1,l!==0&&(xT(d,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},O.start),end:Object.assign({},O.end)},d.add(n,0,[["enter",c,e]])):O.type==="tableRow"||O.type==="tableDelimiterRow"?(r=!0,f=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},O.start),end:Object.assign({},O.end)},d.add(n,0,[["enter",u,e]])),i=O.type==="tableDelimiterRow"?2:u?3:1):i&&(O.type==="data"||O.type==="tableDelimiterMarker"||O.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],f=Id(d,e,s,i,void 0,f),s=[0,0,0,0]),o[2]=n)):O.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],f=Id(d,e,s,i,void 0,f)),s=o,o=[s[1],n,0,0])):O.type==="tableHead"?(a=!0,l=n):O.type==="tableRow"||O.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],f=Id(d,e,s,i,n,f)):o[1]!==0&&(f=Id(d,e,o,i,n,f)),i=0):i&&(O.type==="data"||O.type==="tableDelimiterMarker"||O.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&xT(d,e,l,c,u),d.consume(e.events),n=-1;++n<e.events.length;){const h=e.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=coe(e.events,n))}return t}function Id(t,e,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},Sa(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=Sa(e.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const c=Sa(e.events,n[2]),u=Sa(e.events,n[3]),f={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",f,e]]),r!==2){const d=e.events[n[2]],h=e.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const O=n[2]+1,m=n[3]-n[2]-1;t.add(O,m,[])}}t.add(n[3]+1,0,[["exit",f,e]])}return i!==void 0&&(s.end=Object.assign({},Sa(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function xT(t,e,n,r,i){const s=[],o=Sa(e.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,e])),r.end=Object.assign({},o),s.push(["exit",r,e]),t.add(n+1,0,s)}function Sa(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const hoe={name:"tasklistCheck",tokenize:moe};function poe(){return{text:{91:hoe}}}function moe(t,e,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return Ye(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return ge(l)?e(l):Ae(l)?t.check({tokenize:goe},e,n)(l):n(l)}}function goe(t,e,n){return Me(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function Ooe(t){return Ij([Vse(),Kse(),ooe(t),uoe(),poe()])}const yoe={};function voe(t){const e=this,n=t||yoe,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ooe(n)),s.push(Dse()),o.push(Lse(n))}let Dx=[],CM=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,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2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?CM:Dx).push(n=n+t[e])})();function xoe(t){if(t<768)return!1;for(let e=0,n=Dx.length;;){let r=e+n>>1;if(t<Dx[r])n=r;else if(t>=CM[r])e=r+1;else return!0;if(e==n)return!1}}function bT(t){return t>=127462&&t<=127487}const wT=8205;function boe(t,e,n=!0,r=!0){return(n?PM:woe)(t,e,r)}function PM(t,e,n){if(e==t.length)return e;e&&TM(t.charCodeAt(e))&&EM(t.charCodeAt(e-1))&&e--;let r=py(t,e);for(e+=ST(r);e<t.length;){let i=py(t,e);if(r==wT||i==wT||n&&xoe(i))e+=ST(i),r=i;else if(bT(i)){let s=0,o=e-2;for(;o>=0&&bT(py(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function woe(t,e,n){for(;e>0;){let r=PM(t,e-2,n);if(r<e)return r;e--}return 0}function py(t,e){let n=t.charCodeAt(e);if(!EM(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return TM(r)?(n-55296<<10)+(r-56320)+65536:n}function TM(t){return t>=56320&&t<57344}function EM(t){return t>=55296&&t<56320}function ST(t){return t<65536?1:2}class De{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Tl(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),di.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Tl(this,e,n);let r=[];return this.decompose(e,n,r,0),di.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new fu(this),s=new fu(e);for(let o=n,a=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new fu(this,e)}iterRange(e,n=this.length){return new RM(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new _M(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?De.empty:e.length<=32?new ut(e):di.from(ut.split(e,[]))}}class ut extends De{constructor(e,n=Soe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((n?r:a)>=e)return new koe(i,a,r,o);i=a+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new ut(kT(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=Ih(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new ut(a,o.length+s.length));else{let l=a.length>>1;r.push(new ut(a.slice(0,l)),new ut(a.slice(l)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof ut))return super.replace(e,n,r);[e,n]=Tl(this,e,n);let i=Ih(this.text,Ih(r.text,kT(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new ut(i,s):di.from(ut.split(i,[]),s)}sliceString(e,n=this.length,r=`
|
|
477
|
+
`){[e,n]=Tl(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new ut(r,i)),r=[],i=-1);return i>-1&&n.push(new ut(r,i)),n}}class di extends De{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let c=i&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?r.push(a):a.decompose(e-o,n-o,r,c)}o=l+1}}replace(e,n,r){if([e,n]=Tl(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&n<=a){let l=o.replace(e-s,n-s,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new di(u,this.length-(n-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
|
|
478
|
+
`){[e,n]=Tl(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.sliceString(e-o,n-o,r)),o=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof di))return 0;let r=0,[i,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let O of e)O.flatten(h);return new ut(h,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,c=-1,u=[];function f(h){let O;if(h.lines>s&&h instanceof di)for(let m of h.children)f(m);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof ut&&l&&(O=u[u.length-1])instanceof ut&&h.lines+O.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new ut(O.text.concat(h.text),O.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:di.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new di(a,n)}}De.empty=new ut([""],0);function Soe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ih(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function kT(t,e,n){return Ih(t,[""],e,n)}class fu{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof ut?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof ut?i.text.length:i.children.length;if(o==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
479
|
+
`,this;e--}else if(i instanceof ut){let l=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof ut?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class RM{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new fu(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class _M{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(De.prototype[Symbol.iterator]=function(){return this.iter()},fu.prototype[Symbol.iterator]=RM.prototype[Symbol.iterator]=_M.prototype[Symbol.iterator]=function(){return this});let koe=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function Tl(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Tt(t,e,n=!0,r=!0){return boe(t,e,n,r)}function Coe(t){return t>=56320&&t<57344}function Poe(t){return t>=55296&&t<56320}function pn(t,e){let n=t.charCodeAt(e);if(!Poe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Coe(r)?(n-55296<<10)+(r-56320)+65536:n}function g1(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function hi(t){return t<65536?1:2}const Lx=/\r\n?|\n/;var Nt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Nt||(Nt={}));class Si{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){zx(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Si(e)}composeDesc(e){return this.empty?e:e.empty?this:$M(this,e)}mapDesc(e,n=!1){return e.empty?this:Bx(this,e,n)}mapPos(e,n=-1,r=Nt.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=i+a;if(l<0){if(c>e)return s+(e-i);s+=a}else{if(r!=Nt.Simple&&c>=e&&(r==Nt.TrackDel&&i<e&&c>e||r==Nt.TrackBefore&&i<e||r==Nt.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?s:s+l;s+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Si(e)}static create(e){return new Si(e)}}class bt extends Si{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return zx(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return Bx(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(De.empty);r.push(o?e.slice(s,s+o):De.empty)}s+=o}return new bt(n,r)}compose(e){return this.empty?e:e.empty?this:$M(this,e,!0)}map(e,n=!1){return e.empty?this:Bx(this,e,n,!0)}iterChanges(e,n=!1){zx(this,e,n)}get desc(){return Si.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new Ku(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,l-a);Ft(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;Ft(n,u,f),f>0&&Es(r,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a<c;){if(s.done)break e;let u=Math.min(s.len,c-a);Ft(n,u,-1),Ft(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new bt(n,r),filtered:Si.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<n&&Ft(i,n-o,-1);let f=new bt(i,s);a=a?a.compose(f.map(a)):f,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof bt){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let O=h?typeof h=="string"?De.of(h.split(r||Lx)):h:De.empty,m=O.length;if(f==d&&m==0)return;f<o&&l(),f>o&&Ft(i,f-o,-1),Ft(i,d-f,m),Es(s,i,O),o=d}}return c(e),l(!a),a}static empty(e){return new bt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(De.empty);r[i]=De.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new bt(n,r)}static createSet(e,n){return new bt(e,n)}}function Ft(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Es(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(De.empty);t.push(n)}}function zx(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,f=De.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function Bx(t,e,n,r=!1){let i=[],s=r?[]:null,o=new Ku(t),a=new Ku(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Ft(i,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let c=a.len;for(Ft(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Ft(i,0,o.ins),s&&Es(s,i,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Ft(i,c,l<o.i?o.ins:0),s&&l<o.i&&Es(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?bt.createSet(i,s):Si.create(i);throw new Error("Mismatched change set lengths")}}}function $M(t,e,n=!1){let r=[],i=n?[]:null,s=new Ku(t),o=new Ku(e);for(let a=!1;;){if(s.done&&o.done)return i?bt.createSet(r,i):Si.create(r);if(s.ins==0)Ft(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)Ft(r,0,o.ins,a),i&&Es(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Ft(r,l,u,a),i&&u&&Es(i,r,o.text)}else o.ins==-1?(Ft(r,s.off?0:s.len,l,a),i&&Es(i,r,s.textBit(l))):(Ft(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Es(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),s.forward2(l),o.forward(l)}}}}class Ku{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?De.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?De.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Eo{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Eo(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Z.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Z.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,n,r){return new Eo(e,n,r)}}class Z{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Z.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Z([this.main],0)}addRange(e,n=!0){return Z.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Z.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Z(e.ranges.map(n=>Eo.fromJSON(n)),e.main)}static single(e,n=e){return new Z([Z.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return Z.normalized(e.slice(),n);r=s.to}return new Z(e,n)}static cursor(e,n=0,r,i){return Eo.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?Eo.create(n,e,48|s):Eo.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?Z.range(l,a):Z.range(a,l))}}return new Z(e,n)}}function QM(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let O1=0;class oe{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=O1++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new oe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:y1),!!e.static,e.enables)}of(e){return new Nh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Nh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Nh(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function y1(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Nh{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=O1++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Vx(f,u)){let h=r(f);if(a?!CT(h,f.values[o],i):!i(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,O=d.config.address[s];if(O!=null){let m=Bp(d,O);if(this.dependencies.every(x=>x instanceof oe?d.facet(x)===f.facet(x):x instanceof $t?d.field(x,!1)==f.field(x,!1):!0)||(a?CT(h=r(f),m,i):i(h=r(f),m)))return f.values[o]=m,0}else h=r(f);return f.values[o]=h,1}}}}function CT(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Vx(t,e){let n=!1;for(let r of e)du(t,r)&1&&(n=!0);return n}function Toe(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),s=r.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=Bp(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)du(l,c);return l.values[o]=a(l),1},update(l,c){if(!Vx(l,s))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=Vx(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&y1(n,f))return l.values[o]=d,0;let h=a(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}const Nd=oe.define({static:!0});class $t{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new $t(O1++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Nd).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Nd),o=i.facet(Nd),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Nd.of({field:this,create:e})]}get extension(){return this}}const wo={lowest:4,low:3,default:2,high:1,highest:0};function _c(t){return e=>new AM(e,t)}const ss={highest:_c(wo.highest),high:_c(wo.high),default:_c(wo.default),low:_c(wo.low),lowest:_c(wo.lowest)};class AM{constructor(e,n){this.inner=e,this.prec=n}}class xg{of(e){return new Fx(this,e)}reconfigure(e){return xg.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Fx{constructor(e,n){this.compartment=e,this.inner=n}}class zp{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let d of Eoe(e,n,o))d instanceof $t?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in s){let h=s[d],O=h[0].facet,m=u&&u[d]||[];if(h.every(x=>x.type==0))if(a[O.id]=l.length<<1|1,y1(m,h))l.push(r.facet(O));else{let x=O.combine(h.map(y=>y.value));l.push(r&&O.compare(x,r.facet(O))?r.facet(O):x)}else{for(let x of h)x.type==0?(a[x.id]=l.length<<1|1,l.push(x.value)):(a[x.id]=c.length<<1,c.push(y=>x.dynamicSlot(y)));a[O.id]=c.length<<1,c.push(x=>Toe(x,O,h))}}let f=c.map(d=>d(a));return new zp(e,o,f,a,l,s)}}function Eoe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof Fx&&n.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Fx){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof AM)s(o.inner,o.prec);else if(o instanceof $t)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Nh)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,wo.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(t,wo.default),r.reduce((o,a)=>o.concat(a))}function du(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Bp(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const IM=oe.define(),Xx=oe.define({combine:t=>t.some(e=>e),static:!0}),NM=oe.define({combine:t=>t.length?t[0]:void 0,static:!0}),jM=oe.define(),MM=oe.define(),DM=oe.define(),LM=oe.define({combine:t=>t.length?t[0]:!1});class Ri{constructor(e,n){this.type=e,this.value=n}static define(){return new Roe}}class Roe{of(e){return new Ri(this,e)}}class _oe{constructor(e){this.map=e}of(e){return new ve(this,e)}}class ve{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ve(this.type,n)}is(e){return this.type==e}static define(e={}){return new _oe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}ve.reconfigure=ve.define();ve.appendConfig=ve.define();class Ot{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&QM(r,n.newLength),s.some(a=>a.type==Ot.time)||(this.annotations=s.concat(Ot.time.of(Date.now())))}static create(e,n,r,i,s,o){return new Ot(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Ot.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Ot.time=Ri.define();Ot.userEvent=Ri.define();Ot.addToHistory=Ri.define();Ot.remote=Ri.define();function $oe(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function zM(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=bt.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:ve.mapEffects(t.effects,i).concat(ve.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Zx(t,e,n){let r=e.selection,i=tl(e.annotations);return e.userEvent&&(i=i.concat(Ot.userEvent.of(e.userEvent))),{changes:e.changes instanceof bt?e.changes:bt.of(e.changes||[],n,t.facet(NM)),selection:r&&(r instanceof Z?r:Z.single(r.anchor,r.head)),effects:tl(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function BM(t,e,n){let r=Zx(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=zM(r,Zx(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=Ot.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Aoe(n?Qoe(i):i)}function Qoe(t){let e=t.startState,n=!0;for(let i of e.facet(jM)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:$oe(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=bt.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Ot.create(e,i,t.selection&&t.selection.map(s),ve.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(MM);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof Ot?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Ot?t=s[0]:t=BM(e,tl(s),!1)}return t}function Aoe(t){let e=t.startState,n=e.facet(DM),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=zM(r,Zx(e,s,t.changes.newLength),!0))}return r==t?t:Ot.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Ioe=[];function tl(t){return t==null?Ioe:Array.isArray(t)?t:[t]}var it=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(it||(it={}));const Noe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Wx;try{Wx=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function joe(t){if(Wx)return Wx.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Noe.test(n)))return!0}return!1}function Moe(t){return e=>{if(!/\S/.test(e))return it.Space;if(joe(e))return it.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return it.Word;return it.Other}}class _e{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)du(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return du(this,r),Bp(this,r)}update(...e){return BM(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(xg.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(ve.reconfigure)?(n=null,r=a.value):a.is(ve.appendConfig)&&(n=null,r=tl(r).concat(a.value));let s;n?s=e.startState.values.slice():(n=zp.resolve(r,i,this),s=new _e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Xx)?e.newSelection:e.newSelection.asSingle();new _e(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Z.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=tl(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(u);let f=i.mapDesc(c,!0);s.push(l.range.map(f)),i=i.compose(u),o=ve.mapEffects(o,u).concat(ve.mapEffects(tl(l.effects),f))}return{changes:i,selection:Z.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof bt?e:bt.of(e,this.doc.length,this.facet(_e.lineSeparator))}toText(e){return De.of(e.split(this.facet(_e.lineSeparator)||Lx))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(du(this,n),Bp(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof $t&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return _e.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=zp.resolve(e.extensions||[],new Map),r=e.doc instanceof De?e.doc:De.of((e.doc||"").split(n.staticFacet(_e.lineSeparator)||Lx)),i=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return QM(i,r.length),n.staticFacet(Xx)||(i=i.asSingle()),new _e(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(_e.tabSize)}get lineBreak(){return this.facet(_e.lineSeparator)||`
|
|
480
|
+
`}get readOnly(){return this.facet(LM)}phrase(e,...n){for(let r of this.facet(_e.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(IM))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return Moe(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Tt(n,o,!1);if(s(n.slice(l,o))!=it.Word)break;o=l}for(;a<i;){let l=Tt(n,a);if(s(n.slice(a,l))!=it.Word)break;a=l}return o==a?null:Z.range(o+r,a+r)}}_e.allowMultipleSelections=Xx;_e.tabSize=oe.define({combine:t=>t.length?t[0]:4});_e.lineSeparator=NM;_e.readOnly=LM;_e.phrases=oe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});_e.languageData=IM;_e.changeFilter=jM;_e.transactionFilter=MM;_e.transactionExtender=DM;xg.reconfigure=ve.define();function _i(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Zs{eq(e){return this==e}range(e,n=e){return qx.create(e,n,this)}}Zs.prototype.startSide=Zs.prototype.endSide=0;Zs.prototype.point=!1;Zs.prototype.mapMode=Nt.TrackDel;function v1(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let qx=class VM{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new VM(e,n,r)}};function Yx(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class x1{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let O=n.mapPos(u,c.startSide,c.mapMode);if(O==null||(d=h=O,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-o),s.push(h-o))}return{mapped:r.length?new x1(i,s,r,a):null,pos:o}}}class $e{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new $e(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Yx)),this.isEmpty)return n.length?$e.of(n):this;let a=new FM(this,null,-1).goto(0),l=0,c=[],u=new es;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(qx.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?$e.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new $e(r,n,s||$e.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Ju.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ju.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=PT(o,a,r),c=new $c(o,l,s),u=new $c(a,l,s);r.iterGaps((f,d,h)=>TT(c,f,u,d,h,i)),r.empty&&r.length==0&&TT(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=PT(s,o),l=new $c(s,a,0).goto(r),c=new $c(o,a,0).goto(r);for(;;){if(l.to!=c.to||!Ux(l.active,c.active)||l.point&&(!c.point||!v1(l.point,c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,s=-1){let o=new $c(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<n?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,o.point,u,f,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(i.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,n=!1){let r=new es;for(let i of e instanceof qx?[e]:n?Doe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return $e.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=$e.empty;i=i.nextLayer)n=new $e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}$e.empty=new $e([],[],null,-1);function Doe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Yx(e,r)>0)return t.slice().sort(Yx);e=r}return t}$e.empty.nextLayer=$e.empty;class es{finishChunk(e){this.chunks.push(new x1(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new es)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner($e.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=$e.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function PT(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(a,a+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class FM{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Ju{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new FM(o,n,r,s));return i.length==1?i[0]:new Ju(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)my(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)my(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),my(this.heap,0)}}}function my(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class $c{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ju.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){jd(this.active,e),jd(this.activeTo,e),jd(this.activeRank,e),this.minActive=ET(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Md(this.active,n,r),Md(this.activeTo,n,i),Md(this.activeRank,n,s),e&&Md(e,n,this.cursor.from),this.minActive=ET(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&jd(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function TT(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e,c=!!s.boundChange;for(let u=!1;;){let f=t.to+l-n.to,d=f||t.endSide-n.endSide,h=d<0?t.to+l:n.to,O=Math.min(h,o);if(t.point||n.point?(t.point&&n.point&&v1(t.point,n.point)&&Ux(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,O,t.point,n.point),u=!1):(u&&s.boundChange(a),O>a&&!Ux(t.active,n.active)&&s.compareRange(a,O,t.active,n.active),c&&O<o&&(f||t.openEnd(h)!=n.openEnd(h))&&(u=!0)),h>o)break;a=h,d<=0&&t.next(),d>=0&&n.next()}}function Ux(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!v1(t[n],e[n]))return!1;return!0}function jd(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Md(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function ET(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Zr(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Tt(t,i));return r}function Hx(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Tt(t,i)}return r===!0?-1:t.length}const Gx="ͼ",RT=typeof Symbol>"u"?"__"+Gx:Symbol.for(Gx),Kx=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),_T=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ws{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let O=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(m=>o.map(x=>m.replace(/&/,x))).reduce((m,x)=>m.concat(x)),O,l);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(i(h),O,u,d)}else O!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+O+";")}(u.length||d)&&l.push((r&&!f&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
481
|
+
`)}static newName(){let e=_T[RT]||1;return _T[RT]=e+1,Gx+e.toString(36)}static mount(e,n,r){let i=e[Kx],s=r&&r.nonce;i?s&&i.setNonce(s):i=new Loe(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let $T=new Map;class Loe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=$T.get(r);if(s)return e[Kx]=s;this.sheet=new i.CSSStyleSheet,$T.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Kx]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
|
|
482
|
+
`;this.styleTag.textContent=o;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var qs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ef={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},zoe=typeof navigator<"u"&&/Mac/.test(navigator.platform),Boe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var It=0;It<10;It++)qs[48+It]=qs[96+It]=String(It);for(var It=1;It<=24;It++)qs[It+111]="F"+It;for(var It=65;It<=90;It++)qs[It]=String.fromCharCode(It+32),ef[It]=String.fromCharCode(It);for(var gy in qs)ef.hasOwnProperty(gy)||(ef[gy]=qs[gy]);function Voe(t){var e=zoe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Boe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ef:qs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Xe(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)XM(t,arguments[e]);return t}function XM(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)XM(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let Jt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Jx=typeof document<"u"?document:{documentElement:{style:{}}};const e0=/Edge\/(\d+)/.exec(Jt.userAgent),ZM=/MSIE \d/.test(Jt.userAgent),t0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jt.userAgent),bg=!!(ZM||t0||e0),QT=!bg&&/gecko\/(\d+)/i.test(Jt.userAgent),Oy=!bg&&/Chrome\/(\d+)/.exec(Jt.userAgent),Foe="webkitFontSmoothing"in Jx.documentElement.style,n0=!bg&&/Apple Computer/.test(Jt.vendor),AT=n0&&(/Mobile\/\w+/.test(Jt.userAgent)||Jt.maxTouchPoints>2);var ae={mac:AT||/Mac/.test(Jt.platform),windows:/Win/.test(Jt.platform),linux:/Linux|X11/.test(Jt.platform),ie:bg,ie_version:ZM?Jx.documentMode||6:t0?+t0[1]:e0?+e0[1]:0,gecko:QT,gecko_version:QT?+(/Firefox\/(\d+)/.exec(Jt.userAgent)||[0,0])[1]:0,chrome:!!Oy,chrome_version:Oy?+Oy[1]:0,ios:AT,android:/Android\b/.test(Jt.userAgent),webkit_version:Foe?+(/\bAppleWebKit\/(\d+)/.exec(Jt.userAgent)||[0,0])[1]:0,safari:n0,safari_version:n0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Jt.userAgent)||[0,0])[1]:0,tabSize:Jx.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function b1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const Vp=Object.create(null);function w1(t,e,n){if(t==e)return!0;t||(t=Vp),e||(e=Vp);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Xoe(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function IT(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function Zoe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Yr{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Mt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Mt||(Mt={}));class he extends Zs{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Wf(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Yo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=WM(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new Yo(e,r,i,n,e.widget||null,!0)}static line(e){return new qf(e)}static set(e,n=!1){return $e.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}he.none=$e.empty;class Wf extends he{constructor(e){let{start:n,end:r}=WM(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?b1(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Vp}eq(e){return this==e||e instanceof Wf&&this.tagName==e.tagName&&w1(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Wf.prototype.point=!1;class qf extends he{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof qf&&this.spec.class==e.spec.class&&w1(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}qf.prototype.mapMode=Nt.TrackBefore;qf.prototype.point=!0;class Yo extends he{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?Nt.TrackBefore:Nt.TrackAfter:Nt.TrackDel}get type(){return this.startSide!=this.endSide?Mt.WidgetRange:this.startSide<=0?Mt.WidgetBefore:Mt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Yo&&Woe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Yo.prototype.point=!0;function WM(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function Woe(t,e){return t==e||!!(t&&e&&t.compare(e))}function nl(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class tf extends Zs{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof tf&&this.tagName==e.tagName&&w1(this.attributes,e.attributes)}static create(e){return new tf(e.tagName,e.attributes||Vp)}static set(e,n=!1){return $e.of(e,n)}}tf.prototype.startSide=tf.prototype.endSide=-1;function nf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function r0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function hu(t,e){if(!e.anchorNode)return!1;try{return r0(t,e.anchorNode)}catch{return!1}}function pu(t){return t.nodeType==3?sf(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function mu(t,e,n,r){return n?NT(t,e,n,r,-1)||NT(t,e,n,r,1):!1}function Ys(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Fp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function NT(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ts(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Ys(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ts(t):0}else return!1}}function ts(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function rf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function qoe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function qM(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Yoe(t,e,n,r,i,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,O=1,m=1;if(h)d=qoe(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let v=u.getBoundingClientRect();({scaleX:O,scaleY:m}=qM(u,v)),d={left:v.left,right:v.left+u.clientWidth*O,top:v.top,bottom:v.top+u.clientHeight*m}}let x=0,y=0;if(i=="nearest")e.top<d.top?(y=e.top-(d.top+o),n>0&&e.bottom>d.bottom+y&&(y=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(y=e.bottom-d.bottom+o,n<0&&e.top-y<d.top&&(y=e.top-(d.top+o)));else{let v=e.bottom-e.top,b=d.bottom-d.top;y=(i=="center"&&v<=b?e.top+v/2-b/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-b+o)-d.top}if(r=="nearest"?e.left<d.left?(x=e.left-(d.left+s),n>0&&e.right>d.right+x&&(x=e.right-d.right+s)):e.right>d.right&&(x=e.right-d.right+s,n<0&&e.left<d.left+x&&(x=e.left-(d.left+s))):x=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,x||y)if(h)c.scrollBy(x,y);else{let v=0,b=0;if(y){let S=u.scrollTop;u.scrollTop+=y/m,b=(u.scrollTop-S)*m}if(x){let S=u.scrollLeft;u.scrollLeft+=x/O,v=(u.scrollLeft-S)*O}e={left:e.left-v,top:e.top-b,right:e.right-v,bottom:e.bottom-b},v&&Math.abs(v-x)<1&&(r="nearest"),b&&Math.abs(b-y)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Uoe(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class Hoe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ts(n):0),r,Math.min(e.focusOffset,r?ts(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let vo=null;ae.safari&&ae.safari_version>=26&&(vo=!1);function YM(t){if(t.setActive)return t.setActive();if(vo)return t.focus(vo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(vo==null?{get preventScroll(){return vo={preventScroll:!0},!0}}:void 0),!vo){vo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let jT;function sf(t,e,n=e){let r=jT||(jT=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function rl(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function Goe(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function Koe(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ts(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ts(n))}else{if(n==t)return!0;r=Ys(n),n=n.parentNode}}function UM(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function HM(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=ts(n)}else if(n.parentNode&&!Fp(n))r=Ys(n),n=n.parentNode;else return null}}function GM(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Fp(n))r=Ys(n)+1,n=n.parentNode;else return null}}class Mr{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Mr(e.parentNode,Ys(e),n)}static after(e,n){return new Mr(e.parentNode,Ys(e)+1,n)}}var qe=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(qe||(qe={}));const Uo=qe.LTR,S1=qe.RTL;function KM(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const Joe=KM("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),eae=KM("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),i0=Object.create(null),ri=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);i0[e]=n,i0[n]=-e}function JM(t){return t<=247?Joe[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?eae[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const tae=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class gi{get dir(){return this.level%2?S1:Uo}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function eD(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!eD(r.inner,i.inner))return!1}return!0}const We=[];function nae(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:n,l=s?256:i;for(let c=o,u=l,f=l;c<a;c++){let d=JM(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),We[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=o,u=l,f=l;c<a;c++){let d=We[c];if(d==128)c<a-1&&u==We[c+1]&&u&24?d=We[c]=u:We[c]=256;else if(d==64){let h=c+1;for(;h<a&&We[h]==64;)h++;let O=c&&u==8||h<n&&We[h]==8?f==1?1:8:256;for(let m=c;m<h;m++)We[m]=O;c=h-1}else d==8&&f==1&&(We[c]=1);u=d,d&7&&(f=d)}}}function rae(t,e,n,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:n;for(let f=c,d,h,O;f<u;f++)if(h=i0[d=t.charCodeAt(f)])if(h<0){for(let m=a-3;m>=0;m-=3)if(ri[m+1]==-h){let x=ri[m+2],y=x&2?i:x&4?x&1?s:i:0;y&&(We[f]=We[ri[m]]=y),a=m;break}}else{if(ri.length==189)break;ri[a++]=f,ri[a++]=d,ri[a++]=l}else if((O=We[f])==2||O==1){let m=O==i;l=m?0:1;for(let x=a-3;x>=0;x-=3){let y=ri[x+2];if(y&2)break;if(m)ri[x+2]|=2;else{if(y&4)break;ri[x+2]|=4}}}}}function iae(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let c=We[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(We[u]==256)u++;else break;let f=s==1,d=(u<e?We[u]:r)==1,h=f==d?f?1:2:r;for(let O=u,m=i,x=m?n[m-1].to:t;O>l;)O==x&&(O=n[--m].from,x=m?n[m-1].to:t),We[--O]=h;l=u}else s=c,l++}}}function s0(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==s.length||l<s[c].from){let m=We[l];m!=a&&(u=!1,f=m==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,O=l;e:for(;;)if(c<s.length&&O==s[c].from){if(f)break e;let m=s[c];if(!u)for(let x=m.to,y=c+1;;){if(x==n)break e;if(y<s.length&&s[y].from==x)x=s[y++].to;else{if(We[x]==a)break e;break}}if(c++,d)d.push(m);else{m.from>l&&o.push(new gi(l,m.from,h));let x=m.direction==Uo!=!(h%2);o0(t,x?r+1:r,i,m.inner,m.from,m.to,o),l=m.to}O=m.to}else{if(O==n||(u?We[O]!=a:We[O]==a))break;O++}d?s0(t,l,O,r+1,i,d,o):l<O&&o.push(new gi(l,O,h)),l=O}else for(let l=n,c=s.length;l>e;){let u=!0,f=!1;if(!c||l>s[c-1].to){let m=We[l-1];m!=a&&(u=!1,f=m==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,O=l;e:for(;;)if(c&&O==s[c-1].to){if(f)break e;let m=s[--c];if(!u)for(let x=m.from,y=c;;){if(x==e)break e;if(y&&s[y-1].to==x)x=s[--y].from;else{if(We[x-1]==a)break e;break}}if(d)d.push(m);else{m.to<l&&o.push(new gi(m.to,l,h));let x=m.direction==Uo!=!(h%2);o0(t,x?r+1:r,i,m.inner,m.from,m.to,o),l=m.from}O=m.from}else{if(O==e||(u?We[O-1]!=a:We[O-1]==a))break;O--}d?s0(t,O,l,r+1,i,d,o):O<l&&o.push(new gi(O,l,h)),l=O}}function o0(t,e,n,r,i,s,o){let a=e%2?2:1;nae(t,i,s,r,a),rae(t,i,s,r,a),iae(i,s,r,a),s0(t,i,s,e,n,r,o)}function sae(t,e,n){if(!t)return[new gi(0,0,e==S1?1:0)];if(e==Uo&&!n.length&&!tae.test(t))return tD(t.length);if(n.length)for(;t.length>We.length;)We[We.length]=256;let r=[],i=e==Uo?0:1;return o0(t,i,i,n,0,t.length,r),r}function tD(t){return[new gi(0,t,0)]}let nD="";function oae(t,e,n,r,i){var s;let o=r.head-t.from,a=gi.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,n);if(o==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,n),c=l.side(i,n)}let u=Tt(t.text,o,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),nD=t.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?Z.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):Z.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function aae(t,e,n){for(let r=e;r<n;r++){let i=JM(t.charCodeAt(r));if(i==1)return Uo;if(i==2||i==4)return S1}return Uo}const rD=oe.define(),iD=oe.define(),sD=oe.define(),oD=oe.define(),a0=oe.define(),aD=oe.define(),lD=oe.define(),k1=oe.define(),C1=oe.define(),cD=oe.define({combine:t=>t.some(e=>e)}),uD=oe.define({combine:t=>t.some(e=>e)}),fD=oe.define();class il{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new il(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new il(Z.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Dd=ve.define({map:(t,e)=>t.map(e)}),dD=ve.define();function vn(t,e,n){let r=t.facet(oD);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const zi=oe.define({combine:t=>t.length?t[0]:!0});let lae=0;const za=oe.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class dt{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(za.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(za.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new dt(lae++,e,r,i,a=>{let l=[];return o&&l.push(wg.of(c=>{let u=c.plugin(a);return u?o(u):he.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return dt.define((r,i)=>new e(r,i),n)}}class yy{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(vn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){vn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){vn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const hD=oe.define(),P1=oe.define(),wg=oe.define(),pD=oe.define(),T1=oe.define(),Yf=oe.define(),mD=oe.define();function MT(t,e){let n=t.state.facet(mD);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return $e.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,O;if(h==null&&(h=aae(e.text,c,u)),l>0&&f.length&&(O=f[f.length-1]).to==c&&O.direction==h)O.to=u,f=O.inner;else{let m={from:c,to:u,direction:h,inner:[]};f.push(m),f=m.inner}}}}),i}const gD=oe.define();function E1(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(gD)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Zc=oe.define();class lr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new lr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let a=i<e.length?e[i].fromB:1e9,l=s<n.length?n[s]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+o,f=c,d=u;for(;;)if(s<n.length&&n[s]<=f){let h=n[s+1];s+=2,f=Math.max(f,h);for(let O=i;O<e.length&&e[O].fromB<=f;O++)o=e[O].toA-e[O].toB;d=Math.max(d,h+o)}else if(i<e.length&&e[i].fromB<=f){let h=e[i++];f=Math.max(f,h.toB),d=Math.max(d,h.toA),o=h.toA-h.toB}else break;r.push(new lr(u,d,c,f))}return r}}class Xp{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=bt.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new lr(s,o,a,l))),this.changedRanges=i}static create(e,n,r){return new Xp(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const cae=[];class yt{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return cae}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&Xoe(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Ys(this.dom),i=this.length?e>0:n>0;return new Mr(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof kg)return e;return null}static get(e){return e.cmTile}}class Sg extends yt{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=a.dom&&(s.written=!0),a.dom.parentNode==n)for(;i&&i!=a.dom;)i=DT(i);else n.insertBefore(a.dom,i);r=a.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=DT(i);this.length=o}}function DT(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class kg extends Sg{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=yt.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Ds)n.push(i),r=o,i=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,s,o=-1;if(this.blockTiles((a,l)=>{let c=l+a.length;if(e>=l&&e<=c){if(a.isWidget()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(r=void 0)}(l<e||e==c&&(n<-1?a.length:a.covers(1)))&&(!r||!a.isWidget()&&r.isWidget())&&(r=a,i=e-l),(c>e||e==l&&(n>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Ds extends Sg{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new Ds(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class El extends Sg{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new El(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,s=-1,o=null,a=-1;function l(u,f){for(let d=0,h=0;d<u.children.length&&h<=f;d++){let O=u.children[d],m=h+O.length;m>=f&&(O.isComposite()?l(O,f-h):(!o||o.isHidden&&(n>0||r&&fae(o,O)))&&(m>f||O.flags&32)?(o=O,a=f-h):(h<f||O.flags&16&&!O.isHidden)&&(i=O,s=f-h)),h=m}}l(this,e);let c=(n<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:a}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):uae(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Mr(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,a=!1;for(let l of o.children){if(a)return new Mr(l.dom,0);l==r.tile&&(a=!0)}}return new Mr(this.dom,0)}}function uae(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=pu(e);return n[n.length-1]||null}function fae(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class gn extends Sg{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new gn(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Ro extends yt{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?ae.chrome||ae.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=sf(this.dom,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return ae.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?rf(l,o<0):l||null}static of(e,n){let r=new Ro(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class Ho extends yt{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return rf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return rf(o,!a)}}get overrideDOMText(){if(!this.length)return De.empty;let{root:e}=this;if(!e)return De.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new Ho(s,r,e,i)}}class Zp extends yt{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return De.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class dae{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:a}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!a.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++}else{let l=i.children[s],c=l.breakAfter;(n>0?l.length<=e:l.length<e)&&(!r||r.skip(l,0,l.length)!==!1||!l.isComposite)?(o=!!c,s++,e-=l.length):(a.push({tile:i,index:s}),i=l,s=0,r&&l.isComposite()&&r.enter(l))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++;else if(e){let l=Math.min(e,i.length-s);r&&r.skip(i,s,s+l),e-=l,s+=l}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class hae{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class pae{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,r),a=o.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=o.children[o.children.length-1]=new Ro(a.dom,a.text+e);l.parent=o}else o.append(i||Ro.of(e,(s=this.cache.find(Ro))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?vy(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let a=n.marks.length-1;a>=0;a--){let l=n.marks[a],c=i.lastChild;if(c instanceof gn&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(vy(l.dom)),i=c;else{if(this.cache.reused.get(l)){let f=yt.get(l.dom);f&&f.setDOM(vy(l.dom))}let u=gn.of(l.mark,l.dom);i.append(u),i=u}this.cache.reused.set(l,2)}let s=yt.get(e.text);s&&this.cache.reused.set(s,2);let o=new Ro(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=OD);let i=El.start(e,n||((r=this.cache.find(El))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(n>0&&(a=i.lastChild)&&a instanceof gn&&a.mark.eq(o))i=a,n--;else{let l=gn.of(o,(r=this.cache.find(gn,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(l),i=l,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!LT(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(ae.ios&<(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(xy,0,32)||new Ho(xy.toDOM(),0,xy,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new hae(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Ds&&i.wrapper.eq(r.wrapper))n=i;else{let s=Ds.of(r.wrapper,(e=this.cache.find(Ds,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(Zp,void 0,1);return r&&(r.flags=n),r||new Zp(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class mae{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let a=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,a)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const Wp=[Ho,El,Ro,gn,Zp,Ds,kg];for(let t=0;t<Wp.length;t++)Wp[t].bucket=t;class gae{constructor(e){this.view=e,this.buckets=Wp.map(()=>[]),this.index=Wp.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let a=s.length-1;a>=0;a--){let l=(a+o)%s.length,c=s[l];if((!n||n(c))&&!this.reused.has(c))return s.splice(l,1),l<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let a=i[s];if(!this.reused.has(a)&&(o==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,a.widget==e&&a.length==n&&(a.flags&497)==r?(this.reused.set(a,1),a):(this.reused.set(a,2),new Ho(a.dom,n,e,a.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class Oae{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new gae(e),this.text=new mae(e.state.doc),this.builder=new pae(this.cache,new kg(e,e.contentDOM),$e.iter(r)),this.cache.reused.set(n,2),this.old=new dae(n),this.reuseWalker={skip:(o,a,l)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,s=0,o=0;;){let a=o<e.length?e[o++]:null,l=a?a.fromA:this.old.root.length;if(l>i){let c=l-i;this.preserve(c,!o,!a),i=l,s+=c}if(!a)break;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,a.toA),this.emit(n.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(s,a.toB)),s=a.toB,i=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=xae(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,a,l)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let c=l>0||a<o.length?Ho.of(o.widget,this.view,l-a,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!a&&l==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(a,l),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof Zp)this.cache.add(o);else if(o instanceof gn)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof gn&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof gn&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=$e.spans(this.decorations,e,n,{point:(a,l,c,u,f,d)=>{if(c instanceof Yo){if(this.disallowBlockEffectsFor[d]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,f>u.length)i.continueWidget(l-a);else{let h=c.widget||(c.block?Rl.block:Rl.inline),O=yae(c),m=this.cache.findWidget(h,l-a,O)||Ho.of(h,this.view,l-a,O);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(m)):(i.ensureLine(r),i.addInlineWidget(m,u,f))}r=null}else r=vae(r,c);l>a&&this.text.skip(l-a)},span:(a,l,c,u)=>{for(let f=a;f<l;){let d=this.text.next(Math.min(512,l-f));d==null?(i.addLineStartIfNotCovered(r),i.addBreak(),f++):(i.ensureLine(r),i.addText(d,c,f==a?u:c.length),f+=d.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=yt.get(i);if(i==this.view.contentDOM)break;s instanceof gn?n.push(s):s!=null&&s.isLine()?r=s:i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new El(i,OD):n.push(gn.of(new Wf({tagName:i.nodeName.toLowerCase(),attributes:Zoe(i)}),i))}return{line:r,marks:n}}}function LT(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function yae(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const OD={class:"cm-line"};function vae(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&b1(n,t),r&&(t.class+=" "+r)),t}function xae(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof gn&&e.push(r.mark)}return e}function vy(t){let e=yt.get(t);return e&&e.setDOM(t.cloneNode()),t}class Rl extends Yr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Rl.inline=new Rl("span");Rl.block=new Rl("div");const xy=new class extends Yr{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class zT{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=he.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new kg(e,e.contentDOM),this.updateInner([new lr(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:f})=>f<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!Rae(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?wae(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new lr(u,f,e.changes.mapPos(u,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ae.ie||ae.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=Cae(o,this.decorations,e.changes);l.length&&(r=lr.extendWithRanges(r,l));let c=Tae(a,this.blockWrappers,e.changes);return c.length&&(r=lr.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,a=new Oae(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,n),l0(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ae.chrome||ae.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof by&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(dD)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(zi)||r.tabIndex>-1)&&hu(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),ae.gecko&&l.empty&&!this.hasComposition&&bae(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=u=new Mr(d,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!mu(c.node,c.offset,f.anchorNode,f.anchorOffset)||!mu(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{ae.android&&ae.chrome&&r.contains(f.focusNode)&&Eae(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let d=nf(this.view.root);if(d)if(l.empty){if(ae.gecko){let h=Sae(c.node,c.offset);if(h&&h!=3){let O=(h==1?HM:GM)(c.node,c.offset);O&&(c=new Mr(O.node,O.offset))}}d.collapse(c.node,c.offset),l.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),h.setEnd(u.node,u.offset),h.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new Mr(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new Mr(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&mu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=nf(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[n];else{let o=ts(e)==0?0:n==0?-1:1;for(;;){let a=e.parentNode;if(a==r.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!yt.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,a=i;;o++){let l=r.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let f=u+c.length;if(u<=e&&(r=c,i=e-u,s=f<e),f>=e&&!o&&(o=c,a=e-u,l=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(s&&o?r=null:l&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(a,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof by?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=i(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&o<s.length){let a=Tt(s.text,o);if(a==o)return null;let l=sf(s.dom,o,a).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(c==l.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==qe.LTR,c=0,u=(f,d,h)=>{for(let O=0;O<f.children.length&&!(d>i);O++){let m=f.children[O],x=d+m.length,y=m.dom.getBoundingClientRect(),{height:v}=y;if(h&&!O&&(c+=y.top-h.top),m instanceof Ds)x>r&&u(m,d,y);else if(d>=r&&(c>0&&n.push(-c),n.push(v+c),c=0,o)){let b=m.dom.lastChild,S=b?pu(b):[];if(S.length){let k=S[S.length-1],w=l?k.right-y.left:y.right-k.left;w>a&&(a=w,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=x)}}h&&O==f.children.length-1&&(c+=h.bottom-y.bottom),d=x+m.breakAfter}};return u(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?qe.RTL:qe.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=pu(c.dom);if(u.length!=1)return;a+=u[0].width,l=u[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=pu(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(he.replace({widget:new by(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return he.set(e)}updateDeco(){let e=1,n=this.view.state.facet(wg).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(T1).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push($e.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(pD).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(fD))try{if(c(this.view,e.range,e))return!0}catch(u){vn(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=E1(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;Yoe(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==qe.LTR)}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){l0(this.tile)}}function l0(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)l0(r,e)}}function bae(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function yD(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=HM(n.focusNode,n.focusOffset),i=GM(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=yt.get(i.node);if(!a||a.isText()&&a.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let l=yt.get(r.node);!l||l.isText()&&l.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function wae(t,e,n){let r=yD(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc;return{range:new lr(l.mapPos(s),l.mapPos(o),s,o),text:i}}function Sae(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let kae=class{constructor(){this.changes=[]}compareRange(e,n){nl(e,n,this.changes)}comparePoint(e,n){nl(e,n,this.changes)}boundChange(e){nl(e,e,this.changes)}};function Cae(t,e,n){let r=new kae;return $e.compare(t,e,n,r),r.changes}class Pae{constructor(){this.changes=[]}compareRange(e,n){nl(e,n,this.changes)}comparePoint(){}boundChange(e){nl(e,e,this.changes)}}function Tae(t,e,n){let r=new Pae;return $e.compare(t,e,n,r),r.changes}function Eae(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Rae(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class by extends Yr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function _ae(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return Z.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=Tt(i.text,s,!1):a=Tt(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Tt(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Tt(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return Z.range(o+i.from,a+i.from)}function $ae(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+Hx(o,s,t.state.tabSize)}function c0(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Mt.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function Qae(t,e,n,r){let i=c0(t,e.head,e.assoc||-1),s=!r||i.type!=Mt.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==qe.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return Z.cursor(l,n?-1:1)}return Z.cursor(n?i.to:i.from,n?-1:1)}function BT(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=oae(i,s,o,a,n),u=nD;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
|
|
483
|
+
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function Aae(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==it.Space&&(i=o),i==o}}function Iae(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return Z.cursor(i,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,(e.empty?e.assoc:0)||(n?1:-1)),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let O=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-O.from))),a=(s<0?O.top:O.bottom)+u}let f=l.left+o,d=r??t.viewState.heightOracle.textHeight>>1,h=u0(t,{x:f,y:a+d*s},!1,s);return Z.cursor(h.pos,h.assoc,void 0,o)}function gu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||n||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function vD(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=gu(t,i.from,0);o!=i.from&&(s=Z.cursor(o,-1))}else{let o=gu(t,i.from,-1),a=gu(t,i.to,1);(o!=i.from||a!=i.to)&&(s=Z.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?Z.create(n,e.mainIndex):e}function wy(t,e,n){let r=gu(t.state.facet(Yf).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Z.cursor(r,r<n.from?1:-1)}class pi{constructor(e,n){this.pos=e,this.assoc=n}}function u0(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:a}=e,l=a-s,c;for(;;){if(l<0)return new pi(0,1);if(l>t.viewState.docHeight)return new pi(t.state.doc.length,-1);if(c=t.elementAtHeight(l),r==null)break;if(c.type==Mt.Text){if(r<0?c.to<t.viewport.from:c.from>t.viewport.to)break;let d=t.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(d&&(r<0?d.top<=l+s:d.bottom>=l+s))break}let f=t.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(t.viewport.from>=c.to||t.viewport.to<=c.from){if(n)return null;if(c.type==Mt.Text){let f=$ae(t,i,c,o,a);return new pi(f,f==c.from?1:-1)}}if(c.type!=Mt.Text)return l<(c.top+c.bottom)/2?new pi(c.from,1):new pi(c.to,-1);let u=t.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=t.docView.lineAt(c.from,-2)),new Nae(t,o,a,t.textDirectionAt(c.from)).scanTile(u,c.from)}class Nae{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gi.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gi.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),a,l,c=-1,u=1e9,f;e:for(;r<i;){let h=i-r,O=r+i>>1;t:if(s.has(O)){let x=r+Math.floor(Math.random()*h);for(let y=0;y<h;y++){if(!s.has(x)){O=x;break t}x++,x==i&&(x=r)}break e}s.add(O);let m=n(O);if(m)for(let x=0;x<m.length;x++){let y=m[x],v=0;if(y.bottom<this.y)(!a||a.bottom<y.bottom)&&(a=y),v=1;else if(y.top>this.y)(!l||l.top>y.top)&&(l=y),v=-1;else{let b=y.left>this.x?this.x-y.left:y.right<this.x?this.x-y.right:0,S=Math.abs(b);S<u&&(c=O,u=S,f=y),b&&(v=b<0==(this.baseDir==qe.LTR)?-1:1)}v==-1&&(!o||this.baseDirAt(e[O],1))?i=O:v==1&&(!o||this.baseDirAt(e[O+1],-1))&&(r=O+1)}}if(!f){let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,n)}let d=(o?this.dirAt(e[c],1):this.baseDir)==qe.LTR;return{i:c,after:this.x>(f.left+f.right)/2==d}}scanText(e,n){let r=[];for(let s=0;s<e.length;s=Tt(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,a=r[s+1]-n;return sf(e.dom,o,a).getClientRects()});return i.after?new pi(r[i.i+1],-1):new pi(r[i.i],1)}scanTile(e,n){if(!e.length)return new pi(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let r=[n];for(let a=0,l=n;a<e.children.length;a++)r.push(l+=e.children[a].length);let i=this.scan(r,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:sf(l.dom,0,l.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new pi(r[i.i+1],-1):new pi(o,1)}}const Wc="";class jae{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(_e.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Wc}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=yt.get(i),a=i.nextSibling;if(a==n){o!=null&&o.breakAfter&&!a&&r!=this.view.contentDOM&&this.lineBreak();break}let l=yt.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:Fp(i))||Fp(a)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!Dae(a,n)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){let n=yt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(Mae(e,r.node,r.offset)?n:0))}}function Mae(t,e,n){for(;;){if(!e||n<ts(e))return!1;if(e==t)return!0;n=Ys(e)+1,e=e.parentNode}}function Dae(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=yt.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class VT{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Lae{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=xD(e.docView.tile,n,r,0))){let a=s||o?[]:Bae(e),l=new jae(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Vae(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!r0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!r0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((ae.ios||ae.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,O=u.to-d;(h==0||h==1||f==0)&&(O==0||O==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(Z.range(c,l)):this.newSel=Z.single(c,l)}}}function xD(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<t.children.length;l++){let f=t.children[l],d=c+f.length;if(c<e&&d>n)return xD(f,e,n,c);if(d>=e&&i==-1&&(i=l,s=c),c>n&&f.dom.parentNode==t.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?r+t.length:a,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function bD(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,c=null;(s===8||ae.android&&e.text.length<a-o)&&(l=i.to,c="end");let u=wD(t.state.doc.sliceString(o,a,Wc),e.text,l-o,c);u&&(ae.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Wc+Wc&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:De.of(e.text.slice(u.from,u.toB).split(Wc))})}else r&&(!t.hasFocus&&t.state.facet(zi)||qp(r,i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(ae.mac||ae.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:De.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:t.state.doc.lineAt(i.from).to<i.to&&t.docView.lineHasWidget(i.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:t.state.toText(t.inputState.insertingText)}:ae.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
|
484
|
+
`&&t.lineWrapping&&(r&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:De.of([" "])}),n)return R1(t,n,r,s);if(r&&!qp(r,i)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=vD(t.state.facet(Yf).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function R1(t,e,n,r=-1){if(ae.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(ae.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&rl(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&rl(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&rl(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=zae(t,e,n));return t.state.facet(aD).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function zae(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,c=l<0?s.from:s.to,u=gu(i.facet(Yf).map(f=>f(t)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:Z.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),f,d=n&&yD(t,n.main.head);if(d){let O=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-O}}else f=t.state.doc.lineAt(s.head);let h=s.to-e.to;r=i.changeByRange(O=>{if(O.from==s.from&&O.to==s.to)return{changes:l,range:c||O.map(l)};let m=O.to-h,x=m-u.length;if(t.state.sliceDoc(x,m)!=u||m>=f.from&&x<=f.to)return{range:O};let y=i.changes({from:x,to:m,insert:e.insert}),v=O.to-s.to;return{changes:y,range:c?Z.range(Math.max(0,c.anchor+v),Math.max(0,c.head+v)):O.map(y)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function wD(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function Bae(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new VT(n,r)),(i!=n||s!=r)&&e.push(new VT(i,s))),e}function Vae(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Z.single(n+e,r+e):null}function qp(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class Fae{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ae.safari&&e.contentDOM.addEventListener("input",()=>null),ae.gecko&&ile(e.contentDOM.ownerDocument)}handleEvent(e){!Gae(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=Xae(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&kD.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ae.android&&ae.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ae.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=SD.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Zae.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,rl(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ae.safari&&!ae.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function FT(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){vn(n.state,i)}}}function Xae(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(FT(r.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(FT(r.value,l))}}for(let r in Wr)n(r).handlers.push(Wr[r]);for(let r in yr)n(r).observers.push(yr[r]);return e}const SD=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Zae="dthko",kD=[16,17,18,20,91,92,224,225],Ld=6;function zd(t){return Math.max(0,t)*.7+8}function Wae(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class qae{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=Uoe(e.contentDOM),this.atoms=e.state.facet(Yf).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(_e.allowMultipleSelections)&&Yae(e,n),this.dragging=Hae(e,n)&&TD(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Wae(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=E1(this.view);e.clientX-l.left<=i+Ld?n=-zd(i-e.clientX):e.clientX+l.right>=o-Ld&&(n=zd(e.clientX-o)),e.clientY-l.top<=s+Ld?r=-zd(s-e.clientY):e.clientY+l.bottom>=a-Ld&&(r=zd(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=vD(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Yae(t,e){let n=t.state.facet(rD);return n.length?n[0](e):ae.mac?e.metaKey:e.ctrlKey}function Uae(t,e){let n=t.state.facet(iD);return n.length?n[0](e):ae.mac?!e.altKey:!e.ctrlKey}function Hae(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=nf(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Gae(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=yt.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Wr=Object.create(null),yr=Object.create(null),CD=ae.ie&&ae.ie_version<15||ae.ios&&ae.webkit_version<604;function Kae(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),PD(t,n.value)},50)}function Cg(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function PD(t,e){e=Cg(t.state,k1,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(f0!=null&&n.selection.ranges.every(l=>l.empty)&&f0==s.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:Z.cursor(c.from+f.length)}})}else o?r=n.changeByRange(l=>{let c=s.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:Z.cursor(l.from+c.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}yr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Wr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);yr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};yr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Wr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(sD))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=ele(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new qae(t,e,n,r)),r&&t.observer.ignore(()=>{YM(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function XT(t,e,n,r){if(r==1)return Z.cursor(e,n);if(r==2)return _ae(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,Z.range(o,a)}}const Jae=ae.ie&&ae.ie_version<=11;let ZT=null,WT=0,qT=0;function TD(t){if(!Jae)return t.detail;let e=ZT,n=qT;return ZT=t,qT=Date.now(),WT=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(WT+1)%3:1}function ele(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=TD(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,a){let l=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=XT(t,l.pos,l.assoc,r);if(n.pos!=l.pos&&!o){let f=XT(t,n.pos,n.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?Z.range(d,h):Z.range(h,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=tle(i,l.pos))?c:a?i.addRange(u):Z.create([u])}}}function tle(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Z.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Wr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=Z.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Cg(t.state,C1,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Wr.dragend=t=>(t.inputState.draggedContent=null,!1);function YT(t,e,n,r){if(n=Cg(t.state,k1,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&Uae(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Wr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&YT(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return YT(t,e,r,!0),!0}return!1};Wr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=CD?null:e.clipboardData;return n?(PD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(Kae(t),!1)};function nle(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function rle(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Cg(t,C1,e.join(t.lineBreak)),ranges:n,linewise:r}}let f0=null;Wr.copy=Wr.cut=(t,e)=>{if(!hu(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=rle(t.state);if(!n&&!i)return!1;f0=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=CD?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(nle(t,n),!1)};const ED=Ri.define();function RD(t,e){let n=[];for(let r of t.facet(lD)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:ED.of(!0)}):null}function _D(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=RD(t.state,e);n?t.dispatch(n):t.update([])}},10)}yr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),_D(t)};yr.blur=t=>{t.observer.clearSelectionRange(),_D(t)};yr.compositionstart=yr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};yr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ae.chrome&&ae.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};yr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Wr.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return R1(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let i;if(ae.chrome&&ae.android&&(i=SD.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ae.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ae.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>yr.compositionend(t,e),20),!1};const UT=new Set;function ile(t){UT.has(t)||(UT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const HT=["pre-wrap","normal","pre-line","break-spaces"];let _l=!1;function GT(){_l=!1}class sle{constructor(e){this.lineWrapping=e,this.doc=De.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return HT.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let a=HT.indexOf(e)>-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class ole{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class jr{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Mt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Yo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new jr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var He=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(He||(He={}));const jh=.001;class nn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>jh&&(_l=!0),this.height=e)}replace(e,n,r){return nn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=s.lineAt(l,He.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:s.lineAt(c,He.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,He.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let O=_1.build(r.setDoc(o),e,u,f);s=Yp(s,s.replace(l,c,O))}return s.updateHeight(r,0)}static empty(){return new jn(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new lle(nn.of(e.slice(0,n)),o,nn.of(e.slice(r)))}}function Yp(t,e){return t==e?t:(t.constructor!=e.constructor&&(_l=!0),e)}nn.prototype.size=1;const ale=he.replace({});class $D extends nn{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new jr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new jr(i,0,r,this.spaceAbove,ale):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,He.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class jn extends $D{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new jr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof jn||i instanceof At&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof At?i=new jn(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):nn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class At extends nn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new jr(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:u,length:f}=n.doc.line(s+c);return new jr(u,f,r+a*c,a,0)}}lineAt(e,n,r,i,s){if(n==He.ByHeight)return this.blockAt(e,r,i,s);if(n==He.ByPosNoHeight){let{from:h,to:O}=r.doc.lineAt(e);return new jr(h,O-h,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-o,d=i+a*f+l*(c.from-s-f);return new jr(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let O=d.number-a;f+=l*O+c*(e-s-O)}let h=l+c*d.length;o(new jr(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof At?r[r.length-1]=new At(s.length+i):r.push(null,new At(i-1))}if(e>0){let s=r[0];s instanceof At?r[0]=new At(e+s.length):r.unshift(new At(e-1),null)}return nn.of(r)}decomposeLeft(e,n){n.push(new At(e-1),null)}decomposeRight(e,n){n.push(null,new At(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&o.push(new At(i.from-n-1).updateHeight(e,n));a<=s&&i.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=i.heights[i.index++],d=0;f<0&&(d=-f,f=i.heights[i.index++]),l==-1?l=f:Math.abs(f-l)>=jh&&(l=-2);let h=new jn(u,f,d);h.outdated=!1,o.push(h),a+=u+1}a<=s&&o.push(null,new At(s-a).updateHeight(e,a));let c=nn.of(o);return(l<0||Math.abs(c.height-this.height)>=jh||Math.abs(l-this.heightMetrics(e,n).perLine)>=jh)&&(_l=!0),Yp(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class lle extends nn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=n==He.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==He.ByPosNoHeight?He.ByPosNoHeight:He.ByPos;return l?c.join(this.right.lineAt(a,u,r,o,a)):this.left.lineAt(a,u,r,i,s).join(c)}forEachLine(e,n,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,s,o),n>=l&&this.right.forEachLine(e,n,r,a,l,o);else{let c=this.lineAt(l,He.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&KT(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),KT(s,a)}return nn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?nn.of(this.break?[e,null,n]:[e,n]):(this.left=Yp(this.left,e),this.right=Yp(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return i&&i.from<=n+s.length&&i.more?l=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function KT(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof At&&(r=t[e+1])instanceof At&&t.splice(e-1,3,new At(n.length+1+r.length))}const cle=5;class _1{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof jn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new jn(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new $D(o,i,r)):(o||s||i>=cle)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new jn(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new At(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof jn)return e;let n=new jn(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof jn)&&!this.isCovered?this.nodes.push(new jn(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof jn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new _1(r,e);return $e.spans(n,r,i,s,0),s.finish(r)}}function ule(t,e,n){let r=new fle;return $e.compare(t,e,n,r,0),r.changes}class fle{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&nl(e,n,this.changes,5)}}function dle(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==t.parentNode?i.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function hle(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function ple(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Sy{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return he.replace({widget:new mle(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class mle extends Yr{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class JT{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=eE,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=qe.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(P1).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new sle(n),this.stateDeco=tE(e),this.heightMap=nn.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle.setDoc(e.doc),[new lr(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=he.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Bd(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?eE:new $1(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(qc(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=tE(this.state);let i=e.changedRanges,s=lr.extendWithRanges(i,ule(r,this.stateDeco,e?e.changes:bt.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);GT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||_l)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(uD)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?qe.RTL:qe.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:S,scaleY:k}=qM(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=S,this.scaleY=k,c|=16,o=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=UM(e.scrollDOM);let O=(this.printing?ple:dle)(n,this.paddingTop),m=O.top-this.pixelViewport.top,x=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(l=!0)),!this.inView&&!this.scrollTarget&&!hle(e.dom))return 0;let v=a.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(o=!0),o||i.lineWrapping&&Math.abs(v-this.contentDOMWidth)>i.charWidth){let{lineHeight:k,charWidth:w,textHeight:C}=e.docView.measureTextSize();o=k>0&&i.refresh(s,k,w,C,Math.max(5,v/w),S),o&&(e.docView.minWidth=0,c|=16)}m>0&&x>0?u=Math.max(m,x):m<0&&x<0&&(u=Math.min(m,x)),GT();for(let k of this.viewports){let w=k.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?nn.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle,[new lr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new ole(k.from,w))}_l&&(c|=2)}let b=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Bd(i.lineAt(o-r*1e3,He.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,He.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,He.ByPos,s,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new Bd(i.lineAt(d-1e3/2,He.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,He.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Bd(this.heightMap.lineAt(r,He.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,He.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,He.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,He.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Sy(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=qe.LTR&&!r)return[];let a=[],l=(u,f,d,h)=>{if(f-u<s)return;let O=this.state.selection.main,m=[O.from];O.empty||m.push(O.to);for(let y of m)if(y>u&&y<f){l(u,y-10,d,h),l(y+10,f,d,h);return}let x=Ole(e,y=>y.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)<s&&Math.abs(y.to-f)<s&&!m.some(v=>y.from<v&&y.to>v));if(!x){if(f<d.to&&n&&r&&n.visibleRanges.some(b=>b.from<=f&&b.to>=f)){let b=n.moveToLineBoundary(Z.cursor(f),!1,!0).head;b>u&&(f=b)}let y=this.gapSize(d,u,f,h),v=r||y<2e6?y:2e6;x=new Sy(u,f,y,v)}a.push(x)},c=u=>{if(u.length<o||u.type!=Mt.Text)return;let f=gle(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,O;if(r){let m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,x,y;if(d!=null){let v=Fd(f,d),b=((this.visibleBottom-this.visibleTop)/2+m)/u.height;x=v-b,y=v+b}else x=(this.visibleTop-u.top-m)/u.height,y=(this.visibleBottom-u.top+m)/u.height;h=Vd(f,x),O=Vd(f,y)}else{let m=f.total*this.heightOracle.charWidth,x=i*this.heightOracle.charWidth,y=0;if(m>2e6)for(let w of e)w.from>=u.from&&w.from<u.to&&w.size!=w.displaySize&&w.from*this.heightOracle.charWidth+y<this.pixelViewport.left&&(y=w.size-w.displaySize);let v=this.pixelViewport.left+y,b=this.pixelViewport.right+y,S,k;if(d!=null){let w=Fd(f,d),C=((b-v)/2+x)/m;S=w-C,k=w+C}else S=(v-x)/m,k=(b+x)/m;h=Vd(f,S),O=Vd(f,k)}h>u.from&&l(u.from,h,u,f),O<u.to&&l(O,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,n,r,i){let s=Fd(i,r)-Fd(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Sy.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=he.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];$e.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||qc(this.heightMap.lineAt(e,He.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||qc(this.heightMap.lineAt(this.scaler.fromDOM(e),He.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return qc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}let Bd=class{constructor(e,n){this.from=e,this.to=n}};function gle(t,e,n){let r=[],i=t,s=0;return $e.spans(n,t,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Vd({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function Fd(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function Ole(t,e){for(let n of t)if(e(n))return n}const eE={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function tE(t){let e=t.facet(wg).filter(r=>typeof r!="function"),n=t.facet(T1).filter(r=>typeof r!="function");return n.length&&e.push($e.join(n)),e}class $1{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,He.ByPos,e,0,0).top,u=n.lineAt(l,He.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof $1?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function qc(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new jr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>qc(i,e)):t._content)}const Xd=oe.define({combine:t=>t.join(" ")}),d0=oe.define({combine:t=>t.indexOf(!0)>-1}),h0=Ws.newName(),QD=Ws.newName(),AD=Ws.newName(),ID={"&light":"."+QD,"&dark":"."+AD};function p0(t,e,n){return new Ws(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const yle=p0("."+h0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ID),vle={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ky=ae.ie&&ae.ie_version<=11;class xle{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Hoe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ae.ie&&ae.ie_version<=11||ae.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ae.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ae.chrome&&ae.chrome_version<126)&&(this.editContext=new wle(e),e.state.facet(zi)&&(e.contentDOM.editContext=this.editContext.editContext)),ky&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(zi)?r.root.activeElement!=this.dom:!hu(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ae.ie&&ae.ie_version<=11||ae.android&&ae.chrome)&&!r.state.selection.main.empty&&i.focusNode&&mu(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=nf(e.root);if(!n)return!1;let r=ae.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&ble(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=hu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Koe(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,vle),ky&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),ky&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&rl(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&hu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Lae(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=bD(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!qp(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=nE(n,e.previousSibling||e.target.previousSibling,-1),i=nE(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(zi)!=e.state.facet(zi)&&(e.view.contentDOM.editContext=e.state.facet(zi)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function nE(t,e,n){for(;e;){let r=yt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function rE(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return mu(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function ble(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return rE(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?rE(t,n):null}class wle{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let u=wD(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=Z.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));qp(d,i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:De.of(r.text.slice(u.from,u.toB).split(`
|
|
485
|
+
`))};if((ae.mac||ae.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:De.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);R1(e,f,Z.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(he.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:dD.of(he.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=nf(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class re{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Goe(e.parent)||document,this.viewState=new JT(e.state||_e.create(e)),e.scrollTo&&e.scrollTo.is(Dd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(za).map(i=>new yy(i));for(let i of this.plugins)i.update(this);this.observer=new xle(this),this.inputState=new Fae(this),this.inputState.ensureHandlers(this.plugins),this.docView=new zT(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Ot?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(ED))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=RD(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(_e.phrases)!=this.state.facet(_e.phrases))return this.setState(s);i=Xp.create(this,s,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new il(h.empty?h:Z.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(Dd)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=Up.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Zc)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Xd)!=i.state.facet(Xd)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(a0))try{d(i)}catch(h){vn(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!bD(this,u)&&c.force&&rl(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new JT(e),this.plugins=e.facet(za).map(r=>new yy(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new zT(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(za),r=e.state.facet(za);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new yy(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){vn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(UM(r))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(O){return vn(this.state,O),iE}}),f=Xp.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=iE)try{let O=c[h];O.write&&O.write(u[h],this)}catch(O){vn(this.state,O)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let O=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(O>1||O<-1){i=i+O,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(a0))a(n)}get themeClasses(){return h0+" "+(this.state.facet(d0)?AD:QD)+" "+this.state.facet(Xd)}updateAttrs(){let e=sE(this,hD,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(zi)?"true":"false",class:"cm-content",style:`${ae.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),sE(this,P1,n);let r=this.observer.ignore(()=>{let i=IT(this.contentDOM,this.contentAttrs,n),s=IT(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(re.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Zc);let e=this.state.facet(re.cspNonce);Ws.mount(this.root,this.styleModules.concat(yle).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return wy(this,e,BT(this,e,n,r))}moveByGroup(e,n){return wy(this,e,BT(this,e,n,r=>Aae(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return Z.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return Qae(this,e,n,r)}moveVertically(e,n,r){return wy(this,e,Iae(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=u0(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),u0(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[gi.find(s,e-i.from,-1,n)];return rf(r,o.dir==qe.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(cD)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Sle)return tD(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||eD(s.isolates,r=MT(this,e))))return s.order;r||(r=MT(this,e));let i=sae(e.text,n,r);return this.bidiCache.push(new Up(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ae.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{YM(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Dd.of(new il(typeof e=="number"?Z.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Dd.of(new il(Z.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return dt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return dt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ws.newName(),i=[Xd.of(r),Zc.of(p0(`.${r}`,e))];return n&&n.dark&&i.push(d0.of(!0)),i}static baseTheme(e){return ss.lowest(Zc.of(p0("."+h0,e,ID)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&yt.get(r)||yt.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}re.styleModule=Zc;re.inputHandler=aD;re.clipboardInputFilter=k1;re.clipboardOutputFilter=C1;re.scrollHandler=fD;re.focusChangeEffect=lD;re.perLineTextDirection=cD;re.exceptionSink=oD;re.updateListener=a0;re.editable=zi;re.mouseSelectionStyle=sD;re.dragMovesSelection=iD;re.clickAddsSelectionRange=rD;re.decorations=wg;re.blockWrappers=pD;re.outerDecorations=T1;re.atomicRanges=Yf;re.bidiIsolatedRanges=mD;re.scrollMargins=gD;re.darkTheme=d0;re.cspNonce=oe.define({combine:t=>t.length?t[0]:""});re.contentAttributes=P1;re.editorAttributes=hD;re.lineWrapping=re.contentAttributes.of({class:"cm-lineWrapping"});re.announce=ve.define();const Sle=4096,iE={};class Up{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:qe.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new Up(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function sE(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&b1(o,n)}return n}const kle=ae.mac?"mac":ae.windows?"win":ae.linux?"linux":"key";function Cle(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Zd(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const Ple=ss.default(re.domEventHandlers({keydown(t,e){return jD(ND(e.state),t,e,"editor")}})),da=oe.define({enables:Ple}),oE=new WeakMap;function ND(t){let e=t.facet(da),n=oE.get(e);return n||oE.set(e,n=Rle(e.reduce((r,i)=>r.concat(i),[]))),n}function Tle(t,e,n){return jD(ND(t.state),e,t,n)}let ks=null;const Ele=4e3;function Rle(t,e=kle){let n=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var f,d;let h=n[o]||(n[o]=Object.create(null)),O=a.split(/ (?!$)/).map(y=>Cle(y,e));for(let y=1;y<O.length;y++){let v=O.slice(0,y).join(" ");i(v,!0),h[v]||(h[v]={preventDefault:!0,stopPropagation:!1,run:[b=>{let S=ks={view:b,prefix:v,scope:o};return setTimeout(()=>{ks==S&&(ks=null)},Ele),!0}]})}let m=O.join(" ");i(m,!1);let x=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&x.run.push(l),c&&(x.preventDefault=!0),u&&(x.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,m0))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let m0=null;function jD(t,e,n,r){m0=e;let i=Voe(e),s=pn(i,0),o=hi(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;ks&&ks.view==n&&ks.scope==r&&(a=ks.prefix+" ",kD.indexOf(e.keyCode)<0&&(c=!0,ks=null));let f=new Set,d=x=>{if(x){for(let y of x.run)if(!f.has(y)&&(f.add(y),y(n)))return x.stopPropagation&&(u=!0),!0;x.preventDefault&&(x.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],O,m;return h&&(d(h[a+Zd(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ae.windows&&e.ctrlKey&&e.altKey)&&!(ae.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(O=qs[e.keyCode])&&O!=i?(d(h[a+Zd(O,e,!0)])||e.shiftKey&&(m=ef[e.keyCode])!=i&&m!=O&&d(h[a+Zd(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+Zd(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),m0=null,l}class Uf{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=MD(e);return[new Uf(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return _le(e,n,r)}}function MD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==qe.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function aE(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}function _le(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==qe.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=MD(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),h=c0(t,r,1),O=c0(t,i,-1),m=h.type==Mt.Text?h:null,x=O.type==Mt.Text?O:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=aE(t,r,1,m)),x&&(t.lineWrapping||O.widgetLineBreaks)&&(x=aE(t,i,-1,x)),m&&x&&m.from==x.from&&m.to==x.to)return v(b(n.from,n.to,m));{let k=m?b(n.from,null,m):S(h,!1),w=x?b(null,n.to,x):S(O,!0),C=[];return(m||h).to<(x||O).from-(m&&x?1:0)||h.widgetLineBreaks>1&&k.bottom+t.defaultLineHeight/2<w.top?C.push(y(f,k.bottom,d,w.top)):k.bottom<w.top&&t.elementAtHeight((k.bottom+w.top)/2).type==Mt.Text&&(k.bottom=w.top=(k.bottom+w.top)/2),v(k).concat(C).concat(v(w))}function y(k,w,C,_){return new Uf(e,k-l.left,w-l.top,Math.max(0,C-k),_-w)}function v({top:k,bottom:w,horizontal:C}){let _=[];for(let I=0;I<C.length;I+=2)_.push(y(C[I],k,C[I+1],w));return _}function b(k,w,C){let _=1e9,I=-1e9,E=[];function N(z,X,W,F,j){let A=t.coordsAtPos(z,z==C.to?-2:2),P=t.coordsAtPos(W,W==C.from?2:-2);!A||!P||(_=Math.min(A.top,P.top,_),I=Math.max(A.bottom,P.bottom,I),j==qe.LTR?E.push(s&&X?f:A.left,s&&F?d:P.right):E.push(!s&&F?f:P.left,!s&&X?d:A.right))}let Q=k??C.from,L=w??C.to;for(let z of t.visibleRanges)if(z.to>Q&&z.from<L)for(let X=Math.max(z.from,Q),W=Math.min(z.to,L);;){let F=t.state.doc.lineAt(X);for(let j of t.bidiSpans(F)){let A=j.from+F.from,P=j.to+F.from;if(A>=W)break;P>X&&N(Math.max(A,X),k==null&&A<=Q,Math.min(P,W),w==null&&P>=L,j.dir)}if(X=F.to+1,X>=W)break}return E.length==0&&N(Q,k==null,L,w==null,t.textDirection),{top:_,bottom:I,horizontal:E}}function S(k,w){let C=a.top+(w?k.top:k.bottom);return{top:C,bottom:C,horizontal:[]}}}function $le(t,e){return t.constructor==e.constructor&&t.eq(e)}class Qle{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Mh)!=e.state.facet(Mh)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Mh);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!$le(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,ae.safari&&ae.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Mh=oe.define();function DD(t){return[dt.define(e=>new Qle(e,t)),Mh.of(t)]}const of=oe.define({combine(t){return _i(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Ale(t={}){return[of.of(t),Ile,Nle,jle,uD.of(!0)]}function LD(t){return t.startState.facet(of)!=t.state.facet(of)}const Ile=DD({above:!0,markers(t){let{state:e}=t,n=e.facet(of),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:Z.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Uf.forRange(t,o,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=LD(t);return n&&lE(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){lE(e.state,t)},class:"cm-cursorLayer"});function lE(t,e){e.style.animationDuration=t.facet(of).cursorBlinkRate+"ms"}const Nle=DD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Uf.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||LD(t)},class:"cm-selectionLayer"}),jle=ss.highest(re.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),zD=ve.define({map(t,e){return t==null?null:e.mapPos(t)}}),Yc=$t.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(zD)?r.value:n,t)}}),Mle=dt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Yc);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Yc)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Yc),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Yc)!=t&&this.view.dispatch({effects:zD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Dle(){return[Yc,Mle]}function cE(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)i(o+a.index,a)}function Lle(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class zle{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,l,c,u)=>i(u,c,c+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,c,u)=>{let f=r(a,l,c);f&&u(c,c+a[0].length,f)};else if(r)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new es,r=n.add.bind(n);for(let{from:i,to:s}of Lle(e,this.maxLength))cE(e.state.doc,this.regexp,i,s,(o,a)=>this.addMatch(a,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),a=Math.min(s.to,i);if(a>=o){let l=e.state.doc.lineAt(o),c=l.to<a?e.state.doc.lineAt(a):l,u=Math.max(s.from,l.from),f=Math.min(s.to,c.to);if(this.boundary){for(;o>l.from;o--)if(this.boundary.test(l.text[o-1-l.from])){u=o;break}for(;a<c.to;a++)if(this.boundary.test(c.text[a-c.from])){f=a;break}}let d=[],h,O=(m,x,y)=>d.push(y.range(m,x));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.index<f-l.from;)this.addMatch(h,e,h.index+l.from,O);else cE(e.state.doc,this.regexp,u,f,(m,x)=>this.addMatch(x,e,m,O));n=n.update({filterFrom:u,filterTo:f,filter:(m,x)=>m<u||x>f,add:d})}}return n}}const g0=/x/.unicode!=null?"gu":"g",Ble=new RegExp(`[\0-\b
|
|
486
|
+
--\u2028\u2029\uFEFF-]`,g0),Vle={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Cy=null;function Fle(){var t;if(Cy==null&&typeof document<"u"&&document.body){let e=document.body.style;Cy=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Cy||!1}const Dh=oe.define({combine(t){let e=_i(t,{render:null,specialChars:Ble,addSpecialChars:null});return(e.replaceTabs=!Fle())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,g0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,g0)),e}});function Xle(t={}){return[Dh.of(t),Zle()]}let uE=null;function Zle(){return uE||(uE=dt.fromClass(class{constructor(t){this.view=t,this.decorations=he.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Dh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new zle({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=pn(e[0],0);if(s==9){let o=i.lineAt(r),a=n.state.tabSize,l=Zr(o.text,a,r-o.from);return he.replace({widget:new Ule((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=he.replace({widget:new Yle(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Dh);t.startState.facet(Dh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Wle="•";function qle(t){return t>=32?Wle:t==10?"":String.fromCharCode(9216+t)}class Yle extends Yr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=qle(this.code),r=e.state.phrase("Control character")+" "+(Vle[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Ule extends Yr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Hle(){return Kle}const Gle=he.line({class:"cm-activeLine"}),Kle=dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Gle.range(i.from)),e=i.from)}return he.set(n)}},{decorations:t=>t.decorations});class Jle extends Yr{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?pu(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=rf(n[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function ece(t){let e=dt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?he.set([he.widget({widget:new Jle(t),side:1}).range(0)]):he.none}get decorations(){return this.view.state.doc.length?he.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,re.contentAttributes.of({"aria-placeholder":t})]:e}const O0=2e3;function tce(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>O0||n.off>O0||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=a&&s.push(Z.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=Hx(c.text,o,t.tabSize,!0);if(u<0)s.push(Z.cursor(c.to));else{let f=Hx(c.text,a,t.tabSize);s.push(Z.range(c.from+u,c.from+f))}}}return s}function nce(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function fE(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>O0?-1:i==r.length?nce(t,e.clientX):Zr(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function rce(t,e){let n=fE(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let a=fE(t,i);if(!a)return r;let l=tce(t.state,n,a);return l.length?o?Z.create(l.concat(r.ranges)):Z.create(l):r}}:null}function ice(t){let e=n=>n.altKey&&n.button==0;return re.mouseSelectionStyle.of((n,r)=>e(r)?rce(n,r):null)}const sce={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},oce={style:"cursor: crosshair"};function ace(t={}){let[e,n]=sce[t.key||"Alt"],r=dt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,re.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?oce:null})]}const Wd="-10000px";class BD{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;l<s.length;l++){let c=s[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)o[l]=this.createTooltipView(c,l?o[l-1]:null),a&&(a[l]=!!c.above);else{let f=o[l]=this.tooltipViews[u];a&&(a[l]=n[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,c)=>n[c]=l),n.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function lce(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Py=oe.define({combine:t=>{var e,n,r;return{position:ae.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||lce}}}),dE=new WeakMap,Q1=dt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Py);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new BD(t,A1,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(Py);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Wd,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(ae.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=E1(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Py).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=t.pos[a],d=t.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){u.style.top=Wd;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,O=h?7:0,m=d.right-d.left,x=(e=dE.get(c))!==null&&e!==void 0?e:d.bottom-d.top,y=c.offset||uce,v=this.view.textDirection==qe.LTR,b=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.max(r.left,Math.min(f.left-(h?14:0)+y.x,r.right-m)):Math.min(Math.max(r.left,f.left-m+(h?14:0)-y.x),r.right-m),S=this.above[a];!l.strictSide&&(S?f.top-x-O-y.y<r.top:f.bottom+x+O+y.y>r.bottom)&&S==r.bottom-f.bottom>f.top-r.top&&(S=this.above[a]=!S);let k=(S?f.top-r.top:r.bottom-f.bottom)-O;if(k<x&&c.resize!==!1){if(k<this.view.defaultLineHeight){u.style.top=Wd;continue}dE.set(c,x),u.style.height=(x=k)/s+"px"}else u.style.height&&(u.style.height="");let w=S?f.top-x-O-y.y:f.bottom+O+y.y,C=b+m;if(c.overlap!==!0)for(let _ of o)_.left<C&&_.right>b&&_.top<w+x&&_.bottom>w&&(w=S?_.top-x-2-O:_.bottom+O+2);if(this.position=="absolute"?(u.style.top=(w-t.parent.top)/s+"px",hE(u,(b-t.parent.left)/i)):(u.style.top=w/s+"px",hE(u,b/i)),h){let _=f.left+(v?y.x:-y.x)-(b+14-7);h.style.left=_/i+"px"}c.overlap!==!0&&o.push({left:b,top:w,right:C,bottom:w+x}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Wd}},{eventObservers:{scroll(){this.maybeMeasure()}}});function hE(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const cce=re.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),uce={x:0,y:0},A1=oe.define({enables:[Q1,cce]}),Hp=oe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Pg{static create(e){return new Pg(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new BD(e,Hp,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const fce=A1.compute([Hp],t=>{let e=t.facet(Hp);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Pg.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class dce{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.tile.nearest(n.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==qe.RTL?-1:1;s=n.x<a.left?-c:c}let o=this.source(e,i,s);if(o!=null&&o.then){let a=this.pending={pos:i};o.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>vn(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Q1),n=e?e.manager.tooltips.findIndex(r=>r.create==Pg.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!hce(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!pce(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const qd=4;function hce(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();i=Math.min(a.top,i),s=Math.max(a.bottom,s)}return e.clientX>=n-qd&&e.clientX<=r+qd&&e.clientY>=i-qd&&e.clientY<=s+qd}function pce(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function mce(t,e={}){let n=ve.define(),r=$t.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of i){let l=s.changes.mapPos(a.pos,-1,Nt.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}i=o}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(gce)&&(i=[]);return i},provide:i=>Hp.from(i)});return{active:r,extension:[r,dt.define(i=>new dce(i,t,r,n,e.hoverTime||300)),fce]}}function VD(t,e){let n=t.plugin(Q1);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const gce=ve.define(),pE=oe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function I1(t,e){let n=t.plugin(FD),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const FD=dt.fromClass(class{constructor(t){this.input=t.state.facet(af),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(pE);this.top=new Yd(t,!0,e.topContainer),this.bottom=new Yd(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(pE);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Yd(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Yd(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(af);if(n!=this.input){let r=n.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>re.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Yd{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=mE(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=mE(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function mE(t){let e=t.nextSibling;return t.remove(),e}const af=oe.define({enables:FD});function Oce(t,e){let n,r=new Promise(o=>n=o),i=o=>yce(o,e,n);t.state.field(Ty,!1)?t.dispatch({effects:XD.of(i)}):t.dispatch({effects:ve.appendConfig.of(Ty.init(()=>[i]))});let s=ZD.of(i);return{close:s,result:r.then(o=>((t.win.queueMicrotask||(l=>t.win.setTimeout(l,10)))(()=>{t.state.field(Ty).indexOf(i)>-1&&t.dispatch({effects:s})}),o))}}const Ty=$t.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(XD)?t=[n.value].concat(t):n.is(ZD)&&(t=t.filter(r=>r!=n.value));return t},provide:t=>af.computeN([t],e=>e.field(t))}),XD=ve.define(),ZD=ve.define();function yce(t,e,n){let r=e.content?e.content(t,()=>o(null)):null;if(!r){if(r=Xe("form"),e.input){let a=Xe("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),r.appendChild(Xe("label",(e.label||"")+": ",a))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(Xe("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let a=0;a<i.length;a++){let l=i[a];l.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(l))}),l.addEventListener("submit",c=>{c.preventDefault(),o(l)})}let s=Xe("div",r,Xe("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=r.querySelector(e.focus):a=r.querySelector("input")||r.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class ns extends Zs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ns.prototype.elementClass="";ns.prototype.toDOM=void 0;ns.prototype.mapMode=Nt.TrackBefore;ns.prototype.startSide=ns.prototype.endSide=-1;ns.prototype.point=!0;const Lh=oe.define(),vce=oe.define(),xce={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>$e.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Ou=oe.define();function bce(t){return[WD(),Ou.of({...xce,...t})]}const gE=oe.define({combine:t=>t.some(e=>e)});function WD(t){return[wce]}const wce=dt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Ou).map(e=>new yE(t,e)),this.fixed=!t.state.facet(gE);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(gE)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=$e.iter(this.view.state.facet(Lh),this.view.viewport.from),r=[],i=this.gutters.map(s=>new Sce(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Mt.Text&&o){y0(n,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==Mt.Text){y0(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Ou),n=t.state.facet(Ou),r=t.docChanged||t.heightChanged||t.viewportChanged||!$e.eq(t.startState.facet(Lh),t.state.facet(Lh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new yE(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>re.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==qe.LTR?{left:r,right:i}:{right:r,left:i}})});function OE(t){return Array.isArray(t)?t:[t]}function y0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Sce{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=$e.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let a=new qD(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];y0(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(vce)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class yE{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=OE(n.markers(e)),n.initialSpacer&&(this.spacer=new qD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=OE(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!$e.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class qD{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),kce(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[s++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function kce(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const Cce=oe.define(),Pce=oe.define(),Ba=oe.define({combine(t){return _i(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Ey extends ns{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ry(t,e){return t.state.facet(Ba).formatNumber(e,t.state)}const Tce=Ou.compute([Ba],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Cce)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Ey(Ry(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(Pce)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Ba)!=e.state.facet(Ba),initialSpacer(e){return new Ey(Ry(e,vE(e.state.doc.lines)))},updateSpacer(e,n){let r=Ry(n.view,vE(n.view.state.doc.lines));return r==e.number?e:new Ey(r)},domEventHandlers:t.facet(Ba).domEventHandlers,side:"before"}));function Ece(t={}){return[Ba.of(t),WD(),Tce]}function vE(t){let e=9;for(;e<t;)e=e*10+9;return e}const Rce=new class extends ns{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},_ce=Lh.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Rce.range(i)))}return $e.of(e)});function $ce(){return _ce}const YD=1024;let Qce=0;class cr{constructor(e,n){this.from=e,this.to=n}}class Oe{constructor(e={}){this.id=Qce++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=vt.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Oe.closedBy=new Oe({deserialize:t=>t.split(" ")});Oe.openedBy=new Oe({deserialize:t=>t.split(" ")});Oe.group=new Oe({deserialize:t=>t.split(" ")});Oe.isolate=new Oe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Oe.contextHash=new Oe({perNode:!0});Oe.lookAhead=new Oe({perNode:!0});Oe.mounted=new Oe({perNode:!0});class sl{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Oe.mounted.id]}}const Ace=Object.create(null);class vt{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):Ace,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new vt(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Oe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Oe.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}vt.none=new vt("",Object.create(null),0,8);class rc{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let a=o[1],l=o[0];l.combine&&l.id in i&&(a=l.combine(i[l.id],a)),i[l.id]=a}}n.push(i?new vt(r.name,i,r.id,r.flags):r)}return new rc(n)}}const Ud=new WeakMap,xE=new WeakMap;var Be;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Be||(Be={}));class Te{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=sl.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Gp(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Ud.get(this)||this.topNode,s=new Gp(i);return s.moveTo(e,n),Ud.set(this,s._tree),s}get topNode(){return new Yt(this,0,0,null)}resolve(e,n=0){let r=lf(Ud.get(this)||this.topNode,e,n,!1);return Ud.set(this,r),r}resolveInner(e,n=0){let r=lf(xE.get(this)||this.topNode,e,n,!0);return xE.set(this,r),r}resolveStack(e,n=0){return jce(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&Be.IncludeAnonymous)>0;for(let l=this.cursor(o|Be.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:M1(vt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Te(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Te(vt.none,n,r,i)))}static build(e){return Mce(e)}}Te.empty=new Te(vt.none,[],[],0);class N1{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new N1(this.buffer,this.index)}}class Us{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return vt.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(UD(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){s[l++]=i[a++],s[l++]=i[a++]-r;let c=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,c)}return new Us(s,o,this.set)}}function UD(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function lf(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof Yt&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:Be.IgnoreOverlays;if(r)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof Yt&&o.index<0&&((i=a.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class HD{cursor(e=0){return new Gp(this,e)}getChild(e,n=null,r=null){let i=bE(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return bE(this,e,n,r)}resolve(e,n=0){return lf(this,e,n,!1)}resolveInner(e,n=0){return lf(this,e,n,!0)}matchContext(e){return v0(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Yt extends HD{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+o.from,d;if(!(!(s&Be.EnterBracketed&&u instanceof Te&&(d=sl.get(u))&&!d.overlay&&d.bracketed&&r>=f&&r<=f+u.length)&&!UD(i,r,f,f+u.length))){if(u instanceof Us){if(s&Be.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,n,r-f,i);if(h>-1)return new Oi(new Ice(o,u,e,f),null,h)}else if(s&Be.IncludeAnonymous||!u.type.isAnonymous||j1(u)){let h;if(!(s&Be.IgnoreMounts)&&(h=sl.get(u))&&!h.overlay)return new Yt(h.tree,f,e,o);let O=new Yt(u,f,e,o);return s&Be.IncludeAnonymous||!O.type.isAnonymous?O:O.nextChild(n<0?u.children.length-1:0,n,r,i,s)}}}if(s&Be.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&Be.IgnoreOverlays)&&(i=sl.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Be.EnterBracketed&&i.bracketed;for(let{from:a,to:l}of i.overlay)if((n>0||o?a<=s:a<s)&&(n<0||o?l>=s:l>s))return new Yt(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function bE(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function v0(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Ice{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Oi extends HD{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new Oi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&Be.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Oi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Oi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Oi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new Te(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function GD(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof Yt&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Nce(i,n)}class Nce{constructor(e,n){this.heads=e,this.node=n}get next(){return GD(this.heads)}}function jce(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof Yt?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=sl.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Yt(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(lf(a,e,n,!1))}}return i?GD(i):r}class Gp{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Be.EnterBracketed,e instanceof Yt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Yt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Be.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Be.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Be.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&Be.IncludeAnonymous||a instanceof Us||!a.type.isAnonymous||j1(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new Oi(this.buffer,n,this.stack[i]);return this.bufferNode=new Oi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return v0(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return v0(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function j1(t){return t.children.some(e=>e instanceof Us||!e.type.isAnonymous||j1(e))}function Mce(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=YD,reused:s=[],minRepeatType:o=r.types.length}=t,a=Array.isArray(n)?new N1(n,n.length):n,l=r.types,c=0,u=0;function f(k,w,C,_,I,E){let{id:N,start:Q,end:L,size:z}=a,X=u,W=c;if(z<0)if(a.next(),z==-1){let M=s[N];C.push(M),_.push(Q-k);return}else if(z==-3){c=N;return}else if(z==-4){u=N;return}else throw new RangeError(`Unrecognized record size: ${z}`);let F=l[N],j,A,P=Q-k;if(L-Q<=i&&(A=x(a.pos-w,I))){let M=new Uint16Array(A.size-A.skip),$=a.pos-A.size,R=M.length;for(;a.pos>$;)R=y(A.start,M,R);j=new Us(M,L-A.start,r),P=A.start-k}else{let M=a.pos-z;a.next();let $=[],R=[],q=N>=o?N:-1,H=0,ie=L;for(;a.pos>M;)q>=0&&a.id==q&&a.size>=0?(a.end<=ie-i&&(O($,R,Q,H,a.end,ie,q,X,W),H=$.length,ie=a.end),a.next()):E>2500?d(Q,M,$,R):f(Q,M,$,R,q,E+1);if(q>=0&&H>0&&H<$.length&&O($,R,Q,H,Q,ie,q,X,W),$.reverse(),R.reverse(),q>-1&&H>0){let Y=h(F,W);j=M1(F,$,R,0,$.length,0,L-Q,Y,Y)}else j=m(F,$,R,L-Q,X-L,W)}C.push(j),_.push(P)}function d(k,w,C,_){let I=[],E=0,N=-1;for(;a.pos>w;){let{id:Q,start:L,end:z,size:X}=a;if(X>4)a.next();else{if(N>-1&&L<N)break;N<0&&(N=z-i),I.push(Q,L,z),E++,a.next()}}if(E){let Q=new Uint16Array(E*4),L=I[I.length-2];for(let z=I.length-3,X=0;z>=0;z-=3)Q[X++]=I[z],Q[X++]=I[z+1]-L,Q[X++]=I[z+2]-L,Q[X++]=X;C.push(new Us(Q,I[2]-L,r)),_.push(L-k)}}function h(k,w){return(C,_,I)=>{let E=0,N=C.length-1,Q,L;if(N>=0&&(Q=C[N])instanceof Te){if(!N&&Q.type==k&&Q.length==I)return Q;(L=Q.prop(Oe.lookAhead))&&(E=_[N]+Q.length+L)}return m(k,C,_,I,E,w)}}function O(k,w,C,_,I,E,N,Q,L){let z=[],X=[];for(;k.length>_;)z.push(k.pop()),X.push(w.pop()+C-I);k.push(m(r.types[N],z,X,E-I,Q-E,L)),w.push(I-C)}function m(k,w,C,_,I,E,N){if(E){let Q=[Oe.contextHash,E];N=N?[Q].concat(N):[Q]}if(I>25){let Q=[Oe.lookAhead,I];N=N?[Q].concat(N):[Q]}return new Te(k,w,C,_,N)}function x(k,w){let C=a.fork(),_=0,I=0,E=0,N=C.end-i,Q={size:0,start:0,skip:0};e:for(let L=C.pos-k;C.pos>L;){let z=C.size;if(C.id==w&&z>=0){Q.size=_,Q.start=I,Q.skip=E,E+=4,_+=4,C.next();continue}let X=C.pos-z;if(z<0||X<L||C.start<N)break;let W=C.id>=o?4:0,F=C.start;for(C.next();C.pos>X;){if(C.size<0)if(C.size==-3||C.size==-4)W+=4;else break e;else C.id>=o&&(W+=4);C.next()}I=F,_+=z,E+=W}return(w<0||_==k)&&(Q.size=_,Q.start=I,Q.skip=E),Q.size>4?Q:void 0}function y(k,w,C){let{id:_,start:I,end:E,size:N}=a;if(a.next(),N>=0&&_<o){let Q=C;if(N>4){let L=a.pos-(N-4);for(;a.pos>L;)C=y(k,w,C)}w[--C]=Q,w[--C]=E-k,w[--C]=I-k,w[--C]=_}else N==-3?c=_:N==-4&&(u=_);return C}let v=[],b=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,v,b,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:v.length?b[0]+v[0].length:0;return new Te(l[t.topID],v.reverse(),b.reverse(),S)}const wE=new WeakMap;function zh(t,e){if(!t.isAnonymous||e instanceof Us||e.type!=t)return 1;let n=wE.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Te)){n=1;break}n+=zh(t,r)}wE.set(e,n)}return n}function M1(t,e,n,r,i,s,o,a,l){let c=0;for(let O=r;O<i;O++)c+=zh(t,e[O]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(O,m,x,y,v){for(let b=x;b<y;){let S=b,k=m[b],w=zh(t,O[b]);for(b++;b<y;b++){let C=zh(t,O[b]);if(w+C>=u)break;w+=C}if(b==S+1){if(w>u){let C=O[S];h(C.children,C.positions,0,C.children.length,m[S]+v);continue}f.push(O[S])}else{let C=m[b-1]+O[b-1].length-k;f.push(M1(t,O,m,S,b,k,C,null,l))}d.push(k+v-s)}}return h(e,n,r,i,0),(a||l)(f,d,o)}class KD{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Oi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Yt&&this.map.set(e.tree,n)}get(e){return e instanceof Oi?this.getBuffer(e.context.buffer,e.index):e instanceof Yt?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Zi{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Zi(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;o&&o.from<f;){let d=o;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,O=Math.min(d.to,f)-c;d=h>=O?null:new Zi(h,O,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),o.to>f)break;o=s<e.length?e[s++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class Tg{startParse(e,n,r){return typeof e=="string"&&(e=new Dce(e)),r=r?r.length?r.map(i=>new cr(i.from,i.to)):[new cr(0,0)]:[new cr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}}class Dce{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function JD(t){return(e,n,r,i)=>new zce(e,t,n,r,i)}class SE{constructor(e,n,r,i,s,o){this.parser=e,this.parse=n,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function kE(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Lce{constructor(e,n,r,i,s,o,a,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const x0=new Oe({perNode:!0});class zce{constructor(e,n,r,i,s){this.nest=n,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Te(r.type,r.children,r.positions,r.length,r.propValues.concat([[x0,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Oe.mounted.id]=new sl(n,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new Fce(this.fragments),n=null,r=null,i=new Gp(new Yt(this.baseTree,this.ranges[0].from,0,null),Be.IncludeAnonymous|Be.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(o=Bce(r.ranges,i.from,i.to)))a=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(Vce(i),n&&n.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new Lce(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,n);else{let u=TE(this.ranges,s.overlay||(i.from<i.to?[new cr(i.from,i.to)]:[]));u.length&&kE(u),(u.length||!s.overlay)&&this.inner.push(new SE(s.parser,u.length?s.parser.startParse(this.input,EE(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new cr(f.from-i.from,f.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new cr(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=TE(this.ranges,n.ranges);c.length&&(kE(c),this.inner.splice(n.index,0,new SE(n.parser,n.parser.startParse(this.input,EE(n.mounts,c),c),n.ranges.map(u=>new cr(u.from-n.start,u.to-n.start)),n.bracketed,n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function Bce(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function CE(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function Vce(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,f,d,h,O,m){let x=n[m],y=[],v=[];CE(o,u,x,y,v,h);let b=a[x+1],S=a[x+2];l.push(y.length);let k=m?c(x+4,a[x+3],o.set.types[a[x]],b,S-b,m-1):e.toTree();return y.push(k),v.push(b-h),CE(o,a[x+3],f,y,v,h),new Te(d,y,v,O)}i.children[s]=c(0,a.length,vt.none,0,o.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Yt(f,d+t.from,u,t._tree))}}class PE{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Be.IncludeAnonymous|Be.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Be.IgnoreOverlays|Be.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Te)n=n.children[0];else break}return!1}}let Fce=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(x0))!==null&&n!==void 0?n:r.to,this.inner=new PE(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(x0))!==null&&e!==void 0?e:n.to,this.inner=new PE(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(Oe.mounted);if(o&&o.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=s.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:s.from-l.offset,mount:o})}}}return i}};function TE(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,a=t[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(n||(r=n=e.slice()),l.from<o?(n[s]=new cr(l.from,o),l.to>a&&n.splice(s+1,0,new cr(a,l.to))):l.to>a?n[s--]=new cr(a,l.to):n.splice(s--,1))}}return r}function Xce(t,e,n,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:o?t[i].to:t[i].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new cr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(o?(o=!1,i++):o=!0),f==l&&(a?(a=!1,s++):a=!0)}return c}function EE(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){let o=r+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),c=Math.min(s.to,a);if(i.overlay){let u=i.overlay.map(d=>new cr(d.from+r,d.to+r)),f=Xce(e,u,l,c);for(let d=0,h=l;;d++){let O=d==f.length,m=O?c:f[d].from;if(m>h&&n.push(new Zi(h,m,i.tree,-o,s.from>=h||s.openStart,s.to<=m||s.openEnd)),O)break;h=f[d].to}}else n.push(new Zi(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let Zce=0;class Ln{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=Zce++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Ln&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new Ln(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new Kp(e);return r=>r.modified.indexOf(n)>-1?r:Kp.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let Wce=0;class Kp{constructor(e){this.name=e,this.instances=[],this.id=Wce++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&qce(n,a.modified));if(r)return r;let i=[],s=new Ln(e.name,i,e,n);for(let a of n)a.instances.push(s);let o=Yce(n);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(Kp.get(a,l));return s}}function qce(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Yce(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function ic(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new cf(r,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return eL.add(e)}const eL=new Oe({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new cf(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class cf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}cf.empty=new cf([],2,null);function tL(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function Uce(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Hce(t,e,n,r=0,i=t.length){let s=new Gce(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class Gce{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=n)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=i,u=Kce(e)||cf.empty,f=Uce(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(Oe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),O=this.highlighters.filter(x=>!x.scope||x.scope(d.tree.type)),m=e.firstChild();for(let x=0,y=a;;x++){let v=x<d.overlay.length?d.overlay[x]:null,b=v?v.from+a:l,S=Math.max(n,y),k=Math.min(r,b);if(S<k&&m)for(;e.from<k&&(this.highlightRange(e,S,k,i,s),this.startSpan(Math.min(k,e.to),c),!(e.to>=b||!e.nextSibling())););if(!v||b>r)break;y=v.to+a,y>n&&(this.highlightRange(h.cursor(),Math.max(n,v.from+a),Math.min(r,y),"",O),this.startSpan(Math.min(r,y),c))}m&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function Kce(t){let e=t.type.prop(eL);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const se=Ln.define,Hd=se(),xs=se(),RE=se(xs),_E=se(xs),bs=se(),Gd=se(bs),_y=se(bs),oi=se(),mo=se(oi),ii=se(),si=se(),b0=se(),Qc=se(b0),Kd=se(),T={comment:Hd,lineComment:se(Hd),blockComment:se(Hd),docComment:se(Hd),name:xs,variableName:se(xs),typeName:RE,tagName:se(RE),propertyName:_E,attributeName:se(_E),className:se(xs),labelName:se(xs),namespace:se(xs),macroName:se(xs),literal:bs,string:Gd,docString:se(Gd),character:se(Gd),attributeValue:se(Gd),number:_y,integer:se(_y),float:se(_y),bool:se(bs),regexp:se(bs),escape:se(bs),color:se(bs),url:se(bs),keyword:ii,self:se(ii),null:se(ii),atom:se(ii),unit:se(ii),modifier:se(ii),operatorKeyword:se(ii),controlKeyword:se(ii),definitionKeyword:se(ii),moduleKeyword:se(ii),operator:si,derefOperator:se(si),arithmeticOperator:se(si),logicOperator:se(si),bitwiseOperator:se(si),compareOperator:se(si),updateOperator:se(si),definitionOperator:se(si),typeOperator:se(si),controlOperator:se(si),punctuation:b0,separator:se(b0),bracket:Qc,angleBracket:se(Qc),squareBracket:se(Qc),paren:se(Qc),brace:se(Qc),content:oi,heading:mo,heading1:se(mo),heading2:se(mo),heading3:se(mo),heading4:se(mo),heading5:se(mo),heading6:se(mo),contentSeparator:se(oi),list:se(oi),quote:se(oi),emphasis:se(oi),strong:se(oi),link:se(oi),monospace:se(oi),strikethrough:se(oi),inserted:se(),deleted:se(),changed:se(),invalid:se(),meta:Kd,documentMeta:se(Kd),annotation:se(Kd),processingInstruction:se(Kd),definition:Ln.defineModifier("definition"),constant:Ln.defineModifier("constant"),function:Ln.defineModifier("function"),standard:Ln.defineModifier("standard"),local:Ln.defineModifier("local"),special:Ln.defineModifier("special")};for(let t in T){let e=T[t];e instanceof Ln&&(e.name=t)}tL([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}]);var $y;const Rs=new Oe;function Eg(t){return oe.define({combine:t?e=>e.concat(t):void 0})}const D1=new Oe;class Fn{constructor(e,n,r=[],i=""){this.data=e,this.name=i,_e.prototype.hasOwnProperty("tree")||Object.defineProperty(_e.prototype,"tree",{get(){return Ze(this)}}),this.parser=n,this.extension=[Hs.of(this),_e.languageData.of((s,o,a)=>{let l=$E(s,o,a),c=l.type.prop(Rs);if(!c)return[];let u=s.facet(c),f=l.type.prop(D1);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let O=s.facet(h.facet);return h.type=="replace"?O:O.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return $E(e,n,r).type.prop(Rs)==this.data}findRegions(e){let n=e.facet(Hs);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Rs)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(Oe.mounted);if(a){if(a.tree.prop(Rs)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let c=s.children[l];c instanceof Te&&i(c,s.positions[l]+o)}};return i(Ze(e),0),r}get allowsNesting(){return!0}}Fn.setState=ve.define();function $E(t,e,n){let r=t.facet(Hs),i=Ze(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,Be.ExcludeBuffers|Be.EnterBracketed))s.type.isTop&&(i=s);return i}class $l extends Fn{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=Eg(e.languageData);return new $l(n,e.parser.configure({props:[Rs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new $l(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ze(t){let e=t.field(Fn.state,!1);return e?e.tree:Te.empty}class Jce{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Ac=null;class Go{constructor(e,n,r=[],i,s,o,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Go(e,n,[],Te.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Jce(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Te.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Zi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Zi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ac;Ac=this;try{return e()}finally{Ac=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=QE(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=Zi.applyChanges(r,l),i=Te.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new Go(this.parser,n,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=QE(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Tg{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=Ac;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Te(vt.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ac}}function QE(t,e,n){return Zi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ql{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ql(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Go.create(e.facet(Hs).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ql(r)}}Fn.state=$t.define({create:Ql.init,update(t,e){for(let n of e.effects)if(n.is(Fn.setState))return n.value;return e.startState.facet(Hs)!=e.state.facet(Hs)?Ql.init(e.state):t.apply(e)}});let nL=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(nL=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Qy=typeof navigator<"u"&&(!(($y=navigator.scheduling)===null||$y===void 0)&&$y.isInputPending)?()=>navigator.scheduling.isInputPending():null,eue=dt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Fn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Fn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=nL(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Fn.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Qy?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>Qy&&Qy()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Fn.setState.of(new Ql(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>vn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Hs=oe.define({combine(t){return t.length?t[0]:null},enables:t=>[Fn.state,eue,re.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Al{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class D{constructor(e,n,r,i,s,o=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new D(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(s=>s==n))return i;if(r)for(let i of e)for(let s of i.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return i}return null}}const tue=oe.define(),sc=oe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ko(t){let e=t.facet(sc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function uf(t,e){let n="",r=t.tabSize,i=t.facet(sc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function L1(t,e){t instanceof _e&&(t=new Rg(t));for(let r of t.state.facet(tue)){let i=r(t,e);if(i!==void 0)return i}let n=Ze(t.state);return n.length>=e?nue(t,n,e):null}class Rg{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ko(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return Zr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const oc=new Oe;function nue(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return rL(r,t,n)}function rL(t,e,n){for(let r=t;r;r=r.next){let i=iue(r.node);if(i)return i(z1.create(e,n,r))}return 0}function rue(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function iue(t){let e=t.type.prop(oc);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Oe.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>iL(o,!0,1,void 0,s&&!rue(o)?i.from:void 0)}return t.parent==null?sue:null}function sue(){return 0}class z1 extends Rg{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new z1(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(oue(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return rL(this.context.next,this.base,this.pos)}}function oue(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function aue(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function lue({closing:t,align:e=!0,units:n=1}){return r=>iL(r,e,n,t)}function iL(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=e?aue(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const cue=t=>t.baseIndent;function Bh({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const uue=200;function fue(){return _e.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+uue)return t;let s=n.sliceString(i.from,r);if(!e.some(c=>c.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=L1(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=uf(o,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const sL=oe.define(),ac=new Oe;function oL(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function due(t,e,n){let r=Ze(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let a=o.node;if(a.to<=n||a.from>n)continue;if(s&&a.from<e)break;let l=a.type.prop(ac);if(l&&(a.to<r.length-50||r.length==t.doc.length||!hue(a))){let c=l(a,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(s=c)}}return s}function hue(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Jp(t,e,n){for(let r of t.facet(sL)){let i=r(t,e,n);if(i)return i}return due(t,e,n)}function aL(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const _g=ve.define({map:aL}),Hf=ve.define({map:aL});function lL(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Jo=$t.define({create(){return he.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=AE(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(_g)&&!pue(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(fL),i=r?he.replace({widget:new bue(r(e.state,n.value))}):IE;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Hf)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=AE(t,e.selection.main.head)),t},provide:t=>re.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(IE.range(r,i))}return he.set(e,!0)}});function AE(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function em(t,e,n){var r;let i=null;return(r=t.field(Jo,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function pue(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function cL(t,e){return t.field(Jo,!1)?e:e.concat(ve.appendConfig.of(dL()))}const mue=t=>{for(let e of lL(t)){let n=Jp(t.state,e.from,e.to);if(n)return t.dispatch({effects:cL(t.state,[_g.of(n),uL(t,n)])}),!0}return!1},gue=t=>{if(!t.state.field(Jo,!1))return!1;let e=[];for(let n of lL(t)){let r=em(t.state,n.from,n.to);r&&e.push(Hf.of(r),uL(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function uL(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return re.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const Oue=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=Jp(e,i.from,i.to);s&&n.push(_g.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:cL(t.state,n)}),!!n.length},yue=t=>{let e=t.state.field(Jo,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Hf.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},vue=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:mue},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:gue},{key:"Ctrl-Alt-[",run:Oue},{key:"Ctrl-Alt-]",run:yue}],xue={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},fL=oe.define({combine(t){return _i(t,xue)}});function dL(t){return[Jo,kue]}function hL(t,e){let{state:n}=t,r=n.facet(fL),i=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=em(t.state,a.from,a.to);l&&t.dispatch({effects:Hf.of(l)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const IE=he.replace({widget:new class extends Yr{toDOM(t){return hL(t,null)}}});class bue extends Yr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return hL(e,this.value)}}const wue={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Ay extends ns{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Sue(t={}){let e={...wue,...t},n=new Ay(e,!0),r=new Ay(e,!1),i=dt.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Hs)!=o.state.facet(Hs)||o.startState.field(Jo,!1)!=o.state.field(Jo,!1)||Ze(o.startState)!=Ze(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new es;for(let l of o.viewportLineBlocks){let c=em(o.state,l.from,l.to)?r:Jp(o.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:s}=e;return[i,bce({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(i))===null||a===void 0?void 0:a.markers)||$e.empty},initialSpacer(){return new Ay(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let c=em(o.state,a.from,a.to);if(c)return o.dispatch({effects:Hf.of(c)}),!0;let u=Jp(o.state,a.from,a.to);return u?(o.dispatch({effects:_g.of(u)}),!0):!1}}}),dL()]}const kue=re.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class lc{constructor(e,n){this.specs=e;let r;function i(a){let l=Ws.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Fn?a=>a.prop(Rs)==o.data:o?a=>a==o:void 0,this.style=tL(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new Ws(r):null,this.themeType=n.themeType}static define(e,n){return new lc(e,n||{})}}const w0=oe.define(),pL=oe.define({combine(t){return t.length?[t[0]]:null}});function Iy(t){let e=t.facet(w0);return e.length?e:t.facet(pL)}function $g(t,e){let n=[Pue],r;return t instanceof lc&&(t.module&&n.push(re.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(pL.of(t)):r?n.push(w0.computeN([re.darkTheme],i=>i.facet(re.darkTheme)==(r=="dark")?[t]:[])):n.push(w0.of(t)),n}class Cue{constructor(e){this.markCache=Object.create(null),this.tree=Ze(e.state),this.decorations=this.buildDeco(e,Iy(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ze(e.state),r=Iy(e.state),i=r!=Iy(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return he.none;let r=new es;for(let{from:i,to:s}of e.visibleRanges)Hce(this.tree,n,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=he.mark({class:l})))},i,s);return r.finish()}}const Pue=ss.high(dt.fromClass(Cue,{decorations:t=>t.decorations})),mL=lc.define([{tag:T.meta,color:"#404740"},{tag:T.link,textDecoration:"underline"},{tag:T.heading,textDecoration:"underline",fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strong,fontWeight:"bold"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.keyword,color:"#708"},{tag:[T.atom,T.bool,T.url,T.contentSeparator,T.labelName],color:"#219"},{tag:[T.literal,T.inserted],color:"#164"},{tag:[T.string,T.deleted],color:"#a11"},{tag:[T.regexp,T.escape,T.special(T.string)],color:"#e40"},{tag:T.definition(T.variableName),color:"#00f"},{tag:T.local(T.variableName),color:"#30a"},{tag:[T.typeName,T.namespace],color:"#085"},{tag:T.className,color:"#167"},{tag:[T.special(T.variableName),T.macroName],color:"#256"},{tag:T.definition(T.propertyName),color:"#00c"},{tag:T.comment,color:"#940"},{tag:T.invalid,color:"#f00"}]),Tue=re.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),gL=1e4,OL="()[]{}",yL=oe.define({combine(t){return _i(t,{afterCursor:!0,brackets:OL,maxScanDistance:gL,renderMatch:_ue})}}),Eue=he.mark({class:"cm-matchingBracket"}),Rue=he.mark({class:"cm-nonmatchingBracket"});function _ue(t){let e=[],n=t.matched?Eue:Rue;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const $ue=$t.define({create(){return he.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(yL);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=yi(e.state,i.head,-1,r)||i.head>0&&yi(e.state,i.head-1,1,r)||r.afterCursor&&(yi(e.state,i.head,1,r)||i.head<e.state.doc.length&&yi(e.state,i.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return he.set(n,!0)},provide:t=>re.decorations.from(t)}),Que=[$ue,Tue];function Aue(t={}){return[yL.of(t),Que]}const vL=new Oe;function S0(t,e,n){let r=t.prop(e<0?Oe.openedBy:Oe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function k0(t){let e=t.type.prop(vL);return e?e(t.node):t}function yi(t,e,n,r={}){let i=r.maxScanDistance||gL,s=r.brackets||OL,o=Ze(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=S0(l.type,n,s);if(c&&l.from<l.to){let u=k0(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return Iue(t,e,n,l,u,c,s)}}return Nue(t,e,n,o,a.type,i,s)}function Iue(t,e,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=k0(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(S0(u.type,n,o))c++;else if(S0(u.type,-n,o)){if(c==0){let f=k0(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function Nue(t,e,n,r,i,s,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;n<0&&(d+=h.length);let O=e+d*n;for(let m=n>0?0:h.length-1,x=n>0?h.length:-1;m!=x;m+=n){let y=o.indexOf(h[m]);if(!(y<0||r.resolveInner(O+m,1).type!=i))if(y%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:O+m,to:O+m+1},matched:y>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}function NE(t,e,n,r=0,i=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=i;for(let o=r;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class xL{constructor(e,n,r,i){this.string=e,this.tabSize=n,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),r;if(typeof e=="string"?r=n==e:r=n&&(e instanceof RegExp?e.test(n):e(n)),r)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=NE(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:NE(this.string,null,this.tabSize)}match(e,n,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&n!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function jue(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Mue,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||F1,mergeTokens:t.mergeTokens!==!1}}function Mue(t){if(typeof t!="object")return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const jE=new WeakMap;class B1 extends Fn{constructor(e){let n=Eg(e.languageData),r=jue(e),i,s=new class extends Tg{createParse(o,a,l){return new Lue(i,o,a,l)}};super(n,s,[],e.name),this.topNode=Vue(n,this),i=this,this.streamParser=r,this.stateAfter=new Oe({perNode:!0}),this.tokenTable=e.tokenTable?new kL(r.tokenTable):Bue}static define(e){return new B1(e)}getIndent(e){let n,{overrideIndentation:r}=e.options;r&&(n=jE.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let i=V1(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let l=e.state.doc.lineAt(s),c=Math.min(e.pos,l.to);if(l.length){let u=r?r(l.from):-1,f=new xL(l.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-l.from;)wL(this.streamParser.token,f,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=l.to+1}let a=e.lineAt(e.pos);return r&&n==null&&jE.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function V1(t,e,n,r,i){let s=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],c=a instanceof Te&&l<i&&V1(t,a,l,r,i);if(c)return c}return null}function bL(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;!i&&n==0&&e.type==t.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(o<r&&a instanceof Te){if(!(l=bL(t,a,n-o,r-o,i)))break;return i?new Te(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function Due(t,e,n,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=n&&a>n&&V1(t,s.tree,0-s.offset,n,a),c;if(l&&l.pos<=r&&(c=bL(t,s.tree,n+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:c}}return{state:t.streamParser.startState(i?Ko(i):4),tree:Te.empty}}let Lue=class{constructor(e,n,r,i){this.lang=e,this.input=n,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=Go.get(),o=i[0].from,{state:a,tree:l}=Due(e,r,o,this.to,s==null?void 0:s.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let c=0;c<l.children.length;c++)this.chunks.push(l.children[c]),this.chunkPos.push(l.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Ko(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Go.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(n,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
|
|
487
|
+
`&&(n="");else{let r=n.indexOf(`
|
|
488
|
+
`);r>-1&&(n=n.slice(0,r))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),r=e+n.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(n=n.slice(0,s-(r-n.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,a=this.lineAfter(o);n+=a,r=o+a.length}return{line:n,end:r}}skipGapsTo(e,n,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+n;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-i}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(n,i,1),n+=i;let a=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=r:this.chunk.push(e,n,r,s),i}parseLine(e){let{line:n,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new xL(n,e?e.state.tabSize:4,e?Ko(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=wL(s.token,o,this.state);if(a&&(i=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Te.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:zue,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Te(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Te(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function wL(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let i=t(e,n);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const F1=Object.create(null),ff=[vt.none],zue=new rc(ff),ME=[],DE=Object.create(null),SL=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])SL[t]=CL(F1,e);class kL{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),SL)}resolve(e){return e?this.table[e]||(this.table[e]=CL(this.extra,e)):0}}const Bue=new kL(F1);function Ny(t,e){ME.indexOf(t)>-1||(ME.push(t),console.warn(e))}function CL(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||T[c];u?typeof u=="function"?l.length?l=l.map(u):Ny(c,`Modifier ${c} used at start of tag`):l.length?Ny(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Ny(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),s=DE[i];if(s)return s.id;let o=DE[i]=vt.define({id:ff.length,name:r,props:[ic({[r]:n})]});return ff.push(o),o.id}function Vue(t,e){let n=vt.define({id:ff.length,name:"Document",props:[Rs.add(()=>t),oc.add(()=>r=>e.getIndent(r))],top:!0});return ff.push(n),n}qe.RTL,qe.LTR;const Fue=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=Z1(t.state,n.from);return r.line?Xue(t):r.block?Wue(t):!1};function X1(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Xue=X1(Uue,0),Zue=X1(PL,0),Wue=X1((t,e)=>PL(t,e,Yue(e)),0);function Z1(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ic=50;function que(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-Ic,r),o=t.sliceDoc(i,i+Ic),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*Ic?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+Ic),f=t.sliceDoc(i-Ic,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,O=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(O,O+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function Yue(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function PL(t,e,n=e.selection.ranges){let r=n.map(s=>Z1(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>que(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,a;o<i.length;o++)if(a=i[o]){let l=r[o],{open:c,close:u}=a;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function Uue(t,e,n=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of n){let a=r.length,l=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=Z1(e,f.from).line,!c))continue e;if(f.from>i&&(s==o||o>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,O=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:O,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of r)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const C0=Ri.define(),Hue=Ri.define(),Gue=oe.define(),TL=oe.define({combine(t){return _i(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),EL=$t.define({create(){return vi.empty},update(t,e){let n=e.state.facet(TL),r=e.annotation(C0);if(r){let l=xn.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=tm(u,u.length,n.minDepth,l):u=$L(u,e.startState.selection),new vi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(Hue);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Ot.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=xn.fromTransaction(e),o=e.annotation(Ot.time),a=e.annotation(Ot.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new vi(t.done.map(xn.fromJSON),t.undone.map(xn.fromJSON))}});function Kue(t={}){return[EL,TL.of(t),re.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?RL:e.inputType=="historyRedo"?P0:null;return r?(e.preventDefault(),r(n)):!1}})]}function Qg(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(EL,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const RL=Qg(0,!1),P0=Qg(1,!1),Jue=Qg(0,!0),efe=Qg(1,!0);class xn{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new xn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new xn(e.changes&&bt.fromJSON(e.changes),[],e.mapped&&Si.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,n){let r=ur;for(let i of e.startState.facet(Gue)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new xn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ur)}static selection(e){return new xn(void 0,ur,void 0,void 0,e)}}function tm(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function tfe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&o<=u&&(r=!0)}}),r}function nfe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function _L(t,e){return t.length?e.length?t.concat(e):t:e}const ur=[],rfe=200;function $L(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-rfe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),tm(t,t.length-1,1e9,n.setSelAfter(r)))}else return[xn.selection([e])]}function ife(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function jy(t,e){if(!t.length)return t;let n=t.length,r=ur;for(;n;){let i=sfe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[xn.selection(r)]:ur}function sfe(t,e,n){let r=_L(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ur,n);if(!t.changes)return xn.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new xn(i,ve.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const ofe=/^(input\.type|delete)($|\.)/;class vi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new vi(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||ofe.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,tfe(a.changes,e.changes))||r=="input.type.compose")?o=tm(o,o.length-1,i.minDepth,new xn(e.changes.compose(a.changes),_L(ve.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,ur)):o=tm(o,o.length,i.minDepth,e),new vi(o,ur,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:ur;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&nfe(s[s.length-1],e)?this:new vi($L(this.done,e),this.undone,n,r)}addMapping(e){return new vi(jy(this.done,e),jy(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):n.selection);if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:C0.of({side:e,rest:ife(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?ur:i.slice(0,i.length-1);return s.mapped&&(a=jy(a,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:C0.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}vi.empty=new vi(ur,ur);const afe=[{key:"Mod-z",run:RL,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:P0,preventDefault:!0},{linux:"Ctrl-Shift-z",run:P0,preventDefault:!0},{key:"Mod-u",run:Jue,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:efe,preventDefault:!0}];function cc(t,e){return Z.create(t.ranges.map(e),t.mainIndex)}function Ur(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Hr({state:t,dispatch:e},n){let r=cc(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Ur(t,r)),!0)}function Ag(t,e){return Z.cursor(e?t.to:t.from)}function QL(t,e){return Hr(t,n=>n.empty?t.moveByChar(n,e):Ag(n,e))}function Gt(t){return t.textDirectionAt(t.state.selection.main.head)==qe.LTR}const AL=t=>QL(t,!Gt(t)),IL=t=>QL(t,Gt(t));function NL(t,e){return Hr(t,n=>n.empty?t.moveByGroup(n,e):Ag(n,e))}const lfe=t=>NL(t,!Gt(t)),cfe=t=>NL(t,Gt(t));function ufe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Ig(t,e,n){let r=Ze(t).resolveInner(e.head),i=n?Oe.closedBy:Oe.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;ufe(t,c,i)?r=c:l=n?c.to:c.from}let s=r.type.prop(i),o,a;return s&&(o=n?yi(t,r.from,1):yi(t,r.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?r.to:r.from,Z.cursor(a,n?-1:1)}const ffe=t=>Hr(t,e=>Ig(t.state,e,!Gt(t))),dfe=t=>Hr(t,e=>Ig(t.state,e,Gt(t)));function jL(t,e){return Hr(t,n=>{if(!n.empty)return Ag(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const ML=t=>jL(t,!1),DL=t=>jL(t,!0);function LL(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(re.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function zL(t,e){let n=LL(t),{state:r}=t,i=cc(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):Ag(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<c&&(s=re.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return t.dispatch(Ur(r,i),{effects:s}),!0}const LE=t=>zL(t,!1),T0=t=>zL(t,!0);function so(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Z.cursor(r.from+s))}return i}const hfe=t=>Hr(t,e=>so(t,e,!0)),pfe=t=>Hr(t,e=>so(t,e,!1)),mfe=t=>Hr(t,e=>so(t,e,!Gt(t))),gfe=t=>Hr(t,e=>so(t,e,Gt(t))),Ofe=t=>Hr(t,e=>Z.cursor(t.lineBlockAt(e.head).from,1)),yfe=t=>Hr(t,e=>Z.cursor(t.lineBlockAt(e.head).to,-1));function vfe(t,e,n){let r=!1,i=cc(t.selection,s=>{let o=yi(t,s.head,-1)||yi(t,s.head,1)||s.head>0&&yi(t,s.head-1,1)||s.head<t.doc.length&&yi(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return Z.cursor(a)});return r?(e(Ur(t,i)),!0):!1}const xfe=({state:t,dispatch:e})=>vfe(t,e);function br(t,e){let n=cc(t.state.selection,r=>{let i=e(r);return Z.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ur(t.state,n)),!0)}function BL(t,e){return br(t,n=>t.moveByChar(n,e))}const VL=t=>BL(t,!Gt(t)),FL=t=>BL(t,Gt(t));function XL(t,e){return br(t,n=>t.moveByGroup(n,e))}const bfe=t=>XL(t,!Gt(t)),wfe=t=>XL(t,Gt(t)),Sfe=t=>br(t,e=>Ig(t.state,e,!Gt(t))),kfe=t=>br(t,e=>Ig(t.state,e,Gt(t)));function ZL(t,e){return br(t,n=>t.moveVertically(n,e))}const WL=t=>ZL(t,!1),qL=t=>ZL(t,!0);function YL(t,e){return br(t,n=>t.moveVertically(n,e,LL(t).height))}const zE=t=>YL(t,!1),BE=t=>YL(t,!0),Cfe=t=>br(t,e=>so(t,e,!0)),Pfe=t=>br(t,e=>so(t,e,!1)),Tfe=t=>br(t,e=>so(t,e,!Gt(t))),Efe=t=>br(t,e=>so(t,e,Gt(t))),Rfe=t=>br(t,e=>Z.cursor(t.lineBlockAt(e.head).from)),_fe=t=>br(t,e=>Z.cursor(t.lineBlockAt(e.head).to)),VE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:0})),!0),FE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.doc.length})),!0),XE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.selection.main.anchor,head:0})),!0),ZE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),$fe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Qfe=({state:t,dispatch:e})=>{let n=Ng(t).map(({from:r,to:i})=>Z.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Z.create(n),userEvent:"select"})),!0},Afe=({state:t,dispatch:e})=>{let n=cc(t.selection,r=>{let i=Ze(t),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&o.next)return Z.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Ur(t,n)),!0)};function UL(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let a=s;;){let l=t.moveVertically(a,e);if(l.head<o.from||l.head>o.to){i.some(c=>c.head==l.head)||i.push(l);break}else{if(l.head==a.head)break;a=l}}}return i.length==r.ranges.length?!1:(t.dispatch(Ur(n,Z.create(i,i.length-1))),!0)}const Ife=t=>UL(t,!1),Nfe=t=>UL(t,!0),jfe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Z.create([n.main]):n.main.empty||(r=Z.create([Z.cursor(n.main.head)])),r?(e(Ur(t,r)),!0):!1};function Gf(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(n="delete.backward",l=Jd(t,l,!1)):l>o&&(n="delete.forward",l=Jd(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=Jd(t,o,!1),a=Jd(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:Z.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?re.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Jd(t,e,n){if(t instanceof re)for(let r of t.state.facet(re.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const HL=(t,e,n)=>Gf(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),a,l;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,i-o.from))){if(a[a.length-1]==" ")return i-1;let c=Zr(a,s.tabSize),u=c%Ko(s)||Ko(s);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)i--;l=i}else l=Tt(o.text,i-o.from,e,e)+o.from,l==i&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,i-o.from))&&(l=Tt(o.text,l-o.from,!1,!1)+o.from);return l}),E0=t=>HL(t,!1,!0),GL=t=>HL(t,!0,!1),KL=(t,e)=>Gf(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Tt(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,l)-s.from,Math.max(r,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||r!=n.head)&&(a=u),r=l}return r}),JL=t=>KL(t,!1),Mfe=t=>KL(t,!0),Dfe=t=>Gf(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Lfe=t=>Gf(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),zfe=t=>Gf(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Bfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:De.of(["",""])},range:Z.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Vfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:Tt(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:Tt(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(o,i))},range:Z.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ng(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function e5(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of Ng(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)i.push(Z.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)i.push(Z.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Z.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Ffe=({state:t,dispatch:e})=>e5(t,e,!1),Xfe=({state:t,dispatch:e})=>e5(t,e,!0);function t5(t,e,n){if(t.readOnly)return!1;let r=[];for(let s of Ng(t))n?r.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):r.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let i=t.changes(r);return e(t.update({changes:i,selection:t.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Zfe=({state:t,dispatch:e})=>t5(t,e,!1),Wfe=({state:t,dispatch:e})=>t5(t,e,!0),qfe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Ng(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=cc(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Yfe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ze(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Oe.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const WE=n5(!1),Ufe=n5(!0);function n5(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!t&&s==o&&Yfe(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Rg(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=L1(c,s);for(u==null&&(u=Zr(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",uf(e,u)];return l&&f.push(uf(e,c.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:De.of(f)},range:Z.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function W1(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=t.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),o=a.to+1}let s=t.changes(i);return{changes:i,range:Z.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const Hfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Rg(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=W1(t,(s,o,a)=>{let l=L1(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=uf(t,l);(c!=u||a.from<s.from+c.length)&&(n[s.from]=l,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},q1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(W1(t,(n,r)=>{r.push({from:n.from,insert:t.facet(sc)})}),{userEvent:"input.indent"})),!0),Y1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(W1(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=Zr(i,t.tabSize),o=0,a=uf(t,Math.max(0,s-Ko(t)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),Gfe=t=>(t.setTabFocusMode(),!0),Kfe=[{key:"Ctrl-b",run:AL,shift:VL,preventDefault:!0},{key:"Ctrl-f",run:IL,shift:FL},{key:"Ctrl-p",run:ML,shift:WL},{key:"Ctrl-n",run:DL,shift:qL},{key:"Ctrl-a",run:Ofe,shift:Rfe},{key:"Ctrl-e",run:yfe,shift:_fe},{key:"Ctrl-d",run:GL},{key:"Ctrl-h",run:E0},{key:"Ctrl-k",run:Dfe},{key:"Ctrl-Alt-h",run:JL},{key:"Ctrl-o",run:Bfe},{key:"Ctrl-t",run:Vfe},{key:"Ctrl-v",run:T0}],Jfe=[{key:"ArrowLeft",run:AL,shift:VL,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:lfe,shift:bfe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:mfe,shift:Tfe,preventDefault:!0},{key:"ArrowRight",run:IL,shift:FL,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:cfe,shift:wfe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:gfe,shift:Efe,preventDefault:!0},{key:"ArrowUp",run:ML,shift:WL,preventDefault:!0},{mac:"Cmd-ArrowUp",run:VE,shift:XE},{mac:"Ctrl-ArrowUp",run:LE,shift:zE},{key:"ArrowDown",run:DL,shift:qL,preventDefault:!0},{mac:"Cmd-ArrowDown",run:FE,shift:ZE},{mac:"Ctrl-ArrowDown",run:T0,shift:BE},{key:"PageUp",run:LE,shift:zE},{key:"PageDown",run:T0,shift:BE},{key:"Home",run:pfe,shift:Pfe,preventDefault:!0},{key:"Mod-Home",run:VE,shift:XE},{key:"End",run:hfe,shift:Cfe,preventDefault:!0},{key:"Mod-End",run:FE,shift:ZE},{key:"Enter",run:WE,shift:WE},{key:"Mod-a",run:$fe},{key:"Backspace",run:E0,shift:E0,preventDefault:!0},{key:"Delete",run:GL,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:JL,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:Mfe,preventDefault:!0},{mac:"Mod-Backspace",run:Lfe,preventDefault:!0},{mac:"Mod-Delete",run:zfe,preventDefault:!0}].concat(Kfe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ede=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:ffe,shift:Sfe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:dfe,shift:kfe},{key:"Alt-ArrowUp",run:Ffe},{key:"Shift-Alt-ArrowUp",run:Zfe},{key:"Alt-ArrowDown",run:Xfe},{key:"Shift-Alt-ArrowDown",run:Wfe},{key:"Mod-Alt-ArrowUp",run:Ife},{key:"Mod-Alt-ArrowDown",run:Nfe},{key:"Escape",run:jfe},{key:"Mod-Enter",run:Ufe},{key:"Alt-l",mac:"Ctrl-l",run:Qfe},{key:"Mod-i",run:Afe,preventDefault:!0},{key:"Mod-[",run:Y1},{key:"Mod-]",run:q1},{key:"Mod-Alt-\\",run:Hfe},{key:"Shift-Mod-k",run:qfe},{key:"Shift-Mod-\\",run:xfe},{key:"Mod-/",run:Fue},{key:"Alt-A",run:Zue},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Gfe}].concat(Jfe),tde={key:"Tab",run:q1,shift:Y1},qE=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Il{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?a=>s(qE(a)):qE,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return pn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=g1(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=hi(e);let i=this.normalize(n);if(i.length)for(let s=0,o=r;;s++){let a=i.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(l)return this.value=l,this;break}o==r&&s<n.length&&n.charCodeAt(s)==a&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Il.prototype[Symbol.iterator]=function(){return this});const r5={from:-1,to:-1,match:/.*/.exec("")},U1="gm"+(/x/.unicode==null?"":"u");class i5{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=r5,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new s5(e,n,r,i,s);this.re=new RegExp(n,U1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=nm(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=nm(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const My=new WeakMap;class ol{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=My.get(e);if(!i||i.from>=r||i.to<=n){let a=new ol(n,e.sliceString(n,r));return My.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),My.set(e,new ol(o,s)),new ol(n,s.slice(n-o,r-o))}}class s5{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=r5,this.matchPos=nm(e,i),this.re=new RegExp(n,U1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=ol.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=nm(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ol.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(i5.prototype[Symbol.iterator]=s5.prototype[Symbol.iterator]=function(){return this});function nde(t){try{return new RegExp(t,U1),!0}catch{return!1}}function nm(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const rde=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:i}=Oce(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.dispatch({effects:r});return}let a=e.doc.lineAt(e.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let x=h/100;l&&(x=x*(l=="-"?-1:1)+a.number/e.doc.lines),h=Math.round(e.doc.lines*x)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let O=e.doc.line(Math.max(1,Math.min(e.doc.lines,h))),m=Z.cursor(O.from+Math.max(0,Math.min(d,O.length)));t.dispatch({effects:[r,re.scrollIntoView(m.from,{y:"center"})],selection:m})}),!0},ide={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sde=oe.define({combine(t){return _i(t,ide,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function ode(t){return[fde,ude]}const ade=he.mark({class:"cm-selectionMatch"}),lde=he.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function YE(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=it.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=it.Word)}function cde(t,e,n,r){return t(e.sliceDoc(n,n+1))==it.Word&&t(e.sliceDoc(r-1,r))==it.Word}const ude=dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(sde),{state:n}=t,r=n.selection;if(r.ranges.length>1)return he.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return he.none;let l=n.wordAt(i.head);if(!l)return he.none;o=n.charCategorizer(i.head),s=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return he.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(YE(o,n,i.from,i.to)&&cde(o,n,i.from,i.to)))return he.none}else if(s=n.sliceDoc(i.from,i.to),!s)return he.none}let a=[];for(let l of t.visibleRanges){let c=new Il(n.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||YE(o,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(lde.range(u,f)):(u>=i.to||f<=i.from)&&a.push(ade.range(u,f)),a.length>e.maxMatches))return he.none}}return he.set(a)}},{decorations:t=>t.decorations}),fde=re.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),dde=({state:t,dispatch:e})=>{let{selection:n}=t,r=Z.create(n.ranges.map(i=>t.wordAt(i.head)||Z.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function hde(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,a=new Il(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Il(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const pde=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return dde({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=hde(t,r);return i?(e(t.update({selection:t.selection.addRange(Z.range(i.from,i.to),!1),effects:re.scrollIntoView(i.to)})),!0):!1},uc=oe.define({combine(t){return _i(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Ede(e),scrollToMatch:e=>re.scrollIntoView(e)})}});class o5{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||nde(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
489
|
+
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new xde(this):new Ode(this)}getCursor(e,n=0,r){let i=e.doc?e:_e.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Ca(this,i,n,r):ka(this,i,n,r)}}class a5{constructor(e){this.spec=e}}function mde(t,e,n){return(r,i,s,o)=>{if(n&&!n(r,i,s,o))return!1;let a=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return t(a,e,r,i)}}function ka(t,e,n,r){let i;return t.wholeWord&&(i=gde(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=mde(t.test,e,i)),new Il(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:s=>s.toLowerCase(),i)}function gde(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(rm(i,n-s))!=it.Word||e(im(i,n-s))!=it.Word)&&(e(im(i,r-s))!=it.Word||e(rm(i,r-s))!=it.Word))}class Ode extends a5{constructor(e){super(e)}nextMatch(e,n,r){let i=ka(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);i=ka(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=ka(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=ka(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=ka(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function yde(t,e,n){return(r,i,s)=>(!n||n(r,i,s))&&t(s[0],e,r,i)}function Ca(t,e,n,r){let i;return t.wholeWord&&(i=vde(e.charCategorizer(e.selection.main.head))),t.test&&(i=yde(t.test,e,i)),new i5(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},n,r)}function rm(t,e){return t.slice(Tt(t,e,!1),e)}function im(t,e){return t.slice(e,Tt(t,e))}function vde(t){return(e,n,r)=>!r[0].length||(t(rm(r.input,r.index))!=it.Word||t(im(r.input,r.index))!=it.Word)&&(t(im(r.input,r.index+r[0].length))!=it.Word||t(rm(r.input,r.index+r[0].length))!=it.Word)}class xde extends a5{nextMatch(e,n,r){let i=Ca(this.spec,e,r,e.doc.length).next();return i.done&&(i=Ca(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Ca(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return n})}matchAll(e,n){let r=Ca(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Ca(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const df=ve.define(),H1=ve.define(),Ls=$t.define({create(t){return new Dy(R0(t).create(),null)},update(t,e){for(let n of e.effects)n.is(df)?t=new Dy(n.value.create(),t.panel):n.is(H1)&&(t=new Dy(t.query,n.value?G1:null));return t},provide:t=>af.from(t,e=>e.panel)});class Dy{constructor(e,n){this.query=e,this.panel=n}}const bde=he.mark({class:"cm-searchMatch"}),wde=he.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Sde=dt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ls))}update(t){let e=t.state.field(Ls);(e!=t.startState.field(Ls)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return he.none;let{view:n}=this,r=new es;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:a,to:l}=s[i];for(;i<o-1&&l>s[i+1].from-2*250;)l=s[++i].to;t.highlight(n.state,a,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?wde:bde)})}return r.finish()}},{decorations:t=>t.decorations});function Kf(t){return e=>{let n=e.state.field(Ls,!1);return n&&n.query.spec.valid?t(e,n):u5(e)}}const sm=Kf((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Z.single(r.from,r.to),s=t.state.facet(uc);return t.dispatch({selection:i,effects:[K1(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),c5(t),!0}),om=Kf((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=Z.single(i.from,i.to),o=t.state.facet(uc);return t.dispatch({selection:s,effects:[K1(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),c5(t),!0}),kde=Kf((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Z.create(n.map(r=>Z.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Cde=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let a=new Il(t.doc,t.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(Z.range(a.value.from,a.value.to))}return e(t.update({selection:Z.create(s,o),userEvent:"select.search.matches"})),!0},UE=Kf((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==r&&o.to==i&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(re.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=t.state.changes(a);return o&&(l=Z.single(o.from,o.to).map(f),u.push(K1(t,o)),u.push(n.facet(uc).scrollToMatch(l.main,t))),t.dispatch({changes:f,selection:l,effects:u,userEvent:"input.replace"}),!0}),Pde=Kf((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:re.announce.of(r),userEvent:"input.replace.all"}),!0});function G1(t){return t.state.facet(uc).createPanel(t)}function R0(t,e){var n,r,i,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(uc);return new o5({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function l5(t){let e=I1(t,G1);return e&&e.dom.querySelector("[main-field]")}function c5(t){let e=l5(t);e&&e==t.root.activeElement&&e.select()}const u5=t=>{let e=t.state.field(Ls,!1);if(e&&e.panel){let n=l5(t);if(n&&n!=t.root.activeElement){let r=R0(t.state,e.query.spec);r.valid&&t.dispatch({effects:df.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[H1.of(!0),e?df.of(R0(t.state,e.query.spec)):ve.appendConfig.of(_de)]});return!0},f5=t=>{let e=t.state.field(Ls,!1);if(!e||!e.panel)return!1;let n=I1(t,G1);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:H1.of(!1)}),!0},Tde=[{key:"Mod-f",run:u5,scope:"editor search-panel"},{key:"F3",run:sm,shift:om,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:sm,shift:om,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:f5,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Cde},{key:"Mod-Alt-g",run:rde},{key:"Mod-d",run:pde,preventDefault:!0}];class Ede{constructor(e){this.view=e;let n=this.query=e.state.field(Ls).query.spec;this.commit=this.commit.bind(this),this.searchField=Xe("input",{value:n.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Xe("input",{value:n.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Xe("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Xe("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Xe("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return Xe("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=Xe("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>sm(e),[$n(e,"next")]),r("prev",()=>om(e),[$n(e,"previous")]),r("select",()=>kde(e),[$n(e,"all")]),Xe("label",null,[this.caseField,$n(e,"match case")]),Xe("label",null,[this.reField,$n(e,"regexp")]),Xe("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[Xe("br"),this.replaceField,r("replace",()=>UE(e),[$n(e,"replace")]),r("replaceAll",()=>Pde(e),[$n(e,"replace all")])],Xe("button",{name:"close",onclick:()=>f5(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new o5({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:df.of(e)}))}keydown(e){Tle(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?om:sm)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),UE(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(df)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(uc).top}}function $n(t,e){return t.state.phrase(e)}const eh=30,th=/[\s\.,:;?!]/;function K1(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-eh),o=Math.min(i,n+eh),a=t.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<eh;l++)if(!th.test(a[l+1])&&th.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-eh;l--)if(!th.test(a[l-1])&&th.test(a[l])){a=a.slice(0,l);break}}return re.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const Rde=re.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),_de=[Ls,ss.low(Sde),Rde];class J1{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Ze(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(h5(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function HE(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function $de(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=HE(e)+HE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function d5(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:$de(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function Qde(t,e){return n=>{for(let r=Ze(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class GE{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Io(t){return t.selection.main.from}function h5(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const eS=Ri.define();function Ade(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:Z.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const KE=new WeakMap;function Ide(t){if(!Array.isArray(t))return t;let e=KE.get(t);return e||KE.set(t,e=d5(t)),e}const am=ve.define(),hf=ve.define();class Nde{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=pn(e,n),i=hi(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(pn(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let v=pn(e,0),b=hi(v),S=b==e.length?0:-100;if(v!=n[0])if(v==r[0])S+=-200;else return null;return this.ret(S,[0,b])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(a<0){for(let v=0,b=Math.min(e.length,200);v<b&&c<l;){let S=pn(e,v);(S==n[c]||S==r[c])&&(i[c++]=v),v+=hi(S)}if(c<l)return null}let u=0,f=0,d=!1,h=0,O=-1,m=-1,x=/[a-z]/.test(e),y=!0;for(let v=0,b=Math.min(e.length,200),S=0;v<b&&f<l;){let k=pn(e,v);a<0&&(u<l&&k==n[u]&&(s[u++]=v),h<l&&(k==n[h]||k==r[h]?(h==0&&(O=v),m=v+1,h++):h=0));let w,C=k<255?k>=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(w=g1(k))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!v||C==1&&x||S==0&&C!=0)&&(n[f]==k||r[f]==k&&(d=!0)?o[f++]=v:o.length&&(y=!1)),S=C,v+=hi(k)}return f==l&&o[0]==0&&y?this.result(-100+(d?-200:0),o,e):h==l&&O==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[O,m]):f==l?this.result(-100+(d?-200:0)+-700+(y?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let a=o+(this.astral?hi(pn(r,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-r.length,i)}}class jde{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Pt=oe.define({combine(t){return _i(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Mde,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>JE(e(r),n(r)),optionClass:(e,n)=>r=>JE(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function JE(t,e){return t?e?t+" "+e:t:e}function Mde(t,e,n,r,i,s){let o=t.textDirection==qe.RTL,a=o,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,O=r.right-r.left,m=r.bottom-r.top;if(a&&d<Math.min(O,h)?a=!1:!a&&h<Math.min(O,d)&&(a=!0),O<=(a?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-m))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let v=i.bottom-e.bottom;v>=m||v>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let x=(e.bottom-e.top)/s.offsetHeight,y=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/x}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function Dde(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;c<s.length;){let u=s[c++],f=s[c++];u>l&&o.appendChild(document.createTextNode(a.slice(l,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function Ly(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Lde{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,a=e.state.facet(Pt);this.optionContent=Dde(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Ly(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Pt).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:hf.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:a}=r.open;(!i.open||i.open.options!=s)&&(this.range=Ly(s.length,o,e.state.facet(Pt).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Ly(n.options.length,n.selected,this.view.state.facet(Pt).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>vn(this.view.state,a,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&Bde(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Pt).positionInfo(this.view,n,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:a,match:l}=e[o],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=s&&(o>r.from||r.from==0))if(s=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function zde(t,e){return n=>new Lde(n,t,e)}function Bde(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function e2(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Vde(t,e){let n=[],r=null,i=null,s=u=>{n.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(h=>h.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(Pt);for(let u of t)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)s(new GE(d,u.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,O=o.filterStrict?new jde(d):new Nde(d);for(let m of u.result.options)if(h=O.match(m.label)){let x=m.displayLabel?f?f(m,h.matched):[]:h.matched,y=h.score+(m.boost||0);if(s(new GE(m,u.source,x,y)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:v}=m.section;i||(i=Object.create(null)),i[v]=Math.max(y,i[v]||-1e9)}}}}if(r){let u=Object.create(null),f=0,d=(h,O)=>(h.rank==="dynamic"&&O.rank==="dynamic"?i[O.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof O.rank=="number"?O.rank:1e9)||(h.name<O.name?-1:1);for(let h of r.sort(d))f-=1e5,u[h.name]=f;for(let h of n){let{section:O}=h.completion;O&&(h.score+=u[typeof O=="string"?O:O.name])}}let a=[],l=null,c=o.compareCompletions;for(let u of n.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=u.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?a.push(u):e2(u.completion)>e2(l)&&(a[a.length-1]=u),l=u.completion}return a}class Va{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Va(this.options,t2(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let a=Vde(e,n);if(!a.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Pt).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==c){l=u;break}}return new Va(a,t2(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:Yde,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new Va(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Va(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class lm{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new lm(Wde,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Pt),s=(r.override||n.languageDataAt("autocomplete",Io(n)).map(Ide)).map(l=>(this.active.find(u=>u.source==l)||new fr(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(tS));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Fde(s,this.active)||a?o=Va.build(s,n,this.id,o,r,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new fr(l.source,0):l));for(let l of e.effects)l.is(m5)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new lm(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Xde:Zde}}function Fde(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const Xde={"aria-autocomplete":"list"},Zde={};function t2(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Wde=[];function p5(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(eS);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class fr{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=p5(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new fr(i.source,0)),r&4&&i.state==0&&(i=new fr(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(am))i=new fr(i.source,1,s.value);else if(s.is(hf))i=new fr(i.source,0);else if(s.is(tS))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Io(e.state))}}class al extends fr{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Io(e.state);if(a>o||!i||n&2&&(Io(e.startState)==this.from||a<this.limit))return new fr(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return qde(i.validFor,e.state,s,o)?new al(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new J1(e.state,a,!1)))?new al(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Io(e.state)):new fr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new al(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new fr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function qde(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):h5(t,!0).test(i)}const tS=ve.define({map(t,e){return t.map(n=>n.map(e))}}),m5=ve.define(),mn=$t.define({create(){return lm.start()},update(t,e){return t.update(e)},provide:t=>[A1.from(t,e=>e.tooltip),re.contentAttributes.from(t,e=>e.attrs)]});function nS(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(mn).active.find(i=>i.source==e.source);return r instanceof al?(typeof n=="string"?t.dispatch({...Ade(t.state,n,r.from,r.to),annotations:eS.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Yde=zde(mn,nS);function nh(t,e="option"){return n=>{let r=n.state.field(mn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Pt).interactionDelay)return!1;let i=1,s;e=="page"&&(s=VD(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:m5.of(a)}),!0}}const Ude=t=>{let e=t.state.field(mn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Pt).interactionDelay?!1:nS(t,e.open.options[e.open.selected])},zy=t=>t.state.field(mn,!1)?(t.dispatch({effects:am.of(!0)}),!0):!1,Hde=t=>{let e=t.state.field(mn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:hf.of(null)}),!0)};class Gde{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Kde=50,Jde=1e3,ehe=dt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(mn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(mn),n=t.state.facet(Pt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(mn)==e)return;let r=t.transactions.some(s=>{let o=p5(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>Kde&&Date.now()-o.time>Jde){for(let a of o.context.abortListeners)try{a()}catch(l){vn(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(am)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(mn);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Io(e),r=new J1(e,n,t.explicit,this.view),i=new Gde(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:hf.of(null)}),vn(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Pt),r=this.view.state.field(mn);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=Io(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),c=new al(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:a);for(let u of s.updates)c=c.update(u,n);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new fr(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:tS.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(mn,!1);if(e&&e.tooltip&&this.view.state.facet(Pt).closeOnBlur){let n=e.open&&VD(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:hf.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:am.of(!1)}),20),this.composing=0}}}),the=typeof navigator=="object"&&/Win/.test(navigator.platform),nhe=ss.highest(re.domEventHandlers({keydown(t,e){let n=e.state.field(mn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(the&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&nS(e,r),!1}})),g5=re.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class rhe{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class rS{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Nt.TrackDel),r=e.mapPos(this.to,1,Nt.TrackDel);return n==null||r==null?null:new rS(this.field,n,r)}}class iS{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(sc);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new rS(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(a!=null?n[f].seq==a:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(a==null||n[f].seq!=null&&n[f].seq<a);)f++;n.splice(f,0,{seq:a,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let d=s[2]?3+(s[1]||"").length:2;f.from-=d,f.to-=d}i.push(new rhe(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(o)}return new iS(r,i)}}let ihe=he.widget({widget:new class extends Yr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),she=he.mark({class:"cm-snippetField"});class fc{constructor(e,n){this.ranges=e,this.active=n,this.deco=he.set(e.map(r=>(r.from==r.to?ihe:she).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new fc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Jf=ve.define({map(t,e){return t&&t.map(e)}}),ohe=ve.define(),pf=$t.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Jf))return n.value;if(n.is(ohe)&&t)return new fc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>re.decorations.from(t,e=>e?e.deco:he.none)});function sS(t,e){return Z.create(t.filter(n=>n.field==e).map(n=>Z.range(n.from,n.to)))}function ahe(t){let e=iS.parse(t);return(n,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:De.of(o)},scrollIntoView:!0,annotations:r?[eS.of(r),Ot.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=sS(a,0)),a.some(u=>u.field>0)){let u=new fc(a,0),f=c.effects=[Jf.of(u)];n.state.field(pf,!1)===void 0&&f.push(ve.appendConfig.of([pf,dhe,hhe,g5]))}n.dispatch(n.state.update(c))}}function O5(t){return({state:e,dispatch:n})=>{let r=e.field(pf,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:sS(r.ranges,i),effects:Jf.of(s?null:new fc(r.ranges,i)),scrollIntoView:!0})),!0}}const lhe=({state:t,dispatch:e})=>t.field(pf,!1)?(e(t.update({effects:Jf.of(null)})),!0):!1,che=O5(1),uhe=O5(-1),fhe=[{key:"Tab",run:che,shift:uhe},{key:"Escape",run:lhe}],n2=oe.define({combine(t){return t.length?t[0]:fhe}}),dhe=ss.highest(da.compute([n2],t=>t.facet(n2)));function un(t,e){return{...e,apply:ahe(t)}}const hhe=re.domEventHandlers({mousedown(t,e){let n=e.state.field(pf,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:sS(n.ranges,i.field),effects:Jf.of(n.ranges.some(s=>s.field>i.field)?new fc(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),mf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},_o=ve.define({map(t,e){let n=e.mapPos(t,-1,Nt.TrackAfter);return n??void 0}}),oS=new class extends Zs{};oS.startSide=1;oS.endSide=-1;const y5=$t.define({create(){return $e.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(_o)&&(t=t.update({add:[oS.range(n.value,n.value+1)]}));return t}});function phe(){return[ghe,y5]}const By="()[]{}<>«»»«[]{}";function v5(t){for(let e=0;e<By.length;e+=2)if(By.charCodeAt(e)==t)return By.charAt(e+1);return g1(t<128?t:t+1)}function x5(t,e){return t.languageDataAt("closeBrackets",e)[0]||mf}const mhe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ghe=re.inputHandler.of((t,e,n,r)=>{if((mhe?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&hi(pn(r,0))==1||e!=i.from||n!=i.to)return!1;let s=vhe(t.state,r);return s?(t.dispatch(s),!0):!1}),Ohe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=x5(t,t.selection.main.head).brackets||mf.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let a=xhe(t.doc,o.head);for(let l of r)if(l==a&&jg(t.doc,o.head)==v5(pn(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:Z.cursor(o.head-l.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},yhe=[{key:"Backspace",run:Ohe}];function vhe(t,e){let n=x5(t,t.selection.main.head),r=n.brackets||mf.brackets;for(let i of r){let s=v5(pn(i,0));if(e==i)return s==i?She(t,i,r.indexOf(i+i+i)>-1,n):bhe(t,i,s,n.before||mf.before);if(e==s&&b5(t,t.selection.main.from))return whe(t,i,s)}return null}function b5(t,e){let n=!1;return t.field(y5).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function jg(t,e){let n=t.sliceString(e,e+2);return n.slice(0,hi(pn(n,0)))}function xhe(t,e){let n=t.sliceString(e-2,e);return hi(pn(n,0))==n.length?n:n.slice(1)}function bhe(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:_o.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let a=jg(t.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:_o.of(o.head+e.length),range:Z.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function whe(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&jg(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Z.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function She(t,e,n,r){let i=r.stringPrefixes||mf.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:_o.of(a.to+e.length),range:Z.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=jg(t.doc,l),u;if(c==e){if(r2(t,l))return{changes:{insert:e+e,from:l},effects:_o.of(l+e.length),range:Z.cursor(l+e.length)};if(b5(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:Z.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=i2(t,l-2*e.length,i))>-1&&r2(t,u))return{changes:{insert:e+e+e+e,from:l},effects:_o.of(l+e.length),range:Z.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=it.Word&&i2(t,l,i)>-1&&!khe(t,l,e,i))return{changes:{insert:e+e,from:l},effects:_o.of(l+e.length),range:Z.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function r2(t,e){let n=Ze(t).resolveInner(e+1);return n.parent&&n.from==e}function khe(t,e,n,r){let i=Ze(t).resolveInner(e,-1),s=r.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function i2(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=it.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=it.Word)return s}return-1}function Che(t={}){return[nhe,mn,Pt.of(t),ehe,Phe,g5]}const w5=[{key:"Ctrl-Space",run:zy},{mac:"Alt-`",run:zy},{mac:"Alt-i",run:zy},{key:"Escape",run:Hde},{key:"ArrowDown",run:nh(!0)},{key:"ArrowUp",run:nh(!1)},{key:"PageDown",run:nh(!0,"page")},{key:"PageUp",run:nh(!1,"page")},{key:"Enter",run:Ude}],Phe=ss.highest(da.computeN([Pt],t=>t.facet(Pt).defaultKeymap?[w5]:[]));class s2{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class So{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(gf).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((h,O)=>h.from-O.from||h.to-O.to),o=new es,a=[],l=0,c=r.doc.iter(),u=0,f=r.doc.length;for(let h=0;;){let O=h==s.length?null:s[h];if(!O&&!a.length)break;let m,x;if(a.length)m=l,x=a.reduce((b,S)=>Math.min(b,S.to),O&&O.from>m?O.from:1e8);else{if(m=O.from,m>f)break;x=O.to,a.push(O),h++}for(;h<s.length;){let b=s[h];if(b.from==m&&(b.to>b.from||b.to==m))a.push(b),h++,x=Math.min(b.to,x);else{x=Math.min(b.from,x);break}}x=Math.min(x,f);let y=!1;if(a.some(b=>b.from==m&&(b.to==x||x==f))&&(y=m==x,!y&&x-m<10)){let b=m-(u+c.value.length);b>0&&(c.next(b),u=m);for(let S=m;;){if(S>=x){y=!0;break}if(!c.lineBreak&&u+c.value.length>S)break;S=u+c.value.length,u+=c.value.length,c.next()}}let v=Lhe(a);if(y)o.add(m,m,he.widget({widget:new Nhe(v),diagnostics:a.slice()}));else{let b=a.reduce((S,k)=>k.markClass?S+" "+k.markClass:S,"");o.add(m,x,he.mark({class:"cm-lintRange cm-lintRange-"+v+b,diagnostics:a.slice(),inclusiveEnd:a.some(S=>S.to>x)}))}if(l=x,l==f)break;for(let b=0;b<a.length;b++)a[b].to<=l&&a.splice(b--,1)}let d=o.finish();return new So(d,n,Gs(d))}}function Gs(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new s2(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new s2(r.from,s,r.diagnostic)}}),r}function The(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(gf).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(S5))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function Ehe(t,e){return t.field(Xn,!1)?e:e.concat(ve.appendConfig.of(zhe))}const S5=ve.define(),aS=ve.define(),k5=ve.define(),Xn=$t.define({create(){return new So(he.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=Gs(n,t.selected.diagnostic,s)||Gs(n,null,s)}!n.size&&i&&e.state.facet(gf).autoPanel&&(i=null),t=new So(n,i,r)}for(let n of e.effects)if(n.is(S5)){let r=e.state.facet(gf).autoPanel?n.value.length?Of.open:null:t.panel;t=So.init(n.value,r,e.state)}else n.is(aS)?t=new So(t.diagnostics,n.value?Of.open:null,t.selected):n.is(k5)&&(t=new So(t.diagnostics,t.panel,n.value));return t},provide:t=>[af.from(t,e=>e.panel),re.decorations.from(t,e=>e.diagnostics)]}),Rhe=he.mark({class:"cm-lintRange cm-lintRange-active"});function _he(t,e,n){let{diagnostics:r}=t.state.field(Xn),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0)))return i=u.diagnostics,s=l,o=c,!1});let a=t.state.facet(gf).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:$he(t,i)}}}:null}function $he(t,e){return Xe("ul",{class:"cm-tooltip-lint"},e.map(n=>P5(t,n,!1)))}const Qhe=t=>{let e=t.state.field(Xn,!1);(!e||!e.panel)&&t.dispatch({effects:Ehe(t.state,[aS.of(!0)])});let n=I1(t,Of.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},o2=t=>{let e=t.state.field(Xn,!1);return!e||!e.panel?!1:(t.dispatch({effects:aS.of(!1)}),!0)},Ahe=t=>{let e=t.state.field(Xn,!1);if(!e)return!1;let n=t.state.selection.main,r=Gs(e.diagnostics,null,n.to+1);return!r&&(r=Gs(e.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Ihe=[{key:"Mod-Shift-m",run:Qhe,preventDefault:!0},{key:"F8",run:Ahe}],gf=oe.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),..._i(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:a2,tooltipFilter:a2,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function a2(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function C5(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function P5(t,e,n){var r;let i=n?C5(e.actions):[];return Xe("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Xe("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let O=Gs(t.state.field(Xn).diagnostics,e);O&&s.apply(t,O.from,O.to)},{name:c}=s,u=i[o]?c.indexOf(i[o]):-1,f=u<0?c:[c.slice(0,u),Xe("u",c.slice(u,u+1)),c.slice(u+1)],d=s.markClass?" "+s.markClass:"";return Xe("button",{type:"button",class:"cm-diagnosticAction"+d,onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&Xe("div",{class:"cm-diagnosticSource"},e.source))}class Nhe extends Yr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Xe("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class l2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=P5(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Of{constructor(e){this.view=e,this.items=[];let n=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)o2(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=C5(s.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=Gs(this.view.state.field(Xn).diagnostics,s);l&&s.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=Xe("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Xe("div",{class:"cm-panel-lint"},this.list,Xe("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>o2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Xn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Xn),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,l,{spec:c})=>{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==u){f=h;break}f<0?(d=new l2(this.view,u),this.items.splice(r,0,d),i=!0):(d=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),s=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new l2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let c=l.height/this.list.offsetHeight;a.top<l.top?this.list.scrollTop-=(l.top-a.top)/c:a.bottom>l.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Xn),r=Gs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:k5.of(r)})}static open(e){return new Of(e)}}function jhe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function rh(t){return jhe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Mhe=re.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:rh("#d11")},".cm-lintRange-warning":{backgroundImage:rh("orange")},".cm-lintRange-info":{backgroundImage:rh("#999")},".cm-lintRange-hint":{backgroundImage:rh("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Dhe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Lhe(t){let e="hint",n=1;for(let r of t){let i=Dhe(r.severity);i>n&&(n=i,e=r.severity)}return e}const zhe=[Xn,re.decorations.compute([Xn],t=>{let{selected:e,panel:n}=t.field(Xn);return!e||!n||e.from==e.to?he.none:he.set([Rhe.range(e.from,e.to)])}),mce(_he,{hideOn:The}),Mhe];var c2=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(yhe)),e.defaultKeymap!==!1&&(r=r.concat(ede)),e.searchKeymap!==!1&&(r=r.concat(Tde)),e.historyKeymap!==!1&&(r=r.concat(afe)),e.foldKeymap!==!1&&(r=r.concat(vue)),e.completionKeymap!==!1&&(r=r.concat(w5)),e.lintKeymap!==!1&&(r=r.concat(Ihe));var i=[];return e.lineNumbers!==!1&&i.push(Ece()),e.highlightActiveLineGutter!==!1&&i.push($ce()),e.highlightSpecialChars!==!1&&i.push(Xle()),e.history!==!1&&i.push(Kue()),e.foldGutter!==!1&&i.push(Sue()),e.drawSelection!==!1&&i.push(Ale()),e.dropCursor!==!1&&i.push(Dle()),e.allowMultipleSelections!==!1&&i.push(_e.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(fue()),e.syntaxHighlighting!==!1&&i.push($g(mL,{fallback:!0})),e.bracketMatching!==!1&&i.push(Aue()),e.closeBrackets!==!1&&i.push(phe()),e.autocompletion!==!1&&i.push(Che()),e.rectangularSelection!==!1&&i.push(ice()),n!==!1&&i.push(ace()),e.highlightActiveLine!==!1&&i.push(Hle()),e.highlightSelectionMatches!==!1&&i.push(ode()),e.tabSize&&typeof e.tabSize=="number"&&i.push(sc.of(" ".repeat(e.tabSize))),i.concat([da.of(r.flat())]).filter(Boolean)};const Bhe="#e5c07b",u2="#e06c75",Vhe="#56b6c2",Fhe="#ffffff",Vh="#abb2bf",_0="#7d8799",Xhe="#61afef",Zhe="#98c379",f2="#d19a66",Whe="#c678dd",qhe="#21252b",d2="#2c313a",h2="#282c34",Vy="#353a42",Yhe="#3E4451",p2="#528bff",Uhe=re.theme({"&":{color:Vh,backgroundColor:h2},".cm-content":{caretColor:p2},".cm-cursor, .cm-dropCursor":{borderLeftColor:p2},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Yhe},".cm-panels":{backgroundColor:qhe,color:Vh},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:h2,color:_0,border:"none"},".cm-activeLineGutter":{backgroundColor:d2},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Vy},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Vy,borderBottomColor:Vy},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:d2,color:Vh}}},{dark:!0}),Hhe=lc.define([{tag:T.keyword,color:Whe},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:u2},{tag:[T.function(T.variableName),T.labelName],color:Xhe},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:f2},{tag:[T.definition(T.name),T.separator],color:Vh},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:Bhe},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:Vhe},{tag:[T.meta,T.comment],color:_0},{tag:T.strong,fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.link,color:_0,textDecoration:"underline"},{tag:T.heading,fontWeight:"bold",color:u2},{tag:[T.atom,T.bool,T.special(T.variableName)],color:f2},{tag:[T.processingInstruction,T.string,T.inserted],color:Zhe},{tag:T.invalid,color:Fhe}]),lS=[Uhe,$g(Hhe)];var Ghe=re.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Khe=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:s="light",placeholder:o="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift(da.of([tde])),a&&(typeof a=="boolean"?l.unshift(c2()):l.unshift(c2(a))),o&&l.unshift(ece(o)),s){case"light":l.push(Ghe);break;case"dark":l.push(lS);break;case"none":break;default:l.push(s);break}return r===!1&&l.push(re.editable.of(!1)),i&&l.push(_e.readOnly.of(!0)),[...l]},Jhe=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class epe{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class m2{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Fy=null,tpe=()=>typeof window>"u"?new m2:(Fy||(Fy=new m2),Fy),g2=Ri.define(),npe=200,rpe=[];function ipe(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:s,onUpdate:o,extensions:a=rpe,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:O=null,maxWidth:m=null,placeholder:x="",editable:y=!0,readOnly:v=!1,indentWithTab:b=!0,basicSetup:S=!0,root:k,initialState:w}=t,[C,_]=g.useState(),[I,E]=g.useState(),[N,Q]=g.useState(),L=g.useState(()=>({current:null}))[0],z=g.useState(()=>({current:null}))[0],X=re.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:O,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),W=re.updateListener.of(A=>{if(A.docChanged&&typeof r=="function"&&!A.transactions.some($=>$.annotation(g2))){L.current?L.current.reset():(L.current=new epe(()=>{if(z.current){var $=z.current;z.current=null,$()}L.current=null},npe),tpe().add(L.current));var P=A.state.doc,M=P.toString();r(M,A)}i&&i(Jhe(A))}),F=Khe({theme:c,editable:y,readOnly:v,placeholder:x,indentWithTab:b,basicSetup:S}),j=[W,X,...F];return o&&typeof o=="function"&&j.push(re.updateListener.of(o)),j=j.concat(a),g.useLayoutEffect(()=>{if(C&&!N){var A={doc:e,selection:n,extensions:j},P=w?_e.fromJSON(w.json,A,w.fields):_e.create(A);if(Q(P),!I){var M=new re({state:P,parent:C,root:k});E(M),s&&s(M,P)}}return()=>{I&&(Q(void 0),E(void 0))}},[C,N]),g.useEffect(()=>{t.container&&_(t.container)},[t.container]),g.useEffect(()=>()=>{I&&(I.destroy(),E(void 0)),L.current&&(L.current.cancel(),L.current=null)},[I]),g.useEffect(()=>{l&&I&&I.focus()},[l,I]),g.useEffect(()=>{I&&I.dispatch({effects:ve.reconfigure.of(j)})},[c,a,u,f,d,h,O,m,x,y,v,b,S,r,o]),g.useEffect(()=>{if(e!==void 0){var A=I?I.state.doc.toString():"";if(I&&e!==A){var P=L.current&&!L.current.isDone,M=()=>{I&&e!==I.state.doc.toString()&&I.dispatch({changes:{from:0,to:I.state.doc.toString().length,insert:e||""},annotations:[g2.of(!0)]})};P?z.current=M:M()}}},[e,I]),{state:N,setState:Q,view:I,setView:E,container:C,setContainer:_}}var spe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],cS=g.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:s=[],onChange:o,onStatistics:a,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:O,width:m,minWidth:x,maxWidth:y,basicSetup:v,placeholder:b,indentWithTab:S,editable:k,readOnly:w,root:C,initialState:_}=t,I=Dq(t,spe),E=g.useRef(null),{state:N,view:Q,container:L,setContainer:z}=ipe({root:C,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:O,width:m,minWidth:x,maxWidth:y,basicSetup:v,placeholder:b,indentWithTab:S,editable:k,readOnly:w,selection:i,onChange:o,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:s,initialState:_});g.useImperativeHandle(e,()=>({editor:E.current,state:N,view:Q}),[E,L,N,Q]);var X=g.useCallback(F=>{E.current=F,z(F)},[z]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var W=typeof f=="string"?"cm-theme-"+f:"cm-theme";return p.jsx("div",Cl({ref:X,className:""+W+(n?" "+n:"")},I))});cS.displayName="CodeMirror";class cm{static create(e,n,r,i,s){let o=i+(i<<8)+e+(n<<4)|0;return new cm(e,n,r,o,s,[],[])}constructor(e,n,r,i,s,o,a){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=a,this.hashProp=[[Oe.contextHash,i]]}addChild(e,n){e.prop(Oe.contextHash)!=this.hash&&(e=new Te(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new Te(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,s,o)=>new Te(vt.none,i,s,o,this.hashProp)})}}var J;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(J||(J={}));class ope{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class ape{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return yu(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function O2(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==J.OrderedList?dS:fS)(n,e,!1);return r>0&&(t.type!=J.BulletList||uS(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const T5={[J.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(je(J.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(wr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[J.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[J.OrderedList]:O2,[J.BulletList]:O2,[J.Document](){return!0}};function wr(t){return t==32||t==9||t==10||t==13}function yu(t,e=0){for(;e<t.length&&wr(t.charCodeAt(e));)e++;return e}function y2(t,e,n){for(;e>n&&wr(t.charCodeAt(e-1));)e--;return e}function E5(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function R5(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function uS(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)r++;else if(!wr(s))return-1}return n&&t.next==45&&Q5(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(j5.SetextHeading)>-1||r<3?-1:1}function _5(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function fS(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||wr(t.text.charCodeAt(t.pos+1)))&&(!n||_5(e,J.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function dS(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!wr(t.text.charCodeAt(r+1))||n&&!_5(e,J.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function $5(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function Q5(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&wr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const $0=/^[ \t]*$/,A5=/-->/,I5=/\?>/,Q0=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,A5],[/^\s*<\?/,I5],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,$0],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,$0]];function N5(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,s=Q0.length-(n?1:0);i<s;i++)if(Q0[i][0].test(r))return i;return-1}function v2(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function ms(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==J.CodeText?t[r].to=n:t.push(je(J.CodeText,e,n))}const ih={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,s=t.lineStart+e.text.length,o=[],a=[];for(ms(o,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){ms(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<n)break;{if(a.length){for(let c of a)c.type==J.CodeText?ms(o,c.from,c.to):o.push(c);a=[]}ms(o,t.lineStart-1,t.lineStart);for(let c of e.markers)o.push(c);s=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<s&&ms(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=J.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-i).finish(J.CodeBlock,s-i),i),!0},FencedCode(t,e){let n=E5(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,s=n-e.pos,o=e.skipSpace(n),a=y2(e.text,e.text.length,o),l=[je(J.CodeMark,r,r+s)];o<a&&l.push(je(J.CodeInfo,t.lineStart+o,t.lineStart+a));for(let c=!0,u=!0,f=!1;t.nextLine()&&e.depth>=t.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=s&&e.skipSpace(d)==e.text.length){for(let h of e.markers)l.push(h);u&&f&&ms(l,t.lineStart-1,t.lineStart),l.push(je(J.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{f=!0,c||(ms(l,t.lineStart-1,t.lineStart),u=!1);for(let m of e.markers)l.push(m);let h=t.lineStart+e.basePos,O=t.lineStart+e.text.length;h<O&&(ms(l,h,O),u=!1)}}return t.addNode(t.buffer.writeElements(l,-r).finish(J.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=R5(e);return n<0?!1:(t.startContext(J.Blockquote,e.pos),t.addNode(J.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(uS(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(J.HorizontalRule,n),!0},BulletList(t,e){let n=fS(e,t,!1);if(n<0)return!1;t.block.type!=J.BulletList&&t.startContext(J.BulletList,e.basePos,e.next);let r=v2(e,e.pos+1);return t.startContext(J.ListItem,e.basePos,r-e.baseIndent),t.addNode(J.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=dS(e,t,!1);if(n<0)return!1;t.block.type!=J.OrderedList&&t.startContext(J.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=v2(e,e.pos+n);return t.startContext(J.ListItem,e.basePos,r-e.baseIndent),t.addNode(J.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=$5(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,s=y2(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!wr(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(J.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,o),i+n+1),-i);o<e.text.length&&a.write(J.HeaderMark,o-r,s-r);let l=a.finish(J.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let n=N5(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=Q0[n][1],s=[],o=i!=$0;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&t.nextLine();let a=i==A5?J.CommentBlock:i==I5?J.ProcessingInstructionBlock:J.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class lpe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
|
|
490
|
+
`+n.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&yu(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,je(J.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Z5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(je(J.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(F5(e,yu(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=yu(e,this.pos),r=0;if(n>this.pos){let i=X5(e,n,this.start);if(i){let s=Xy(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Xy(e,this.pos)),r>0&&r<e.length?r:-1}else return Xy(e,this.pos)}}}function Xy(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!wr(n))return-1}return e}class cpe{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:Q5(n),s=n.next;if(i<0)return!1;let o=je(J.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,je(s==61?J.SetextHeading1:J.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const j5={LinkReference(t,e){return e.content.charCodeAt(0)==91?new lpe(e):null},SetextHeading(){return new cpe}},upe=[(t,e)=>$5(e)>=0,(t,e)=>E5(e)>=0,(t,e)=>R5(e)>=0,(t,e)=>fS(e,t,!0)>=0,(t,e)=>dS(e,t,!0)>=0,(t,e)=>uS(e,t,!0)>=0,(t,e)=>N5(e,t,!0)>=0],fpe={text:"",end:0};class dpe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new ape,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=cm.create(J.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new mpe(r,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let n=new ope(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
|
|
491
|
+
`+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=W5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=fpe;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+o,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+J[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
|
|
492
|
+
`?"":n;else{let i=n.indexOf(`
|
|
493
|
+
`);r=i<0?n:n.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,r=0){this.block=cm.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new Te(this.parser.nodeSet.types[e],Nl,Nl,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(I0(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?M5(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=I0(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(J.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?je(this.parser.getNodeType(e),n,r,i):new z5(e,n)}get buffer(){return new L5(this.parser.nodeSet)}}function M5(t,e,n,r,i){let s=t[e].to,o=[],a=[],l=n.from+r;function c(u,f){for(;f?u>=s:u>s;){let d=t[e+1].from-s;r+=d,u+=d,e++,s=t[e].to}}for(let u=n.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,d,h=i.get(u.tree);h?d=h:u.to+r>s?(d=M5(t,e,u,r,i),c(u.to+r,!1)):d=u.toTree(),o.push(d),a.push(f-l)}return c(n.to+r,!1),new Te(n.type,o,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}class Mg extends Tg{constructor(e,n,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,n,r){let i=new dpe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=A0(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(Nc(n.defineNodes)){i=Object.assign({},i);let d=r.types.slice(),h;for(let O of n.defineNodes){let{name:m,block:x,composite:y,style:v}=typeof O=="string"?{name:O}:O;if(d.some(k=>k.name==m))continue;y&&(i[d.length]=(k,w,C)=>y(w,C,k.value));let b=d.length,S=y?["Block","BlockContext"]:x?b>=J.ATXHeading1&&b<=J.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(vt.define({id:b,name:m,props:S&&[[Oe.group,S]]})),v&&(h||(h={}),Array.isArray(v)||v instanceof Ln?h[m]=v:Object.assign(h,v))}r=new rc(d),h&&(r=r.extend(ic(h)))}if(Nc(n.props)&&(r=r.extend(...n.props)),Nc(n.remove))for(let d of n.remove){let h=this.blockNames.indexOf(d),O=this.inlineNames.indexOf(d);h>-1&&(s[h]=o[h]=void 0),O>-1&&(l[O]=void 0)}if(Nc(n.parseBlock))for(let d of n.parseBlock){let h=a.indexOf(d.name);if(h>-1)s[h]=d.parse,o[h]=d.leaf;else{let O=d.before?sh(a,d.before):d.after?sh(a,d.after)+1:a.length-1;s.splice(O,0,d.parse),o.splice(O,0,d.leaf),a.splice(O,0,d.name)}d.endLeaf&&u.push(d.endLeaf)}if(Nc(n.parseInline))for(let d of n.parseInline){let h=c.indexOf(d.name);if(h>-1)l[h]=d.parse;else{let O=d.before?sh(c,d.before):d.after?sh(c,d.after)+1:c.length-1;l.splice(O,0,d.parse),c.splice(O,0,d.name)}}return n.wrap&&(f=f.concat(n.wrap)),new Mg(r,s,o,a,u,i,l,c,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new hS(this,e,n);e:for(let i=n;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let a=o(r,s,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}}function Nc(t){return t!=null&&t.length>0}function A0(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=A0(t[0]);if(t.length==1)return e;let n=A0(t.slice(1));if(!n||!e)return e||n;let r=(o,a)=>(o||Nl).concat(a||Nl),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function sh(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let D5=[vt.none];for(let t=1,e;e=J[t];t++)D5[t]=vt.define({id:t,name:e,props:t>=J.Escape?[]:[[Oe.group,t in T5?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Nl=[];class L5{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return Te.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let yf=class{constructor(e,n,r,i=Nl){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new L5(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class z5{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Nl}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function je(t,e,n,r){return new yf(t,e,n,r)}const B5={resolve:"Emphasis",mark:"EmphasisMark"},V5={resolve:"Emphasis",mark:"EmphasisMark"},ko={},um={};class Mn{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const x2="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let vf=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{vf=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Zy={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<x2.length;i++)if(x2.charCodeAt(i)==r)return t.append(je(J.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(je(J.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(je(J.InlineCode,n,r+1,[je(J.CodeMark,n,n+i),je(J.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return t.append(je(J.Autolink,n,n+1+i[0].length,[je(J.LinkMark,n,n+1),je(J.URL,n+1,n+i[0].length),je(J.LinkMark,n+i[0].length,n+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(je(J.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(je(J.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return a?t.append(je(J.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=vf.test(i),a=vf.test(s),l=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!a||l||o),f=!l&&(!o||c||a),d=u&&(e==42||!f||o),h=f&&(e==42||!u||a);return t.append(new Mn(e==95?B5:V5,n,r,(d?1:0)|(h?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(je(J.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(je(J.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Mn(ko,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Mn(um,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof Mn&&(i.type==ko||i.type==um)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=hpe(t,s,i.type==ko?J.Link:J.Image,i.from,n+1);if(i.type==ko)for(let a=0;a<r;a++){let l=t.parts[a];l instanceof Mn&&l.type==ko&&(l.side=0)}return o.to}}return-1}};function hpe(t,e,n,r,i){let{text:s}=t,o=t.char(i),a=i;if(e.unshift(je(J.LinkMark,r,r+(n==J.Image?2:1))),e.push(je(J.LinkMark,i-1,i)),o==40){let l=t.skipSpace(i+1),c=F5(s,l-t.offset,t.offset),u;c&&(l=t.skipSpace(c.to),l!=c.to&&(u=X5(s,l-t.offset,t.offset),u&&(l=t.skipSpace(u.to)))),t.char(l)==41&&(e.push(je(J.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(je(J.LinkMark,l,a)))}else if(o==91){let l=Z5(s,i-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return je(n,r,a,e)}function F5(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return je(J.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(wr(a))break;if(o)o=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(o=!0)}return s>e?je(J.URL,e+n,s+n):s==t.length?null:!1}}function X5(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(o)o=!1;else{if(a==i)return je(J.LinkTitle,e+n,s+1+n);a==92&&(o=!0)}}return null}function Z5(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let a=t.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:je(J.LinkLabel,e+n,s+1+n);if(r&&!wr(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class hS{constructor(e,n,r){this.parser=e,this.text=n,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new Mn(e,n,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Mn&&(n.type==ko||n.type==um))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Mn&&i.type.resolve&&i.side&2))continue;let s=i.type==B5||i.type==V5,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let m=this.parts[l];if(m instanceof Mn&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.to-m.from+o)%3==0&&((m.to-m.from)%3||o%3))){a=m;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,d=i.to;if(s){let m=Math.min(2,a.to-a.from,o);f=a.to-m,d=i.from+m,c=m==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let m=l+1;m<r;m++)this.parts[m]instanceof yf&&u.push(this.parts[m]),this.parts[m]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,d));let h=this.elt(c,f,d,u);this.parts[l]=s&&a.from!=f?new Mn(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=d?new Mn(i.type,d,i.to,i.side):null)?this.parts.splice(r,0,h):this.parts[r]=h}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof yf&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof Mn&&r.type==e&&r.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Mn?n:null}skipSpace(e){return yu(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?je(this.parser.getNodeType(e),n,r,i):new z5(e,n)}}hS.linkStart=ko;hS.imageStart=um;function I0(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof yf&&(n[r]=new yf(s.type,s.from,s.to,I0(s.children,[i])))}else n.splice(r++,0,i)}return n}const ppe=[J.CodeBlock,J.ListItem,J.OrderedList,J.BulletList];let mpe=class{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
|
|
494
|
+
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Oe.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,c=a;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let u=W5(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,u);else{let f=new Te(e.parser.nodeSet.types[J.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,u)}if(n.type.is("Block")&&(ppe.indexOf(n.type.id)<0?(o=n.to-r,a=e.block.children.length):(o=l,a=c),l=n.to-r,c=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function W5(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const gpe=ic({"Blockquote/...":T.quote,HorizontalRule:T.contentSeparator,"ATXHeading1/... SetextHeading1/...":T.heading1,"ATXHeading2/... SetextHeading2/...":T.heading2,"ATXHeading3/...":T.heading3,"ATXHeading4/...":T.heading4,"ATXHeading5/...":T.heading5,"ATXHeading6/...":T.heading6,"Comment CommentBlock":T.comment,Escape:T.escape,Entity:T.character,"Emphasis/...":T.emphasis,"StrongEmphasis/...":T.strong,"Link/... Image/...":T.link,"OrderedList/... BulletList/...":T.list,"BlockQuote/...":T.quote,"InlineCode CodeText":T.monospace,"URL Autolink":T.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":T.processingInstruction,"CodeInfo LinkLabel":T.labelName,LinkTitle:T.string,Paragraph:T.content}),Ope=new Mg(new rc(D5).extend(gpe),Object.keys(ih).map(t=>ih[t]),Object.keys(ih).map(t=>j5[t]),Object.keys(ih),upe,T5,Object.keys(Zy).map(t=>Zy[t]),Object.keys(Zy),[]);function ype(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function vpe(t){let{codeParser:e,htmlParser:n}=t;return{wrap:JD((i,s)=>{let o=i.type.id;if(e&&(o==J.CodeBlock||o==J.FencedCode)){let a="";if(o==J.FencedCode){let c=i.node.getChild(J.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==J.CodeText,bracketed:o==J.FencedCode}}else if(n&&(o==J.HTMLBlock||o==J.HTMLTag||o==J.CommentBlock))return{parser:n,overlay:ype(i.node,i.from,i.to)};return null})}}const xpe={resolve:"Strikethrough",mark:"StrikethroughMark"},bpe={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":T.strikethrough}},{name:"StrikethroughMark",style:T.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=vf.test(r),l=vf.test(i);return t.addDelimiter(xpe,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function vu(t,e,n=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(t.elt("TableCell",i+a,i+l,t.parser.parseInline(e.slice(a,l),i+a)))};for(let f=n;f<e.length;f++){let d=e.charCodeAt(f);d==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||d!=32&&d!=9)&&(a<0&&(a=f),l=f+1),c=!c&&d==92}return a>-1&&(s++,r&&u()),s}function b2(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const q5=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class w2{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&q5.test(i=n.text.slice(n.pos))){let s=[];vu(e,r.content,0,s,r.start)==vu(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];vu(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const wpe={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":T.heading}},"TableRow",{name:"TableCell",style:T.content},{name:"TableDelimiter",style:T.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return b2(e.content,0)?new w2:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof w2)||!b2(e.text,e.basePos))return!1;let r=t.peekLine();return q5.test(r)&&vu(t,e.text,e.basePos)==vu(t,r,e.basePos)},before:"SetextHeading"}]};class Spe{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const kpe={defineNodes:[{name:"Task",block:!0,style:T.list},{name:"TaskMarker",style:T.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Spe:null},after:"SetextHeading"}]},S2=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,k2=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Cpe=/[\w-]+\.[\w-]+($|\/)/,C2=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,P2=/\/[a-zA-Z\d@.]+/gy;function T2(t,e,n,r){let i=0;for(let s=e;s<n;s++)t[s]==r&&i++;return i}function Ppe(t,e){k2.lastIndex=e;let n=k2.exec(t);if(!n||Cpe.exec(n[0])[0].indexOf("_")>-1)return-1;let r=e+n[0].length;for(;;){let i=t[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&T2(t,e,r,")")>T2(t,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,r))))r=e+s.index;else break}return r}function E2(t,e){C2.lastIndex=e;let n=C2.exec(t);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:e+n[0].length-(r=="."?1:0)}const Tpe={parseInline:[{name:"Autolink",parse(t,e,n){let r=n-t.offset;if(r&&/\w/.test(t.text[r-1]))return-1;S2.lastIndex=r;let i=S2.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=Ppe(t.text,r+i[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(r,s));s=r+o[0].length}}else i[3]?s=E2(t.text,r):(s=E2(t.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(P2.lastIndex=s,i=P2.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},Epe=[wpe,kpe,bpe,Tpe];function Y5(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==t)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(n,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),wr(l))break}return-1}}const Rpe={defineNodes:[{name:"Superscript",style:T.special(T.content)},{name:"SuperscriptMark",style:T.processingInstruction}],parseInline:[{name:"Superscript",parse:Y5(94,"Superscript","SuperscriptMark")}]},_pe={defineNodes:[{name:"Subscript",style:T.special(T.content)},{name:"SubscriptMark",style:T.processingInstruction}],parseInline:[{name:"Subscript",parse:Y5(126,"Subscript","SubscriptMark")}]},$pe={defineNodes:[{name:"Emoji",style:T.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]};var R2={};class fm{constructor(e,n,r,i,s,o,a,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new fm(e,[],n,r,r,0,[],0,i?new _2(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let s=e,{parser:o}=this.p;this.pos=i;let a=o.stateFlag(s,1);!a&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,a?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new fm(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Qpe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((a,l)=>l&1&&a==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new _2(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class _2{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Qpe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class dm{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new dm(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new dm(this.stack,this.pos,this.index)}}function Uc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Fh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const $2=new Fh;class Ape{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=$2,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=$2,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ll{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;U5(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ll.prototype.contextual=ll.prototype.fallback=ll.prototype.extend=!1;class hm{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Uc(e):e}token(e,n){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(U5(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}hm.prototype.contextual=ll.prototype.fallback=ll.prototype.extend=!1;class Jn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function U5(t,e,n,r,i,s){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;a&t[o];){let c=t[o+1];for(let h=o+3;h<c;h+=2)if((t[h+1]&a)>0){let O=t[h];if(l.allows(O)&&(e.token.value==-1||e.token.value==O||Ipe(O,e.token.value,i,s))){e.acceptToken(O);break}}let u=e.next,f=0,d=t[o+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){o=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,O=c+h+(h<<1),m=t[O],x=t[O+1]||65536;if(u<m)d=h;else if(u>=x)f=h+1;else{o=t[O+2],e.advance();continue e}}break}}function Q2(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Ipe(t,e,n,r){let i=Q2(n,r,e);return i<0||Q2(n,r,t)<i}const Qn=typeof process<"u"&&R2&&/\bparse\b/.test(R2.LOG);let Wy=null;function A2(t,e,n){let r=t.cursor(Be.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Npe{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?A2(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?A2(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Te){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(Oe.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class jpe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Fh)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<s.length;c++){if(!(1<<c&o))continue;let u=s[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new Fh,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Fh,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(s,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Li(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Li(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Li(a,c+1),n,r,i))}return i}}class Mpe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Ape(n,i),this.tokens=new jpe(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[fm.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new Npe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&Lpe(i);if(o)return Qn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Qn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return Qn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,a)=>a.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=Qn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Oe.contextHash)||0)==u))return e.useNode(f,d),Qn&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof Te)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof Te&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),Qn&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,O=h?e:e.split(),m=this.tokens.mainToken;if(O.apply(u,f,m?m.start:O.pos,d),Qn&&console.log(o+this.stackID(O)+` (via ${u&65536?`reduce of ${s.getName(u&65535)}`:"shift"} for ${s.getName(f)} @ ${i}${O==e?"":", split"})`),h)return!0;O.pos>i?n.push(O):r.push(O)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return I2(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],c=n[(o<<1)+1],u=Qn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),Qn&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;h<10&&f.forceReduce()&&(Qn&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)Qn&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))Qn&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Qn&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),I2(a,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),Te.build({buffer:dm.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Wy||(Wy=new WeakMap)).get(e);return n||Wy.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function I2(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Dpe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const qy=t=>t;class H5{constructor(e){this.start=e.start,this.shift=e.shift||qy,this.reduce=e.reduce||qy,this.reuse=e.reuse||qy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class jl extends Tg{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function s(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Oe[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)s(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,f);c++}}}this.nodeSet=new rc(n.map((a,l)=>vt.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=YD;let o=Uc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(N2),this.states=Uc(e.states,Uint32Array),this.data=Uc(e.stateData),this.goto=Uc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ll(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Mpe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Li(r,s+2)];else{if(r[s+1]==2)return Li(r,s+2);break}if(o==n||o==0)return Li(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Li(this.data,s+2);else break;i=n(Li(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Li(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(jl.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=N2(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new Dpe(e,r,i)}static deserialize(e){return new jl(e)}}function Li(t,e){return t[e]|t[e+1]<<16}function Lpe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function N2(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const zpe=55,Bpe=1,Vpe=56,Fpe=2,Xpe=57,Zpe=3,j2=4,Wpe=5,pS=6,G5=7,K5=8,J5=9,e3=10,qpe=11,Ype=12,Upe=13,Yy=58,Hpe=14,Gpe=15,M2=59,t3=21,Kpe=23,n3=24,Jpe=25,N0=27,r3=28,eme=29,tme=32,nme=35,rme=37,ime=38,sme=0,ome=1,ame={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},lme={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},D2={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function cme(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let L2=null,z2=null,B2=0;function j0(t,e){let n=t.pos+e;if(B2==n&&z2==t)return L2;let r=t.peek(e),i="";for(;cme(r);)i+=String.fromCharCode(r),r=t.peek(++e);return z2=t,B2=n,L2=i?i.toLowerCase():r==ume||r==fme?void 0:null}const i3=60,pm=62,mS=47,ume=63,fme=33,dme=45;function V2(t,e){this.name=t,this.parent=e}const hme=[pS,e3,G5,K5,J5],pme=new H5({start:null,shift(t,e,n,r){return hme.indexOf(e)>-1?new V2(j0(r,1)||"",t):t},reduce(t,e){return e==t3&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==pS||i==rme?new V2(j0(r,1)||"",t):t},strict:!1}),mme=new Jn((t,e)=>{if(t.next!=i3){t.next<0&&e.context&&t.acceptToken(Yy);return}t.advance();let n=t.next==mS;n&&t.advance();let r=j0(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?Gpe:Hpe);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(qpe);if(i&&lme[i])return t.acceptToken(Yy,-2);if(e.dialectEnabled(sme))return t.acceptToken(Ype);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(Upe)}else{if(r=="script")return t.acceptToken(G5);if(r=="style")return t.acceptToken(K5);if(r=="textarea")return t.acceptToken(J5);if(ame.hasOwnProperty(r))return t.acceptToken(e3);i&&D2[i]&&D2[i][r]?t.acceptToken(Yy,-1):t.acceptToken(pS)}},{contextual:!0}),gme=new Jn(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(M2);break}if(t.next==dme)e++;else if(t.next==pm&&e>=2){n>=3&&t.acceptToken(M2,-2);break}else e=0;t.advance()}});function Ome(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const yme=new Jn((t,e)=>{if(t.next==mS&&t.peek(1)==pm){let n=e.dialectEnabled(ome)||Ome(e.context);t.acceptToken(n?Wpe:j2,2)}else t.next==pm&&t.acceptToken(j2,1)});function gS(t,e,n){let r=2+t.length;return new Jn(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==i3||s==1&&i.next==mS||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==pm){a>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const vme=gS("script",zpe,Bpe),xme=gS("style",Vpe,Fpe),bme=gS("textarea",Xpe,Zpe),wme=ic({"Text RawText IncompleteTag IncompleteCloseTag":T.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":T.angleBracket,TagName:T.tagName,"MismatchedCloseTag/TagName":[T.tagName,T.invalid],AttributeName:T.attributeName,"AttributeValue UnquotedAttributeValue":T.attributeValue,Is:T.definitionOperator,"EntityReference CharacterReference":T.character,Comment:T.blockComment,ProcessingInst:T.processingInstruction,DoctypeDecl:T.documentMeta}),Sme=jl.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#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OT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:pme,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[w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v!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[vme,xme,bme,yme,mme,gme,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function s3(t,e){let n=Object.create(null);for(let r of t.getChildren(n3)){let i=r.getChild(Jpe),s=r.getChild(N0)||r.getChild(r3);i&&(n[e.read(i.from,i.to)]=s?s.type.id==N0?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function F2(t,e){let n=t.getChild(Kpe);return n?e.read(n.from,n.to):" "}function Uy(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=s3(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function o3(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let a of t)(a.tag=="script"?n:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return JD((a,l)=>{let c=a.type.id;if(c==eme)return Uy(a,l,n);if(c==tme)return Uy(a,l,r);if(c==nme)return Uy(a,l,i);if(c==t3&&s.length){let u=a.node,f=u.firstChild,d=f&&F2(f,l),h;if(d){for(let O of s)if(O.tag==d&&(!O.attrs||O.attrs(h||(h=s3(f,l))))){let m=u.lastChild,x=m.type.id==ime?m.from:u.to;if(x>f.to)return{parser:O.parser,overlay:[{from:f.to,to:x}]}}}}if(o&&c==n3){let u=a.node,f;if(f=u.firstChild){let d=o[l.read(f.from,f.to)];if(d)for(let h of d){if(h.tagName&&h.tagName!=F2(u.parent,l))continue;let O=u.lastChild;if(O.type.id==N0){let m=O.from+1,x=O.lastChild,y=O.to-(x&&x.isError?0:1);if(y>m)return{parser:h.parser,overlay:[{from:m,to:y}],bracketed:!0}}else if(O.type.id==r3)return{parser:h.parser,overlay:[{from:O.from,to:O.to}]}}}}return null})}const kme=122,X2=1,Cme=123,Pme=124,a3=2,Tme=125,Eme=3,Rme=4,l3=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],_me=58,$me=40,c3=95,Qme=91,Xh=45,Ame=46,Ime=35,Nme=37,jme=38,Mme=92,Dme=10,Lme=42;function xf(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function OS(t){return t>=48&&t<=57}function Z2(t){return OS(t)||t>=97&&t<=102||t>=65&&t<=70}const u3=(t,e,n)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(xf(l)||l==Xh||l==c3||s&&OS(l))!s&&(l!=Xh||a>0)&&(s=!0),o===a&&l==Xh&&o++,r.advance();else if(l==Mme&&r.peek(1)!=Dme){if(r.advance(),Z2(r.next)){do r.advance();while(Z2(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(a3)?e:l==$me?n:t);break}}},zme=new Jn(u3(Cme,a3,Pme)),Bme=new Jn(u3(Tme,Eme,Rme)),Vme=new Jn(t=>{if(l3.includes(t.peek(-1))){let{next:e}=t;(xf(e)||e==c3||e==Ime||e==Ame||e==Lme||e==Qme||e==_me&&xf(t.peek(1))||e==Xh||e==jme)&&t.acceptToken(kme)}}),Fme=new Jn(t=>{if(!l3.includes(t.peek(-1))){let{next:e}=t;if(e==Nme&&(t.advance(),t.acceptToken(X2)),xf(e)){do t.advance();while(xf(t.next)||OS(t.next));t.acceptToken(X2)}}}),Xme=ic({"AtKeyword import charset namespace keyframes media supports":T.definitionKeyword,"from to selector":T.keyword,NamespaceName:T.namespace,KeyframeName:T.labelName,KeyframeRangeName:T.operatorKeyword,TagName:T.tagName,ClassName:T.className,PseudoClassName:T.constant(T.className),IdName:T.labelName,"FeatureName PropertyName":T.propertyName,AttributeName:T.attributeName,NumberLiteral:T.number,KeywordQuery:T.keyword,UnaryQueryOp:T.operatorKeyword,"CallTag ValueName":T.atom,VariableName:T.variableName,Callee:T.operatorKeyword,Unit:T.unit,"UniversalSelector NestingSelector":T.definitionOperator,"MatchOp CompareOp":T.compareOperator,"ChildOp SiblingOp, LogicOp":T.logicOperator,BinOp:T.arithmeticOperator,Important:T.modifier,Comment:T.blockComment,ColorLiteral:T.color,"ParenthesizedContent StringLiteral":T.string,":":T.punctuation,"PseudoOp #":T.derefOperator,"; ,":T.separator,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace}),Zme={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},Wme={__proto__:null,or:98,and:98,not:106,only:106,layer:170},qme={__proto__:null,selector:112,layer:166},Yme={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Ume={__proto__:null,to:207},Hme=jl.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO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$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[Xme],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy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Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[Vme,Fme,zme,Bme,1,2,3,4,new hm("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>Zme[t]||-1},{term:125,get:t=>Wme[t]||-1},{term:4,get:t=>qme[t]||-1},{term:25,get:t=>Yme[t]||-1},{term:123,get:t=>Ume[t]||-1}],tokenPrec:1963});let Hy=null;function Gy(){if(!Hy&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));Hy=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Hy||[]}const W2=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),q2=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Gme=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Kme=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),ji=/^(\w[\w-]*|-\w[\w-]*|)$/,Jme=/^-(-[\w-]*)?$/;function ege(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const Y2=new KD,tge=["Declaration"];function nge(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function f3(t,e,n){if(e.to-e.from>4096){let r=Y2.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Be.IncludeAnonymous);if(o.firstChild())do for(let a of f3(t,o.node,n))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return Y2.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(tge)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const d3=t=>e=>{let{state:n,pos:r}=e,i=Ze(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Gy(),validFor:ji};if(i.name=="ValueName")return{from:i.from,options:q2,validFor:ji};if(i.name=="PseudoClassName")return{from:i.from,options:W2,validFor:ji};if(t(i)||(e.explicit||s)&&ege(i,n.doc))return{from:t(i)||s?i.from:r,options:f3(n.doc,nge(i),t),validFor:Jme};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Gy(),validFor:ji};return{from:i.from,options:Gme,validFor:ji}}if(i.name=="AtKeyword")return{from:i.from,options:Kme,validFor:ji};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:W2,validFor:ji}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:q2,validFor:ji}:o.name=="Block"||o.name=="Styles"?{from:r,options:Gy(),validFor:ji}:null},h3=d3(t=>t.name=="VariableName"),bf=$l.define({name:"css",parser:Hme.configure({props:[oc.add({Declaration:Bh()}),ac.add({"Block KeyframeList":oL})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function p3(){return new Al(bf,bf.data.of({autocomplete:h3}))}const rge=Object.freeze(Object.defineProperty({__proto__:null,css:p3,cssCompletionSource:h3,cssLanguage:bf,defineCSSCompletionSource:d3},Symbol.toStringTag,{value:"Module"})),ige=316,sge=317,U2=1,oge=2,age=3,lge=4,cge=318,uge=320,fge=321,dge=5,hge=6,pge=0,M0=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],m3=125,mge=59,D0=47,gge=42,Oge=43,yge=45,vge=60,xge=44,bge=63,wge=46,Sge=91,kge=new H5({start:!1,shift(t,e){return e==dge||e==hge||e==uge?t:e==fge},strict:!1}),Cge=new Jn((t,e)=>{let{next:n}=t;(n==m3||n==-1||e.context)&&t.acceptToken(cge)},{contextual:!0,fallback:!0}),Pge=new Jn((t,e)=>{let{next:n}=t,r;M0.indexOf(n)>-1||n==D0&&((r=t.peek(1))==D0||r==gge)||n!=m3&&n!=mge&&n!=-1&&!e.context&&t.acceptToken(ige)},{contextual:!0}),Tge=new Jn((t,e)=>{t.next==Sge&&!e.context&&t.acceptToken(sge)},{contextual:!0}),Ege=new Jn((t,e)=>{let{next:n}=t;if(n==Oge||n==yge){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(U2);t.acceptToken(r?U2:oge)}}else n==bge&&t.peek(1)==wge&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(age))},{contextual:!0});function Ky(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Rge=new Jn((t,e)=>{if(t.next!=vge||!e.dialectEnabled(pge)||(t.advance(),t.next==D0))return;let n=0;for(;M0.indexOf(t.next)>-1;)t.advance(),n++;if(Ky(t.next,!0)){for(t.advance(),n++;Ky(t.next,!1);)t.advance(),n++;for(;M0.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==xge)return;for(let r=0;;r++){if(r==7){if(!Ky(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(lge,-n)}),_ge=ic({"get set async static":T.modifier,"for while do if else switch try catch finally return throw break continue default case defer":T.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":T.operatorKeyword,"let var const using function class extends":T.definitionKeyword,"import export from":T.moduleKeyword,"with debugger new":T.keyword,TemplateString:T.special(T.string),super:T.atom,BooleanLiteral:T.bool,this:T.self,null:T.null,Star:T.modifier,VariableName:T.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":T.function(T.variableName),VariableDefinition:T.definition(T.variableName),Label:T.labelName,PropertyName:T.propertyName,PrivatePropertyName:T.special(T.propertyName),"CallExpression/MemberExpression/PropertyName":T.function(T.propertyName),"FunctionDeclaration/VariableDefinition":T.function(T.definition(T.variableName)),"ClassDeclaration/VariableDefinition":T.definition(T.className),"NewExpression/VariableName":T.className,PropertyDefinition:T.definition(T.propertyName),PrivatePropertyDefinition:T.definition(T.special(T.propertyName)),UpdateOp:T.updateOperator,"LineComment Hashbang":T.lineComment,BlockComment:T.blockComment,Number:T.number,String:T.string,Escape:T.escape,ArithOp:T.arithmeticOperator,LogicOp:T.logicOperator,BitOp:T.bitwiseOperator,CompareOp:T.compareOperator,RegExp:T.regexp,Equals:T.definitionOperator,Arrow:T.function(T.punctuation),": Spread":T.punctuation,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,"InterpolationStart InterpolationEnd":T.special(T.brace),".":T.derefOperator,", ;":T.separator,"@":T.meta,TypeName:T.typeName,TypeDefinition:T.definition(T.typeName),"type enum interface implements namespace module declare":T.definitionKeyword,"abstract global Privacy readonly override":T.modifier,"is keyof unique infer asserts":T.operatorKeyword,JSXAttributeValue:T.attributeValue,JSXText:T.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":T.angleBracket,"JSXIdentifier JSXNameSpacedName":T.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":T.attributeName,"JSXBuiltin/JSXIdentifier":T.standard(T.tagName)}),$ge={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Qge={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Age={__proto__:null,"<":193},Ige=jl.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O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#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:kge,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedB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Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new hm("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>$ge[t]||-1},{term:343,get:t=>Qge[t]||-1},{term:95,get:t=>Age[t]||-1}],tokenPrec:15201}),yS=[un("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),un("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),un("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),un("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),un("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),un(`try {
|
|
495
|
+
\${}
|
|
496
|
+
} catch (\${error}) {
|
|
497
|
+
\${}
|
|
498
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),un("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),un(`if (\${}) {
|
|
499
|
+
\${}
|
|
500
|
+
} else {
|
|
501
|
+
\${}
|
|
502
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),un(`class \${name} {
|
|
503
|
+
constructor(\${params}) {
|
|
504
|
+
\${}
|
|
505
|
+
}
|
|
506
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),un('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),un('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],g3=yS.concat([un("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),un("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),un("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),H2=new KD,O3=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function jc(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const Nge=["FunctionDeclaration"],jge={FunctionDeclaration:jc("function"),ClassDeclaration:jc("class"),ClassExpression:()=>!0,EnumDeclaration:jc("constant"),TypeAliasDeclaration:jc("type"),NamespaceDeclaration:jc("namespace"),VariableDefinition(t,e){t.matchContext(Nge)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function y3(t,e){let n=H2.get(e);if(n)return n;let r=[],i=!0;function s(o,a){let l=t.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(Be.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=jge[o.name];if(a&&a(o,s)||O3.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of y3(t,o.node))r.push(a);return!1}}),H2.set(e,r),r}const mm=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,vS=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function v3(t){let e=Ze(t.state).resolveInner(t.pos,-1);if(vS.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&mm.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)O3.has(i.name)&&(r=r.concat(y3(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:mm}}function Jy(t,e,n){var r;let i=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return i.push(t(s)),{path:i.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(t(o)),e=s;else return null}}function x3(t){let e=r=>t.state.doc.sliceString(r.from,r.to),n=Ze(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?Jy(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?Jy(e,n.parent,""):vS.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&mm.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?Jy(e,n,""):t.explicit?{path:[],name:""}:null}function Mge(t,e){let n=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let a;try{a=t[o]}catch{continue}n.push({label:o,type:typeof a=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(t);if(!s)return n;t=s}}function Dge(t){let e=new Map;return n=>{let r=x3(n);if(!r)return null;let i=t;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=Mge(i,!r.path.length)),{from:n.pos-r.name.length,options:s,validFor:mm}}}const pr=$l.define({name:"javascript",parser:Ige.configure({props:[oc.add({IfStatement:Bh({except:/^\s*({|else\b)/}),TryStatement:Bh({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:cue,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:lue({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Bh({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ac.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":oL,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),b3={test:t=>/^JSX/.test(t.name),facet:Eg({commentTokens:{block:{open:"{/*",close:"*/}"}}})},xS=pr.configure({dialect:"ts"},"typescript"),bS=pr.configure({dialect:"jsx",props:[D1.add(t=>t.isTop?[b3]:void 0)]}),wS=pr.configure({dialect:"jsx ts",props:[D1.add(t=>t.isTop?[b3]:void 0)]},"typescript");let w3=t=>({label:t,type:"keyword"});const S3="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(w3),Lge=S3.concat(["declare","implements","private","protected","public"].map(w3));function k3(t={}){let e=t.jsx?t.typescript?wS:bS:t.typescript?xS:pr,n=t.typescript?g3.concat(Lge):yS.concat(S3);return new Al(e,[pr.data.of({autocomplete:Qde(vS,d5(n))}),pr.data.of({autocomplete:v3}),t.jsx?C3:[]])}function zge(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function G2(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const Bge=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),C3=re.inputHandler.of((t,e,n,r,i)=>{if((Bge?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!pr.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,f=Ze(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u)){if(r==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let h=f.parent,O=h.parent;if(O&&h.from==u-2&&((d=G2(o.doc,O.firstChild,u))||((c=O.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${d}>`;return{range:Z.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let h=zge(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=G2(o.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Vge(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,r)=>{var i;!((i=n.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),n=>{let{state:r}=n,i=[];for(let{from:s,to:o}of pr.findRegions(r)){let a=r.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let c of t.verify(r.sliceDoc(s,o),e))i.push(Fge(c,r.doc,l))}return i}}function K2(t,e,n,r){return n.line(t+r.line).from+e+(t==1?r.col-1:-1)}function Fge(t,e,n){let r=K2(t.line,t.column,e,n),i={from:r,to:t.endLine!=null&&t.endColumn!=1?K2(t.endLine,t.endColumn,e,n):r,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,a=s[0]+n.pos-r,l=s[1]+n.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+a,to:u+l,insert:o},scrollIntoView:!0})}}]}return i}const oh=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:C3,completionPath:x3,esLint:Vge,javascript:k3,javascriptLanguage:pr,jsxLanguage:bS,localCompletionSource:v3,scopeCompletionSource:Dge,snippets:yS,tsxLanguage:wS,typescriptLanguage:xS,typescriptSnippets:g3},Symbol.toStringTag,{value:"Module"})),Mc=["_blank","_self","_top","_parent"],ev=["ascii","utf-8","utf-16","latin1","latin1"],tv=["get","post","put","delete"],nv=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],An=["true","false"],de={},Xge={a:{attrs:{href:null,ping:null,type:null,media:null,target:Mc,hreflang:null}},abbr:de,address:de,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:de,aside:de,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:de,base:{attrs:{href:null,target:Mc}},bdi:de,bdo:de,blockquote:{attrs:{cite:null}},body:de,br:de,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:nv,formmethod:tv,formnovalidate:["novalidate"],formtarget:Mc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:de,center:de,cite:de,code:de,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:de,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:de,div:de,dl:de,dt:de,em:de,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:de,figure:de,footer:de,form:{attrs:{action:null,name:null,"accept-charset":ev,autocomplete:["on","off"],enctype:nv,method:tv,novalidate:["novalidate"],target:Mc}},h1:de,h2:de,h3:de,h4:de,h5:de,h6:de,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:de,hgroup:de,hr:de,html:{attrs:{manifest:null}},i:de,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:nv,formmethod:tv,formnovalidate:["novalidate"],formtarget:Mc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:de,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:de,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:de,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:ev,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:de,noscript:de,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:de,param:{attrs:{name:null,value:null}},pre:de,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:de,rt:de,ruby:de,samp:de,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:ev}},section:de,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:de,source:{attrs:{src:null,type:null,media:null}},span:de,strong:de,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:de,summary:de,sup:de,table:de,tbody:de,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:de,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:de,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:de,time:{attrs:{datetime:null}},title:de,tr:de,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:de,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:de},P3={accesskey:null,class:null,contenteditable:An,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:An,autocorrect:An,autocapitalize:An,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":An,"aria-autocomplete":["inline","list","both","none"],"aria-busy":An,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":An,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":An,"aria-hidden":An,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":An,"aria-multiselectable":An,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":An,"aria-relevant":null,"aria-required":An,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},T3="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of T3)P3[t]=null;class wf{constructor(e,n){this.tags={...Xge,...e},this.globalAttrs={...P3,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}wf.default=new wf;function Ml(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Dl(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function E3(t,e,n){let r=n.tags[Ml(t,Dl(e))];return(r==null?void 0:r.children)||n.allTags}function SS(t,e){let n=[];for(let r=Dl(e);r&&!r.type.isTop;r=Dl(r.parent)){let i=Ml(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const R3=/^[:\-\.\w\u00b7-\uffff]*$/;function J2(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=Dl(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:E3(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(SS(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function eR(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:SS(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:R3}}function Zge(t,e,n,r){let i=[],s=0;for(let o of E3(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of SS(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Wge(t,e,n,r,i){let s=Dl(n),o=s?e.tags[Ml(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:R3}}function qge(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=Dl(n),d=f?e.tags[Ml(t.doc,f)]:null;u=(d==null?void 0:d.attrs)&&d.attrs[c]}if(u){let f=t.sliceDoc(r,i).toLowerCase(),d='"',h='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let O of u)a.push({label:O,apply:d+O+h,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function _3(t,e){let{state:n,pos:r}=e,i=Ze(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?eR(n,i,i.from,r):J2(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?J2(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?eR(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Wge(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?qge(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Zge(n,t,i,r):null}function $3(t){return _3(wf.default,t)}function Q3(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new wf(e,n):wf.default;return i=>_3(r,i)}const Yge=pr.parser.configure({top:"SingleExpression"}),A3=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:xS.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:bS.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:wS.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:Yge},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:pr.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:bf.parser}],I3=[{name:"style",parser:bf.parser.configure({top:"Styles"})}].concat(T3.map(t=>({name:t,parser:pr.parser}))),N3=$l.define({name:"html",parser:Sme.configure({props:[oc.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),ac.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),vL.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),xu=N3.configure({wrap:o3(A3,I3)});function j3(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=o3((t.nestedLanguages||[]).concat(A3),(t.nestedAttributes||[]).concat(I3)));let r=n?N3.configure({wrap:n,dialect:e}):e?xu.configure({dialect:e}):xu;return new Al(r,[xu.data.of({autocomplete:Q3(t)}),t.autoCloseTags!==!1?M3:[],k3().support,p3().support])}const tR=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),M3=re.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!xu.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,f;let d=o.doc.sliceString(l.from-1,l.to)==r,{head:h}=l,O=Ze(o).resolveInner(h,-1),m;if(d&&r==">"&&O.name=="EndTag"){let x=O.parent;if(((u=(c=x.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(m=Ml(o.doc,x.parent,h))&&!tR.has(m)){let y=h+(o.doc.sliceString(h,h+1)===">"?1:0),v=`</${m}>`;return{range:l,changes:{from:h,to:y,insert:v}}}}else if(d&&r=="/"&&O.name=="IncompleteCloseTag"){let x=O.parent;if(O.from==h-2&&((f=x.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=Ml(o.doc,x,h))&&!tR.has(m)){let y=h+(o.doc.sliceString(h,h+1)===">"?1:0),v=`${m}>`;return{range:Z.cursor(h+v.length,-1),changes:{from:h,to:y,insert:v}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Uge=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:M3,html:j3,htmlCompletionSource:$3,htmlCompletionSourceWith:Q3,htmlLanguage:xu},Symbol.toStringTag,{value:"Module"})),D3=Eg({commentTokens:{block:{open:"<!--",close:"-->"}}}),L3=new Oe,z3=Ope.configure({props:[ac.add(t=>!t.is("Block")||t.is("Document")||L0(t)!=null||Hge(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),L3.add(L0),oc.add({Document:()=>null}),Rs.add({Document:D3})]});function L0(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Hge(t){return t.name=="OrderedList"||t.name=="BulletList"}function Gge(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=L0(r.type))!=null&&i<=e)break;n=r}return n.to}const Kge=sL.of((t,e,n)=>{for(let r=Ze(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(L3);if(i==null)continue;let s=Gge(r,i);if(s>n)return{from:n,to:s}}return null});function kS(t){return new Fn(D3,t,[],"markdown")}const B3=kS(z3),Jge=z3.configure([Epe,_pe,Rpe,$pe,{props:[ac.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Sf=kS(Jge);function eOe(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=D.matchLanguageName(t,n,!0),r instanceof D)return r.support?r.support.language.parser:Go.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class rv{constructor(e,n,r,i,s,o,a){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+F3(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function V3(t,e){let n=[],r=[];for(let i=t;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let s=n[i],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new rv(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new rv(s.parent,l,l+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new rv(s.parent,l,l+u,o[1],c,f,s))}}return r}function F3(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function iv(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let a=F3(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(i+2+r)})}i=l}let o=s.nextSibling;if(!o)break;s=o}}function CS(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(sc)!=" ")return t;let r=Zr(t,4,n),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(n)}const X3=(t={})=>({state:e,dispatch:n})=>{let r=Ze(e),{doc:i}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!Sf.isActiveAt(e,a.from,-1)&&!Sf.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,c=i.lineAt(l),u=V3(r.resolveInner(l,-1),i);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:a};let f=u[u.length-1];if(f.to-f.spaceAfter.length>l-c.from)return s={range:a};let d=l>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&d){let y=f.node.firstChild,v=f.node.getChild("ListItem","ListItem");if(y.to>=l||v&&v.to<l||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||t.nonTightLists===!1){let b=u.length>1?u[u.length-2]:null,S,k="";b&&b.item?(S=c.from+b.from,k=b.marker(i,1)):S=c.from+(b?b.to:0);let w=[{from:S,to:l,insert:k}];return f.node.name=="OrderedList"&&iv(f.item,i,w,-2),b&&b.node.name=="OrderedList"&&iv(b.item,i,w),{range:Z.cursor(S+k.length),changes:w}}else{let b=rR(u,e,c);return{range:Z.cursor(l+b.length+1),changes:{from:c.from,insert:b+e.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let y=i.lineAt(c.from-1),v=/>\s*$/.exec(y.text);if(v&&v.index==f.from){let b=e.changes([{from:y.from+v.index,to:y.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(b),changes:b}}}let h=[];f.node.name=="OrderedList"&&iv(f.item,i,h);let O=f.item&&f.item.from<c.from,m="";if(!O||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let y=0,v=u.length-1;y<=v;y++)m+=y==v&&!O?u[y].marker(i,1):u[y].blank(y<v?Zr(c.text,4,u[y+1].from)-m.length:null);let x=l;for(;x>c.from&&/\s/.test(c.text.charAt(x-c.from-1));)x--;return m=CS(m,e),tOe(f.node,e.doc)&&(m=rR(u,e,c)+e.lineBreak+m),h.push({from:x,to:l,insert:e.lineBreak+m}),{range:Z.cursor(x+m.length+1),changes:h}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},Z3=X3();function nR(t){return t.name=="QuoteMark"||t.name=="ListMark"}function tOe(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,r=t.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(n.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function rR(t,e,n){let r="";for(let i=0,s=t.length-2;i<=s;i++)r+=t[i].blank(i<s?Zr(n.text,4,t[i+1].from)-r.length:null,i<s);return CS(r,e)}function nOe(t,e){let n=t.resolveInner(e,-1),r=e;nR(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(nR(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const W3=({state:t,dispatch:e})=>{let n=Ze(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Sf.isActiveAt(t,s.from)){let l=a.lineAt(o),c=V3(nOe(n,o),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>f&&!/\S/.test(l.text.slice(f,o-l.from)))return{range:Z.cursor(l.from+f),changes:{from:l.from+f,to:o}};if(o-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let d=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(Zr(l.text,4,u.to)-Zr(l.text,4,u.from));return d==l.from&&(h=CS(h,t)),{range:Z.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<o)return{range:Z.cursor(d),changes:{from:d,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},q3=[{key:"Enter",run:Z3},{key:"Backspace",run:W3}],Y3=j3({matchClosingTags:!1});function U3(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=B3,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=Y3}=t;if(!(i instanceof Mg))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],c=[a.support,Kge],u;o&&c.push(H3),n instanceof Al?(c.push(n.support),u=n.language):n&&(u=n);let f=e||u?eOe(e,u):void 0;l.push(vpe({codeParser:f,htmlParser:a.language.parser})),r&&c.push(ss.high(da.of(q3)));let d=kS(i.configure(l));return s&&c.push(d.data.of({autocomplete:rOe})),new Al(d,c)}function rOe(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=Ze(e).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:iOe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let sv=null;function iOe(){if(sv)return sv;let t=$3(new J1(_e.create({extensions:Y3}),0,!0));return sv=t?t.options:[]}const sOe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,H3=re.domEventHandlers({paste:(t,e)=>{var n;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Sf.isActiveAt(e.state,r.from,1)))return!1;let s=Ze(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||sOe.test(a.name))&&(o=!0)},leave:a=>{a.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),oOe=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:B3,deleteMarkupBackward:W3,insertNewlineContinueMarkup:Z3,insertNewlineContinueMarkupCommand:X3,markdown:U3,markdownKeymap:q3,markdownLanguage:Sf,pasteURLAsLink:H3},Symbol.toStringTag,{value:"Module"}));function aOe(t){return t.replace(/[\n\r\t]+/g," ").trim()}function lOe({notePath:t,content:e,onChange:n,onSaveShortcut:r,className:i}){const s=g.useRef(null),[o,a]=g.useState(!1),l=g.useCallback((y,v)=>{const b=s.current;if(!b)return;const S=b.state.selection.main,k=S.from,w=S.to,C=k+((v==null?void 0:v.anchorOffset)??y.length),_=k+((v==null?void 0:v.headOffset)??(v==null?void 0:v.anchorOffset)??y.length);b.dispatch({changes:{from:k,to:w,insert:y},selection:Z.range(C,_),scrollIntoView:!0}),b.focus()},[]),c=g.useCallback((y,v=y)=>{const b=s.current;if(!b)return!1;const S=b.state.selection.main,k=b.state.sliceDoc(S.from,S.to),w=`${y}${k}${v}`,C=S.from+y.length,_=C+k.length;return b.dispatch({changes:{from:S.from,to:S.to,insert:w},selection:Z.range(C,_),scrollIntoView:!0}),b.focus(),!0},[]),u=g.useCallback(y=>{const v=s.current;if(!v)return!1;switch(y){case"bold":return c("**","**");case"italic":return c("*","*");case"strike":return c("~~","~~");case"inlineCode":return c("`","`");case"bulletList":return l("- "),!0;case"orderedList":return l("1. "),!0;case"link":{const b=v.state.selection.main,S=v.state.sliceDoc(b.from,b.to)||"link text",k=`[${S}](https://)`,w=1+S.length+2;return l(k,{anchorOffset:w,headOffset:w+8}),!0}default:return!1}},[l,c]),f=g.useCallback(async y=>{if(!y.type.startsWith("image/"))return;const b=(await new Promise((w,C)=>{const _=new FileReader;_.onload=()=>w(String(_.result||"")),_.onerror=()=>C(new Error("Failed to read image")),_.readAsDataURL(y)})).split(",")[1]||"";if(!b)throw new Error("Invalid image payload");const S=await Ga.post("/api/notes/assets",{notePath:t,fileName:y.name,contentBase64:b}),k=aOe(y.name)||"image";l(``)},[t,l]),d=g.useCallback(async y=>{const v=Array.from(y).filter(b=>b.type.startsWith("image/"));if(v.length!==0){a(!0);try{for(const b of v)await f(b)}catch(b){console.error("Failed to upload image",b)}finally{a(!1)}}},[f]),h=g.useCallback(y=>{var b,S;!((S=(b=y.dataTransfer)==null?void 0:b.files)!=null&&S.length)||!Array.from(y.dataTransfer.files).some(k=>k.type.startsWith("image/"))||(y.preventDefault(),d(y.dataTransfer.files))},[d]),O=g.useCallback(y=>{var b,S;!((S=(b=y.clipboardData)==null?void 0:b.files)!=null&&S.length)||!Array.from(y.clipboardData.files).some(k=>k.type.startsWith("image/"))||(y.preventDefault(),d(y.clipboardData.files))},[d]),m=g.useMemo(()=>[U3(),da.of([{key:"Mod-s",run:()=>(r(),!0)},{key:"Mod-b",run:()=>u("bold")},{key:"Mod-i",run:()=>u("italic")},{key:"Mod-k",run:()=>u("link")},{key:"Mod-[",run:Y1},{key:"Mod-]",run:q1}])],[r,u]),x=g.useMemo(()=>[{key:"bold",label:"Bold",icon:nZ},{key:"italic",label:"Italic",icon:hZ},{key:"strike",label:"Strike",icon:kZ},{key:"inlineCode",label:"Code",icon:oZ},{key:"link",label:"Link",icon:Kb},{key:"bulletList",label:"Bullet List",icon:gZ},{key:"orderedList",label:"Numbered List",icon:pZ}],[]);return p.jsxs("div",{className:le("note-editor h-full flex flex-col",i),onDropCapture:h,onPasteCapture:O,children:[p.jsxs("div",{className:"note-editor-toolbar",children:[p.jsx("div",{className:"note-editor-toolbar-actions",children:x.map(y=>{const v=y.icon;return p.jsx(Qe,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2",onClick:()=>u(y.key),title:y.label,children:p.jsx(v,{className:"h-4 w-4"})},y.key)})}),p.jsxs("span",{className:"note-editor-toolbar-hint",children:[p.jsx("kbd",{children:"Cmd/Ctrl+S"})," save, raw markdown mode"]})]}),p.jsx("div",{className:"note-editor-surface",children:p.jsx(cS,{value:e,theme:lS,height:"100%",extensions:m,onChange:n,onCreateEditor:y=>{s.current=y},basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,autocompletion:!0,bracketMatching:!0,closeBrackets:!0,syntaxHighlighting:!0},className:"note-editor-cm"})}),o&&p.jsx("div",{className:"note-editor-loading",children:"Uploading image..."})]})}function cOe(t){return t.split("/").map(e=>encodeURIComponent(e)).join("/")}function uOe({notePath:t,debounceMs:e=1200}){const[n,r]=g.useState("idle"),[i,s]=g.useState(null),[o,a]=g.useState(null),l=g.useRef(t),c=g.useRef(""),u=g.useRef(null),f=g.useRef(0);g.useEffect(()=>{l.current=t,c.current="",r("idle"),s(null),u.current&&(clearTimeout(u.current),u.current=null)},[t]);const d=g.useCallback(async x=>{const y=f.current+1;f.current=y,r("saving"),s(null);try{if(await Ga.put(`/api/notes/files/${cOe(l.current)}`,{content:x}),f.current!==y)return;r("saved"),a(new Date)}catch(v){if(f.current!==y)return;r("error"),s(v instanceof Error?v.message:"Failed to save note")}},[]),h=g.useCallback(async x=>{u.current&&(clearTimeout(u.current),u.current=null);const y=x??c.current;typeof y=="string"&&(c.current=y,await d(y))},[d]),O=g.useCallback(x=>{c.current=x,r(y=>y==="saving"?y:"dirty"),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{u.current=null,d(x)},e)},[e,d]),m=g.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);return g.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),{status:n,error:i,lastSavedAt:o,queueSave:O,saveNow:h,cancelQueuedSave:m}}function fOe({link:t,onClick:e,className:n}){const r=t.alias||t.target;return p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs("button",{onClick:()=>e(t.target),className:le("inline-flex items-center gap-0.5 px-1 py-0.5 rounded","text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300","bg-blue-50 dark:bg-blue-950 hover:bg-blue-100 dark:hover:bg-blue-900","transition-colors cursor-pointer",!t.exists&&"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950",!t.exists&&"hover:bg-red-100 dark:hover:bg-red-900",n),children:[t.exists?p.jsx(Kb,{className:"h-3 w-3"}):p.jsx(Or,{className:"h-3 w-3"}),p.jsx("span",{children:r})]})}),p.jsx(yn,{side:"top",className:"text-xs",children:t.exists?t.indexed?p.jsxs("span",{children:["Open doc: ",t.target]}):p.jsxs("span",{children:["Doc exists but not indexed: ",t.target]}):p.jsxs("span",{children:["Doc not found: ",t.target]})})]})}function dOe(t){var s;const e=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,n=[],r=[];let i;for(;(i=e.exec(t))!==null;){const o=i[1].trim(),a=(s=i[2])==null?void 0:s.trim(),l={target:o,alias:a,exists:!0,indexed:!0};n.push(l),r.push({start:i.index,end:i.index+i[0].length,link:l})}return{links:n,positions:r}}function hOe(t){const{links:e}=dOe(t),n=new Set(e.map(r=>r.target));return Array.from(n)}function pOe({backlinks:t,currentNote:e,onNavigate:n,isLoading:r=!1,className:i}){const[s,o]=g.useState(!1),a=Array.isArray(t)?t:[];return!r&&a.length===0?null:p.jsxs(xw,{open:s,onOpenChange:o,className:le("border-t",i),children:[p.jsxs(bw,{className:"w-full px-3 py-2 flex items-center justify-between text-sm bg-muted/30 hover:bg-muted/50 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[p.jsx(Kb,{className:"h-4 w-4"}),p.jsx("span",{children:"Backlinks"}),p.jsxs("span",{className:"text-xs",children:["(",r?"...":a.length,")"]})]}),p.jsx(aa,{className:le("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),p.jsx(ww,{children:p.jsx(Jl,{className:"max-h-48",children:p.jsx("div",{className:"p-2 space-y-1",children:a.map((l,c)=>p.jsx(mOe,{backlink:l,onClick:()=>n(l.source)},`${l.source}-${c}`))})})})]})}function mOe({backlink:t,onClick:e}){const n=t.source.split("/").pop()||t.source,r=gOe(t.context);return p.jsxs("button",{onClick:e,className:le("w-full text-left p-2 rounded-md","hover:bg-accent transition-colors","group"),children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(sn,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"font-medium text-sm truncate",children:n}),p.jsx(Lm,{className:"h-3 w-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity ml-auto"})]}),p.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 ml-6",dangerouslySetInnerHTML:{__html:r}})]})}function gOe(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\[\[([^\]]+)\]\]/g,'<span class="text-blue-600 dark:text-blue-400 font-medium">[[$1]]</span>')}function OOe(t,e){return function({children:r}){var c;if(typeof r!="string")return p.jsx(p.Fragment,{children:r});const i=r,s=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,o=[];let a=0,l;for(;(l=s.exec(i))!==null;){l.index>a&&o.push(i.slice(a,l.index));const u=l[1].trim(),f=(c=l[2])==null?void 0:c.trim(),d=t.get(u)||{target:u,alias:f,exists:!0,indexed:!0};o.push(p.jsx(fOe,{link:{...d,alias:f},onClick:e},l.index)),a=l.index+l[0].length}return a<i.length&&o.push(i.slice(a)),o.length>0?p.jsx(p.Fragment,{children:o}):p.jsx(p.Fragment,{children:i})}}function yOe({notePath:t,content:e,onClose:n,onNavigate:r,className:i}){const[s,o]=g.useState(!1),[a,l]=g.useState(e??""),{status:c,error:u,lastSavedAt:f,queueSave:d,saveNow:h,cancelQueuedSave:O}=uOe({notePath:t,debounceMs:1200}),[m,x]=g.useState([t]),[y,v]=g.useState(0),[b,S]=g.useState(new Map),[k,w]=g.useState([]),[C,_]=g.useState(!1),[I,E]=g.useState({});g.useEffect(()=>{l(e??""),o(!1)},[t,e]),g.useEffect(()=>{if(t!==m[y]){const P=m.slice(0,y+1);P.push(t),x(P),v(P.length-1)}},[t]),g.useEffect(()=>{if(!a||s)return;const P=hOe(a);P.length>0&&xOe(P).then(S),_(!0),bOe(t).then(w).finally(()=>_(!1))},[a,s,t]);const N=y>0,Q=y<m.length-1,L=g.useCallback(()=>{if(N){const P=y-1;v(P),r(m[P])}},[N,y,m,r]),z=g.useCallback(()=>{if(Q){const P=y+1;v(P),r(m[P])}},[Q,y,m,r]),X=g.useCallback(P=>{const M=vOe(P);r(M)},[r]),W=g.useCallback(P=>{const M=P==="edit";M!==s&&(M||(O(),h(a)),o(M))},[O,a,s,h]),F=g.useCallback(P=>{l(P),d(P)},[d]),j=g.useCallback(()=>{h(a)},[a,h]),A=g.useMemo(()=>{const P=OOe(b,X);return{p:({children:M,...$})=>p.jsx("p",{...$,className:"mb-4 leading-relaxed",children:iR(M,P)}),li:({children:M,...$})=>p.jsx("li",{...$,children:iR(M,P)}),h1:({children:M,...$})=>p.jsx("h1",{...$,className:"text-2xl font-bold mb-4 mt-6",children:M}),h2:({children:M,...$})=>p.jsx("h2",{...$,className:"text-xl font-bold mb-3 mt-5",children:M}),h3:({children:M,...$})=>p.jsx("h3",{...$,className:"text-lg font-semibold mb-2 mt-4",children:M}),h4:({children:M,...$})=>p.jsx("h4",{...$,className:"text-base font-semibold mb-2 mt-3",children:M}),ul:({children:M,...$})=>p.jsx("ul",{...$,className:"list-disc list-inside mb-4 space-y-1",children:M}),ol:({children:M,...$})=>p.jsx("ol",{...$,className:"list-decimal list-inside mb-4 space-y-1",children:M}),blockquote:({children:M,...$})=>p.jsx("blockquote",{...$,className:"border-l-4 border-muted-foreground/30 pl-4 italic my-4 text-muted-foreground",children:M}),code:({inline:M,className:$,children:R,...q})=>M?p.jsx("code",{...q,className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:R}):p.jsx("code",{...q,className:le("block bg-muted p-4 rounded-md text-sm font-mono overflow-x-auto mb-4",$),children:R}),pre:({children:M,...$})=>p.jsx("pre",{...$,className:"mb-4",children:M}),a:({href:M,children:$,...R})=>p.jsx("a",{...R,href:M,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:$}),hr:M=>p.jsx("hr",{...M,className:"my-6 border-muted-foreground/20"}),table:({children:M,...$})=>p.jsx("div",{className:"overflow-x-auto mb-4",children:p.jsx("table",{...$,className:"min-w-full border-collapse",children:M})}),th:({children:M,...$})=>p.jsx("th",{...$,className:"border border-muted-foreground/20 px-3 py-2 bg-muted text-left font-semibold",children:M}),td:({children:M,...$})=>p.jsx("td",{...$,className:"border border-muted-foreground/20 px-3 py-2",children:M})}},[b,X]);return p.jsxs("div",{className:le("flex flex-col h-full",i),children:[p.jsxs("div",{className:"border-b px-4 py-2 flex items-center justify-between bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-0.5 mr-2",children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:L,disabled:!N,children:p.jsx(tZ,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Go back"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:z,disabled:!Q,children:p.jsx(Hb,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Go forward"})]})]}),p.jsx(Rp,{value:s?"edit":"view",onValueChange:W,children:p.jsxs(og,{className:"h-7 p-0.5 mr-1",children:[p.jsx(wl,{value:"view",className:"h-6 px-4 text-xs",children:"View"}),p.jsx(wl,{value:"edit",className:"h-6 px-4 text-xs",children:"Edit"})]})}),p.jsx(sn,{className:"h-4 w-4 text-blue-500"}),p.jsx("span",{className:"font-medium",children:t}),p.jsx(gt,{variant:s?c==="error"?"destructive":c==="saving"?"info":c==="dirty"?"warning":"success":"success",className:"text-xs",children:s?c==="saving"?"Saving...":c==="dirty"?"Unsaved":c==="error"?"Save error":"Saved":"View mode"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[s&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,children:p.jsx(bZ,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Save now (Cmd/Ctrl+S)"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:n,children:p.jsx(Ol,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Close"})]})]})]}),s?p.jsx("div",{className:"flex-1 min-h-0",children:p.jsx(lOe,{notePath:t,content:a,onChange:F,onSaveShortcut:j,className:"h-full"},t)}):p.jsx(Jl,{className:"flex-1",children:p.jsx("div",{className:"p-6 max-w-3xl mx-auto",children:a?p.jsx(oie,{remarkPlugins:[voe],components:A,children:a}):p.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin mr-2"}),"Loading content..."]})})}),p.jsx(pOe,{backlinks:k,currentNote:t,onNavigate:r,isLoading:C}),p.jsxs("div",{className:"border-t px-4 py-2 flex items-center justify-between text-xs text-muted-foreground bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[I.chunks&&p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(rQ,{className:"h-3 w-3"}),I.chunks," chunks"]}),s&&u&&p.jsx("span",{className:"text-red-500",children:u})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[s&&f&&p.jsxs("span",{children:["Saved ",f.toLocaleTimeString()]}),I.lastIndexed&&p.jsxs("span",{children:["Indexed ",I.lastIndexed]})]})]})]})}function iR(t,e){return typeof t=="string"?p.jsx(e,{children:t}):Array.isArray(t)?t.map((n,r)=>typeof n=="string"?p.jsx(e,{children:n},r):n):t}function vOe(t){return t.endsWith(".md")?t:`${t}.md`}async function xOe(t){const e=new Map;try{const n=await fetch("/api/notes/links/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targets:t})});if(n.ok){const r=await n.json();for(const[i,s]of Object.entries(r))e.set(i,s)}}catch(n){console.error("Failed to check wiki-link status:",n)}for(const n of t)e.has(n)||e.set(n,{target:n,exists:!0,indexed:!0});return e}async function bOe(t){try{const e=t.split("/").map(encodeURIComponent).join("/"),n=await fetch(`/api/notes/backlinks/${e}`);if(n.ok){const r=await n.json();return Array.isArray(r.backlinks)?r.backlinks:[]}}catch(e){console.error("Failed to fetch backlinks:",e)}return[]}var G3=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},s={};n.background&&(s.backgroundColor=n.background),n.backgroundImage&&(s.backgroundImage=n.backgroundImage),n.foreground&&(s.color=n.foreground),n.fontSize&&(s.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=s),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var o={};n.gutterActiveForeground&&(o.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},o.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=o,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=re.theme(i,{dark:e==="dark"}),l=lc.define(r),c=[a,$g(l)];return c},wOe={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},SOe=[{tag:[T.standard(T.tagName),T.tagName],color:"#116329"},{tag:[T.comment,T.bracket],color:"#6a737d"},{tag:[T.className,T.propertyName],color:"#6f42c1"},{tag:[T.variableName,T.attributeName,T.number,T.operator],color:"#005cc5"},{tag:[T.keyword,T.typeName,T.typeOperator,T.typeName],color:"#d73a49"},{tag:[T.string,T.meta,T.regexp],color:"#032f62"},{tag:[T.name,T.quote],color:"#22863a"},{tag:[T.heading,T.strong],color:"#24292e",fontWeight:"bold"},{tag:[T.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[T.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[T.atom,T.bool,T.special(T.variableName)],color:"#e36209"},{tag:[T.url,T.escape,T.regexp,T.link],color:"#032f62"},{tag:T.link,textDecoration:"underline"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.invalid,color:"#cb2431"}],kOe=t=>{var{theme:e="light",settings:n={},styles:r=[]}={};return G3({theme:e,settings:Cl({},wOe,n),styles:[...SOe,...r]})},COe=kOe(),POe={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},TOe=[{tag:[T.standard(T.tagName),T.tagName],color:"#7ee787"},{tag:[T.comment,T.bracket],color:"#8b949e"},{tag:[T.className,T.propertyName],color:"#d2a8ff"},{tag:[T.variableName,T.attributeName,T.number,T.operator],color:"#79c0ff"},{tag:[T.keyword,T.typeName,T.typeOperator,T.typeName],color:"#ff7b72"},{tag:[T.string,T.meta,T.regexp],color:"#a5d6ff"},{tag:[T.name,T.quote],color:"#7ee787"},{tag:[T.heading,T.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[T.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[T.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[T.atom,T.bool,T.special(T.variableName)],color:"#ffab70"},{tag:T.link,textDecoration:"underline"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.invalid,color:"#f97583"}],EOe=t=>{var{theme:e="dark",settings:n={},styles:r=[]}={};return G3({theme:e,settings:Cl({},POe,n),styles:[...TOe,...r]})};EOe();const ROe="modulepreload",_Oe=function(t){return"/"+t},sR={},B=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=_Oe(l),l in sR)return;sR[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":ROe,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function U(t){return new Al(B1.define(t))}function gs(t){return B(()=>import("./index-DJpCPEwr.js"),[]).then(e=>e.sql({dialect:e[t]}))}const ov=[D.of({name:"C",extensions:["c","h","ino"],load(){return B(()=>import("./index-ClDYe_wE.js"),[]).then(t=>t.cpp())}}),D.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return B(()=>import("./index-ClDYe_wE.js"),[]).then(t=>t.cpp())}}),D.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return gs("Cassandra")}}),D.of({name:"CSS",extensions:["css"],load(){return B(()=>Promise.resolve().then(()=>rge),void 0).then(t=>t.css())}}),D.of({name:"Go",extensions:["go"],load(){return B(()=>import("./index-EuUS3D16.js"),[]).then(t=>t.go())}}),D.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return B(()=>Promise.resolve().then(()=>Uge),void 0).then(t=>t.html())}}),D.of({name:"Java",extensions:["java"],load(){return B(()=>import("./index-6L7rK6RK.js"),[]).then(t=>t.java())}}),D.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return B(()=>Promise.resolve().then(()=>oh),void 0).then(t=>t.javascript())}}),D.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return B(()=>import("./index-D4qNbgAX.js"),[]).then(t=>t.jinja())}}),D.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return B(()=>import("./index-C7fIfqkz.js"),[]).then(t=>t.json())}}),D.of({name:"JSX",extensions:["jsx"],load(){return B(()=>Promise.resolve().then(()=>oh),void 0).then(t=>t.javascript({jsx:!0}))}}),D.of({name:"LESS",extensions:["less"],load(){return B(()=>import("./index-BcZ8RTQK.js"),[]).then(t=>t.less())}}),D.of({name:"Liquid",extensions:["liquid"],load(){return B(()=>import("./index-CMXahjWH.js"),[]).then(t=>t.liquid())}}),D.of({name:"MariaDB SQL",load(){return gs("MariaSQL")}}),D.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return B(()=>Promise.resolve().then(()=>oOe),void 0).then(t=>t.markdown())}}),D.of({name:"MS SQL",load(){return gs("MSSQL")}}),D.of({name:"MySQL",load(){return gs("MySQL")}}),D.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return B(()=>import("./index-CLbc4ChH.js"),[]).then(t=>t.php())}}),D.of({name:"PLSQL",extensions:["pls"],load(){return gs("PLSQL")}}),D.of({name:"PostgreSQL",load(){return gs("PostgreSQL")}}),D.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return B(()=>import("./index-CC-t7RnM.js"),[]).then(t=>t.python())}}),D.of({name:"Rust",extensions:["rs"],load(){return B(()=>import("./index-DCiUPvZt.js"),[]).then(t=>t.rust())}}),D.of({name:"Sass",extensions:["sass"],load(){return B(()=>import("./index-D3WXxnT1.js"),[]).then(t=>t.sass({indented:!0}))}}),D.of({name:"SCSS",extensions:["scss"],load(){return B(()=>import("./index-D3WXxnT1.js"),[]).then(t=>t.sass())}}),D.of({name:"SQL",extensions:["sql"],load(){return gs("StandardSQL")}}),D.of({name:"SQLite",load(){return gs("SQLite")}}),D.of({name:"TSX",extensions:["tsx"],load(){return B(()=>Promise.resolve().then(()=>oh),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),D.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return B(()=>Promise.resolve().then(()=>oh),void 0).then(t=>t.javascript({typescript:!0}))}}),D.of({name:"WebAssembly",extensions:["wat","wast"],load(){return B(()=>import("./index-C7GrfZtu.js"),[]).then(t=>t.wast())}}),D.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return B(()=>import("./index-C9-Eilv-.js"),[]).then(t=>t.xml())}}),D.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return B(()=>import("./index-CxykdbB_.js"),[]).then(t=>t.yaml())}}),D.of({name:"APL",extensions:["dyalog","apl"],load(){return B(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>U(t.apl))}}),D.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return B(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>U(t.asciiArmor))}}),D.of({name:"ASN.1",extensions:["asn","asn1"],load(){return B(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>U(t.asn1({})))}}),D.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return B(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>U(t.asterisk))}}),D.of({name:"Brainfuck",extensions:["b","bf"],load(){return B(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>U(t.brainfuck))}}),D.of({name:"Cobol",extensions:["cob","cpy"],load(){return B(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>U(t.cobol))}}),D.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.csharp))}}),D.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"ClojureScript",extensions:["cljs"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return B(()=>import("./css-BnMrqG3P.js"),[]).then(t=>U(t.gss))}}),D.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return B(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>U(t.cmake))}}),D.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return B(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>U(t.coffeeScript))}}),D.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return B(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>U(t.commonLisp))}}),D.of({name:"Cypher",extensions:["cyp","cypher"],load(){return B(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>U(t.cypher))}}),D.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return B(()=>import("./python-BuPzkPfP.js"),[]).then(t=>U(t.cython))}}),D.of({name:"Crystal",extensions:["cr"],load(){return B(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>U(t.crystal))}}),D.of({name:"D",extensions:["d"],load(){return B(()=>import("./d-pRatUO7H.js"),[]).then(t=>U(t.d))}}),D.of({name:"Dart",extensions:["dart"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.dart))}}),D.of({name:"diff",extensions:["diff","patch"],load(){return B(()=>import("./diff-DbItnlRl.js"),[]).then(t=>U(t.diff))}}),D.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return B(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(t=>U(t.dockerFile))}}),D.of({name:"DTD",extensions:["dtd"],load(){return B(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>U(t.dtd))}}),D.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return B(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>U(t.dylan))}}),D.of({name:"EBNF",load(){return B(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>U(t.ebnf))}}),D.of({name:"ECL",extensions:["ecl"],load(){return B(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>U(t.ecl))}}),D.of({name:"edn",extensions:["edn"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"Eiffel",extensions:["e"],load(){return B(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>U(t.eiffel))}}),D.of({name:"Elm",extensions:["elm"],load(){return B(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>U(t.elm))}}),D.of({name:"Erlang",extensions:["erl"],load(){return B(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>U(t.erlang))}}),D.of({name:"Esper",load(){return B(()=>import("./sql-D0XecflT.js"),[]).then(t=>U(t.esper))}}),D.of({name:"Factor",extensions:["factor"],load(){return B(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(t=>U(t.factor))}}),D.of({name:"FCL",load(){return B(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>U(t.fcl))}}),D.of({name:"Forth",extensions:["forth","fth","4th"],load(){return B(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>U(t.forth))}}),D.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return B(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>U(t.fortran))}}),D.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.fSharp))}}),D.of({name:"Gas",extensions:["s"],load(){return B(()=>import("./gas-Bneqetm1.js"),[]).then(t=>U(t.gas))}}),D.of({name:"Gherkin",extensions:["feature"],load(){return B(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>U(t.gherkin))}}),D.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return B(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>U(t.groovy))}}),D.of({name:"Haskell",extensions:["hs"],load(){return B(()=>import("./haskell-BWDZoCOh.js"),[]).then(t=>U(t.haskell))}}),D.of({name:"Haxe",extensions:["hx"],load(){return B(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>U(t.haxe))}}),D.of({name:"HXML",extensions:["hxml"],load(){return B(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>U(t.hxml))}}),D.of({name:"HTTP",load(){return B(()=>import("./http-DBlCnlav.js"),[]).then(t=>U(t.http))}}),D.of({name:"IDL",extensions:["pro"],load(){return B(()=>import("./idl-BEugSyMb.js"),[]).then(t=>U(t.idl))}}),D.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return B(()=>import("./javascript-qCveANmP.js"),[]).then(t=>U(t.jsonld))}}),D.of({name:"Julia",extensions:["jl"],load(){return B(()=>import("./julia-DuME0IfC.js"),[]).then(t=>U(t.julia))}}),D.of({name:"Kotlin",extensions:["kt","kts"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.kotlin))}}),D.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return B(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>U(t.liveScript))}}),D.of({name:"Lua",extensions:["lua"],load(){return B(()=>import("./lua-BgMRiT3U.js"),[]).then(t=>U(t.lua))}}),D.of({name:"mIRC",extensions:["mrc"],load(){return B(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>U(t.mirc))}}),D.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return B(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>U(t.mathematica))}}),D.of({name:"Modelica",extensions:["mo"],load(){return B(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>U(t.modelica))}}),D.of({name:"MUMPS",extensions:["mps"],load(){return B(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>U(t.mumps))}}),D.of({name:"Mbox",extensions:["mbox"],load(){return B(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>U(t.mbox))}}),D.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return B(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>U(t.nginx))}}),D.of({name:"NSIS",extensions:["nsh","nsi"],load(){return B(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([3,1])).then(t=>U(t.nsis))}}),D.of({name:"NTriples",extensions:["nt","nq"],load(){return B(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>U(t.ntriples))}}),D.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.objectiveC))}}),D.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.objectiveCpp))}}),D.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.oCaml))}}),D.of({name:"Octave",extensions:["m"],load(){return B(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>U(t.octave))}}),D.of({name:"Oz",extensions:["oz"],load(){return B(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>U(t.oz))}}),D.of({name:"Pascal",extensions:["p","pas"],load(){return B(()=>import("./pascal--L3eBynH.js"),[]).then(t=>U(t.pascal))}}),D.of({name:"Perl",extensions:["pl","pm"],load(){return B(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>U(t.perl))}}),D.of({name:"Pig",extensions:["pig"],load(){return B(()=>import("./pig-CevX1Tat.js"),[]).then(t=>U(t.pig))}}),D.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return B(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>U(t.powerShell))}}),D.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return B(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>U(t.properties))}}),D.of({name:"ProtoBuf",extensions:["proto"],load(){return B(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>U(t.protobuf))}}),D.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return B(()=>import("./pug-DukmZTjD.js"),__vite__mapDeps([4,5])).then(t=>U(t.pug))}}),D.of({name:"Puppet",extensions:["pp"],load(){return B(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>U(t.puppet))}}),D.of({name:"Q",extensions:["q"],load(){return B(()=>import("./q-pXgVlZs6.js"),[]).then(t=>U(t.q))}}),D.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return B(()=>import("./r-DUYO_cvP.js"),[]).then(t=>U(t.r))}}),D.of({name:"RPM Changes",load(){return B(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>U(t.rpmChanges))}}),D.of({name:"RPM Spec",extensions:["spec"],load(){return B(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>U(t.rpmSpec))}}),D.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return B(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>U(t.ruby))}}),D.of({name:"SAS",extensions:["sas"],load(){return B(()=>import("./sas-B4kiWyti.js"),[]).then(t=>U(t.sas))}}),D.of({name:"Scala",extensions:["scala"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.scala))}}),D.of({name:"Scheme",extensions:["scm","ss"],load(){return B(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>U(t.scheme))}}),D.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return B(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>U(t.shell))}}),D.of({name:"Sieve",extensions:["siv","sieve"],load(){return B(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>U(t.sieve))}}),D.of({name:"Smalltalk",extensions:["st"],load(){return B(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>U(t.smalltalk))}}),D.of({name:"Solr",load(){return B(()=>import("./solr-DehyRSwq.js"),[]).then(t=>U(t.solr))}}),D.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.sml))}}),D.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return B(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>U(t.sparql))}}),D.of({name:"Spreadsheet",alias:["excel","formula"],load(){return B(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>U(t.spreadsheet))}}),D.of({name:"Squirrel",extensions:["nut"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.squirrel))}}),D.of({name:"Stylus",extensions:["styl"],load(){return B(()=>import("./stylus-B533Al4x.js"),[]).then(t=>U(t.stylus))}}),D.of({name:"Swift",extensions:["swift"],load(){return B(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>U(t.swift))}}),D.of({name:"sTeX",load(){return B(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>U(t.stex))}}),D.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return B(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>U(t.stex))}}),D.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return B(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>U(t.verilog))}}),D.of({name:"Tcl",extensions:["tcl"],load(){return B(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>U(t.tcl))}}),D.of({name:"Textile",extensions:["textile"],load(){return B(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>U(t.textile))}}),D.of({name:"TiddlyWiki",load(){return B(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>U(t.tiddlyWiki))}}),D.of({name:"Tiki wiki",load(){return B(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>U(t.tiki))}}),D.of({name:"TOML",extensions:["toml"],load(){return B(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>U(t.toml))}}),D.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return B(()=>import("./troff-wAsdV37c.js"),[]).then(t=>U(t.troff))}}),D.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return B(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>U(t.ttcn))}}),D.of({name:"TTCN_CFG",extensions:["cfg"],load(){return B(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>U(t.ttcnCfg))}}),D.of({name:"Turtle",extensions:["ttl"],load(){return B(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>U(t.turtle))}}),D.of({name:"Web IDL",extensions:["webidl"],load(){return B(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>U(t.webIDL))}}),D.of({name:"VB.NET",extensions:["vb"],load(){return B(()=>import("./vb-CmGdzxic.js"),[]).then(t=>U(t.vb))}}),D.of({name:"VBScript",extensions:["vbs"],load(){return B(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>U(t.vbScript))}}),D.of({name:"Velocity",extensions:["vtl"],load(){return B(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>U(t.velocity))}}),D.of({name:"Verilog",extensions:["v"],load(){return B(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>U(t.verilog))}}),D.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return B(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>U(t.vhdl))}}),D.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return B(()=>import("./xquery-CQfU5ijd.js"),[]).then(t=>U(t.xQuery))}}),D.of({name:"Yacas",extensions:["ys"],load(){return B(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>U(t.yacas))}}),D.of({name:"Z80",extensions:["z80"],load(){return B(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>U(t.z80))}}),D.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.mscgen))}}),D.of({name:"Xù",extensions:["xu"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.xu))}}),D.of({name:"MsGenny",extensions:["msgenny"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.msgenny))}}),D.of({name:"Vue",extensions:["vue"],load(){return B(()=>import("./index-B1YTM6Ei.js"),[]).then(t=>t.vue())}}),D.of({name:"Angular Template",load(){return B(()=>import("./index-WATjATUO.js"),[]).then(t=>t.angular())}})];function $Oe({symbols:t,currentLine:e,onSymbolClick:n,onLoadGraph:r,onNavigate:i,className:s}){const[o,a]=g.useState(null),[l,c]=g.useState(null),[u,f]=g.useState(!1),d=g.useCallback(async h=>{if(n(h),o===h.id){a(null),c(null);return}if(a(h.id),c(null),r){f(!0);try{const O=await r(h);c(O)}catch(O){console.error("Failed to load graph:",O)}finally{f(!1)}}},[o,n,r]);return t.length===0?p.jsx("div",{className:le("text-center py-4 text-sm text-muted-foreground",s),children:"No symbols found"}):p.jsx(Jl,{className:le("max-h-[50vh]",s),children:p.jsx("div",{className:"py-1",children:t.map((h,O)=>p.jsx(QOe,{symbol:h,currentLine:e,isExpanded:o===h.id,graphData:o===h.id?l:null,isLoadingGraph:o===h.id&&u,onSymbolClick:d,onNavigate:i,depth:0},`${h.id}-${O}`))})})}function QOe({symbol:t,currentLine:e,isExpanded:n,graphData:r,isLoadingGraph:i,onSymbolClick:s,onNavigate:o,depth:a}){const l=e!==void 0&&e>=t.line&&(!t.endLine||e<=t.endLine),c=IOe(t.type),u=NOe(t.type),f=r&&(r.refs.length>0||r.callers.length>0||r.callees.length>0||r.hierarchy.extends.length>0||r.hierarchy.implements.length>0||r.hierarchy.extendedBy.length>0||r.hierarchy.implementedBy.length>0);return p.jsxs("div",{children:[p.jsxs("button",{onClick:()=>s(t),className:le("w-full flex items-center gap-1.5 px-2 py-1 text-left text-sm","hover:bg-accent/50 transition-colors",l&&"bg-accent",n&&"bg-muted/50"),style:{paddingLeft:`${a*12+8}px`},children:[n?p.jsx(aa,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}):p.jsx(Lm,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),p.jsx(c,{className:le("h-4 w-4 flex-shrink-0",u)}),p.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),p.jsxs("span",{className:"ml-auto text-xs text-muted-foreground flex-shrink-0",children:[":",t.line]})]}),n&&p.jsx("div",{className:"border-l border-muted ml-4 pl-2 py-1 text-xs font-mono bg-muted/20",children:i?p.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground py-1 px-2",children:[p.jsx(Un,{className:"h-3 w-3 animate-spin"}),p.jsx("span",{children:"loading..."})]}):f?p.jsx(AOe,{data:r,onNavigate:o}):p.jsx("div",{className:"text-muted-foreground py-1 px-2",children:"no graph data"})})]})}function AOe({data:t,onNavigate:e}){return p.jsxs("div",{className:"space-y-1",children:[t.refs.length>0&&p.jsx(go,{label:"refs",items:t.refs.map(n=>({text:`${n.file}:${n.line}`,file:n.file,line:n.line,suffix:n.type})),onNavigate:e}),t.callers.length>0&&p.jsx(go,{label:"callers",items:t.callers.map(n=>({text:n.name,file:n.file,line:n.line,suffix:`${oR(n.file)}:${n.line}`})),onNavigate:e}),t.callees.length>0&&p.jsx(go,{label:"calls",items:t.callees.map(n=>({text:n.name,file:n.file,line:n.line,suffix:`${oR(n.file)}:${n.line}`})),onNavigate:e}),t.hierarchy.extends.length>0&&p.jsx(go,{label:"extends",items:t.hierarchy.extends.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.implements.length>0&&p.jsx(go,{label:"implements",items:t.hierarchy.implements.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.extendedBy.length>0&&p.jsx(go,{label:"extended by",items:t.hierarchy.extendedBy.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.implementedBy.length>0&&p.jsx(go,{label:"implemented by",items:t.hierarchy.implementedBy.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e})]})}function go({label:t,items:e,onNavigate:n}){const i=e.slice(0,5),s=e.length-5;return p.jsxs("div",{className:"px-2",children:[p.jsxs("span",{className:"text-muted-foreground",children:[t,":"]}),i.map((o,a)=>p.jsxs("span",{children:[" ",n?p.jsx("button",{onClick:()=>n(o.file,o.line),className:"text-blue-500 hover:underline",children:o.text}):p.jsx("span",{children:o.text}),o.suffix&&p.jsxs("span",{className:"text-muted-foreground",children:[" (",o.suffix,")"]}),a<i.length-1&&p.jsx("span",{className:"text-muted-foreground",children:","})]},a)),s>0&&p.jsxs("span",{className:"text-muted-foreground",children:[" +",s," more"]})]})}function oR(t){const e=t.split("/");return e.length>2?`.../${e.slice(-2).join("/")}`:t}function IOe(t){switch(t){case"function":return iZ;case"class":return rZ;case"method":return ou;case"interface":return lZ;case"type":return PZ;case"enum":return rQ;case"variable":case"constant":return EZ;case"property":return ou;default:return ou}}function NOe(t){switch(t){case"function":return"text-purple-500";case"class":return"text-yellow-500";case"method":return"text-blue-500";case"interface":return"text-cyan-500";case"type":return"text-green-500";case"enum":return"text-orange-500";case"variable":case"constant":return"text-red-500";case"property":return"text-gray-500";default:return"text-muted-foreground"}}function jOe({symbols:t}){let e=0;function n(r){for(const i of r)e++,i.children&&n(i.children)}return n(t),e===0?null:p.jsxs("span",{className:"text-xs text-muted-foreground",children:[e," symbols"]})}const MOe={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",html:"html",css:"css",scss:"scss",less:"less",json:"json",yaml:"yaml",yml:"yaml",md:"markdown",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",dockerfile:"dockerfile",vue:"vue",svelte:"svelte"};function DOe(t){var n;const e=((n=t.split(".").pop())==null?void 0:n.toLowerCase())||"";return MOe[e]||"text"}function LOe({filePath:t,content:e,language:n,onClose:r,className:i}){const s=g.useRef(null),[o,a]=g.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark")),[l,c]=g.useState([]),[u,f]=g.useState(!1),[d,h]=g.useState([]),[O,m]=g.useState(!1),[x,y]=g.useState(),v=g.useRef(null),{navigateToFile:b,setActiveTab:S}=Af(),k=n||DOe(t);g.useEffect(()=>{const Q=document.documentElement,L=()=>{a(Q.classList.contains("dark"))};L();const z=new MutationObserver(L);return z.observe(Q,{attributes:!0,attributeFilter:["class"]}),()=>z.disconnect()},[]),g.useEffect(()=>{let Q=!1;async function L(){f(!0);try{let z=D.matchFilename(ov,t)||(n?D.matchLanguageName(ov,n):null)||D.matchLanguageName(ov,k);if(!z){c([]);return}const X=await z.load();Q||c([X])}catch(z){Q||(console.error("Failed to load language support:",z),c([]))}finally{Q||f(!1)}}return L(),()=>{Q=!0}},[k,t,n]);const w=g.useMemo(()=>[_e.readOnly.of(!0),re.editable.of(!1),$g(mL,{fallback:!0}),...l],[l]);g.useEffect(()=>{m(!0),zOe(t).then(Q=>{h(Q)}).finally(()=>m(!1))},[t]);const C=g.useCallback(Q=>{const L=s.current;if(!L)return;const z=L.state.doc.lines,X=Math.max(1,Math.min(Q,z)),W=L.state.doc.line(X).from;L.dispatch({selection:Z.cursor(W),effects:re.scrollIntoView(W,{y:"center"})})},[]),_=g.useCallback(Q=>{y(Q.line),C(Q.line)},[C]),I=g.useCallback(async Q=>{try{const L=new URLSearchParams({symbolId:Q.id}),[z,X,W]=await Promise.all([Ga.get(`/api/code/graph/refs?${L}`).catch(()=>null),Ga.get(`/api/code/graph/calls?${L}`).catch(()=>null),Ga.get(`/api/code/graph/hierarchy?${L}`).catch(()=>null)]);return{refs:((z==null?void 0:z.references)??[]).map(F=>({file:F.file,line:F.line,type:F.type})),callers:((X==null?void 0:X.callers)??[]).map(F=>{var j,A;return{name:F.symbol.symbolName,file:((j=F.callSites[0])==null?void 0:j.file)??F.symbol.path,line:((A=F.callSites[0])==null?void 0:A.line)??1}}),callees:((X==null?void 0:X.callees)??[]).map(F=>{var j,A;return{name:F.symbol.symbolName,file:((j=F.callSites[0])==null?void 0:j.file)??F.symbol.path,line:((A=F.callSites[0])==null?void 0:A.line)??1}}),hierarchy:{extends:((W==null?void 0:W.extends)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),implements:((W==null?void 0:W.implements)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),extendedBy:((W==null?void 0:W.extendedBy)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),implementedBy:((W==null?void 0:W.implementedBy)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine}))}}}catch(L){return console.error("Failed to load graph data:",L),null}},[]),E=g.useCallback(async(Q,L)=>{if(Q===t){y(L),C(L);return}S("code"),await b(Q)},[t,b,C,S]),N=t.split("/").pop()||t;return g.useEffect(()=>{x&&C(x)},[x,C]),p.jsxs("div",{className:le("flex flex-col h-full bg-background",i),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(rn,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),p.jsx("span",{className:"font-medium truncate",children:N}),p.jsx(gt,{variant:"outline",className:"text-xs flex-shrink-0",children:k})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>window.open(`vscode://file/${t}`,"_blank"),children:p.jsx(cZ,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Open in VS Code"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:r,children:p.jsx(Ol,{className:"h-4 w-4"})})}),p.jsx(yn,{children:"Close"})]})]})]}),p.jsxs(xw,{className:"border-b",children:[p.jsxs(bw,{className:"w-full px-4 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(mZ,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Symbols"}),O?p.jsx(Un,{className:"h-3 w-3 animate-spin text-muted-foreground"}):p.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",d.length,")"]})]}),p.jsx(aa,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsx(ww,{children:p.jsx($Oe,{symbols:d,currentLine:x,onSymbolClick:_,onLoadGraph:I,onNavigate:E,className:"border-t"})})]}),p.jsx(Jl,{className:"flex-1",ref:v,children:p.jsx("div",{className:"p-4",children:e?p.jsx("div",{className:"code-viewer code-viewer-cm text-sm font-mono",children:p.jsx(cS,{value:e,theme:o?lS:COe,extensions:w,readOnly:!0,onCreateEditor:Q=>{s.current=Q},basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,searchKeymap:!0,history:!1,autocompletion:!1,syntaxHighlighting:!0}},`${t}:${o?"dark":"light"}`)}):p.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin mr-2"}),"Loading content..."]})})}),p.jsxs("div",{className:"border-t px-4 py-2 flex items-center justify-between text-xs text-muted-foreground bg-muted/5",children:[p.jsx(jOe,{symbols:d}),p.jsxs("div",{className:"flex items-center gap-4",children:[e&&p.jsxs("span",{children:[e.split(`
|
|
507
|
+
`).length," lines"]}),p.jsx(gt,{variant:"success",className:"text-xs",children:"Up to date"})]})]})]})}async function zOe(t){try{const e=new URLSearchParams({name:"*",path:t,limit:"200"}),n=await Ga.get(`/api/code/symbols?${e}`),r=new Set(["function","class","method","interface","type","enum","variable","constant","property"]);return(n.symbols||[]).filter(i=>r.has(i.type)).map(i=>({id:i.id,name:i.name,type:i.type,line:i.startLine,endLine:i.endLine})).sort((i,s)=>i.line-s.line)}catch(e){console.error("Failed to fetch symbols:",e)}return[]}function BOe(){const{selectedFile:t,selectedFileContent:e,clearSelection:n,activeTab:r,navigateToFile:i}=Af();return t?p.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:p.jsx(Zu,{children:r==="notes"?p.jsx(yOe,{notePath:t,content:e,onClose:n,onNavigate:i}):p.jsx(LOe,{filePath:t,content:e,onClose:n})})}):p.jsx("main",{className:"flex-1 flex items-center justify-center bg-muted/5",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsx("div",{className:"text-6xl mb-4",children:r==="notes"?p.jsx(sn,{className:"h-16 w-16 mx-auto opacity-20"}):p.jsx(rn,{className:"h-16 w-16 mx-auto opacity-20"})}),p.jsx("p",{className:"text-lg",children:"Select a file to view"}),p.jsxs("p",{className:"text-sm mt-1",children:["Or press"," ",p.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-xs",children:"Cmd+K"})," ","to search"]})]})})}async function VOe(t){const e=await fetch(t);if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}const FOe=sa((t,e)=>({status:null,isLoading:!1,error:null,isGitPanelOpen:!1,fetchStatus:async()=>{t({isLoading:!0,error:null});try{const n=await VOe("/api/git/status");t({status:n,isLoading:!1})}catch(n){t({isLoading:!1,error:n instanceof Error?n.message:"Failed to fetch git status"})}},refresh:async()=>{await e().fetchStatus()},toggleGitPanel:()=>{t(n=>({isGitPanelOpen:!n.isGitPanelOpen}))},openGitPanel:()=>{t({isGitPanelOpen:!0})},closeGitPanel:()=>{t({isGitPanelOpen:!1})}}));function XOe(t){return t?t.uncommitted.staged.length+t.uncommitted.modified.length+t.uncommitted.untracked.length:0}function K3(t){return t?t.sync.notes.commitsBehind+t.sync.code.commitsBehind:0}function ZOe(t){if(!t)return"unknown";const e=XOe(t),n=K3(t);return e>0?"uncommitted":n>0?"behind":"synced"}function WOe(){const{currentProject:t}=oa(),{isConnected:e,notesSyncProgress:n,codeSyncProgress:r}=Qf(),{status:i}=FOe(),s=ZOe(i),o=K3(i),a=(n==null?void 0:n.status)==="syncing"||(n==null?void 0:n.status)==="paused",l=(r==null?void 0:r.status)==="syncing"||(r==null?void 0:r.status)==="paused",c=a?n:l?r:null;return t?p.jsxs("footer",{className:"border-t bg-muted/30 px-4 py-1.5 flex items-center justify-between text-xs",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Vu,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:(i==null?void 0:i.branch)||"main"})]}),s==="synced"&&p.jsxs("div",{className:"flex items-center gap-1 text-green-600 dark:text-green-400",children:[p.jsx(Gi,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"In sync"})]}),s==="behind"&&p.jsxs("div",{className:"flex items-center gap-1 text-yellow-600 dark:text-yellow-400",children:[p.jsx(If,{className:"h-3.5 w-3.5"}),p.jsxs("span",{children:[o," commits behind"]})]}),s==="uncommitted"&&p.jsxs("div",{className:"flex items-center gap-1 text-orange-600 dark:text-orange-400",children:[p.jsx(sQ,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Uncommitted changes"})]})]}),c&&p.jsx("div",{className:"flex-1 max-w-xs mx-4",children:p.jsxs("div",{className:"flex items-center gap-2",children:[c.status==="paused"?p.jsx(yp,{className:"h-3.5 w-3.5 text-yellow-500"}):p.jsx(ui,{className:"h-3.5 w-3.5 text-blue-500 animate-spin"}),c.target==="notes"?p.jsx(sn,{className:"h-3.5 w-3.5 text-blue-500"}):p.jsx(rn,{className:"h-3.5 w-3.5 text-orange-500"}),p.jsx(Cw,{value:c.progress,className:"h-1.5 flex-1"}),p.jsx("span",{className:"text-muted-foreground w-16 text-right",children:c.status==="paused"?"Paused":`${c.progress}%`})]})}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(sn,{className:"h-3.5 w-3.5"}),"247 docs"]}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(rn,{className:"h-3.5 w-3.5"}),"89 files"]})]}),p.jsx("div",{className:le("flex items-center gap-1",e?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:e?p.jsxs(p.Fragment,{children:[p.jsx(_Z,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Connected"})]}):p.jsxs(p.Fragment,{children:[p.jsx(RZ,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Disconnected"})]})})]})]}):null}function qOe({open:t,onOpenChange:e,onProjectOpened:n}){const r=ql(),{openProject:i,fetchCurrentProject:s}=oa(),[o,a]=g.useState(""),[l,c]=g.useState(null),[u,f]=g.useState(!1),[d,h]=g.useState(!1),[O,m]=g.useState(null),x=async k=>{h(!0),m(null);try{const w=await fetch("/api/project/open-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configPath:k})});if(!w.ok){const I=await w.json();throw new Error(I.message||"Failed to open project")}const C=await w.json();await s();const _=Op(C.path,C.name);r(`/${_}`),a(""),c(null),n==null||n()}catch(w){m(w instanceof Error?w.message:"Failed to open project")}finally{h(!1)}},y=async()=>{try{const k=await fetch("/api/project/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"folder"})});if(!k.ok){m("Failed to open file picker");return}const w=await k.json();if(w.cancelled)return;w.path&&v(w.path)}catch{m("Failed to open file picker")}},v=async k=>{if(a(k),m(null),c(null),!k.trim())return;const w=k.endsWith("grepmind.json")||k.endsWith("RAG.config.json")||k.endsWith("indexmcp.json")||k.endsWith(".indexmcp.json");f(!0);try{const C=w?k.replace(/[/\\]?(grepmind\.json|RAG\.config\.json|\.?indexmcp\.json)$/,""):k,_=await fetch(`/api/project/validate?path=${encodeURIComponent(C)}`);if(!_.ok){const E=await _.text();c({valid:!1,error:`Server error (${_.status}): ${E}`});return}const I=await _.json();c(I)}catch(C){console.error("Validation error:",C),c({valid:!1,error:C instanceof Error?C.message:"Failed to validate path"})}finally{f(!1)}},b=async()=>{if(!(!o.trim()||!(l!=null&&l.valid))){h(!0),m(null);try{if(o.endsWith("grepmind.json")||o.endsWith("RAG.config.json")||o.endsWith("indexmcp.json")||o.endsWith(".indexmcp.json"))await x(o);else{await i(o);const w=Op(l.path,l.name);r(`/${w}`),a(""),c(null),n==null||n()}}catch(k){m(k instanceof Error?k.message:"Failed to open project")}finally{h(!1)}}},S=()=>{a(""),c(null),m(null),e(!1)};return p.jsx(Wu,{open:t,onOpenChange:S,children:p.jsxs(xl,{className:"sm:max-w-md",children:[p.jsxs(Vo,{children:[p.jsx(Xo,{children:"Open Project"}),p.jsxs(Zo,{children:["Select or enter the path to"," ",p.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"grepmind.json"})]})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Config File Path"}),p.jsxs("div",{className:"relative",children:[p.jsx(uZ,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),p.jsx(fn,{value:o,onChange:k=>v(k.target.value),placeholder:"/path/to/project/grepmind.json",className:"pl-9",autoFocus:!0}),u&&p.jsx(Un,{className:"absolute right-3 top-3 h-4 w-4 animate-spin text-muted-foreground"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter full path to grepmind.json or the project folder"})]}),p.jsxs(Qe,{type:"button",variant:"outline",onClick:y,className:"w-full",children:[p.jsx(Gb,{className:"h-4 w-4 mr-2"}),"Browse..."]}),l&&p.jsx("div",{className:le("p-3 rounded-lg border",l.valid?"bg-green-500/10 border-green-500/20":"bg-destructive/10 border-destructive/20"),children:l.valid?p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Gi,{className:"h-5 w-5 text-green-500 flex-shrink-0"}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("p",{className:"font-medium",children:l.name}),p.jsxs("div",{className:"flex flex-wrap gap-1",children:[l.hasVault&&p.jsx(gt,{variant:"secondary",className:"text-xs",children:"Docs"}),l.hasCode&&p.jsx(gt,{variant:"secondary",className:"text-xs",children:"Code"})]})]})]}):p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Invalid project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:l.error||"No grepmind.json found"})]})]})}),O&&p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 border border-destructive/20",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Failed to open project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:O})]})]})}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Enter the path to"," ",p.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"grepmind.json"})," ","file or the project folder containing it."]})]}),p.jsxs(Fo,{children:[p.jsx(Qe,{variant:"outline",onClick:S,children:"Cancel"}),p.jsx(Qe,{onClick:b,disabled:!(l!=null&&l.valid)||d,children:d?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Opening..."]}):"Open Project"})]})]})})}function YOe(){const t=ql(),{recentProjects:e,openProject:n,removeRecentProject:r,error:i,isLoading:s}=oa(),[o,a]=g.useState(!1),[l,c]=g.useState(null),u=async(f,d)=>{c(f);try{await n(f);const h=Op(f,d);t(`/${h}`)}catch(h){console.error("Failed to open project:",h)}finally{c(null)}};return p.jsxs("div",{className:"container max-w-2xl mx-auto py-12 px-4",children:[p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Grepmind"}),p.jsx("p",{className:"text-muted-foreground",children:"Manage and search your docs and code index"})]}),i&&p.jsxs("div",{className:"mb-6 p-4 rounded-lg bg-destructive/10 border border-destructive/20 flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Failed to open project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})]}),e.length>0&&p.jsxs("div",{className:"mb-8",children:[p.jsxs("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[p.jsx(If,{className:"h-5 w-5"}),"Recent Projects"]}),p.jsx("div",{className:"space-y-2",children:e.map(f=>p.jsx(UOe,{project:f,onOpen:()=>u(f.path,f.name),onRemove:r,isOpening:l===f.path},f.path))})]}),p.jsxs("div",{className:"flex flex-col items-center gap-4",children:[p.jsxs(Qe,{size:"lg",onClick:()=>a(!0),disabled:s,className:"gap-2",children:[p.jsx(Gb,{className:"h-5 w-5"}),"Open Project"]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Select a folder containing ",p.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"grepmind.json"})]})]}),e.length===0&&p.jsxs("div",{className:"text-center py-12",children:[p.jsx(zm,{className:"h-16 w-16 mx-auto text-muted-foreground/30 mb-4"}),p.jsx("h3",{className:"font-medium text-lg mb-2",children:"No recent projects"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"Open a project folder to get started"})]}),p.jsx(qOe,{open:o,onOpenChange:a,onProjectOpened:()=>a(!1)})]})}function UOe({project:t,onOpen:e,onRemove:n,isOpening:r}){return p.jsxs("div",{className:le("group flex items-center gap-3 p-3 rounded-lg border","hover:bg-accent/50 transition-colors cursor-pointer",r&&"opacity-70 pointer-events-none"),onClick:e,children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(zm,{className:"h-8 w-8 text-primary/70"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"font-medium truncate",children:t.name}),p.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.path})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:OW(t.lastOpened)}),p.jsx(Zu,{children:p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Qe,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:i=>{i.stopPropagation(),n(t.path)},children:p.jsx(ew,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"})})}),p.jsx(yn,{children:"Remove from recent"})]})}),r?p.jsx("div",{className:"h-4 w-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}):p.jsx(Hb,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})}function HOe(t){const e=GOe(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(JOe);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function GOe(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=tye(i),a=eye(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var KOe=Symbol("radix.slottable");function JOe(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===KOe}function eye(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function tye(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var nye=[" ","Enter","ArrowUp","ArrowDown"],rye=[" ","Enter"],ea="Select",[Dg,Lg,iye]=_w(ea),[dc]=Cn(ea,[iye,ro]),zg=ro(),[sye,oo]=dc(ea),[oye,aye]=dc(ea),J3=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:h,form:O}=t,m=zg(e),[x,y]=g.useState(null),[v,b]=g.useState(null),[S,k]=g.useState(!1),w=zf(c),[C,_]=Xs({prop:r,defaultProp:i??!1,onChange:s,caller:ea}),[I,E]=Xs({prop:o,defaultProp:a,onChange:l,caller:ea}),N=g.useRef(null),Q=x?O||!!x.closest("form"):!0,[L,z]=g.useState(new Set),X=Array.from(L).map(W=>W.props.value).join(";");return p.jsx(LQ,{...m,children:p.jsxs(sye,{required:h,scope:e,trigger:x,onTriggerChange:y,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:qt(),value:I,onValueChange:E,open:C,onOpenChange:_,dir:w,triggerPointerDownPosRef:N,disabled:d,children:[p.jsx(Dg.Provider,{scope:e,children:p.jsx(oye,{scope:t.__scopeSelect,onNativeOptionAdd:g.useCallback(W=>{z(F=>new Set(F).add(W))},[]),onNativeOptionRemove:g.useCallback(W=>{z(F=>{const j=new Set(F);return j.delete(W),j})},[]),children:n})}),Q?p.jsxs(S4,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:W=>E(W.target.value),disabled:d,form:O,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},X):null]})})};J3.displayName=ea;var e4="SelectTrigger",t4=g.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...i}=t,s=zg(n),o=oo(e4,n),a=o.disabled||r,l=Ce(e,o.onTriggerChange),c=Lg(n),u=g.useRef("touch"),[f,d,h]=C4(m=>{const x=c().filter(b=>!b.disabled),y=x.find(b=>b.value===o.value),v=P4(x,m,y);v!==void 0&&o.onValueChange(v.value)}),O=m=>{a||(o.onOpenChange(!0),h()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(jf,{asChild:!0,...s,children:p.jsx(ue.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":k4(o.value)?"":void 0,...i,ref:l,onClick:ne(i.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&O(m)}),onPointerDown:ne(i.onPointerDown,m=>{u.current=m.pointerType;const x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(O(m),m.preventDefault())}),onKeyDown:ne(i.onKeyDown,m=>{const x=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(x&&m.key===" ")&&nye.includes(m.key)&&(O(),m.preventDefault())})})})});t4.displayName=e4;var n4="SelectValue",r4=g.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...a}=t,l=oo(n4,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=Ce(e,l.onValueNodeChange);return Rt(()=>{c(u)},[c,u]),p.jsx(ue.span,{...a,ref:f,style:{pointerEvents:"none"},children:k4(l.value)?p.jsx(p.Fragment,{children:o}):s})});r4.displayName=n4;var lye="SelectIcon",i4=g.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return p.jsx(ue.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});i4.displayName=lye;var cye="SelectPortal",s4=t=>p.jsx(Mf,{asChild:!0,...t});s4.displayName=cye;var ta="SelectContent",o4=g.forwardRef((t,e)=>{const n=oo(ta,t.__scopeSelect),[r,i]=g.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Xl.createPortal(p.jsx(a4,{scope:t.__scopeSelect,children:p.jsx(Dg.Slot,{scope:t.__scopeSelect,children:p.jsx("div",{children:t.children})})}),s):null}return p.jsx(l4,{...t,ref:e})});o4.displayName=ta;var Qr=10,[a4,ao]=dc(ta),uye="SelectContentImpl",fye=HOe("SelectContent.RemoveScroll"),l4=g.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:O,hideWhenDetached:m,avoidCollisions:x,...y}=t,v=oo(ta,n),[b,S]=g.useState(null),[k,w]=g.useState(null),C=Ce(e,Y=>S(Y)),[_,I]=g.useState(null),[E,N]=g.useState(null),Q=Lg(n),[L,z]=g.useState(!1),X=g.useRef(!1);g.useEffect(()=>{if(b)return Jm(b)},[b]),Gm();const W=g.useCallback(Y=>{const[pe,...me]=Q().map(Ne=>Ne.ref.current),[ye]=me.slice(-1),Pe=document.activeElement;for(const Ne of Y)if(Ne===Pe||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===pe&&k&&(k.scrollTop=0),Ne===ye&&k&&(k.scrollTop=k.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==Pe))return},[Q,k]),F=g.useCallback(()=>W([_,b]),[W,_,b]);g.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:j,triggerPointerDownPosRef:A}=v;g.useEffect(()=>{if(b){let Y={x:0,y:0};const pe=ye=>{var Pe,Ne;Y={x:Math.abs(Math.round(ye.pageX)-(((Pe=A.current)==null?void 0:Pe.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((Ne=A.current)==null?void 0:Ne.y)??0))}},me=ye=>{Y.x<=10&&Y.y<=10?ye.preventDefault():b.contains(ye.target)||j(!1),document.removeEventListener("pointermove",pe),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",me,{capture:!0})}}},[b,j,A]),g.useEffect(()=>{const Y=()=>j(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[j]);const[P,M]=C4(Y=>{const pe=Q().filter(Pe=>!Pe.disabled),me=pe.find(Pe=>Pe.ref.current===document.activeElement),ye=P4(pe,Y,me);ye&&setTimeout(()=>ye.ref.current.focus())}),$=g.useCallback((Y,pe,me)=>{const ye=!X.current&&!me;(v.value!==void 0&&v.value===pe||ye)&&(I(Y),ye&&(X.current=!0))},[v.value]),R=g.useCallback(()=>b==null?void 0:b.focus(),[b]),q=g.useCallback((Y,pe,me)=>{const ye=!X.current&&!me;(v.value!==void 0&&v.value===pe||ye)&&N(Y)},[v.value]),H=r==="popper"?z0:c4,ie=H===z0?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:O,hideWhenDetached:m,avoidCollisions:x}:{};return p.jsx(a4,{scope:n,content:b,viewport:k,onViewportChange:w,itemRefCallback:$,selectedItem:_,onItemLeave:R,itemTextRefCallback:q,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:L,searchRef:P,children:p.jsx(Lf,{as:fye,allowPinchZoom:!0,children:p.jsx(Df,{asChild:!0,trapped:v.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:ne(i,Y=>{var pe;(pe=v.trigger)==null||pe.focus({preventScroll:!0}),Y.preventDefault()}),children:p.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:p.jsx(H,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:Y=>Y.preventDefault(),...y,...ie,onPlaced:()=>z(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ne(y.onKeyDown,Y=>{const pe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!pe&&Y.key.length===1&&M(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ye=Q().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const Pe=Y.target,Ne=ye.indexOf(Pe);ye=ye.slice(Ne+1)}setTimeout(()=>W(ye)),Y.preventDefault()}})})})})})})});l4.displayName=uye;var dye="SelectItemAlignedPosition",c4=g.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,s=oo(ta,n),o=ao(ta,n),[a,l]=g.useState(null),[c,u]=g.useState(null),f=Ce(e,C=>u(C)),d=Lg(n),h=g.useRef(!1),O=g.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:y,focusSelectedItem:v}=o,b=g.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&x&&y){const C=s.trigger.getBoundingClientRect(),_=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),E=y.getBoundingClientRect();if(s.dir!=="rtl"){const Pe=E.left-_.left,Ne=I.left-Pe,St=C.left-Ne,ln=C.width+St,Gr=Math.max(ln,_.width),Sr=window.innerWidth-Qr,Kr=mx(Ne,[Qr,Math.max(Qr,Sr-Gr)]);a.style.minWidth=ln+"px",a.style.left=Kr+"px"}else{const Pe=_.right-E.right,Ne=window.innerWidth-I.right-Pe,St=window.innerWidth-C.right-Ne,ln=C.width+St,Gr=Math.max(ln,_.width),Sr=window.innerWidth-Qr,Kr=mx(Ne,[Qr,Math.max(Qr,Sr-Gr)]);a.style.minWidth=ln+"px",a.style.right=Kr+"px"}const N=d(),Q=window.innerHeight-Qr*2,L=m.scrollHeight,z=window.getComputedStyle(c),X=parseInt(z.borderTopWidth,10),W=parseInt(z.paddingTop,10),F=parseInt(z.borderBottomWidth,10),j=parseInt(z.paddingBottom,10),A=X+W+L+j+F,P=Math.min(x.offsetHeight*5,A),M=window.getComputedStyle(m),$=parseInt(M.paddingTop,10),R=parseInt(M.paddingBottom,10),q=C.top+C.height/2-Qr,H=Q-q,ie=x.offsetHeight/2,Y=x.offsetTop+ie,pe=X+W+Y,me=A-pe;if(pe<=q){const Pe=N.length>0&&x===N[N.length-1].ref.current;a.style.bottom="0px";const Ne=c.clientHeight-m.offsetTop-m.offsetHeight,St=Math.max(H,ie+(Pe?R:0)+Ne+F),ln=pe+St;a.style.height=ln+"px"}else{const Pe=N.length>0&&x===N[0].ref.current;a.style.top="0px";const St=Math.max(q,X+m.offsetTop+(Pe?$:0)+ie)+me;a.style.height=St+"px",m.scrollTop=pe-q+m.offsetTop}a.style.margin=`${Qr}px 0`,a.style.minHeight=P+"px",a.style.maxHeight=Q+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,c,m,x,y,s.dir,r]);Rt(()=>b(),[b]);const[S,k]=g.useState();Rt(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const w=g.useCallback(C=>{C&&O.current===!0&&(b(),v==null||v(),O.current=!1)},[b,v]);return p.jsx(pye,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:w,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(ue.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});c4.displayName=dye;var hye="SelectPopperPosition",z0=g.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Qr,...s}=t,o=zg(n);return p.jsx(Wm,{...o,...s,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});z0.displayName=hye;var[pye,PS]=dc(ta,{}),B0="SelectViewport",u4=g.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...i}=t,s=ao(B0,n),o=PS(B0,n),a=Ce(e,s.onViewportChange),l=g.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Dg.Slot,{scope:n,children:p.jsx(ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(l.current-u.scrollTop);if(h>0){const O=window.innerHeight-Qr*2,m=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),y=Math.max(m,x);if(y<O){const v=y+h,b=Math.min(O,v),S=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});u4.displayName=B0;var f4="SelectGroup",[mye,gye]=dc(f4),Oye=g.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=qt();return p.jsx(mye,{scope:n,id:i,children:p.jsx(ue.div,{role:"group","aria-labelledby":i,...r,ref:e})})});Oye.displayName=f4;var d4="SelectLabel",h4=g.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=gye(d4,n);return p.jsx(ue.div,{id:i.id,...r,ref:e})});h4.displayName=d4;var gm="SelectItem",[yye,p4]=dc(gm),m4=g.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=t,a=oo(gm,n),l=ao(gm,n),c=a.value===r,[u,f]=g.useState(s??""),[d,h]=g.useState(!1),O=Ce(e,v=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,v,r,i)}),m=qt(),x=g.useRef("touch"),y=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(yye,{scope:n,value:r,disabled:i,textId:m,isSelected:c,onItemTextChange:g.useCallback(v=>{f(b=>b||((v==null?void 0:v.textContent)??"").trim())},[]),children:p.jsx(Dg.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:p.jsx(ue.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:O,onFocus:ne(o.onFocus,()=>h(!0)),onBlur:ne(o.onBlur,()=>h(!1)),onClick:ne(o.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:ne(o.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:ne(o.onPointerDown,v=>{x.current=v.pointerType}),onPointerMove:ne(o.onPointerMove,v=>{var b;x.current=v.pointerType,i?(b=l.onItemLeave)==null||b.call(l):x.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(o.onPointerLeave,v=>{var b;v.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:ne(o.onKeyDown,v=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(rye.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});m4.displayName=gm;var Hc="SelectItemText",g4=g.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...s}=t,o=oo(Hc,n),a=ao(Hc,n),l=p4(Hc,n),c=aye(Hc,n),[u,f]=g.useState(null),d=Ce(e,y=>f(y),l.onItemTextChange,y=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,y,l.value,l.disabled)}),h=u==null?void 0:u.textContent,O=g.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return Rt(()=>(m(O),()=>x(O)),[m,x,O]),p.jsxs(p.Fragment,{children:[p.jsx(ue.span,{id:l.textId,...s,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Xl.createPortal(s.children,o.valueNode):null]})});g4.displayName=Hc;var O4="SelectItemIndicator",y4=g.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p4(O4,n).isSelected?p.jsx(ue.span,{"aria-hidden":!0,...r,ref:e}):null});y4.displayName=O4;var V0="SelectScrollUpButton",v4=g.forwardRef((t,e)=>{const n=ao(V0,t.__scopeSelect),r=PS(V0,t.__scopeSelect),[i,s]=g.useState(!1),o=Ce(e,r.onScrollButtonChange);return Rt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?p.jsx(b4,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});v4.displayName=V0;var F0="SelectScrollDownButton",x4=g.forwardRef((t,e)=>{const n=ao(F0,t.__scopeSelect),r=PS(F0,t.__scopeSelect),[i,s]=g.useState(!1),o=Ce(e,r.onScrollButtonChange);return Rt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?p.jsx(b4,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});x4.displayName=F0;var b4=g.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,s=ao("SelectScrollButton",n),o=g.useRef(null),a=Lg(n),l=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),Rt(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(ue.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:ne(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ne(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ne(i.onPointerLeave,()=>{l()})})}),vye="SelectSeparator",w4=g.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.jsx(ue.div,{"aria-hidden":!0,...r,ref:e})});w4.displayName=vye;var X0="SelectArrow",xye=g.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=zg(n),s=oo(X0,n),o=ao(X0,n);return s.open&&o.position==="popper"?p.jsx(qm,{...i,...r,ref:e}):null});xye.displayName=X0;var bye="SelectBubbleInput",S4=g.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const i=g.useRef(null),s=Ce(r,i),o=rI(e);return g.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const f=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(f)}},[o,e]),p.jsx(ue.select,{...n,style:{...zQ,...n.style},ref:s,defaultValue:e})});S4.displayName=bye;function k4(t){return t===""||t===void 0}function C4(t){const e=Zt(t),n=g.useRef(""),r=g.useRef(0),i=g.useCallback(o=>{const a=n.current+o;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function P4(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=wye(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function wye(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Sye=J3,T4=t4,kye=r4,Cye=i4,Pye=s4,E4=o4,Tye=u4,R4=h4,_4=m4,Eye=g4,Rye=y4,$4=v4,Q4=x4,A4=w4;const Z0=Sye,W0=kye,Om=g.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(T4,{ref:r,className:le("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,p.jsx(Cye,{asChild:!0,children:p.jsx(aa,{className:"h-4 w-4 opacity-50"})})]}));Om.displayName=T4.displayName;const I4=g.forwardRef(({className:t,...e},n)=>p.jsx($4,{ref:n,className:le("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(sZ,{className:"h-4 w-4"})}));I4.displayName=$4.displayName;const N4=g.forwardRef(({className:t,...e},n)=>p.jsx(Q4,{ref:n,className:le("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(aa,{className:"h-4 w-4"})}));N4.displayName=Q4.displayName;const ym=g.forwardRef(({className:t,children:e,position:n="popper",...r},i)=>p.jsx(Pye,{children:p.jsxs(E4,{ref:i,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[p.jsx(I4,{}),p.jsx(Tye,{className:le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),p.jsx(N4,{})]})}));ym.displayName=E4.displayName;const _ye=g.forwardRef(({className:t,...e},n)=>p.jsx(R4,{ref:n,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));_ye.displayName=R4.displayName;const bu=g.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(_4,{ref:r,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Rye,{children:p.jsx(Bu,{className:"h-4 w-4"})})}),p.jsx(Eye,{children:e})]}));bu.displayName=_4.displayName;const $ye=g.forwardRef(({className:t,...e},n)=>p.jsx(A4,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",t),...e}));$ye.displayName=A4.displayName;const Qye=[{value:"wasm",label:"WASM",description:"Runs locally in browser - no API key required",icon:aZ},{value:"voyage",label:"Voyage AI",description:"High-quality embeddings via Voyage AI API",icon:tQ},{value:"ollama",label:"Ollama",description:"Self-hosted Ollama server",icon:Hk},{value:"localai",label:"LocalAI",description:"OpenAI-compatible local embeddings API",icon:Hk}];function Aye(){const{config:t,updateConfig:e,updateNestedConfig:n,errors:r}=Kl(),{voyageApiKey:i,ollamaBaseUrl:s,setVoyageApiKey:o,setOllamaBaseUrl:a,s3AccessKeyId:l,s3SecretAccessKey:c,s3SessionToken:u,s3Region:f,s3Endpoint:d,setS3AccessKeyId:h,setS3SecretAccessKey:O,setS3SessionToken:m,setS3Region:x,setS3Endpoint:y}=Dm(),[v,b]=g.useState(!1),[S,k]=g.useState(!1),[w,C]=g.useState(!1);if(!t)return null;const _=t.lancedb.dbPath.startsWith("s3://"),I=_?"s3":"local",E=t.embedding.provider;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{htmlFor:"name",children:"Project Name"}),p.jsx(fn,{id:"name",value:t.name||"",onChange:N=>e("name",N.target.value),placeholder:"My Notes Project"})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{children:"LanceDB Storage"}),p.jsxs(Z0,{value:I,onValueChange:N=>{N==="s3"&&!_&&e("lancedb",{...t.lancedb,dbPath:"s3://your-bucket/lancedb"}),N==="local"&&_&&e("lancedb",{...t.lancedb,dbPath:"./.lancedb"})},children:[p.jsx(Om,{children:p.jsx(W0,{})}),p.jsxs(ym,{children:[p.jsx(bu,{value:"local",children:"Local Filesystem"}),p.jsx(bu,{value:"s3",children:"Amazon S3"})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(nt,{htmlFor:"lancedbPath",className:"flex items-center gap-2",children:[_?p.jsx(tQ,{className:"h-4 w-4"}):p.jsx(nQ,{className:"h-4 w-4"}),_?"S3 Bucket Path":"LanceDB Path"]}),p.jsx(fn,{id:"lancedbPath",value:t.lancedb.dbPath,onChange:N=>e("lancedb",{...t.lancedb,dbPath:N.target.value}),placeholder:_?"s3://your-bucket/path/to/lancedb":"./.lancedb"})]}),_&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nt,{htmlFor:"s3AccessKeyId",children:"S3 Access Key ID"}),p.jsxs(gt,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Sc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsx(fn,{id:"s3AccessKeyId",value:l||"",onChange:N=>h(N.target.value||null),placeholder:"AKIA..."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nt,{htmlFor:"s3SecretAccessKey",children:"S3 Secret Access Key"}),p.jsxs(gt,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Sc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(fn,{id:"s3SecretAccessKey",type:v?"text":"password",value:c||"",onChange:N=>O(N.target.value||null),placeholder:"••••••••",className:"pr-10"}),p.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>b(!v),children:v?p.jsx(PO,{className:"h-4 w-4"}):p.jsx(TO,{className:"h-4 w-4"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nt,{htmlFor:"s3SessionToken",children:"S3 Session Token (optional)"}),p.jsxs(gt,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Sc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(fn,{id:"s3SessionToken",type:S?"text":"password",value:u||"",onChange:N=>m(N.target.value||null),placeholder:"Optional",className:"pr-10"}),p.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>k(!S),children:S?p.jsx(PO,{className:"h-4 w-4"}):p.jsx(TO,{className:"h-4 w-4"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{htmlFor:"s3Region",children:"S3 Region (optional)"}),p.jsx(fn,{id:"s3Region",value:f||"",onChange:N=>x(N.target.value||null),placeholder:"us-east-1"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{htmlFor:"s3Endpoint",children:"S3 Endpoint (optional)"}),p.jsx(fn,{id:"s3Endpoint",value:d||"",onChange:N=>y(N.target.value||null),placeholder:"https://s3.amazonaws.com"})]})]})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{children:"Embedding Provider"}),p.jsxs(Z0,{value:E,onValueChange:N=>{n("embedding",{provider:N})},children:[p.jsx(Om,{children:p.jsx(W0,{})}),p.jsx(ym,{children:Qye.map(N=>p.jsx(bu,{value:N.value,children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(N.icon,{className:"h-4 w-4"}),p.jsx("span",{children:N.label})]})},N.value))})]})]}),E==="voyage"&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nt,{htmlFor:"voyageApiKey",children:"Voyage API Key"}),p.jsxs(gt,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Sc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(fn,{id:"voyageApiKey",type:w?"text":"password",value:i||"",onChange:N=>o(N.target.value||null),placeholder:"pa-...",className:"pr-10"}),p.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>C(!w),children:w?p.jsx(PO,{className:"h-4 w-4"}):p.jsx(TO,{className:"h-4 w-4"})})]}),r.voyageApiKey&&p.jsx("p",{className:"text-xs text-destructive",children:r.voyageApiKey}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",p.jsx("a",{href:"https://dash.voyageai.com/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"dash.voyageai.com"})]})]}),E==="ollama"&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nt,{htmlFor:"ollamaBaseUrl",children:"Ollama Base URL"}),p.jsxs(gt,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Sc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsx(fn,{id:"ollamaBaseUrl",value:s||"",onChange:N=>a(N.target.value||null),placeholder:"http://localhost:11434"})]})]})]})}function Iye(){var s,o;const{config:t}=Kl();if(!t)return null;const n=(((s=t.vaultPaths)==null?void 0:s.length)??0)>0,r=(((o=t.code.include)==null?void 0:o.length)??0)>0,i=t.code.enabled||r;return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"space-y-4 rounded-lg border p-4",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(sn,{className:"h-4 w-4"}),"Docs Indexing"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Index markdown notes for semantic search"})]}),p.jsxs(gt,{variant:n?"default":"secondary",className:"flex items-center gap-1",children:[n?p.jsx(Bu,{className:"h-3 w-3"}):p.jsx(Ol,{className:"h-3 w-3"}),n?"Enabled":"Disabled"]})]})}),p.jsxs("div",{className:"space-y-4 rounded-lg border p-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(rn,{className:"h-4 w-4"}),"Code Indexing"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Index source code symbols for semantic search"})]}),p.jsxs(gt,{variant:i?"default":"secondary",className:"flex items-center gap-1",children:[i?p.jsx(Bu,{className:"h-3 w-3"}):p.jsx(Ol,{className:"h-3 w-3"}),i?"Enabled":"Disabled"]})]}),i&&p.jsx("div",{className:"border-t pt-4",children:p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(Vu,{className:"h-4 w-4"}),"Code Graph"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Build symbol relationships graph (imports, calls, references)"})]})}),i&&p.jsx("div",{className:"border-t pt-4",children:p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(dZ,{className:"h-4 w-4"}),"Tree Index"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Index file tree structure for context expansion"})]})})]}),i?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-1",children:[p.jsx(nt,{children:"Include Patterns"}),p.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:(t.code.include||[]).join(", ")||"—"})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx(nt,{children:"Exclude Patterns"}),p.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:(t.code.exclude||[]).join(", ")||"—"})]}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Edit ",p.jsx("code",{className:"px-1 py-0.5 bg-muted rounded",children:"grepmind.json"})," to change code indexing settings."]})]}):p.jsxs("div",{className:"rounded-lg border border-dashed p-6 text-center text-muted-foreground",children:[p.jsx(rn,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),p.jsx("p",{className:"text-sm",children:"Code indexing is not configured"}),p.jsxs("p",{className:"text-xs mt-1",children:["Add ",p.jsx("code",{className:"px-1 py-0.5 bg-muted rounded",children:"code.include"})," patterns to ",p.jsx("code",{className:"px-1 py-0.5 bg-muted rounded",children:"grepmind.json"})]})]})]})}function Nye(){const{config:t}=Kl();if(!t)return null;const e=t.gitSync.enabled;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-4 rounded-lg border p-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(Vu,{className:"h-4 w-4"}),"Git Sync"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Sync index with git commits for incremental updates"})]}),p.jsxs(gt,{variant:e?"default":"secondary",className:"flex items-center gap-1",children:[e?p.jsx(Bu,{className:"h-3 w-3"}):p.jsx(Ol,{className:"h-3 w-3"}),e?"Enabled":"Disabled"]})]}),e&&p.jsx("div",{className:"border-t pt-4",children:p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(nt,{className:"flex items-center gap-2",children:[p.jsx(ui,{className:"h-4 w-4"}),"Auto-sync on Startup"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically sync index when project opens"})]})})]}),e&&p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Edit ",p.jsx("code",{className:"px-1 py-0.5 bg-muted rounded",children:"grepmind.json"})," to change git sync settings."]}),!e&&p.jsxs("div",{className:"rounded-lg border border-dashed p-6 text-center text-muted-foreground",children:[p.jsx(Vu,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),p.jsx("p",{className:"text-sm",children:"Git sync uses commit history for efficient incremental updates"}),p.jsx("p",{className:"text-xs mt-1",children:"Only changed files are re-indexed after each sync"})]})]})}function jye(){const{config:t,createPath:e,setCreatePath:n,updateConfig:r,saveConfig:i,closeModal:s,errors:o,isSaving:a}=Kl(),{openProject:l}=oa(),[c,u]=g.useState(null),[f,d]=g.useState(!1),[h,O]=g.useState(null),m=async()=>{try{const v=await fetch("/api/project/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"folder"})});if(!v.ok){u("Failed to open folder picker");return}const b=await v.json();if(b.cancelled)return;if(b.path&&(n(b.path),u(null),!(t!=null&&t.name))){const S=b.path.split("/").pop()||"";r("name",S)}}catch{u("Failed to open folder picker")}},x=async()=>{if(!e.trim()){u("Project path is required");return}u(null),await i()&&(d(!0),O(e))},y=async()=>{h&&(await l(h),s())};return f?p.jsxs(p.Fragment,{children:[p.jsxs(Vo,{children:[p.jsxs(Xo,{className:"flex items-center gap-2",children:[p.jsx(Gi,{className:"h-5 w-5 text-green-500"}),"Project Created"]}),p.jsx(Zo,{children:"Your new project has been created successfully"})]}),p.jsxs("div",{className:"py-8 text-center space-y-4",children:[p.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/10",children:p.jsx(Gi,{className:"h-8 w-8 text-green-500"})}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:(t==null?void 0:t.name)||"New Project"}),p.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:h})]}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"You can configure embedding, code indexing and other settings later in Project Settings."})]}),p.jsxs(Fo,{children:[p.jsx(Qe,{variant:"outline",onClick:s,children:"Close"}),p.jsxs(Qe,{onClick:y,children:[p.jsx(wh,{className:"h-4 w-4 mr-2"}),"Open Project"]})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs(Vo,{children:[p.jsxs(Xo,{className:"flex items-center gap-2",children:[p.jsx(wh,{className:"h-5 w-5"}),"Create New Project"]}),p.jsx(Zo,{children:"Choose a location and name for your project. Other settings can be configured later."})]}),p.jsxs("div",{className:"py-4 space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{htmlFor:"projectPath",children:"Project Directory"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx(zm,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),p.jsx(fn,{id:"projectPath",value:e,onChange:v=>{n(v.target.value),u(null)},placeholder:"/path/to/new/project",className:"pl-9",autoFocus:!0})]}),p.jsxs(Qe,{type:"button",variant:"outline",onClick:m,className:"shrink-0",children:[p.jsx(TZ,{className:"h-4 w-4 mr-2"}),"Browse"]})]}),c&&p.jsxs("p",{className:"text-xs text-destructive flex items-center gap-1",children:[p.jsx(Or,{className:"h-3 w-3"}),c]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(nt,{htmlFor:"projectName",children:"Project Name"}),p.jsx(fn,{id:"projectName",value:(t==null?void 0:t.name)||"",onChange:v=>r("name",v.target.value),placeholder:"My Notes"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Will use folder name if not specified."})]}),p.jsxs("div",{className:"rounded-lg border p-4 bg-muted/30",children:[p.jsx("p",{className:"text-sm font-medium mb-2",children:"The following will be created:"}),p.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 font-mono",children:[p.jsxs("li",{children:[e||"/path/to/project","/"]}),p.jsx("li",{className:"pl-4",children:"grepmind.json"}),p.jsx("li",{className:"pl-4",children:"vault/"}),p.jsx("li",{className:"pl-4",children:".lancedb/"}),p.jsx("li",{className:"pl-4",children:".gitignore"})]})]}),p.jsxs("div",{className:"rounded-lg border p-4 bg-blue-500/5 border-blue-500/20",children:[p.jsx("p",{className:"text-sm text-muted-foreground",children:"Project will be created with default settings:"}),p.jsxs("ul",{className:"text-xs text-muted-foreground mt-2 space-y-1",children:[p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Embedding:"})," Local (WASM) — works offline"]}),p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Vault:"})," ./vault"]}),p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Index:"})," ./.lancedb"]})]}),p.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Configure embedding provider, code indexing and more in Settings after creation."})]}),o._general&&p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 border border-destructive/20",children:p.jsxs("p",{className:"text-sm text-destructive flex items-center gap-2",children:[p.jsx(Or,{className:"h-4 w-4"}),o._general]})})]}),p.jsxs(Fo,{children:[p.jsx(Qe,{variant:"outline",onClick:s,children:"Cancel"}),p.jsx(Qe,{onClick:x,disabled:a,children:a?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating..."]}):p.jsxs(p.Fragment,{children:[p.jsx(wh,{className:"h-4 w-4 mr-2"}),"Create Project"]})})]})]})}const Mye=[{value:"general",label:"General",icon:sn},{value:"code",label:"Index",icon:rn},{value:"gitSync",label:"Git Sync",icon:Vu}];function j4(){const{isOpen:t,mode:e,activeTab:n,setActiveTab:r,closeModal:i,config:s,isDirty:o,isLoading:a,isSaving:l,errors:c,saveConfig:u,resetConfig:f}=Kl(),d=O=>{!O&&o&&!window.confirm("You have unsaved changes. Are you sure you want to close?")||O||i()},h=async()=>{await u()&&e==="edit"&&i()};return e==="create"?p.jsx(Wu,{open:t,onOpenChange:d,children:p.jsx(xl,{className:"max-w-2xl min-h-[600px]",children:p.jsx(jye,{})})}):p.jsx(Wu,{open:t,onOpenChange:d,children:p.jsxs(xl,{className:"max-w-2xl min-h-[600px] max-h-[85vh] !flex flex-col p-0 overflow-hidden",children:[p.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[p.jsxs("div",{className:"sticky top-0 z-10 bg-background border-b px-6 pt-6 pb-4",children:[p.jsxs(Vo,{className:"pb-4",children:[p.jsxs(Xo,{className:"flex items-center gap-2",children:[p.jsx(iQ,{className:"h-5 w-5"}),"Project Settings"]}),p.jsx(Zo,{children:"Configure your project settings"})]}),s&&!a&&!c._general&&p.jsx(Rp,{value:n,onValueChange:O=>r(O),children:p.jsx(og,{className:"grid w-full grid-cols-3",children:Mye.map(O=>p.jsxs(wl,{value:O.value,className:"flex items-center gap-1.5",children:[p.jsx(O.icon,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:O.label})]},O.value))})})]}),p.jsx("div",{className:"px-6 py-4",children:a?p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx(Un,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):c._general?p.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-4",children:[p.jsx(Or,{className:"h-12 w-12 text-destructive"}),p.jsx("p",{className:"text-destructive",children:c._general}),p.jsx(Qe,{variant:"outline",onClick:i,children:"Close"})]}):s?p.jsxs(Rp,{value:n,onValueChange:O=>r(O),children:[p.jsx(Ja,{value:"general",className:"mt-0",children:p.jsx(Aye,{})}),p.jsx(Ja,{value:"code",className:"mt-0",children:p.jsx(Iye,{})}),p.jsx(Ja,{value:"gitSync",className:"mt-0",children:p.jsx(Nye,{})})]}):null})]}),s&&!a&&!c._general&&p.jsxs(Fo,{className:"sticky bottom-0 z-10 bg-background border-t px-6 py-4 gap-2 sm:gap-0",children:[o&&p.jsx(Qe,{variant:"ghost",onClick:f,disabled:l,children:"Reset"}),p.jsx(Qe,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),p.jsx(Qe,{onClick:h,disabled:!o||l,children:l?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):"Save Changes"})]})]})})}var aR=1,Dye=.9,Lye=.8,zye=.17,av=.1,lv=.999,Bye=.9999,Vye=.99,Fye=/[\\\/_+.#"@\[\(\{&]/,Xye=/[\\\/_+.#"@\[\(\{&]/g,Zye=/[\s-]/,M4=/[\s-]/g;function q0(t,e,n,r,i,s,o){if(s===e.length)return i===t.length?aR:Vye;var a=`${i},${s}`;if(o[a]!==void 0)return o[a];for(var l=r.charAt(s),c=n.indexOf(l,i),u=0,f,d,h,O;c>=0;)f=q0(t,e,n,r,c+1,s+1,o),f>u&&(c===i?f*=aR:Fye.test(t.charAt(c-1))?(f*=Lye,h=t.slice(i,c-1).match(Xye),h&&i>0&&(f*=Math.pow(lv,h.length))):Zye.test(t.charAt(c-1))?(f*=Dye,O=t.slice(i,c-1).match(M4),O&&i>0&&(f*=Math.pow(lv,O.length))):(f*=zye,i>0&&(f*=Math.pow(lv,c-i))),t.charAt(c)!==e.charAt(s)&&(f*=Bye)),(f<av&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(d=q0(t,e,n,r,c+1,s+2,o),d*av>f&&(f=d*av)),f>u&&(u=f),c=n.indexOf(l,c+1);return o[a]=u,u}function lR(t){return t.toLowerCase().replace(M4," ")}function Wye(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,q0(t,e,lR(t),lR(e),0,0,{})}var Dc='[cmdk-group=""]',cv='[cmdk-group-items=""]',qye='[cmdk-group-heading=""]',D4='[cmdk-item=""]',cR=`${D4}:not([aria-disabled="true"])`,Y0="cmdk-item-select",Pa="data-value",Yye=(t,e,n)=>Wye(t,e,n),L4=g.createContext(void 0),ed=()=>g.useContext(L4),z4=g.createContext(void 0),TS=()=>g.useContext(z4),B4=g.createContext(void 0),V4=g.forwardRef((t,e)=>{let n=Ta(()=>{var $,R;return{search:"",value:(R=($=t.value)!=null?$:t.defaultValue)!=null?R:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Ta(()=>new Set),i=Ta(()=>new Map),s=Ta(()=>new Map),o=Ta(()=>new Set),a=F4(t),{label:l,children:c,value:u,onValueChange:f,filter:d,shouldFilter:h,loop:O,disablePointerSelection:m=!1,vimBindings:x=!0,...y}=t,v=qt(),b=qt(),S=qt(),k=g.useRef(null),w=sve();na(()=>{if(u!==void 0){let $=u.trim();n.current.value=$,C.emit()}},[u]),na(()=>{w(6,L)},[]);let C=g.useMemo(()=>({subscribe:$=>(o.current.add($),()=>o.current.delete($)),snapshot:()=>n.current,setState:($,R,q)=>{var H,ie,Y,pe;if(!Object.is(n.current[$],R)){if(n.current[$]=R,$==="search")Q(),E(),w(1,N);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let me=document.getElementById(S);me?me.focus():(H=document.getElementById(v))==null||H.focus()}if(w(7,()=>{var me;n.current.selectedItemId=(me=z())==null?void 0:me.id,C.emit()}),q||w(5,L),((ie=a.current)==null?void 0:ie.value)!==void 0){let me=R??"";(pe=(Y=a.current).onValueChange)==null||pe.call(Y,me);return}}C.emit()}},emit:()=>{o.current.forEach($=>$())}}),[]),_=g.useMemo(()=>({value:($,R,q)=>{var H;R!==((H=s.current.get($))==null?void 0:H.value)&&(s.current.set($,{value:R,keywords:q}),n.current.filtered.items.set($,I(R,q)),w(2,()=>{E(),C.emit()}))},item:($,R)=>(r.current.add($),R&&(i.current.has(R)?i.current.get(R).add($):i.current.set(R,new Set([$]))),w(3,()=>{Q(),E(),n.current.value||N(),C.emit()}),()=>{s.current.delete($),r.current.delete($),n.current.filtered.items.delete($);let q=z();w(4,()=>{Q(),(q==null?void 0:q.getAttribute("id"))===$&&N(),C.emit()})}),group:$=>(i.current.has($)||i.current.set($,new Set),()=>{s.current.delete($),i.current.delete($)}),filter:()=>a.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:v,inputId:S,labelId:b,listInnerRef:k}),[]);function I($,R){var q,H;let ie=(H=(q=a.current)==null?void 0:q.filter)!=null?H:Yye;return $?ie($,n.current.search,R):0}function E(){if(!n.current.search||a.current.shouldFilter===!1)return;let $=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(H=>{let ie=i.current.get(H),Y=0;ie.forEach(pe=>{let me=$.get(pe);Y=Math.max(me,Y)}),R.push([H,Y])});let q=k.current;X().sort((H,ie)=>{var Y,pe;let me=H.getAttribute("id"),ye=ie.getAttribute("id");return((Y=$.get(ye))!=null?Y:0)-((pe=$.get(me))!=null?pe:0)}).forEach(H=>{let ie=H.closest(cv);ie?ie.appendChild(H.parentElement===ie?H:H.closest(`${cv} > *`)):q.appendChild(H.parentElement===q?H:H.closest(`${cv} > *`))}),R.sort((H,ie)=>ie[1]-H[1]).forEach(H=>{var ie;let Y=(ie=k.current)==null?void 0:ie.querySelector(`${Dc}[${Pa}="${encodeURIComponent(H[0])}"]`);Y==null||Y.parentElement.appendChild(Y)})}function N(){let $=X().find(q=>q.getAttribute("aria-disabled")!=="true"),R=$==null?void 0:$.getAttribute(Pa);C.setState("value",R||void 0)}function Q(){var $,R,q,H;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ie=0;for(let Y of r.current){let pe=(R=($=s.current.get(Y))==null?void 0:$.value)!=null?R:"",me=(H=(q=s.current.get(Y))==null?void 0:q.keywords)!=null?H:[],ye=I(pe,me);n.current.filtered.items.set(Y,ye),ye>0&&ie++}for(let[Y,pe]of i.current)for(let me of pe)if(n.current.filtered.items.get(me)>0){n.current.filtered.groups.add(Y);break}n.current.filtered.count=ie}function L(){var $,R,q;let H=z();H&&((($=H.parentElement)==null?void 0:$.firstChild)===H&&((q=(R=H.closest(Dc))==null?void 0:R.querySelector(qye))==null||q.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function z(){var $;return($=k.current)==null?void 0:$.querySelector(`${D4}[aria-selected="true"]`)}function X(){var $;return Array.from((($=k.current)==null?void 0:$.querySelectorAll(cR))||[])}function W($){let R=X()[$];R&&C.setState("value",R.getAttribute(Pa))}function F($){var R;let q=z(),H=X(),ie=H.findIndex(pe=>pe===q),Y=H[ie+$];(R=a.current)!=null&&R.loop&&(Y=ie+$<0?H[H.length-1]:ie+$===H.length?H[0]:H[ie+$]),Y&&C.setState("value",Y.getAttribute(Pa))}function j($){let R=z(),q=R==null?void 0:R.closest(Dc),H;for(;q&&!H;)q=$>0?rve(q,Dc):ive(q,Dc),H=q==null?void 0:q.querySelector(cR);H?C.setState("value",H.getAttribute(Pa)):F($)}let A=()=>W(X().length-1),P=$=>{$.preventDefault(),$.metaKey?A():$.altKey?j(1):F(1)},M=$=>{$.preventDefault(),$.metaKey?W(0):$.altKey?j(-1):F(-1)};return g.createElement(ue.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:$=>{var R;(R=y.onKeyDown)==null||R.call(y,$);let q=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||q))switch($.key){case"n":case"j":{x&&$.ctrlKey&&P($);break}case"ArrowDown":{P($);break}case"p":case"k":{x&&$.ctrlKey&&M($);break}case"ArrowUp":{M($);break}case"Home":{$.preventDefault(),W(0);break}case"End":{$.preventDefault(),A();break}case"Enter":{$.preventDefault();let H=z();if(H){let ie=new Event(Y0);H.dispatchEvent(ie)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:ave},l),Bg(t,$=>g.createElement(z4.Provider,{value:C},g.createElement(L4.Provider,{value:_},$))))}),Uye=g.forwardRef((t,e)=>{var n,r;let i=qt(),s=g.useRef(null),o=g.useContext(B4),a=ed(),l=F4(t),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;na(()=>{if(!c)return a.item(i,o==null?void 0:o.id)},[c]);let u=X4(i,s,[t.value,t.children,s],t.keywords),f=TS(),d=Ks(w=>w.value&&w.value===u.current),h=Ks(w=>c||a.filter()===!1?!0:w.search?w.filtered.items.get(i)>0:!0);g.useEffect(()=>{let w=s.current;if(!(!w||t.disabled))return w.addEventListener(Y0,O),()=>w.removeEventListener(Y0,O)},[h,t.onSelect,t.disabled]);function O(){var w,C;m(),(C=(w=l.current).onSelect)==null||C.call(w,u.current)}function m(){f.setState("value",u.current,!0)}if(!h)return null;let{disabled:x,value:y,onSelect:v,forceMount:b,keywords:S,...k}=t;return g.createElement(ue.div,{ref:kn(s,e),...k,id:i,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||a.getDisablePointerSelection()?void 0:m,onClick:x?void 0:O},t.children)}),Hye=g.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...s}=t,o=qt(),a=g.useRef(null),l=g.useRef(null),c=qt(),u=ed(),f=Ks(h=>i||u.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);na(()=>u.group(o),[]),X4(o,a,[t.value,t.heading,l]);let d=g.useMemo(()=>({id:o,forceMount:i}),[i]);return g.createElement(ue.div,{ref:kn(a,e),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&g.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Bg(t,h=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},g.createElement(B4.Provider,{value:d},h))))}),Gye=g.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=g.useRef(null),s=Ks(o=>!o.search);return!n&&!s?null:g.createElement(ue.div,{ref:kn(i,e),...r,"cmdk-separator":"",role:"separator"})}),Kye=g.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,s=TS(),o=Ks(c=>c.search),a=Ks(c=>c.selectedItemId),l=ed();return g.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),g.createElement(ue.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:i?t.value:o,onChange:c=>{i||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),Jye=g.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,s=g.useRef(null),o=g.useRef(null),a=Ks(c=>c.selectedItemId),l=ed();return g.useEffect(()=>{if(o.current&&s.current){let c=o.current,u=s.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(f),d.unobserve(c)}}},[]),g.createElement(ue.div,{ref:kn(s,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Bg(t,c=>g.createElement("div",{ref:kn(o,l.listInnerRef),"cmdk-list-sizer":""},c)))}),eve=g.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:o,...a}=t;return g.createElement(xA,{open:n,onOpenChange:r},g.createElement(bA,{container:o},g.createElement(mw,{"cmdk-overlay":"",className:i}),g.createElement(gw,{"aria-label":t.label,"cmdk-dialog":"",className:s},g.createElement(V4,{ref:e,...a}))))}),tve=g.forwardRef((t,e)=>Ks(n=>n.filtered.count===0)?g.createElement(ue.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),nve=g.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...s}=t;return g.createElement(ue.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Bg(t,o=>g.createElement("div",{"aria-hidden":!0},o)))}),En=Object.assign(V4,{List:Jye,Item:Uye,Input:Kye,Group:Hye,Separator:Gye,Dialog:eve,Empty:tve,Loading:nve});function rve(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function ive(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function F4(t){let e=g.useRef(t);return na(()=>{e.current=t}),e}var na=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Ta(t){let e=g.useRef();return e.current===void 0&&(e.current=t()),e}function Ks(t){let e=TS(),n=()=>t(e.snapshot());return g.useSyncExternalStore(e.subscribe,n,n)}function X4(t,e,n,r=[]){let i=g.useRef(),s=ed();return na(()=>{var o;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():i.current}})(),l=r.map(c=>c.trim());s.value(t,a,l),(o=e.current)==null||o.setAttribute(Pa,a),i.current=a}),i}var sve=()=>{let[t,e]=g.useState(),n=Ta(()=>new Map);return na(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function ove(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Bg({asChild:t,children:e},n){return t&&g.isValidElement(e)?g.cloneElement(ove(e),{ref:e.ref},n(e.props.children)):n(e)}var ave={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Z4=g.forwardRef(({className:t,...e},n)=>p.jsx(En,{ref:n,className:le("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));Z4.displayName=En.displayName;const lve=({children:t,shouldFilter:e=!0,className:n,...r})=>p.jsx(Wu,{...r,children:p.jsx(xl,{className:le("overflow-hidden p-0 shadow-lg max-w-lg",n),children:p.jsx(Z4,{shouldFilter:e,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})}),W4=g.forwardRef(({className:t,...e},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(Jb,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(En.Input,{ref:n,className:le("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));W4.displayName=En.Input.displayName;const q4=g.forwardRef(({className:t,...e},n)=>p.jsx(En.List,{ref:n,className:le("overflow-y-auto overflow-x-hidden",t),...e}));q4.displayName=En.List.displayName;const cve=g.forwardRef((t,e)=>p.jsx(En.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));cve.displayName=En.Empty.displayName;const uve=g.forwardRef(({className:t,...e},n)=>p.jsx(En.Group,{ref:n,className:le("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));uve.displayName=En.Group.displayName;const fve=g.forwardRef(({className:t,...e},n)=>p.jsx(En.Separator,{ref:n,className:le("-mx-1 h-px bg-border",t),...e}));fve.displayName=En.Separator.displayName;const dve=g.forwardRef(({className:t,...e},n)=>p.jsx(En.Item,{ref:n,className:le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",t),...e}));dve.displayName=En.Item.displayName;const hve={function:"fn",class:"C",method:"m",interface:"I",type:"T",variable:"v",constant:"c"};function pve(t){return t.toFixed(2)}const mve=[{value:"hybrid",label:"Hybrid"},{value:"semantic",label:"Semantic"},{value:"text",label:"Text"},{value:"grep",label:"Grep"}];function gve({scope:t,mode:e,onScopeChange:n,onModeChange:r}){const i=[{value:"notes",label:"Docs",icon:p.jsx(sn,{className:"h-3 w-3"})},{value:"code",label:"Code",icon:p.jsx(rn,{className:"h-3 w-3"})}];return p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b",children:[p.jsx("div",{className:"flex items-center gap-1",children:i.map(s=>p.jsxs("button",{onClick:()=>n(s.value),className:le("inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors",t===s.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.icon,s.label]},s.value))}),p.jsxs(Z0,{value:e,onValueChange:s=>r(s),children:[p.jsx(Om,{className:"h-7 w-[100px] text-xs",children:p.jsx(W0,{})}),p.jsx(ym,{children:mve.map(s=>p.jsx(bu,{value:s.value,className:"text-xs",children:s.label},s.value))})]})]})}function Y4(){const{query:t,scope:e,mode:n,results:r,isSearching:i,isCommandPaletteOpen:s,setQuery:o,setScope:a,setMode:l,search:c,clearResults:u,resetResults:f,closeCommandPalette:d}=kp(),{selectFile:h,setActiveTab:O}=Af(),[m,x]=g.useState(""),y=g.useCallback(E=>{f(),a(E),t.trim()&&setTimeout(()=>c(),0)},[a,t,c,f]),v=g.useCallback(E=>{f(),l(E),t.trim()&&setTimeout(()=>c(),0)},[l,t,c,f]),b=g.useMemo(()=>vW(()=>{c()},300),[c]),S=g.useCallback(E=>{x(E),o(E),E.trim()?b():u()},[o,b,u]),k=g.useCallback(E=>{h(E.path),O("notes"),d()},[h,O,d]),w=g.useCallback(E=>{h(E.path),O("code"),d()},[h,O,d]);g.useEffect(()=>{s||(x(""),o(""),u())},[s,o,u]);const C=r.notes.length>0||r.code.length>0,_=e==="all"||e==="notes",I=e==="all"||e==="code";return console.log("[CommandPalette] render:",{hasResults:C,showCode:I,codeLength:r.code.length,scope:e,isSearching:i}),p.jsxs(lve,{open:s,onOpenChange:E=>!E&&d(),shouldFilter:!1,className:"max-w-[846px]",children:[p.jsx(W4,{placeholder:"Search docs, code, symbols...",value:m,onValueChange:S}),p.jsx(gve,{scope:e,mode:n,onScopeChange:y,onModeChange:v}),p.jsxs(q4,{className:"min-h-[400px] p-4",children:[i&&!C&&p.jsxs("div",{className:"flex items-center justify-center py-16",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin text-muted-foreground"}),p.jsx("span",{className:"ml-3 text-sm text-muted-foreground",children:"Searching..."})]}),!i&&!C&&p.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:[p.jsx(Jb,{className:"h-12 w-12 mb-4 opacity-40"}),p.jsx("p",{className:"text-sm",children:m.trim()?"No results found":"Start typing to search"})]}),C&&p.jsxs("div",{className:"space-y-6",children:[_&&r.notes.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-xs font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[p.jsx(sn,{className:"h-3.5 w-3.5"}),"Docs (",r.notes.length,")"]}),p.jsx("div",{className:"grid grid-cols-3 gap-3",children:r.notes.slice(0,12).map(E=>{var N;return p.jsxs("button",{onClick:()=>k(E),className:"group relative flex flex-col p-4 rounded-lg border bg-card hover:bg-accent hover:border-accent transition-colors text-left",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(sn,{className:"h-4 w-4 text-blue-500 shrink-0"}),p.jsx("span",{className:"font-medium text-sm truncate",children:E.title||((N=E.path.split("/").pop())==null?void 0:N.replace(".md",""))})]}),p.jsx(gt,{variant:"outline",className:"text-[10px] shrink-0 opacity-60 group-hover:opacity-100",children:pve(E.score)})]}),E.section&&p.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-2",children:[p.jsx(Hb,{className:"h-3 w-3"}),p.jsx("span",{className:"truncate",children:E.section})]}),E.content&&p.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:E.content.slice(0,120)})]},`${E.path}-${E.section}`)})})]}),I&&r.code.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-xs font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[p.jsx(rn,{className:"h-3.5 w-3.5"}),"Code (",r.code.length,")"]}),p.jsx("div",{className:"grid grid-cols-3 gap-3",children:r.code.slice(0,12).map(E=>{var N;return p.jsxs("button",{onClick:()=>w(E),className:"group relative flex flex-col p-4 rounded-lg border bg-card hover:bg-accent hover:border-accent transition-colors text-left",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(rn,{className:"h-4 w-4 text-purple-500 shrink-0"}),p.jsx("span",{className:"font-mono font-medium text-sm truncate",children:E.name})]}),p.jsx(gt,{variant:"secondary",className:"text-[10px] font-mono shrink-0",children:hve[E.type]||E.type})]}),p.jsxs("p",{className:"text-xs text-muted-foreground truncate mb-2",children:[yW(E.relativePath||E.path),E.startLine&&`:${E.startLine}`]}),(E.signature||E.content)&&p.jsx("p",{className:"text-xs text-muted-foreground font-mono line-clamp-2 bg-muted/50 rounded px-2 py-1",children:E.signature||((N=E.content)==null?void 0:N.slice(0,100))})]},E.id)})})]})]}),i&&C&&p.jsxs("div",{className:"flex items-center justify-center py-3 mt-4 border-t",children:[p.jsx(Un,{className:"h-3 w-3 animate-spin text-muted-foreground"}),p.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"Updating..."})]})]})]})}function Ove(t){const e=yve(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(xve);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function yve(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=wve(i),a=bve(s,i.props);return i.type!==g.Fragment&&(a.ref=r?kn(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var vve=Symbol("radix.slottable");function xve(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===vve}function bve(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function wve(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var U4="Popover",[H4]=Cn(U4,[ro]),Vg=ro(),[Pxe,lo]=H4(U4),G4="PopoverAnchor",Sve=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=lo(G4,n),s=Vg(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return g.useEffect(()=>(o(),()=>a()),[o,a]),p.jsx(jf,{...s,...r,ref:e})});Sve.displayName=G4;var K4="PopoverTrigger",kve=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=lo(K4,n),s=Vg(n),o=Ce(e,i.triggerRef),a=p.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rz(i.open),...r,ref:o,onClick:ne(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:p.jsx(jf,{asChild:!0,...s,children:a})});kve.displayName=K4;var ES="PopoverPortal",[Cve,Pve]=H4(ES,{forceMount:void 0}),J4=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,s=lo(ES,e);return p.jsx(Cve,{scope:e,forceMount:n,children:p.jsx(_t,{present:n||s.open,children:p.jsx(Mf,{asChild:!0,container:i,children:r})})})};J4.displayName=ES;var Ll="PopoverContent",ez=g.forwardRef((t,e)=>{const n=Pve(Ll,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=lo(Ll,t.__scopePopover);return p.jsx(_t,{present:r||s.open,children:s.modal?p.jsx(Eve,{...i,ref:e}):p.jsx(Rve,{...i,ref:e})})});ez.displayName=Ll;var Tve=Ove("PopoverContent.RemoveScroll"),Eve=g.forwardRef((t,e)=>{const n=lo(Ll,t.__scopePopover),r=g.useRef(null),i=Ce(e,r),s=g.useRef(!1);return g.useEffect(()=>{const o=r.current;if(o)return Jm(o)},[]),p.jsx(Lf,{as:Tve,allowPinchZoom:!0,children:p.jsx(tz,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:ne(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rve=g.forwardRef((t,e)=>{const n=lo(Ll,t.__scopePopover),r=g.useRef(!1),i=g.useRef(!1);return p.jsx(tz,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),tz=g.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=t,d=lo(Ll,n),h=Vg(n);return Gm(),p.jsx(Df,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(Ul,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:p.jsx(Wm,{"data-state":rz(d.open),role:"dialog",id:d.contentId,...h,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),nz="PopoverClose",_ve=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=lo(nz,n);return p.jsx(ue.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,()=>i.onOpenChange(!1))})});_ve.displayName=nz;var $ve="PopoverArrow",Qve=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Vg(n);return p.jsx(qm,{...i,...r,ref:e})});Qve.displayName=$ve;function rz(t){return t?"open":"closed"}var Ave=J4,iz=ez;const Ive=g.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},i)=>p.jsx(Ave,{children:p.jsx(iz,{ref:i,align:e,sideOffset:n,className:le("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));Ive.displayName=iz.displayName;var Nve=t=>{switch(t){case"success":return Dve;case"info":return zve;case"warning":return Lve;case"error":return Bve;default:return null}},jve=Array(12).fill(0),Mve=({visible:t,className:e})=>ee.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ee.createElement("div",{className:"sonner-spinner"},jve.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Dve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Lve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),zve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Bve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Vve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Fve=()=>{let[t,e]=ee.useState(document.hidden);return ee.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},U0=1,Xve=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:U0++,s=this.toasts.find(a=>a.id===i),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...t,id:i,title:n}),{...a,...t,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],ee.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(Wve(l)&&!l.ok){i=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){i=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],e.error!==void 0){i=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||U0++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},dn=new Xve,Zve=(t,e)=>{let n=(e==null?void 0:e.id)||U0++;return dn.addToast({title:t,...e,id:n}),n},Wve=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",qve=Zve,Yve=()=>dn.toasts,Uve=()=>dn.getActiveToasts();Object.assign(qve,{success:dn.success,info:dn.info,warning:dn.warning,error:dn.error,custom:dn.custom,message:dn.message,promise:dn.promise,dismiss:dn.dismiss,loading:dn.loading},{getHistory:Yve,getToasts:Uve});function Hve(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Hve(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
508
|
+
`);function ah(t){return t.label!==void 0}var Gve=3,Kve="32px",Jve="16px",uR=4e3,exe=356,txe=14,nxe=20,rxe=200;function $r(...t){return t.filter(Boolean).join(" ")}function ixe(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var sxe=t=>{var e,n,r,i,s,o,a,l,c,u,f;let{invert:d,toast:h,unstyled:O,interacting:m,setHeights:x,visibleToasts:y,heights:v,index:b,toasts:S,expanded:k,removeToast:w,defaultRichColors:C,closeButton:_,style:I,cancelButtonStyle:E,actionButtonStyle:N,className:Q="",descriptionClassName:L="",duration:z,position:X,gap:W,loadingIcon:F,expandByDefault:j,classNames:A,icons:P,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:$}=t,[R,q]=ee.useState(null),[H,ie]=ee.useState(null),[Y,pe]=ee.useState(!1),[me,ye]=ee.useState(!1),[Pe,Ne]=ee.useState(!1),[St,ln]=ee.useState(!1),[Gr,Sr]=ee.useState(!1),[Kr,co]=ee.useState(0),[$i,hc]=ee.useState(0),uo=ee.useRef(h.duration||z||uR),td=ee.useRef(null),Qi=ee.useRef(null),Fg=b===0,Xg=b+1<=y,V=h.type,te=h.dismissible!==!1,xe=h.className||"",Ee=h.descriptionClassName||"",ze=ee.useMemo(()=>v.findIndex(be=>be.toastId===h.id)||0,[v,h.id]),Rn=ee.useMemo(()=>{var be;return(be=h.closeButton)!=null?be:_},[h.closeButton,_]),Jr=ee.useMemo(()=>h.duration||z||uR,[h.duration,z]),_n=ee.useRef(0),er=ee.useRef(0),os=ee.useRef(0),ht=ee.useRef(null),[as,kr]=X.split("-"),RS=ee.useMemo(()=>v.reduce((be,Fe,tt)=>tt>=ze?be:be+Fe.height,0),[v,ze]),_S=Fve(),oz=h.invert||d,Zg=V==="loading";er.current=ee.useMemo(()=>ze*W+RS,[ze,RS]),ee.useEffect(()=>{uo.current=Jr},[Jr]),ee.useEffect(()=>{pe(!0)},[]),ee.useEffect(()=>{let be=Qi.current;if(be){let Fe=be.getBoundingClientRect().height;return hc(Fe),x(tt=>[{toastId:h.id,height:Fe,position:h.position},...tt]),()=>x(tt=>tt.filter(Cr=>Cr.toastId!==h.id))}},[x,h.id]),ee.useLayoutEffect(()=>{if(!Y)return;let be=Qi.current,Fe=be.style.height;be.style.height="auto";let tt=be.getBoundingClientRect().height;be.style.height=Fe,hc(tt),x(Cr=>Cr.find(Pr=>Pr.toastId===h.id)?Cr.map(Pr=>Pr.toastId===h.id?{...Pr,height:tt}:Pr):[{toastId:h.id,height:tt,position:h.position},...Cr])},[Y,h.title,h.description,x,h.id]);let ls=ee.useCallback(()=>{ye(!0),co(er.current),x(be=>be.filter(Fe=>Fe.toastId!==h.id)),setTimeout(()=>{w(h)},rxe)},[h,w,x,er]);ee.useEffect(()=>{if(h.promise&&V==="loading"||h.duration===1/0||h.type==="loading")return;let be;return k||m||$&&_S?(()=>{if(os.current<_n.current){let Fe=new Date().getTime()-_n.current;uo.current=uo.current-Fe}os.current=new Date().getTime()})():uo.current!==1/0&&(_n.current=new Date().getTime(),be=setTimeout(()=>{var Fe;(Fe=h.onAutoClose)==null||Fe.call(h,h),ls()},uo.current)),()=>clearTimeout(be)},[k,m,h,V,$,_S,ls]),ee.useEffect(()=>{h.delete&&ls()},[ls,h.delete]);function az(){var be,Fe,tt;return P!=null&&P.loading?ee.createElement("div",{className:$r(A==null?void 0:A.loader,(be=h==null?void 0:h.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":V==="loading"},P.loading):F?ee.createElement("div",{className:$r(A==null?void 0:A.loader,(Fe=h==null?void 0:h.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":V==="loading"},F):ee.createElement(Mve,{className:$r(A==null?void 0:A.loader,(tt=h==null?void 0:h.classNames)==null?void 0:tt.loader),visible:V==="loading"})}return ee.createElement("li",{tabIndex:0,ref:Qi,className:$r(Q,xe,A==null?void 0:A.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,A==null?void 0:A.default,A==null?void 0:A[V],(n=h==null?void 0:h.classNames)==null?void 0:n[V]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:C,"data-styled":!(h.jsx||h.unstyled||O),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":Gr,"data-removed":me,"data-visible":Xg,"data-y-position":as,"data-x-position":kr,"data-index":b,"data-front":Fg,"data-swiping":Pe,"data-dismissible":te,"data-type":V,"data-invert":oz,"data-swipe-out":St,"data-swipe-direction":H,"data-expanded":!!(k||j&&Y),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${me?Kr:er.current}px`,"--initial-height":j?"auto":`${$i}px`,...I,...h.style},onDragEnd:()=>{Ne(!1),q(null),ht.current=null},onPointerDown:be=>{Zg||!te||(td.current=new Date,co(er.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(Ne(!0),ht.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Fe,tt,Cr;if(St||!te)return;ht.current=null;let Pr=Number(((be=Qi.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cs=Number(((Fe=Qi.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fo=new Date().getTime()-((tt=td.current)==null?void 0:tt.getTime()),Tr=R==="x"?Pr:cs,us=Math.abs(Tr)/fo;if(Math.abs(Tr)>=nxe||us>.11){co(er.current),(Cr=h.onDismiss)==null||Cr.call(h,h),ie(R==="x"?Pr>0?"right":"left":cs>0?"down":"up"),ls(),ln(!0),Sr(!1);return}Ne(!1),q(null)},onPointerMove:be=>{var Fe,tt,Cr,Pr;if(!ht.current||!te||((Fe=window.getSelection())==null?void 0:Fe.toString().length)>0)return;let cs=be.clientY-ht.current.y,fo=be.clientX-ht.current.x,Tr=(tt=t.swipeDirections)!=null?tt:ixe(X);!R&&(Math.abs(fo)>1||Math.abs(cs)>1)&&q(Math.abs(fo)>Math.abs(cs)?"x":"y");let us={x:0,y:0};R==="y"?(Tr.includes("top")||Tr.includes("bottom"))&&(Tr.includes("top")&&cs<0||Tr.includes("bottom")&&cs>0)&&(us.y=cs):R==="x"&&(Tr.includes("left")||Tr.includes("right"))&&(Tr.includes("left")&&fo<0||Tr.includes("right")&&fo>0)&&(us.x=fo),(Math.abs(us.x)>0||Math.abs(us.y)>0)&&Sr(!0),(Cr=Qi.current)==null||Cr.style.setProperty("--swipe-amount-x",`${us.x}px`),(Pr=Qi.current)==null||Pr.style.setProperty("--swipe-amount-y",`${us.y}px`)}},Rn&&!h.jsx?ee.createElement("button",{"aria-label":M,"data-disabled":Zg,"data-close-button":!0,onClick:Zg||!te?()=>{}:()=>{var be;ls(),(be=h.onDismiss)==null||be.call(h,h)},className:$r(A==null?void 0:A.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=P==null?void 0:P.close)!=null?s:Vve):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:ee.createElement(ee.Fragment,null,V||h.icon||h.promise?ee.createElement("div",{"data-icon":"",className:$r(A==null?void 0:A.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||az():null,h.type!=="loading"?h.icon||(P==null?void 0:P[V])||Nve(V):null):null,ee.createElement("div",{"data-content":"",className:$r(A==null?void 0:A.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},ee.createElement("div",{"data-title":"",className:$r(A==null?void 0:A.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?ee.createElement("div",{"data-description":"",className:$r(L,Ee,A==null?void 0:A.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&ah(h.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||E,onClick:be=>{var Fe,tt;ah(h.cancel)&&te&&((tt=(Fe=h.cancel).onClick)==null||tt.call(Fe,be),ls())},className:$r(A==null?void 0:A.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&ah(h.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||N,onClick:be=>{var Fe,tt;ah(h.action)&&((tt=(Fe=h.action).onClick)==null||tt.call(Fe,be),!be.defaultPrevented&&ls())},className:$r(A==null?void 0:A.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function fR(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function oxe(t,e){let n={};return[t,e].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?Jve:Kve;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var axe=g.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:f,duration:d,style:h,visibleToasts:O=Gve,toastOptions:m,dir:x=fR(),gap:y=txe,loadingIcon:v,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=t,[w,C]=ee.useState([]),_=ee.useMemo(()=>Array.from(new Set([r].concat(w.filter($=>$.position).map($=>$.position)))),[w,r]),[I,E]=ee.useState([]),[N,Q]=ee.useState(!1),[L,z]=ee.useState(!1),[X,W]=ee.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=ee.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=ee.useRef(null),P=ee.useRef(!1),M=ee.useCallback($=>{C(R=>{var q;return(q=R.find(H=>H.id===$.id))!=null&&q.delete||dn.dismiss($.id),R.filter(({id:H})=>H!==$.id)})},[]);return ee.useEffect(()=>dn.subscribe($=>{if($.dismiss){C(R=>R.map(q=>q.id===$.id?{...q,delete:!0}:q));return}setTimeout(()=>{k$.flushSync(()=>{C(R=>{let q=R.findIndex(H=>H.id===$.id);return q!==-1?[...R.slice(0,q),{...R[q],...$},...R.slice(q+1)]:[$,...R]})})})}),[]),ee.useEffect(()=>{if(u!=="system"){W(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:R})=>{W(R?"dark":"light")})}catch{$.addListener(({matches:q})=>{try{W(q?"dark":"light")}catch(H){console.error(H)}})}},[u]),ee.useEffect(()=>{w.length<=1&&Q(!1)},[w]),ee.useEffect(()=>{let $=R=>{var q,H;i.every(ie=>R[ie]||R.code===ie)&&(Q(!0),(q=F.current)==null||q.focus()),R.code==="Escape"&&(document.activeElement===F.current||(H=F.current)!=null&&H.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[i]),ee.useEffect(()=>{if(F.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,P.current=!1)}},[F.current]),ee.createElement("section",{ref:e,"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map(($,R)=>{var q;let[H,ie]=$.split("-");return w.length?ee.createElement("ol",{key:$,dir:x==="auto"?fR():x,tabIndex:-1,ref:F,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":H,"data-lifted":N&&w.length>1&&!s,"data-x-position":ie,style:{"--front-toast-height":`${((q=I[0])==null?void 0:q.height)||0}px`,"--width":`${exe}px`,"--gap":`${y}px`,...h,...oxe(l,c)},onBlur:Y=>{P.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(P.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||P.current||(P.current=!0,A.current=Y.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{L||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},w.filter(Y=>!Y.position&&R===0||Y.position===$).map((Y,pe)=>{var me,ye;return ee.createElement(sxe,{key:Y.id,icons:b,index:pe,toast:Y,defaultRichColors:f,duration:(me=m==null?void 0:m.duration)!=null?me:d,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:O,closeButton:(ye=m==null?void 0:m.closeButton)!=null?ye:o,interacting:L,position:$,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:M,toasts:w.filter(Pe=>Pe.position==Y.position),heights:I.filter(Pe=>Pe.position==Y.position),setHeights:E,expandByDefault:s,gap:y,loadingIcon:v,expanded:N,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const sz=({...t})=>{const n=typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light";return p.jsx(axe,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function lxe(){return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx(CI,{}),p.jsx("main",{className:"flex-1 overflow-auto",children:p.jsx(YOe,{})}),p.jsx(Y4,{}),p.jsx(j4,{}),p.jsx(sz,{})]})}function cxe(){const{currentProject:t,isLoading:e}=oa(),{connect:n,disconnect:r,checkSyncStatus:i}=Qf();return GX(),g.useEffect(()=>{if(t)return n(),i(),()=>r()},[t,n,r,i]),e||!t?p.jsx("div",{className:"h-full flex items-center justify-center",children:p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx(CI,{}),p.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[p.jsx(EJ,{}),p.jsx(BOe,{})]}),p.jsx(WOe,{}),p.jsx(Y4,{}),p.jsx(j4,{}),p.jsx(sz,{})]})}function uxe(){return p.jsx(Zu,{children:p.jsxs($F,{children:[p.jsx(ix,{path:"/",element:p.jsx(lxe,{})}),p.jsx(ix,{path:"/:projectSlug",element:p.jsx(cxe,{})})]})})}uv.createRoot(document.getElementById("root")).render(p.jsx(ee.StrictMode,{children:p.jsx(nX,{children:p.jsx(uxe,{})})}));export{H5 as C,Jn as E,Be as I,$l as L,KD as N,Al as a,Qde as b,Bh as c,d5 as d,jl as e,ac as f,Ze as g,hm as h,oc as i,cue as j,lue as k,oL as l,un as m,re as n,Z as o,j3 as p,JD as q,d3 as r,ic as s,T as t,vL as u,pr as v};
|
|
509
|
+
//# sourceMappingURL=index-B7vcMomf.js.map
|