@alivault/pico 0.14.0 → 0.16.1
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/.output/public/_shell.html +19 -0
- package/.output/public/assets/PatchDiff-SN-mXa3p.js +343 -0
- package/.output/public/assets/{angular-html-BZNntD0J.js → angular-html-B9LEBPKs.js} +1 -1
- package/.output/public/assets/{angular-ts-SQQMYL2C.js → angular-ts-CD6u-Ij9.js} +1 -1
- package/.output/public/assets/{apl-D5V6uPDr.js → apl-VeDHIFIx.js} +1 -1
- package/.output/public/assets/app-shell-common-0xa28gDm.js +1 -0
- package/.output/public/assets/{astro-DeXKSaFP.js → astro-Dd8L1z6M.js} +1 -1
- package/.output/public/assets/{blade-Bu5re0Vg.js → blade-BNxrbiva.js} +1 -1
- package/.output/public/assets/{bsl-B1qbqNES.js → bsl-B0twaj2j.js} +1 -1
- package/.output/public/assets/{cairo-BDj8wWhy.js → cairo-DASKFAWI.js} +1 -1
- package/.output/public/assets/{cobol-nvZDS9LT.js → cobol-D_qN8j4K.js} +1 -1
- package/.output/public/assets/{coffee-BKLOTq4e.js → coffee-60nIQewd.js} +1 -1
- package/.output/public/assets/{cpp-D6g1DVNt.js → cpp-e1j1tDCV.js} +1 -1
- package/.output/public/assets/{crystal-DfoZI57w.js → crystal-brDfRjQ_.js} +1 -1
- package/.output/public/assets/{edge-DwocGnOF.js → edge-DadfRK3Q.js} +1 -1
- package/.output/public/assets/{elixir-Dtbfds1r.js → elixir-CsoHPmz3.js} +1 -1
- package/.output/public/assets/{elm-CpPtm471.js → elm-BLTa0sZG.js} +1 -1
- package/.output/public/assets/{erb--z3IM9Cb.js → erb-DIR2QRkp.js} +1 -1
- package/.output/public/assets/{erlang-Bc4hQuqa.js → erlang-DnbJbitJ.js} +1 -1
- package/.output/public/assets/{fortran-fixed-form-B02FOYI-.js → fortran-fixed-form-Bse4XUyD.js} +1 -1
- package/.output/public/assets/{fsharp-DhdR18vN.js → fsharp-Dy8OnZ0O.js} +1 -1
- package/.output/public/assets/{gdresource-DgnrMPIx.js → gdresource-BD_7yRHA.js} +1 -1
- package/.output/public/assets/{git-commit-DGJi7qBD.js → git-commit-CIMjlyHf.js} +1 -1
- package/.output/public/assets/{git-rebase-Ce47xoa6.js → git-rebase-DV2DyQK7.js} +1 -1
- package/.output/public/assets/{glimmer-js-C0BuzxQC.js → glimmer-js-DVG5pFvd.js} +1 -1
- package/.output/public/assets/{glimmer-ts-irOZ-cAQ.js → glimmer-ts-BeWaLARz.js} +1 -1
- package/.output/public/assets/{glsl-JAhLUe0P.js → glsl-BrOWUUEh.js} +1 -1
- package/.output/public/assets/{graphql-D2ba3BkR.js → graphql-B_3o81z5.js} +1 -1
- package/.output/public/assets/{hack-CgzUpY8l.js → hack-BW-0PxQy.js} +1 -1
- package/.output/public/assets/{haml-C-oIZcDo.js → haml-DnNXiHAO.js} +1 -1
- package/.output/public/assets/{handlebars-CbP-Mhzf.js → handlebars-CftcPtku.js} +1 -1
- package/.output/public/assets/{html-ddqpqPg0.js → html-D5IqfVuz.js} +1 -1
- package/.output/public/assets/{html-derivative-DWGxf_At.js → html-derivative-QNqmMkaY.js} +1 -1
- package/.output/public/assets/{http-Bg1nG1nG.js → http-Dd7eRKUa.js} +1 -1
- package/.output/public/assets/{hurl-zm47Pi1n.js → hurl-kBs5Ibg1.js} +1 -1
- package/.output/public/assets/{hxml-adC65L_J.js → hxml-CGx66ebi.js} +1 -1
- package/.output/public/assets/index-C-mxWGZ5.css +2 -0
- package/.output/public/assets/index-FOqZaR4L.js +48 -0
- package/.output/public/assets/{jinja-Bnj4awH5.js → jinja-BPoCSjyd.js} +1 -1
- package/.output/public/assets/{jison-CuCNs9Q3.js → jison-WHPVy3Jl.js} +1 -1
- package/.output/public/assets/{julia-DNYHzXlE.js → julia-BaKiQMPf.js} +1 -1
- package/.output/public/assets/{just-BlWkkmf2.js → just-BKMc7tVT.js} +1 -1
- package/.output/public/assets/{latex-DqPzjMIt.js → latex-Cczzu1HI.js} +1 -1
- package/.output/public/assets/{liquid-BURJK16h.js → liquid-DrJZrMEf.js} +1 -1
- package/.output/public/assets/{lua-31hdJClp.js → lua-CFIwCMnP.js} +1 -1
- package/.output/public/assets/{marko-C2ZcdSLh.js → marko-BreagErn.js} +1 -1
- package/.output/public/assets/{mdc-N1ii9pk5.js → mdc-CBcMHZUq.js} +1 -1
- package/.output/public/assets/{nextflow-JEyYUlIq.js → nextflow-CZbrTmS2.js} +1 -1
- package/.output/public/assets/{nginx-BuomO0W8.js → nginx-CMOi8dTH.js} +1 -1
- package/.output/public/assets/{nim-hKoEPsYL.js → nim-DbDZ9Wa-.js} +1 -1
- package/.output/public/assets/{perl-CAGVW6Ra.js → perl-DyRCGnKu.js} +1 -1
- package/.output/public/assets/{php-BycclmzS.js → php-Ciarv7b4.js} +1 -1
- package/.output/public/assets/plus-B1rJPgNv.js +1 -0
- package/.output/public/assets/preload-helper-Csz9R64u.js +5 -0
- package/.output/public/assets/{pug-4maJHz9G.js → pug-CVCqbfEm.js} +1 -1
- package/.output/public/assets/{qml-JLIQfzyb.js → qml-DechmdFA.js} +1 -1
- package/.output/public/assets/query-keys-C9jMaRnO.js +1 -0
- package/.output/public/assets/{razor-P8rbooCh.js → razor-bgzHke67.js} +1 -1
- package/.output/public/assets/right-sidebar-CWvXcZzC.js +1831 -0
- package/.output/public/assets/routes-CXlaorp4.js +23 -0
- package/.output/public/assets/{rst-C6GHyL-N.js → rst-Ce6_XwFd.js} +1 -1
- package/.output/public/assets/{ruby-Cl8PVkbY.js → ruby-BtLKlt8E.js} +1 -1
- package/.output/public/assets/{sas-CXoVwlZN.js → sas-Bco5tnse.js} +1 -1
- package/.output/public/assets/{scss-DNczJ95n.js → scss-KPCA05M8.js} +1 -1
- package/.output/public/assets/{shaderlab-DZ3Lsiak.js → shaderlab-uUHiM5Mm.js} +1 -1
- package/.output/public/assets/{shellsession-COm1V40U.js → shellsession-BnUZVYXU.js} +1 -1
- package/.output/public/assets/{soy-DwewhJ_3.js → soy-Dsrg4bVI.js} +1 -1
- package/.output/public/assets/{sparql-B9c85a_o.js → sparql-D5zsvcbT.js} +1 -1
- package/.output/public/assets/{stata-Bl--TAbZ.js → stata-BdK5CFUf.js} +1 -1
- package/.output/public/assets/{surrealql-BW79EE-U.js → surrealql-Blm5wp47.js} +1 -1
- package/.output/public/assets/{svelte-ziMErdPi.js → svelte-DZrj_gMz.js} +1 -1
- package/.output/public/assets/{templ-C_9I6ncv.js → templ-CJ7sDrtu.js} +1 -1
- package/.output/public/assets/terminal-panel-YGR6v-ZH.js +1 -0
- package/.output/public/assets/{tex-D8LVuLf5.js → tex-CvSRdXZA.js} +1 -1
- package/.output/public/assets/{ts-tags-DKuFCGsc.js → ts-tags-DgGFCSef.js} +1 -1
- package/.output/public/assets/{twig-Bs1kcsO6.js → twig-D8_PS89g.js} +1 -1
- package/.output/public/assets/{vue-Dnf0y5RU.js → vue-KvGEuYod.js} +1 -1
- package/.output/public/assets/{vue-html-CRtKS76J.js → vue-html-qAt9D-IF.js} +1 -1
- package/.output/public/assets/{vue-vine-BxjPqU7T.js → vue-vine-j1nOqxMu.js} +1 -1
- package/.output/public/assets/{xml-eU7M3iZJ.js → xml-BrFkMwfd.js} +1 -1
- package/.output/public/assets/{xsl-DSqe4nTO.js → xsl-OmCo2PyZ.js} +1 -1
- package/.output/public/index.html +19 -0
- package/README.md +171 -46
- package/bin/native-runtime.mjs +265 -0
- package/bin/pico.mjs +289 -222
- package/package.json +34 -31
- package/.output/nitro.json +0 -17
- package/.output/public/assets/index-DBVxXDtw.js +0 -54
- package/.output/public/assets/routes-yUxD2q-l.js +0 -2194
- package/.output/public/assets/styles-CUVz7jV9.css +0 -2
- package/.output/server/__23tanstack-start-plugin-adapters-y_fshQDY.mjs +0 -5
- package/.output/server/_chunks/ssr-renderer.mjs +0 -15
- package/.output/server/_libs/@base-ui/react+[...].mjs +0 -14512
- package/.output/server/_libs/@dnd-kit/core+[...].mjs +0 -2748
- package/.output/server/_libs/@pierre/diffs+[...].mjs +0 -19314
- package/.output/server/_libs/@pierre/trees+[...].mjs +0 -9236
- package/.output/server/_libs/@radix-ui/react-dialog+[...].mjs +0 -1789
- package/.output/server/_libs/@radix-ui/react-primitive+[...].mjs +0 -136
- package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
- package/.output/server/_libs/@tanstack/hotkeys+[...].mjs +0 -1607
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +0 -13950
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +0 -90
- package/.output/server/_libs/bail.mjs +0 -13
- package/.output/server/_libs/character-entities.mjs +0 -2135
- package/.output/server/_libs/class-variance-authority+clsx.mjs +0 -69
- package/.output/server/_libs/cmdk.mjs +0 -473
- package/.output/server/_libs/crossws.mjs +0 -2929
- package/.output/server/_libs/decode-named-character-reference+[...].mjs +0 -19
- package/.output/server/_libs/devlop.mjs +0 -5
- package/.output/server/_libs/diff.mjs +0 -732
- package/.output/server/_libs/dnd-kit__accessibility.mjs +0 -46
- package/.output/server/_libs/dnd-kit__sortable.mjs +0 -400
- package/.output/server/_libs/entities.mjs +0 -372
- package/.output/server/_libs/escape-string-regexp.mjs +0 -7
- package/.output/server/_libs/estree-util-is-identifier-name.mjs +0 -20
- package/.output/server/_libs/extend.mjs +0 -75
- package/.output/server/_libs/h3+rou3+srvx.mjs +0 -1216
- package/.output/server/_libs/hast-util-from-parse5+[...].mjs +0 -741
- package/.output/server/_libs/hast-util-raw+[...].mjs +0 -7897
- package/.output/server/_libs/hast-util-sanitize.mjs +0 -780
- package/.output/server/_libs/hast-util-to-jsx-runtime+[...].mjs +0 -1165
- package/.output/server/_libs/hookable.mjs +0 -41
- package/.output/server/_libs/html-url-attributes.mjs +0 -44
- package/.output/server/_libs/is-plain-obj.mjs +0 -8
- package/.output/server/_libs/longest-streak.mjs +0 -29
- package/.output/server/_libs/lucide-react.mjs +0 -788
- package/.output/server/_libs/markdown-table.mjs +0 -289
- package/.output/server/_libs/mdast-util-find-and-replace.mjs +0 -198
- package/.output/server/_libs/mdast-util-from-markdown+[...].mjs +0 -8409
- package/.output/server/_libs/mdast-util-gfm+[...].mjs +0 -2062
- package/.output/server/_libs/mdast-util-to-hast+[...].mjs +0 -1771
- package/.output/server/_libs/micromark-extension-gfm+[...].mjs +0 -2234
- package/.output/server/_libs/next-themes.mjs +0 -124
- package/.output/server/_libs/pierre__theme.mjs +0 -10
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -30
- package/.output/server/_libs/radix-ui__react-context.mjs +0 -88
- package/.output/server/_libs/react-markdown+[...].mjs +0 -2316
- package/.output/server/_libs/rehype-raw.mjs +0 -37
- package/.output/server/_libs/rehype-sanitize.mjs +0 -27
- package/.output/server/_libs/remark-gfm.mjs +0 -34
- package/.output/server/_libs/shiki.mjs +0 -16
- package/.output/server/_libs/shikijs__langs.mjs +0 -1355
- package/.output/server/_libs/shikijs__themes.mjs +0 -262
- package/.output/server/_libs/sonner.mjs +0 -908
- package/.output/server/_libs/tailwind-merge.mjs +0 -1962
- package/.output/server/_libs/tanstack__history.mjs +0 -342
- package/.output/server/_libs/tanstack__pacer.mjs +0 -1111
- package/.output/server/_libs/tanstack__query-core.mjs +0 -2202
- package/.output/server/_libs/tanstack__react-hotkeys.mjs +0 -152
- package/.output/server/_libs/tanstack__react-query.mjs +0 -180
- package/.output/server/_libs/tanstack__react-store.mjs +0 -39
- package/.output/server/_libs/tanstack__router-core.mjs +0 -6
- package/.output/server/_libs/tanstack__store.mjs +0 -28
- package/.output/server/_libs/ufo.mjs +0 -64
- package/.output/server/_libs/unctx.mjs +0 -82
- package/.output/server/_libs/ungap__structured-clone.mjs +0 -197
- package/.output/server/_libs/vaul.mjs +0 -1250
- package/.output/server/_libs/xterm__addon-fit.mjs +0 -44
- package/.output/server/_libs/xterm__xterm.mjs +0 -10234
- package/.output/server/_libs/zod.mjs +0 -3341
- package/.output/server/_routes/api/terminal/[id]/ws.mjs +0 -8874
- package/.output/server/_runtime.mjs +0 -35
- package/.output/server/_ssr/router-CN4JMm2A.mjs +0 -9733
- package/.output/server/_ssr/routes-BsQ26pbY.mjs +0 -29306
- package/.output/server/_ssr/routes-DbjuMLFI.mjs +0 -3400
- package/.output/server/_ssr/ssr.mjs +0 -5176
- package/.output/server/_ssr/start-jIczsXlR.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-Bs4g_j1_.mjs +0 -77
- package/.output/server/index.mjs +0 -2670
- package/.output/server/node_modules/node-pty/LICENSE +0 -69
- package/.output/server/node_modules/node-pty/README.md +0 -165
- package/.output/server/node_modules/node-pty/binding.gyp +0 -111
- package/.output/server/node_modules/node-pty/build/Makefile +0 -369
- package/.output/server/node_modules/node-pty/build/Release/pty.node +0 -0
- package/.output/server/node_modules/node-pty/build/binding.Makefile +0 -6
- package/.output/server/node_modules/node-pty/build/pty.target.mk +0 -168
- package/.output/server/node_modules/node-pty/deps/.editorconfig +0 -2
- package/.output/server/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
- package/.output/server/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
- package/.output/server/node_modules/node-pty/deps/winpty/LICENSE +0 -21
- package/.output/server/node_modules/node-pty/deps/winpty/Makefile +0 -166
- package/.output/server/node_modules/node-pty/deps/winpty/README.md +0 -151
- package/.output/server/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
- package/.output/server/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
- package/.output/server/node_modules/node-pty/deps/winpty/configure +0 -167
- package/.output/server/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
- package/.output/server/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
- package/.output/server/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
- package/.output/server/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
- package/.output/server/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
- package/.output/server/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
- package/.output/server/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
- package/.output/server/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
- package/.output/server/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
- package/.output/server/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
- package/.output/server/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
- package/.output/server/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
- package/.output/server/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
- package/.output/server/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
- package/.output/server/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
- package/.output/server/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
- package/.output/server/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
- package/.output/server/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
- package/.output/server/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
- package/.output/server/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
- package/.output/server/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
- package/.output/server/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
- package/.output/server/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
- package/.output/server/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
- package/.output/server/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
- package/.output/server/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
- package/.output/server/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js +0 -47
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
- package/.output/server/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/index.js +0 -52
- package/.output/server/node_modules/node-pty/lib/index.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/interfaces.js +0 -7
- package/.output/server/node_modules/node-pty/lib/interfaces.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/shared/conout.js +0 -11
- package/.output/server/node_modules/node-pty/lib/shared/conout.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/terminal.js +0 -190
- package/.output/server/node_modules/node-pty/lib/terminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/terminal.test.js +0 -139
- package/.output/server/node_modules/node-pty/lib/terminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js +0 -28
- package/.output/server/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/types.js +0 -7
- package/.output/server/node_modules/node-pty/lib/types.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js +0 -346
- package/.output/server/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
- package/.output/server/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/utils.js +0 -39
- package/.output/server/node_modules/node-pty/lib/utils.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
- package/.output/server/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
- package/.output/server/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js +0 -199
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
- package/.output/server/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
- package/.output/server/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
- package/.output/server/node_modules/node-pty/package.json +0 -64
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/.output/server/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
- package/.output/server/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
- package/.output/server/node_modules/node-pty/scripts/increment-version.js +0 -54
- package/.output/server/node_modules/node-pty/scripts/post-install.js +0 -80
- package/.output/server/node_modules/node-pty/scripts/prebuild.js +0 -34
- package/.output/server/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
- package/.output/server/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
- package/.output/server/node_modules/node-pty/src/eventEmitter2.ts +0 -48
- package/.output/server/node_modules/node-pty/src/index.ts +0 -52
- package/.output/server/node_modules/node-pty/src/interfaces.ts +0 -130
- package/.output/server/node_modules/node-pty/src/native.d.ts +0 -54
- package/.output/server/node_modules/node-pty/src/shared/conout.ts +0 -15
- package/.output/server/node_modules/node-pty/src/terminal.test.ts +0 -119
- package/.output/server/node_modules/node-pty/src/terminal.ts +0 -211
- package/.output/server/node_modules/node-pty/src/testUtils.test.ts +0 -23
- package/.output/server/node_modules/node-pty/src/tsconfig.json +0 -22
- package/.output/server/node_modules/node-pty/src/types.ts +0 -15
- package/.output/server/node_modules/node-pty/src/unix/pty.cc +0 -799
- package/.output/server/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
- package/.output/server/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
- package/.output/server/node_modules/node-pty/src/unixTerminal.ts +0 -388
- package/.output/server/node_modules/node-pty/src/utils.ts +0 -29
- package/.output/server/node_modules/node-pty/src/win/conpty.cc +0 -583
- package/.output/server/node_modules/node-pty/src/win/conpty.h +0 -41
- package/.output/server/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
- package/.output/server/node_modules/node-pty/src/win/path_util.cc +0 -95
- package/.output/server/node_modules/node-pty/src/win/path_util.h +0 -26
- package/.output/server/node_modules/node-pty/src/win/winpty.cc +0 -333
- package/.output/server/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
- package/.output/server/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
- package/.output/server/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
- package/.output/server/node_modules/node-pty/src/windowsTerminal.ts +0 -203
- package/.output/server/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/.output/server/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/.output/server/node_modules/node-pty/typings/node-pty.d.ts +0 -211
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -10
- package/scripts/release.mjs +0 -173
- package/vendor/node-domexception/index.js +0 -3
- package/vendor/node-domexception/package.json +0 -10
- /package/.output/public/assets/{abap-smLpETzL.js → abap-CglpPUUh.js} +0 -0
- /package/.output/public/assets/{actionscript-3-o-aRvjY5.js → actionscript-3-CGv72Q9E.js} +0 -0
- /package/.output/public/assets/{ada-D5RRX1i4.js → ada-CfxXaXwr.js} +0 -0
- /package/.output/public/assets/{addon-fit-CMMXLNsg.js → addon-fit-C9RD8ot3.js} +0 -0
- /package/.output/public/assets/{andromeeda-N4z3YzmR.js → andromeeda-DXsn6mTE.js} +0 -0
- /package/.output/public/assets/{apache-DttKlSqg.js → apache-D5xAQKSB.js} +0 -0
- /package/.output/public/assets/{apex-DL7j-a2n.js → apex-qgfedJV2.js} +0 -0
- /package/.output/public/assets/{applescript-DCbL_2FX.js → applescript-DqumQxTt.js} +0 -0
- /package/.output/public/assets/{ara-DqheWJCe.js → ara-Ditv3ow6.js} +0 -0
- /package/.output/public/assets/{asciidoc-BH2sf2K4.js → asciidoc-DL8QwiT7.js} +0 -0
- /package/.output/public/assets/{asm-rfjOMz3U.js → asm-K6TMxl3o.js} +0 -0
- /package/.output/public/assets/{aurora-x-CND-FqEb.js → aurora-x-DGv-xZaa.js} +0 -0
- /package/.output/public/assets/{awk-CMV5n9Z7.js → awk-CYSfQSDT.js} +0 -0
- /package/.output/public/assets/{ayu-dark-on7xzq_B.js → ayu-dark-DGBaJbpH.js} +0 -0
- /package/.output/public/assets/{ayu-light-DnGeGGc2.js → ayu-light-BQrGPVs2.js} +0 -0
- /package/.output/public/assets/{ayu-mirage-DG3LlYC_.js → ayu-mirage-Do-5o2VL.js} +0 -0
- /package/.output/public/assets/{ballerina-BjMqJjlr.js → ballerina-BE-8n54s.js} +0 -0
- /package/.output/public/assets/{bat-BaVbo_qw.js → bat-B1zTc1QZ.js} +0 -0
- /package/.output/public/assets/{beancount-DBt5Mbc_.js → beancount-DhObrvif.js} +0 -0
- /package/.output/public/assets/{berry-Cyjuxiss.js → berry-Cnbvthv1.js} +0 -0
- /package/.output/public/assets/{bibtex-BV_0nsPq.js → bibtex-pp5SrwZy.js} +0 -0
- /package/.output/public/assets/{bicep-C2gEwu4J.js → bicep-BL6eYxbs.js} +0 -0
- /package/.output/public/assets/{bird2-BRyaEJd0.js → bird2-BQaXYY9n.js} +0 -0
- /package/.output/public/assets/{c-Nc9zJT78.js → c-BHFJ4Jk3.js} +0 -0
- /package/.output/public/assets/{c3-DTTbp5N2.js → c3-BHTco5Hb.js} +0 -0
- /package/.output/public/assets/{cadence-CPz83cmI.js → cadence-CoPxW0qb.js} +0 -0
- /package/.output/public/assets/{catppuccin-frappe-Dr22sraq.js → catppuccin-frappe-9fYwMJCf.js} +0 -0
- /package/.output/public/assets/{catppuccin-latte-C57EeX8c.js → catppuccin-latte-BUiKH1yZ.js} +0 -0
- /package/.output/public/assets/{catppuccin-macchiato-CpheI4uD.js → catppuccin-macchiato-ZmO2e0M_.js} +0 -0
- /package/.output/public/assets/{catppuccin-mocha-D8Lmdks_.js → catppuccin-mocha-CFwbXQfO.js} +0 -0
- /package/.output/public/assets/{clarity-CFJ2Yc3q.js → clarity-DVUGm1xP.js} +0 -0
- /package/.output/public/assets/{clojure-6R01QgJC.js → clojure-BgXJG6FG.js} +0 -0
- /package/.output/public/assets/{cmake-D5rSbMir.js → cmake-CZndsvm6.js} +0 -0
- /package/.output/public/assets/{codeowners-_3A-ClkN.js → codeowners-Dd7a447M.js} +0 -0
- /package/.output/public/assets/{codeql-DlIhJTR7.js → codeql-XJR6llG-.js} +0 -0
- /package/.output/public/assets/{common-lisp-BvQzz173.js → common-lisp-BOMbLvgT.js} +0 -0
- /package/.output/public/assets/{coq-DTNXReIC.js → coq-DnhmQYDa.js} +0 -0
- /package/.output/public/assets/{csharp-BDKQY1K9.js → csharp-BdEyRqBm.js} +0 -0
- /package/.output/public/assets/{css-DRmnABqB.js → css-CsTDDTLq.js} +0 -0
- /package/.output/public/assets/{csv-DNUpVBxl.js → csv-CXchYFbz.js} +0 -0
- /package/.output/public/assets/{cue-DDdBc2s3.js → cue-D7YpBZvd.js} +0 -0
- /package/.output/public/assets/{cypher-CguaznO2.js → cypher-XIm1N8YJ.js} +0 -0
- /package/.output/public/assets/{d-CHcoyjv3.js → d-DvB0pbZH.js} +0 -0
- /package/.output/public/assets/{dark-plus-CqeW_0kH.js → dark-plus-BUdpMFIA.js} +0 -0
- /package/.output/public/assets/{dart-RM3aRphk.js → dart-CwpSKTMB.js} +0 -0
- /package/.output/public/assets/{dax-nbnY1d79.js → dax-CEynWJsU.js} +0 -0
- /package/.output/public/assets/{desktop-BD76cvxT.js → desktop-Dk-YiYS_.js} +0 -0
- /package/.output/public/assets/{diff-CdkWtnkL.js → diff-abLZ-xM1.js} +0 -0
- /package/.output/public/assets/{docker-ZyPHc6zB.js → docker-BT48KsRJ.js} +0 -0
- /package/.output/public/assets/{dotenv-BdJZEwA6.js → dotenv-NOMQQbM0.js} +0 -0
- /package/.output/public/assets/{dracula-CtqCPLGa.js → dracula-BUW0ZyNO.js} +0 -0
- /package/.output/public/assets/{dracula-soft-DmBpwRAy.js → dracula-soft-BMjAt1_u.js} +0 -0
- /package/.output/public/assets/{dream-maker-BJL4qlg3.js → dream-maker-D26TP1Q3.js} +0 -0
- /package/.output/public/assets/{emacs-lisp-_LyYa2Ky.js → emacs-lisp-C2EvfotR.js} +0 -0
- /package/.output/public/assets/{everforest-dark-CrbyKk4n.js → everforest-dark-hC6a272f.js} +0 -0
- /package/.output/public/assets/{everforest-light-DRbSh8Tm.js → everforest-light-BTpbYY5G.js} +0 -0
- /package/.output/public/assets/{fennel-CC2BkRsS.js → fennel-DWOL-Ewx.js} +0 -0
- /package/.output/public/assets/{fish-D2ZCzqcE.js → fish-CQPQq0pQ.js} +0 -0
- /package/.output/public/assets/{fluent-DKAm3m7q.js → fluent-BYdsr2M8.js} +0 -0
- /package/.output/public/assets/{fortran-free-form-BPTf0lbT.js → fortran-free-form-C_EtY4F9.js} +0 -0
- /package/.output/public/assets/{gdscript-CsadCSaZ.js → gdscript-CH_tD-VB.js} +0 -0
- /package/.output/public/assets/{gdshader-PfnN_8tR.js → gdshader-BemFblFP.js} +0 -0
- /package/.output/public/assets/{genie-Bj-orPAV.js → genie-hCPg_eq7.js} +0 -0
- /package/.output/public/assets/{gherkin-COVWpJ-Q.js → gherkin-CO0ypD1P.js} +0 -0
- /package/.output/public/assets/{github-dark-ipGuFGYC.js → github-dark-cA72fqmI.js} +0 -0
- /package/.output/public/assets/{github-dark-default-DX3IG_X0.js → github-dark-default-DiYTFvY5.js} +0 -0
- /package/.output/public/assets/{github-dark-dimmed-CH6p_7ez.js → github-dark-dimmed-D-uBHzyG.js} +0 -0
- /package/.output/public/assets/{github-dark-high-contrast-Bg2sSao5.js → github-dark-high-contrast-BrUSkckI.js} +0 -0
- /package/.output/public/assets/{github-light-default-DwpDd1IQ.js → github-light-default-BT-6Vf7C.js} +0 -0
- /package/.output/public/assets/{github-light-high-contrast-C0QeixPf.js → github-light-high-contrast-DqmEyTTc.js} +0 -0
- /package/.output/public/assets/{github-light-BxjqOQl0.js → github-light-piFPqU8R.js} +0 -0
- /package/.output/public/assets/{gleam-BF2NigGj.js → gleam-CWJA_H5i.js} +0 -0
- /package/.output/public/assets/{gn-CMIt9roj.js → gn-nlTwLSjP.js} +0 -0
- /package/.output/public/assets/{gnuplot-DgWlRTEj.js → gnuplot-wYV0MbPl.js} +0 -0
- /package/.output/public/assets/{go-DLnOLj8q.js → go-BUPBDRDo.js} +0 -0
- /package/.output/public/assets/{groovy-B9qLWIkE.js → groovy-BusafOA8.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-hard-BIMX9ePb.js → gruvbox-dark-hard-BrrZYoPF.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-medium-DxuwyVzM.js → gruvbox-dark-medium-DsxcLuUs.js} +0 -0
- /package/.output/public/assets/{gruvbox-dark-soft-ba2fjht0.js → gruvbox-dark-soft-DQXOs_GH.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-hard-DAJK2PqC.js → gruvbox-light-hard-CtHwj_cB.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-medium-WRifDAJD.js → gruvbox-light-medium-CPJMdgXQ.js} +0 -0
- /package/.output/public/assets/{gruvbox-light-soft-B0dBOoVB.js → gruvbox-light-soft-C4Xh9Hc-.js} +0 -0
- /package/.output/public/assets/{haskell-BaGpmm_c.js → haskell-CaDqJkn4.js} +0 -0
- /package/.output/public/assets/{haxe-DfXTCEOz.js → haxe-Dxg-8_J7.js} +0 -0
- /package/.output/public/assets/{hcl-CbCtpSbi.js → hcl-Bjg-rMJ0.js} +0 -0
- /package/.output/public/assets/{hjson-_4-w-pHU.js → hjson-BMbeOOMg.js} +0 -0
- /package/.output/public/assets/{hlsl-DpuYn7pp.js → hlsl-D-cuwCFV.js} +0 -0
- /package/.output/public/assets/{horizon-C5RtD1fY.js → horizon-BofYY9of.js} +0 -0
- /package/.output/public/assets/{horizon-bright-pEOice34.js → horizon-bright-CFOVQsf2.js} +0 -0
- /package/.output/public/assets/{houston-A0zg9vNP.js → houston-BIBYxFpQ.js} +0 -0
- /package/.output/public/assets/{hy-t9zDXBje.js → hy-Cye3Jt7O.js} +0 -0
- /package/.output/public/assets/{imba-Bxu-TDfw.js → imba-CjkQtgD2.js} +0 -0
- /package/.output/public/assets/{ini-D-v34c8N.js → ini-BvMtfDNl.js} +0 -0
- /package/.output/public/assets/{java-DVLnIrqC.js → java-BYO3uQJZ.js} +0 -0
- /package/.output/public/assets/{javascript-Cop1kpy_.js → javascript-BsdGTPv_.js} +0 -0
- /package/.output/public/assets/{json-CTw4n7kn.js → json-Kp2u6f_f.js} +0 -0
- /package/.output/public/assets/{json5-D0XL1D5m.js → json5-BCxDPjxU.js} +0 -0
- /package/.output/public/assets/{jsonc-BBgf3TX3.js → jsonc-BV8VFjqO.js} +0 -0
- /package/.output/public/assets/{jsonl-KrKLbtB7.js → jsonl-DHrr7c-M.js} +0 -0
- /package/.output/public/assets/{jsonnet-B2ZwWMOt.js → jsonnet-xURar8mu.js} +0 -0
- /package/.output/public/assets/{jssm-ByRpI9-B.js → jssm-DtoLUQAt.js} +0 -0
- /package/.output/public/assets/{jsx-0oMUGqZj.js → jsx-CyrO086S.js} +0 -0
- /package/.output/public/assets/{kanagawa-dragon-CtPmcCMp.js → kanagawa-dragon-COwlYgQB.js} +0 -0
- /package/.output/public/assets/{kanagawa-lotus-DpOXEGCa.js → kanagawa-lotus-GZWqyq_E.js} +0 -0
- /package/.output/public/assets/{kanagawa-wave-CLVCyc-n.js → kanagawa-wave-CP4uw3DX.js} +0 -0
- /package/.output/public/assets/{kdl-6FPPEH4H.js → kdl-DGo2N7N5.js} +0 -0
- /package/.output/public/assets/{kotlin-D4L3Nd2D.js → kotlin-Cm4W8Bbs.js} +0 -0
- /package/.output/public/assets/{kusto-D-mmc07O.js → kusto-DQ22_tcT.js} +0 -0
- /package/.output/public/assets/{laserwave-7fEj4XGb.js → laserwave-DfABGYsD.js} +0 -0
- /package/.output/public/assets/{lean-BMVMuP2E.js → lean-D-8a6Wwv.js} +0 -0
- /package/.output/public/assets/{less-C95PyOu0.js → less-B-qZzFKw.js} +0 -0
- /package/.output/public/assets/{light-plus-DHI2dh3p.js → light-plus-DS_rmE1N.js} +0 -0
- /package/.output/public/assets/{llvm-Dy3qORTl.js → llvm-Ch-k6TUk.js} +0 -0
- /package/.output/public/assets/{log-BQop7fzg.js → log-BGwbCG2S.js} +0 -0
- /package/.output/public/assets/{logo-DKtnYmrp.js → logo-DHGHbFWy.js} +0 -0
- /package/.output/public/assets/{luau-Dha4KG0q.js → luau-qsvm_nYh.js} +0 -0
- /package/.output/public/assets/{make-DfmS6buu.js → make-Dlfjp_Q8.js} +0 -0
- /package/.output/public/assets/{markdown-BaI9LyM4.js → markdown-COh4ruD_.js} +0 -0
- /package/.output/public/assets/{material-theme-Dm6ETY8i.js → material-theme-Ccrl1jie.js} +0 -0
- /package/.output/public/assets/{material-theme-darker-BeyjmM5Z.js → material-theme-darker-CcOH0iHe.js} +0 -0
- /package/.output/public/assets/{material-theme-lighter-CCOYYzKL.js → material-theme-lighter-DoKpC7NM.js} +0 -0
- /package/.output/public/assets/{material-theme-ocean-CUtPiiX3.js → material-theme-ocean-BcvBZHgH.js} +0 -0
- /package/.output/public/assets/{material-theme-palenight-2L4zMwIM.js → material-theme-palenight-DIL4EAzl.js} +0 -0
- /package/.output/public/assets/{matlab-BT79Cq_j.js → matlab-CBqMuw7w.js} +0 -0
- /package/.output/public/assets/{mdx-CxGBwLNt.js → mdx-BjoJxHxW.js} +0 -0
- /package/.output/public/assets/{mermaid-DLf3axBN.js → mermaid-DjAh2yR5.js} +0 -0
- /package/.output/public/assets/{min-dark-B8TUPGHg.js → min-dark-CbwghdE5.js} +0 -0
- /package/.output/public/assets/{min-light-BDOoBxcA.js → min-light-_F39d_94.js} +0 -0
- /package/.output/public/assets/{mipsasm-DXuU_0cI.js → mipsasm-DA1H0O78.js} +0 -0
- /package/.output/public/assets/{mojo-1Omp2pIo.js → mojo-BVgjRjTn.js} +0 -0
- /package/.output/public/assets/{monokai-E_VBmXGZ.js → monokai-CxgvaWkX.js} +0 -0
- /package/.output/public/assets/{moonbit-DZzq699o.js → moonbit-tKY94ZOM.js} +0 -0
- /package/.output/public/assets/{move-DxDAOJVd.js → move-B5WspEjG.js} +0 -0
- /package/.output/public/assets/{narrat-CxDcPPb9.js → narrat-CDPRStf_.js} +0 -0
- /package/.output/public/assets/{nextflow-groovy-wvmJO4hi.js → nextflow-groovy-1GYTZoD5.js} +0 -0
- /package/.output/public/assets/{night-owl-DefhalNX.js → night-owl-CCydx7ZR.js} +0 -0
- /package/.output/public/assets/{night-owl-light-byb3AbEn.js → night-owl-light-CLM7UUPY.js} +0 -0
- /package/.output/public/assets/{nix-DsFTDHWT.js → nix-DXFN4IwW.js} +0 -0
- /package/.output/public/assets/{nord-D5rQzHT-.js → nord-CiCWZ1de.js} +0 -0
- /package/.output/public/assets/{nushell-BQ_rO0AM.js → nushell-Ck9o2qOx.js} +0 -0
- /package/.output/public/assets/{objective-c-BMq6JT_m.js → objective-c-4koxci9E.js} +0 -0
- /package/.output/public/assets/{objective-cpp-DRwojuGv.js → objective-cpp-BPFAgSN9.js} +0 -0
- /package/.output/public/assets/{ocaml-e4_gKO6E.js → ocaml-BdlBLhZV.js} +0 -0
- /package/.output/public/assets/{odin-mdTPwYOg.js → odin-BcGOLCqZ.js} +0 -0
- /package/.output/public/assets/{one-dark-pro-DxXww9jg.js → one-dark-pro-DEMdTgiO.js} +0 -0
- /package/.output/public/assets/{one-light-D9c03w7t.js → one-light-Cmpe9X1u.js} +0 -0
- /package/.output/public/assets/{openscad-D2aTdNfr.js → openscad-DBveSHYE.js} +0 -0
- /package/.output/public/assets/{pascal-D4n_G8vj.js → pascal-DxOVE99u.js} +0 -0
- /package/.output/public/assets/{pierre-dark-CizZ1Z5z.js → pierre-dark-DIUCKU6U.js} +0 -0
- /package/.output/public/assets/{pierre-light-CHMWfAMe.js → pierre-light-DVO2KPlh.js} +0 -0
- /package/.output/public/assets/{pkl-DcjhAp0L.js → pkl-pIvtf7Vu.js} +0 -0
- /package/.output/public/assets/{plastic-uOsw7z1x.js → plastic-Dvdf8qVN.js} +0 -0
- /package/.output/public/assets/{plsql-BSy3Ag0J.js → plsql-d50MFTFK.js} +0 -0
- /package/.output/public/assets/{po-Be96RYkA.js → po-CboxWwYg.js} +0 -0
- /package/.output/public/assets/{poimandres-CyO4HORD.js → poimandres-DHgQGH4M.js} +0 -0
- /package/.output/public/assets/{polar-BmhMKWum.js → polar-DNp7Oek8.js} +0 -0
- /package/.output/public/assets/{postcss-BTQso3H9.js → postcss-LpmI6XQv.js} +0 -0
- /package/.output/public/assets/{powerquery-DVyQv3M2.js → powerquery-BNCl8Uwz.js} +0 -0
- /package/.output/public/assets/{powershell-BmtCGJVD.js → powershell-CZ9J0XuS.js} +0 -0
- /package/.output/public/assets/{prisma-CCFA9rEj.js → prisma-AELUiJCl.js} +0 -0
- /package/.output/public/assets/{prolog-DWGEEo78.js → prolog-BlqwejRD.js} +0 -0
- /package/.output/public/assets/{proto-C3eop1kM.js → proto-DRQC3swD.js} +0 -0
- /package/.output/public/assets/{puppet-C0_7Nv5A.js → puppet-DBKR8MlH.js} +0 -0
- /package/.output/public/assets/{purescript-Bv-B8yRw.js → purescript-DItLzxZS.js} +0 -0
- /package/.output/public/assets/{python-CKg5r0C3.js → python-D9t_ETu8.js} +0 -0
- /package/.output/public/assets/{qmldir-Cqfb4Lox.js → qmldir-DP_KD1nk.js} +0 -0
- /package/.output/public/assets/{qss-Csho9BH8.js → qss-CL02opOd.js} +0 -0
- /package/.output/public/assets/{r-UcxRcvcA.js → r-DmmrCFmB.js} +0 -0
- /package/.output/public/assets/{racket-D8-uWeQH.js → racket-K0frLTWj.js} +0 -0
- /package/.output/public/assets/{raku-Cj4JSa8p.js → raku-DwgLlPg9.js} +0 -0
- /package/.output/public/assets/{red-z4H4llUY.js → red-DzDu-aXc.js} +0 -0
- /package/.output/public/assets/{reg-DXGFiJSl.js → reg-B_y3c7di.js} +0 -0
- /package/.output/public/assets/{regexp-3-A0406L.js → regexp--eMB47Xx.js} +0 -0
- /package/.output/public/assets/{rel-CunnVTBK.js → rel-CT65ywJp.js} +0 -0
- /package/.output/public/assets/{riscv-C8BcOCkS.js → riscv-Qv5W2vIg.js} +0 -0
- /package/.output/public/assets/{ron-DiDyR9oa.js → ron-cRHu9zPp.js} +0 -0
- /package/.output/public/assets/{rose-pine-BADquuIH.js → rose-pine-DFmTJHIJ.js} +0 -0
- /package/.output/public/assets/{rose-pine-dawn-BLcEeBoh.js → rose-pine-dawn-YIuK9wUm.js} +0 -0
- /package/.output/public/assets/{rose-pine-moon-BK_tLY1Y.js → rose-pine-moon-BYEHfkUB.js} +0 -0
- /package/.output/public/assets/{rosmsg-CHmL1Uyj.js → rosmsg-_L1z4wrx.js} +0 -0
- /package/.output/public/assets/{rust-DjJFInu3.js → rust-BA5wQ_EY.js} +0 -0
- /package/.output/public/assets/{sass-D3xZ5o-v.js → sass-sd__ov8V.js} +0 -0
- /package/.output/public/assets/{scala-B0IRml5w.js → scala--cVG4U7H.js} +0 -0
- /package/.output/public/assets/{scheme-BhwcV3Av.js → scheme-D6Q1O-kY.js} +0 -0
- /package/.output/public/assets/{sdbl-BmWYR-pI.js → sdbl-jB0DUrL_.js} +0 -0
- /package/.output/public/assets/{shellscript-DaVPunOM.js → shellscript-DyWRuzkj.js} +0 -0
- /package/.output/public/assets/{slack-dark-DOnVms5P.js → slack-dark-DHhAlQBa.js} +0 -0
- /package/.output/public/assets/{slack-ochin-DcRTft4q.js → slack-ochin-PZXbcZaN.js} +0 -0
- /package/.output/public/assets/{smalltalk-DVQuUMII.js → smalltalk-C7VkdTlv.js} +0 -0
- /package/.output/public/assets/{snazzy-light-x9CLJ1W9.js → snazzy-light-CPc_Qts9.js} +0 -0
- /package/.output/public/assets/{solarized-dark-BB1sh-pe.js → solarized-dark-DCCfKtTh.js} +0 -0
- /package/.output/public/assets/{solarized-light-9-RPS998.js → solarized-light-B84T-R9X.js} +0 -0
- /package/.output/public/assets/{solidity-gQ4WXILB.js → solidity-DVsDPpDS.js} +0 -0
- /package/.output/public/assets/{splunk-OB48_RcD.js → splunk-A-BwP6Va.js} +0 -0
- /package/.output/public/assets/{sql-CrTmZCMa.js → sql-CRzu7iKx.js} +0 -0
- /package/.output/public/assets/{ssh-config-DA9YMRGV.js → ssh-config-CFPv6mTy.js} +0 -0
- /package/.output/public/assets/{stylus-sKwvsUaC.js → stylus-CUf3IESt.js} +0 -0
- /package/.output/public/assets/{swift-C72NbAtg.js → swift-CSiiYB_Q.js} +0 -0
- /package/.output/public/assets/{synthwave-84-eJ9uRN_S.js → synthwave-84-uJp1j2Jd.js} +0 -0
- /package/.output/public/assets/{system-verilog-CnWMF7Nq.js → system-verilog-rMjKy-O9.js} +0 -0
- /package/.output/public/assets/{systemd-DMzItW5N.js → systemd-R-KDM4-t.js} +0 -0
- /package/.output/public/assets/{talonscript-DopQCWDL.js → talonscript-D666vCtm.js} +0 -0
- /package/.output/public/assets/{tasl-C28SYKbq.js → tasl-68cbBocU.js} +0 -0
- /package/.output/public/assets/{tcl-DHq7zmoF.js → tcl-Y39dJ_pX.js} +0 -0
- /package/.output/public/assets/{terraform-CogS1YKX.js → terraform-BF7wAo-b.js} +0 -0
- /package/.output/public/assets/{tokyo-night-B9N7LyrF.js → tokyo-night-EeABtN82.js} +0 -0
- /package/.output/public/assets/{toml-BH_iPsgK.js → toml-BrMFN1JF.js} +0 -0
- /package/.output/public/assets/{tsv-BIkdBZX1.js → tsv-Dp2l5v7f.js} +0 -0
- /package/.output/public/assets/{tsx-BjkCKOtw.js → tsx-CQqypS0k.js} +0 -0
- /package/.output/public/assets/{turtle-CqNXyJWZ.js → turtle-_N1aDtpV.js} +0 -0
- /package/.output/public/assets/{typescript-BoHeP9q1.js → typescript-CPmDkqmE.js} +0 -0
- /package/.output/public/assets/{typespec-CQ9LYD_e.js → typespec-ghgF2GAI.js} +0 -0
- /package/.output/public/assets/{typst-T-Fsk-Sv.js → typst-DP_izaNK.js} +0 -0
- /package/.output/public/assets/{v-BhMEOw9x.js → v-CdNC_Wok.js} +0 -0
- /package/.output/public/assets/{vala-DzajMnwt.js → vala-Bu4pYkLC.js} +0 -0
- /package/.output/public/assets/{vb-7Xr8dEYW.js → vb-u84IyWSS.js} +0 -0
- /package/.output/public/assets/{verilog-AvXtwZir.js → verilog-BC33pi7Z.js} +0 -0
- /package/.output/public/assets/{vesper-CtgQQ2sf.js → vesper-7-XtS0Kg.js} +0 -0
- /package/.output/public/assets/{vhdl-BHu0zg1P.js → vhdl-BBxTOQe0.js} +0 -0
- /package/.output/public/assets/{viml-Di0QpLfC.js → viml-X_r-ivXA.js} +0 -0
- /package/.output/public/assets/{vitesse-black-jXdfyqgD.js → vitesse-black-DRdlY-cW.js} +0 -0
- /package/.output/public/assets/{vitesse-dark-B88PxG1r.js → vitesse-dark-Bz0hOFHJ.js} +0 -0
- /package/.output/public/assets/{vitesse-light-BXxZh2iV.js → vitesse-light-7kCLd0yn.js} +0 -0
- /package/.output/public/assets/{vyper-C3R5yXgx.js → vyper-E7qIwMXy.js} +0 -0
- /package/.output/public/assets/{wasm-D_MQmneJ.js → wasm-BqG9CUph.js} +0 -0
- /package/.output/public/assets/{wasm-Chsuwt1A.js → wasm-C18OEcCL.js} +0 -0
- /package/.output/public/assets/{wenyan-BonVcr2i.js → wenyan-siXAC4el.js} +0 -0
- /package/.output/public/assets/{wgsl-D59WYmNq.js → wgsl-BJQt8Uld.js} +0 -0
- /package/.output/public/assets/{wikitext-ariTI2Wk.js → wikitext-Ci0ePJmf.js} +0 -0
- /package/.output/public/assets/{wit-EA4fa3Dt.js → wit-BdDJ7geN.js} +0 -0
- /package/.output/public/assets/{wolfram-DDp7LhyU.js → wolfram-Bi-O1IUM.js} +0 -0
- /package/.output/public/assets/{xterm-CCMwI7sy.js → xterm-TTe2Bv9Z.js} +0 -0
- /package/.output/public/assets/{yaml-BTD1XHJG.js → yaml-DgkO7CC2.js} +0 -0
- /package/.output/public/assets/{zenscript-4WaROUyc.js → zenscript-CnkrxCBw.js} +0 -0
- /package/.output/public/assets/{zig-CJoLJGwV.js → zig-CgMsxF9-.js} +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-B9LEBPKs.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/html-D5IqfVuz.js","assets/css-CsTDDTLq.js","assets/javascript-BsdGTPv_.js","assets/angular-ts-CD6u-Ij9.js","assets/scss-KPCA05M8.js","assets/apl-VeDHIFIx.js","assets/json-Kp2u6f_f.js","assets/xml-BrFkMwfd.js","assets/java-BYO3uQJZ.js","assets/astro-Dd8L1z6M.js","assets/postcss-LpmI6XQv.js","assets/tsx-CQqypS0k.js","assets/typescript-CPmDkqmE.js","assets/blade-BNxrbiva.js","assets/html-derivative-QNqmMkaY.js","assets/sql-CRzu7iKx.js","assets/bsl-B0twaj2j.js","assets/sdbl-jB0DUrL_.js","assets/c-BHFJ4Jk3.js","assets/cairo-DASKFAWI.js","assets/python-D9t_ETu8.js","assets/cobol-D_qN8j4K.js","assets/coffee-60nIQewd.js","assets/cpp-e1j1tDCV.js","assets/glsl-BrOWUUEh.js","assets/regexp--eMB47Xx.js","assets/crystal-brDfRjQ_.js","assets/shellscript-DyWRuzkj.js","assets/edge-DadfRK3Q.js","assets/elixir-CsoHPmz3.js","assets/elm-BLTa0sZG.js","assets/erb-DIR2QRkp.js","assets/ruby-BtLKlt8E.js","assets/graphql-B_3o81z5.js","assets/jsx-CyrO086S.js","assets/haml-DnNXiHAO.js","assets/lua-CFIwCMnP.js","assets/yaml-DgkO7CC2.js","assets/erlang-DnbJbitJ.js","assets/markdown-COh4ruD_.js","assets/fortran-fixed-form-Bse4XUyD.js","assets/fortran-free-form-C_EtY4F9.js","assets/fsharp-Dy8OnZ0O.js","assets/gdresource-BD_7yRHA.js","assets/gdscript-CH_tD-VB.js","assets/gdshader-BemFblFP.js","assets/git-commit-CIMjlyHf.js","assets/diff-abLZ-xM1.js","assets/git-rebase-DV2DyQK7.js","assets/glimmer-js-DVG5pFvd.js","assets/glimmer-ts-BeWaLARz.js","assets/hack-BW-0PxQy.js","assets/handlebars-CftcPtku.js","assets/http-Dd7eRKUa.js","assets/hurl-kBs5Ibg1.js","assets/csv-CXchYFbz.js","assets/hxml-CGx66ebi.js","assets/haxe-Dxg-8_J7.js","assets/jinja-BPoCSjyd.js","assets/jison-WHPVy3Jl.js","assets/julia-BaKiQMPf.js","assets/r-DmmrCFmB.js","assets/just-BKMc7tVT.js","assets/perl-DyRCGnKu.js","assets/latex-Cczzu1HI.js","assets/tex-CvSRdXZA.js","assets/liquid-DrJZrMEf.js","assets/marko-BreagErn.js","assets/less-B-qZzFKw.js","assets/mdc-CBcMHZUq.js","assets/nextflow-CZbrTmS2.js","assets/nextflow-groovy-1GYTZoD5.js","assets/nginx-CMOi8dTH.js","assets/nim-DbDZ9Wa-.js","assets/php-Ciarv7b4.js","assets/pug-CVCqbfEm.js","assets/qml-DechmdFA.js","assets/razor-bgzHke67.js","assets/csharp-BdEyRqBm.js","assets/rst-Ce6_XwFd.js","assets/cmake-CZndsvm6.js","assets/sas-Bco5tnse.js","assets/shaderlab-uUHiM5Mm.js","assets/hlsl-D-cuwCFV.js","assets/shellsession-BnUZVYXU.js","assets/soy-Dsrg4bVI.js","assets/sparql-D5zsvcbT.js","assets/turtle-_N1aDtpV.js","assets/stata-BdK5CFUf.js","assets/surrealql-Blm5wp47.js","assets/svelte-DZrj_gMz.js","assets/templ-CJ7sDrtu.js","assets/go-BUPBDRDo.js","assets/ts-tags-DgGFCSef.js","assets/twig-D8_PS89g.js","assets/vue-KvGEuYod.js","assets/vue-html-qAt9D-IF.js","assets/vue-vine-j1nOqxMu.js","assets/stylus-CUf3IESt.js","assets/xsl-OmCo2PyZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-S-ySWqyJ.js";import{$n as r,$r as i,$t as a,Ar as o,Br as s,Bt as c,Cn as l,Dn as u,Gn as d,Gr as f,Hn as p,Hr as m,Ht as h,In as g,It as _,Jn as v,Jr as y,Jt as b,Kn as x,Kr as S,Kt as C,Ln as w,Lr as T,Lt as E,Mr as D,Or as O,Pn as k,Pr as A,Pt as ee,Qn as j,Qt as M,Rn as te,Sn as ne,Tn as N,Tr as re,Un as ie,Ur as ae,Ut as P,Vn as oe,Vr as se,Vt as ce,Wn as le,Wr as ue,Wt as de,Xn as fe,Xr as F,Xt as pe,Yn as me,Yt as he,Zn as ge,Zt as _e,_n as ve,_r as ye,ai as be,an as xe,ar as Se,bn as Ce,br as we,cn as Te,cr as Ee,di as De,dn as Oe,dr as ke,dt as Ae,ei as je,en as Me,er as Ne,fn as Pe,fr as Fe,ft as Ie,hn as Le,hr as Re,ht as ze,ii as Be,in as Ve,ir as He,jr as Ue,jt as We,kn as Ge,kr as Ke,li as qe,ln as Je,lr as Ye,mn as Xe,ni as Ze,nn as Qe,nr as $e,oi as et,on as tt,or as nt,pn as rt,pr as it,qn as at,qr as ot,qt as st,ri as ct,rn as lt,rr as ut,si as dt,sn as ft,sr as pt,t as I,ti as mt,tn as ht,tr as gt,ui as _t,un as vt,ur as yt,vn as bt,vr as xt,wr as St,wt as Ct,xn as wt,xr as Tt,yn as Et,yr as Dt,zr as Ot,zt as kt}from"./preload-helper-Csz9R64u.js";import{$ as At,B as jt,G as Mt,H as Nt,J as Pt,K as Ft,O as It,Q as Lt,R as Rt,S as zt,U as Bt,V as Vt,W as Ht,X as Ut,Y as Wt,Z as Gt,at as Kt,ct as qt,et as Jt,g as Yt,i as Xt,j as Zt,k as Qt,nt as $t,ot as en,q as tn,r as nn,rt as rn,st as an,t as on,tt as sn,v as cn,x as ln,y as un,z as dn}from"./query-keys-C9jMaRnO.js";import{C as fn,S as pn,T as mn,_ as hn,a as gn,b as _n,c as vn,d as yn,f as bn,g as xn,h as Sn,l as Cn,m as wn,n as Tn,p as En,s as Dn,u as On,v as kn,w as An,x as jn,y as Mn}from"./index-FOqZaR4L.js";var Nn=class extends mn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=yn(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Fn(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return In(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return In(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof kn(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!_n(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ln(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return zn(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Sn)),t}#g(){this.#b();let e=Mn(this.options.staleTime,this.#t);if(bn.isServer()||this.#r.isStale||!wn(e))return;let t=pn(this.#r.dataUpdatedAt,e)+1;this.#d=fn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(bn.isServer()||kn(this.options.enabled,this.#t)===!1||!wn(this.#p)||this.#p===0)&&(this.#f=fn.setInterval(()=>{(this.options.refetchIntervalInBackground||An.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(fn.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(fn.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Fn(e,t),o=i&&Ln(e,n,t,r);(a||o)&&(l={...l,...Cn(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=xn(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=xn(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Rn(e,t),refetch:this.refetch,promise:this.#o,isEnabled:kn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=yn())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!_n(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){On.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Pn(e,t){return kn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Fn(e,t){return Pn(e,t)||e.state.data!==void 0&&In(e,t,t.refetchOnMount)}function In(e,t,n){if(kn(t.enabled,e)!==!1&&Mn(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Rn(e,t)}return!1}function Ln(e,t,n,r){return(e!==t||kn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Rn(e,n)}function Rn(e,t){return kn(t.enabled,e)!==!1&&e.isStaleByTime(Mn(t.staleTime,e))}function zn(e,t){return!_n(e.getCurrentResult(),t)}var Bn=class extends mn{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),_n(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&En(t.mutationKey)!==En(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??vn();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){On.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},L=qe(),R=t(De(),1),Vn=R.createContext(!1),Hn=()=>R.useContext(Vn);Vn.Provider;function Un(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wn=R.createContext(Un()),Gn=()=>R.useContext(Wn),Kn=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?jn(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},qn=e=>{R.useEffect(()=>{e.clearReset()},[e])},Jn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||jn(n,[e.error,r])),Yn=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Xn=(e,t)=>e.isLoading&&e.isFetching&&!t,Zn=(e,t)=>e?.suspense&&t.isPending,Qn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $n(e,t,n){let r=Hn(),i=Gn(),a=Dn(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Yn(o),Kn(o,i,s),qn(i);let c=!a.getQueryCache().get(o.queryHash),[l]=R.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(e=>{let t=d?l.subscribe(On.batchCalls(e)):Sn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(o)},[o,l]),Zn(o,u))throw Qn(o,l,i);if(Jn({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!bn.isServer()&&Xn(u,r)&&(c?Qn(o,l,i):s?.promise)?.catch(Sn).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function er(e,t){return $n(e,Nn,t)}function tr(e,t){let n=Dn(t);return rr({filters:{...e,status:`pending`}},n).length}function nr(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function rr(e={},t){let n=Dn(t).getMutationCache(),r=R.useRef(e),i=R.useRef(null);return i.current===null&&(i.current=nr(n,e)),R.useEffect(()=>{r.current=e}),R.useSyncExternalStore(R.useCallback(e=>n.subscribe(()=>{let t=hn(i.current,nr(n,r.current));i.current!==t&&(i.current=t,On.schedule(e))}),[n]),()=>i.current,()=>i.current)}function ir(e,t){let n=Dn(t),[r]=R.useState(()=>new Bn(n,e));R.useEffect(()=>{r.setOptions(e)},[r,e]);let i=R.useSyncExternalStore(R.useCallback(e=>r.subscribe(On.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=R.useCallback((e,t)=>{r.mutate(e,t).catch(Sn)},[r]);if(i.error&&jn(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function ar(){if(typeof navigator>`u`)return`linux`;let e=navigator.platform?.toLowerCase()??``,t=navigator.userAgent?.toLowerCase()??``;return e.includes(`mac`)||t.includes(`mac`)?`mac`:e.includes(`win`)||t.includes(`win`)?`windows`:`linux`}var or=[`Control`,`Alt`,`Shift`,`Meta`];new Set(or);var sr={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`};function cr(e,t=ar()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}var lr=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``)),ur=new Set([`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]),dr=new Set([`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`]),fr=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]),pr=new Set([`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`]),mr=new Set([`/`,`[`,`]`,`\\`,`=`,`-`,`,`,`.`,`;`,"`"]),hr={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Semicolon:`;`,Slash:`/`};new Set([...lr,...ur,...dr,...fr,...pr,...mr]);var gr={Esc:`Escape`,esc:`Escape`,escape:`Escape`,Return:`Enter`,return:`Enter`,enter:`Enter`," ":`Space`,space:`Space`,Spacebar:`Space`,spacebar:`Space`,tab:`Tab`,backspace:`Backspace`,Del:`Delete`,del:`Delete`,delete:`Delete`,Up:`ArrowUp`,up:`ArrowUp`,arrowup:`ArrowUp`,Down:`ArrowDown`,down:`ArrowDown`,arrowdown:`ArrowDown`,Left:`ArrowLeft`,left:`ArrowLeft`,arrowleft:`ArrowLeft`,Right:`ArrowRight`,right:`ArrowRight`,arrowright:`ArrowRight`,home:`Home`,end:`End`,pageup:`PageUp`,pagedown:`PageDown`,PgUp:`PageUp`,PgDn:`PageDown`,pgup:`PageUp`,pgdn:`PageDown`};function _r(e){return/^\p{Letter}$/u.test(e)}function vr(e){if(!e)return``;if(e in gr)return gr[e];if(_r(e)){let t=e.toUpperCase();return t.length===1?t:e}let t=e.toUpperCase();return/^F([1-9]|1[0-2])$/.test(t)?t:e}var yr={Control:`⌃`,Alt:`⌥`,Shift:`⇧`,Meta:`⌘`,Mod:`⌘`},br={Control:`Control`,Alt:`Option`,Shift:`Shift`,Meta:`Cmd`,Mod:`Cmd`},xr={Control:`Ctrl`,Alt:`Alt`,Shift:`Shift`,Meta:`Win`,Mod:`Ctrl`},Sr={...xr,Meta:`Super`},Cr={"`":`Backquote`,"\\":`Backslash`,"[":`Left Bracket`,"]":`Right Bracket`,",":`Comma`,"=":`Equal`,"-":`Minus`,".":`Period`,";":`Semicolon`},wr={ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Enter:`↵`,Escape:`Esc`,Backspace:`⌫`,Delete:`⌦`,Tab:`⇥`,Space:`␣`};function Tr(e,t=ar()){let n=e.split(`+`),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=vr(a);else{let e=sr[a]??sr[a.toLowerCase()];if(e){let n=cr(e,t);r.add(n)}else n.length===1&&(i=vr(a))}}return!i&&n.length>0&&(i=vr(n[n.length-1].trim())),{key:i,ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:or.filter(e=>r.has(e))}}function Er(e,t=ar()){let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(cr(`Mod`,t)===`Control`?n=!0:a=!0);let o=or.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{key:e.key,ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function Dr(e,t){let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of or)e.modifiers.includes(t)&&r.push(t);return r.push(vr(e.key)),r.join(`+`)}function Or(e,t=ar()){return Dr(Tr(e,t),t)}function kr(e,t=ar()){return Dr(e,t)}function Ar(e,t=ar()){return typeof e==`string`?Or(e,t):kr(Er(e,t),t)}function jr(e){return e in sr||e.toLowerCase()in sr}function Mr(e){let t=[];for(let n of or)e.modifiers.includes(n)&&t.push(n);return t.push(e.key),t.join(`+`)}function Nr(e,t={}){let n=t.platform??ar(),r=t.useSymbols??!0,i=t.separatorToken??(n===`mac`&&r?` `:`+`);return Ar(e,n).split(`+`).map(e=>{if(jr(e)){let t=sr[e]??sr[e.toLowerCase()];return n===`mac`?r?yr[t]:br[t]:n===`windows`?xr[t]:Sr[t]}else return r&&wr[e]||!r&&Cr[e]||e}).join(i)}function Pr(e,t,n=ar()){let r=typeof t==`string`?Tr(t,n):t;if(e.ctrlKey!==r.ctrl||e.shiftKey!==r.shift||e.altKey!==r.alt||e.metaKey!==r.meta)return!1;let i=vr(e.key),a=r.key;if(i!==`Dead`&&i.length===1&&a.length===1){if(i.toUpperCase()===a.toUpperCase())return!0;if(_r(i)&&(/^[A-Za-z]$/.test(i)||!e.altKey))return!1}if(e.code&&(i===`Dead`||i.length===1&&a.length===1)){if(e.code.startsWith(`Key`)){let t=e.code.slice(3);if(t.length===1&&/^[A-Za-z]$/.test(t))return t.toUpperCase()===a.toUpperCase()}if(e.code.startsWith(`Digit`)){let t=e.code.slice(5);if(t.length===1&&/^[0-9]$/.test(t))return t===a}return e.code in hr?hr[e.code]===a:!1}return i===a}function Fr(e,t={}){let n=`rootStore`in e?e.rootStore:e,a=n.context.dataRef,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,stickIfOpen:u=!0,touchOpenDelay:d=0,reason:p=T}=t,h=R.useRef(void 0),g=yt(),_=i(),v=R.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let t=h.current,i=e.nativeEvent,o=n.select(`open`);if(e.button!==0||s===`click`||f(t,!0)&&l)return;let m=a.current.openEvent,v=m?.type,y=n.select(`domReferenceElement`)!==e.currentTarget,b=o&&y||!(o&&c&&(!(m&&u)||v===`click`||v===`mousedown`)),x=$e(i);if(r(x)){let e=St(p,i,x);b&&t===`touch`&&d>0?_.start(d,()=>{n.setOpen(!0,e)}):n.setOpen(b,e);return}let S=e.currentTarget;g.request(()=>{let e=St(p,i,S);b&&t===`touch`&&d>0?_.start(d,()=>{n.setOpen(!0,e)}):n.setOpen(b,e)})},onClick(e){if(s===`mousedown-only`)return;let t=h.current;if(s===`mousedown`&&t){h.current=void 0;return}if(f(t,!0)&&l)return;let r=n.select(`open`),i=a.current.openEvent,o=n.select(`domReferenceElement`)!==e.currentTarget,m=r&&o||!(r&&c&&(!(i&&u)||ue(i))),g=St(p,e.nativeEvent,e.currentTarget);m&&t===`touch`&&d>0?_.start(d,()=>{n.setOpen(!0,g)}):n.setOpen(m,g)},onKeyDown(){h.current=void 0}}),[a,s,l,n,u,c,g,_,d,p]);return R.useMemo(()=>o?{reference:v}:m,[o,v])}function Ir(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var Lr=`Escape`;function Rr(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function zr(e,t){return Rr(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Br(e,t,n){return Rr(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Vr(e,t,n){return Rr(t,n?e===He:e===Se,e===ut)}function Hr(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Lr:Rr(t,n?e===Se:e===He,e===nt)}function Ur(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:m=!1,loopFocus:h=!1,nested:g=!1,rtl:_=!1,virtual:v=!1,focusItemOnOpen:b=`auto`,focusItemOnHover:C=!0,openOnArrowKeyDown:w=!0,disabledIndices:T=void 0,orientation:E=`vertical`,parentOrientation:D,cols:k=1,id:A,resetOnPointerLeave:ee=!0,externalTree:M}=t,te=Fe(ge(i)),ne=Ce(),N=wt(M);Ze(()=>{o.current.orientation=E},[o,E]);let re=j(a),ae=R.useRef(b),P=R.useRef(f??-1),se=R.useRef(null),ce=R.useRef(!0),ue=ke(e=>{l(P.current===-1?null:P.current,e)}),de=R.useRef(ue),F=R.useRef(!!i),pe=R.useRef(r),he=R.useRef(!1),_e=R.useRef(!1),ve=R.useRef(null),ye=Fe(T),be=Fe(r),xe=Fe(f),Se=Fe(ee),Te=ke(()=>{function e(e){v?N?.events.emit(`virtualfocus`,e):ve.current=qt(e,{sync:he.current,preventScroll:!0})}let t=s.current[P.current],n=_e.current;t&&e(t),(he.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[P.current]||t;r&&(t||e(r),Ae&&(n||!ce.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Ze(()=>{u&&(r&&i?(P.current=f??-1,ae.current&&f!=null&&(_e.current=!0,ue())):F.current&&(P.current=-1,de.current()))},[u,r,i,f,ue]),Ze(()=>{if(u){if(!r){he.current=!1;return}if(i)if(c==null){if(he.current=!1,xe.current!=null)return;if(F.current&&(P.current=-1,Te()),(!pe.current||!F.current)&&ae.current&&(se.current!=null||ae.current===!0&&se.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(P.current=se.current==null||Br(se.current,E,_)||g?at(s):x(s),se.current=null,ue())};t()}}else me(s.current,c)||(P.current=c,Te(),_e.current=!1)}},[u,r,i,c,xe,g,s,E,_,ue,Te,ye]),Ze(()=>{if(!u||i||!N||v||!F.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===ne)?.context?.elements.floating,n=Ne(Ee(i)),r=e.some(e=>e.context&>(e.context.elements.floating,n));t&&!r&&ce.current&&t.focus({preventScroll:!0})},[u,i,N,ne,v]),Ze(()=>{de.current=ue,pe.current=r,F.current=!!i}),Ze(()=>{r||(se.current=null,ae.current=b)},[r,b]);let De=c!=null,Oe=ke(e=>{if(!be.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||c!==t)&&(P.current=t,ue(e))}),Ae=R.useMemo(()=>({onFocus(e){he.current=!0,Oe(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){he.current=!0,_e.current=!1,C&&Oe(e)},onPointerLeave(e){if(!be.current||!ce.current||e.pointerType===`touch`)return;he.current=!0;let t=e.relatedTarget;if(!Ir(e)&&!(!C||s.current.includes(t))&&Se.current&&(ve.current?.(),ve.current=null,P.current=-1,ue(e),!v)){let e=te.current,t=Ne(Ee(e));e&>(e,t)&&e.focus({preventScroll:!0})}}}),[Oe,be,te,C,s,ue,Se,v]),je=R.useCallback(()=>D??N?.nodesRef.current.find(e=>e.id===ne)?.context?.dataRef?.current.orientation,[ne,N,D]),Me=ke(e=>{if(ce.current=!1,he.current=!0,e.which===229||!be.current&&e.currentTarget===te.current)return;if(g&&Hr(e.key,E,_,k)){zr(e.key,je())||y(e),n.setOpen(!1,St(Ue,e.nativeEvent)),we(a)&&(v?N?.events.emit(`virtualfocus`,a):a.focus());return}let t=P.current,i=at(s,T),o=x(s,T);if(re||(e.key===`Home`&&(y(e),P.current=i,ue(e)),e.key===`End`&&(y(e),P.current=o,ue(e))),k>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=oe(t,k,!1),r=n.findIndex(e=>e!=null&&!fe(s.current,e,T)),a=n.reduce((e,t,n)=>t!=null&&!fe(s.current,t,T)?n:e,-1),c=n[d(n.map(e=>e==null?null:s.current[e]),{event:e,orientation:E,loopFocus:h,rtl:_,cols:k,disabledIndices:le([...(typeof T==`function`?null:T)||s.current.map((e,t)=>fe(s.current,t,T)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:ie(P.current>o?i:P.current,t,n,k,e.key===`ArrowDown`?`bl`:e.key===(_?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(P.current=c,ue(e)),E===`both`)return}if(zr(e.key,E)){if(y(e),r&&!v&&Ne(e.currentTarget.ownerDocument)===e.currentTarget){P.current=Br(e.key,E,_)?i:o,ue(e);return}Br(e.key,E,_)?h?t>=o?m&&t!==s.current.length?P.current=-1:(he.current=!1,P.current=i):P.current=p(s.current,{startingIndex:t,disabledIndices:T}):P.current=Math.min(o,p(s.current,{startingIndex:t,disabledIndices:T})):h?t<=i?m&&t!==-1?P.current=s.current.length:(he.current=!1,P.current=o):P.current=p(s.current,{startingIndex:t,decrement:!0,disabledIndices:T}):P.current=Math.max(i,p(s.current,{startingIndex:t,decrement:!0,disabledIndices:T})),me(s.current,P.current)&&(P.current=-1),ue(e)}}),Pe=R.useMemo(()=>v&&r&&De&&{"aria-activedescendant":`${A}-${c}`},[v,r,De,A,c]),Ie=R.useMemo(()=>({"aria-orientation":E===`both`?void 0:E,...re?{}:Pe,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!v){let t=$e(e.nativeEvent);if(t&&!gt(te.current,t))return;y(e),n.setOpen(!1,St(O,e.nativeEvent)),we(a)&&a.focus();return}Me(e)},onPointerMove(){ce.current=!0}}),[Pe,Me,te,E,re,n,r,v,a]),Le=R.useMemo(()=>{function e(e){b===`auto`&&S(e.nativeEvent)&&(ae.current=!v)}function t(e){ae.current=b,b===`auto`&&ot(e.nativeEvent)&&(ae.current=!0)}return{onKeyDown(e){let t=n.select(`open`);ce.current=!1;let r=e.key.startsWith(`Arrow`),i=Vr(e.key,je(),_),a=zr(e.key,E),o=(g?i:a)||e.key===`Enter`||e.key.trim()===``;if(v&&t)return Me(e);if(!(!t&&!w&&r)){if(o){let t=zr(e.key,je());se.current=g&&t?null:e.key}if(g){i&&(y(e),t?(P.current=at(s,ye.current),ue(e)):n.setOpen(!0,St(Ue,e.nativeEvent,e.currentTarget)));return}a&&(xe.current!=null&&(P.current=xe.current),y(e),!t&&w?n.setOpen(!0,St(Ue,e.nativeEvent,e.currentTarget)):Me(e),t&&ue(e))}},onFocus(e){n.select(`open`)&&!v&&(P.current=-1,ue(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[Me,ye,b,s,g,ue,n,w,E,je,_,xe,v]),Re=R.useMemo(()=>({...Pe,...Le}),[Pe,Le]);return R.useMemo(()=>u?{reference:Re,floating:Ie,item:Ae,trigger:Le}:{},[u,Re,Ie,Le,Ae])}function Wr(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,a=n.useState(`open`),{listRef:o,elementsRef:s,activeIndex:c,onMatch:l,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=t,m=i(),h=R.useRef(``),g=R.useRef(p??c??-1),_=R.useRef(null);Ze(()=>{!a&&p!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[a,p,m]),Ze(()=>{a&&h.current===``&&(g.current=p??c??-1)},[a,p,c]);let b=ke(e=>{e?r.current.typing||(r.current.typing=e,u?.(e)):r.current.typing&&(r.current.typing=e,u?.(e))}),x=ke(e=>{function t(e){let t=s?.current[e];return!t||v(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=o.current;if(h.current.length>0&&e.key===` `&&(y(e),b(!0)),h.current.length>0&&h.current[0]!==` `&&n(r,h.current)===-1&&e.key!==` `&&b(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;a&&e.key!==` `&&(y(e),b(!0));let i=h.current===``;i&&(g.current=p??c??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(f,()=>{h.current=``,g.current=_.current,b(!1)});let u=((i?p??c??-1:g.current)??0)+1,d=n(r,h.current,u);d===-1?e.key!==` `&&(h.current=``,b(!1)):(l?.(d),_.current=d)}),S=ke(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=gt(r,t),o=gt(i,t);a||o||(m.clear(),h.current=``,g.current=_.current,b(!1))}),C=R.useMemo(()=>({onKeyDown:x,onBlur:S}),[x,S]),w=R.useMemo(()=>({onKeyDown:x,onBlur:S}),[x,S]);return R.useMemo(()=>d?{reference:C,floating:w}:{},[d,C,w])}var Gr=_(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Kr=_(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),qr=_(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Jr=_(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),Yr=_(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Xr=_(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Zr=_(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Qr=_(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),$r=_(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),ei=_(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ti=_(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ni=_(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),ri=_(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),ii=t(_t()),z=dt(),ai=`diffs-container`,oi=/(?=^From [a-f0-9]+ .+$)/m,si=/(?=^diff --git)/gm,ci=/(?=^---\s+\S)/gm,li=/(?=^@@ )/gm,ui=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,di=/(?<=\n)/,fi=/^(---|\+\+\+)\s+([^\t\r\n]+)/,pi=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,mi=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,hi=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,gi=`header-prefix`,_i=`header-metadata`,vi=`header-custom`,yi={dark:`pierre-dark`,light:`pierre-light`},bi=`data-theme-css`,xi=`data-unsafe-css`,Si={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},Ci=Object.freeze({fromStart:0,fromEnd:0}),wi={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ti={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Ei(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Di(e){return{type:`text`,value:e}}function B({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Oi({name:e,width:t=16,height:n=16,properties:r}){return B({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[B({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function ki(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Ai(e){return B({tagName:`div`,properties:{"data-gutter":``},children:e})}function ji(e,t,n,r={}){return B({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[B({tagName:`span`,properties:{"data-line-number-content":``},children:[Di(`${t}`)]})]})}function Mi(e,t,n){return B({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Ni(){return B({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Oi({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function Pi(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Fi=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ii=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ii.prototype.normal={},Ii.prototype.property={},Ii.prototype.space=void 0;function Li(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ii(n,r,t)}function Ri(e){return e.toLowerCase()}var zi=class{constructor(e,t){this.attribute=t,this.property=e}};zi.prototype.attribute=``,zi.prototype.booleanish=!1,zi.prototype.boolean=!1,zi.prototype.commaOrSpaceSeparated=!1,zi.prototype.commaSeparated=!1,zi.prototype.defined=!1,zi.prototype.mustUseProperty=!1,zi.prototype.number=!1,zi.prototype.overloadedBoolean=!1,zi.prototype.property=``,zi.prototype.spaceSeparated=!1,zi.prototype.space=void 0;var Bi=e({boolean:()=>V,booleanish:()=>Hi,commaOrSpaceSeparated:()=>Ki,commaSeparated:()=>Gi,number:()=>H,overloadedBoolean:()=>Ui,spaceSeparated:()=>Wi}),Vi=0,V=qi(),Hi=qi(),Ui=qi(),H=qi(),Wi=qi(),Gi=qi(),Ki=qi();function qi(){return 2**++Vi}var Ji=Object.keys(Bi),Yi=class extends zi{constructor(e,t,n,r){let i=-1;if(super(e,t),Xi(this,`space`,r),typeof n==`number`)for(;++i<Ji.length;){let e=Ji[i];Xi(this,Ji[i],(n&Bi[e])===Bi[e])}}};Yi.prototype.defined=!0;function Xi(e,t,n){n&&(e[t]=n)}function Zi(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Yi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ri(r)]=r,n[Ri(a.attribute)]=r}return new Ii(t,n,e.space)}var Qi=Zi({properties:{ariaActiveDescendant:null,ariaAtomic:Hi,ariaAutoComplete:null,ariaBusy:Hi,ariaChecked:Hi,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Wi,ariaCurrent:null,ariaDescribedBy:Wi,ariaDetails:null,ariaDisabled:Hi,ariaDropEffect:Wi,ariaErrorMessage:null,ariaExpanded:Hi,ariaFlowTo:Wi,ariaGrabbed:Hi,ariaHasPopup:null,ariaHidden:Hi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wi,ariaLevel:H,ariaLive:null,ariaModal:Hi,ariaMultiLine:Hi,ariaMultiSelectable:Hi,ariaOrientation:null,ariaOwns:Wi,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Hi,ariaReadOnly:Hi,ariaRelevant:null,ariaRequired:Hi,ariaRoleDescription:Wi,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Hi,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function $i(e,t){return t in e?e[t]:t}function ea(e,t){return $i(e,t.toLowerCase())}var ta=Zi({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Gi,acceptCharset:Wi,accessKey:Wi,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:Wi,autoFocus:V,autoPlay:V,blocking:Wi,capture:null,charSet:null,checked:V,cite:null,className:Wi,cols:H,colSpan:null,content:null,contentEditable:Hi,controls:V,controlsList:Wi,coords:H|Gi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Ui,draggable:Hi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:Wi,height:H,hidden:Ui,high:H,href:null,hrefLang:null,htmlFor:Wi,httpEquiv:Wi,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:Wi,itemRef:Wi,itemScope:V,itemType:Wi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,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:V,optimum:H,pattern:null,ping:Wi,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:Wi,required:V,reversed:V,rows:H,rowSpan:H,sandbox:Wi,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Hi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:Hi,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Wi,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Hi,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:ea}),na=Zi({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:Ki,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Wi,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Gi,g2:Gi,glyphName:Gi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Ki,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Wi,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ki,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ki,rev:Ki,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ki,requiredFeatures:Ki,requiredFonts:Ki,requiredFormats:Ki,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Ki,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ki,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ki,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:$i}),ra=Zi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ia=Zi({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ea}),aa=Zi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),oa={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`},sa=/[A-Z]/g,ca=/-[a-z]/g,la=/^data[-\w.:]+$/i;function ua(e,t){let n=Ri(t),r=t,i=zi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&la.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ca,fa);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ca.test(e)){let n=e.replace(sa,da);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Yi}return new i(r,t)}function da(e){return`-`+e.toLowerCase()}function fa(e){return e.charAt(1).toUpperCase()}var pa=Li([Qi,ta,ra,ia,aa],`html`),ma=Li([Qi,na,ra,ia,aa],`svg`),ha={}.hasOwnProperty;function ga(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&ha.call(t,e)){let n=String(t[e]);i=ha.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var _a=/["&'<>`]/g,va=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ya=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ba=/[|\\{}()[\]^$+*?.]/g,xa=new WeakMap;function Sa(e,t){if(e=e.replace(t.subset?Ca(t.subset):_a,r),t.subset||t.escapeOnly)return e;return e.replace(va,n).replace(ya,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Ca(e){let t=xa.get(e);return t||(t=wa(e),xa.set(e,t)),t}function wa(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(ba,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Ta=/[\dA-Fa-f]/;function Ea(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Ta.test(String.fromCharCode(t))?r:r+`;`}var Da=/\d/;function Oa(e,t,n){let r=`&#`+String(e);return n&&t&&!Da.test(String.fromCharCode(t))?r:r+`;`}var ka=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Aa={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},ja=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Ma={}.hasOwnProperty,Na={},Pa;for(Pa in Aa)Ma.call(Aa,Pa)&&(Na[Aa[Pa]]=Pa);var Fa=/[^\dA-Za-z]/;function Ia(e,t,n,r){let i=String.fromCharCode(e);if(Ma.call(Na,i)){let e=Na[i],a=`&`+e;return n&&ka.includes(e)&&!ja.includes(e)&&(!r||t&&t!==61&&Fa.test(String.fromCharCode(t)))?a:a+`;`}return``}function La(e,t,n){let r=Ea(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Ia(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Oa(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ra(e,t){return Sa(e,Object.assign({format:La},t))}var za=/^>|^->|<!--|-->|--!>|<!-$/g,Ba=[`>`],Va=[`<`,`>`];function Ha(e,t,n,r){return r.settings.bogusComments?`<?`+Ra(e.value,Object.assign({},r.settings.characterReferences,{subset:Ba}))+`>`:`<!--`+e.value.replace(za,i)+`-->`;function i(e){return Ra(e,Object.assign({},r.settings.characterReferences,{subset:Va}))}}function Ua(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Wa(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ga(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Ka(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function qa(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ja(e){return e.join(` `).trim()}var Ya=/[ \t\n\f\r]/g;function Xa(e){return typeof e==`object`?e.type===`text`?Za(e.value):!1:Za(e)}function Za(e){return e.replace(Ya,``)===``}var Qa=to(1),$a=to(-1),eo=[];function to(e){return t;function t(t,n,r){let i=t?t.children:eo,a=(n||0)+e,o=i[a];if(!r)for(;o&&Xa(o);)a+=e,o=i[a];return o}}var no={}.hasOwnProperty;function ro(e){return t;function t(t,n,r){return no.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var io=ro({body:so,caption:ao,colgroup:ao,dd:fo,dt:uo,head:ao,html:oo,li:lo,optgroup:mo,option:ho,p:co,rp:po,rt:po,tbody:_o,td:bo,tfoot:vo,th:bo,thead:go,tr:yo});function ao(e,t,n){let r=Qa(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Xa(r.value.charAt(0)))}function oo(e,t,n){let r=Qa(n,t);return!r||r.type!==`comment`}function so(e,t,n){let r=Qa(n,t);return!r||r.type!==`comment`}function co(e,t,n){let r=Qa(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function lo(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&r.tagName===`li`}function uo(e,t,n){let r=Qa(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function fo(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function po(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function mo(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function ho(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function go(e,t,n){let r=Qa(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function _o(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function vo(e,t,n){return!Qa(n,t)}function yo(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function bo(e,t,n){let r=Qa(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var xo=ro({body:wo,colgroup:To,head:Co,html:So,tbody:Eo});function So(e){let t=Qa(e,-1);return!t||t.type!==`comment`}function Co(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function wo(e){let t=Qa(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Xa(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function To(e,t,n){let r=$a(n,t),i=Qa(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&io(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Eo(e,t,n){let r=$a(n,t),i=Qa(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&io(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Do={name:[[`
|
|
3
|
+
\f\r &/=>`.split(``),`
|
|
4
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
5
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
6
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
7
|
+
\f\r &>`.split(``),`\0
|
|
8
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
9
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
10
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Oo(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=ma);let l=ko(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!xo(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!io(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function ko(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Ao(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Ao(e,t,n){let r=ua(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ra(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Do.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ka:Ja)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ra(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Do.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Wa(n,o)>Wa(n,e.alternative)&&(o=e.alternative),s=o+Ra(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Do.single:Do.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var jo=[`<`,`&`];function Mo(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ra(e.value,Object.assign({},r.settings.characterReferences,{subset:jo}))}function No(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Mo(e,t,n,r)}function Po(e,t,n,r){return r.all(e)}var Fo=ga(`type`,{invalid:Io,unknown:Lo,handlers:{comment:Ha,doctype:Ua,element:Oo,raw:No,root:Po,text:Mo}});function Io(e){throw Error("Expected node, not `"+e+"`")}function Lo(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Ro={},zo={},Bo=[];function Vo(e,t){let n=t||Ro,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ho,all:Uo,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Fi,characterReferences:n.characterReferences||zo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?ma:pa,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Ho(e,t,n){return Fo(e,t,n,this)}function Uo(e){let t=[],n=e&&e.children||Bo,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Wo=class{hoveredLine;hoveredToken;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e){let t=!(e===this.selectedRange||Ei(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.selectedRange=e,this.renderSelection(),t&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode===`diff`&&this.hoveredLine.type===`diff-line`)return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode===`file`&&this.hoveredLine.type===`line`)return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;t==null&&n==null&&r==null&&a==null&&i==null||this.options.onGutterUtilityClick!=null&&ns(e.composedPath())||(rs(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e}))};handlePointerMove=e=>{let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(rs(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(rs(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){rs(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.gutterUtilityContainer?.remove(),this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();rs(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);rs(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Yo(i)&&this.hoveredLine?.lineElement===i.lineElement;Jo(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Jo(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Yo(i)&&(this.setHoveredLine(this.toEventBaseProps(i)),this.gutterUtilityContainer!=null&&i.numberElement.appendChild(this.gutterUtilityContainer),s?.({...this.hoveredLine,event:t})));break}case`click`:{if(i==null)break;if(Zo(i)&&p!=null){p(i);break}if(Xo(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Yo(i))break;Jo(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,rs(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),rs(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),rs(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();ns(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e,t):this.startLineSelectionFromPointerDown(e,t)};startLineSelectionFromPointerDown(e,t){let{enableLineSelection:n=!1}=this.options;if(!n)return;let r=this.getSelectionPointerInfo(t,!0);if(r==null)return;let{pre:i}=this;if(i==null)return;e.preventDefault();let{lineNumber:a,eventSide:o,lineIndex:s}=r;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,i.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?s>=t.start:s<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){let t={lineNumber:a,side:o};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:a,side:o},this.updateSelection(a,o,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e,t){let{enableLineSelection:n=!1,onGutterUtilityClick:r}=this.options;if(r==null)return;let i=this.getSelectionPointFromPath(t);i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:i},n&&(this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.selectedRange)),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let n=this.getSelectionPointFromPath(e.composedPath());if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let t=this.getSelectionPointerInfo(e.composedPath(),!1);if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;let t=this.getSelectionPointerInfo(e.composedPath(),!1);if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Pi(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;let r=this.getSelectionPointFromPath(e.composedPath());r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Vo(Ni());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}getSelectionPointerInfo(e,t){let n=this.resolvePointerTarget(e);if(qo(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}getSelectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(qo(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}updateSelection(e,t,n=!0){let{selectedRange:r}=this,i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}Ei(r??void 0,i??void 0)||(this.selectedRange=i,n&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t){let[t,r]=e.children,s=r.children.length;if(s!==t.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<s;e++){let s=r.children[e],c=t.children[e];if(!(s instanceof HTMLElement)||!(c instanceof HTMLElement))continue;let l=this.parseLineIndex(s,n);if((l??0)>o)break;if(l==null||l<a)continue;let u=i?`single`:l===a?`first`:l===o?`last`:``;s.setAttribute(`data-selected-line`,u),c.setAttribute(`data-selected-line`,u),c.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute(`data-line-annotation`)||s.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(u=`last`,s.setAttribute(`data-selected-line`,`first`)):l===a?u=``:l===o&&s.setAttribute(`data-selected-line`,``),s.nextSibling.setAttribute(`data-selected-line`,u),c.nextSibling.setAttribute(`data-selected-line`,u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Qo(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=ts(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=ts(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:$o(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:$o(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:es(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:es(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Go({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,enableHoverUtility:n,lineHoverHighlight:r,onGutterUtilityClick:i,onLineClick:a,onLineEnter:o,onLineLeave:s,onLineNumberClick:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,renderGutterUtility:f,renderHoverUtility:p,__debugPointerEvents:m,enableLineSelection:h,onLineSelected:g,onLineSelectionStart:_,onLineSelectionChange:v,onLineSelectionEnd:y},b,x,S){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Ko({enableGutterUtility:t,enableHoverUtility:n,renderGutterUtility:f,renderHoverUtility:p,onGutterUtilityClick:i}),usesCustomGutterUtility:f!=null||p!=null,lineHoverHighlight:r,onGutterUtilityClick:i,onHunkExpand:b,onMergeConflictActionClick:S,onLineClick:a,onLineEnter:o,onLineLeave:s,onLineNumberClick:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,__debugPointerEvents:m,enableLineSelection:h,onLineSelected:g,onLineSelectionStart:_,onLineSelectionChange:v,onLineSelectionEnd:y,getLineIndex:x}}function Ko({enableGutterUtility:e,enableHoverUtility:t,renderGutterUtility:n,renderHoverUtility:r,onGutterUtilityClick:i}){if(e!==void 0&&t!==void 0)throw Error(`Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.`);if(n!=null&&r!=null)throw Error(`Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.`);if(i!=null&&(n!=null||r!=null))throw Error(`Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.`);return e??t??!1}function qo(e){return e!=null&&`kind`in e&&e.kind===`line`}function Jo(e){return e!=null&&`kind`in e&&e.kind===`token`}function Yo(e){return qo(e)||Jo(e)}function Xo(e){return`type`in e&&e.type===`line-info`}function Zo(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Qo(e){return e===`current`||e===`incoming`||e===`both`}function $o(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function es(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function ts(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function ns(e){for(let t of e)if(t instanceof HTMLElement&&t.hasAttribute(`data-utility-button`))return!0;return!1}function rs(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return;break}console.log(...n)}var is=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(e,t){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);let n=e.querySelectorAll(`code`),r=new Map(this.observedNodes);this.observedNodes.clear();for(let e of n){let t=r.get(e);if(t!=null&&t.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let n=e.firstElementChild;n instanceof HTMLElement||(n=null),t==null?(t={type:`code`,codeElement:e,numberElement:n,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,t),this.resizeObserver.observe(e),n!=null&&(this.observedNodes.set(n,t),this.resizeObserver.observe(n))):(this.observedNodes.set(e,t),r.delete(e),t.numberElement===n?t.numberElement!=null&&(r.delete(t.numberElement),this.observedNodes.set(t.numberElement,t)):(t.numberElement!=null&&this.resizeObserver.unobserve(t.numberElement),n!=null&&(this.resizeObserver.observe(n),r.delete(n),this.observedNodes.set(n,t)),t.numberElement=n))}if(n.length>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let{lineAnnotation:t=``}=e.dataset;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,o=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement))continue;let s=r.get(a);if(s!=null){this.observedNodes.set(a,s),this.observedNodes.set(o,s),r.delete(a),r.delete(o);continue}s={type:`annotations`,column1:{container:n,child:a,childHeight:a.getBoundingClientRect().height},column2:{container:i,child:o,childHeight:o.getBoundingClientRect().height},currentHeight:`auto`};let c=Math.max(s.column1.childHeight,s.column2.childHeight);this.applyNewHeight(s,c),this.observedNodes.set(a,s),this.observedNodes.set(o,s),this.resizeObserver.observe(a),this.resizeObserver.observe(o)}}for(let e of r.keys())e.isConnected&&(e.style.removeProperty(`--diffs-column-content-width`),e.style.removeProperty(`--diffs-column-number-width`),e.style.removeProperty(`--diffs-column-width`),e.parentElement instanceof HTMLElement&&e.parentElement.style.removeProperty(`--diffs-annotation-min-height`)),this.resizeObserver.unobserve(e);r.clear()}handleResizeObserver=e=>{for(let t of e){let{target:e,borderBoxSize:n,contentBoxSize:r}=t;if(!(e instanceof HTMLElement)){console.error(`FileDiff.handleResizeObserver: Invalid element for ResizeObserver`,t);continue}let i=this.observedNodes.get(e);if(i==null){console.error(`FileDiff.handleResizeObserver: Not a valid observed node`,t);continue}if(i.type===`annotations`){let t=(()=>{if(e===i.column1.child)return i.column1;if(e===i.column2.child)return i.column2})();if(t==null){console.error(`FileDiff.handleResizeObserver: Couldn't find a column for`,{item:i,target:e});continue}t.childHeight=n[0].blockSize;let r=Math.max(i.column1.childHeight,i.column2.childHeight);this.applyNewHeight(i,r)}else if(i.type===`code`){let t=[e,r[0].inlineSize],n=this.queuedUpdates.get(i)??[];n.push(t),this.queuedUpdates.set(i,n)}}this.handleColumnChange()};handleColumnChange=()=>{for(let[e,t]of this.queuedUpdates)for(let[n,r]of t)if(n===e.codeElement){let n=Math.max(Math.floor(r),0);if(n!==e.codeWidth){let t=Math.max(n-e.numberWidth,0);e.codeWidth=n===0?`auto`:n,e.codeElement.style.setProperty(`--diffs-column-content-width`,`${t>0?`${t}px`:`auto`}`),e.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e.codeWidth==`number`?`${e.codeWidth}px`:`auto`}`)}e.numberElement!=null&&typeof e.codeWidth==`number`&&e.numberWidth===0&&t.push([e.numberElement,e.numberElement.getBoundingClientRect().width])}else if(n===e.numberElement){let t=Math.max(Math.ceil(r),0);if(t!==e.numberWidth&&(e.numberWidth=t,e.codeElement.style.setProperty(`--diffs-column-number-width`,`${e.numberWidth===0?`auto`:`${e.numberWidth}px`}`),e.codeWidth!==`auto`)){let t=Math.max(e.codeWidth-e.numberWidth,0);e.codeElement.style.setProperty(`--diffs-column-content-width`,`${t===0?`auto`:`${t}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}},as=new Map,os=new Map,ss=new Map,cs=new Set;function ls(e){for(let t of Array.isArray(e)?e:[e])if(!(t===`text`||t===`ansi`)&&!cs.has(t))return!1;return!0}function us(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(cs.has(n.name))continue;let e=as.get(n.name);e??(e=n,as.set(n.name,e)),cs.add(e.name),t.loadLanguageSync(e.data)}}function ds(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var fs=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ps(e){return ms(e)}function ms(e){return Array.isArray(e)?hs(e):e instanceof RegExp?e:typeof e==`object`?gs(e):e}function hs(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ms(e[n]);return t}function gs(e){let t={};for(let n in e)t[n]=ms(e[n]);return t}function _s(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function vs(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?vs(e.substring(0,e.length-1)):e.substr(~t+1)}var ys=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,bs=class{static hasCaptures(e){return e===null?!1:(ys.lastIndex=0,ys.test(e))}static replaceCaptures(e,t,n){return e.replace(ys,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function xs(e,t){return e<t?-1:+(e>t)}function Ss(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=xs(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Cs(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ws(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Ts=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Es=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(js(e),t)}static createFromParsedTheme(e,t){return Ps(e,t)}_cachedMatchRoot=new Ts(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Os(e.parent,t.parentScopes));return n?new As(n.fontStyle,n.foreground,n.background):null}},Ds=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Os(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ks(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ks(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var As=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function js(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Cs(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Cs(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Ms(l,u,e,o,s,c)}}return n}var Ms=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Ns=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Ns||{});function Ps(e,t){e.sort((e,t)=>{let n=xs(e.scope,t.scope);return n!==0||(n=Ss(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Fs(t),o=new As(n,a.getId(r),a.getId(i)),s=new Rs(new Ls(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Es(a,o,s)}var Fs=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Is=Object.freeze([]),Ls=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Is,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Rs=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Ls.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ss(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ls(e,t,n,r,i))}},zs=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Vs(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Bs(e){return e}function Vs(e){return e}function Hs(e,t){let n=[],r=Ws(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Us(i)){let e=[];do e.push(i),i=r.next();while(Us(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Us(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ws(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Gs(e){typeof e.dispose==`function`&&e.dispose()}var Ks=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qs=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Js=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Ys=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ks(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Js;for(let n of e)Xs(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Ks){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Xs(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Ks?Qs({baseGrammar:a,selfGrammar:i},r):Zs(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Ks(e))}function Zs(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];$s([r],t,n)}}function Qs(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$s(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$s(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $s(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?_s({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$s(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ac(i);switch(a.kind){case 0:Qs({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qs(t,n);break;case 2:Zs(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Zs(a.ruleName,i,n):Qs(i,n)}else a.kind===4?n.add(new qs(a.scopeName,a.ruleName)):n.add(new Ks(a.scopeName));break}}}var ec=class{kind=0},tc=class{kind=1},nc=class{constructor(e){this.ruleName=e}kind=2},rc=class{constructor(e){this.scopeName=e}kind=3},ic=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ac(e){if(e===`$base`)return new ec;if(e===`$self`)return new tc;let t=e.indexOf(`#`);return t===-1?new rc(e):t===0?new nc(e.substring(1)):new ic(e.substring(0,t),e.substring(t+1))}var oc=/\\(\d+)/,sc=/\\(\d+)/g,cc=-1,lc=-2;function uc(e){return e}function dc(e){return e}var fc=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=bs.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=bs.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${vs(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:bs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:bs.replaceCaptures(this._contentName,e,t)}},pc=class extends fc{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},mc=class extends fc{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new yc(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hc=class extends fc{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bc,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gc=class extends fc{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new yc(i,this.id),this.beginCaptures=a,this._end=new yc(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bc;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},_c=class extends fc{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new yc(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new yc(o,lc),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bc;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new bc,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},vc=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new pc(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new mc(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=_s({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new hc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new _c(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new gc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ac(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof hc||e instanceof gc||e instanceof _c)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},yc=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=oc.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return sc.lastIndex=0,this.source.replace(sc,(e,t)=>ws(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},bc=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new xc(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new xc(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},xc=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
11
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Sc=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Cc=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Sc(e,8),this._embeddedLanguagesMatcher=new wc(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Sc(0,0);_getBasicScopeAttributes=new Ts(e=>new Sc(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},wc=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>ws(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Tc=!1,Ec=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Dc(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Oc(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Ec(i,!0);f()}return new Ec(i,!1);function f(){let o=kc(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===cc){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Fc(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof gc){let r=o;Fc(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof _c){let r=o;Fc(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Fc(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Oc(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof _c&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Nc(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==lc){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Fc(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function kc(e,t,n,r,i,a){let o=Ac(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=jc(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Ac(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Mc(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function jc(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Mc(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Mc(e,t,n,r,i){return Tc?{ruleScanner:e.compile(t,n),findOptions:Pc(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Nc(e,t,n,r,i){return Tc?{ruleScanner:e.compileWhile(t,n),findOptions:Pc(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Pc(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Fc(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Dc(e,p,n&&d.start===0,d.start,f,i,!1,0),Gs(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Ic(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ic=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Lc(e,t,n,r,i,a,o,s){return new Vc(e,t,n,r,i,a,o,s)}function Rc(e,t,n,r,i){let a=Hs(t,zc),o=vc.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function zc(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Bc(t[r],e))return n=r+1,!0;return!1})}function Bc(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Vc=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Cc(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Hc(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Hs(e,zc);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Rc(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Rc(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(uc(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[dc(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Hc(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=vc.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Wc.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=zs.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Uc.createRootAndLookUpScopeName(a,r,this):Uc.createRoot(`unknown`,r),t=new Wc(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
12
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new Kc(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Dc(this,a,i,0,t,s,!0,r);return Gs(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Hc(e,t){return e=ps(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Uc=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ds.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ds(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ds(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),zs.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Wc=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Uc.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:dc(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Uc.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,uc(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Uc.fromExtension(r,n.contentNameScopesList))}},Gc=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Hs(e,zc).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Hs(e,zc).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Kc=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=zs.set(n,0,Bs(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=zs.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},qc=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Lc(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Jc=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new qc(Es.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Es.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Gc(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Ys(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Yc=Wc.NULL;function Xc(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Zc(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Qc(e){return Array.isArray(e)?e:[e]}async function $c(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function el(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function tl(e){return e===`ansi`||el(e)}function nl(e){return e===`none`}function rl(e){return nl(e)}function il(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function al(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function ol(e){let t=al(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function sl(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var cl=`light-dark()`,ll=[`color`,`background-color`];function ul(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function dl(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ul(e,t):e})):e}function fl(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>pl(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&ll.includes(a))if(r===cl&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new fs('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function pl(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Ns.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Ns.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Ns.Underline&&n.push(`underline`),e.fontStyle&Ns.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function ml(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var hl=new WeakMap;function gl(e,t){hl.set(e,t)}function _l(e){return hl.get(e)}var vl=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Qc(n).map(e=>[e,Yc])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return yl(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function yl(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function bl(e,t){if(!(e instanceof vl))throw new fs(`Invalid grammar state`);return e.getInternalStack(t)}function xl(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new fs(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new fs(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new fs(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=ol(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));Sl(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return dl(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new fs(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Cl(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new fs(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new fs(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&il(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Sl(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new fs(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new fs(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Cl(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Cl).join(``):``}var wl=[xl()];function Tl(e){let t=El(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...wl]}function El(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Dl=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ol={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function kl(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Al(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function jl(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Ol[r]&&t.push({type:`setDecoration`,value:Ol[r]});else if(r<=29){let e=Ol[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Dl[r-30]}});else if(r===38){let n=Al(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Dl[r-40]}});else if(r===48){let n=Al(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Dl[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Dl[r-100+8]}})}return t}function Ml(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=kl(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=jl(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Nl={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Pl(e=Nl){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Dl.length;e++)r.push(t(Dl[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Fl={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function Il(e,t,n){let r=Xc(e,n),i=al(t),a=Pl(Object.fromEntries(Dl.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Fl[t]]}))),o=Ml();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Zc(i,r),o=Zc(o,r),n.decorations.has(`dim`)&&(i=Ll(i));let s=Ns.None;return n.decorations.has(`bold`)&&(s|=Ns.Bold),n.decorations.has(`italic`)&&(s|=Ns.Italic),n.decorations.has(`underline`)&&(s|=Ns.Underline),n.decorations.has(`strikethrough`)&&(s|=Ns.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Ll(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Rl(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(el(i)||nl(r))return al(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Il(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new fs(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new fs(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Bl(t,s,a,o,n)}function zl(...e){if(e.length===2)return _l(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(el(i)||nl(a))throw new fs(`Plain language does not have grammar state`);if(i===`ansi`)throw new fs(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new vl(Vl(n,c,o,s,r).stateStack,c.name,o.name)}function Bl(e,t,n,r,i){let a=Vl(e,t,n,r,i),o=new vl(a.stateStack,t.name,n.name);return gl(a.tokens,o),a.tokens}function Vl(e,t,n,r,i){let a=Xc(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=al(e),l=i.grammarState?bl(i.grammarState,n.name)??Yc:i.grammarContextCode==null?Yc:Vl(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=Zc(r[zs.getForeground(s)],a),l=zs.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Hl(t.scopes):Ul(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Hl(e){return e.map(e=>({scopeName:e}))}function Ul(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Kl(e,i,t.slice(0,r))}}return n}function Wl(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Gl(e,t,n){if(!Wl(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Wl(e[r],n[i])&&--r,--i;return r===-1}function Kl(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Gl(e,t,n)){r.push(a);break}return r}function ql(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Rl(e,t,{...n,theme:r.theme});return{tokens:i,state:_l(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Jl(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new vl(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&gl(o,s),o}function Jl(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function Yl(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new fs("`themes` option must not be empty");let p=ql(e,t,n);if(c=_l(p),l&&cl!==l&&!f.find(e=>e.color===l))throw new fs(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>fl(e,h,u,l,d))),c&&gl(a,c);let g=f.map(e=>Xc(e.theme,n));i=Xl(f,m,g,u,l,`fg`,d),r=Xl(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Xc(n.theme,n);a=Rl(e,t,n);let l=e.getTheme(n.theme);r=Zc(l.bg,s),i=Zc(l.fg,s),o=l.name,c=_l(a)}else throw new fs("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Xl(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Zc(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===cl&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new fs('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Zc(t[r][a],n[r])||`inherit`}, ${Zc(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Zl(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Zl(e,t,n),codeToTokens:(t,n)=>Yl(e,t,n)}){let i=t;for(let e of Tl(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Yl(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=$l(a):d===`never`&&(a=eu(a)),f&&(a=tu(a));let p={...r,get source(){return i}};for(let e of Tl(n))a=e.tokens?.call(p,a)||a;return Ql(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Ql(e,t,n,r=_l(e)){let i=Tl(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:il,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
13
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=ml(a.htmlStyle||pl(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&gl(m,r),m}function $l(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Ns.Underline||i.fontStyle&Ns.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function eu(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function tu(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=ml(e.htmlStyle||pl(e)),i=ml(n.htmlStyle||pl(n)),a=e.fontStyle&&(e.fontStyle&Ns.Underline||e.fontStyle&Ns.Strikethrough),o=n.fontStyle&&(n.fontStyle&Ns.Underline||n.fontStyle&Ns.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var nu=Vo;function ru(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Zl(e,t,n),codeToTokens:(t,n)=>Yl(e,t,n)},i=nu(Zl(e,t,n,r));for(let e of Tl(n))i=e.postprocess?.call(r,i,n)||i;return i}var iu={light:`#333333`,dark:`#bbbbbb`},au={light:`#fffffe`,dark:`#1e1e1e`},ou=`__shiki_resolved`;function su(e){if(e?.[ou])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?iu.light:iu.dark,n||=t.type===`light`?au.light:au.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,ou,{enumerable:!1,writable:!1,value:!0}),t}async function cu(e){return Array.from(new Set((await Promise.all(e.filter(e=>!tl(e)).map(async e=>await $c(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function lu(e){return(await Promise.all(e.map(async e=>rl(e)?null:su(await $c(e))))).filter(e=>!!e)}var uu=3,du=!1;function fu(e,t=3){if(uu&&!(typeof uu==`number`&&t>uu)){if(du)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var pu=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function mu(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new pu(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var hu=class extends Jc{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=su(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Es.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=mu(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new pu(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},gu=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},_u=0;function vu(e){_u+=1,e.warnings!==!1&&_u>=10&&_u%10==0&&console.warn(`[Shiki] ${_u} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new pu("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(su),i=new hu(new gu(e.engine,n),r,n,e.langAlias),a;function o(t){return mu(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new pu(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new pu(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await cu(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await lu(e))}function g(){if(t)throw new pu(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--_u)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function yu(e){e.engine||fu("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([lu(e.themes||[]),cu(e.langs||[]),e.engine]);return vu({...e,themes:t,langs:n,engine:r})}async function bu(e){let t=await yu(e);return{getLastGrammarState:(...e)=>zl(t,...e),codeToTokensBase:(e,n)=>Rl(t,e,n),codeToTokensWithThemes:(e,n)=>ql(t,e,n),codeToTokens:(e,n)=>Yl(t,e,n),codeToHast:(e,n)=>Zl(t,e,n),codeToHtml:(e,n)=>ru(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function xu(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,tl(n))return[];let r=t[n];if(!r)throw new fs(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(rl(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new fs(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await bu({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Su(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Cu(e,t){let n=Su(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}function wu(e={}){let{name:t=`css-variables`,variablePrefix:n=`--shiki-`,fontStyle:r=!0}=e,i=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,a={name:t,type:`dark`,colors:{"editor.foreground":i(`foreground`),"editor.background":i(`background`),"terminal.ansiBlack":i(`ansi-black`),"terminal.ansiRed":i(`ansi-red`),"terminal.ansiGreen":i(`ansi-green`),"terminal.ansiYellow":i(`ansi-yellow`),"terminal.ansiBlue":i(`ansi-blue`),"terminal.ansiMagenta":i(`ansi-magenta`),"terminal.ansiCyan":i(`ansi-cyan`),"terminal.ansiWhite":i(`ansi-white`),"terminal.ansiBrightBlack":i(`ansi-bright-black`),"terminal.ansiBrightRed":i(`ansi-bright-red`),"terminal.ansiBrightGreen":i(`ansi-bright-green`),"terminal.ansiBrightYellow":i(`ansi-bright-yellow`),"terminal.ansiBrightBlue":i(`ansi-bright-blue`),"terminal.ansiBrightMagenta":i(`ansi-bright-magenta`),"terminal.ansiBrightCyan":i(`ansi-bright-cyan`),"terminal.ansiBrightWhite":i(`ansi-bright-white`)},tokenColors:[{scope:[`keyword.operator.accessor`,`meta.group.braces.round.function.arguments`,`meta.template.expression`,`markup.fenced_code meta.embedded.block`],settings:{foreground:i(`foreground`)}},{scope:`emphasis`,settings:{fontStyle:`italic`}},{scope:[`strong`,`markup.heading.markdown`,`markup.bold.markdown`],settings:{fontStyle:`bold`}},{scope:[`markup.italic.markdown`],settings:{fontStyle:`italic`}},{scope:`meta.link.inline.markdown`,settings:{fontStyle:`underline`,foreground:i(`token-link`)}},{scope:[`string`,`markup.fenced_code`,`markup.inline`],settings:{foreground:i(`token-string`)}},{scope:[`comment`,`string.quoted.docstring.multi`],settings:{foreground:i(`token-comment`)}},{scope:[`constant.numeric`,`constant.language`,`constant.other.placeholder`,`constant.character.format.placeholder`,`variable.language.this`,`variable.other.object`,`variable.other.class`,`variable.other.constant`,`meta.property-name`,`meta.property-value`,`support`],settings:{foreground:i(`token-constant`)}},{scope:[`keyword`,`storage.modifier`,`storage.type`,`storage.control.clojure`,`entity.name.function.clojure`,`entity.name.tag.yaml`,`support.function.node`,`support.type.property-name.json`,`punctuation.separator.key-value`,`punctuation.definition.template-expression`],settings:{foreground:i(`token-keyword`)}},{scope:`variable.parameter.function`,settings:{foreground:i(`token-parameter`)}},{scope:[`support.function`,`entity.name.type`,`entity.other.inherited-class`,`meta.function-call`,`meta.instance.constructor`,`entity.other.attribute-name`,`entity.name.function`,`constant.keyword.clojure`],settings:{foreground:i(`token-function`)}},{scope:[`entity.name.tag`,`string.quoted`,`string.regexp`,`string.interpolated`,`string.template`,`string.unquoted.plain.out.yaml`,`keyword.other.template`],settings:{foreground:i(`token-string-expression`)}},{scope:[`punctuation.definition.arguments`,`punctuation.definition.dict`,`punctuation.separator`,`meta.function-call.arguments`],settings:{foreground:i(`token-punctuation`)}},{scope:[`markup.underline.link`,`punctuation.definition.metadata.markdown`],settings:{foreground:i(`token-link`)}},{scope:[`beginning.punctuation.definition.list.markdown`],settings:{foreground:i(`token-string`)}},{scope:[`punctuation.definition.string.begin.markdown`,`punctuation.definition.string.end.markdown`,`string.other.link.title.markdown`,`string.other.link.description.markdown`],settings:{foreground:i(`token-keyword`)}},{scope:[`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`],settings:{foreground:i(`token-inserted`)}},{scope:[`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`],settings:{foreground:i(`token-deleted`)}},{scope:[`markup.changed`,`punctuation.definition.changed`],settings:{foreground:i(`token-changed`)}}]};return r||(a.tokenColors=a.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),a}var Tu=[{id:`abap`,name:`ABAP`,import:(()=>I(()=>import(`./abap-CglpPUUh.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>I(()=>import(`./actionscript-3-CGv72Q9E.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>I(()=>import(`./ada-CfxXaXwr.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>I(()=>import(`./angular-html-B9LEBPKs.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>I(()=>import(`./angular-ts-CD6u-Ij9.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>I(()=>import(`./apache-D5xAQKSB.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>I(()=>import(`./apex-qgfedJV2.js`),[]))},{id:`apl`,name:`APL`,import:(()=>I(()=>import(`./apl-VeDHIFIx.js`),__vite__mapDeps([7,3,1,2,4,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>I(()=>import(`./applescript-DqumQxTt.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>I(()=>import(`./ara-Ditv3ow6.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>I(()=>import(`./asciidoc-DL8QwiT7.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>I(()=>import(`./asm-K6TMxl3o.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>I(()=>import(`./astro-Dd8L1z6M.js`),__vite__mapDeps([11,3,1,4,8,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>I(()=>import(`./awk-CYSfQSDT.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>I(()=>import(`./ballerina-BE-8n54s.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>I(()=>import(`./bat-B1zTc1QZ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>I(()=>import(`./beancount-DhObrvif.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>I(()=>import(`./berry-Cnbvthv1.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>I(()=>import(`./bibtex-pp5SrwZy.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>I(()=>import(`./bicep-BL6eYxbs.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>I(()=>import(`./bird2-BQaXYY9n.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>I(()=>import(`./blade-BNxrbiva.js`),__vite__mapDeps([15,3,1,16,2,4,8,17,9,10])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>I(()=>import(`./bsl-B0twaj2j.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>I(()=>import(`./c-BHFJ4Jk3.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>I(()=>import(`./c3-BHTco5Hb.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>I(()=>import(`./cadence-CoPxW0qb.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>I(()=>import(`./cairo-DASKFAWI.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>I(()=>import(`./clarity-DVUGm1xP.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>I(()=>import(`./clojure-BgXJG6FG.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>I(()=>import(`./cmake-CZndsvm6.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>I(()=>import(`./cobol-D_qN8j4K.js`),__vite__mapDeps([23,2,1,3,4,10])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>I(()=>import(`./codeowners-Dd7a447M.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>I(()=>import(`./codeql-XJR6llG-.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>I(()=>import(`./coffee-60nIQewd.js`),__vite__mapDeps([24,4,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>I(()=>import(`./common-lisp-BOMbLvgT.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>I(()=>import(`./coq-DnhmQYDa.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>I(()=>import(`./cpp-e1j1tDCV.js`).then(e=>e.n),__vite__mapDeps([25,1,26,20,27,17])))},{id:`crystal`,name:`Crystal`,import:(()=>I(()=>import(`./crystal-brDfRjQ_.js`),__vite__mapDeps([28,20,1,3,2,4,29,17])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>I(()=>import(`./csharp-BdEyRqBm.js`),[]))},{id:`css`,name:`CSS`,import:(()=>I(()=>import(`./css-CsTDDTLq.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`csv`,name:`CSV`,import:(()=>I(()=>import(`./csv-CXchYFbz.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>I(()=>import(`./cue-D7YpBZvd.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>I(()=>import(`./cypher-XIm1N8YJ.js`),[]))},{id:`d`,name:`D`,import:(()=>I(()=>import(`./d-DvB0pbZH.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>I(()=>import(`./dart-CwpSKTMB.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>I(()=>import(`./dax-CEynWJsU.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>I(()=>import(`./desktop-Dk-YiYS_.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>I(()=>import(`./diff-abLZ-xM1.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>I(()=>import(`./docker-BT48KsRJ.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>I(()=>import(`./dotenv-NOMQQbM0.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>I(()=>import(`./dream-maker-D26TP1Q3.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>I(()=>import(`./edge-DadfRK3Q.js`),__vite__mapDeps([30,16,2,1,3,4,14])))},{id:`elixir`,name:`Elixir`,import:(()=>I(()=>import(`./elixir-CsoHPmz3.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>I(()=>import(`./elm-BLTa0sZG.js`),__vite__mapDeps([32,26,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>I(()=>import(`./emacs-lisp-C2EvfotR.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>I(()=>import(`./erb-DIR2QRkp.js`),__vite__mapDeps([33,2,1,3,4,34,20,25,26,27,17,35,36,13,14,37,38,29,9,10,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>I(()=>import(`./erlang-DnbJbitJ.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>I(()=>import(`./fennel-DWOL-Ewx.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>I(()=>import(`./fish-CQPQq0pQ.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>I(()=>import(`./fluent-BYdsr2M8.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>I(()=>import(`./fortran-fixed-form-Bse4XUyD.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>I(()=>import(`./fortran-free-form-C_EtY4F9.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>I(()=>import(`./fsharp-Dy8OnZ0O.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>I(()=>import(`./gdresource-BD_7yRHA.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>I(()=>import(`./gdscript-CH_tD-VB.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>I(()=>import(`./gdshader-BemFblFP.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>I(()=>import(`./genie-hCPg_eq7.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>I(()=>import(`./gherkin-CO0ypD1P.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>I(()=>import(`./git-commit-CIMjlyHf.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>I(()=>import(`./git-rebase-DV2DyQK7.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>I(()=>import(`./gleam-CWJA_H5i.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>I(()=>import(`./glimmer-js-DVG5pFvd.js`),__vite__mapDeps([51,3,1,2,4,14])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>I(()=>import(`./glimmer-ts-BeWaLARz.js`),__vite__mapDeps([52,3,1,2,4,14])))},{id:`glsl`,name:`GLSL`,import:(()=>I(()=>import(`./glsl-BrOWUUEh.js`).then(e=>e.n),__vite__mapDeps([26,1,20])))},{id:`gn`,name:`GN`,import:(()=>I(()=>import(`./gn-nlTwLSjP.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>I(()=>import(`./gnuplot-wYV0MbPl.js`),[]))},{id:`go`,name:`Go`,import:(()=>I(()=>import(`./go-BUPBDRDo.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>I(()=>import(`./graphql-B_3o81z5.js`).then(e=>e.n),__vite__mapDeps([35,1,4,36,13,14])))},{id:`groovy`,name:`Groovy`,import:(()=>I(()=>import(`./groovy-BusafOA8.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>I(()=>import(`./hack-BW-0PxQy.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>I(()=>import(`./haml-DnNXiHAO.js`).then(e=>e.n),__vite__mapDeps([37,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>I(()=>import(`./handlebars-CftcPtku.js`),__vite__mapDeps([54,3,1,2,4,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>I(()=>import(`./haskell-CaDqJkn4.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>I(()=>import(`./haxe-Dxg-8_J7.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>I(()=>import(`./hcl-Bjg-rMJ0.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>I(()=>import(`./hjson-BMbeOOMg.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>I(()=>import(`./hlsl-D-cuwCFV.js`),[]))},{id:`html`,name:`HTML`,import:(()=>I(()=>import(`./html-D5IqfVuz.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>I(()=>import(`./html-derivative-QNqmMkaY.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>I(()=>import(`./http-Dd7eRKUa.js`),__vite__mapDeps([55,35,1,4,36,13,14,8,29,9,10])))},{id:`hurl`,name:`Hurl`,import:(()=>I(()=>import(`./hurl-kBs5Ibg1.js`),__vite__mapDeps([56,57,35,1,4,36,13,14,9,10])))},{id:`hxml`,name:`HXML`,import:(()=>I(()=>import(`./hxml-CGx66ebi.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>I(()=>import(`./hy-Cye3Jt7O.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>I(()=>import(`./imba-CjkQtgD2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>I(()=>import(`./ini-BvMtfDNl.js`),[]))},{id:`java`,name:`Java`,import:(()=>I(()=>import(`./java-BYO3uQJZ.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>I(()=>import(`./javascript-BsdGTPv_.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`jinja`,name:`Jinja`,import:(()=>I(()=>import(`./jinja-BPoCSjyd.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>I(()=>import(`./jison-WHPVy3Jl.js`),__vite__mapDeps([61,4,1])))},{id:`json`,name:`JSON`,import:(()=>I(()=>import(`./json-Kp2u6f_f.js`).then(e=>e.n),__vite__mapDeps([8,1])))},{id:`json5`,name:`JSON5`,import:(()=>I(()=>import(`./json5-BCxDPjxU.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>I(()=>import(`./jsonc-BV8VFjqO.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>I(()=>import(`./jsonl-DHrr7c-M.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>I(()=>import(`./jsonnet-xURar8mu.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>I(()=>import(`./jssm-DtoLUQAt.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>I(()=>import(`./jsx-CyrO086S.js`).then(e=>e.n),__vite__mapDeps([36,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>I(()=>import(`./julia-BaKiQMPf.js`),__vite__mapDeps([62,25,1,26,20,27,17,4,22,63])))},{id:`just`,name:`Just`,import:(()=>I(()=>import(`./just-BKMc7tVT.js`),__vite__mapDeps([64,4,1,65,3,2,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39])))},{id:`kdl`,name:`KDL`,import:(()=>I(()=>import(`./kdl-DGo2N7N5.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>I(()=>import(`./kotlin-Cm4W8Bbs.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>I(()=>import(`./kusto-DQ22_tcT.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>I(()=>import(`./latex-Cczzu1HI.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>I(()=>import(`./lean-D-8a6Wwv.js`),[]))},{id:`less`,name:`Less`,import:(()=>I(()=>import(`./less-B-qZzFKw.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>I(()=>import(`./liquid-DrJZrMEf.js`),__vite__mapDeps([68,3,1,2,4,8])))},{id:`llvm`,name:`LLVM IR`,import:(()=>I(()=>import(`./llvm-Ch-k6TUk.js`),[]))},{id:`log`,name:`Log file`,import:(()=>I(()=>import(`./log-BGwbCG2S.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>I(()=>import(`./logo-DHGHbFWy.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>I(()=>import(`./lua-CFIwCMnP.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>I(()=>import(`./luau-qsvm_nYh.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>I(()=>import(`./make-Dlfjp_Q8.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>I(()=>import(`./markdown-COh4ruD_.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>I(()=>import(`./marko-BreagErn.js`),__vite__mapDeps([69,3,1,70,6,14])))},{id:`matlab`,name:`MATLAB`,import:(()=>I(()=>import(`./matlab-CBqMuw7w.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>I(()=>import(`./mdc-CBcMHZUq.js`),__vite__mapDeps([71,16,2,1,3,4,41,39])))},{id:`mdx`,name:`MDX`,import:(()=>I(()=>import(`./mdx-BjoJxHxW.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>I(()=>import(`./mermaid-DjAh2yR5.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>I(()=>import(`./mipsasm-DA1H0O78.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>I(()=>import(`./mojo-BVgjRjTn.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>I(()=>import(`./moonbit-tKY94ZOM.js`),[]))},{id:`move`,name:`Move`,import:(()=>I(()=>import(`./move-B5WspEjG.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>I(()=>import(`./narrat-CDPRStf_.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>I(()=>import(`./nextflow-CZbrTmS2.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>I(()=>import(`./nextflow-groovy-1GYTZoD5.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>I(()=>import(`./nginx-CMOi8dTH.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>I(()=>import(`./nim-DbDZ9Wa-.js`),__vite__mapDeps([75,20,1,3,26,2,4,41,9,10])))},{id:`nix`,name:`Nix`,import:(()=>I(()=>import(`./nix-DXFN4IwW.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>I(()=>import(`./nushell-Ck9o2qOx.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>I(()=>import(`./objective-c-4koxci9E.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>I(()=>import(`./objective-cpp-BPFAgSN9.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>I(()=>import(`./ocaml-BdlBLhZV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>I(()=>import(`./odin-BcGOLCqZ.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>I(()=>import(`./openscad-DBveSHYE.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>I(()=>import(`./pascal-DxOVE99u.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>I(()=>import(`./perl-DyRCGnKu.js`),__vite__mapDeps([65,3,1,2,4,17,9,10])))},{id:`php`,name:`PHP`,import:(()=>I(()=>import(`./php-Ciarv7b4.js`),__vite__mapDeps([76,3,1,2,4,8,17,9,10])))},{id:`pkl`,name:`Pkl`,import:(()=>I(()=>import(`./pkl-pIvtf7Vu.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>I(()=>import(`./plsql-d50MFTFK.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>I(()=>import(`./po-CboxWwYg.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>I(()=>import(`./polar-DNp7Oek8.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>I(()=>import(`./postcss-LpmI6XQv.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>I(()=>import(`./powerquery-BNCl8Uwz.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>I(()=>import(`./powershell-CZ9J0XuS.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>I(()=>import(`./prisma-AELUiJCl.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>I(()=>import(`./prolog-BlqwejRD.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>I(()=>import(`./proto-DRQC3swD.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>I(()=>import(`./pug-CVCqbfEm.js`),__vite__mapDeps([77,3,1,2,4])))},{id:`puppet`,name:`Puppet`,import:(()=>I(()=>import(`./puppet-DBKR8MlH.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>I(()=>import(`./purescript-DItLzxZS.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>I(()=>import(`./python-D9t_ETu8.js`),[]))},{id:`qml`,name:`QML`,import:(()=>I(()=>import(`./qml-DechmdFA.js`),__vite__mapDeps([78,4,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>I(()=>import(`./qmldir-DP_KD1nk.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>I(()=>import(`./qss-CL02opOd.js`),[]))},{id:`r`,name:`R`,import:(()=>I(()=>import(`./r-DmmrCFmB.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>I(()=>import(`./racket-K0frLTWj.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>I(()=>import(`./raku-DwgLlPg9.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>I(()=>import(`./razor-bgzHke67.js`),__vite__mapDeps([79,80,2,1,3,4])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>I(()=>import(`./reg-B_y3c7di.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>I(()=>import(`./regexp--eMB47Xx.js`).then(e=>e.n),__vite__mapDeps([27,1])))},{id:`rel`,name:`Rel`,import:(()=>I(()=>import(`./rel-CT65ywJp.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>I(()=>import(`./riscv-Qv5W2vIg.js`),[]))},{id:`ron`,name:`RON`,import:(()=>I(()=>import(`./ron-cRHu9zPp.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>I(()=>import(`./rosmsg-_L1z4wrx.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>I(()=>import(`./rst-Ce6_XwFd.js`),__vite__mapDeps([81,82,25,1,26,20,27,17,16,2,3,4,22,34,35,36,13,14,37,38,29,9,10,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>I(()=>import(`./ruby-BtLKlt8E.js`),__vite__mapDeps([34,20,1,25,26,27,17,3,35,4,36,13,14,37,2,38,29,9,10,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>I(()=>import(`./rust-BA5wQ_EY.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>I(()=>import(`./sas-Bco5tnse.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>I(()=>import(`./sass-sd__ov8V.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>I(()=>import(`./scala--cVG4U7H.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>I(()=>import(`./scheme-D6Q1O-kY.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>I(()=>import(`./scss-KPCA05M8.js`).then(e=>e.n),__vite__mapDeps([6,1,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>I(()=>import(`./sdbl-jB0DUrL_.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>I(()=>import(`./shaderlab-uUHiM5Mm.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>I(()=>import(`./shellscript-DyWRuzkj.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>I(()=>import(`./shellsession-BnUZVYXU.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>I(()=>import(`./smalltalk-C7VkdTlv.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>I(()=>import(`./solidity-DVsDPpDS.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>I(()=>import(`./soy-Dsrg4bVI.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>I(()=>import(`./sparql-D5zsvcbT.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>I(()=>import(`./splunk-A-BwP6Va.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>I(()=>import(`./sql-CRzu7iKx.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>I(()=>import(`./ssh-config-CFPv6mTy.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>I(()=>import(`./stata-BdK5CFUf.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>I(()=>import(`./stylus-CUf3IESt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>I(()=>import(`./surrealql-Blm5wp47.js`),__vite__mapDeps([91,4,1])))},{id:`svelte`,name:`Svelte`,import:(()=>I(()=>import(`./svelte-DZrj_gMz.js`),__vite__mapDeps([92,3,1,4,12,14])))},{id:`swift`,name:`Swift`,import:(()=>I(()=>import(`./swift-CSiiYB_Q.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>I(()=>import(`./system-verilog-rMjKy-O9.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>I(()=>import(`./systemd-R-KDM4-t.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>I(()=>import(`./talonscript-D666vCtm.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>I(()=>import(`./tasl-68cbBocU.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>I(()=>import(`./tcl-Y39dJ_pX.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>I(()=>import(`./templ-CJ7sDrtu.js`),__vite__mapDeps([93,3,1,94,4])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>I(()=>import(`./terraform-BF7wAo-b.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>I(()=>import(`./tex-CvSRdXZA.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>I(()=>import(`./toml-BrMFN1JF.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>I(()=>import(`./ts-tags-DgGFCSef.js`),__vite__mapDeps([95,3,1,26,20,2,4,17,14,9,10])))},{id:`tsv`,name:`TSV`,import:(()=>I(()=>import(`./tsv-Dp2l5v7f.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>I(()=>import(`./tsx-CQqypS0k.js`).then(e=>e.n),__vite__mapDeps([13,1])))},{id:`turtle`,name:`Turtle`,import:(()=>I(()=>import(`./turtle-_N1aDtpV.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>I(()=>import(`./twig-D8_PS89g.js`),__vite__mapDeps([96,3,1,4,76,2,8,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39,6])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>I(()=>import(`./typescript-CPmDkqmE.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>I(()=>import(`./typespec-ghgF2GAI.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>I(()=>import(`./typst-DP_izaNK.js`),[]))},{id:`v`,name:`V`,import:(()=>I(()=>import(`./v-CdNC_Wok.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>I(()=>import(`./vala-Bu4pYkLC.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>I(()=>import(`./vb-u84IyWSS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>I(()=>import(`./verilog-BC33pi7Z.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>I(()=>import(`./vhdl-BBxTOQe0.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>I(()=>import(`./viml-X_r-ivXA.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>I(()=>import(`./vue-KvGEuYod.js`),__vite__mapDeps([97,3,1,16,2,4,8,14])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>I(()=>import(`./vue-html-qAt9D-IF.js`),__vite__mapDeps([98,4,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>I(()=>import(`./vue-vine-j1nOqxMu.js`),__vite__mapDeps([99,3,1,4,70,12,6,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>I(()=>import(`./vyper-E7qIwMXy.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>I(()=>import(`./wasm-C18OEcCL.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>I(()=>import(`./wenyan-siXAC4el.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>I(()=>import(`./wgsl-BJQt8Uld.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>I(()=>import(`./wikitext-Ci0ePJmf.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>I(()=>import(`./wit-BdDJ7geN.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>I(()=>import(`./wolfram-Bi-O1IUM.js`),[]))},{id:`xml`,name:`XML`,import:(()=>I(()=>import(`./xml-BrFkMwfd.js`).then(e=>e.n),__vite__mapDeps([9,1,10])))},{id:`xsl`,name:`XSL`,import:(()=>I(()=>import(`./xsl-OmCo2PyZ.js`),__vite__mapDeps([101,9,1,10])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>I(()=>import(`./yaml-DgkO7CC2.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>I(()=>import(`./zenscript-CnkrxCBw.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>I(()=>import(`./zig-CgMsxF9-.js`),[]))}],Eu=Object.fromEntries(Tu.map(e=>[e.id,e.import])),Du=Object.fromEntries(Tu.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ou={...Eu,...Du},ku=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>I(()=>import(`./andromeeda-DXsn6mTE.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>I(()=>import(`./aurora-x-DGv-xZaa.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>I(()=>import(`./ayu-dark-DGBaJbpH.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>I(()=>import(`./ayu-light-BQrGPVs2.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>I(()=>import(`./ayu-mirage-Do-5o2VL.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>I(()=>import(`./catppuccin-frappe-9fYwMJCf.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>I(()=>import(`./catppuccin-latte-BUiKH1yZ.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>I(()=>import(`./catppuccin-macchiato-ZmO2e0M_.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>I(()=>import(`./catppuccin-mocha-CFwbXQfO.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>I(()=>import(`./dark-plus-BUdpMFIA.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>I(()=>import(`./dracula-BUW0ZyNO.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>I(()=>import(`./dracula-soft-BMjAt1_u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>I(()=>import(`./everforest-dark-hC6a272f.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>I(()=>import(`./everforest-light-BTpbYY5G.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>I(()=>import(`./github-dark-cA72fqmI.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>I(()=>import(`./github-dark-default-DiYTFvY5.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>I(()=>import(`./github-dark-dimmed-D-uBHzyG.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>I(()=>import(`./github-dark-high-contrast-BrUSkckI.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>I(()=>import(`./github-light-piFPqU8R.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>I(()=>import(`./github-light-default-BT-6Vf7C.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>I(()=>import(`./github-light-high-contrast-DqmEyTTc.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>I(()=>import(`./gruvbox-dark-hard-BrrZYoPF.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>I(()=>import(`./gruvbox-dark-medium-DsxcLuUs.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>I(()=>import(`./gruvbox-dark-soft-DQXOs_GH.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>I(()=>import(`./gruvbox-light-hard-CtHwj_cB.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>I(()=>import(`./gruvbox-light-medium-CPJMdgXQ.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>I(()=>import(`./gruvbox-light-soft-C4Xh9Hc-.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>I(()=>import(`./horizon-BofYY9of.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>I(()=>import(`./horizon-bright-CFOVQsf2.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>I(()=>import(`./houston-BIBYxFpQ.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>I(()=>import(`./kanagawa-dragon-COwlYgQB.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>I(()=>import(`./kanagawa-lotus-GZWqyq_E.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>I(()=>import(`./kanagawa-wave-CP4uw3DX.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>I(()=>import(`./laserwave-DfABGYsD.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>I(()=>import(`./light-plus-DS_rmE1N.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>I(()=>import(`./material-theme-Ccrl1jie.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>I(()=>import(`./material-theme-darker-CcOH0iHe.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>I(()=>import(`./material-theme-lighter-DoKpC7NM.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>I(()=>import(`./material-theme-ocean-BcvBZHgH.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>I(()=>import(`./material-theme-palenight-DIL4EAzl.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>I(()=>import(`./min-dark-CbwghdE5.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>I(()=>import(`./min-light-_F39d_94.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>I(()=>import(`./monokai-CxgvaWkX.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>I(()=>import(`./night-owl-CCydx7ZR.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>I(()=>import(`./night-owl-light-CLM7UUPY.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>I(()=>import(`./nord-CiCWZ1de.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>I(()=>import(`./one-dark-pro-DEMdTgiO.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>I(()=>import(`./one-light-Cmpe9X1u.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>I(()=>import(`./plastic-Dvdf8qVN.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>I(()=>import(`./poimandres-DHgQGH4M.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>I(()=>import(`./red-DzDu-aXc.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>I(()=>import(`./rose-pine-DFmTJHIJ.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>I(()=>import(`./rose-pine-dawn-YIuK9wUm.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>I(()=>import(`./rose-pine-moon-BYEHfkUB.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>I(()=>import(`./slack-dark-DHhAlQBa.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>I(()=>import(`./slack-ochin-PZXbcZaN.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>I(()=>import(`./snazzy-light-CPc_Qts9.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>I(()=>import(`./solarized-dark-DCCfKtTh.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>I(()=>import(`./solarized-light-B84T-R9X.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>I(()=>import(`./synthwave-84-uJp1j2Jd.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>I(()=>import(`./tokyo-night-EeABtN82.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>I(()=>import(`./vesper-7-XtS0Kg.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>I(()=>import(`./vitesse-black-DRdlY-cW.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>I(()=>import(`./vitesse-dark-Bz0hOFHJ.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>I(()=>import(`./vitesse-light-7kCLd0yn.js`),[]))}].map(e=>[e.id,e.import])),Au=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ju(){return 2147483648}function Mu(){return typeof performance<`u`?performance.now():Date.now()}var Nu=(e,t)=>e+(t-e%t)%t;async function Pu(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ju();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Nu(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Mu,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Fu=Object.defineProperty,Iu=(e,t,n)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lu=(e,t,n)=>Iu(e,typeof t==`symbol`?t:t+``,n),Ru=null;function zu(e){throw new Au(e.UTF8ToString(e.getLastOnigError()))}var Bu=class e{constructor(t){Lu(this,`utf16Length`),Lu(this,`utf8Length`),Lu(this,`utf16Value`),Lu(this,`utf8Value`),Lu(this,`utf16OffsetToUtf8`),Lu(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Vu=class e{constructor(t){if(Lu(this,`id`,++e.LAST_ID),Lu(this,`_onigBinding`),Lu(this,`content`),Lu(this,`utf16Length`),Lu(this,`utf8Length`),Lu(this,`utf16OffsetToUtf8`),Lu(this,`utf8OffsetToUtf16`),Lu(this,`ptr`),!Ru)throw new Au(`Must invoke loadWasm first.`);this._onigBinding=Ru,this.content=t;let n=new Bu(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Ru.omalloc(1e4),e._sharedPtrInUse=!0,Ru.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Ru)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Lu(Vu,`LAST_ID`,0),Lu(Vu,`_sharedPtr`,0),Lu(Vu,`_sharedPtrInUse`,!1);var Hu=Vu,Uu=class{constructor(e){if(Lu(this,`_onigBinding`),Lu(this,`_ptr`),!Ru)throw new Au(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Bu(e[r]);t[r]=i.createString(Ru),n[r]=i.utf8Length}let r=Ru.omalloc(4*e.length);Ru.HEAPU32.set(t,r/4);let i=Ru.omalloc(4*e.length);Ru.HEAPU32.set(n,i/4);let a=Ru.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Ru.ofree(t[n]);Ru.ofree(i),Ru.ofree(r),a===0&&zu(Ru),this._onigBinding=Ru,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Hu(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Wu(e){return typeof e.instantiator==`function`}function Gu(e){return typeof e.default==`function`}function Ku(e){return e.data!==void 0}function qu(e){return typeof Response<`u`&&e instanceof Response}function Ju(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Yu;function Xu(e){if(Yu)return Yu;async function t(){Ru=await Pu(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Wu(n)?n=await n.instantiator(t):Gu(n)?n=await n.default(t):(Ku(n)&&(n=n.data),qu(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Qu(n)(t):await $u(n)(t):Ju(n)||n instanceof WebAssembly.Module?n=await Zu(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Zu(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Yu=t(),Yu}function Zu(e){return t=>WebAssembly.instantiate(e,t)}function Qu(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $u(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ed(e){return e&&await Xu(e),{createScanner(e){return new Uu(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Hu(e)}}}var td=xu({langs:Ou,themes:ku,engine:()=>ed(I(()=>import(`./wasm-BqG9CUph.js`),[]))}),{codeToHtml:nd,codeToHast:rd,codeToTokens:id,codeToTokensBase:ad,codeToTokensWithThemes:od,getSingletonHighlighter:sd,getLastGrammarState:cd}=Cu(td,{guessEmbeddedLanguages:sl});function ld(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function ud(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var dd=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),fd=String.raw;function pd(e,t){if(e==null)throw Error(t??`Value expected`);return e}var md=fd`\[\^?`,hd=`c.? | C(?:-.?)?|${fd`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${fd`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${fd`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${fd`o\{[^\}]*\}?`}|${fd`\d{1,3}`}`,gd=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,_d=new RegExp(fd`
|
|
14
|
+
\\ (?:
|
|
15
|
+
${hd}
|
|
16
|
+
| [gk]<[^>]*>?
|
|
17
|
+
| [gk]'[^']*'?
|
|
18
|
+
| .
|
|
19
|
+
)
|
|
20
|
+
| \( (?:
|
|
21
|
+
\? (?:
|
|
22
|
+
[:=!>({]
|
|
23
|
+
| <[=!]
|
|
24
|
+
| <[^>]*>
|
|
25
|
+
| '[^']*'
|
|
26
|
+
| ~\|?
|
|
27
|
+
| #(?:[^)\\]|\\.?)*
|
|
28
|
+
| [^:)]*[:)]
|
|
29
|
+
)?
|
|
30
|
+
| \*[^\)]*\)?
|
|
31
|
+
)?
|
|
32
|
+
| (?:${gd.source})+
|
|
33
|
+
| ${md}
|
|
34
|
+
| .
|
|
35
|
+
`.replace(/\s+/g,``),`gsu`),vd=new RegExp(fd`
|
|
36
|
+
\\ (?:
|
|
37
|
+
${hd}
|
|
38
|
+
| .
|
|
39
|
+
)
|
|
40
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
41
|
+
| ${md}
|
|
42
|
+
| &&
|
|
43
|
+
| .
|
|
44
|
+
`.replace(/\s+/g,``),`gsu`);function yd(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=Yd(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(_d.lastIndex=0;s=_d.exec(e);){let t=bd(a,e,s[0],_d.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(_d.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Zd(e,u):e).flat(),flags:r}}function bd(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=xd(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Td(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:zd(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Ed(n)}}if(a===`K`)return{token:Nd(`keep`,n)};if(a===`N`||a===`R`)return{token:Md(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:Md(`any`,n)};if(a===`X`)return{token:Md(`text_segment`,n)};let e=Cd(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Wd(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Ud(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Id(`group`,n)};if(n===`(?>`)return{token:Id(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Id(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Id(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Id(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:Fd(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
45
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:Md(`dot`,n)}:n===`^`||n===`$`?{token:Td(e.singleline?{"^":fd`\A`,$:fd`\Z`}[n]:n,n)}:n===`|`?{token:wd(n)}:gd.test(n)?{tokens:Qd(n)}:{token:Dd(ld(n),n)}}function xd(e,t,n){let r=[jd(t[1]===`^`,t)],i=1,a;for(vd.lastIndex=n;a=vd.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(jd(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(Dd(93,e));else if(i--,r.push(Od(e)),!i)break}else{let t=Sd(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:vd.lastIndex||e.length}}function Sd(e){if(e[0]===`\\`)return Cd(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!dd.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return Md(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?kd(e):e===`&&`?Ad(e):Dd(ld(e),e)}function Cd(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return Hd(e);if(`dDhHsSwW`.includes(n))return Kd(e);if(e.startsWith(fd`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return qd(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return Dd(ld(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return Dd(Xd(e),e);if(Vd.has(n))return Dd(Vd.get(n),e);if(/\d/.test(n))return Pd(t,e);if(e===`\\`)throw Error(fd`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return Dd(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function wd(e){return{type:`Alternator`,raw:e}}function Td(e,t){return{type:`Assertion`,kind:e,raw:t}}function Ed(e){return{type:`Backreference`,raw:e}}function Dd(e,t){return{type:`Character`,value:e,raw:t}}function Od(e){return{type:`CharacterClassClose`,raw:e}}function kd(e){return{type:`CharacterClassHyphen`,raw:e}}function Ad(e){return{type:`CharacterClassIntersector`,raw:e}}function jd(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Md(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function Nd(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:pd(n.flags),raw:t}}function Pd(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Fd(e){return{type:`GroupClose`,raw:e}}function Id(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Ld(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Rd(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function zd(e){return{type:`Subroutine`,raw:e}}var Bd=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),Vd=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function Hd(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return Dd(ld(t.toUpperCase())-64,e)}function Ud(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=Jd(n),o=Jd(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),Nd(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Id(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Wd(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=Bd.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return Ld(l,r??null,i?.split(`,`)??null,e)}function Gd(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Rd(t,n,r,e)}function Kd(e){let t=e[1].toLowerCase();return Md({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function qd(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Md(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Jd(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function Yd(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function Xd(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Zd(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Ed(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(fd`Octal encoded byte above 177 unsupported "${n}"`)}else r=ld(t);a.push(Dd(r,(e===0?`\\`:``)+t))}return a}function Qd(e){let t=[],n=new RegExp(gd,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Gd(e.slice(0,-1)));continue}}}t.push(Gd(e))}return t}function $d(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function ef(e){return tf.has(e.type)}var tf=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function nf(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=yd(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return pf();case`Assertion`:return rf(n);case`Backreference`:return af(n,a);case`Character`:return _f(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return of(n,a,t);case`CharacterClassOpen`:return sf(n,a,t);case`CharacterSet`:return cf(n,a);case`Directive`:return xf(n.kind,{flags:n.flags});case`GroupOpen`:return lf(n,a,t);case`NamedCallout`:return Tf(n.kind,n.tag,n.arguments);case`Quantifier`:return uf(n,a);case`Subroutine`:return df(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Of(Sf(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(fd`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(fd`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function rf({kind:e}){return mf(pd({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===fd`\B`||e===fd`\Y`})}function af({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,hf(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return hf(r)}return i(+r)}function of(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),yf(o,e);throw Error(`Invalid character class range`)}return _f(ld(`-`))}function sf({negate:e},t,n){let{tokens:r,walk:i}=t,a=[vf()],o=r[t.nextIndex],s=zf(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(vf()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=zf(r[t.nextIndex],o)}let c=vf({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function cf({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Rf(n);if(dd.has(r)&&!o?.has(r))e=`posix`,n=r;else return Af(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Ef(n,{negate:t}):bf(e,{negate:t})}function lf(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=jf(e),l=c.type===`AbsenceFunction`,u=Ff(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&ud(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Bf(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(pf()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(Pf(t)||t.type===`CapturingGroup`)throw Error(e)}else if(Pf(t)||Ff(t)&&t.negate)throw Error(e)}}f=Bf(r[t.nextIndex])}return t.nextIndex++,c}function uf({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!ef(a))throw Error(`Quantifier requires a repeatable token`);let o=Df(e,t,n,a);return i.body.pop(),o}function df({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=kf(i);return r.push(o),o}function ff(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Mf(t?.body)}}function pf(e){return{type:`Alternative`,body:Nf(e?.body)}}function mf(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function hf(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function gf(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!If(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Mf(t?.body)}}function _f(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function vf(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Nf(e?.body)}}function yf(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function bf(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function xf(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:pd(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Sf(e){return{type:`Flags`,...e}}function Cf(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:Mf(e?.body)}}function wf(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Mf(e?.body)}}function Tf(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Ef(e,t){let n=!!t?.negate;if(!dd.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Df(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Of(e,t){return{type:`Regex`,body:Mf(t?.body),flags:e}}function kf(e){return{type:`Subroutine`,ref:e}}function Af(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Rf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Lf(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(fd`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function jf({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return ff(`repeater`);case`atomic`:return Cf({atomic:!0});case`capturing`:return gf(i,{name:n});case`group`:return Cf({flags:e});case`lookahead`:case`lookbehind`:return wf({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Mf(e){if(e===void 0)e=[pf()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Nf(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function Pf(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Ff(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function If(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Lf(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Rf(e){return e.replace(/[- _]+/g,``).toLowerCase()}function zf(e,t){let n=t;return pd(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Bf(e){return pd(e,`Unclosed group`)}function Vf(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){Hf(c).splice(Math.max(0,Uf(s)+l),1),l--,u=!0},removeAllNextSiblings(){return Hf(c).splice(Uf(s)+1)},removeAllPrevSiblings(){let e=Uf(s)+l;return l-=e,Hf(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,Uf(s)+l)]=e:pd(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(Hf(c).splice(Math.max(0,Uf(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,Uf(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function Hf(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function Uf(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var Wf=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Gf(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Kf(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var qf=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function Jf(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===qf.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?qf.CHAR_CLASS:qf.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function Yf(e,t,n,r){Jf(e,t,n,r)}function Xf(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===qf.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function Zf(e,t,n){return!!Xf(e,t,0,n)}function Qf(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var $f=new RegExp(String.raw`(?<noncapturingStart>${Wf})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function ep(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for($f.lastIndex=Number.isNaN(c)?0:c+7;f=$f.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),Gf(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=Jf(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},qf.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var tp=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,np=new RegExp(String.raw`
|
|
46
|
+
\\(?: \d+
|
|
47
|
+
| c[A-Za-z]
|
|
48
|
+
| [gk]<[^>]+>
|
|
49
|
+
| [pPu]\{[^\}]+\}
|
|
50
|
+
| u[A-Fa-f\d]{4}
|
|
51
|
+
| x[A-Fa-f\d]{2}
|
|
52
|
+
)
|
|
53
|
+
| \((?: \? (?: [:=!>]
|
|
54
|
+
| <(?:[=!]|[^>]+>)
|
|
55
|
+
| [A-Za-z\-]+:
|
|
56
|
+
| \(DEFINE\)
|
|
57
|
+
))?
|
|
58
|
+
| (?<qBase>${tp})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
59
|
+
| \\?.
|
|
60
|
+
`.replace(/\s+/g,``),`gsu`);function rp(e){if(!RegExp(`${tp}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(np.lastIndex=0;o=np.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=Kf(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}np.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var ip=String.raw,ap=ip`\(\?R=(?<rDepth>[^\)]+)\)|${ip`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,op=ip`\(\?<(?![=!])(?<captureName>[^>]+)>`,sp=ip`${op}|(?<unnamed>\()(?!\?)`,cp=new RegExp(ip`${op}|${ap}|\(\?|\\?.`,`gsu`),lp=`Cannot use multiple overlapping recursions`;function up(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(ap,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&Zf(e,ip`\(\?\(DEFINE\)`,qf.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=Zf(e,ip`\\[1-9]`,qf.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(cp.lastIndex=0;f=cp.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(dp(m),l)throw Error(lp);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(cp.lastIndex);if(Zf(s,ap,qf.DEFAULT))throw Error(lp);let c=m-1;e=fp(t,s,c,!1,n,a,d),i=hp(i,t,c,a.length,0,d);break}else if(h){dp(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(lp);break}if(!u)throw Error(ip`Recursive \g cannot be used outside the referenced group "${r===`external`?h:ip`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Qf(e,p);if(o&&Zf(m,ip`${op}|\((?!\?)`,qf.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=fp(_,v,b,!0,n,a,d);i=hp(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,cp.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),cp.lastIndex),s.set(p,cp.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),cp.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function dp(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function fp(e,t,n,r,i,a,o){let s=new Set;r&&Yf(e+t,op,({groups:{captureName:e}})=>{s.add(e)},qf.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${pp(`(?:${e}`,`forward`,...c)}(?:)${pp(`${t})`,`backward`,...c)}${t}`}function pp(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=Jf(e,ip`${sp}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),mp(i,n),s?e:`(?<${t}${l}>`}return ip`\k<${c}${l}>`},qf.DEFAULT)}return c}function mp(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function hp(e,t,n,r,i,a){if(e.size&&r){let o=0;Yf(t,sp,()=>o++,qf.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var gp=String.fromCodePoint,U=String.raw,_p={},vp=globalThis.RegExp;_p.flagGroups=(()=>{try{new vp(`(?i:)`)}catch{return!1}return!0})(),_p.unicodeSets=(()=>{try{new vp(`[[]]`,`v`)}catch{return!1}return!0})(),_p.bugFlagVLiteralHyphenIsRange=_p.unicodeSets?(()=>{try{new vp(U`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,_p.bugNestedClassIgnoresNegation=_p.unicodeSets&&new vp(`[[^a]]`,`v`).test(`a`);function yp(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function bp(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function xp(e,t){return Cp[e]>=Cp[t]}function Sp(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Cp={ES2025:2025,ES2024:2024,ES2018:2018},wp={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Tp(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!wp[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=_p.flagGroups?`ES2025`:_p.unicodeSets?`ES2024`:`ES2018`),t}var Ep=`[ -\r ]`,Dp=new Set([gp(304),gp(305)]),Op=U`[\p{L}\p{M}\p{N}\p{Pc}]`;function kp(e){if(Dp.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Np.get(n),a=jp.get(n),o=Mp.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var Ap=new Map(`C Other
|
|
61
|
+
Cc Control cntrl
|
|
62
|
+
Cf Format
|
|
63
|
+
Cn Unassigned
|
|
64
|
+
Co Private_Use
|
|
65
|
+
Cs Surrogate
|
|
66
|
+
L Letter
|
|
67
|
+
LC Cased_Letter
|
|
68
|
+
Ll Lowercase_Letter
|
|
69
|
+
Lm Modifier_Letter
|
|
70
|
+
Lo Other_Letter
|
|
71
|
+
Lt Titlecase_Letter
|
|
72
|
+
Lu Uppercase_Letter
|
|
73
|
+
M Mark Combining_Mark
|
|
74
|
+
Mc Spacing_Mark
|
|
75
|
+
Me Enclosing_Mark
|
|
76
|
+
Mn Nonspacing_Mark
|
|
77
|
+
N Number
|
|
78
|
+
Nd Decimal_Number digit
|
|
79
|
+
Nl Letter_Number
|
|
80
|
+
No Other_Number
|
|
81
|
+
P Punctuation punct
|
|
82
|
+
Pc Connector_Punctuation
|
|
83
|
+
Pd Dash_Punctuation
|
|
84
|
+
Pe Close_Punctuation
|
|
85
|
+
Pf Final_Punctuation
|
|
86
|
+
Pi Initial_Punctuation
|
|
87
|
+
Po Other_Punctuation
|
|
88
|
+
Ps Open_Punctuation
|
|
89
|
+
S Symbol
|
|
90
|
+
Sc Currency_Symbol
|
|
91
|
+
Sk Modifier_Symbol
|
|
92
|
+
Sm Math_Symbol
|
|
93
|
+
So Other_Symbol
|
|
94
|
+
Z Separator
|
|
95
|
+
Zl Line_Separator
|
|
96
|
+
Zp Paragraph_Separator
|
|
97
|
+
Zs Space_Separator
|
|
98
|
+
ASCII
|
|
99
|
+
ASCII_Hex_Digit AHex
|
|
100
|
+
Alphabetic Alpha
|
|
101
|
+
Any
|
|
102
|
+
Assigned
|
|
103
|
+
Bidi_Control Bidi_C
|
|
104
|
+
Bidi_Mirrored Bidi_M
|
|
105
|
+
Case_Ignorable CI
|
|
106
|
+
Cased
|
|
107
|
+
Changes_When_Casefolded CWCF
|
|
108
|
+
Changes_When_Casemapped CWCM
|
|
109
|
+
Changes_When_Lowercased CWL
|
|
110
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
111
|
+
Changes_When_Titlecased CWT
|
|
112
|
+
Changes_When_Uppercased CWU
|
|
113
|
+
Dash
|
|
114
|
+
Default_Ignorable_Code_Point DI
|
|
115
|
+
Deprecated Dep
|
|
116
|
+
Diacritic Dia
|
|
117
|
+
Emoji
|
|
118
|
+
Emoji_Component EComp
|
|
119
|
+
Emoji_Modifier EMod
|
|
120
|
+
Emoji_Modifier_Base EBase
|
|
121
|
+
Emoji_Presentation EPres
|
|
122
|
+
Extended_Pictographic ExtPict
|
|
123
|
+
Extender Ext
|
|
124
|
+
Grapheme_Base Gr_Base
|
|
125
|
+
Grapheme_Extend Gr_Ext
|
|
126
|
+
Hex_Digit Hex
|
|
127
|
+
IDS_Binary_Operator IDSB
|
|
128
|
+
IDS_Trinary_Operator IDST
|
|
129
|
+
ID_Continue IDC
|
|
130
|
+
ID_Start IDS
|
|
131
|
+
Ideographic Ideo
|
|
132
|
+
Join_Control Join_C
|
|
133
|
+
Logical_Order_Exception LOE
|
|
134
|
+
Lowercase Lower
|
|
135
|
+
Math
|
|
136
|
+
Noncharacter_Code_Point NChar
|
|
137
|
+
Pattern_Syntax Pat_Syn
|
|
138
|
+
Pattern_White_Space Pat_WS
|
|
139
|
+
Quotation_Mark QMark
|
|
140
|
+
Radical
|
|
141
|
+
Regional_Indicator RI
|
|
142
|
+
Sentence_Terminal STerm
|
|
143
|
+
Soft_Dotted SD
|
|
144
|
+
Terminal_Punctuation Term
|
|
145
|
+
Unified_Ideograph UIdeo
|
|
146
|
+
Uppercase Upper
|
|
147
|
+
Variation_Selector VS
|
|
148
|
+
White_Space space
|
|
149
|
+
XID_Continue XIDC
|
|
150
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Rf(e),e])),jp=new Map([[`s`,gp(383)],[gp(383),`s`]]),Mp=new Map([[gp(223),gp(7838)],[gp(107),gp(8490)],[gp(229),gp(8491)],[gp(969),gp(8486)]]),Np=new Map([Ip(453),Ip(456),Ip(459),Ip(498),...Lp(8072,8079),...Lp(8088,8095),...Lp(8104,8111),Ip(8124),Ip(8140),Ip(8188)]),Pp=new Map([[`alnum`,U`[\p{Alpha}\p{Nd}]`],[`alpha`,U`\p{Alpha}`],[`ascii`,U`\p{ASCII}`],[`blank`,U`[\p{Zs}\t]`],[`cntrl`,U`\p{Cc}`],[`digit`,U`\p{Nd}`],[`graph`,U`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,U`\p{Lower}`],[`print`,U`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,U`[\p{P}\p{S}]`],[`space`,U`\p{space}`],[`upper`,U`\p{Upper}`],[`word`,U`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,U`\p{AHex}`]]);function Fp(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Ip(e){let t=gp(e);return[t.toLowerCase(),t]}function Lp(e,t){return Fp(e,t).map(e=>Ip(e))}var Rp=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function zp(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Up(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:xp(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Vf(e,Bp,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return Vf(e,Vp,a),Vf(e,Hp,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Bp={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=Cf();e.body[0].body.push(wf({negate:!0,body:r}),Af(`Any`));let i=Cf();i.body[0].body.push(Df(`greedy`,0,1/0,e)),n(cm(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];bp(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=Xp(t.get(e));if(n){let t=Cf({flags:n});t.body[0].body=e.body,e.body=[cm(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(cm(wf({body:[pf({body:[mf(`string_end`)]}),pf({body:[_f(10)]})]}),t));else if(c===`line_start`)o(cm(am(U`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&nm(e))o(cm(wf({negate:!0}),t));else if(d)throw Error(U`Uses "\G" in a way that requires a subclass`);else o(sm(mf(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(cm(am(U`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${Op})(?!${Op})|(?<!${Op})(?=${Op}))`,n=`(?:(?<=${Op})(?=${Op})|(?<!${Op})(?!${Op}))`;o(cm(am(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!im(n)&&(n=Yp(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!im(r)&&(r=Yp(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(cm(vf({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(sm(bf(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(cm(om(am(Ep),l),t));return}if(s&&(c===`word`||u===`word`)){n(sm(bf(`word`,{negate:l}),t));return}if(c===`any`)n(sm(Af(`Any`),t));else if(c===`digit`)n(sm(Af(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(U`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=U`\p{RI}{2}|${e}(?:\u200D${e})*`;n(cm(am(U`(?>\r\n|${i?U`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(sm(Af(`AHex`,{negate:l}),t));else if(c===`newline`)n(cm(am(l?`[^
|
|
151
|
+
]`:`(?>\r
|
|
152
|
+
?|[
|
|
153
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${gp(e.codePointAt(0)-1)}${gp(e.codePointAt(2)+1)}-\u{10FFFF}`),n(cm(am(`[${e}]`),t))}else n(cm(om(am(Pp.get(u)),l),t));else if(c===`property`)Ap.has(Rf(u))||(e.key=`sc`);else if(c===`space`)n(sm(Af(`space`,{negate:l}),t));else if(c===`word`)n(cm(om(am(Op),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=Cf({flags:c});e.body[0].body=o(),i(cm(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&$d(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(U`Uses "\K" in a way that's unsupported`);let o=wf({behind:!0});o.body[0].body=a(),i(cm(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(cm(wf({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=Cf();t.body[0].body.push(e.body),e.body=cm(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=$p(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(U`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!im(n)&&(n=Yp(n,t),e.ref=n)}},Vp={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=sm(qp(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&bp(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=bp(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=yp(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?qp(0):Kp(o,r.groupOriginByCopy,null),l=c;if(!s){let e=Xp(Jp(o,e=>e.type===`Group`&&!!e.flags)),t=e?yp(r.globalFlags,e):r.globalFlags;Wp(t,r.currentFlags)||(l=Cf({flags:Zp(t)}),l.body[0].body.push(c))}n(cm(l,t),{traverse:!s})}},Hp={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>Gp(t,e));i.length?i.length>1?n(cm(Cf({atomic:!0,body:i.reverse().map(e=>pf({body:[hf(e.number)]}))}),t)):e.ref=i[0].number:n(cm(wf({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=gf();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Up(e){Vf(e,{"*"({node:e,parent:t}){e.parent=t}})}function Wp(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Gp(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=Qp(n.parent);for(let r of t){if(r===n)break;if(r===e||em(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Kp(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Kp(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function qp(e){let t=kf(e);return t.isRecursive=!0,t}function Jp(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Yp(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function Xp(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Zp({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Qp(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function $p(e){let t=e.find(e=>e.kind===`search_start`||rm(e,{negate:!1})||!tm(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=$p(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function em(e,t){let n=Qp(e)??[];for(let e of n)if(e===t||em(e,t))return!0;return!1}function tm({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function nm(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function rm(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&$d(e.body[0],{type:`Assertion`,kind:`search_start`})}function im(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function am(e,t){let n=nf(e,{...t,unicodePropertyMap:Ap}).body;return n.length>1||n[0].body.length>1?Cf({body:n}):n[0].body[0]}function om(e,t){return e.negate=t,e}function sm(e,t){return e.parent=t,e}function cm(e,t){return Up(e),e.parent=t,e}function lm(e,t){let n=Tp(t),r=xp(n.target,`ES2024`),i=xp(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];Vf(e,um,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,Sp(dm[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&bp(f._captureTransfers,e.transferTo,[]).push(t)}),f}var um={"*":{enter({node:e},t){if(Cm(e)){let n=t.getCurrentModI();t.pushModI(e.flags?yp({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Cm(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){_m(gp(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),vm(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&Rp.has(e.value)&&t.setHasCasedChar()}},dm={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?U`\B`:U`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=gp(e),r=ym(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&_m(n)){let e=kp(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);_p.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Tm)&&(o=[_f(45),...o.filter(e=>!Tm(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||_p.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=Cf(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=pf({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(_p.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=ym(n,i),o=ym(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&bm(vm(e)).forEach(e=>{s.add(Array.isArray(e)?`${ym(e[0],i)}-${ym(e[1],i)}`:ym(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:U`[^\n]`;if(e===`digit`)return t?U`\D`:U`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Rp.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?U`\P`:U`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?U`\W`:U`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=yp(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${xm(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+Sm(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:U`\g<${t}&R=${r}>`}},fm=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),pm=new Set([`-`,`\\`,`]`,`^`,`[`]),mm=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),hm=new Map([[9,U`\t`],[10,U`\n`],[11,U`\v`],[12,U`\f`],[13,U`\r`],[8232,U`\u2028`],[8233,U`\u2029`],[65279,U`\uFEFF`]]),gm=/^\p{Cased}$/u;function _m(e){return gm.test(e)}function vm(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=gp(e);if(!_m(t))continue;let o=kp(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function ym(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(hm.has(e))return hm.get(e);if(e<32||e>126&&e<160||e>262143||t&&wm(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?mm:pm:fm,a=gp(e);return(i.has(a)?`\\`:``)+a}function bm(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function xm(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function Sm({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function Cm({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function wm(e){return e>47&&e<58}function Tm({type:e,value:t}){return e===`Character`&&t===45}var Em=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=Om(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(Dm(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=km(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function Dm(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function Om(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)bp(n,t,{}).transferTo=e;return n}function km(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function Am(e,t){let n=jm(e,t);return n.options?new Em(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function jm(e,t){let n=Tp(t),r=zp(nf(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Ap}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=lm(r,n),a=up(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=ep(rp(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var Mm=4294967295,Nm=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Mm,end:Mm,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Pm(e,t){return Am(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Fm(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>Pm(e,{target:t.target}),{createScanner(e){return new Nm(e,t)},createString(e){return{content:e}}}}async function Im(e){if(ds())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=os.get(e);if(t!=null)return t;try{let t=ss.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(Ou,e)&&(t=Ou[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return as.has(e)||as.set(e,n),n});return os.set(e,n),await n}finally{os.delete(e)}}function Lm(e){return as.get(e)??Im(e)}var Rm=new Map,zm=new Map,Bm=new Map,Vm=new Set;function Hm(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Rm.get(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Rm.has(n)||Rm.set(n,e);Vm.has(n)||(Vm.add(n),t.loadThemeSync(e))}}async function Um(e){if(ds())throw Error(`resolveTheme("${e}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=zm.get(e);if(t!=null)return t;try{let t=Bm.get(e)??ku[e];if(t==null)throw Error(`resolveTheme: No valid loader for ${e}`);let n=t().then(t=>Wm(e,`default`in t?t.default:t));zm.set(e,n);let r=await n;if(r.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${r.name}`);return Rm.set(r.name,r),r}finally{zm.delete(e)}}function Wm(e,t){return Rm.get(e)??(t=su(t),Rm.set(e,t),t)}function Gm(e){return Rm.get(e)??Um(e)}function Km(e,t){if(Bm.has(e)){console.error(`SharedHighlight.registerCustomTheme: theme name already registered`,e);return}Bm.set(e,t)}var qm;async function Jm({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){qm??=td({themes:[],langs:[`text`],engine:n===`shiki-wasm`?ed(I(()=>import(`./wasm-BqG9CUph.js`),[])):Fm()});let r=Xm(qm)?await qm:qm;qm=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=Lm(e);`then`in t?i.push(t):us(t,r)}let a=[];for(let t of e){let e=Gm(t);`then`in e?a.push(e):Hm(e,qm)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{us(e,r)}),Promise.all(a).then(e=>{Hm(e,r)})]),r}function Ym(){if(qm!=null&&!(`then`in qm))return qm}function Xm(e=qm){return e!=null&&`then`in e}Km(`pierre-dark`,async()=>{let{default:e}=await I(async()=>{let{default:e}=await import(`./pierre-dark-DIUCKU6U.js`);return{default:e}},[]);return{...e,name:`pierre-dark`}}),Km(`pierre-light`,async()=>{let{default:e}=await I(async()=>{let{default:e}=await import(`./pierre-light-DVO2KPlh.js`);return{default:e}},[]);return{...e,name:`pierre-light`}});function Zm(e=yi){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Qm(e){for(let t of Zm(e))if(!Vm.has(t))return!1;return!0}function $m(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function eh(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function th(e){return B({tagName:`div`,children:[B({tagName:`div`,children:e.annotations?.map(e=>B({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function nh(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function rh({fileOrDiff:e,mode:t}){let n=`type`in e?e:void 0,r={"data-diffs-header":t,"data-change-type":n?.type};return B({tagName:`div`,children:[t===`custom`?B({tagName:`slot`,properties:{name:vi}}):ih({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:n?.type??`file`}),...t===`custom`?[]:[ah(n)]],properties:r})}function ih({name:e,prevName:t,iconType:n}){let r=[B({tagName:`slot`,properties:{name:gi}}),Oi({name:nh(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(B({tagName:`div`,children:[B({tagName:`bdi`,children:[Di(t)]})],properties:{"data-prev-name":``}})),r.push(Oi({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(B({tagName:`div`,children:[B({tagName:`bdi`,children:[Di(e)]})],properties:{"data-title":``}})),B({tagName:`div`,children:r,properties:{"data-header-content":``}})}function ah(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(B({tagName:`span`,children:[Di(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(B({tagName:`span`,children:[Di(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(B({tagName:`slot`,properties:{name:_i}})),B({tagName:`div`,children:t,properties:{"data-metadata":``}})}function oh(e){return B({tagName:`pre`,properties:sh(e)})}function sh({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}var ch=new Map,lh={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function uh(e){if(ch.has(e))return ch.get(e)??`text`;if(lh[e]!=null)return lh[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(ch.has(t[1]))return ch.get(t[1])??`text`;if(lh[t[1]]!=null)return lh[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return ch.has(n)?ch.get(n)??`text`:lh[n]??`text`}function dh(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:Zm(t),preferredHighlighter:n}}function fh(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function ph(e){return e.replace(/\n$|\r\n$/,``)}function mh(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(Di(`
|
|
154
|
+
`)),e}var hh=Symbol(`no-token`),gh=Symbol(`multiple-tokens`);function _h(e){let t=vh(e);if(t!=null)return t;let n=hh,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){bh(e,a);for(let t of e.children)yh(t)}else yh(e);r.push(e),i=[],a=void 0;return}for(let e of i)yh(e);r.push(B({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==hh){if(e===gh){n=gh;return}if(n===hh){n=e;return}n!==e&&(n=gh)}};for(let t of e.children){let e=t.type===`element`?_h(t):hh;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function vh(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function yh(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)yh(t)}}function bh(e,t){e.properties[`data-char`]=t}function xh(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=t+Sh(typeof e==`string`?e:a(e))+n;return o=r(o),i.has(o)||i.set(o,typeof e==`string`?e:{...e}),o}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function Sh(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function Ch(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=ki(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&_h(a),i.push(mh(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(Th,wh),{state:n,transformers:r,toClass:wh}}var wh=xh({classPrefix:`hl-`}),Th={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Eh(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}function Dh({theme:e=yi,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e);r+=`color:${i.fg};`,r+=`background-color:${i.bg};`,r+=`${Eh(`global`)}fg:${i.fg};`,r+=`${Eh(`global`)}bg:${i.bg};`,r+=Oh(i,n)}else{let n=t.getTheme(e.dark);r+=`${Eh(`global`)}dark:${n.fg};`,r+=`${Eh(`global`)}dark-bg:${n.bg};`,r+=Oh(n,`dark`),n=t.getTheme(e.light),r+=`${Eh(`global`)}light:${n.fg};`,r+=`${Eh(`global`)}light-bg:${n.bg};`,r+=Oh(n,`light`)}return r}function Oh(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Eh(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Eh(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Eh(`global`)}${t}modified-color:${a};`),n}function kh(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function Ah(e,t){return B({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function jh(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}var Mh=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
155
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
156
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
157
|
+
</symbol>
|
|
158
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
159
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
160
|
+
</symbol>
|
|
161
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
162
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
163
|
+
</symbol>
|
|
164
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
165
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
166
|
+
</symbol>
|
|
167
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
168
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
169
|
+
</symbol>
|
|
170
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
171
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
172
|
+
</symbol>
|
|
173
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
174
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
175
|
+
</symbol>
|
|
176
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
177
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
178
|
+
</symbol>
|
|
179
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
180
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
181
|
+
</symbol>
|
|
182
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
183
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
184
|
+
</symbol>
|
|
185
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
186
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
187
|
+
</symbol>
|
|
188
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
189
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
190
|
+
</symbol>
|
|
191
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
192
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
193
|
+
</symbol>
|
|
194
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
195
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
196
|
+
</symbol>
|
|
197
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
198
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
199
|
+
</symbol>
|
|
200
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
201
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
202
|
+
</symbol>
|
|
203
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
204
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
205
|
+
</symbol>
|
|
206
|
+
</svg>`;function Nh(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Ph(e,t){return e==null||t==null?e===t:Ih(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var Fh={};function Ih(e=Fh,t=Fh){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function Lh(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function Rh(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e}function zh(){let e=document.createElement(`style`);return e.setAttribute(xi,``),e}var Bh=`@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation],[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - 6px));align-self:flex-start;display:grid;overflow:scroll clip}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:6px}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer=annotation]{min-height:0}[data-gutter-buffer=buffer]{background-position:0 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, rgb(from var(--diffs-bg-buffer) r g b / .8) 4.242px, rgb(from var(--diffs-bg-buffer) r g b / .8) 5.656px)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:5px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-interactive-line-numbers] [data-column-number]{cursor:pointer}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;`,Vh=`@layer base, theme, rendered, unsafe;`;function Hh(e){return`${Vh}
|
|
207
|
+
@layer unsafe {
|
|
208
|
+
${e}
|
|
209
|
+
}`}function Uh(e,t=`system`){return`${Vh}
|
|
210
|
+
@layer rendered {
|
|
211
|
+
:host {${t===`system`?``:`
|
|
212
|
+
color-scheme: ${t};`}
|
|
213
|
+
${e}
|
|
214
|
+
}
|
|
215
|
+
}`}function Wh({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function Gh(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function Kh(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`);break}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.tabIndex=0,e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function qh({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=Jh(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Jh(){let e=document.createElement(`style`);return e.setAttribute(bi,``),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(Bh)),t.adoptedStyleSheets=[e]}}customElements.define(ai,t)}var Yh=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Xh(e,t){return eh(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function Zh(e){return B({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function Qh(e){return B({tagName:`div`,children:[B({tagName:`span`,children:[Di(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function $h(e){return B({tagName:`div`,children:[Oi({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function eg({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(B({tagName:`div`,children:[Di(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push($h(`up`)),s++),o||(e.push($h(`down`)),s++)):(e.push($h(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(B({tagName:`div`,children:[B({tagName:`span`,children:[Di(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(B({tagName:`div`,children:[Di(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(B({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(B({tagName:`slot`,properties:{name:i}})),B({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function tg(e,t){return`hunk-separator-${e}-${t}`}function ng(e){let t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function rg(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}var ig=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},ag=new class extends ig{};function og(e,t,n){return ag.diff(e,t,n)}function sg(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function cg(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function lg(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function ug(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function dg(e,t){return lg(e,t,``)}function fg(e,t){return ug(e,t,``)}function pg(e,t){return t.slice(0,mg(e,t))}function mg(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function hg(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function gg(e){let t=e.match(/^\s*/);return t?t[0]:``}var _g=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,vg=RegExp(`[${_g}]+|\\s+|[^${_g}]`,`ug`);new class extends ig{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(vg)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&yg(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&yg(n,i,r,null),e}};function yg(e,t,n,r){if(t&&n){let i=gg(t.value),a=hg(t.value),o=gg(n.value),s=hg(n.value);if(e){let r=sg(i,o);e.value=ug(e.value,o,r),t.value=dg(t.value,r),n.value=dg(n.value,r)}if(r){let e=cg(a,s);r.value=lg(r.value,s,e),t.value=fg(t.value,e),n.value=fg(n.value,e)}}else if(n){if(e){let e=gg(n.value);n.value=n.value.substring(e.length)}if(r){let e=gg(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=gg(r.value),i=gg(t.value),a=hg(t.value),o=sg(n,i);t.value=dg(t.value,o);let s=cg(dg(n,o),a);t.value=fg(t.value,s),r.value=lg(r.value,n,s),e.value=ug(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=gg(r.value),n=pg(hg(t.value),e);t.value=fg(t.value,n)}else if(e){let n=pg(hg(e.value),gg(t.value));t.value=dg(t.value,n)}}var bg=new class extends ig{tokenize(e){let t=RegExp(`(\\r?\\n)|[${_g}]+|[^\\S\\n\\r]+|[^${_g}]`,`ug`);return e.match(t)||[]}};function xg(e,t,n){return bg.diff(e,t,n)}var Sg=new class extends ig{constructor(){super(...arguments),this.tokenize=wg}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
216
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
217
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
218
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
219
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function Cg(e,t,n){return Sg.diff(e,t,n)}function wg(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
220
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Tg(e){return e==`.`||e==`!`||e==`?`}new class extends ig{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Tg(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends ig{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends ig{constructor(){super(...arguments),this.tokenize=wg}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(Eg(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function Eg(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=Eg(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=Eg(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends ig{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var Dg={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function Og(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;Cg(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(Cg(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||jg(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
221
|
+
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function kg(e,t){if(t||=Dg,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>kg(e,t)).join(`
|
|
222
|
+
`)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
223
|
+
`)+`
|
|
224
|
+
`}function Ag(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;Og(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?kg(e,o.headerOptions):void 0)}}))}else{let s=Og(e,t,n,r,i,a,o);return s?kg(s,o?.headerOptions):void 0}}function jg(e){let t=e.endsWith(`
|
|
225
|
+
`),n=e.split(`
|
|
226
|
+
`).map(e=>e+`
|
|
227
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Mg({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function Ng({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function Pg({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s={finalHunk:e.hunks.at(-1),viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!s.isWindowedHighlight)return!1;let e=s.unifiedCount>=n+r,i=s.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!s.isWindowedHighlight)return!1;let i=s.unifiedCount+e<n,a=s.splitCount+r<n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(s.unifiedCount+=e),(t===`split`||t===`both`)&&(s.splitCount+=n)},isInWindow(e,n){if(!s.isWindowedHighlight)return!0;let r=s.isInUnifiedWindow(e),i=s.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!s.isWindowedHighlight||s.unifiedCount>=n-e&&s.unifiedCount<n+r},isInSplitWindow(e){return!s.isWindowedHighlight||s.splitCount>=n-e&&s.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?s.incrementCounts(1,0):t===`split`?s.incrementCounts(0,1):s.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let[n,r]of e.hunks.entries()){if(s.shouldBreak())break;let o=Fg(e.isPartial,r.collapsedBefore,i,n,a),c=(()=>{if(r!==s.finalHunk||!Ig(e))return;let t=e.additionLines.length-(r.additionLineIndex+r.additionCount),n=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(t!==n)throw Error(`iterateOverDiff: trailing context mismatch (additions=${t}, deletions=${n}) for ${e.name}`);let o=Math.min(t,n);return Fg(e.isPartial,o,i,e.hunks.length,a)})(),l=o.fromStart+o.fromEnd;function u(e,n){return c==null||c.collapsedLines<=0||c.fromStart+c.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?c.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?c.collapsedLines:0}function d(){if(o.collapsedLines===0)return 0;let e=o.collapsedLines;return o.collapsedLines=0,e}if(s.shouldSkip(l,l))s.incrementCounts(l,l),d();else{let e=r.unifiedLineStart-o.rangeSize,t=r.splitLineStart-o.rangeSize,i=r.deletionLineIndex-o.rangeSize,a=r.additionLineIndex-o.rangeSize,c=r.deletionStart-o.rangeSize,l=r.additionStart-o.rangeSize,u=0;for(;u<o.fromStart;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:c+u,lineIndex:i+u,noEOFCR:!1,unifiedLineIndex:e+u,splitLineIndex:t+u},additionLine:{unifiedLineIndex:e+u,splitLineIndex:t+u,lineIndex:a+u,lineNumber:l+u,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);u++}for(e=r.unifiedLineStart-o.fromEnd,t=r.splitLineStart-o.fromEnd,i=r.deletionLineIndex-o.fromEnd,a=r.additionLineIndex-o.fromEnd,c=r.deletionStart-o.fromEnd,l=r.additionStart-o.fromEnd,u=0;u<o.fromEnd;){if(s.isInWindow(0,0)){if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:c+u,lineIndex:i+u,noEOFCR:!1,unifiedLineIndex:e+u,splitLineIndex:t+u},additionLine:{unifiedLineIndex:e+u,splitLineIndex:t+u,lineIndex:a+u,lineNumber:l+u,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);u++}}let f=r.unifiedLineStart,p=r.splitLineStart,m=r.deletionLineIndex,h=r.additionLineIndex,g=r.deletionStart,_=r.additionStart,v=r.hunkContent.at(-1);for(let e of r.hunkContent){if(s.shouldBreak())break hunkIterator;let i=e===v;if(e.type===`context`){if(s.shouldSkip(e.lines,e.lines))s.incrementCounts(e.lines,e.lines),d();else{let t=0;for(;t<e.lines;){if(s.isInWindow(0,0)){let a=i&&t===e.lines-1,o=f+t,c=p+t;if(s.emit({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:u(o,c),type:`context`,deletionLine:{lineNumber:g+t,lineIndex:m+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:c},additionLine:{unifiedLineIndex:o,splitLineIndex:c,lineIndex:h+t,lineNumber:_+t,noEOFCR:a&&r.noEOFCRAdditions}}))break hunkIterator}else s.incrementCounts(1,1);t++}}f+=e.lines,p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!s.shouldSkip(o,a)){let c=Lg(s,e,t);for(let[l,v]of c)for(let c=l;c<v;c++){let l=u(f+c,t===`unified`?p+(c<e.deletions?c:c-e.deletions):p+c);if(s.emit(Rg({hunkIndex:n,hunk:r,collapsedBefore:d(),collapsedAfter:l,diffStyle:t,index:c,unifiedLineIndex:f,splitLineIndex:p,additionLineIndex:h,deletionLineIndex:m,additionLineNumber:_,deletionLineNumber:g,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}d(),s.incrementCounts(o,a),f+=o,p+=a,m+=e.deletions,h+=e.additions,g+=e.deletions,_+=e.additions}}if(c!=null){let{collapsedLines:t,fromStart:n,fromEnd:r}=c,i=n+r,a=0;for(;a<i;){if(s.shouldBreak())break hunkIterator;if(s.isInWindow(0,0)){let n=a===i-1;if(s.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:n?t:0,type:`context-expanded`,deletionLine:{lineNumber:g+a,lineIndex:m+a,noEOFCR:!1,unifiedLineIndex:f+a,splitLineIndex:p+a},additionLine:{unifiedLineIndex:f+a,splitLineIndex:p+a,lineIndex:h+a,lineNumber:_+a,noEOFCR:!1}}))break hunkIterator}else s.incrementCounts(1,1);a++}}}}function Fg(e,t,n,r,i){if(t=Math.max(t,0),t===0||e)return{fromStart:0,fromEnd:0,rangeSize:t,collapsedLines:Math.max(t,0)};if(n===!0||t<=i)return{fromStart:t,fromEnd:0,rangeSize:t,collapsedLines:0};let a=n?.get(r),o=Math.min(Math.max(a?.fromStart??0,0),t),s=Math.min(Math.max(a?.fromEnd??0,0),t),c=o+s,l=c>=t;return{fromStart:l?t:o,fromEnd:l?0:s,rangeSize:t,collapsedLines:Math.max(t-c,0)}}function Ig(e){let t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function Lg(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function Rg({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var zg={forcePlainText:!1};function Bg(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=zg){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=Dh({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??Hg();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}Pg({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:c?h:!0,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&Vg({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=Ug({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function Vg({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=ph(e),t=ph(t),e.length>s||t.length>s))return;let c=o===`char`?og(e,t):xg(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(Ng({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),Ng({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?Ng({item:e,arr:l,enableJoin:d,isLastItem:t}):Ng({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(Mg({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(Mg({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function Hg(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function Ug({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=yi,...l}}){let u=s??uh(e.name),d=s??uh(t.name),{state:f,transformers:p}=Ch(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Eh(`token`)}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Eh(`token`)};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,kh(i.codeToHast(ph(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,kh(i.codeToHast(ph(t.contents),m)))}}function Wg(e){let t=e.lang??uh(e.name),n=e.lang??(e.prevName==null?`text`:uh(e.prevName));return t===`text`&&n===`text`}var Gg=-1,Kg=class{__id=`diff-hunks-renderer:${++Gg}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:yi},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Qm(e.theme??yi)?Ym():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Ci}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t===`change`?{gutterLineType:e===`deletions`?`change-deletion`:`change-addition`}:{gutterLineType:t}}createAnnotationElement(e){return th(e)}getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,theme:m=yi,headerRenderMode:h=`default`,tokenizeMaxLineLength:g=1e3,useTokenTransformer:_=!1,useCSSClasses:v=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,theme:this.workerManager?.getDiffRenderOptions().theme??m,headerRenderMode:h,tokenizeMaxLineLength:g,useTokenTransformer:_,useCSSClasses:v}}async initializeHighlighter(){return this.highlighter=await Jm(dh(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=this.workerManager?.getDiffResultCache(e);n!=null&&!Xh(t,n.options)&&(n=void 0),this.renderCache??={diff:e,highlighted:!Wg(e),options:t,result:n?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result??this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??uh(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:jh(this.options),tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||e!==n.diff||!Xh(t,n.options)?{options:t,forceRender:!0}:{options:t,forceRender:!1}}renderDiff(e=this.renderCache?.diff,t=wi){if(e==null)return;let{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),i=this.workerManager?.getDiffResultCache(e);i!=null&&this.renderCache==null&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...i});let{options:a,forceRender:o}=this.getRenderOptions(e);if(this.renderCache??={diff:e,highlighted:!1,options:a,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&(e!==this.renderCache.diff||!$m(this.renderCache.renderRange,t)))&&(this.renderCache.diff=e,this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,rg(t)||n?!0:this.expandedHunks,r),this.renderCache.renderRange=t),t.totalLines>0&&(!this.renderCache.highlighted||o)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??uh(e.name);let t=this.highlighter!=null&&Qm(a.theme),n=this.highlighter!=null&&ls(this.computedLang);if(this.highlighter!=null&&t&&(o||!this.renderCache.highlighted&&n||this.renderCache.result==null)){let{result:t,options:r}=this.renderDiffWithHighlighter(e,this.highlighter,!n);this.renderCache={diff:e,options:r,highlighted:n,result:t,renderRange:void 0}}(!t||!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=wi){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return oh({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){this.computedLang=e.lang??uh(e.name);let t=this.highlighter!=null&&Qm(this.options.theme??yi),n=this.highlighter!=null&&ls(this.computedLang);return(this.highlighter==null||!t||!n)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:Bg(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n){if(this.renderCache==null)return;let r=!this.renderCache.highlighted||!Xh(this.renderCache.options,n)||this.renderCache.diff!==e;this.renderCache={diff:e,options:n,highlighted:!0,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}onHighlightError(e){console.error(e)}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;let d=a===`unified`,f=[],p=[],m=[],h=[],{additionLines:g,deletionLines:_}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:Ai(),deletionsGutterAST:Ai(),additionsGutterAST:Ai(),expansionLineCount:c,hunkData:h,incrementRowCount(e=1){v.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:v.unifiedGutterAST.children.push(t);break;case`deletions`:v.deletionsGutterAST.children.push(t);break;case`additions`:v.additionsGutterAST.children.push(t);break}}},y=$g(e),b={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(v.pushToGutter(`additions`,Mi(void 0,`buffer`,this.size)),f?.push(Zh(this.size))):(v.pushToGutter(`deletions`,Mi(void 0,`buffer`,this.size)),p?.push(Zh(this.size))),this.size=0,this.side=void 0}}},x=(e,t,n,r,i)=>{v.pushToGutter(e,ji(t,n,r,i))};function S(e){b.flush(),a===`unified`?Zg(`unified`,e,v):(Zg(`deletions`,e,v),Zg(`additions`,e,v))}Pg({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,d=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&b.flush(),r>0&&S({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:!e.isPartial});let f=a===`unified`?d:l,p={type:c,hunkIndex:t,lineIndex:f,unifiedLineIndex:d,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(p);n?.before!=null&&Jg(n.before,v);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});x(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${d},${l}`,u.gutterProperties),i==null?r!=null&&(r=Qg(r,u.contentProperties)):i=Qg(i,u.contentProperties),Xg({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,f),createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&Jg(n.after,v)}else{let n=this.getSplitInjectedRowsForLine?.(p);n?.before!=null&&Yg(n.before,v,b);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let d=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();if(d!=null){if(b.side!=null&&b.side!==d)throw Error(`DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits`);b.side=d,b.increment()}let m=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,f);if(m!=null&&b.size>0&&b.flush(),s!=null){let e=Qg(r,a.contentProperties);x(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=Qg(i,u.contentProperties);x(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}Xg({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...m,createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&Yg(n.after,v,b)}let m=s?.noEOFCR??!1,h=o?.noEOFCR??!1;if(h||m){if(m){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(v.unifiedContentAST.push(Qh(e)),v.pushToGutter(`unified`,Mi(e,`metadata`,1))):(v.deletionsContentAST.push(Qh(e)),v.pushToGutter(`deletions`,Mi(e,`metadata`,1)),h||(v.pushToGutter(`additions`,Mi(void 0,`buffer`,1)),v.additionsContentAST.push(Zh(1))))}if(h){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(v.unifiedContentAST.push(Qh(e)),v.pushToGutter(`unified`,Mi(e,`metadata`,1))):(v.additionsContentAST.push(Qh(e)),v.pushToGutter(`additions`,Mi(e,`metadata`,1)),m||(v.pushToGutter(`deletions`,Mi(void 0,`buffer`,1)),v.deletionsContentAST.push(Zh(1))))}v.incrementRowCount(1)}i>0&&u!==`simple`&&S({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:i,rangeSize:y,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),a===`split`&&b.flush();let C=Math.max(ng(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,T=!d&&e.type!==`deleted`,E=!d&&e.type!==`new`,D=v.rowCount>0||w;f=T&&D?f:void 0,p=E&&D?p:void 0,m=d&&D?m:void 0;let O=this.createPreElement(p!=null&&f!=null,C);return{unifiedGutterAST:d&&D?v.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:E&&D?v.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:T&&D?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:h,preNode:O,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Ai(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,Ah(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(B({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(B({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(B({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Vo(this.renderFullAST(e,t))}renderPartialHTML(e,t){return Vo(t==null?e:B({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(fh(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(fh(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(!(o.annotations.length===0&&a.annotations.length===0))return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t}=this.getOptionsWithDefaults();return rh({fileOrDiff:e,mode:t})}};function qg(e){return`${e} unmodified line${e>1?`s`:``}`}function Jg(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function Yg(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function Xg({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Mi(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Mi(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Mi(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function Zg(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,eg({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(eg({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,eg({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(eg({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=tg(e,t),d=r>c.expansionLineCount,f=s?t:void 0;c.pushToGutter(e,eg({type:c.hunkSeparators,content:qg(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(eg({type:c.hunkSeparators,content:qg(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function Qg(e,t){return e==null||e.type!==`element`||t==null?e:{...e,properties:{...e.properties,...t}}}function $g(e){let t=e.hunks.at(-1);if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let n=e.additionLines.length-(t.additionLineIndex+t.additionCount),r=e.deletionLines.length-(t.deletionLineIndex+t.deletionCount);if(n!==r)throw Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${n}, deletions=${r}) for ${e.name}`);return Math.min(n,r)}function e_(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function t_(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function n_(e){let t=e[0];if(t!==`+`&&t!==`-`&&t!==` `&&t!==`\\`){console.error(`parseLineType: Invalid firstChar: "${t}", full line: "${e}"`);return}let n=e.substring(1);return{line:n===``?`
|
|
228
|
+
`:n,type:t===` `?`context`:t===`\\`?`metadata`:t===`+`?`addition`:`deletion`}}function r_(e,t,n=!1){let r=si.test(e),i=e.split(r?si:ci),a,o=[];for(let e of i){if(r&&!si.test(e)){if(a==null)a=e;else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!ci.test(e)){if(a==null)a=e;else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=i_(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function i_(e,{cacheKey:t,isGitDiff:n=si.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=e.split(li),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=e.split(di),f=s.shift();if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=f.match(ui),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?i.contents.split(di):[],deletionLines:!l&&r!=null&&i!=null?r.contents.split(di):[],cacheKey:t},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0),s.unshift(f);for(let e of s){let t=e.match(n?pi:fi);if(e.startsWith(`diff --git`)){let[,,t,,n]=e.trim().match(mi)??[];c.name=n.trim(),t!==n&&(c.prevName=t.trim())}else if(t!=null){let[,e,n]=t;e===`---`&&n!==`/dev/null`?(c.prevName=n.trim(),c.name=n.trim()):e===`+++`&&n!==`/dev/null`&&(c.name=n.trim())}else if(n){if(e.startsWith(`new mode `)&&(c.mode=e.replace(`new mode`,``).trim()),e.startsWith(`old mode `)&&(c.prevMode=e.replace(`old mode`,``).trim()),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=e.replace(`new file mode`,``).trim()),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=e.replace(`deleted file mode`,``).trim()),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(hi)??[];t!=null&&(c.prevObjectId=t),n!=null&&(c.newObjectId=n),r!=null&&(c.mode=r)}e.startsWith(`rename from `)&&(c.prevName=e.replace(`rename from `,``).trim()),e.startsWith(`rename to `)&&(c.name=e.replace(`rename to `,``).trim())}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
229
|
+
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
230
|
+
`||s[s.length-1]===``);)s.pop();let v=parseInt(p[3]),y=parseInt(p[1]);u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(p[4]??`1`),additionStart:v,additionLines:m,deletionCount:parseInt(p[2]??`1`),deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:p[5],hunkSpecs:f,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(b.additionCount)||isNaN(b.deletionCount)||isNaN(b.additionStart)||isNaN(b.deletionStart)){if(a)throw Error(`parsePatchContent: invalid hunk metadata`);console.error(`parsePatchContent: invalid hunk metadata`,b);continue}for(let e of s){let t=n_(e);if(t==null){console.error(`processFile: invalid rawLine:`,e);continue}let{type:n,line:r}=t;if(n===`addition`)(g==null||g.type!==`change`)&&(g=o_(`change`,u,d),b.hunkContent.push(g)),d++,l&&c.additionLines.push(r),g.additions++,m++,_=`addition`;else if(n===`deletion`)(g==null||g.type!==`change`)&&(g=o_(`change`,u,d),b.hunkContent.push(g)),u++,l&&c.deletionLines.push(r),g.deletions++,h++,_=`deletion`;else if(n===`context`)(g==null||g.type!==`context`)&&(g=o_(`context`,u,d),b.hunkContent.push(g)),d++,u++,l&&(c.deletionLines.push(r),c.additionLines.push(r)),g.lines++,_=`context`;else if(n===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=ph(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=ph(c.deletionLines[e]))}}}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function a_(e,t,n=!1){let r=[];for(let i of e.split(oi))try{r.push(r_(i,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function o_(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}function s_(e,t,n,r=!1){let i=i_(Ag(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return t.lang!=null&&(i.lang=t.lang),i}var c_=-1,l_=class{static LoadedCustomComponent=!0;__id=`file-diff:${++c_}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(e={theme:yi},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new is,this.scrollSyncManager=new Yh,this.interactionManager=new Wo(`diff`,Go(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return{...e,headerRenderMode:e.renderCustomHeader==null?`default`:`custom`,hunkSeparators:typeof e.hunkSeparators==`function`?`custom`:e.hunkSeparators}}createHunksRenderer(e){return new Kg(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{if(this.fileDiff==null)return;let n=this.fileDiff.hunks.at(-1),r,i;hunkIterator:for(let a of this.fileDiff.hunks){let o=t===`deletions`?a.deletionStart:a.additionStart,s=t===`deletions`?a.deletionCount:a.additionCount,c=a.splitLineStart,l=a.unifiedLineStart;if(e<o){let t=o-e;r=Math.max(l-t,0),i=Math.max(c-t,0);break hunkIterator}if(e>=o+s){if(a===n){let t=e-(o+s);r=l+a.unifiedLineCount+t,i=c+a.splitLineCount+t;break hunkIterator}continue}for(let n of a.hunkContent)if(n.type===`context`)if(e<o+n.lines){let t=e-o;i=c+t,r=l+t;break hunkIterator}else o+=n.lines,c+=n.lines,l+=n.lines;else{let a=t===`deletions`?n.deletions:n.additions;if(e<o+a){let a=e-o;r=l+(t===`additions`?n.deletions:0)+a,i=c+a;break hunkIterator}else o+=a,c+=Math.max(n.deletions,n.additions),l+=n.deletions+n.additions}break hunkIterator}if(!(r==null||i==null))return[r,i]};setOptions(e){e!=null&&(this.options=e,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.interactionManager.setOptions(Go(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),!(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType))}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e){this.interactionManager.setSelection(e)}cleanUp(e=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=``),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML=``,this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:a,newFile:o,fileDiff:s}=e;this.hydrateElements(t,n),f_(this.pre,u_({fileDiff:s,oldFile:a,newFile:o}),this.options.collapsed)||p_(this.headerElement,d_({fileDiff:s,oldFile:a,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:a,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){Gh(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){let{diffStyle:i=`split`,overflow:a=`scroll`}=this.options;this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?s_(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,a===`wrap`),a===`scroll`&&i===`split`&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,forceRender:r=!1,preventEmit:i=!1,lineAnnotations:a,fileContainer:o,containerWrapper:s,renderRange:c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let{collapsed:l=!1}=this.options,u=l?void 0:c,d=e!=null&&t!=null&&(!Nh(e,this.deletionFile)||!Nh(t,this.additionFile)),f=n!=null&&n!==this.fileDiff,p=a!=null&&(a.length>0||this.lineAnnotations.length>0)?a!==this.lineAnnotations:!1;if(!l&&$m(u,this.renderRange)&&!r&&!p&&(n!=null&&n===this.fileDiff||n==null&&!d))return!1;let{renderRange:m}=this;if(this.renderRange=u,this.deletionFile=e,this.additionFile=t,n==null?e!=null&&t!=null&&d&&(f=!0,this.fileDiff=s_(e,t,this.options.parseDiffOptions)):this.fileDiff=n,a!=null&&this.setLineAnnotations(a),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{diffStyle:h=`split`,disableErrorHandling:g=!1,disableFileHeader:_=!1,overflow:v=`scroll`,themeType:y=`system`}=this.options;if(_&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),o=this.getOrCreateFileContainer(o,s),l){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,Ti);e!=null&&this.applyThemeState(o,e.themeStyles,y,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,o),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,o)}return i||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(o);if(!(this.canPartiallyRender(r,p,d||f)&&this.applyPartialRender({previousRenderRange:m,renderRange:u}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,u);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(o,t.themeStyles,y,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,o),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,u),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(e),this.resizeManager.setup(e,v===`wrap`),v===`scroll`&&h===`split`?this.scrollSyncManager.setup(e,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(e){if(g)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,o)}return i||this.emitPostRender(),!0}emitPostRender(){this.fileContainer!=null&&this.options.onPostRender?.(this.fileContainer,this)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!t_(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${fh(r)}`,a=this.annotationCache.get(i);if(a==null||!e_(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:Lh(fh(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let e=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=Rh();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let n=this.fileContainer;if(this.fileContainer=e??this.fileContainer??document.createElement(`diffs-container`),n!=null&&n!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=Mh;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=Vo(e);if(r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,vi,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=a?.(n)??void 0,c=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,gi,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,_i,c),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=zh(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Hh(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n;this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a||(this.themeCSSStyle=qh({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Uh(t,a)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{themeStyles:t,themeType:a,baseThemeType:r})}applyHunksToDOM(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Wh({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Wh({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Wh({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=m_(t[0]),i=m_(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}else throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}if(e===`unified`)return i(t);{let e=i(n),t=i(r);return e!=null||t!=null?[e,t]:void 0}}applyBuffers(e,t){let{disableVirtualizationBuffers:n=!1}=this.options;if(n||t==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l===`unified`?!1:t!=null&&n!=null,totalLines:r,customProperties:i};Ph(u,this.appliedPreAttributes)||(Kh(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper();let n=this.getOrCreatePreNode(t);n.innerHTML=``,n.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let r=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.innerHTML=``,r.appendChild(this.errorWrapper);let i=document.createElement(`div`);i.dataset.errorMessage=``,i.innerText=e.message,this.errorWrapper.appendChild(i);let a=document.createElement(`pre`);a.dataset.errorStack=``,a.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(a)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function u_({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function d_({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function f_(e,t,n=!1){return!n&&e==null&&t}function p_(e,t,n=!1){return e==null&&t&&!n}function m_(e){if(!(e==null||e.type!==`element`))return e.children??[]}function h_({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function g_(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:__(n,e.startContentIndex)}}function __(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function v_(e,t){let n={...Si,...t};return n.hunkSeparatorHeight=y_(e,t?.hunkSeparatorHeight),n}function y_(e,t){if(t!=null)return t;switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}var b_=-1,x_=class extends l_{__id=`little-virtualized-file-diff:${++b_}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;isSetup=!1;virtualizer;constructor(e,t,n,r,i=!1){super(e,r,i);let{hunkSeparators:a=`line-info`}=this.options;this.virtualizer=t,this.metrics=v_(typeof a==`function`?`custom`:a,n)}getLineHeight(e,t=!1){let n=this.heightCache.get(e);if(n!=null)return n;let r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(e==null)return;let t=this.options.diffStyle,n=this.options.overflow,r=this.options.collapsed;super.setOptions(e),(t!==this.options.diffStyle||n!==this.options.overflow||r!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){let{overflow:e=`scroll`}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(e===`scroll`&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;let t=this.getDiffStyle(),n=!1,r=t===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(let e of r){if(e==null)continue;let r=e.children[1];if(r instanceof HTMLElement)for(let e of r.children){if(!(e instanceof HTMLElement))continue;let r=e.dataset.lineIndex;if(r==null)continue;let i=C_(r,t),a=e.getBoundingClientRect().height,o=!1;e.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in e.nextElementSibling.dataset||`noNewline`in e.nextElementSibling.dataset)&&(`noNewline`in e.nextElementSibling.dataset&&(o=!0),a+=e.nextElementSibling.getBoundingClientRect().height);let s=this.getLineHeight(i,o);a!==s&&(n=!0,a===this.metrics.lineHeight*(o?2:1)?this.heightCache.delete(i):this.heightCache.set(i,a))}}(n||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),this.isSetup=!1,super.cleanUp()}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(e){this.fileContainer!=null&&(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){let e=this.height===0;if(this.height=0,this.fileDiff==null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=1,hunkSeparators:a=`line-info`}=this.options,{diffHeaderHeight:o,fileGap:s,hunkSeparatorHeight:c}=this.metrics,l=this.getDiffStyle(),u=a!==`simple`&&a!==`metadata`&&a!==`line-info-basic`?s:0;if(t?a!==`simple`&&a!==`metadata`&&(this.height+=s):this.height+=o,!r&&(Pg({diff:this.fileDiff,diffStyle:l,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:e,collapsedBefore:t,collapsedAfter:n,deletionLine:r,additionLine:i})=>{let o=i==null?r.splitLineIndex:i.splitLineIndex,s=i==null?r.unifiedLineIndex:i.unifiedLineIndex,d=(i?.noEOFCR??!1)||(r?.noEOFCR??!1);t>0&&(e>0&&(this.height+=u),this.height+=c+u),this.height+=this.getLineHeight(l===`split`?o:s,d),n>0&&a!==`simple`&&(this.height+=u+c)}}),this.fileDiff.hunks.length>0&&(this.height+=s),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!e)){let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height})}}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,...i}={}){let{isSetup:a}=this;if(this.fileDiff??=r??(t!=null&&n!=null?s_(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;if(a?this.top??=this.virtualizer.getOffsetInScrollContainer(e):(this.computeApproximateSize(),this.virtualizer.connect(e,this),this.top??=this.virtualizer.getOffsetInScrollContainer(e),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height),this.isSetup=!0),!this.isVisible)return this.renderPlaceholder(this.height);let o=this.virtualizer.getWindowSpecs(),s=this.computeRenderRangeFromWindow(this.fileDiff,this.top,o);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:s,oldFile:t,newFile:n,...i})}getDiffStyle(){return this.options.diffStyle??`split`}getExpandedRegion(e,t,n){if(n<=0||e)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(n,0),renderAll:!1};let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;if(r||n<=i)return{fromStart:n,fromEnd:0,collapsedLines:0,renderAll:!0};let a=this.hunksRenderer.getExpandedHunk(t),o=Math.min(Math.max(a.fromStart,0),n),s=Math.min(Math.max(a.fromEnd,0),n),c=o+s,l=c>=n;return{fromStart:o,fromEnd:s,collapsedLines:Math.max(n-c,0),renderAll:l}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}for(let[r,i]of e.hunks.entries()){let a=t===`split`?i.splitLineCount:i.unifiedLineCount;n+=a;let o=Math.max(i.collapsedBefore,0),{fromStart:s,fromEnd:c,renderAll:l}=this.getExpandedRegion(e.isPartial,r,o);o>0&&(n+=l?o:s+c)}let r=e.hunks.at(-1);if(r!=null&&S_(e)){let t=e.additionLines.length-(r.additionLineIndex+r.additionCount),i=e.deletionLines.length-(r.deletionLineIndex+r.deletionCount);if(r!=null&&t!==i)throw Error(`VirtualizedFileDiff: trailing context mismatch (additions=${t}, deletions=${i}) for ${e.name}`);let a=Math.min(t,i);if(r!=null&&a>0){let{fromStart:t,renderAll:r}=this.getExpandedRegion(e.isPartial,e.hunks.length,a);n+=r?a:t}}return n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1,hunkSeparators:s=`line-info`}=this.options,{diffHeaderHeight:c,fileGap:l,hunkLineCount:u,hunkSeparatorHeight:d,lineHeight:f}=this.metrics,p=this.getDiffStyle(),m=this.height,h=this.getExpandedLineCount(e,p),g=i?l:c;if(t<n-m||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-g-l};if(h<=u||e.hunks.length===0)return{startingLine:0,totalLines:u,bufferBefore:0,bufferAfter:0};let _=Math.ceil(Math.max(r-n,0)/f),v=Math.ceil(_/u)*u+u,y=v/u,b=y,x=[],S=(n+r)/2,C=s===`simple`||s===`metadata`||s===`line-info-basic`?0:l,w=t+g,T=0,E,D,O;if(Pg({diff:e,diffStyle:p,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,collapsedBefore:i,collapsedAfter:a,deletionLine:o,additionLine:c})=>{let l=c==null?o.splitLineIndex:c.splitLineIndex,f=c==null?o.unifiedLineIndex:c.unifiedLineIndex,m=(c?.noEOFCR??!1)||(o?.noEOFCR??!1),h=i>0?d+C+(e>0?C:0):0;e===0&&s===`simple`&&(h=0),w+=h;let _=T%u===0;if(_&&(x.push(w-(t+g+h)),O!=null)){if(O<=0)return!0;O--}let v=this.getLineHeight(p===`split`?l:f,m),y=Math.floor(T/u);return w>n-v&&w<r&&(E??=y),D==null&&w+v>S&&(D=y),O==null&&w>=r&&_&&(O=b),T++,w+=v,a>0&&s!==`simple`&&(w+=d+C),!1}}),E==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:m-g-l};let k=x.length;D??=E;let A=Math.round(D-y/2),ee=Math.max(0,k-y),j=Math.max(0,Math.min(A,ee)),M=j*u,te=A<0?v+A*u:v,ne=x[j]??0,N=j+te/u;return{startingLine:M,totalLines:te,bufferBefore:ne,bufferAfter:N<x.length?m-g-x[N]-l:m-(w-t)-l}}};function S_(e){let t=e.hunks.at(-1);return t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0?!1:t.additionLineIndex+t.additionCount<e.additionLines.length||t.deletionLineIndex+t.deletionCount<e.deletionLines.length}function C_(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function w_(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function T_(e,t){let n=e?.theme??yi,r=t?.theme??yi,i=E_(e),a=E_(t);return eh(n,r)&&w_(e,t,[`theme`,`parseDiffOptions`])&&w_(i,a)}function E_(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function D_(e){let t=a_(e);if(t.length!==1)throw console.error(t),Error(`PatchDiff: Provided patch must include only 1 patch, with 1 diff`);let{files:n}=t[0];if(n.length!==1)throw console.error(n),Error(`FileDiff: Provided patch must contain exactly 1 file diff`);return n[0]}function O_({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=R.useRef(e!==void 0),[a,o]=R.useState(t);return[i?e:a,R.useCallback(e=>{i||o(e)},[])]}var k_=R.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function A_(){return R.useContext(k_)}function j_(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=ke(i),o=R.useRef(0),s=et(N_).current,c=et(M_).current,[l,u]=R.useState(0),d=R.useRef(l),f=ke((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=ke(e=>{c.delete(e),d.current+=1,u(d.current)}),m=R.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(P_).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Ze(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Ze(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Ze(()=>()=>{n.current=[]},[n]),Ze(()=>()=>{r&&(r.current=[])},[r]);let h=ke(e=>(s.add(e),()=>{s.delete(e)}));Ze(()=>{s.forEach(e=>e(m))},[s,m]);let g=R.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,L.jsx)(k_.Provider,{value:g,children:t})}function M_(){return new Map}function N_(){return new Set}function P_(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var F_=R.createContext(void 0);function I_(){let e=R.useContext(F_);if(e===void 0)throw Error(mt(10));return e}var L_={value:()=>null},R_=R.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:o,loopFocus:s=!0,onValueChange:c,multiple:l=!1,orientation:u=`vertical`,value:d,defaultValue:f,style:p,...m}=e,h=P(),g=R.useMemo(()=>{if(d===void 0)return f??[]},[d,f]),_=ke(c),v=R.useRef([]),[y,b]=O_({controlled:d,default:g,name:`Accordion`,state:`value`}),x=ke((e,t)=>{let n=St(D);if(!l){let t=y[0]===e?[]:[e];if(_(t,n),n.isCanceled)return;b(t)}else if(t){let t=y.slice();if(t.push(e),_(t,n),n.isCanceled)return;b(t)}else{let t=y.filter(t=>t!==e);if(_(t,n),n.isCanceled)return;b(t)}}),S=R.useMemo(()=>({value:y,disabled:i,orientation:u}),[y,i,u]),C=R.useMemo(()=>({accordionItemRefs:v,direction:h,disabled:i,handleValueChange:x,hiddenUntilFound:a??!1,keepMounted:o??!1,loopFocus:s,orientation:u,state:S,value:y}),[h,i,x,a,o,s,u,S,y]),w=N(`div`,e,{state:S,ref:t,props:[{dir:h,role:`region`},m],stateAttributesMapping:L_});return(0,L.jsx)(F_.Provider,{value:C,children:(0,L.jsx)(j_,{elementsRef:v,children:w})})});function z_(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,s]=O_({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=Pe(o,!0,!0),[d,f]=R.useState(o),[{height:p,width:m},h]=R.useState({height:void 0,width:void 0}),g=de(),[_,v]=R.useState(),y=_??g,[b,x]=R.useState(!1),[S,C]=R.useState(!1),w=R.useRef(null),E=R.useRef(null),D=R.useRef(null),O=R.useRef(null),k=Je(O,!1),A=ke(e=>{let t=!o,n=St(T,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=O.current;E.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!b&&!S&&(E.current!=null&&E.current!==`css-animation`&&!c&&t&&l(!0),E.current===`css-animation`&&(!d&&t&&f(!0),!c&&t&&l(!0))),s(t),E.current===`none`&&c&&!t&&l(!1)});return Ze(()=>{a&&E.current===`none`&&!o&&l(!1)},[a,o,t,l]),R.useMemo(()=>({abortControllerRef:w,animationTypeRef:E,disabled:i,handleTrigger:A,height:p,mounted:c,open:o,panelId:y,panelRef:O,runOnceAnimationsFinish:k,setDimensions:h,setHiddenUntilFound:x,setKeepMounted:C,setMounted:l,setOpen:s,setPanelIdState:v,setVisible:f,transitionDimensionRef:D,transitionStatus:u,visible:d,width:m}),[w,E,i,A,p,c,o,y,O,k,h,x,C,l,s,f,D,u,d,m])}var B_=R.createContext(void 0);function V_(){let e=R.useContext(B_);if(e===void 0)throw Error(mt(15));return e}var H_=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function U_(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=A_(),f=R.useRef(-1),[p,m]=R.useState(a??(i===H_.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=R.useRef(null),g=R.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Ze(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Ze(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),R.useMemo(()=>({ref:g,index:p}),[p,g])}var W_=R.createContext(void 0);function G_(){let e=R.useContext(W_);if(e===void 0)throw Error(mt(9));return e}var K_=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=vt.startingStyle]=`startingStyle`,e[e.endingStyle=vt.endingStyle]=`endingStyle`,e}({}),q_=function(e){return e.panelOpen=`data-panel-open`,e}({}),J_={[K_.open]:``},Y_={[K_.closed]:``},X_={open(e){return e?{[q_.panelOpen]:``}:null}},Z_={open(e){return e?J_:Y_}},Q_=function(e){return e.index=`data-index`,e.disabled=`data-disabled`,e.open=`data-open`,e}({}),$_={...Z_,index:e=>Number.isInteger(e)?{[Q_.index]:String(e)}:null,...Oe,value:()=>null},ev=R.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:o,style:s,...c}=e,{ref:l,index:u}=U_(),d=it(t,l),{disabled:f,handleValueChange:p,state:m,value:h}=I_(),g=de(),_=o??g,v=r||f,y=R.useMemo(()=>{if(!h)return!1;for(let e=0;e<h.length;e+=1)if(h[e]===_)return!0;return!1},[h,_]),b=ke((e,t)=>{i?.(e,t),!t.isCanceled&&p(_,e)}),x=z_({open:y,onOpenChange:b,disabled:v}),S=R.useMemo(()=>({open:x.open,disabled:x.disabled,hidden:!x.mounted,transitionStatus:x.transitionStatus}),[x.open,x.disabled,x.mounted,x.transitionStatus]),C=R.useMemo(()=>({...x,onOpenChange:b,state:S}),[x,S,b]),w=R.useMemo(()=>({...m,index:u,disabled:v,open:y}),[v,u,y,m]),[T,E]=R.useState(de()),D=R.useMemo(()=>({open:y,state:w,setTriggerId:E,triggerId:T}),[y,w,E,T]),O=N(`div`,e,{state:w,ref:d,props:c,stateAttributesMapping:$_});return(0,L.jsx)(B_.Provider,{value:C,children:(0,L.jsx)(W_.Provider,{value:D,children:O})})}),tv=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=G_();return N(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:$_})});function nv(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var rv=new Set([Vt,Mt,Ht,Bt,tn,`End`]);function iv(e){let{current:t}=e,n=[];for(let e=0;e<t.length;e+=1){let r=t[e];if(!nv(r)){let e=r?.querySelector(`[type="button"], [role="button"]`);e&&!nv(e)&&n.push(e)}}return n}var av=R.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...c}=e,{panelId:l,open:u,handleTrigger:d,disabled:f}=V_(),{getButtonProps:p,buttonRef:m}=sn({disabled:n??f,focusableWhenDisabled:!0,native:o,composite:!0}),{accordionItemRefs:h,direction:g,loopFocus:_,orientation:v}=I_(),b=g===`rtl`,x=v===`horizontal`,{state:S,setTriggerId:C,triggerId:w}=G_();Ze(()=>(i&&C(i),()=>{C(void 0)}),[i,C]);let T=R.useMemo(()=>({"aria-controls":u?l:void 0,"aria-expanded":u,id:w,tabIndex:0,onClick:d,onKeyDown(e){if(!rv.has(e.key))return;y(e);let t=iv(h),n=t.length-1,r=-1,i=t.indexOf(e.currentTarget);function a(){r=_?i+1>n?0:i+1:Math.min(i+1,n)}function o(){r=_&&i===0?n:i-1}switch(e.key){case Vt:x||a();break;case Mt:x||o();break;case Ht:x&&(b?o():a());break;case Bt:x&&(b?a():o());break;case`Home`:r=0;break;case`End`:r=n;break;default:break}r>-1&&t[r].focus()}}),[h,d,w,x,b,_,u,l]);return N(`button`,e,{state:S,ref:[t,m],props:[T,c,p],stateAttributesMapping:X_})}),ov=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({});function sv(e){let{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:a,keepMounted:o,id:s,mounted:c,onOpenChange:l,open:u,panelRef:d,runOnceAnimationsFinish:f,setDimensions:p,setMounted:m,setOpen:h,setVisible:g,transitionDimensionRef:_,visible:v,width:y}=e,b=R.useRef(!1),x=R.useRef(null),S=R.useRef(u),C=R.useRef(u),w=yt(),T=R.useMemo(()=>n.current===`css-animation`?!v:!u&&!c,[u,c,v,n]),E=it(r,d,ke(e=>{if(!e)return;if(n.current==null||_.current==null){let t=getComputedStyle(e),r=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;r&&i||(t.animationName===`none`&&t.transitionDuration!==`0s`?n.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?n.current=`css-animation`:n.current=`none`),e.getAttribute(ov.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?_.current=`width`:_.current=`height`}if(n.current!==`css-transition`)return;(i===void 0||y===void 0)&&(p({height:e.scrollHeight,width:e.scrollWidth}),C.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,r=-1;return t=Ye.request(()=>{C.current=!1,r=Ye.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{Ye.cancel(t),Ye.cancel(r)}}));return Ze(()=>{if(n.current!==`css-transition`)return;let e=d.current;if(!e)return;let r=-1;if(t.current!=null&&(t.current.abort(),t.current=null),u){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!C.current&&!o&&e.setAttribute(K_.startingStyle,``),p({height:e.scrollHeight,width:e.scrollWidth}),r=Ye.request(()=>{Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;p({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let r=n.signal,i=null,a=K_.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,f(()=>{p({height:0,width:0}),e.style.removeProperty(`content-visibility`),m(!1),t.current===n&&(t.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),w.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{Ye.cancel(r)}},[t,n,w,a,o,c,u,d,f,p,m]),Ze(()=>{if(n.current!==`css-animation`)return;let e=d.current;e&&(x.current=e.style.animationName||x.current,e.style.setProperty(`animation-name`,`none`),p({height:e.scrollHeight,width:e.scrollWidth}),!S.current&&!b.current&&e.style.removeProperty(`animation-name`),u?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),g(!0)):(t.current=new AbortController,f(()=>{m(!1),g(!1),t.current=null},t.current.signal)))},[t,n,u,d,f,p,m,g,v]),je(()=>{let e=Ye.request(()=>{S.current=!1});return()=>Ye.cancel(e)}),Ze(()=>{if(!a)return;let e=d.current;if(!e)return;let t=-1,n=-1;return u&&b.current&&(e.style.transitionDuration=`0s`,p({height:e.scrollHeight,width:e.scrollWidth}),t=Ye.request(()=>{b.current=!1,n=Ye.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{Ye.cancel(t),Ye.cancel(n)}},[a,u,d,p]),Ze(()=>{let e=d.current;e&&a&&T&&(e.setAttribute(`hidden`,`until-found`),n.current===`css-transition`&&e.setAttribute(K_.startingStyle,``))},[a,T,n,d]),R.useEffect(function(){let e=d.current;if(!e)return;function t(e){b.current=!0,h(!0),l(!0,St(D,e))}return Re(e,`beforematch`,t)},[l,d,h]),R.useMemo(()=>({props:{hidden:T,id:s,ref:E}}),[T,s,E])}var cv=function(e){return e.accordionPanelHeight=`--accordion-panel-height`,e.accordionPanelWidth=`--accordion-panel-width`,e}({}),lv=R.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...c}=e,{hiddenUntilFound:l,keepMounted:u}=I_(),{abortControllerRef:d,animationTypeRef:f,height:p,mounted:m,onOpenChange:h,open:g,panelId:_,panelRef:v,runOnceAnimationsFinish:y,setDimensions:b,setHiddenUntilFound:x,setKeepMounted:S,setMounted:C,setOpen:w,setVisible:T,transitionDimensionRef:E,visible:D,width:O,setPanelIdState:k,transitionStatus:A}=V_(),ee=r??l,j=i??u;Ze(()=>{if(a)return k(a),()=>{k(void 0)}},[a,k]),Ze(()=>{x(ee)},[x,ee]),Ze(()=>{S(j)},[S,j]),Te({open:g&&A===`idle`,ref:v,onComplete(){g&&b({width:void 0,height:void 0})}});let{props:M}=sv({abortControllerRef:d,animationTypeRef:f,externalRef:t,height:p,hiddenUntilFound:ee,id:a??_,keepMounted:j,mounted:m,onOpenChange:h,open:g,panelRef:v,runOnceAnimationsFinish:y,setDimensions:b,setMounted:C,setOpen:w,setVisible:T,transitionDimensionRef:E,visible:D,width:O}),{state:te,triggerId:ne}=G_(),re=N(`div`,e,{state:R.useMemo(()=>({...te,transitionStatus:A}),[te,A]),ref:[t,v],props:[M,{"aria-labelledby":ne,role:`region`,style:{[cv.accordionPanelHeight]:p===void 0?`auto`:`${p}px`,[cv.accordionPanelWidth]:O===void 0?`auto`:`${O}px`}},c],stateAttributesMapping:$_});return j||ee||m?re:null});function uv(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`flex w-full flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(R_,{"data-slot":`accordion`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function dv(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`not-last:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(ev,{"data-slot":`accordion-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fv(e){let t=(0,z.c)(18),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,headerClassName:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===i?o=t[6]:(o=E(`flex`,i),t[5]=i,t[6]=o);let s;t[7]===r?s=t[8]:(s=E(`group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground`,r),t[7]=r,t[8]=s);let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,L.jsx)(qr,{"data-slot":`accordion-trigger-icon`,className:`pointer-events-none size-4 shrink-0 group-aria-expanded/accordion-trigger:hidden`}),l=(0,L.jsx)(Kr,{"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden size-4 shrink-0 group-aria-expanded/accordion-trigger:inline`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;t[11]!==n||t[12]!==a||t[13]!==s?(u=(0,L.jsxs)(av,{"data-slot":`accordion-trigger`,className:s,...a,children:[n,c,l]}),t[11]=n,t[12]=a,t[13]=s,t[14]=u):u=t[14];let d;return t[15]!==o||t[16]!==u?(d=(0,L.jsx)(tv,{className:o,children:u}),t[15]=o,t[16]=u,t[17]=d):d=t[17],d}function pv(e){let t=(0,z.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=E(`h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,r),t[4]=r,t[5]=a);let o;t[6]!==n||t[7]!==a?(o=(0,L.jsx)(`div`,{className:a,children:n}),t[6]=n,t[7]=a,t[8]=o):o=t[8];let s;return t[9]!==i||t[10]!==o?(s=(0,L.jsx)(lv,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up`,...i,children:o}),t[9]=i,t[10]=o,t[11]=s):s=t[11],s}function mv(){var e=[...arguments];return(0,R.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var hv=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function gv(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function _v(e){return`nodeType`in e}function vv(e){return e?gv(e)?e:_v(e)?e.ownerDocument?.defaultView??window:window:window}function yv(e){let{Document:t}=vv(e);return e instanceof t}function bv(e){return gv(e)?!1:e instanceof vv(e).HTMLElement}function xv(e){return e instanceof vv(e).SVGElement}function Sv(e){return e?gv(e)?e.document:_v(e)?yv(e)?e:bv(e)||xv(e)?e.ownerDocument:document:document:document}var Cv=hv?R.useLayoutEffect:R.useEffect;function wv(e){let t=(0,R.useRef)(e);return Cv(()=>{t.current=e}),(0,R.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Tv(){let e=(0,R.useRef)(null);return[(0,R.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,R.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Ev(e,t){t===void 0&&(t=[e]);let n=(0,R.useRef)(e);return Cv(()=>{n.current!==e&&(n.current=e)},t),n}function Dv(e,t){let n=(0,R.useRef)();return(0,R.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ov(e){let t=wv(e),n=(0,R.useRef)(null);return[n,(0,R.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function kv(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current}var Av={};function jv(e,t){return(0,R.useMemo)(()=>{if(t)return t;let n=Av[e]==null?0:Av[e]+1;return Av[e]=n,e+`-`+n},[e,t])}function Mv(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Nv=Mv(1),Pv=Mv(-1);function Fv(e){return`clientX`in e&&`clientY`in e}function Iv(e){if(!e)return!1;let{KeyboardEvent:t}=vv(e.target);return t&&e instanceof t}function Lv(e){if(!e)return!1;let{TouchEvent:t}=vv(e.target);return t&&e instanceof t}function Rv(e){if(Lv(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Fv(e)?{x:e.clientX,y:e.clientY}:null}var zv=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[zv.Translate.toString(e),zv.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Bv=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Vv(e){return e.matches(Bv)?e:e.querySelector(Bv)}var Hv={display:`none`};function Uv(e){let{id:t,value:n}=e;return R.createElement(`div`,{id:t,style:Hv},n)}function Wv(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return R.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Gv(){let[e,t]=(0,R.useState)(``);return{announce:(0,R.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var Kv=(0,R.createContext)(null);function qv(e){let t=(0,R.useContext)(Kv);(0,R.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Jv(){let[e]=(0,R.useState)(()=>new Set),t=(0,R.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,R.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Yv={draggable:`
|
|
231
|
+
To pick up a draggable item, press the space bar.
|
|
232
|
+
While dragging, use the arrow keys to move the item.
|
|
233
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
234
|
+
`},Xv={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Zv(e){let{announcements:t=Xv,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Yv}=e,{announce:a,announcement:o}=Gv(),s=jv(`DndLiveRegion`),[c,l]=(0,R.useState)(!1);if((0,R.useEffect)(()=>{l(!0)},[]),qv((0,R.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=R.createElement(R.Fragment,null,R.createElement(Uv,{id:r,value:i.draggable}),R.createElement(Wv,{id:s,announcement:o}));return n?(0,ii.createPortal)(u,n):u}var Qv;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Qv||={});function $v(){}function ey(e,t){return(0,R.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function ty(){var e=[...arguments];return(0,R.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var ny=Object.freeze({x:0,y:0});function ry(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function iy(e,t){let n=Rv(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function ay(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function oy(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function sy(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function cy(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var ly=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=cy(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=ry(cy(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(ay)};function uy(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var dy=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=uy(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(oy)};function fy(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function py(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ny}function my(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var hy=my(1);function gy(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _y(e,t,n){let r=gy(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var vy={ignoreTransform:!1};function yy(e,t){t===void 0&&(t=vy);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=vv(e).getComputedStyle(e);t&&(n=_y(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function by(e){return yy(e,{ignoreTransform:!0})}function xy(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Sy(e,t){return t===void 0&&(t=vv(e).getComputedStyle(e)),t.position===`fixed`}function Cy(e,t){t===void 0&&(t=vv(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function wy(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(yv(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!bv(i)||xv(i)||n.includes(i))return n;let a=vv(e).getComputedStyle(i);return i!==e&&Cy(i,a)&&n.push(i),Sy(i,a)?n:r(i.parentNode)}return e?r(e):n}function Ty(e){let[t]=wy(e,1);return t??null}function Ey(e){return!hv||!e?null:gv(e)?e:_v(e)?yv(e)||e===Sv(e).scrollingElement?window:bv(e)?e:null:null}function Dy(e){return gv(e)?e.scrollX:e.scrollLeft}function Oy(e){return gv(e)?e.scrollY:e.scrollTop}function ky(e){return{x:Dy(e),y:Oy(e)}}var Ay;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Ay||={});function jy(e){return!hv||!e?!1:e===document.scrollingElement}function My(e){let t={x:0,y:0},n=jy(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Ny={x:.2,y:.2};function Py(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Ny);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=My(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Ay.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Ay.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Ay.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Ay.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Fy(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Iy(e){return e.reduce((e,t)=>Nv(e,ky(t)),ny)}function Ly(e){return e.reduce((e,t)=>e+Dy(t),0)}function Ry(e){return e.reduce((e,t)=>e+Oy(t),0)}function zy(e,t){if(t===void 0&&(t=yy),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Ty(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var By=[[`x`,[`left`,`right`],Ly],[`y`,[`top`,`bottom`],Ry]],Vy=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=wy(t),r=Iy(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of By)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Hy=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Uy(e){let{EventTarget:t}=vv(e);return e instanceof t?e:Sv(e)}function Wy(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var Gy;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Gy||={});function Ky(e){e.preventDefault()}function qy(e){e.stopPropagation()}var Jy;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Jy||={});var Yy={start:[Jy.Space,Jy.Enter],cancel:[Jy.Esc],end:[Jy.Space,Jy.Enter,Jy.Tab]},Xy=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Jy.Right:return{...n,x:n.x+25};case Jy.Left:return{...n,x:n.x-25};case Jy.Down:return{...n,y:n.y+25};case Jy.Up:return{...n,y:n.y-25}}},Zy=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Hy(Sv(t)),this.windowListeners=new Hy(vv(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Gy.Resize,this.handleCancel),this.windowListeners.add(Gy.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Gy.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&zy(n),t(ny)}handleKeyDown(e){if(Iv(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Yy,coordinateGetter:a=Xy,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:ny;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=Pv(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=My(n),p=Fy(n),m={x:Math.min(i===Jy.Right?p.right-p.width/2:p.right,Math.max(i===Jy.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Jy.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Jy.Down?p.top:p.top+p.height/2,u.y))},h=i===Jy.Right&&!s||i===Jy.Left&&!c,g=i===Jy.Down&&!l||i===Jy.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Jy.Right&&e<=d.x||i===Jy.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Jy.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Jy.Down&&e<=d.y||i===Jy.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Jy.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Nv(Pv(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Zy.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Yy,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Qy(e){return!!(e&&`distance`in e)}function $y(e){return!!(e&&`delay`in e)}var eb=class{constructor(e,t,n){n===void 0&&(n=Uy(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Sv(i),this.documentListeners=new Hy(this.document),this.listeners=new Hy(n),this.windowListeners=new Hy(vv(i)),this.initialCoordinates=Rv(r)??ny,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Gy.Resize,this.handleCancel),this.windowListeners.add(Gy.DragStart,Ky),this.windowListeners.add(Gy.VisibilityChange,this.handleCancel),this.windowListeners.add(Gy.ContextMenu,Ky),this.documentListeners.add(Gy.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($y(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Qy(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Gy.Click,qy,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Gy.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Rv(e)??ny,s=Pv(n,o);if(!t&&a){if(Qy(a)){if(a.tolerance!=null&&Wy(s,a.tolerance))return this.handleCancel();if(Wy(s,a.distance))return this.handleStart()}if($y(a)&&Wy(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Jy.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},tb={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},nb=class extends eb{constructor(e){let{event:t}=e,n=Sv(t.target);super(e,tb,n)}};nb.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var rb={move:{name:`mousemove`},end:{name:`mouseup`}},ib;(function(e){e[e.RightClick=2]=`RightClick`})(ib||={});var ab=class extends eb{constructor(e){super(e,rb,Sv(e.event.target))}};ab.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ib.RightClick?!1:(r?.({event:n}),!0)}}];var ob={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},sb=class extends eb{constructor(e){super(e,ob)}static setup(){return window.addEventListener(ob.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ob.move.name,e)};function e(){}}};sb.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var cb;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(cb||={});var lb;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(lb||={});function ub(e){let{acceleration:t,activator:n=cb.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=lb.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=fb({delta:d,disabled:!a}),[m,h]=Tv(),g=(0,R.useRef)({x:0,y:0}),_=(0,R.useRef)({x:0,y:0}),v=(0,R.useMemo)(()=>{switch(n){case cb.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case cb.DraggableRect:return i}},[n,i,c]),y=(0,R.useRef)(null),b=(0,R.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,R.useMemo)(()=>s===lb.TreeOrder?[...l].reverse():l,[s,l]);(0,R.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=Py(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var db={x:{[Ay.Backward]:!1,[Ay.Forward]:!1},y:{[Ay.Backward]:!1,[Ay.Forward]:!1}};function fb(e){let{delta:t,disabled:n}=e,r=kv(t);return Dv(e=>{if(n||!r||!e)return db;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ay.Backward]:e.x[Ay.Backward]||i.x===-1,[Ay.Forward]:e.x[Ay.Forward]||i.x===1},y:{[Ay.Backward]:e.y[Ay.Backward]||i.y===-1,[Ay.Forward]:e.y[Ay.Forward]||i.y===1}}},[n,t,r])}function pb(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Dv(e=>t==null?null:r??e??null,[r,t])}function mb(e,t){return(0,R.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var hb;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(hb||={});var gb;(function(e){e.Optimized=`optimized`})(gb||={});var _b=new Map;function vb(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,R.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,R.useRef)(e),d=g(),f=Ev(d),p=(0,R.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,R.useRef)(null),h=Dv(t=>{if(d&&!n)return _b;if(!t||t===_b||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Vy(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,R.useEffect)(()=>{u.current=e},[e]),(0,R.useEffect)(()=>{d||p()},[n,d]),(0,R.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,R.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case hb.Always:return!1;case hb.BeforeDragging:return n;default:return!n}}}function yb(e,t){return Dv(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function bb(e,t){return yb(e,t)}function xb(e){let{callback:t,disabled:n}=e,r=wv(t),i=(0,R.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,R.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Sb(e){let{callback:t,disabled:n}=e,r=wv(t),i=(0,R.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,R.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Cb(e){return new Vy(yy(e),e)}function wb(e,t,n){t===void 0&&(t=Cb);let[r,i]=(0,R.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=xb({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Sb({callback:a});return Cv(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Tb(e){return py(e,yb(e))}var Eb=[];function Db(e){let t=(0,R.useRef)(e),n=Dv(n=>e?n&&n!==Eb&&e&&t.current&&e.parentNode===t.current.parentNode?n:wy(e):Eb,[e]);return(0,R.useEffect)(()=>{t.current=e},[e]),n}function Ob(e){let[t,n]=(0,R.useState)(null),r=(0,R.useRef)(e),i=(0,R.useCallback)(e=>{let t=Ey(e.target);t&&n(e=>e?(e.set(t,ky(t)),new Map(e)):null)},[]);return(0,R.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Ey(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,ky(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Ey(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,R.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Nv(e,t),ny):Iy(e):ny,[e,t])}function kb(e,t){t===void 0&&(t=[]);let n=(0,R.useRef)(null);return(0,R.useEffect)(()=>{n.current=null},t),(0,R.useEffect)(()=>{let t=e!==ny;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Pv(e,n.current):ny}function Ab(e){(0,R.useEffect)(()=>{if(!hv)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function jb(e,t){return(0,R.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Mb(e){return(0,R.useMemo)(()=>e?xy(e):null,[e])}var Nb=[];function Pb(e,t){t===void 0&&(t=yy);let[n]=e,r=Mb(n?vv(n):null),[i,a]=(0,R.useState)(Nb);function o(){a(()=>e.length?e.map(e=>jy(e)?r:new Vy(t(e),e)):Nb)}let s=Sb({callback:o});return Cv(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function Fb(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return bv(t)?t:e}function Ib(e){let{measure:t}=e,[n,r]=(0,R.useState)(null),i=Sb({callback:(0,R.useCallback)(e=>{for(let{target:n}of e)if(bv(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=Ov((0,R.useCallback)(e=>{let n=Fb(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,R.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Lb=[{sensor:nb,options:{}},{sensor:Zy,options:{}}],Rb={current:{}},zb={draggable:{measure:by},droppable:{measure:by,strategy:hb.WhileDragging,frequency:gb.Optimized},dragOverlay:{measure:yy}},Bb=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Vb={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bb,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$v},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zb,measureDroppableContainers:$v,windowRect:null,measuringScheduled:!1},Hb={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:$v,draggableNodes:new Map,over:null,measureDroppableContainers:$v},Ub=(0,R.createContext)(Hb),Wb=(0,R.createContext)(Vb);function Gb(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bb}}}function Kb(e,t){switch(t.type){case Qv.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Qv.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Qv.DragEnd:case Qv.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qv.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Bb(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Qv.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Bb(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Qv.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Bb(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function qb(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,R.useContext)(Ub),a=kv(r),o=kv(n?.id);return(0,R.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Iv(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Vv(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Jb(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Yb(e){return(0,R.useMemo)(()=>({draggable:{...zb.draggable,...e?.draggable},droppable:{...zb.droppable,...e?.droppable},dragOverlay:{...zb.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xb(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,R.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Cv(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=py(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Ty(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Zb=(0,R.createContext)({...ny,scaleX:1,scaleY:1}),Qb;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Qb||={});var $b=(0,R.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Lb,collisionDetection:o=dy,measuring:s,modifiers:c,...l}=e,[u,d]=(0,R.useReducer)(Kb,void 0,Gb),[f,p]=Jv(),[m,h]=(0,R.useState)(Qb.Uninitialized),g=m===Qb.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,R.useRef)({initial:null,translated:null}),C=(0,R.useMemo)(()=>_==null?null:{id:_,data:x?.data??Rb,rect:S},[_,x]),w=(0,R.useRef)(null),[T,E]=(0,R.useState)(null),[D,O]=(0,R.useState)(null),k=Ev(l,Object.values(l)),A=jv(`DndDescribedBy`,t),ee=(0,R.useMemo)(()=>b.getEnabled(),[b]),j=Yb(s),{droppableRects:M,measureDroppableContainers:te,measuringScheduled:ne}=vb(ee,{dragging:g,dependencies:[y.x,y.y],config:j.droppable}),N=pb(v,_),re=(0,R.useMemo)(()=>D?Rv(D):null,[D]),ie=Ne(),ae=bb(N,j.draggable.measure);Xb({activeNode:_==null?null:v.get(_),config:ie.layoutShiftCompensation,initialRect:ae,measure:j.draggable.measure});let P=wb(N,j.draggable.measure,ae),oe=wb(N?N.parentElement:null),se=(0,R.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:M,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=b.getNodeFor(se.current.over?.id),le=Ib({measure:j.dragOverlay.measure}),ue=le.nodeRef.current??N,de=g?le.rect??P:null,fe=!!(le.nodeRef.current&&le.rect),F=Tb(fe?null:P),pe=Mb(ue?vv(ue):null),me=Db(g?ce??N:null),he=Pb(me),ge=Jb(c,{transform:{x:y.x-F.x,y:y.y-F.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:P,containerNodeRect:oe,draggingNodeRect:de,over:se.current.over,overlayNodeRect:le.rect,scrollableAncestors:me,scrollableAncestorRects:he,windowRect:pe}),_e=re?Nv(re,y):null,ve=Ob(me),ye=kb(ve),be=kb(ve,[P]),xe=Nv(ge,ye),Se=de?hy(de,ge):null,Ce=C&&Se?o({active:C,collisionRect:Se,droppableRects:M,droppableContainers:ee,pointerCoordinates:_e}):null,we=sy(Ce,`id`),[Te,Ee]=(0,R.useState)(null),De=fy(fe?ge:Nv(ge,be),Te?.rect??null,P),Oe=(0,R.useRef)(null),ke=(0,R.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;Oe.current=new n({active:w.current,activeNode:i,event:a,options:r,context:se,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=k.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=k.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=k.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,ii.unstable_batchedUpdates)(()=>{r?.(i),h(Qb.Initializing),d({type:Qv.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(Oe.current),O(a)})},onMove(e){d({type:Qv.DragMove,coordinates:e})},onEnd:o(Qv.DragEnd),onCancel:o(Qv.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=se.current,o=null;if(t&&i){let{cancelDrop:s}=k.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Qv.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Qv.DragCancel)}w.current=null,(0,ii.unstable_batchedUpdates)(()=>{d({type:e}),h(Qb.Uninitialized),Ee(null),E(null),O(null),Oe.current=null;let t=e===Qv.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=k.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ae=mb(a,(0,R.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,ke(n,t))},[v,ke]));Ab(a),Cv(()=>{P&&m===Qb.Initializing&&h(Qb.Initialized)},[P,m]),(0,R.useEffect)(()=>{let{onDragMove:e}=k.current,{active:t,activatorEvent:n,collisions:r,over:i}=se.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:xe.x,y:xe.y},over:i};(0,ii.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[xe.x,xe.y]),(0,R.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=se.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=k.current,o=r.get(we),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,ii.unstable_batchedUpdates)(()=>{Ee(s),a?.(c),f({type:`onDragOver`,event:c})})},[we]),Cv(()=>{se.current={activatorEvent:D,active:C,activeNode:N,collisionRect:Se,collisions:Ce,droppableRects:M,draggableNodes:v,draggingNode:ue,draggingNodeRect:de,droppableContainers:b,over:Te,scrollableAncestors:me,scrollAdjustedTranslate:xe},S.current={initial:de,translated:Se}},[C,N,Ce,Se,v,ue,de,M,b,Te,me,xe]),ub({...ie,delta:y,draggingRect:Se,pointerCoordinates:_e,scrollableAncestors:me,scrollableAncestorRects:he});let je=(0,R.useMemo)(()=>({active:C,activeNode:N,activeNodeRect:P,activatorEvent:D,collisions:Ce,containerNodeRect:oe,dragOverlay:le,draggableNodes:v,droppableContainers:b,droppableRects:M,over:Te,measureDroppableContainers:te,scrollableAncestors:me,scrollableAncestorRects:he,measuringConfiguration:j,measuringScheduled:ne,windowRect:pe}),[C,N,P,D,Ce,oe,le,v,b,M,Te,te,me,he,j,ne,pe]),Me=(0,R.useMemo)(()=>({activatorEvent:D,activators:Ae,active:C,activeNodeRect:P,ariaDescribedById:{draggable:A},dispatch:d,draggableNodes:v,over:Te,measureDroppableContainers:te}),[D,Ae,C,P,d,A,v,Te,te]);return R.createElement(Kv.Provider,{value:p},R.createElement(Ub.Provider,{value:Me},R.createElement(Wb.Provider,{value:je},R.createElement(Zb.Provider,{value:De},i)),R.createElement(qb,{disabled:n?.restoreFocus===!1})),R.createElement(Zv,{...n,hiddenTextDescribedById:A}));function Ne(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),ex=(0,R.createContext)(null),tx=`button`,nx=`Draggable`;function rx(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=jv(nx),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,R.useContext)(Ub),{role:p=tx,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,R.useContext)(g?Zb:ex),[v,y]=Ov(),[b,x]=Ov(),S=jb(o,t),C=Ev(n);return Cv(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,R.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===tx?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function ix(){return(0,R.useContext)(Wb)}var ax=`Droppable`,ox={timeout:25};function sx(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=jv(ax),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,R.useContext)(Ub),u=(0,R.useRef)({disabled:n}),d=(0,R.useRef)(!1),f=(0,R.useRef)(null),p=(0,R.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...ox,...i},_=Ev(h??r),v=Sb({callback:(0,R.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Ov((0,R.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=Ev(t);return(0,R.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,R.useEffect)(()=>(s({type:Qv.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:Qv.UnregisterDroppable,key:a,id:r})),[r]),(0,R.useEffect)(()=>{n!==u.current.disabled&&(s({type:Qv.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function cx(e){let{animation:t,children:n}=e,[r,i]=(0,R.useState)(null),[a,o]=(0,R.useState)(null),s=kv(n);return!n&&!r&&s&&i(s),Cv(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),R.createElement(R.Fragment,null,n,r?(0,R.cloneElement)(r,{ref:o}):null)}var lx={x:0,y:0,scaleX:1,scaleY:1};function ux(e){let{children:t}=e;return R.createElement(Ub.Provider,{value:Hb},R.createElement(Zb.Provider,{value:lx},t))}var dx={position:`fixed`,touchAction:`none`},fx=e=>Iv(e)?`transform 250ms ease`:void 0,px=(0,R.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=fx}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...dx,width:s.width,height:s.height,top:s.top,left:s.left,transform:zv.Transform.toString(d),transformOrigin:i&&r?iy(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return R.createElement(n,{className:o,style:f,ref:t},a)}),mx={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:zv.Transform.toString(t)},{transform:zv.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function hx(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return wv((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=Fb(a);if(!c)return;let{transform:l}=vv(a).getComputedStyle(a),u=gy(l);if(!u)return;let d=typeof t==`function`?t:gx(t);return zy(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function gx(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...mx,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var _x=0;function vx(e){return(0,R.useMemo)(()=>{if(e!=null)return _x++,_x},[e])}var yx=R.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=ix(),S=(0,R.useContext)(Zb),C=vx(d?.id),w=Jb(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=yb(f),E=hx({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return R.createElement(ux,null,R.createElement(cx,{animation:E},d&&C?R.createElement(px,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function bx(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function xx(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Sx(e){return e!==null&&e>=0}function Cx(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function wx(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var Tx={scaleX:1,scaleY:1},Ex=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=Dx(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...Tx}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...Tx}:a<r&&a>=i?{x:o.width+s,y:0,...Tx}:{x:0,y:0,...Tx}};function Dx(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var Ox=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=bx(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},kx={scaleX:1,scaleY:1},Ax=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...kx}:null}let s=jx(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...kx}:r<t&&r>=a?{x:0,y:o.height+s,...kx}:{x:0,y:0,...kx}};function jx(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var Mx=`Sortable`,Nx=R.createContext({activeIndex:-1,containerId:Mx,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ox,disabled:{draggable:!1,droppable:!1}});function Px(e){let{children:t,id:n,items:r,strategy:i=Ox,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=ix(),d=jv(Mx,n),f=s.rect!==null,p=(0,R.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,R.useRef)(p),v=!Cx(p,_.current),y=g!==-1&&h===-1||v,b=wx(a);Cv(()=>{v&&m&&u(p)},[v,p,m,u]),(0,R.useEffect)(()=>{_.current=p},[p]);let x=(0,R.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:xx(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return R.createElement(Nx.Provider,{value:x},t)}var Fx=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return bx(n,r,i).indexOf(t)},Ix=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Lx={duration:200,easing:`ease`},Rx=`transform`,zx=zv.Transition.toString({property:Rx,duration:0,easing:`linear`}),Bx={roleDescription:`sortable`};function Vx(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,R.useState)(null),s=(0,R.useRef)(n);return Cv(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=yy(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,R.useEffect)(()=>{a&&o(null)},[a]),a}function Hx(e){let{animateLayoutChanges:t=Ix,attributes:n,disabled:r,data:i,getNewIndex:a=Fx,id:o,strategy:s,resizeObserverConfig:c,transition:l=Lx}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,R.useContext)(Nx),y=Ux(r,p),b=u.indexOf(o),x=(0,R.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,R.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=sx({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:k,attributes:A,setNodeRef:ee,listeners:j,isDragging:M,over:te,setActivatorNodeRef:ne,transform:N}=rx({id:o,data:x,attributes:{...Bx,...n},disabled:y.draggable}),re=mv(E,ee),ie=!!D,ae=ie&&!m&&Sx(f)&&Sx(g),P=!_&&M,oe=ae?(P&&ae?N:null)??(s??v)({rects:h,activeNodeRect:k,activeIndex:f,overIndex:g,index:b}):null,se=Sx(f)&&Sx(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ce=D?.id,le=(0,R.useRef)({activeId:ce,items:u,newIndex:se,containerId:d}),ue=u!==le.current.items,de=t({active:D,containerId:d,isDragging:M,isSorting:ie,id:o,index:b,items:u,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:l,wasDragging:le.current.activeId!=null}),fe=Vx({disabled:!de,index:b,node:w,rect:C});return(0,R.useEffect)(()=>{ie&&le.current.newIndex!==se&&(le.current.newIndex=se),d!==le.current.containerId&&(le.current.containerId=d),u!==le.current.items&&(le.current.items=u)},[ie,se,d,u]),(0,R.useEffect)(()=>{if(ce===le.current.activeId)return;if(ce!=null&&le.current.activeId==null){le.current.activeId=ce;return}let e=setTimeout(()=>{le.current.activeId=ce},50);return()=>clearTimeout(e)},[ce]),{active:D,activeIndex:f,attributes:A,data:x,rect:C,index:b,newIndex:se,items:u,isOver:T,isSorting:ie,isDragging:M,listeners:j,node:w,overIndex:g,over:te,setNodeRef:re,setActivatorNodeRef:ne,setDroppableNodeRef:E,setDraggableNodeRef:ee,transform:fe??oe,transition:F()};function F(){if(fe||ue&&le.current.newIndex===b)return zx;if(!(P&&!Iv(O)||!l)&&(ie||de))return zv.Transition.toString({...l,property:Rx})}}function Ux(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}Jy.Down,Jy.Right,Jy.Up,Jy.Left;var Wx=1,Gx=.9,Kx=.8,qx=.17,Jx=.1,Yx=.999,Xx=.9999,Zx=.99,Qx=/[\\\/_+.#"@\[\(\{&]/,$x=/[\\\/_+.#"@\[\(\{&]/g,eS=/[\s-]/,tS=/[\s-]/g;function nS(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Wx:Zx;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=nS(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Wx:Qx.test(e.charAt(l-1))?(d*=Kx,p=e.slice(i,l-1).match($x),p&&i>0&&(d*=Yx**+p.length)):eS.test(e.charAt(l-1))?(d*=Gx,m=e.slice(i,l-1).match(tS),m&&i>0&&(d*=Yx**+m.length)):(d*=qx,i>0&&(d*=Yx**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Xx)),(d<Jx&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=nS(e,t,n,r,l+1,a+2,o),f*Jx>d&&(d=f*Jx)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function rS(e){return e.toLowerCase().replace(tS,` `)}function iS(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,nS(e,t,rS(e),rS(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function aS(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function oS(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sS(...e){return t=>{let n=!1,r=e.map(e=>{let r=oS(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():oS(e[t],null)}}}}function cS(...e){return R.useCallback(sS(...e),e)}function lS(e,t){let n=R.createContext(t),r=e=>{let{children:t,...r}=e,i=R.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=R.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function uS(e,t=[]){let n=[];function r(t,r){let i=R.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=R.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=R.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>R.createContext(e));return function(n){let r=n?.[e]||t;return R.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,dS(i,...t)]}function dS(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var fS=globalThis?.document?R.useLayoutEffect:()=>{},pS=R.useId||(()=>void 0),mS=0;function hS(e){let[t,n]=R.useState(pS());return fS(()=>{e||n(e=>e??String(mS++))},[e]),e||(t?`radix-${t}`:``)}var gS=R.useInsertionEffect||fS;function _S({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=vS({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=R.useRef(e!==void 0);R.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,R.useCallback(t=>{if(s){let n=yS(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function vS({defaultProp:e,onChange:t}){let[n,r]=R.useState(e),i=R.useRef(n),a=R.useRef(t);return gS(()=>{a.current=t},[t]),R.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function yS(e){return typeof e==`function`}function bS(e){let t=xS(e),n=R.forwardRef((e,n)=>{let{children:r,...i}=e,a=R.Children.toArray(r),o=a.find(CS);if(o){let e=o.props.children,r=a.map(t=>t===o?R.Children.count(e)>1?R.Children.only(null):R.isValidElement(e)?e.props.children:null:t);return(0,L.jsx)(t,{...i,ref:n,children:R.isValidElement(e)?R.cloneElement(e,void 0,r):null})}return(0,L.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function xS(e){let t=R.forwardRef((e,t)=>{let{children:n,...r}=e;if(R.isValidElement(n)){let e=TS(n),i=wS(r,n.props);return n.type!==R.Fragment&&(i.ref=t?sS(t,e):e),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SS=Symbol(`radix.slottable`);function CS(e){return R.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===SS}function wS(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function TS(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ES=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=bS(`Primitive.${t}`),r=R.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function DS(e,t){e&&ii.flushSync(()=>e.dispatchEvent(t))}function OS(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...e)=>t.current?.(...e),[])}function kS(e,t=globalThis?.document){let n=OS(e);R.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var AS=`DismissableLayer`,jS=`dismissableLayer.update`,MS=`dismissableLayer.pointerDownOutside`,NS=`dismissableLayer.focusOutside`,PS,FS=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),IS=R.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=R.useContext(FS),[u,d]=R.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=R.useState({}),m=cS(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=zS(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=BS(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return kS(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),R.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(PS=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),VS(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=PS)}},[u,f,n,l]),R.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),VS())},[u,l]),R.useEffect(()=>{let e=()=>p({});return document.addEventListener(jS,e),()=>document.removeEventListener(jS,e)},[]),(0,L.jsx)(ES.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:aS(e.onFocusCapture,S.onFocusCapture),onBlurCapture:aS(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:aS(e.onPointerDownCapture,x.onPointerDownCapture)})});IS.displayName=AS;var LS=`DismissableLayerBranch`,RS=R.forwardRef((e,t)=>{let n=R.useContext(FS),r=R.useRef(null),i=cS(t,r);return R.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,L.jsx)(ES.div,{...e,ref:i})});RS.displayName=LS;function zS(e,t=globalThis?.document){let n=OS(e),r=R.useRef(!1),i=R.useRef(()=>{});return R.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){HS(MS,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function BS(e,t=globalThis?.document){let n=OS(e),r=R.useRef(!1);return R.useEffect(()=>{let e=e=>{e.target&&!r.current&&HS(NS,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VS(){let e=new CustomEvent(jS);document.dispatchEvent(e)}function HS(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?DS(i,a):i.dispatchEvent(a)}var US=`focusScope.autoFocusOnMount`,WS=`focusScope.autoFocusOnUnmount`,GS={bubbles:!1,cancelable:!0},KS=`FocusScope`,qS=R.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=R.useState(null),l=OS(i),u=OS(a),d=R.useRef(null),f=cS(t,e=>c(e)),p=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:eC(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||eC(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&eC(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),R.useEffect(()=>{if(s){tC.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(US,GS);s.addEventListener(US,l),s.dispatchEvent(t),t.defaultPrevented||(JS(iC(XS(s)),{select:!0}),document.activeElement===e&&eC(s))}return()=>{s.removeEventListener(US,l),setTimeout(()=>{let t=new CustomEvent(WS,GS);s.addEventListener(WS,u),s.dispatchEvent(t),t.defaultPrevented||eC(e??document.body,{select:!0}),s.removeEventListener(WS,u),tC.remove(p)},0)}}},[s,l,u,p]);let m=R.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=YS(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&eC(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&eC(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(ES.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});qS.displayName=KS;function JS(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eC(r,{select:t}),document.activeElement!==n)return}function YS(e){let t=XS(e);return[ZS(t,e),ZS(t.reverse(),e)]}function XS(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ZS(e,t){for(let n of e)if(!QS(n,{upTo:t}))return n}function QS(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function $S(e){return e instanceof HTMLInputElement&&`select`in e}function eC(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$S(e)&&t&&e.select()}}var tC=nC();function nC(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=rC(e,t),e.unshift(t)},remove(t){e=rC(e,t),e[0]?.resume()}}}function rC(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iC(e){return e.filter(e=>e.tagName!==`A`)}var aC=`Portal`,oC=R.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=R.useState(!1);fS(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ii.createPortal((0,L.jsx)(ES.div,{...r,ref:t}),o):null});oC.displayName=aC;function sC(e,t){return R.useReducer((e,n)=>t[e][n]??e,e)}var cC=e=>{let{present:t,children:n}=e,r=lC(t),i=typeof n==`function`?n({present:r.isPresent}):R.Children.only(n),a=cS(r.ref,dC(i));return typeof n==`function`||r.isPresent?R.cloneElement(i,{ref:a}):null};cC.displayName=`Presence`;function lC(e){let[t,n]=R.useState(),r=R.useRef(null),i=R.useRef(e),a=R.useRef(`none`),[o,s]=sC(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return R.useEffect(()=>{let e=uC(r.current);a.current=o===`mounted`?e:`none`},[o]),fS(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=uC(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),fS(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=uC(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=uC(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:R.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function uC(e){return e?.animationName||`none`}function dC(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fC=0;function pC(){R.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??mC()),document.body.insertAdjacentElement(`beforeend`,e[1]??mC()),fC++,()=>{fC===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),fC--}},[])}function mC(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var hC=function(){return hC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hC.apply(this,arguments)};function gC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _C(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var vC=`right-scroll-bar-position`,yC=`width-before-scroll-bar`,bC=`with-scroll-bars-hidden`,xC=`--removed-body-scroll-bar-size`;function SC(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function CC(e,t){var n=(0,R.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var wC=typeof window<`u`?R.useLayoutEffect:R.useEffect,TC=new WeakMap;function EC(e,t){var n=CC(t||null,function(t){return e.forEach(function(e){return SC(e,t)})});return wC(function(){var t=TC.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||SC(e,null)}),i.forEach(function(e){r.has(e)||SC(e,a)})}TC.set(n,e)},[e]),n}function DC(e){return e}function OC(e,t){t===void 0&&(t=DC);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function kC(e){e===void 0&&(e={});var t=OC(null);return t.options=hC({async:!0,ssr:!1},e),t}var AC=function(e){var t=e.sideCar,n=gC(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return R.createElement(r,hC({},n))};AC.isSideCarExport=!0;function jC(e,t){return e.useMedium(t),AC}var MC=kC(),NC=function(){},PC=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:NC,onWheelCapture:NC,onTouchMoveCapture:NC}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=gC(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=EC([n,t]),C=hC(hC({},b),i);return R.createElement(R.Fragment,null,u&&R.createElement(x,{sideCar:MC,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?R.cloneElement(R.Children.only(s),hC(hC({},C),{ref:S})):R.createElement(v,hC({},C,{className:c,ref:S}),s))});PC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},PC.classNames={fullWidth:yC,zeroRight:vC};var FC,IC=function(){if(FC)return FC;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function LC(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=IC();return t&&e.setAttribute(`nonce`,t),e}function RC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zC(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var BC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=LC())&&(RC(t,n),zC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VC=function(){var e=BC();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},HC=function(){var e=VC();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},UC={left:0,top:0,right:0,gap:0},WC=function(e){return parseInt(e||``,10)||0},GC=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[WC(n),WC(r),WC(i)]},KC=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return UC;var t=GC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qC=HC(),JC=`data-scroll-locked`,YC=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
235
|
+
.${bC} {
|
|
236
|
+
overflow: hidden ${r};
|
|
237
|
+
padding-right: ${s}px ${r};
|
|
238
|
+
}
|
|
239
|
+
body[${JC}] {
|
|
240
|
+
overflow: hidden ${r};
|
|
241
|
+
overscroll-behavior: contain;
|
|
242
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
243
|
+
padding-left: ${i}px;
|
|
244
|
+
padding-top: ${a}px;
|
|
245
|
+
padding-right: ${o}px;
|
|
246
|
+
margin-left:0;
|
|
247
|
+
margin-top:0;
|
|
248
|
+
margin-right: ${s}px ${r};
|
|
249
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.${vC} {
|
|
253
|
+
right: ${s}px ${r};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.${yC} {
|
|
257
|
+
margin-right: ${s}px ${r};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.${vC} .${vC} {
|
|
261
|
+
right: 0 ${r};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.${yC} .${yC} {
|
|
265
|
+
margin-right: 0 ${r};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
body[${JC}] {
|
|
269
|
+
${xC}: ${s}px;
|
|
270
|
+
}
|
|
271
|
+
`},XC=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ZC=function(){R.useEffect(function(){return document.body.setAttribute(JC,(XC()+1).toString()),function(){var e=XC()-1;e<=0?document.body.removeAttribute(JC):document.body.setAttribute(JC,e.toString())}},[])},QC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ZC();var a=R.useMemo(function(){return KC(i)},[i]);return R.createElement(qC,{styles:YC(a,!t,i,n?``:`!important`)})},$C=!1;if(typeof window<`u`)try{var ew=Object.defineProperty({},`passive`,{get:function(){return $C=!0,!0}});window.addEventListener(`test`,ew,ew),window.removeEventListener(`test`,ew,ew)}catch{$C=!1}var tw=$C?{passive:!1}:!1,nw=function(e){return e.tagName===`TEXTAREA`},rw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!nw(e)&&n[t]===`visible`)},iw=function(e){return rw(e,`overflowY`)},aw=function(e){return rw(e,`overflowX`)},ow=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),lw(e,r)){var i=uw(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sw=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},cw=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},lw=function(e,t){return e===`v`?iw(t):aw(t)},uw=function(e,t){return e===`v`?sw(t):cw(t)},dw=function(e,t){return e===`h`&&t===`rtl`?-1:1},fw=function(e,t,n,r,i){var a=dw(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=uw(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&lw(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},pw=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mw=function(e){return[e.deltaX,e.deltaY]},hw=function(e){return e&&`current`in e?e.current:e},gw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_w=function(e){return`
|
|
272
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
273
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
274
|
+
`},vw=0,yw=[];function bw(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),i=R.useState(vw++)[0],a=R.useState(HC)[0],o=R.useRef(e);R.useEffect(function(){o.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=_C([e.lockRef.current],(e.shards||[]).map(hw),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=R.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=pw(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ow(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ow(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return fw(h,t,e,h===`h`?s:c,!0)},[]),c=R.useCallback(function(e){var n=e;if(!(!yw.length||yw[yw.length-1]!==a)){var r=`deltaY`in n?mw(n):pw(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&gw(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(hw).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=R.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:xw(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=R.useCallback(function(e){n.current=pw(e),r.current=void 0},[]),d=R.useCallback(function(t){l(t.type,mw(t),t.target,s(t,e.lockRef.current))},[]),f=R.useCallback(function(t){l(t.type,pw(t),t.target,s(t,e.lockRef.current))},[]);R.useEffect(function(){return yw.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,tw),document.addEventListener(`touchmove`,c,tw),document.addEventListener(`touchstart`,u,tw),function(){yw=yw.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,tw),document.removeEventListener(`touchmove`,c,tw),document.removeEventListener(`touchstart`,u,tw)}},[]);var p=e.removeScrollBar,m=e.inert;return R.createElement(R.Fragment,null,m?R.createElement(a,{styles:_w(i)}):null,p?R.createElement(QC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Sw=jC(MC,bw),Cw=R.forwardRef(function(e,t){return R.createElement(PC,hC({},e,{ref:t,sideCar:Sw}))});Cw.classNames=PC.classNames;var ww=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Tw=new WeakMap,Ew=new WeakMap,Dw={},Ow=0,kw=function(e){return e&&(e.host||kw(e.parentNode))},Aw=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=kw(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},jw=function(e,t,n,r){var i=Aw(t,Array.isArray(e)?e:[e]);Dw[n]||(Dw[n]=new WeakMap);var a=Dw[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Tw.get(e)||0)+1,l=(a.get(e)||0)+1;Tw.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ew.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ow++,function(){o.forEach(function(e){var t=Tw.get(e)-1,i=a.get(e)-1;Tw.set(e,t),a.set(e,i),t||(Ew.has(e)||e.removeAttribute(r),Ew.delete(e)),i||e.removeAttribute(n)}),Ow--,Ow||(Tw=new WeakMap,Tw=new WeakMap,Ew=new WeakMap,Dw={})}},Mw=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ww(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),jw(r,i,n,`aria-hidden`)):function(){return null}},Nw=`Dialog`,[Pw,Fw]=uS(Nw),[Iw,Lw]=Pw(Nw),Rw=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=R.useRef(null),c=R.useRef(null),[l,u]=_S({prop:r,defaultProp:i??!1,onChange:a,caller:Nw});return(0,L.jsx)(Iw,{scope:t,triggerRef:s,contentRef:c,contentId:hS(),titleId:hS(),descriptionId:hS(),open:l,onOpenChange:u,onOpenToggle:R.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Rw.displayName=Nw;var zw=`DialogTrigger`,Bw=R.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Lw(zw,n),a=cS(t,i.triggerRef);return(0,L.jsx)(ES.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":oT(i.open),...r,ref:a,onClick:aS(e.onClick,i.onOpenToggle)})});Bw.displayName=zw;var Vw=`DialogPortal`,[Hw,Uw]=Pw(Vw,{forceMount:void 0}),Ww=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Lw(Vw,t);return(0,L.jsx)(Hw,{scope:t,forceMount:n,children:R.Children.map(r,e=>(0,L.jsx)(cC,{present:n||a.open,children:(0,L.jsx)(oC,{asChild:!0,container:i,children:e})}))})};Ww.displayName=Vw;var Gw=`DialogOverlay`,Kw=R.forwardRef((e,t)=>{let n=Uw(Gw,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lw(Gw,e.__scopeDialog);return a.modal?(0,L.jsx)(cC,{present:r||a.open,children:(0,L.jsx)(Jw,{...i,ref:t})}):null});Kw.displayName=Gw;var qw=bS(`DialogOverlay.RemoveScroll`),Jw=R.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Lw(Gw,n);return(0,L.jsx)(Cw,{as:qw,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(ES.div,{"data-state":oT(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Yw=`DialogContent`,Xw=R.forwardRef((e,t)=>{let n=Uw(Yw,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lw(Yw,e.__scopeDialog);return(0,L.jsx)(cC,{present:r||a.open,children:a.modal?(0,L.jsx)(Zw,{...i,ref:t}):(0,L.jsx)(Qw,{...i,ref:t})})});Xw.displayName=Yw;var Zw=R.forwardRef((e,t)=>{let n=Lw(Yw,e.__scopeDialog),r=R.useRef(null),i=cS(t,n.contentRef,r);return R.useEffect(()=>{let e=r.current;if(e)return Mw(e)},[]),(0,L.jsx)($w,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aS(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:aS(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:aS(e.onFocusOutside,e=>e.preventDefault())})}),Qw=R.forwardRef((e,t)=>{let n=Lw(Yw,e.__scopeDialog),r=R.useRef(!1),i=R.useRef(!1);return(0,L.jsx)($w,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),$w=R.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Lw(Yw,n),c=R.useRef(null),l=cS(t,c);return pC(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(qS,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(IS,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":oT(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(uT,{titleId:s.titleId}),(0,L.jsx)(fT,{contentRef:c,descriptionId:s.descriptionId})]})]})}),eT=`DialogTitle`,tT=R.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Lw(eT,n);return(0,L.jsx)(ES.h2,{id:i.titleId,...r,ref:t})});tT.displayName=eT;var nT=`DialogDescription`,rT=R.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Lw(nT,n);return(0,L.jsx)(ES.p,{id:i.descriptionId,...r,ref:t})});rT.displayName=nT;var iT=`DialogClose`,aT=R.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Lw(iT,n);return(0,L.jsx)(ES.button,{type:`button`,...r,ref:t,onClick:aS(e.onClick,()=>i.onOpenChange(!1))})});aT.displayName=iT;function oT(e){return e?`open`:`closed`}var sT=`DialogTitleWarning`,[cT,lT]=lS(sT,{contentName:Yw,titleName:eT,docsSlug:`dialog`}),uT=({titleId:e})=>{let t=lT(sT),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
275
|
+
|
|
276
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
277
|
+
|
|
278
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return R.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},dT=`DialogDescriptionWarning`,fT=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lT(dT).contentName}}.`;return R.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},pT=Rw,mT=Bw,hT=Ww,gT=Kw,_T=Xw,vT=tT,yT=rT,bT=aT,xT=Symbol.for(`react.lazy`),ST=R.use;function CT(e){return typeof e==`object`&&!!e&&`then`in e}function wT(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===xT&&`_payload`in e&&CT(e._payload)}function TT(e){let t=ET(e),n=R.forwardRef((e,n)=>{let{children:r,...i}=e;wT(r)&&typeof ST==`function`&&(r=ST(r._payload));let a=R.Children.toArray(r),o=a.find(OT);if(o){let e=o.props.children,r=a.map(t=>t===o?R.Children.count(e)>1?R.Children.only(null):R.isValidElement(e)?e.props.children:null:t);return(0,L.jsx)(t,{...i,ref:n,children:R.isValidElement(e)?R.cloneElement(e,void 0,r):null})}return(0,L.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ET(e){let t=R.forwardRef((e,t)=>{let{children:n,...r}=e;if(wT(n)&&typeof ST==`function`&&(n=ST(n._payload)),R.isValidElement(n)){let e=AT(n),i=kT(r,n.props);return n.type!==R.Fragment&&(i.ref=t?sS(t,e):e),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DT=Symbol(`radix.slottable`);function OT(e){return R.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===DT}function kT(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function AT(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jT=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=TT(`Primitive.${t}`),r=R.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),MT=`[cmdk-group=""]`,NT=`[cmdk-group-items=""]`,PT=`[cmdk-group-heading=""]`,FT=`[cmdk-item=""]`,IT=`${FT}:not([aria-disabled="true"])`,LT=`cmdk-item-select`,RT=`data-value`,zT=(e,t,n)=>iS(e,t,n),BT=R.createContext(void 0),VT=()=>R.useContext(BT),HT=R.createContext(void 0),UT=()=>R.useContext(HT),WT=R.createContext(void 0),GT=R.forwardRef((e,t)=>{let n=aE(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=aE(()=>new Set),i=aE(()=>new Map),a=aE(()=>new Map),o=aE(()=>new Set),s=rE(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=hS(),y=hS(),b=hS(),x=R.useRef(null),S=cE();iE(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),iE(()=>{S(6,k)},[]);let C=R.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=R.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??zT;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;ee().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(NT);t?t.appendChild(e.parentElement===t?e:e.closest(`${NT} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${NT} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${MT}[${RT}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=ee().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(RT);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(MT)?.querySelector(PT))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${FT}[aria-selected="true"]`)}function ee(){return Array.from(x.current?.querySelectorAll(IT)||[])}function j(e){let t=ee()[e];t&&C.setState(`value`,t.getAttribute(RT))}function M(e){var t;let n=A(),r=ee(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(RT))}function te(e){let t=A()?.closest(MT),n;for(;t&&!n;)t=e>0?tE(t,MT):nE(t,MT),n=t?.querySelector(IT);n?C.setState(`value`,n.getAttribute(RT)):M(e)}let ne=()=>j(ee().length-1),N=e=>{e.preventDefault(),e.metaKey?ne():e.altKey?te(1):M(1)},re=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?te(-1):M(-1)};return R.createElement(jT.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&N(e);break;case`ArrowDown`:N(e);break;case`p`:case`k`:g&&e.ctrlKey&&re(e);break;case`ArrowUp`:re(e);break;case`Home`:e.preventDefault(),j(0);break;case`End`:e.preventDefault(),ne();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(LT);t.dispatchEvent(e)}}}}},R.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:dE},c),uE(e,e=>R.createElement(HT.Provider,{value:C},R.createElement(BT.Provider,{value:w},e))))}),KT=R.forwardRef((e,t)=>{let n=hS(),r=R.useRef(null),i=R.useContext(WT),a=VT(),o=rE(e),s=o.current?.forceMount??i?.forceMount;iE(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=sE(n,r,[e.value,e.children,r],e.keywords),l=UT(),u=oE(e=>e.value&&e.value===c.current),d=oE(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);R.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(LT,f),()=>t.removeEventListener(LT,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return R.createElement(jT.div,{ref:sS(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),qT=R.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=hS(),s=R.useRef(null),c=R.useRef(null),l=hS(),u=VT(),d=oE(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);iE(()=>u.group(o),[]),sE(o,s,[e.value,e.heading,c]);let f=R.useMemo(()=>({id:o,forceMount:i}),[i]);return R.createElement(jT.div,{ref:sS(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&R.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),uE(e,e=>R.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},R.createElement(WT.Provider,{value:f},e))))}),JT=R.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=R.useRef(null),a=oE(e=>!e.search);return!n&&!a?null:R.createElement(jT.div,{ref:sS(i,t),...r,"cmdk-separator":``,role:`separator`})}),YT=R.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=UT(),o=oE(e=>e.search),s=oE(e=>e.selectedItemId),c=VT();return R.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),R.createElement(jT.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),XT=R.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=R.useRef(null),o=R.useRef(null),s=oE(e=>e.selectedItemId),c=VT();return R.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),R.createElement(jT.div,{ref:sS(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},uE(e,e=>R.createElement(`div`,{ref:sS(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),ZT=R.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return R.createElement(pT,{open:n,onOpenChange:r},R.createElement(hT,{container:o},R.createElement(gT,{"cmdk-overlay":``,className:i}),R.createElement(_T,{"aria-label":e.label,"cmdk-dialog":``,className:a},R.createElement(GT,{ref:t,...s}))))}),QT=R.forwardRef((e,t)=>oE(e=>e.filtered.count===0)?R.createElement(jT.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),$T=R.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return R.createElement(jT.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},uE(e,e=>R.createElement(`div`,{"aria-hidden":!0},e)))}),eE=Object.assign(GT,{List:XT,Item:KT,Input:YT,Group:qT,Separator:JT,Dialog:ZT,Empty:QT,Loading:$T});function tE(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function nE(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function rE(e){let t=R.useRef(e);return iE(()=>{t.current=e}),t}var iE=typeof window>`u`?R.useEffect:R.useLayoutEffect;function aE(e){let t=R.useRef();return t.current===void 0&&(t.current=e()),t}function oE(e){let t=UT(),n=()=>e(t.snapshot());return R.useSyncExternalStore(t.subscribe,n,n)}function sE(e,t,n,r=[]){let i=R.useRef(),a=VT();return iE(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(RT,s),i.current=s}),i}var cE=()=>{let[e,t]=R.useState(),n=aE(()=>new Map);return iE(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function lE(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function uE({asChild:e,children:t},n){return e&&R.isValidElement(t)?R.cloneElement(lE(t),{ref:t.ref},n(t.props.children)):n(t)}var dE={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},fE=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),pE={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},mE={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},hE={disabled:!1,...mE},gE={valid(e){return e===null?null:e?{[fE.valid]:``}:{[fE.invalid]:``}}},_E=R.createContext({invalid:void 0,name:void 0,validityData:{state:pE,errors:[],error:``,value:``,initialValue:null},setValidityData:ae,disabled:void 0,touched:mE.touched,setTouched:ae,dirty:mE.dirty,setDirty:ae,filled:mE.filled,setFilled:ae,focused:mE.focused,setFocused:ae,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:hE,markedDirtyRef:{current:!1},registerFieldControl:ae,validation:{getValidationProps:(e=m)=>e,getInputValidationProps:(e=m)=>e,inputRef:{current:null},commit:async()=>{}}});function vE(e=!0){let t=R.useContext(_E);if(t.setValidityData===ae&&!e)throw Error(mt(28));return t}var yE=R.createContext({controlId:void 0,registerControlId:ae,labelId:void 0,setLabelId:ae,messageIds:[],setMessageIds:ae,getDescriptionProps:e=>e});function bE(){return R.useContext(yE)}function xE(e,t){let{enabled:n=!0,getValue:r,id:i,value:a}=t,{registerFieldControl:o}=vE(),s=R.useRef(null);s.current||=Symbol(),Ze(()=>{let t=s.current;if(!(!t||!n))return o(t,{controlRef:e,getValue:r,id:i,value:a}),()=>{o(t,void 0)}},[e,n,r,i,o,a])}function SE(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=bE(),o=de(t),s=n?i:void 0,c=et(()=>Symbol(`labelable-control`)),l=R.useRef(!1),u=R.useRef(t!=null),d=ke(()=>{!l.current||a===ae||(l.current=!1,a(c.current,void 0))});return Ze(()=>{if(a===ae)return;let e;if(n){let n=r?.current;e=Dt(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),R.useEffect(()=>d,[d]),i??o}var CE=R.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=vE(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=bE(),O=SE({id:i});Ze(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let k=R.useRef(null);Ze(()=>{u&&k.current===Ne(Ee(k.current))&&y(!0)},[u,y]);let[A]=O_({controlled:o,default:l,name:`FieldControl`,state:`value`}),ee=o!==void 0,j=ee?A:void 0,M=ke(()=>S.inputRef.current?.value);return xE(S.inputRef,{id:O,value:j,getValue:M}),N(`input`,e,{ref:[t,k],state:T,props:[{id:O,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...ee?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,St(D,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:gE})}),wE=R.forwardRef(function(e,t){return(0,L.jsx)(CE,{ref:t,...e})});function TE(e){let t=(0,z.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=E(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,L.jsx)(wE,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}function EE(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`textarea`,{"data-slot":`textarea`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function DE(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var OE=dn(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function kE(e){let t=(0,z.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=E(OE({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,L.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":a,className:o,onClick:jE,onKeyDown:AE,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function AE(e){e.key!==`Enter`&&e.key!==` `||e.currentTarget.parentElement?.querySelector(`input`)?.focus()}function jE(e){e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()}dn(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function ME(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(eE,{"data-slot":`command`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function NE(e){let t=(0,z.c)(26),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({title:o,description:s,children:n,className:r,showCloseButton:c,initialFocus:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=o===void 0?`Command Palette`:o,u=s===void 0?`Search for a command to run...`:s,d=c===void 0?!1:c,f;t[8]===l?f=t[9]:(f=(0,L.jsx)(zt,{children:l}),t[8]=l,t[9]=f);let p;t[10]===u?p=t[11]:(p=(0,L.jsx)(un,{children:u}),t[10]=u,t[11]=p);let m;t[12]!==f||t[13]!==p?(m=(0,L.jsxs)(ln,{className:`sr-only`,children:[f,p]}),t[12]=f,t[13]=p,t[14]=m):m=t[14];let h;t[15]===r?h=t[16]:(h=E(`overflow-hidden rounded-xl! p-0`,r),t[15]=r,t[16]=h);let g;t[17]!==n||t[18]!==i||t[19]!==d||t[20]!==h?(g=(0,L.jsx)(cn,{className:h,showCloseButton:d,initialFocus:i,children:n}),t[17]=n,t[18]=i,t[19]=d,t[20]=h,t[21]=g):g=t[21];let _;return t[22]!==a||t[23]!==m||t[24]!==g?(_=(0,L.jsxs)(Yt,{...a,children:[m,g]}),t[22]=a,t[23]=m,t[24]=g,t[25]=_):_=t[25],_}function PE(e){let t=(0,z.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;t[5]!==r||t[6]!==i?(a=(0,L.jsx)(eE.Input,{"data-slot":`command-input`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7];let o;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(kE,{children:(0,L.jsx)(ti,{className:`size-4 shrink-0 opacity-50`})}),t[8]=o):o=t[8];let s;return t[9]===a?s=t[10]:(s=(0,L.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,L.jsxs)(DE,{className:`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[a,o]})}),t[9]=a,t[10]=s),s}function FE(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(eE.List,{"data-slot":`command-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function IE(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`py-6 text-center text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(eE.Empty,{"data-slot":`command-empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function LE(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`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`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(eE.Group,{"data-slot":`command-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function RE(e){let t=(0,z.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=E(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-accent data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(Gr,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,L.jsxs)(eE.Item,{"data-slot":`command-item`,className:a,...i,children:[n,o]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function zE(e){let t=(0,z.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=E(`ml-auto hidden items-center justify-end text-xs text-muted-foreground group-data-selected/command-item:text-foreground md:inline-flex`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,L.jsx)(We,{children:n}),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,L.jsx)(`span`,{"data-slot":`command-shortcut`,className:a,...i,children:o}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function BE(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var VE=R.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),HE=()=>{let e=R.useContext(VE);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};BE(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
279
|
+
[data-state=closed]
|
|
280
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function UE(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function WE(){return YE(/^Mac/)}function GE(){return YE(/^iPhone/)}function KE(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function qE(){return YE(/^iPad/)||WE()&&navigator.maxTouchPoints>1}function JE(){return GE()||qE()}function YE(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var XE=24,ZE=typeof window<`u`?R.useLayoutEffect:R.useEffect;function QE(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var $E=typeof document<`u`&&window.visualViewport;function eD(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function tD(e){for(eD(e)&&(e=e.parentElement);e&&!eD(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var nD=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),rD=0,iD;function aD(e={}){let{isDisabled:t}=e;ZE(()=>{if(!t)return rD++,rD===1&&JE()&&(iD=oD()),()=>{rD--,rD===0&&iD?.()}},[t])}function oD(){let e,t=0,n=n=>{e=tD(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;uD(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;uD(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,$E&&($E.height<window.innerHeight?requestAnimationFrame(()=>{lD(t)}):$E.addEventListener(`resize`,()=>lD(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=QE(sD(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=QE(cD(document,`touchstart`,n,{passive:!1,capture:!0}),cD(document,`touchmove`,r,{passive:!1,capture:!0}),cD(document,`touchend`,i,{passive:!1,capture:!0}),cD(document,`focus`,a,!0),cD(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function sD(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function cD(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function lD(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=tD(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+XE&&(t.scrollTop+=r-n)}e=t.parentElement}}function uD(e){return e instanceof HTMLInputElement&&!nD.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function dD(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function fD(...e){return t=>e.forEach(e=>dD(e,t))}function pD(...e){return R.useCallback(fD(...e),e)}var mD=new WeakMap;function hD(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&mD.set(e,r)}function gD(e,t){if(!e||!(e instanceof HTMLElement))return;let n=mD.get(e);n&&(e.style[t]=n[t])}var _D=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function vD(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[_D(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[_D(t)?5:4]):null)}function yD(e){return 8*(Math.log(e+1)-2)}function bD(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var xD={DURATION:.5,EASE:[.32,.72,0,1]},SD=.4,CD=.25,wD=100,TD=8,ED=16,DD=26,OD=`vaul-dragging`;function kD(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function AD({defaultProp:e,onChange:t}){let n=R.useState(e),[r]=n,i=R.useRef(r),a=kD(t);return R.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function jD({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=AD({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=kD(n);return[o,R.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function MD({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=jD({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=R.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);R.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=R.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=R.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=R.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),_D(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=R.useMemo(()=>h===null?null:_?.[h],[_,h]),y=R.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),hD(r.current,{transition:`transform ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,transform:_D(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?hD(i.current,{transition:`opacity ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,opacity:`0`}):hD(i.current,{transition:`opacity ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);R.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function b({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&hD(i.current,{transition:`opacity ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=_D(s)?window.innerHeight:window.innerWidth;if(r>SD&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function x({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||hD(r.current,{transform:_D(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function S(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:b,onDrag:x,snapPointsOffset:_}}function ND(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=HE(),a=R.useRef(null),o=(0,R.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-DD)/window.innerWidth}R.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&bD(document.body,{background:`black`}),bD(t,{transformOrigin:_D(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${xD.DURATION}s`,transitionTimingFunction:`cubic-bezier(${xD.EASE.join(`,`)})`});let n=bD(t,{borderRadius:`${TD}px`,overflow:`hidden`,..._D(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},xD.DURATION*1e3)}}},[t,n,o])}var PD=null;function FD({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=R.useState(()=>typeof window<`u`?window.location.href:``),c=R.useRef(0),l=R.useCallback(()=>{if(KE()&&PD===null&&e&&!a){PD={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=R.useCallback(()=>{if(KE()&&PD!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,PD),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),PD=null}},[o]);return R.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),R.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),R.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function ID({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=CD,scrollLockTimeout:l=wD,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:b=`bottom`,defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:w=!1,repositionInputs:T=!0,onAnimationEnd:E,container:D,autoFocus:O=!1}){let[k=!1,A]=jD({defaultProp:x,prop:e,onChange:e=>{t?.(e),!e&&!v&&we(),setTimeout(()=>{E?.(e)},xD.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[ee,j]=R.useState(!1),[M,te]=R.useState(!1),[ne,N]=R.useState(!1),re=R.useRef(null),ie=R.useRef(null),ae=R.useRef(null),P=R.useRef(null),oe=R.useRef(null),se=R.useRef(!1),ce=R.useRef(null),le=R.useRef(0),ue=R.useRef(!1),de=R.useRef(!x),fe=R.useRef(0),F=R.useRef(null),pe=R.useRef(F.current?.getBoundingClientRect().height||0),me=R.useRef(F.current?.getBoundingClientRect().width||0),he=R.useRef(0),{activeSnapPoint:ge,activeSnapPointIndex:_e,setActiveSnapPoint:ve,onRelease:ye,snapPointsOffset:be,onDrag:xe,shouldFade:Se,getPercentageDragged:Ce}=MD({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:F,fadeFromIndex:f,overlayRef:re,onSnapPointChange:R.useCallback(e=>{a&&e===be.length-1&&(ie.current=new Date)},[]),direction:b,container:D,snapToSequentialPoint:C});aD({isDisabled:!k||M||!g||ne||!ee||!T||!S});let{restorePositionSetting:we}=FD({isOpen:k,modal:g,nested:v??!1,hasBeenOpened:ee,preventScrollRestoration:w,noBodyStyles:y});function Te(){return(window.innerWidth-DD)/window.innerWidth}function Ee(e){!u&&!a||F.current&&!F.current.contains(e.target)||(pe.current=F.current?.getBoundingClientRect().height||0,me.current=F.current?.getBoundingClientRect().width||0,te(!0),ae.current=new Date,JE()&&window.addEventListener(`touchend`,()=>se.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),le.current=_D(b)?e.pageY:e.pageX)}function De(e,t){let n=e,r=window.getSelection()?.toString(),i=F.current?vD(F.current,b):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(b===`right`||b===`left`)return!0;if(ie.current&&a.getTime()-ie.current.getTime()<500)return!1;if(i!==null&&(b===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(oe.current&&a.getTime()-oe.current.getTime()<l&&i===0||t)return oe.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return oe.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function Oe(e){if(F.current&&M){let t=b===`bottom`||b===`right`?1:-1,n=(le.current-(_D(b)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&_e===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(b===`bottom`||b===`top`?pe.current:me.current),p=Ce(c,i);if(p!==null&&(d=p),s&&d>=1||!se.current&&!De(e.target,i))return;if(F.current.classList.add(OD),se.current=!0,hD(F.current,{transition:`none`}),hD(re.current,{transition:`none`}),a&&xe({draggedDistance:n}),i&&!a){let e=yD(n),r=Math.min(e*-1,0)*t;hD(F.current,{transform:_D(b)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((Se||f&&_e===f-1)&&(r?.(e,d),hD(re.current,{opacity:`${m}`,transition:`none`},!0)),l&&re.current&&o){let e=Math.min(Te()+d*(1-Te()),1),t=8-d*8,n=Math.max(0,14-d*14);hD(l,{borderRadius:`${t}px`,transform:_D(b)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;hD(F.current,{transform:_D(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}R.useEffect(()=>{window.requestAnimationFrame(()=>{de.current=!0})},[]),R.useEffect(()=>{var e;function t(){if(!F.current||!T)return;let e=document.activeElement;if(uD(e)||ue.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=F.current.getBoundingClientRect().height||0,i=r>t*.8;he.current||=r;let o=F.current.getBoundingClientRect().top;if(Math.abs(fe.current-n)>60&&(ue.current=!ue.current),a&&a.length>0&&be&&_e){let e=be[_e]||0;n+=e}if(fe.current=n,r>e||ue.current){let t=F.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:DD)),h?F.current.style.height=`${t-Math.max(n,0)}px`:F.current.style.height=`${Math.max(r,e-o)}px`}else UE()||(F.current.style.height=`${he.current}px`);a&&a.length>0&&!ue.current?F.current.style.bottom=`0px`:F.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[_e,a,be]);function ke(e){je(),_?.(),e||A(!1),setTimeout(()=>{a&&ve(a[0])},xD.DURATION*1e3)}function Ae(){if(!F.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=vD(F.current,b);hD(F.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`}),hD(re.current,{transition:`opacity ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&k&&hD(e,{borderRadius:`${TD}px`,overflow:`hidden`,..._D(b)?{transform:`scale(${Te()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${Te()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${xD.DURATION}s`,transitionTimingFunction:`cubic-bezier(${xD.EASE.join(`,`)})`},!0)}function je(){!M||!F.current||(F.current.classList.remove(OD),se.current=!1,te(!1),P.current=new Date)}function Me(e){if(!M||!F.current)return;F.current.classList.remove(OD),se.current=!1,te(!1),P.current=new Date;let t=vD(F.current,b);if(!e||!De(e.target,!1)||!t||Number.isNaN(t)||ae.current===null)return;let n=P.current.getTime()-ae.current.getTime(),r=le.current-(_D(b)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(N(!0),setTimeout(()=>{N(!1)},200)),a){ye({draggedDistance:r*(b===`bottom`||b===`right`?1:-1),closeDrawer:ke,velocity:o,dismissible:u}),i?.(e,!0);return}if(b===`bottom`||b===`right`?r>0:r<0){Ae(),i?.(e,!0);return}if(o>SD){ke(),i?.(e,!1);return}let s=Math.min(F.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(F.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(b===`left`||b===`right`?l:s)*c){ke(),i?.(e,!1);return}i?.(e,!0),Ae()}R.useEffect(()=>(k&&(hD(document.documentElement,{scrollBehavior:`auto`}),ie.current=new Date),()=>{gD(document.documentElement,`scrollBehavior`)}),[k]);function Ne(e){let t=e?(window.innerWidth-ED)/window.innerWidth:1,n=e?-ED:0;ce.current&&window.clearTimeout(ce.current),hD(F.current,{transition:`transform ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,transform:_D(b)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&F.current&&(ce.current=setTimeout(()=>{let e=vD(F.current,b);hD(F.current,{transition:`none`,transform:_D(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Pe(e,t){if(t<0)return;let n=(window.innerWidth-ED)/window.innerWidth,r=n+t*(1-n),i=-ED+t*ED;hD(F.current,{transform:_D(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Fe(e,t){let n=_D(b)?window.innerHeight:window.innerWidth,r=t?(n-ED)/n:1,i=t?-ED:0;t&&hD(F.current,{transition:`transform ${xD.DURATION}s cubic-bezier(${xD.EASE.join(`,`)})`,transform:_D(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return R.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),R.createElement(pT,{defaultOpen:x,onOpenChange:e=>{!u&&!e||(e?j(!0):ke(!0),A(e))},open:k},R.createElement(VE.Provider,{value:{activeSnapPoint:ge,snapPoints:a,setActiveSnapPoint:ve,drawerRef:F,overlayRef:re,onOpenChange:t,onPress:Ee,onRelease:Me,onDrag:Oe,dismissible:u,shouldAnimate:de,handleOnly:d,isOpen:k,isDragging:M,shouldFade:Se,closeDrawer:ke,onNestedDrag:Pe,onNestedOpenChange:Ne,onNestedRelease:Fe,keyboardIsOpen:ue,modal:g,snapPointsOffset:be,activeSnapPointIndex:_e,direction:b,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:D,autoFocus:O}},n))}var LD=R.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=HE(),l=pD(t,n),u=r&&r.length>0;if(!s)return null;let d=R.useCallback(e=>i(e),[i]);return R.createElement(gT,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});LD.displayName=`Drawer.Overlay`;var RD=R.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=HE(),[b,x]=R.useState(!1),S=pD(i,a),C=R.useRef(null),w=R.useRef(null),T=R.useRef(!1),E=h&&h.length>0;ND();let D=(e,t,n=0)=>{if(T.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return T.current=!0,!0};R.useEffect(()=>{E&&window.requestAnimationFrame(()=>{x(!0)})},[]);function O(e){C.current=null,T.current=!1,s(e)}return R.createElement(_T,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":b?`true`:`false`,"data-vaul-snap-points":p&&E?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:S,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(w.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!C.current))return;let t=e.pageY-C.current.y,n=e.pageX-C.current.x,i=e.pointerType===`touch`?10:2;D({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(C.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),C.current=null,T.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),O(w.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),w.current&&O(w.current)}})});RD.displayName=`Drawer.Content`;var zD=250,BD=120,VD=R.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=HE(),m=R.useRef(null),h=R.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},BD)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},zD)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return R.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},R.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});VD.displayName=`Drawer.Handle`;function HD({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=HE();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return R.createElement(ID,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function UD(e){let t=HE(),{container:n=t.container,...r}=e;return R.createElement(hT,{container:n,...r})}var WD={Root:ID,NestedRoot:HD,Content:RD,Overlay:LD,Trigger:mT,Portal:UD,Handle:VD,Close:bT,Title:vT,Description:yT},GD=`pico:dialog-closed`;function KD(){typeof window>`u`||window.setTimeout(()=>{window.dispatchEvent(new CustomEvent(GD))},160)}function qD(e){let t=(0,z.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({restorePromptFocusOnClose:i,shouldScaleBackground:a,open:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?!0:i,s=a===void 0?!1:a,c=R.useRef(n===!0),l,u;t[5]!==n||t[6]!==o?(l=()=>{let e=n===!0;!e&&c.current&&o&&KD(),c.current=e},u=[n,o],t[5]=n,t[6]=o,t[7]=l,t[8]=u):(l=t[7],u=t[8]),R.useLayoutEffect(l,u);let d;return t[9]!==n||t[10]!==r||t[11]!==s?(d=(0,L.jsx)(WD.Root,{"data-slot":`drawer`,shouldScaleBackground:s,open:n,...r}),t[9]=n,t[10]=r,t[11]=s,t[12]=d):d=t[12],d}function JD(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(WD.Portal,{"data-slot":`drawer-portal`,...n}),t[2]=n,t[3]=r),r}function YD(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`fixed inset-0 z-50 bg-black/40 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(WD.Overlay,{"data-slot":`drawer-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function XD(e){let t=(0,z.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,L.jsx)(YD,{}),t[4]=a):a=t[4];let o;t[5]===r?o=t[6]:(o=E(`fixed inset-x-0 bottom-0 z-50 flex max-h-[90svh] flex-col rounded-t-[20px] border border-border bg-popover text-sm text-popover-foreground shadow-lg outline-none`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(WD.Handle,{"data-slot":`drawer-handle`,className:`mx-auto mt-3 h-1.5 w-12 shrink-0 rounded-full bg-muted-foreground/20`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==o?(c=(0,L.jsxs)(JD,{children:[a,(0,L.jsxs)(WD.Content,{"data-slot":`drawer-content`,className:o,...i,children:[s,n]})]}),t[8]=n,t[9]=i,t[10]=o,t[11]=c):c=t[11],c}function ZD(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`flex flex-col gap-1.5 px-4 pt-3 pb-2 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`drawer-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function QD(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`mt-auto flex flex-col gap-2 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`drawer-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $D(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`font-heading text-base font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(WD.Title,{"data-slot":`drawer-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function eO(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(WD.Description,{"data-slot":`drawer-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var tO=R.createContext(void 0);function nO(e=!0){let t=R.useContext(tO);if(t===void 0&&!e)throw Error(mt(25));return t}var rO=R.createContext(void 0);function iO(e){let t=R.useContext(rO);if(t===void 0&&!e)throw Error(mt(33));return t}var aO=R.createContext(void 0);function oO(e){let t=R.useContext(aO);if(t===void 0&&!e)throw Error(mt(36));return t}function sO(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:s,itemRef:c,itemMetadata:l}=e,{events:u}=a.useState(`floatingTreeRoot`),d=nO(!0),f=d!==void 0;return R.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&s?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit(`close`,{domEvent:e,reason:o})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!F&&e.button===2)return}c.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&(!l||l.type===`regular-item`)&&c.current.click()}}),[t,n,r,u,i,a,s,c,d,f,l])}var cO={type:`regular-item`};function lO(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,d=R.useRef(null),{getButtonProps:f,buttonRef:p}=sn({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),m=sO({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:d,itemMetadata:c}),h=R.useCallback(e=>u(m,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,f),[m,f,c]),g=it(d,p);return R.useMemo(()=>({getItemProps:h,itemRef:g}),[h,g])}var uO=R.createContext(void 0);function dO(){let e=R.useContext(uO);if(e===void 0)throw Error(mt(31));return e}var fO=R.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=R.useState(void 0),c=R.useMemo(()=>({setLabelId:s}),[s]),l=N(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,L.jsx)(uO.Provider,{value:c,children:l})}),pO=R.forwardRef(function(e,t){let{className:n,render:r,id:i,style:a,...o}=e,s=de(i),{setLabelId:c}=dO();return Ze(()=>(c(s),()=>{c(void 0)}),[c,s]),N(`div`,e,{ref:t,props:{id:s,role:`presentation`,...o}})}),mO=R.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=U_({label:a}),f=iO(!0),p=de(i),{store:m}=oO(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=lO({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:cO});return N(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),hO=R.createContext(void 0);function gO(e){let t=R.useContext(hO);if(t===void 0&&!e)throw Error(mt(69));return t}var _O={...C,...Oe},vO=R.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=oO(),{side:l,align:u}=iO(),d=gO(!0)!=null,f=s.useState(`open`),p=s.useState(`transitionStatus`),m=s.useState(`popupProps`),h=s.useState(`mounted`),g=s.useState(`instantType`),_=s.useState(`activeTriggerElement`),v=s.useState(`parent`),y=s.useState(`lastOpenChangeReason`),b=s.useState(`rootId`),x=s.useState(`floatingRootContext`),S=s.useState(`floatingTreeRoot`),C=s.useState(`closeDelay`),w=s.useState(`activeTriggerElement`),T=v.type===`context-menu`;Te({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}}),R.useEffect(()=>{function e(e){s.setOpen(!1,St(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,s]);let E=s.useState(`hoverEnabled`),D=s.useState(`disabled`);M(x,{enabled:E&&!D&&!T&&v.type!==`menubar`,closeDelay:C});let O={transitionStatus:p,side:l,align:u,open:f,nested:v.type===`menu`,instant:g},k=R.useCallback(e=>{s.set(`popupElement`,e)},[s]),A=N(`div`,e,{state:O,ref:[t,s.context.popupRef,k],stateAttributesMapping:_O,props:[m,{onKeyDown(e){d&&Ft.has(e.key)&&e.stopPropagation()}},c(p),o,{"data-rootownerid":b}]}),ee=v.type===void 0||T;return(_||v.type===`menubar`&&y!==`outside-press`)&&(ee=!0),(0,L.jsx)(an,{context:x,modal:T,disabled:!h,returnFocus:a===void 0?ee:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:S,previousFocusableElement:w,nextFocusableElement:v.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:A})}),yO=R.createContext(void 0);function bO(){let e=R.useContext(yO);if(e===void 0)throw Error(mt(32));return e}var xO=R.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=oO();return i.useState(`mounted`)||n?(0,L.jsx)(yO.Provider,{value:n,children:(0,L.jsx)(l,{ref:t,...r})}):null}),SO=20;function CO(e,t,n,r){let[i,a]=R.useState(!1);Ze(()=>{if(!e||!t||n==null){a(!1);return}let r=Ee(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-SO)},[e,t,n]),Qt(e&&(!t||i),r)}var wO=R.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:a,render:o,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:_=!1,collisionAvoidance:v=Ot,style:y,...b}=e,{store:x}=oO(),S=bO(),C=nO(!0),w=x.useState(`parent`),T=x.useState(`floatingRootContext`),E=x.useState(`floatingTreeRoot`),D=x.useState(`mounted`),O=x.useState(`open`),k=x.useState(`modal`),ee=x.useState(`openMethod`),j=x.useState(`activeTriggerElement`),M=x.useState(`transitionStatus`),te=x.useState(`positionerElement`),ne=x.useState(`instantType`),N=x.useState(`hasViewport`),re=x.useState(`lastOpenChangeReason`),ie=x.useState(`floatingNodeId`),ae=x.useState(`floatingParentNodeId`),P=T.useState(`domReferenceElement`),oe=R.useRef(null),se=Je(te,!1,!1),le=n,ue=u,de=d,fe=l,F=v;w.type===`context-menu`&&(le=n??w.context?.anchor,fe??=`start`,!c&&fe!==`center`&&(de=e.alignOffset??2,ue=e.sideOffset??-5));let pe=c,me=fe;w.type===`menu`?(pe??=`inline-end`,me??=`start`,F=e.collisionAvoidance??s):w.type===`menubar`&&(pe??=`bottom`,me??=`start`);let he=w.type===`context-menu`,ge=ce({anchor:le,floatingRootContext:T,positionMethod:C?`fixed`:r,mounted:D,side:pe,sideOffset:ue,align:me,alignOffset:de,arrowPadding:he?0:m,collisionBoundary:f,collisionPadding:p,sticky:g,nodeId:ie,keepMounted:S,disableAnchorTracking:_,collisionAvoidance:F,shiftCrossAxis:he&&!(`side`in F&&F.side===`flip`),externalTree:E,adaptiveOrigin:N?h:void 0});R.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===ie&&x.set(`hoverEnabled`,!1),e.nodeId!==ie&&e.parentNodeId===x.select(`floatingParentNodeId`)&&x.setOpen(!1,St(A)))}return E.events.on(`menuopenchange`,e),()=>{E.events.off(`menuopenchange`,e)}},[x,E.events,ie]),R.useEffect(()=>{if(x.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==x.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;x.setOpen(!1,St(t))}return E.events.on(`menuopenchange`,e),()=>{E.events.off(`menuopenchange`,e)}},[E.events,x]);let _e=i();R.useEffect(()=>{O||_e.clear()},[O,_e]),R.useEffect(()=>{function e(e){if(!(!O||e.nodeId!==x.select(`floatingParentNodeId`)))if(e.target&&j&&j!==e.target){let e=x.select(`closeDelay`);e>0?_e.isStarted()||_e.start(e,()=>{x.setOpen(!1,St(A))}):x.setOpen(!1,St(A))}else _e.clear()}return E.events.on(`itemhover`,e),()=>{E.events.off(`itemhover`,e)}},[E.events,O,j,x,_e]),R.useEffect(()=>{let e={open:O,nodeId:ie,parentNodeId:ae,reason:x.select(`lastOpenChangeReason`)};E.events.emit(`menuopenchange`,e)},[E.events,O,x,ie,ae]),Ze(()=>{let e=P,t=oe.current;if(e&&(oe.current=e),t&&e&&e!==t){x.set(`instantType`,void 0);let e=new AbortController;return se(()=>{x.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[P,se,x]);let ye={open:O,side:ge.side,align:ge.align,anchorHidden:ge.anchorHidden,nested:w.type===`menu`,instant:ne},be=w.type===`menubar`&&w.context.modal;CO(O&&(be||k&&re!==`trigger-hover`),ee===`touch`,te,j);let xe=kt(e,ye,{styles:ge.positionerStyles,transitionStatus:M,props:b,refs:[t,x.useStateSetter(`positionerElement`)],hidden:!D,inert:!O}),Se=D&&w.type!==`menu`&&(w.type!==`menubar`&&k&&re!==`trigger-hover`||w.type===`menubar`&&w.context.modal),Ce=null;return w.type===`menubar`?Ce=w.context.contentElement:w.type===void 0&&(Ce=j),(0,L.jsxs)(rO.Provider,{value:ge,children:[Se&&(0,L.jsx)(Zt,{ref:w.type===`context-menu`||w.type===`nested-context-menu`?w.context.internalBackdropRef:null,inert:Kt(!O),cutout:Ce}),(0,L.jsx)(ve,{id:ie,children:(0,L.jsx)(j_,{elementsRef:x.context.itemDomElements,labelsRef:x.context.itemLabels,children:xe})})]})}),TO=R.createContext(null);function EO(e){let t=R.useContext(TO);if(t===null&&!e)throw Error(mt(5));return t}var DO={...Qe,disabled:Xe(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:Xe(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:Xe(e=>e.openMethod),allowMouseEnter:Xe(e=>e.allowMouseEnter),stickIfOpen:Xe(e=>e.stickIfOpen),parent:Xe(e=>e.parent),rootId:Xe(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:Xe(e=>e.activeIndex),isActive:Xe((e,t)=>e.activeIndex===t),hoverEnabled:Xe(e=>e.hoverEnabled),instantType:Xe(e=>e.instantType),lastOpenChangeReason:Xe(e=>e.openChangeReason),floatingTreeRoot:Xe(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:Xe(e=>e.floatingNodeId),floatingParentNodeId:Xe(e=>e.floatingParentNodeId),itemProps:Xe(e=>e.itemProps),closeDelay:Xe(e=>e.closeDelay),hasViewport:Xe(e=>e.hasViewport),keyboardEventRelay:Xe(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},OO=class e extends rt{constructor(e){super({...kO(),...e},{positionerRef:R.createRef(),popupRef:R.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:R.createRef(),beforeContentFocusGuardRef:R.createRef(),onOpenChangeComplete:void 0,triggerElements:new lt},DO),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=et(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function kO(){return{...ht(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ne,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:m,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var AO=R.createContext(void 0);function jO(){return R.useContext(AO)}var MO=Be(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:d=`vertical`,actionsRef:f,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0}=e,v=nO(!0),y=oO(!0),b=EO(!0),x=jO(),S=R.useMemo(()=>x&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,x]),C=OO.useStore(m?.store,{open:o,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:S});ct(()=>{n===void 0&&C.state.open===!1&&o===!0&&C.update({open:!0,activeTriggerId:g})}),C.useControlledProp(`openProp`,n),C.useControlledProp(`triggerIdProp`,h),C.useContextCallback(`onOpenChangeComplete`,a);let w=C.useState(`floatingTreeRoot`),T=Et(w),E=Ce();Ze(()=>{v&&!y?C.update({parent:{type:`context-menu`,context:v},floatingNodeId:T,floatingParentNodeId:E}):y&&C.update({floatingNodeId:T,floatingParentNodeId:E})},[v,y,T,E,C]);let D=C.useState(`open`),O=C.useState(`activeTriggerElement`),k=C.useState(`positionerElement`),A=C.useState(`hoverEnabled`),ee=C.useState(`disabled`),j=C.useState(`lastOpenChangeReason`),M=C.useState(`parent`),te=C.useState(`activeIndex`),ne=C.useState(`payload`),N=C.useState(`floatingParentNodeId`),re=R.useRef(null),ie=N!=null,{openMethod:ae,triggerProps:oe}=It(D);C.useSyncedValues({disabled:s,modal:M.type===void 0?c:void 0,openMethod:ae,rootId:Ge()}),Ve(C);let{forceUnmount:ce}=xe(D,C,()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0})}),le=R.useRef(M.type!==`context-menu`),ue=i();R.useEffect(()=>{if(D||(re.current=null),M.type===`context-menu`){if(!D){ue.clear(),le.current=!1;return}ue.start(500,()=>{le.current=!0})}},[ue,D,M.type]),Ze(()=>{!D&&!A&&C.set(`hoverEnabled`,!0)},[D,A,C]);let de=R.useRef(!0),fe=i(),F=ke((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&j===n||(t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled))return;C.state.floatingRootContext.dispatchOpenChange(e,t);let i=t.event;if(e===!1&&i?.type===`click`&&i.pointerType===`touch`&&!de.current)return;if(!e&&te!==null){let e=C.context.itemDomElements.current[te];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(de.current=!1,fe.start(300,()=>{de.current=!0})):(de.current=!0,fe.clear());let a=(n===`trigger-press`||n===`item-press`)&&i.detail===0&&i?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};re.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),C.update(s),M.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?C.set(`instantType`,`group`):a||o?C.set(`instantType`,a?`click`:`dismiss`):C.set(`instantType`,void 0)}),me=R.useCallback(e=>{let t=St(e);return t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},t},[C]),he=R.useCallback(()=>{C.setOpen(!1,me(Ke))},[C,me]);R.useImperativeHandle(f,()=>({unmount:ce,close:he}),[ce,he]);let ge;M.type===`context-menu`&&(ge=M.context),R.useImperativeHandle(ge?.positionerRef,()=>k,[k]),R.useImperativeHandle(ge?.actionsRef,()=>({setOpen:F}),[F]);let _e=Me({popupStore:C,onOpenChange:F}),ve=_e.context.events;R.useEffect(()=>{let e=({open:e,eventDetails:t})=>F(e,t);return ve.on(`setOpen`,e),()=>{ve?.off(`setOpen`,e)}},[ve,F]);let ye=Le(_e,{enabled:!ee,bubbles:{escapeKey:p&&M.type===`menu`},outsidePress(){return M.type!==`context-menu`||re.current?.type===`contextmenu`?!0:le.current},externalTree:ie?w:void 0}),be=en(_e,{role:`menu`}),Se=P(),we=R.useCallback(e=>{C.select(`activeIndex`)!==e&&C.set(`activeIndex`,e)},[C]),Te=Ur(_e,{enabled:!ee,listRef:C.context.itemDomElements,activeIndex:te,nested:M.type!==void 0,loopFocus:l,orientation:d,parentOrientation:M.type===`menubar`?M.context.orientation:void 0,rtl:Se===`rtl`,disabledIndices:se,onNavigate:we,openOnArrowKeyDown:M.type!==`context-menu`,externalTree:ie?w:void 0,focusItemOnHover:_}),Ee=R.useCallback(e=>{C.context.typingRef.current=e},[C]),{getReferenceProps:De,getFloatingProps:Oe,getItemProps:Ae,getTriggerProps:je}=pe([ye,be,Te,Wr(_e,{listRef:C.context.itemLabels,elementsRef:C.context.itemDomElements,activeIndex:te,resetMs:500,onMatch:e=>{D&&e!==te&&C.set(`activeIndex`,e)},onTypingChange:Ee})]),Ne=R.useMemo(()=>{let e=u(De(),{onMouseMove(){C.set(`allowMouseEnter`,!0)}},oe);return delete e.role,e},[De,C,oe]),Pe=R.useMemo(()=>{let e=je();if(!e)return e;let t=u(e,oe);return delete t.role,delete t[`aria-controls`],t},[je,oe]),Fe=R.useMemo(()=>Oe({onMouseMove(){C.set(`allowMouseEnter`,!0),M.type===`menu`&&C.set(`hoverEnabled`,!1)},onClick(){C.select(`hoverEnabled`)&&C.set(`hoverEnabled`,!1)},onKeyDown(e){let t=C.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[Oe,M.type,C]),Ie=R.useMemo(()=>Ae(),[Ae]);C.useSyncedValues({floatingRootContext:_e,activeTriggerProps:Ne,inactiveTriggerProps:Pe,popupProps:Fe,itemProps:Ie});let Re=R.useMemo(()=>({store:C,parent:S}),[C,S]),ze=(0,L.jsx)(aO.Provider,{value:Re,children:typeof t==`function`?t({payload:ne}):t});return M.type===void 0||M.type===`context-menu`?(0,L.jsx)(bt,{externalTree:w,children:ze}):ze});function NO(e){let t=oO().store,n=R.useMemo(()=>({parentMenu:t}),[t]);return(0,L.jsx)(AO.Provider,{value:n,children:(0,L.jsx)(MO,{...e})})}function PO(e){let t=e.getBoundingClientRect(),n=xt(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function FO(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=rn(),{ref:i,index:a}=U_(e),o=n===a,s=R.useRef(null),c=it(i,s);return{compositeProps:R.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function IO(e){let{render:t,className:n,style:r,state:i=m,props:a=se,refs:o=se,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=FO({metadata:s});return N(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function LO(e){if(we(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!Tt(e))return LO(ye(e))}function RO(e,t){let n=R.useRef(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:ke(t=>{ii.flushSync(()=>{e.setOpen(!1,St(O,t.nativeEvent,t.currentTarget))}),w(n.current)?.focus()}),handleFocusTargetFocus:ke(n=>{let r=e.select(`positionerElement`);if(r&&te(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{ii.flushSync(()=>{e.setOpen(!1,St(O,n.nativeEvent,n.currentTarget))});let i=g(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&>(r,i);){let e=i;if(i=k(i),i===e)break}i?.focus()}})}}function zO(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=R.useRef(!1);return R.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Ee(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:m,[t,n,r])}var BO=2,VO=be(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:s=!0,id:c,openOnHover:l,delay:u=100,closeDelay:d=0,handle:f,payload:p,style:h,...g}=e,_=oO(!0),v=f?.store??_?.store;if(!v)throw Error(mt(85));let y=de(c),b=v.useState(`isTriggerActive`,y),x=v.useState(`floatingRootContext`),S=v.useState(`isOpenedByTrigger`,y),C=R.useRef(null),w=UO(),T=rn(!0),E=wt(),D=R.useMemo(()=>E??new ne,[E]),{registerTrigger:O,isMountedByThisTrigger:k}=tt(y,C,v,{payload:p,closeDelay:d,parent:w,floatingTreeRoot:D,floatingNodeId:Et(D),floatingParentNodeId:Ce(),keyboardEventRelay:T?.relayKeyboardEvent}),A=w.type===`menubar`,ee=v.useState(`disabled`),j=o||ee||A&&w.context.disabled,{getButtonProps:M,buttonRef:te}=sn({disabled:j,native:s});R.useEffect(()=>{!S&&w.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,S,w.type]);let ie=R.useRef(null),ae=i(),P=ke(e=>{if(!ie.current)return;ae.clear(),v.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(gt(ie.current,t)||gt(v.select(`positionerElement`),t)||t===ie.current||t!=null&&LO(t)===v.select(`rootId`))return;let n=PO(ie.current);e.clientX>=n.left-BO&&e.clientX<=n.right+BO&&e.clientY>=n.top-BO&&e.clientY<=n.bottom+BO||D.events.emit(`close`,{domEvent:e,reason:re})});R.useEffect(()=>{S&&v.select(`lastOpenChangeReason`)===`trigger-hover`&&Ee(ie.current).addEventListener(`mouseup`,P,{once:!0})},[S,P,v]);let oe=A&&w.context.hasSubmenuOpen,se=_e(x,{enabled:(l??oe)&&!j&&w.type!==`context-menu`&&(!A||oe&&!k),handleClose:he({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:w.type===void 0?u:void 0,delay:{close:d},triggerElementRef:C,externalTree:D,isActiveTrigger:b,isClosing:()=>v.select(`transitionStatus`)===`ending`}),ce=HO(S,v.select(`lastOpenChangeReason`)),le=Fr(x,{enabled:!j&&w.type!==`context-menu`,event:S&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0?ce:!1}),ue=a(x,{enabled:!j&&oe}),fe=zO({open:S,enabled:A,mouseDownAction:`open`}),F=pe([le,ue]),me={disabled:j,open:S},ge=v.useState(`triggerProps`,k),ve=[ie,t,te,O,C],ye=[F.getReferenceProps(),se??m,ge,{"aria-haspopup":`menu`,id:y,onMouseDown:e=>{v.select(`open`)||(ae.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Ee(e.currentTarget).addEventListener(`mouseup`,P,{once:!0}))}},A?{role:`menuitem`}:{},fe,g,M],{preFocusGuardRef:be,handlePreFocusGuardFocus:xe,handleFocusTargetFocus:Se}=RO(v,C),we=N(`button`,e,{enabled:!A,stateAttributesMapping:st,state:me,ref:ve,props:ye});return A?(0,L.jsx)(IO,{tag:`button`,render:n,className:r,style:h,state:me,refs:ve,props:ye,stateAttributesMapping:st}):S?(0,L.jsxs)(R.Fragment,{children:[(0,L.jsx)(pt,{ref:be,onFocus:xe},`${y}-pre-focus-guard`),(0,L.jsx)(R.Fragment,{children:we},y),(0,L.jsx)(pt,{ref:v.context.triggerFocusTargetRef,onFocus:Se},`${y}-post-focus-guard`)]}):(0,L.jsx)(R.Fragment,{children:we},y)});function HO(e,t){let n=i(),[r,a]=R.useState(!1);return Ze(()=>{e&&t===`trigger-hover`?(a(!0),n.start(500,()=>{a(!1)})):e||(n.clear(),a(!1))},[e,t,n]),r}function UO(){let e=nO(!0),t=oO(!0),n=EO(!0);return R.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var WO=R.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return N(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),GO=R.forwardRef(function(e,t){let{render:n,className:r,label:i,id:a,nativeButton:o=!1,openOnHover:s=!0,delay:c=100,closeDelay:l=0,disabled:u=!1,style:d,...f}=e,p=U_(),m=iO(),{store:h}=oO(),g=de(a),_=h.useState(`open`),v=h.useState(`floatingRootContext`),y=h.useState(`floatingTreeRoot`),x=ft(g,h),S=R.useCallback(e=>{let t=x(e);return e!==null&&h.select(`open`)&&h.select(`activeTriggerId`)==null&&h.update({activeTriggerId:g,activeTriggerElement:e,closeDelay:l}),t},[x,l,h,g]),C=R.useRef(null),w=R.useCallback(e=>{C.current=e,h.set(`activeTriggerElement`,e)},[h]),T=jO();if(!T?.parentMenu)throw Error(mt(37));h.useSyncedValue(`closeDelay`,l);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,p.index),k=R.useMemo(()=>({type:`submenu-trigger`,setActive(){E.set(`activeIndex`,p.index)}}),[E,p.index]),A=h.useState(`disabled`),ee=u||A,{getItemProps:j,itemRef:M}=lO({closeOnClick:!1,disabled:ee,highlighted:O,id:g,store:h,typingRef:E.context.typingRef,nativeButton:o,itemMetadata:k,nodeId:m?.context.nodeId}),te=h.useState(`hoverEnabled`),ne=E.useState(`allowMouseEnter`),re=_e(v,{enabled:te&&s&&!ee,handleClose:he({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:c,delay:ne?{open:c,close:l}:0,triggerElementRef:C,externalTree:y,isClosing:()=>h.select(`transitionStatus`)===`ending`}),ie=pe([Fr(v,{enabled:!ee,event:`mousedown`,toggle:!s,ignoreMouse:s,stickIfOpen:!1})]),ae=h.useState(`triggerProps`,!0);return delete ae.id,N(`div`,e,{state:{disabled:ee,highlighted:O,open:_},stateAttributesMapping:b,props:[ie.getReferenceProps(),re,ae,D,{tabIndex:_||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},f,j],ref:[t,p.ref,M,S,w]})});function KO(e){let[t,n]=R.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=R.useRef(null),i=R.useRef(null),a=R.useRef(null),o=R.useRef(null),s=R.useRef(!0),c=R.useRef(null),l=Ge(),u=R.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,L.jsx)(tO.Provider,{value:u,children:(0,L.jsx)(aO.Provider,{value:void 0,children:(0,L.jsx)(MO,{...e})})})}var qO=500,JO=R.forwardRef(function(e,t){let{render:n,className:r,style:a,...o}=e,{setAnchor:s,actionsRef:c,internalBackdropRef:l,backdropRef:u,positionerRef:d,allowMouseUpTriggerRef:f,initialCursorPointRef:p,rootId:m}=nO(!1),{store:h}=oO(!1),g=h.useState(`open`),_=h.useState(`disabled`),v=R.useRef(null),b=R.useRef(null),x=i(),S=i(),C=R.useRef(!1);function w(e,t,n){let r=n.type.startsWith(`touch`);p.current={x:e,y:t},s({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),C.current=!1,c.current?.setOpen(!0,St(T,n)),S.start(qO,()=>{C.current=!0})}function E(e){_||(f.current=!0,y(e),w(e.clientX,e.clientY,e.nativeEvent),Re(Ee(v.current),`mouseup`,e=>{if(f.current=!1,!C.current)return;S.clear(),C.current=!1;let t=$e(e);gt(d.current,t)||m&&t&&LO(t)===m||c.current?.setOpen(!1,St(re,e))},{once:!0}))}function D(e){if(!_&&(f.current=!1,e.touches.length===1)){e.stopPropagation();let t=e.touches[0];b.current={x:t.clientX,y:t.clientY},x.start(qO,()=>{b.current&&w(b.current.x,b.current.y,e.nativeEvent)})}}function O(e){if(x.isStarted()&&b.current&&e.touches.length===1){let t=e.touches[0],n=Math.abs(t.clientX-b.current.x),r=Math.abs(t.clientY-b.current.y);(n>10||r>10)&&x.clear()}}function k(){x.clear(),b.current=null}return R.useEffect(()=>{function e(e){if(_)return;let t=$e(e);(gt(v.current,t)||gt(l.current,t)||gt(u.current,t))&&e.preventDefault()}return Re(Ee(v.current),`contextmenu`,e)},[u,_,l]),N(`div`,e,{state:{open:g},ref:[v,t],props:[{onContextMenu:E,onTouchStart:D,onTouchMove:O,onTouchEnd:k,onTouchCancel:k,style:{WebkitTouchCallout:`none`}},o],stateAttributesMapping:st})});function YO(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(KO,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function XO(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(JO,{"data-slot":`context-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function ZO(e){let t=(0,z.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=E(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,L.jsx)(vO,{"data-slot":`context-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,L.jsx)(xO,{children:(0,L.jsx)(wO,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function QO(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(fO,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function $O(e){let t=(0,z.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=E(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,L.jsx)(pO,{"data-slot":`context-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function ek(e){let t=(0,z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=E(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,L.jsx)(mO,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function tk(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(NO,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function nk(e){let t=(0,z.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=E(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(qr,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,L.jsxs)(GO,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function rk(e){let t=(0,z.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?-3:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=E(`w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;return t[9]!==c||t[10]!==l||t[11]!==r||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,L.jsx)(ZO,{"data-slot":`context-menu-sub-content`,className:f,align:c,alignOffset:l,side:u,sideOffset:d,...r}),t[9]=c,t[10]=l,t[11]=r,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function ik(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(WO,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ak=`after:transition-colors after:duration-150 hover:after:bg-primary focus-visible:after:bg-primary active:after:bg-primary`,ok=`after:transition-colors after:duration-150 hover:group-data-[collapsible=offcanvas]:after:bg-primary focus-visible:group-data-[collapsible=offcanvas]:after:bg-primary active:group-data-[collapsible=offcanvas]:after:bg-primary`,sk=`data-composite-item-active`,ck=[];function lk(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,onLoop:i,dense:a=!1,orientation:o=`both`,direction:s,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:u,enableHomeAndEndKeys:f=!1,stopEventPropagation:m=!1,disabledIndices:h,modifierKeys:g=ck}=e,[_,v]=R.useState(0),y=n>1,b=R.useRef(null),S=it(b,u),C=R.useRef([]),w=R.useRef(!1),T=c??_,E=ke((e,t=!1)=>{if((l??v)(e),t){let t=C.current[e];Jt(b.current,t,s,o)}}),D=ke(e=>{if(e.size===0||w.current)return;w.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&E(r),Jt(b.current,n,s,o)}),O=ke((e,t,n)=>i?i?.(e,t,n,C):n),k=R.useMemo(()=>({"aria-orientation":o===`both`?void 0:o,ref:S,onFocus(e){let t=b.current,n=$e(e.nativeEvent);!t||n==null||!At(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let c=f?jt:Nt;if(!c.has(e.key)||uk(e,g)||!b.current)return;let l=s===`rtl`,u=l?Bt:Ht,_={horizontal:u,vertical:Vt,both:u}[o],v=l?Ht:Bt,S={horizontal:v,vertical:Mt,both:v}[o],w=$e(e.nativeEvent);if(w!=null&&At(w)&&!nv(w)){let t=w.selectionStart,n=w.selectionEnd,r=w.value??``;if(t==null||e.shiftKey||t!==n||e.key!==S&&t<r.length||e.key!==_&&t>0)return}let D=T,k=at(C,h),A=x(C,h);if(y){let i=t||Array.from({length:C.current.length},()=>({width:1,height:1})),s=oe(i,n,a),c=s.findIndex(e=>e!=null&&!fe(C.current,e,h)),u=s.reduce((e,t,n)=>t!=null&&!fe(C.current,t,h)?n:e,-1);D=s[d(s.map(e=>e==null?null:C.current[e]),{event:e,orientation:o,loopFocus:r,onLoop:O,cols:n,disabledIndices:le([...h||C.current.map((e,t)=>fe(C.current,t)?t:void 0),void 0],s),minIndex:c,maxIndex:u,prevIndex:ie(T>A?k:T,i,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:l})]}let ee={horizontal:[u],vertical:[Vt],both:[u,Vt]}[o],j={horizontal:[v],vertical:[Mt],both:[v,Mt]}[o],M=y?c:{horizontal:f?Wt:Pt,vertical:f?Lt:Gt,both:c}[o];f&&(e.key===`Home`?D=k:e.key===`End`&&(D=A)),D===T&&(ee.includes(e.key)||j.includes(e.key))&&(r&&D===A&&ee.includes(e.key)?(D=k,i&&(D=i(e,T,D,C))):r&&D===k&&j.includes(e.key)?(D=A,i&&(D=i(e,T,D,C))):D=p(C.current,{startingIndex:D,decrement:j.includes(e.key),disabledIndices:h})),D!==T&&!me(C.current,D)&&(m&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),E(D,!0),queueMicrotask(()=>{C.current[D]?.focus()}))}}),[n,a,s,h,C,f,T,y,t,r,i,O,S,g,E,o,m]);return R.useMemo(()=>({props:k,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:C,disabledIndices:h,onMapChange:D,relayKeyboardEvent:k.onKeyDown}),[k,T,E,C,h,D])}function uk(e,t){for(let n of Ut.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function dk(e){let{render:t,className:n,style:r,refs:i=se,props:a=se,state:o=m,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,dense:d,itemSizes:f,loopFocus:p,onLoop:h,cols:g,enableHomeAndEndKeys:_,onMapChange:v,stopEventPropagation:y=!0,rootRef:b,disabledIndices:x,modifierKeys:S,highlightItemOnHover:C=!1,tag:w=`div`,...T}=e,{props:E,highlightedIndex:D,onHighlightedIndexChange:O,elementsRef:k,onMapChange:A,relayKeyboardEvent:ee}=lk({itemSizes:f,cols:g,loopFocus:p,onLoop:h,dense:d,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:b,stopEventPropagation:y,enableHomeAndEndKeys:_,direction:P(),disabledIndices:x,modifierKeys:S}),j=N(w,e,{state:o,ref:i,props:[E,...a,T],stateAttributesMapping:s}),M=R.useMemo(()=>({highlightedIndex:D,onHighlightedIndexChange:O,highlightItemOnHover:C,relayKeyboardEvent:ee}),[D,O,C,ee]);return(0,L.jsx)($t.Provider,{value:M,children:(0,L.jsx)(j_,{elementsRef:k,onMapChange:e=>{v?.(e),A(e)},children:j})})}function fk(e){return e.replace(/&(#x[\da-f]+|#\d+|amp|lt|gt|quot|apos|#39);/gi,(e,t)=>{switch(t.toLowerCase()){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;case`quot`:return`"`;case`apos`:case`#39`:return`'`;default:{let n=t.toLowerCase().startsWith(`#x`)?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(n)?String.fromCodePoint(n):e}}})}function pk(e,t){return RegExp(`${t}="([^"]*)"`).exec(e)?.[1]}function mk(e){if(!e)return;let t=e.split(/\s+/).filter(e=>e===`line`);return t.length>0?t.join(` `):void 0}function hk(e){return/^var\(--[A-Za-z0-9-]+(?:,\s*var\(--[A-Za-z0-9-]+\))?\)$/.test(e)}function gk(e){if(e)for(let t of e.split(`;`)){let[e,...n]=t.split(`:`),r=e?.trim().toLowerCase(),i=n.join(`:`).trim();if(r===`color`&&hk(i))return{color:i}}}function _k(e){let t={type:`span`,key:0,children:[]},n=[t],r=0;for(let i of e.matchAll(/<span\b[^>]*>|<\/span>|[^<]+/g)){let e=i[0],a=n.at(-1)??t;if(e.startsWith(`<span`)){r+=1;let t={type:`span`,key:r,className:mk(pk(e,`class`)),style:gk(pk(e,`style`)),children:[]};a.children.push(t),n.push(t);continue}if(e===`</span>`){n.length>1&&n.pop();continue}a.children.push(fk(e))}return t.children}function vk(e){return typeof e==`string`?e:(0,L.jsx)(`span`,{className:e.className,style:e.style,children:e.children.map(vk)},e.key)}function yk(e){let t=(0,z.c)(8),{className:n,html:r,language:i}=e,a=i&&`language-${i}`,o;t[0]!==n||t[1]!==a?(o=E(`shiki`,a,n),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;t[3]===r?s=t[4]:(s=_k(r).map(vk),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,L.jsx)(`code`,{className:o,children:s}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}var bk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sk={};function Ck(e,t){return((t||Sk).jsx?xk:bk).test(e)}var wk=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
281
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Tk=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(wk());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Ek=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Dk=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Tk()),r=Ek();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Ok=Ak(`end`),kk=Ak(`start`);function Ak(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function jk(e){let t=kk(e),n=Ok(e);if(t&&n)return{start:t,end:n}}function Mk(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Pk(e.position):`start`in e||`end`in e?Pk(e):`line`in e||`column`in e?Nk(e):``}function Nk(e){return Fk(e&&e.line)+`:`+Fk(e&&e.column)}function Pk(e){return Nk(e&&e.start)+`-`+Nk(e&&e.end)}function Fk(e){return e&&typeof e==`number`?e:1}var Ik=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Mk(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ik.prototype.file=``,Ik.prototype.name=``,Ik.prototype.reason=``,Ik.prototype.message=``,Ik.prototype.stack=``,Ik.prototype.column=void 0,Ik.prototype.line=void 0,Ik.prototype.ancestors=void 0,Ik.prototype.cause=void 0,Ik.prototype.fatal=void 0,Ik.prototype.place=void 0,Ik.prototype.ruleId=void 0,Ik.prototype.source=void 0;var Lk=t(Dk(),1),Rk={}.hasOwnProperty,zk=new Map,Bk=/[A-Z]/g,Vk=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Hk=new Set([`td`,`th`]),Uk=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Wk(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=tA(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=eA(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ma:pa,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Gk(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Gk(e,t,n){if(t.type===`element`)return Kk(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return qk(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Yk(e,t,n);if(t.type===`mdxjsEsm`)return Jk(e,t);if(t.type===`root`)return Xk(e,t,n);if(t.type===`text`)return Zk(e,t)}function Kk(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ma,e.schema=i),e.ancestors.push(t);let a=sA(e,t.tagName,!1),o=nA(e,t),s=iA(e,t);return Vk.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Xa(e):!0})),Qk(e,o,a,t),$k(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qk(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}cA(e,t.position)}function Jk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cA(e,t.position)}function Yk(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ma,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:sA(e,t.name,!0),o=rA(e,t),s=iA(e,t);return Qk(e,o,a,t),$k(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Xk(e,t,n){let r={};return $k(r,iA(e,t)),e.create(t,e.Fragment,r,n)}function Zk(e,t){return t.value}function Qk(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $k(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eA(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function tA(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=kk(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function nA(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Rk.call(t.properties,i)){let a=aA(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Hk.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function rA(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else cA(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else cA(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function iA(e,t){let n=[],r=-1,i=e.passKeys?new Map:zk;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Gk(e,a,o);s!==void 0&&n.push(s)}return n}function aA(e,t,n){let r=ua(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ka(n):Ja(n)),r.property===`style`){let t=typeof n==`object`?n:oA(e,String(n));return e.stylePropertyNameCase===`css`&&(t=lA(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?oa[r.property]||r.property:r.attribute,n]}}function oA(e,t){try{return(0,Lk.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ik("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Uk+`#cannot-parse-style-attribute`,r}}function sA(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Ck(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Ck(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Rk.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);cA(e)}function cA(e,t){let n=new Ik("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Uk+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function lA(e){let t={},n;for(n in e)Rk.call(e,n)&&(t[uA(n)]=e[n]);return t}function uA(e){let t=e.replace(Bk,dA);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function dA(e){return`-`+e.toLowerCase()}var fA={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`]},pA={};function mA(e,t){let n=t||pA;return hA(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function hA(e,t,n){if(_A(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return gA(e.children,t,n)}return Array.isArray(e)?gA(e,t,n):``}function gA(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=hA(e[i],t,n);return r.join(``)}function _A(e){return!!(e&&typeof e==`object`)}var vA=document.createElement(`i`);function yA(e){let t=`&`+e+`;`;vA.innerHTML=t;let n=vA.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function bA(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function xA(e,t){return e.length>0?(bA(e,e.length,0,t),e):t}var SA={}.hasOwnProperty;function CA(e){let t={},n=-1;for(;++n<e.length;)wA(t,e[n]);return t}function wA(e,t){let n;for(n in t){let r=(SA.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){SA.call(r,a)||(r[a]=[]);let e=i[a];TA(r[a],Array.isArray(e)?e:e?[e]:[])}}}function TA(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);bA(e,0,0,r)}function EA(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function DA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var OA=zA(/[A-Za-z]/),kA=zA(/[\dA-Za-z]/),AA=zA(/[#-'*+\--9=?A-Z^-~]/);function jA(e){return e!==null&&(e<32||e===127)}var MA=zA(/\d/),NA=zA(/[\dA-Fa-f]/),PA=zA(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function FA(e){return e!==null&&(e<0||e===32)}function IA(e){return e===-2||e===-1||e===32}var LA=zA(/\p{P}|\p{S}/u),RA=zA(/\s/);function zA(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function BA(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&kA(e.charCodeAt(n+1))&&kA(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function VA(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return IA(r)?(e.enter(n),s(r)):t(r)}function s(r){return IA(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var HA={tokenize:UA};function UA(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),VA(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return W(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var WA={tokenize:KA},GA={tokenize:qA};function KA(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return bA(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(GA,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(GA,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return W(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;bA(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function qA(e,t,n){return VA(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function JA(e){if(e===null||FA(e)||RA(e))return 1;if(LA(e))return 2}function YA(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var XA={name:`attention`,resolveAll:ZA,tokenize:QA};function ZA(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};$A(d,-c),$A(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=xA(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=xA(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=xA(l,YA(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=xA(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=xA(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,bA(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function QA(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=JA(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=JA(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function $A(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ej={name:`autolink`,tokenize:tj};function tj(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return OA(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||kA(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||kA(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||jA(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):AA(t)?(e.consume(t),l):n(t)}function u(e){return kA(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||kA(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var nj={partial:!0,tokenize:rj};function rj(e,t,n){return r;function r(t){return IA(t)?VA(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||W(e)?t(e):n(e)}}var ij={continuation:{tokenize:oj},exit:sj,name:`blockQuote`,tokenize:aj};function aj(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return IA(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function oj(e,t,n){let r=this;return i;function i(t){return IA(t)?VA(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ij,t,n)(r)}}function sj(e){e.exit(`blockQuote`)}var cj={name:`characterEscape`,tokenize:lj};function lj(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return PA(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var uj={name:`characterReference`,tokenize:dj};function dj(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=kA,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=NA,u):(e.enter(`characterReferenceValue`),a=7,o=MA,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===kA&&!yA(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var fj={partial:!0,tokenize:hj},pj={concrete:!0,name:`codeFenced`,tokenize:mj};function mj(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),IA(t)?VA(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||W(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(fj,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):IA(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),VA(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||W(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&IA(t)?VA(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||W(t)?e.check(fj,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||W(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),IA(t)?VA(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),IA(t)?VA(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||W(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function hj(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var gj={name:`codeIndented`,tokenize:vj},_j={partial:!0,tokenize:yj};function vj(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),VA(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):W(t)?e.attempt(_j,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||W(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function yj(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):VA(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):W(e)?i(e):n(e)}}var bj={name:`codeText`,previous:Sj,resolve:xj,tokenize:Cj};function xj(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Sj(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Cj(e,t,n){this;let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||W(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var wj=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Tj(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Tj(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Tj(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Tj(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Tj(this.left,t.reverse())}}};function Tj(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ej(e){let t={},n=-1,r,i,a,o,s,c,l,u=new wj(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Dj(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return bA(e,0,1/0,u.slice(0)),!l}function Dj(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Oj={resolve:Aj,tokenize:jj},kj={partial:!0,tokenize:Mj};function Aj(e){return Ej(e),e}function jj(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):W(t)?e.check(kj,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Mj(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),VA(e,a,`linePrefix`)}function a(i){if(i===null||W(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Nj(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||jA(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||W(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||FA(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||jA(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Pj(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):W(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||W(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!IA(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Fj(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),VA(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||W(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ij(e,t){let n;return r;function r(i){return W(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):IA(i)?VA(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Lj={name:`definition`,tokenize:zj},Rj={partial:!0,tokenize:Bj};function zj(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Pj.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=DA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return FA(t)?Ij(e,l)(t):l(t)}function l(t){return Nj(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Rj,d,d)(t)}function d(t){return IA(t)?VA(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||W(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Bj(e,t,n){return r;function r(t){return FA(t)?Ij(e,i)(t):n(t)}function i(t){return Fj(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return IA(t)?VA(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||W(e)?t(e):n(e)}}var Vj={name:`hardBreakEscape`,tokenize:Hj};function Hj(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return W(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Uj={name:`headingAtx`,resolve:Wj,tokenize:Gj};function Wj(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},bA(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Gj(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||FA(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||W(n)?(e.exit(`atxHeading`),t(n)):IA(n)?VA(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||FA(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Kj=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),qj=[`pre`,`script`,`style`,`textarea`],Jj={concrete:!0,name:`htmlFlow`,resolveTo:Zj,tokenize:Qj},Yj={partial:!0,tokenize:eM},Xj={partial:!0,tokenize:$j};function Zj(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qj(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):OA(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):OA(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return OA(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||FA(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&qj.includes(l)?(i=1,r.interrupt?t(s):O(s)):Kj.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||kA(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return IA(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||OA(t)?(e.consume(t),b):IA(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||kA(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):IA(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):IA(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||W(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||FA(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||IA(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||W(t)?O(t):IA(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):W(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Yj,ie,k)(t)):t===null||W(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Xj,A,ie)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||W(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),N):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return qj.includes(n)?(e.consume(t),re):O(t)}return OA(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):O(t)}function re(t){return t===null||W(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function $j(e,t,n){let r=this;return i;function i(t){return W(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function eM(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(nj,t,n)}}var tM={name:`htmlText`,tokenize:nM};function nM(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):OA(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):OA(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):W(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):W(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):W(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):W(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return OA(t)?(e.consume(t),S):n(t)}function S(t){return t===45||kA(t)?(e.consume(t),S):C(t)}function C(t){return W(t)?(o=C,M(t)):IA(t)?(e.consume(t),C):j(t)}function w(t){return t===45||kA(t)?(e.consume(t),w):t===47||t===62||FA(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||OA(t)?(e.consume(t),E):W(t)?(o=T,M(t)):IA(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||kA(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):W(t)?(o=D,M(t)):IA(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):W(t)?(o=O,M(t)):IA(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):W(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||FA(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||FA(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return IA(t)?VA(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var rM={name:`labelEnd`,resolveAll:sM,resolveTo:cM,tokenize:lM},iM={tokenize:uM},aM={tokenize:dM},oM={tokenize:fM};function sM(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&bA(e,0,e.length,n),e}function cM(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=xA(s,e.slice(a+1,a+r+3)),s=xA(s,[[`enter`,u,t]]),s=xA(s,YA(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=xA(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=xA(s,e.slice(o+1)),s=xA(s,[[`exit`,c,t]]),bA(e,a,e.length,s),e}function lM(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(DA(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(iM,u,o?u:d)(t):t===91?e.attempt(aM,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(oM,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function uM(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return FA(t)?Ij(e,a)(t):a(t)}function a(t){return t===41?u(t):Nj(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return FA(t)?Ij(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Fj(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return FA(t)?Ij(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function dM(e,t,n){let r=this;return i;function i(t){return Pj.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(DA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function fM(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var pM={name:`labelStartImage`,resolveAll:rM.resolveAll,tokenize:mM};function mM(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var hM={name:`labelStartLink`,resolveAll:rM.resolveAll,tokenize:gM};function gM(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var _M={name:`lineEnding`,tokenize:vM};function vM(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),VA(e,t,`linePrefix`)}}var yM={name:`thematicBreak`,tokenize:bM};function bM(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||W(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),IA(t)?VA(e,s,`whitespace`)(t):s(t))}}var xM={continuation:{tokenize:TM},exit:DM,name:`list`,tokenize:wM},SM={partial:!0,tokenize:OM},CM={partial:!0,tokenize:EM};function wM(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:MA(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(yM,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return MA(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(nj,r.interrupt?n:u,e.attempt(SM,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return IA(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function TM(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(nj,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,VA(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!IA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CM,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,VA(e,e.attempt(xM,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function EM(e,t,n){let r=this;return VA(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function DM(e){e.exit(this.containerState.type)}function OM(e,t,n){let r=this;return VA(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!IA(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var kM={name:`setextUnderline`,resolveTo:AM,tokenize:jM};function AM(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function jM(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),IA(t)?VA(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||W(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var MM={tokenize:NM};function NM(e){let t=this,n=e.attempt(nj,r,e.attempt(this.parser.constructs.flowInitial,i,VA(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Oj,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var PM={resolveAll:RM()},FM=LM(`string`),IM=LM(`text`);function LM(e){return{resolveAll:RM(e===`text`?zM:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function RM(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function zM(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var BM=e({attentionMarkers:()=>JM,contentInitial:()=>HM,disable:()=>YM,document:()=>VM,flow:()=>WM,flowInitial:()=>UM,insideSpan:()=>qM,string:()=>GM,text:()=>KM}),VM={42:xM,43:xM,45:xM,48:xM,49:xM,50:xM,51:xM,52:xM,53:xM,54:xM,55:xM,56:xM,57:xM,62:ij},HM={91:Lj},UM={[-2]:gj,[-1]:gj,32:gj},WM={35:Uj,42:yM,45:[kM,yM],60:Jj,61:kM,95:yM,96:pj,126:pj},GM={38:uj,92:cj},KM={[-5]:_M,[-4]:_M,[-3]:_M,33:pM,38:uj,42:XA,60:[ej,tM],91:hM,92:[Vj,cj],93:rM,95:XA,96:bj},qM={null:[XA,PM]},JM={null:[42,95]},YM={null:[]};function XM(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=xA(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=YA(a,l.events,l),l.events):[]}function f(e,t){return QM(p(e),t)}function p(e){return ZM(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){W(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&bA(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZM(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function QM(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
282
|
+
`;break;case-3:o=`\r
|
|
283
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function $M(e){let t={constructs:CA([BM,...(e||{}).extensions||[]]),content:n(HA),defined:[],document:n(WA),flow:n(MM),lazy:{},string:n(FM),text:n(IM)};return t;function n(e){return n;function n(n){return XM(t,e,n)}}}function eN(e){for(;!Ej(e););return e}var tN=/[\0\t\n\r]/g;function nN(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(tN.lastIndex=u,c=tN.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var rN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iN(e){return e.replace(rN,aN)}function aN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return EA(n.slice(t?2:1),t?16:10)}return yA(n)||e}var oN={}.hasOwnProperty;function sN(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),cN(n)(eN($M(n).document().write(nN()(e,t,!0))))}function cN(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ye),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(he),blockQuote:a(de),characterEscape:T,characterReference:T,codeFenced:a(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(fe,o),codeText:a(F,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(me),hardBreakEscape:a(ge),hardBreakTrailing:a(ge),htmlFlow:a(_e,o),htmlFlowData:T,htmlText:a(_e,o),htmlTextData:T,image:a(ve),label:o,link:a(ye),listItem:a(xe),listItemValue:f,listOrdered:a(be,d),listUnordered:a(be),paragraph:a(Se),reference:ae,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(he),strong:a(Ce),thematicBreak:a(Te)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ee),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(M),label:ne,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:P,resourceDestinationString:N,resourceTitleString:re,resource:ie,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};uN(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];oN.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||fN).call(a,void 0,e[0])}for(r.position={start:lN(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:lN(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:lN(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||fN).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Mk({start:e.start,end:e.end})+`): it’s not open`);n.position.end=lN(e.end)}function u(){return mA(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DA(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=we(),n.position={start:lN(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=lN(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=lN(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=iN(t),n.identifier=DA(t).toLowerCase()}function ne(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function N(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ie(){this.data.inReference=void 0}function ae(){this.data.referenceType=`collapsed`}function P(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=EA(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=yA(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=lN(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[]}}function fe(){return{type:`code`,lang:null,meta:null,value:``}}function F(){return{type:`inlineCode`,value:``}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function me(){return{type:`emphasis`,children:[]}}function he(){return{type:`heading`,depth:0,children:[]}}function ge(){return{type:`break`}}function _e(){return{type:`html`,value:``}}function ve(){return{type:`image`,title:null,url:``,alt:null}}function ye(){return{type:`link`,title:null,url:``,children:[]}}function be(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function lN(e){return{line:e.line,column:e.column,offset:e.offset}}function uN(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?uN(e,r):dN(e,r)}}function dN(e,t){let n;for(n in t)if(oN.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function fN(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Mk({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mk({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Mk({start:t.start,end:t.end})+`) is still open`)}function pN(e){let t=this;t.parser=n;function n(n){return sN(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function mN(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hN(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
284
|
+
`}]}function gN(e,t){let n=t.value?t.value+`
|
|
285
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function _N(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vN(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yN(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=BA(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function bN(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xN(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function SN(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function CN(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SN(e,t);let i={src:BA(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function wN(e,t){let n={src:BA(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function TN(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function EN(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SN(e,t);let i={href:BA(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function DN(e,t){let n={href:BA(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ON(e,t,n){let r=e.all(t),i=n?kN(n):AN(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
286
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
287
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function kN(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=AN(n[r])}return t}function AN(e){return e.spread??e.children.length>1}function jN(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function MN(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NN(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PN(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FN(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=kk(t.children[1]),o=Ok(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function IN(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function LN(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var RN=9,zN=32;function BN(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(VN(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(VN(t.slice(i),i>0,!1)),a.join(``)}function VN(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===RN||t===zN;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===RN||t===zN;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function HN(e,t){let n={type:`text`,value:BN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function UN(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var WN={blockquote:mN,break:hN,code:gN,delete:_N,emphasis:vN,footnoteReference:yN,heading:bN,html:xN,imageReference:CN,image:wN,inlineCode:TN,linkReference:EN,link:DN,listItem:ON,list:jN,paragraph:MN,root:NN,strong:PN,table:FN,tableCell:LN,tableRow:IN,text:HN,thematicBreak:UN,toml:GN,yaml:GN,definition:GN,footnoteDefinition:GN};function GN(){}var KN=typeof self==`object`?self:globalThis,qN=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new KN[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new KN[a](o),i)};return r},JN=e=>qN(new Map,e)(0),YN=``,{toString:XN}={},{keys:ZN}=Object,QN=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=XN.call(e).slice(8,-1);switch(n){case`Array`:return[1,YN];case`Object`:return[2,YN];case`Date`:return[3,YN];case`RegExp`:return[4,YN];case`Map`:return[5,YN];case`Set`:return[6,YN];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},$N=([e,t])=>e===0&&(t===`function`||t===`symbol`),eP=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=QN(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ZN(r))(e||!$N(QN(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!($N(QN(n))||$N(QN(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!$N(QN(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},tP=(e,{json:t,lossy:n}={})=>{let r=[];return eP(!(t||n),!!t,new Map,r)(e),r},nP=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?JN(tP(e,t)):structuredClone(e):(e,t)=>JN(tP(e,t));function rP(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function iP(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function aP(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||rP,r=e.options.footnoteBackLabel||iP,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=BA(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...nP(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
288
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
289
|
+
`}]}}var oP=(function(e){if(e==null)return dP;if(typeof e==`function`)return uP(e);if(typeof e==`object`)return Array.isArray(e)?sP(e):cP(e);if(typeof e==`string`)return lP(e);throw Error(`Expected function, string, or object as test`)});function sP(e){let t=[],n=-1;for(;++n<e.length;)t[n]=oP(e[n]);return uP(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function cP(e){let t=e;return uP(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function lP(e){return uP(t);function t(t){return t&&t.type===e}}function uP(e){return t;function t(t,n,r){return!!(fP(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function dP(){return!0}function fP(e){return typeof e==`object`&&!!e&&`type`in e}function pP(e){return e}var mP=[];function hP(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=oP(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+pP(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=mP,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=gP(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function gP(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?mP:[e]}function _P(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),hP(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var vP={}.hasOwnProperty,yP={};function bP(e,t){let n=t||yP,r=new Map,i=new Map,a={all:s,applyData:SP,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...WN,...n.handlers},one:o,options:n,patch:xP,wrap:wP};return _P(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(vP.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=nP(n);return r.children=a.all(e),r}return nP(e)}return(a.options.unknownHandler||CP)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=TP(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=TP(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function xP(e,t){e.position&&(t.position=jk(e))}function SP(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,nP(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function CP(e,t){let n=t.data||{},r=`value`in t&&!(vP.call(n,`hProperties`)||vP.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wP(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
290
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
291
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
292
|
+
`}),n}function TP(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EP(e,t){let n=bP(e,t),r=n.one(e,void 0),i=aP(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
293
|
+
`},i)),a}function DP(e,t){return e&&`run`in e?async function(n,r){let i=EP(n,{file:r,...t});await e.run(i,r)}:function(n,r){return EP(n,{file:r,...e||t})}}function OP(e){if(e)throw e}var kP=t(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function AP(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jP(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?MP(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function MP(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var NP={basename:PP,dirname:FP,extname:IP,join:LP,sep:`/`};function PP(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);BP(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function FP(e){if(BP(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function IP(e){BP(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function LP(...e){let t=-1,n;for(;++t<e.length;)BP(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:RP(n)}function RP(e){BP(e);let t=e.codePointAt(0)===47,n=zP(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function zP(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function BP(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var VP={cwd:HP};function HP(){return`/`}function UP(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function WP(e){if(typeof e==`string`)e=new URL(e);else if(!UP(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return GP(e)}function GP(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var KP=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],qP=class{constructor(e){let t;t=e?UP(e)?{path:e}:typeof e==`string`||ZP(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:VP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<KP.length;){let e=KP[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)KP.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?NP.basename(this.path):void 0}set basename(e){YP(e,`basename`),JP(e,`basename`),this.path=NP.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?NP.dirname(this.path):void 0}set dirname(e){XP(this.basename,`dirname`),this.path=NP.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?NP.extname(this.path):void 0}set extname(e){if(JP(e,`extname`),XP(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=NP.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){UP(e)&&(e=WP(e)),YP(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?NP.basename(this.path,this.extname):void 0}set stem(e){YP(e,`stem`),JP(e,`stem`),this.path=NP.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ik(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function JP(e,t){if(e&&e.includes(NP.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+NP.sep+"`")}function YP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function XP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function ZP(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QP=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),$P={}.hasOwnProperty,eF=new class e extends QP{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=jP()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,kP.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(rF(`data`,this.frozen),this.namespace[e]=t,this):$P.call(this.namespace,e)&&this.namespace[e]||void 0:e?(rF(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=oF(e),n=this.parser||this.Parser;return tF(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),tF(`process`,this.parser||this.Parser),nF(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=oF(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);cF(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),tF(`processSync`,this.parser||this.Parser),nF(`processSync`,this.compiler||this.Compiler),this.process(e,r),aF(`processSync`,`process`,t),n;function r(e,r){t=!0,OP(e),n=r}}run(e,t,n){iF(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=oF(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),aF(`runSync`,`run`,n),r;function i(e,t){OP(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=oF(t),r=this.compiler||this.Compiler;return nF(`stringify`,r),iF(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(rF(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,kP.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];AP(o)&&AP(r)&&(r=(0,kP.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function tF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function nF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function rF(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function iF(e){if(!AP(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function aF(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function oF(e){return sF(e)?e:new qP(e)}function sF(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function cF(e){return typeof e==`string`||lF(e)}function lF(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var uF=[],dF={allowDangerousHtml:!0},fF=/^(https?|ircs?|mailto|xmpp)$/i,pF=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function mF(e){let t=hF(e),n=gF(e);return _F(t.runSync(t.parse(n),n),e)}function hF(e){let t=e.rehypePlugins||uF,n=e.remarkPlugins||uF,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dF}:dF;return eF().use(pN).use(n).use(DP,r).use(t)}function gF(e){let t=e.children||``,n=new qP;return typeof t==`string`?n.value=t:``+t,n}function _F(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||vF;for(let e of pF)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return _P(e,l),Wk(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in fA)if(Object.hasOwn(fA,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=fA[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function vF(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||fF.test(e.slice(0,t))?e:``}var yF=/[#.]/g;function bF(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){yF.lastIndex=i;let e=yF.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function xF(e,t,n){let r=n?DF(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=bF(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,SF(i))a.unshift(i);else for(let[t,n]of Object.entries(i))CF(e,o.properties,t,n)}for(let e of a)wF(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function SF(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function CF(e,t,n,r){let i=ua(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?qa(r):i.commaSeparated?Ga(r):i.commaOrSpaceSeparated?qa(Ga(r).join(` `)):TF(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?EF(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(TF(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function wF(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)wF(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?wF(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function TF(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Ri(n)===Ri(t)))return!0}return n}function EF(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function DF(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var OF=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),kF=xF(pa,`div`),AF=xF(ma,`g`,OF);function jF(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=MF(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=MF(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function MF(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
294
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var NF={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},PF={}.hasOwnProperty,FF=Object.prototype;function IF(e,t){let n=t||{};return LF({file:n.file||void 0,location:!1,schema:n.space===`svg`?ma:pa,verbose:n.verbose||!1},e)}function LF(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},BF(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:RF(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=jF(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},BF(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},BF(e,r,n),n}default:return n=zF(e,t),n}}function RF(e,t){let n=-1,r=[];for(;++n<t.length;){let i=LF(e,t[n]);r.push(i)}return r}function zF(e,t){let n=e.schema;e.schema=t.namespaceURI===NF.svg?ma:pa;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;PF.call(FF,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?AF:kF)(t.tagName,i,RF(e,t.childNodes));if(BF(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&HF(r.startTag),o=r&&r.endTag&&HF(r.endTag),s=LF(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function BF(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=VF(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function VF(e,t,n){let r=HF(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)PF.call(n.attrs,i)&&(r[ua(e.schema,i).property]=HF(n.attrs[i]));n.startTag;let a=HF(n.startTag),o=n.endTag?HF(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function HF(e){let t=UF({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=UF({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function UF(e){return e.line&&e.column?e:void 0}var WF={},GF={}.hasOwnProperty,KF=ga(`type`,{handlers:{root:JF,element:$F,text:ZF,comment:QF,doctype:XF}});function qF(e,t){let n=(t||WF).space;return KF(e,n===`svg`?ma:pa)}function JF(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=tI(e.children,n,t),nI(e,n),n}function YF(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=tI(e.children,n,t),nI(e,n),n}function XF(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return nI(e,t),t}function ZF(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return nI(e,t),t}function QF(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return nI(e,t),t}function $F(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=ma);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&GF.call(e.properties,a)){let t=eI(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:NF[o],childNodes:[],parentNode:null};return s.childNodes=tI(e.children,s,r),nI(e,s),e.tagName===`template`&&e.content&&(s.content=YF(e.content,r)),s}function eI(e,t,n){let r=ua(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ka(n):Ja(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=NF[r.space]}return i}function tI(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=KF(e[r],n);a.parentNode=t,i.push(a)}return i}function nI(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var rI=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),G;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(G||={});var iI={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function aI(e){return e>=55296&&e<=57343}function oI(e){return e>=56320&&e<=57343}function sI(e,t){return(e-55296)*1024+9216+t}function cI(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function lI(e){return e>=64976&&e<=65007||rI.has(e)}var K;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(K||={});var uI=65536,dI=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=uI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(oI(t))return this.pos++,this._addGap(),sI(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,aI(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){cI(e)?this._err(K.controlCharacterInInputStream):lI(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},q;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(q||={});function fI(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var pI=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),mI=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function hI(e){return e>=55296&&e<=57343||e>1114111?65533:mI.get(e)??e}var gI;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(gI||={});var _I=32,vI;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(vI||={});function yI(e){return e>=gI.ZERO&&e<=gI.NINE}function bI(e){return e>=gI.UPPER_A&&e<=gI.UPPER_F||e>=gI.LOWER_A&&e<=gI.LOWER_F}function xI(e){return e>=gI.UPPER_A&&e<=gI.UPPER_Z||e>=gI.LOWER_A&&e<=gI.LOWER_Z||yI(e)}function SI(e){return e===gI.EQUALS||xI(e)}var CI;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(CI||={});var wI;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(wI||={});var TI=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=CI.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=wI.Strict}startEntity(e){this.decodeMode=e,this.state=CI.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case CI.EntityStart:return e.charCodeAt(t)===gI.NUM?(this.state=CI.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=CI.NamedEntity,this.stateNamedEntity(e,t));case CI.NumericStart:return this.stateNumericStart(e,t);case CI.NumericDecimal:return this.stateNumericDecimal(e,t);case CI.NumericHex:return this.stateNumericHex(e,t);case CI.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|_I)===gI.LOWER_X?(this.state=CI.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=CI.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(yI(r)||bI(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(yI(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===gI.SEMI)this.consumed+=1;else if(this.decodeMode===wI.Strict)return 0;return this.emitCodePoint(hI(this.result),this.consumed),this.errors&&(e!==gI.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&vI.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=EI(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===wI.Attribute&&(i===0||SI(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&vI.VALUE_LENGTH)>>14,i!==0){if(a===gI.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==wI.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&vI.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~vI.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case CI.NamedEntity:return this.result!==0&&(this.decodeMode!==wI.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case CI.NumericDecimal:return this.emitNumericEntity(0,2);case CI.NumericHex:return this.emitNumericEntity(0,3);case CI.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case CI.EntityStart:return 0}}};function EI(e,t,n,r){let i=(t&vI.BRANCH_LENGTH)>>7,a=t&vI.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var J;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(J||={});var DI;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(DI||={});var OI;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(OI||={});var Y;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(Y||={});var X;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(X||={});var kI=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function AI(e){return kI.get(e)??X.UNKNOWN}var Z=X,jI={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},MI=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var NI={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function PI(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function FI(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function II(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function LI(e){return II(e)||FI(e)}function RI(e){return LI(e)||PI(e)}function zI(e){return e+32}function BI(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function VI(e){return BI(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function HI(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:aI(e)?K.surrogateCharacterReference:lI(e)?K.noncharacterCharacterReference:cI(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var UI=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new dI(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new TI(pI,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=HI(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:q.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:q.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:q.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:q.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(fI(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=AI(e.tagName),e.type===q.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case q.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case q.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case q.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:q.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=BI(e)?q.WHITESPACE_CHARACTER:e===G.NULL?q.NULL_CHARACTER:q.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(q.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?wI.Attribute:wI.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(LI(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(LI(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Q.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(FI(e)?zI(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){LI(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){LI(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){LI(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:LI(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){LI(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(iI.SCRIPT,!1)&&VI(this.preprocessor.peek(iI.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<iI.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(iI.SCRIPT,!1)&&VI(this.preprocessor.peek(iI.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<iI.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(FI(e)?zI(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(iI.DASH_DASH,!0)?(this._createCommentToken(iI.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(iI.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(iI.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(iI.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(iI.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(FI(e))this._createDoctypeToken(String.fromCharCode(zI(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(FI(e)?zI(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(iI.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(iI.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&RI(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){RI(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},WI=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),GI=new Set([...WI,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),KI=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),qI=new Set([...KI,X.OL,X.UL]),JI=new Set([...KI,X.BUTTON]),YI=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),XI=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),ZI=new Set([X.TR,X.TEMPLATE,X.HTML]),QI=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),$I=new Set([X.TABLE,X.TEMPLATE,X.HTML]),eL=new Set([X.TD,X.TH]),tL=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==J.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(MI,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(eL,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo($I,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(QI,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(ZI,J.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===X.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===X.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(XI.has(r))return!1;break;case J.MATHML:if(YI.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,KI)}hasInListItemScope(e){return this.hasInDynamicScope(e,qI)}hasInButtonScope(e){return this.hasInDynamicScope(e,JI)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(MI.has(t))return!0;if(KI.has(t))return!1;break;case J.SVG:if(XI.has(t))return!1;break;case J.MATHML:if(YI.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&WI.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&GI.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&GI.has(this.currentTagId);)this.pop()}},nL=3,rL;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(rL||={});var iL={type:rL.Marker},aL=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===rL.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<nL)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<nL)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=nL&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(iL)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:rL.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:rL.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(iL);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===rL.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===rL.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===rL.Element&&t.element===e)}},oL={createDocument(){return{nodeName:`#document`,mode:OI.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};oL.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(oL.isTextNode(n)){n.value+=t;return}}oL.appendChild(e,oL.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&oL.isTextNode(r)?r.value+=t:oL.insertBefore(e,oL.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},sL=`html`,cL=`about:legacy-compat`,lL=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,uL=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),dL=[...uL,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],fL=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),pL=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],mL=[...pL,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function hL(e,t){return t.some(t=>e.startsWith(t))}function gL(e){return e.name===sL&&e.publicId===null&&(e.systemId===null||e.systemId===cL)}function _L(e){if(e.name!==sL)return OI.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===lL)return OI.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),fL.has(n))return OI.QUIRKS;let e=t===null?dL:uL;if(hL(n,e))return OI.QUIRKS;if(e=t===null?pL:mL,hL(n,e))return OI.LIMITED_QUIRKS}return OI.NO_QUIRKS}var vL={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},yL=`definitionurl`,bL=`definitionURL`,xL=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),SL=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),CL=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),wL=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function TL(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===DI.COLOR||e===DI.SIZE||e===DI.FACE)||wL.has(t)}function EL(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===yL){e.attrs[t].name=bL;break}}function DL(e){for(let t=0;t<e.attrs.length;t++){let n=xL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function OL(e){for(let t=0;t<e.attrs.length;t++){let n=SL.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function kL(e){let t=CL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=AI(e.tagName))}function AL(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function jL(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===DI.ENCODING){let t=n[e].value.toLowerCase();return t===vL.TEXT_HTML||t===vL.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function ML(e,t,n,r){return(!r||r===J.HTML)&&jL(e,t,n)||(!r||r===J.MATHML)&&AL(e,t)}var NL=`hidden`,PL=8,FL=3,$;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})($||={});var IL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},LL=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),RL={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:oL,onParseError:null},zL=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...RL,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new UI(this.options,this),this.activeFormattingElements=new aL(this.treeAdapter),this.fragmentContextID=n?AI(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new tL(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...RL,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??IL,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=NI.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=NI.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=NI.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=NI.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=NI.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===q.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case q.CHARACTER:this.onCharacter(e);break;case q.NULL_CHARACTER:this.onNullCharacter(e);break;case q.COMMENT:this.onComment(e);break;case q.DOCTYPE:this.onDoctype(e);break;case q.START_TAG:this._processStartTag(e);break;case q.END_TAG:this.onEndTag(e);break;case q.EOF:this.onEof(e);break;case q.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return ML(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===rL.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return LL.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return jI[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rB(this,e);return}switch(this.insertionMode){case $.INITIAL:QL(this,e);break;case $.BEFORE_HTML:tR(this,e);break;case $.BEFORE_HEAD:iR(this,e);break;case $.IN_HEAD:cR(this,e);break;case $.IN_HEAD_NO_SCRIPT:dR(this,e);break;case $.AFTER_HEAD:mR(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:_R(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:fz(this,e);break;case $.IN_TABLE_TEXT:Tz(this,e);break;case $.IN_COLUMN_GROUP:Mz(this,e);break;case $.AFTER_BODY:Jz(this,e);break;case $.AFTER_AFTER_BODY:eB(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nB(this,e);return}switch(this.insertionMode){case $.INITIAL:QL(this,e);break;case $.BEFORE_HTML:tR(this,e);break;case $.BEFORE_HEAD:iR(this,e);break;case $.IN_HEAD:cR(this,e);break;case $.IN_HEAD_NO_SCRIPT:dR(this,e);break;case $.AFTER_HEAD:mR(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:fz(this,e);break;case $.IN_COLUMN_GROUP:Mz(this,e);break;case $.AFTER_BODY:Jz(this,e);break;case $.AFTER_AFTER_BODY:eB(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){qL(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:qL(this,e);break;case $.IN_TABLE_TEXT:Ez(this,e);break;case $.AFTER_BODY:JL(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:YL(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:ZL(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case $.IN_TABLE_TEXT:Ez(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?aB(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:QL(this,e);break;case $.BEFORE_HTML:$L(this,e);break;case $.BEFORE_HEAD:nR(this,e);break;case $.IN_HEAD:aR(this,e);break;case $.IN_HEAD_NO_SCRIPT:lR(this,e);break;case $.AFTER_HEAD:fR(this,e);break;case $.IN_BODY:XR(this,e);break;case $.IN_TABLE:xz(this,e);break;case $.IN_TABLE_TEXT:Ez(this,e);break;case $.IN_CAPTION:Oz(this,e);break;case $.IN_COLUMN_GROUP:Az(this,e);break;case $.IN_TABLE_BODY:Nz(this,e);break;case $.IN_ROW:Fz(this,e);break;case $.IN_CELL:Lz(this,e);break;case $.IN_SELECT:zz(this,e);break;case $.IN_SELECT_IN_TABLE:Vz(this,e);break;case $.IN_TEMPLATE:Uz(this,e);break;case $.AFTER_BODY:Kz(this,e);break;case $.IN_FRAMESET:Yz(this,e);break;case $.AFTER_FRAMESET:Zz(this,e);break;case $.AFTER_AFTER_BODY:$z(this,e);break;case $.AFTER_AFTER_FRAMESET:tB(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?oB(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:QL(this,e);break;case $.BEFORE_HTML:eR(this,e);break;case $.BEFORE_HEAD:rR(this,e);break;case $.IN_HEAD:oR(this,e);break;case $.IN_HEAD_NO_SCRIPT:uR(this,e);break;case $.AFTER_HEAD:pR(this,e);break;case $.IN_BODY:cz(this,e);break;case $.TEXT:uz(this,e);break;case $.IN_TABLE:Sz(this,e);break;case $.IN_TABLE_TEXT:Ez(this,e);break;case $.IN_CAPTION:kz(this,e);break;case $.IN_COLUMN_GROUP:jz(this,e);break;case $.IN_TABLE_BODY:Pz(this,e);break;case $.IN_ROW:Iz(this,e);break;case $.IN_CELL:Rz(this,e);break;case $.IN_SELECT:Bz(this,e);break;case $.IN_SELECT_IN_TABLE:Hz(this,e);break;case $.IN_TEMPLATE:Wz(this,e);break;case $.AFTER_BODY:qz(this,e);break;case $.IN_FRAMESET:Xz(this,e);break;case $.AFTER_FRAMESET:Qz(this,e);break;case $.AFTER_AFTER_BODY:eB(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:QL(this,e);break;case $.BEFORE_HTML:tR(this,e);break;case $.BEFORE_HEAD:iR(this,e);break;case $.IN_HEAD:cR(this,e);break;case $.IN_HEAD_NO_SCRIPT:dR(this,e);break;case $.AFTER_HEAD:mR(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:lz(this,e);break;case $.TEXT:dz(this,e);break;case $.IN_TABLE_TEXT:Ez(this,e);break;case $.IN_TEMPLATE:Gz(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:XL(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:gR(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:fz(this,e);break;case $.IN_TABLE_TEXT:wz(this,e);break;default:}}};function BL(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):sz(e,t),n}function VL(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function HL(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=FL;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=UL(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function UL(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function WL(e,t,n){let r=AI(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function GL(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function KL(e,t){for(let n=0;n<PL;n++){let n=BL(e,t);if(!n)break;let r=VL(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=HL(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&WL(e,a,i),GL(e,r,n)}}function qL(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function JL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function YL(e,t){e._appendCommentNode(t,e.document)}function XL(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function ZL(e,t){e._setDocumentType(t);let n=t.forceQuirks?OI.QUIRKS:_L(t);gL(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function QL(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,OI.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function $L(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):tR(e,t)}function eR(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&tR(e,t)}function tR(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function nR(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:iR(e,t)}}function rR(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?iR(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function iR(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function aR(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,NI.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,NI.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,NI.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,NI.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:cR(e,t)}}function oR(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:cR(e,t);break;case X.TEMPLATE:sR(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function sR(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function cR(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function lR(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:aR(e,t);break;case X.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:dR(e,t)}}function uR(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:dR(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function dR(e,t){let n=t.type===q.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function fR(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),aR(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:mR(e,t)}}function pR(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:mR(e,t);break;case X.TEMPLATE:sR(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function mR(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,hR(e,t)}function hR(e,t){switch(t.type){case q.CHARACTER:_R(e,t);break;case q.WHITESPACE_CHARACTER:gR(e,t);break;case q.COMMENT:qL(e,t);break;case q.START_TAG:XR(e,t);break;case q.END_TAG:cz(e,t);break;case q.EOF:lz(e,t);break;default:}}function gR(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _R(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function yR(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function bR(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function xR(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function SR(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&MI.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function CR(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function wR(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function TR(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function ER(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=NI.PLAINTEXT}function DR(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function OR(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(KL(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function AR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(KL(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function MR(e,t){e.treeAdapter.getDocumentMode(e.document)!==OI.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function NR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function PR(e){let t=fI(e,DI.TYPE);return t!=null&&t.toLowerCase()===NL}function FR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),PR(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function IR(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function LR(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function RR(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,NR(e,t)}function zR(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=NI.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function BR(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,NI.RAWTEXT)}function VR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,NI.RAWTEXT)}function HR(e,t){e._switchToTextParsing(t,NI.RAWTEXT)}function UR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function WR(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function GR(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function KR(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function qR(e,t){e._reconstructActiveFormattingElements(),EL(t),OL(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function JR(e,t){e._reconstructActiveFormattingElements(),DL(t),OL(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function YR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function XR(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:kR(e,t);break;case X.A:OR(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:SR(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:xR(e,t);break;case X.LI:case X.DD:case X.DT:TR(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:NR(e,t);break;case X.HR:LR(e,t);break;case X.RB:case X.RTC:GR(e,t);break;case X.RT:case X.RP:KR(e,t);break;case X.PRE:case X.LISTING:CR(e,t);break;case X.XMP:BR(e,t);break;case X.SVG:JR(e,t);break;case X.HTML:vR(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:aR(e,t);break;case X.BODY:yR(e,t);break;case X.FORM:wR(e,t);break;case X.NOBR:AR(e,t);break;case X.MATH:qR(e,t);break;case X.TABLE:MR(e,t);break;case X.INPUT:FR(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:IR(e,t);break;case X.IMAGE:RR(e,t);break;case X.BUTTON:DR(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:jR(e,t);break;case X.IFRAME:VR(e,t);break;case X.SELECT:UR(e,t);break;case X.OPTION:case X.OPTGROUP:WR(e,t);break;case X.NOEMBED:case X.NOFRAMES:HR(e,t);break;case X.FRAMESET:bR(e,t);break;case X.TEXTAREA:zR(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?HR(e,t):YR(e,t);break;case X.PLAINTEXT:ER(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:YR(e,t)}}function ZR(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function QR(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,qz(e,t))}function $R(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ez(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function tz(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function nz(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function rz(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function iz(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function az(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function oz(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function sz(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==X.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function cz(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:KL(e,t);break;case X.P:tz(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:$R(e,t);break;case X.LI:nz(e);break;case X.DD:case X.DT:rz(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:iz(e);break;case X.BR:oz(e);break;case X.BODY:ZR(e,t);break;case X.HTML:QR(e,t);break;case X.FORM:ez(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:az(e,t);break;case X.TEMPLATE:sR(e,t);break;default:sz(e,t)}}function lz(e,t){e.tmplInsertionModeStack.length>0?Gz(e,t):XL(e,t)}function uz(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function dz(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function fz(e,t){if(e.openElements.currentTagId!==void 0&&LL.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case q.CHARACTER:Tz(e,t);break;case q.WHITESPACE_CHARACTER:wz(e,t);break}else Cz(e,t)}function pz(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function mz(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function hz(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,Az(e,t)}function gz(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function _z(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,Nz(e,t)}function vz(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function yz(e,t){PR(t)?e._appendElement(t,J.HTML):Cz(e,t),t.ackSelfClosing=!0}function bz(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function xz(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:_z(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:aR(e,t);break;case X.COL:hz(e,t);break;case X.FORM:bz(e,t);break;case X.TABLE:vz(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:gz(e,t);break;case X.INPUT:yz(e,t);break;case X.CAPTION:pz(e,t);break;case X.COLGROUP:mz(e,t);break;default:Cz(e,t)}}function Sz(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:sR(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:Cz(e,t)}}function Cz(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hR(e,t),e.fosterParentingEnabled=n}function wz(e,t){e.pendingCharacterTokens.push(t)}function Tz(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ez(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cz(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Dz=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function Oz(e,t){let n=t.tagID;Dz.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,xz(e,t)):XR(e,t)}function kz(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&Sz(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:cz(e,t)}}function Az(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:aR(e,t);break;default:Mz(e,t)}}function jz(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:sR(e,t);break;case X.COL:break;default:Mz(e,t)}}function Mz(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function Nz(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,Fz(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,xz(e,t));break;default:xz(e,t)}}function Pz(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,Sz(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:Sz(e,t)}}function Fz(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Nz(e,t));break;default:xz(e,t)}}function Iz(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Pz(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Pz(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:Sz(e,t)}}function Lz(e,t){let n=t.tagID;Dz.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),Fz(e,t)):XR(e,t)}function Rz(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Iz(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:cz(e,t)}}function zz(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:aR(e,t);break;default:}}function Bz(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:sR(e,t);break;default:}}function Vz(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):zz(e,t)}function Hz(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Bz(e,t)}function Uz(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:aR(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,xz(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,Az(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,Nz(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,Fz(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,XR(e,t)}}function Wz(e,t){t.tagID===X.TEMPLATE&&sR(e,t)}function Gz(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):XL(e,t)}function Kz(e,t){t.tagID===X.HTML?XR(e,t):Jz(e,t)}function qz(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Jz(e,t)}function Jz(e,t){e.insertionMode=$.IN_BODY,hR(e,t)}function Yz(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:aR(e,t);break;default:}}function Xz(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function Zz(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.NOFRAMES:aR(e,t);break;default:}}function Qz(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function $z(e,t){t.tagID===X.HTML?XR(e,t):eB(e,t)}function eB(e,t){e.insertionMode=$.IN_BODY,hR(e,t)}function tB(e,t){switch(t.tagID){case X.HTML:XR(e,t);break;case X.NOFRAMES:aR(e,t);break;default:}}function nB(e,t){t.chars=`�`,e._insertCharacters(t)}function rB(e,t){e._insertCharacters(t),e.framesetOk=!1}function iB(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function aB(e,t){if(TL(t))iB(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?EL(t):r===J.SVG&&(kL(t),DL(t)),OL(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function oB(e,t){if(t.tagID===X.P||t.tagID===X.BR){iB(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var sB=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,cB=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),lB={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function uB(e,t){let n=wB(e),r=ga(`type`,{handlers:{root:fB,element:pB,text:mB,comment:_B,doctype:hB,raw:vB},unknown:yB}),i={parser:n?new zL(lB):zL.getFragmentParser(void 0,lB),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),bB(i,kk());let a=IF(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&_P(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function dB(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function fB(e,t){dB(e.children,t)}function pB(e,t){SB(e,t),dB(e.children,t),CB(e,t)}function mB(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:q.CHARACTER,chars:e.value,location:TB(e)};bB(t,kk(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hB(e,t){let n={type:q.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:TB(e)};bB(t,kk(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gB(e,t){t.stitches=!0;let n=EB(e);`children`in e&&`children`in n&&(n.children=uB({type:`root`,children:e.children},t.options).children),_B({type:`comment`,value:{stitch:n}},t)}function _B(e,t){let n=e.value,r={type:q.COMMENT,data:n,location:TB(e)};bB(t,kk(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function vB(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xB(t,kk(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(sB,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function yB(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))gB(n,t);else{let e=``;throw cB.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function bB(e,t){xB(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=NI.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function xB(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function SB(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===NI.PLAINTEXT)return;bB(t,kk(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:NF.html;i===NF.html&&n===`svg`&&(i=NF.svg);let a=qF({...e,children:[]},{space:i===NF.svg?`svg`:`html`}),o={type:q.START_TAG,tagName:n,tagID:AI(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:TB(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function CB(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Fi.includes(n)||t.parser.tokenizer.state===NI.PLAINTEXT)return;bB(t,Ok(e));let r={type:q.END_TAG,tagName:n,tagID:AI(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:TB(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===NI.RCDATA||t.parser.tokenizer.state===NI.RAWTEXT||t.parser.tokenizer.state===NI.SCRIPT_DATA)&&(t.parser.tokenizer.state=NI.DATA)}function wB(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function TB(e){let t=kk(e)||{line:void 0,column:void 0,offset:void 0},n=Ok(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function EB(e){return`children`in e?nP({...e,children:[]}):nP(e)}function DB(e){return function(t,n){return uB(t,{...e,file:n})}}var OB=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],kB={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...OB,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...OB],h2:[[`className`,`sr-only`]],img:[...OB,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...OB,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...OB],table:[...OB],ul:[...OB,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},AB={}.hasOwnProperty;function jB(e,t){let n={type:`root`,children:[]},r=MB({schema:t?{...kB,...t}:kB,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function MB(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return NB(e,n);case`doctype`:return PB(e,n);case`element`:return FB(e,n);case`root`:return IB(e,n);case`text`:return LB(e,n);default:}}}function NB(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return WB(r,t),r}}function PB(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return WB(e,t),e}}function FB(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=RB(e,t.children),i=zB(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&AB.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return WB(o,t),o}function IB(e,t){let n={type:`root`,children:RB(e,t.children)};return WB(n,t),n}function LB(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return WB(n,t),n}function RB(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=MB(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function zB(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&AB.call(r,n)?r[n]:void 0,o=r&&AB.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(AB.call(s,l)){let t=s[l],n=BB(e,GB(a,l),l,t);n??=BB(e,GB(o,l),l,t),n!=null&&(c[l]=n)}if(i&&AB.call(i,n)){let e=i[n];for(l in e)AB.call(e,l)&&!AB.call(c,l)&&(c[l]=e[l])}return c}function BB(e,t,n,r){return t?Array.isArray(r)?VB(e,t,n,r):HB(e,t,n,r):void 0}function VB(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=HB(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function HB(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&UB(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function UB(e,t,n){let r=e.schema.protocols&&AB.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function WB(e,t){let n=jk(t);t.data&&(e.data=nP(t.data)),n&&(e.position=n)}function GB(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function KB(e){return function(t){return jB(t,e)}}function qB(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function JB(e,t,n){let r=oP((n||{}).ignore||[]),i=YB(t),a=-1;for(;++a<i.length;)hP(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function YB(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([XB(e[0]),ZB(e[1])])}return t}function XB(e){return typeof e==`string`?new RegExp(qB(e),`g`):e}function ZB(e){return typeof e==`function`?e:function(){return e}}var QB=`phrasing`,$B=[`autolink`,`link`,`image`,`label`];function eV(){return{transforms:[cV],enter:{literalAutolink:nV,literalAutolinkEmail:rV,literalAutolinkHttp:rV,literalAutolinkWww:rV},exit:{literalAutolink:sV,literalAutolinkEmail:oV,literalAutolinkHttp:iV,literalAutolinkWww:aV}}}function tV(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:QB,notInConstruct:$B},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:QB,notInConstruct:$B},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:QB,notInConstruct:$B}]}}function nV(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function rV(e){this.config.enter.autolinkProtocol.call(this,e)}function iV(e){this.config.exit.autolinkProtocol.call(this,e)}function aV(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function oV(e){this.config.exit.autolinkEmail.call(this,e)}function sV(e){this.exit(e)}function cV(e){JB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lV],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,uV]],{ignore:[`link`,`linkReference`]})}function lV(e,t,n,r,i){let a=``;if(!pV(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!dV(n)))return!1;let o=fV(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function uV(e,t,n,r){return!pV(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function dV(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fV(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Wa(e,`(`),a=Wa(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function pV(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||RA(n)||LA(n))&&(!t||n!==47)}CV.peek=SV;function mV(){this.buffer()}function hV(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function gV(){this.buffer()}function _V(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function vV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yV(e){this.exit(e)}function bV(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xV(e){this.exit(e)}function SV(){return`[`}function CV(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function wV(){return{enter:{gfmFootnoteCallString:mV,gfmFootnoteCall:hV,gfmFootnoteDefinitionLabelString:gV,gfmFootnoteDefinition:_V},exit:{gfmFootnoteCallString:vV,gfmFootnoteCall:yV,gfmFootnoteDefinitionLabelString:bV,gfmFootnoteDefinition:xV}}}function TV(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:CV},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
295
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?DV:EV))),s(),o}}function EV(e,t,n){return t===0?e:DV(e,t,n)}function DV(e,t,n){return(n?``:` `)+e}var OV=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];NV.peek=PV;function kV(){return{canContainEols:[`delete`],enter:{strikethrough:jV},exit:{strikethrough:MV}}}function AV(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:OV}],handlers:{delete:NV}}}function jV(e){this.enter({type:`delete`,children:[]},e)}function MV(e){this.exit(e)}function NV(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function PV(){return`~`}function FV(e){return e.length}function IV(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||FV,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=LV(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=RV(r[d]);else{let e=RV(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
296
|
+
`)}function LV(e){return e==null?``:String(e)}function RV(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function zV(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),BV);return i(),o}function BV(e,t,n){return`>`+(n?``:` `)+e}function VV(e,t){return HV(e,t.inConstruct,!0)&&!HV(e,t.notInConstruct,!1)}function HV(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function UV(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
297
|
+
`&&VV(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
298
|
+
`}function WV(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function GV(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function KV(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function qV(e,t,n,r){let i=KV(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(GV(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,JV);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(WV(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
299
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
300
|
+
`),a&&(u+=s.move(a+`
|
|
301
|
+
`)),u+=s.move(c),l(),u}function JV(e,t,n){return(n?``:` `)+e}function YV(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function XV(e,t,n,r){let i=YV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
302
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function ZV(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function QV(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function $V(e,t,n){let r=JA(e),i=JA(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}eH.peek=tH;function eH(e,t,n,r){let i=ZV(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=$V(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=QV(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=$V(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+QV(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function tH(e,t,n){return n.options.emphasis||`*`}function nH(e,t){let n=!1;return _P(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&mA(e)&&(t.options.setext||n))}function rH(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(nH(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
303
|
+
`,after:`
|
|
304
|
+
`});return r(),t(),o+`
|
|
305
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
306
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
307
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=QV(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}iH.peek=aH;function iH(e){return e.value||``}function aH(){return`<`}oH.peek=sH;function oH(e,t,n,r){let i=YV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function sH(){return`!`}cH.peek=lH;function cH(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function lH(){return`!`}uH.peek=dH;function uH(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function dH(){return"`"}function fH(e,t){let n=mA(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}pH.peek=mH;function pH(e,t,n,r){let i=YV(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(fH(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function mH(e,t,n){return fH(e,n)?`<`:`[`}hH.peek=gH;function hH(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function gH(){return`[`}function _H(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function vH(e){let t=_H(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function yH(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function bH(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function xH(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?yH(n):_H(n),s=e.ordered?o===`.`?`)`:`.`:vH(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),bH(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function SH(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function CH(e,t,n,r){let i=SH(n),a=n.bulletCurrent||_H(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function wH(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var TH=oP([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function EH(e,t,n,r){return(e.children.some(function(e){return TH(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function DH(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}OH.peek=kH;function OH(e,t,n,r){let i=DH(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=$V(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=QV(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=$V(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+QV(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function kH(e,t,n){return n.options.strong||`*`}function AH(e,t,n,r){return n.safe(e.value,r)}function jH(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function MH(e,t,n){let r=(bH(n)+(n.options.ruleSpaces?` `:``)).repeat(jH(n));return n.options.ruleSpaces?r.slice(0,-1):r}var NH={blockquote:zV,break:UV,code:qV,definition:XV,emphasis:eH,hardBreak:UV,heading:rH,html:iH,image:oH,imageReference:cH,inlineCode:uH,link:pH,linkReference:hH,list:xH,listItem:CH,paragraph:wH,root:EH,strong:OH,text:AH,thematicBreak:MH};function PH(){return{enter:{table:FH,tableData:zH,tableHeader:zH,tableRow:LH},exit:{codeText:BH,table:IH,tableData:RH,tableHeader:RH,tableRow:RH}}}function FH(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function IH(e){this.exit(e),this.data.inTable=void 0}function LH(e){this.enter({type:`tableRow`,children:[]},e)}function RH(e){this.exit(e)}function zH(e){this.enter({type:`tableCell`,children:[]},e)}function BH(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,VH));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function VH(e,t){return t===`|`?t:e}function HH(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
308
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
309
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return IV(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=NH.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function UH(){return{exit:{taskListCheckValueChecked:GH,taskListCheckValueUnchecked:GH,paragraph:KH}}}function WH(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:qH}}}function GH(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function KH(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function qH(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=NH.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function JH(){return[eV(),wV(),kV(),PH(),UH()]}function YH(e){return{extensions:[tV(),TV(e),AV(),HH(e),WH()]}}var XH={tokenize:uU,partial:!0},ZH={tokenize:dU,partial:!0},QH={tokenize:fU,partial:!0},$H={tokenize:pU,partial:!0},eU={tokenize:mU,partial:!0},tU={name:`wwwAutolink`,tokenize:cU,previous:hU},nU={name:`protocolAutolink`,tokenize:lU,previous:gU},rU={name:`emailAutolink`,tokenize:sU,previous:_U},iU={};function aU(){return{text:iU}}for(var oU=48;oU<123;)iU[oU]=rU,oU++,oU===58?oU=65:oU===91&&(oU=97);iU[43]=rU,iU[45]=rU,iU[46]=rU,iU[95]=rU,iU[72]=[rU,nU],iU[104]=[rU,nU],iU[87]=[rU,tU],iU[119]=[rU,tU];function sU(e,t,n){let r=this,i,a;return o;function o(t){return!vU(t)||!_U.call(r,r.previous)||yU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return vU(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(eU,u,l)(t):t===45||t===95||kA(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&OA(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function cU(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!hU.call(r,r.previous)||yU(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(XH,e.attempt(ZH,e.attempt(QH,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function lU(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&gU.call(r,r.previous)&&!yU(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(OA(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||jA(t)||FA(t)||RA(t)||LA(t)?n(t):e.attempt(ZH,e.attempt(QH,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function uU(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function dU(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check($H,c,s)(t):t===null||FA(t)||RA(t)||t!==45&&LA(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function fU(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check($H,t,a)(o):o===null||FA(o)||RA(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function pU(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||FA(o)||RA(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||FA(e)||RA(e)?t(e):r(e)}function a(e){return OA(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):OA(t)?(e.consume(t),o):n(t)}}function mU(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return kA(e)?n(e):t(e)}}function hU(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||FA(e)}function gU(e){return!OA(e)}function _U(e){return!(e===47||vU(e))}function vU(e){return e===43||e===45||e===46||e===95||kA(e)}function yU(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var bU={tokenize:OU,partial:!0};function xU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:TU,continuation:{tokenize:EU},exit:DU}},text:{91:{name:`gfmFootnoteCall`,tokenize:wU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:SU,resolveTo:CU}}}}function SU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=DA(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function CU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function wU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||FA(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(DA(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return FA(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function TU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||FA(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=DA(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return FA(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),VA(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function EU(e,t,n){return e.check(nj,t,e.attempt(bU,t,n))}function DU(e){e.exit(`gfmFootnoteDefinition`)}function OU(e,t,n){let r=this;return VA(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function kU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&bA(o,o.length,0,YA(s,e.slice(r+1,n),t)),bA(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),bA(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=JA(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=JA(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var AU=class{constructor(){this.map=[]}add(e,t,n){jU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function jU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function MU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function NU(){return{flow:{null:{name:`table`,tokenize:PU,resolveAll:FU}}}}function PU(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):W(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):IA(t)?VA(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||FA(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,IA(t)?VA(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return IA(t)?VA(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||W(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return IA(t)?VA(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||W(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||W(n)?(e.exit(`tableRow`),t(n)):IA(n)?VA(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||FA(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function FU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new AU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(LU(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=IU(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=IU(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=IU(f,t,o,i,n,d)):(o[0]=o[1],d=IU(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&LU(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=MU(t.events,n))}return e}function IU(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},RU(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=RU(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=RU(t.events,n[2]),a=RU(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},RU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function LU(e,t,n,r,i){let a=[],o=RU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function RU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var zU={name:`tasklistCheck`,tokenize:VU};function BU(){return{text:{91:zU}}}function VU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return FA(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return W(r)?t(r):IA(r)?e.check({tokenize:HU},t,n)(r):n(r)}}function HU(e,t,n){return VA(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function UU(e){return CA([aU(),xU(),kU(e),NU(),BU()])}var WU={};function GU(e){let t=this,n=e||WU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(UU(n)),a.push(JH()),o.push(YH(n))}var KU=new Map,qU=R.memo(mF),JU=[DB,[KB,kB]],YU=[GU],XU=R.createContext({streaming:!1});function ZU(e){let t=(0,z.c)(11),n,r,i;if(t[0]!==e){let{children:a,href:o,node:s,...c}=e;n=a,r=o,i=c,t[0]=e,t[1]=n,t[2]=r,t[3]=i}else n=t[1],r=t[2],i=t[3];let a;t[4]===r?a=t[5]:(a=e=>oW(e,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==r||t[8]!==i||t[9]!==a?(o=(0,L.jsx)(`a`,{href:r,onClick:a,...i,children:n}),t[6]=n,t[7]=r,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}function QU(e){let t=(0,z.c)(10),n,r,i;if(t[0]!==e){let{children:a,className:o,node:s,...c}=e;n=a,r=o,i=c,t[0]=e,t[1]=n,t[2]=r,t[3]=i}else n=t[1],r=t[2],i=t[3];let a;t[4]===r?a=t[5]:(a=E(`rounded bg-muted px-1 py-0.5 font-mono text-[0.92em] text-[var(--inline-code-foreground)] before:content-none after:content-none`,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,L.jsx)(`code`,{className:a,...i,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function $U(e){let t=(0,z.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,node:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{completedFenceRanges:a,streaming:o}=R.use(XU),s,c,l;if(t[4]!==n||t[5]!==i){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=_W(n);if(!e){l=(0,L.jsx)(`pre`,{...i,children:n});break bb0}s=cW(e.props.children).replace(/\n$/,``),c=tW(e.props.className)}t[4]=n,t[5]=i,t[6]=s,t[7]=c,t[8]=l}else s=t[6],c=t[7],l=t[8];if(l!==Symbol.for(`react.early_return_sentinel`))return l;let u=c,d;t[9]!==a||t[10]!==r||t[11]!==o?(d=o&&!aW(r,a),t[9]=a,t[10]=r,t[11]=o,t[12]=d):d=t[12];let f=d,p;return t[13]!==s||t[14]!==f||t[15]!==u?(p=(0,L.jsx)(pW,{code:s,language:u,streaming:f}),t[13]=s,t[14]=f,t[15]=u,t[16]=p):p=t[16],p}var eW={a:ZU,code:QU,pre:$U};function tW(e){return e?.match(/language-([A-Za-z0-9_+#.-]+)/)?.[1]}function nW(e,t){return e.indexOf(t)>=0}function rW(e){let t=[],n=0,r=null;for(let i of e.split(`
|
|
310
|
+
`)){let e=n+i.length,a=i.endsWith(`\r`)?i.slice(0,-1):i;if(r){let n=a.match(/^(?: {0,3})(`{3,}|~{3,})[ \t]*$/)?.[1];n&&n[0]===r.char&&n.length>=r.length&&(t.push({end:e,start:r.start}),r=null)}else{let e=a.match(/^(?: {0,3})(`{3,}|~{3,})(.*)$/);if(e){let t=e[1],i=t[0],a=e[2]||``;(i!=="`"||!nW(a,"`"))&&(r={char:i,length:t.length,start:n})}}n=e+1}return t}function iW(e){if(!e||typeof e!=`object`)return null;let t=e.position;if(!t||typeof t!=`object`)return null;let n=t.start,r=t.end;if(!n||typeof n!=`object`||!r||typeof r!=`object`)return null;let i=n.offset,a=r.offset;return typeof i!=`number`||typeof a!=`number`?null:{end:a,start:i}}function aW(e,t){if(!t?.length)return!1;let n=iW(e);return n?t.some(e=>n.start>=e.start&&n.end<=e.end):!1}function oW(e,t){if(!t?.startsWith(`#user-content-fn`))return;let n=decodeURIComponent(t.slice(1)),r=e.currentTarget.closest(`.prose`)?.querySelector(`#${CSS.escape(n)}`);if(!r)return;e.preventDefault();let i=sW(e.currentTarget);if(!i){r.scrollIntoView({block:`center`});return}let a=i.getBoundingClientRect(),o=r.getBoundingClientRect(),s=i.scrollTop+o.top-a.top-i.clientHeight/3;i.scrollTo({top:Math.max(0,s)})}function sW(e){let t=e.parentElement;for(;t&&t!==document.body;){let e=window.getComputedStyle(t).overflowY;if(/(auto|scroll|overlay)/.test(e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}function cW(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(e=>cW(e)).join(``):R.isValidElement(e)?cW(e.props.children):``}async function lW(e,t){if(!t)return{ok:!0,skipped:!0};let n=`${t}\u0000${e}`,r=KU.get(n);if(r)return await r;let i=fetch(`/api/highlight`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({code:e,language:t})}).then(async e=>await e.json());KU.set(n,i);let a=await i;return KU.set(n,a),a}async function uW(e){if(window.isSecureContext&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}if(!dW(e))throw Error(`Unable to copy text`)}function dW(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=document.getSelection(),r=[];if(n)for(let e=0;e<n.rangeCount;e+=1)r.push(n.getRangeAt(e).cloneRange());let i=document.createElement(`textarea`);i.value=e,i.readOnly=!0,i.setAttribute(`aria-hidden`,`true`),Object.assign(i.style,{position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,border:`0`,opacity:`0`,pointerEvents:`none`}),document.body.append(i),i.focus(),i.select(),i.setSelectionRange(0,i.value.length);let a=!1;try{a=document.execCommand(`copy`)}finally{if(i.remove(),n){n.removeAllRanges();for(let e of r)n.addRange(e)}t?.focus({preventScroll:!0})}return a}var fW=R.memo(function(e){let t=(0,z.c)(8),{code:n}=e,[r,i]=R.useState(`idle`),a;t[0]===n?a=t[1]:(a=async()=>{try{await uW(n),i(`copied`),window.setTimeout(()=>i(`idle`),1400)}catch{i(`error`),window.setTimeout(()=>i(`idle`),1400)}},t[0]=n,t[1]=a);let o=a,s;t[2]===r?s=t[3]:(s=r===`copied`?(0,L.jsx)(Gr,{"data-icon":`inline-start`}):(0,L.jsx)(Xr,{"data-icon":`inline-start`}),t[2]=r,t[3]=s);let c=r===`copied`?`Copied`:r===`error`?`Retry`:`Copy`,l;return t[4]!==o||t[5]!==s||t[6]!==c?(l=(0,L.jsxs)(Rt,{variant:`ghost`,size:`xs`,onClick:o,children:[s,c]}),t[4]=o,t[5]=s,t[6]=c,t[7]=l):l=t[7],l}),pW=R.memo(function(e){let t=(0,z.c)(33),{className:n,code:r,language:i,onPreScroll:a,preClassName:o,preRef:s,streaming:c}=e,l=c===void 0?!1:c,[u,d]=R.useState(null),f,p;t[0]!==r||t[1]!==i||t[2]!==l?(f=()=>{if(!i||l)return;let e=!1;return lW(r,i).then(t=>{e||d({code:r,language:i,payload:t})}).catch(()=>{e||d({code:r,language:i,payload:{ok:!0,unavailable:!0}})}),()=>{e=!0}},p=[r,i,l],t[0]=r,t[1]=i,t[2]=l,t[3]=f,t[4]=p):(f=t[3],p=t[4]),R.useEffect(f,p);let m=!l&&u?.code===r&&u.language===i?u.payload:null,h=m&&`language`in m&&m.language?m.language:i,g=i||h,_;t[5]===m?_=t[6]:(_=gW(m)?m.html:null,t[5]=m,t[6]=_);let v=_,y;t[7]!==v||t[8]!==h?(y=v?(0,L.jsx)(yk,{html:v,language:h}):null,t[7]=v,t[8]=h,t[9]=y):y=t[9];let b=y,x;t[10]===n?x=t[11]:(x=E(`not-prose overflow-hidden rounded-xl border bg-muted/40`,n),t[10]=n,t[11]=x);let S=g||`code`,C;t[12]===S?C=t[13]:(C=(0,L.jsx)(`div`,{className:`truncate font-medium tracking-wide uppercase`,children:S}),t[12]=S,t[13]=C);let w;t[14]===r?w=t[15]:(w=(0,L.jsx)(fW,{code:r}),t[14]=r,t[15]=w);let T;t[16]!==C||t[17]!==w?(T=(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b bg-background/80 px-3 py-2 text-xs text-muted-foreground`,children:[C,w]}),t[16]=C,t[17]=w,t[18]=T):T=t[18];let D;t[19]===o?D=t[20]:(D=E(`overflow-x-auto bg-transparent px-4 py-3 text-[13px] leading-6 text-foreground`,o),t[19]=o,t[20]=D);let O;t[21]!==r||t[22]!==b?(O=b||(0,L.jsx)(`code`,{children:r}),t[21]=r,t[22]=b,t[23]=O):O=t[23];let k;t[24]!==a||t[25]!==s||t[26]!==D||t[27]!==O?(k=(0,L.jsx)(`pre`,{ref:s,onScroll:a,className:D,children:O}),t[24]=a,t[25]=s,t[26]=D,t[27]=O,t[28]=k):k=t[28];let A;return t[29]!==T||t[30]!==k||t[31]!==x?(A=(0,L.jsxs)(`div`,{className:x,children:[T,k]}),t[29]=T,t[30]=k,t[31]=x,t[32]=A):A=t[32],A});function mW(e){return`skipped`in e||`unsupported`in e||`unavailable`in e||`ok`in e&&e.ok===!1}function hW(e){return`unavailable`in e||`ok`in e&&e.ok===!1}function gW(e){return!!(e&&!mW(e)&&!hW(e))}function _W(e){let t=R.Children.toArray(e).find(e=>R.isValidElement(e));return R.isValidElement(t)?t:null}var vW=R.memo(function(e){let t=(0,z.c)(11),{streaming:n,text:r}=e,i=n===void 0?!1:n,a;t[0]!==i||t[1]!==r?(a=i?{completedFenceRanges:rW(r)}:{},t[0]=i,t[1]=r,t[2]=a):a=t[2];let o;t[3]!==i||t[4]!==a?(o={...a,streaming:i},t[3]=i,t[4]=a,t[5]=o):o=t[5];let s=o,c;t[6]===r?c=t[7]:(c=(0,L.jsx)(`div`,{className:`prose prose-sm max-w-none wrap-break-word dark:prose-invert prose-headings:font-semibold prose-p:my-2 prose-pre:m-0 prose-ol:my-2 prose-ul:my-2`,children:(0,L.jsx)(qU,{rehypePlugins:JU,remarkPlugins:YU,components:eW,children:r})}),t[6]=r,t[7]=c);let l;return t[8]!==s||t[9]!==c?(l=(0,L.jsx)(XU,{value:s,children:c}),t[8]=s,t[9]=c,t[10]=l):l=t[10],l});function yW(e){return e?.trim()||``}function bW(e){let t=e?.trim()||``;return t?t.replace(/^\/Users\/[^/]+(?=\/|$)/,`~`).replace(/^\/home\/[^/]+(?=\/|$)/,`~`):``}function xW(e){let t=e?.trim().replace(/\/+$/,``)||``;if(!t)return``;if(t===`/`)return`/`;let n=t.split(`/`).filter(Boolean);return n[n.length-1]||t}function SW(e,t){return e instanceof Error?e.message:t}var CW=1e3*30,wW=1e3*60*10,TW=1e4;function EW({viewerContextId:e,cwd:t}){return{queryKey:on.gitStatus(e,t),queryFn:()=>Xt(nn(`/api/git-status?cwd=${encodeURIComponent(t)}`,{contextId:e})),staleTime:CW,gcTime:wW}}function DW({viewerContextId:e,cwd:t,scope:n,commitsLimit:r}){return{queryKey:n===`files`?on.gitFiles(e,t):n===`branches`?on.gitBranches(e,t):[...on.gitCommits(e,t),r??50],queryFn:()=>Xt(nn(`/api/git-changes?cwd=${encodeURIComponent(t)}&gitScope=${n}${n===`commits`?`&commitsLimit=${encodeURIComponent(String(r??50))}`:``}`,{contextId:e})),staleTime:CW,gcTime:wW}}function OW({viewerContextId:e,cwd:t,path:n}){return{queryKey:on.gitFileDiff(e,t,n),queryFn:()=>Xt(nn(`/api/git-diff?cwd=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}`,{contextId:e})),staleTime:CW,gcTime:wW}}function kW({viewerContextId:e,cwd:t,path:n,previousPath:r}){let i=r?`&previousPath=${encodeURIComponent(r)}`:``;return{queryKey:on.gitFileReview(e,t,n,r),queryFn:()=>Xt(nn(`/api/git-review?cwd=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${i}`,{contextId:e})),staleTime:CW,gcTime:wW}}function AW(e){return e.gitStatus}function jW(e){return e.files}async function MW({queryClient:e,viewerContextId:t,cwd:n}){await Promise.all([e.invalidateQueries({queryKey:on.gitStatus(t,n),exact:!0,refetchType:`active`}),e.invalidateQueries({queryKey:on.gitFiles(t,n),exact:!0,refetchType:`active`}),e.invalidateQueries({queryKey:on.gitFileDiffs(t,n),exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:on.gitFileReviews(t,n),exact:!1,refetchType:`active`}),e.invalidateQueries({queryKey:on.projectFileTree(t,n),exact:!0,refetchType:`active`}),e.invalidateQueries({queryKey:on.gitBranches(t,n),exact:!0,refetchType:`active`}),e.invalidateQueries({queryKey:on.gitCommits(t,n),exact:!1,refetchType:`active`})])}function NW(e){return e?(typeof e.inline==`string`?e.inline.trim():``)||(e.detached?typeof e.revision==`string`&&e.revision.trim()?`detached ${e.revision.trim()}`:`detached`:typeof e.branch==`string`?e.branch.trim():``):``}function PW(e){if(!e)return``;let t=Number.isInteger(e.changedFileCount)&&e.changedFileCount>0?e.changedFileCount:+!!e.dirty;return t===0?`Working tree clean`:`${t} file${t===1?``:`s`} changed`}function FW(e){return!!(e&&!e.detached&&(e.ahead||0)>0&&(e.behind||0)>0)}var IW={AA:`Conflict: added by both sides`,AU:`Conflict: added by us`,DD:`Conflict: deleted by both sides`,DU:`Conflict: deleted by us`,UA:`Conflict: added by them`,UD:`Conflict: deleted by them`,UU:`Conflict: modified by both sides`};function LW(e){let t=typeof e==`string`?e.slice(0,2).padEnd(2,` `):` `;return[t[0]??` `,t[1]??` `]}function RW({character:e,column:t,status:n}){if(e===` `)return``;let r=IW[(typeof n==`string`?n.slice(0,2).padEnd(2,` `):` `).trim()];if(r)return`${e}: ${r}`;if(e===`?`)return`?: Untracked file`;if(e===`!`)return`!: Ignored file`;if(e===`U`)return`U: Unmerged conflict`;let i=t===`index`?{A:`Added and staged`,C:`Copied and staged`,D:`Deleted and staged`,M:`Modified and staged`,R:`Renamed and staged`,T:`Type changed and staged`}:{A:`Added in the working tree`,C:`Copied in the working tree`,D:`Deleted but not staged`,M:`Modified but not staged`,R:`Renamed in the working tree`,T:`Type changed but not staged`},a=t===`index`?`staged/index`:`working tree`;return`${e}: ${i[e]??`Changed in ${a}`}`}function zW(e,t){return t===` `?`muted`:t===`?`?`untracked`:t===`U`||t===`!`?`conflict`:e===`index`?`staged`:`unstaged`}function BW(e){switch(e){case`staged`:return`text-emerald-500`;case`unstaged`:return`text-amber-500`;case`untracked`:return`text-sky-500`;case`conflict`:return`text-red-500`;default:return`text-muted-foreground/70`}}function VW(e){return Number.isInteger(e)&&(e??0)>0?e??0:0}function HW(e){return VW(e.linesAdded)>0||VW(e.linesDeleted)>0}function UW(e){let t=0,n=0;for(let r of e)t+=VW(r.linesAdded),n+=VW(r.linesDeleted);return t===0&&n===0?``:`+${t} -${n}`}function WW(e){if(!e.upstream)return``;if(e.upstreamGone)return`gone`;let t=Number.isInteger(e.ahead)?e.ahead:0,n=Number.isInteger(e.behind)?e.behind:0;return t>0&&n>0?`↓${n} ↑${t}`:n>0?`↓${n}`:t>0?`↑${t}`:`synced`}function GW(e,t){return e.upstreamGone?`text-red-500`:t===`synced`?`text-emerald-500`:`text-amber-500`}function KW(e){let t=e?.trim().toLowerCase()||``;if(!t)return``;if(t===`now`)return`now`;let n=t.match(/(\d+)\s+(second|minute|hour|day|week|month|year)s?/);if(!n)return t.replace(/\s+ago$/,``);let r=n[1],i=n[2];return`${r}${i===`second`?`s`:i===`minute`?`m`:i===`hour`?`h`:i===`day`?`d`:i===`week`?`w`:i===`month`?`mo`:`y`}`}function qW(e,t){if(Array.isArray(e)&&e.length>0)return e;let n=t?.branch?.trim();return n?[{name:n,current:!0,ahead:t?.ahead||0,behind:t?.behind||0,upstreamGone:!1,...t?.revision?{hash:t.revision}:{}}]:Array.isArray(e)?e:[]}function JW(e){let t=typeof e==`string`?e.trim():``,n=t.indexOf(`/`);return n<=0?{remote:``,branch:t}:{remote:t.slice(0,n),branch:t.slice(n+1)}}function YW(e){return e.reduce((e,t)=>e+ +!!t.includes(` `),0)}function XW(e){let t=YW(e);return t>0?`${t} commit${t===1?``:`s`}`:``}var ZW=``;function QW(e){let t=typeof e==`string`?e:``,n=t.indexOf(` `);if(n<0)return{author:``,graph:t,hash:``,fullHash:``,parents:[],relativeDate:``,fullDate:``,stats:``,subject:``};let r=t.slice(0,n),i=t.slice(n+1),a=r.match(/^(.*?)([0-9a-f]{5,40})$/i),o=i.split(ZW);if(o.length>=5){let[e=``,t=``,n=``,i=``,s=``,...c]=o,l=/^\d{4}-\d{2}-\d{2}T/.test(s),u=l?s:``,d=l?c:[s,...c],f=d.length>1&&d[d.length-1]||``,p=f?d.slice(0,-1):d;return{author:n,graph:a?a[1]:r,hash:a?a[2]:``,fullHash:e,parents:t.split(/\s+/).filter(Boolean),relativeDate:i,fullDate:u,stats:f,subject:p.join(ZW).trim()}}if(o.length>=4){let[e=``,t=``,n=``,i=``,...s]=o,c=/^\d{4}-\d{2}-\d{2}T/.test(i),l=c?i:``,u=c?s:[i,...s],d=u.length>1&&u[u.length-1]||``,f=d?u.slice(0,-1):u;return{author:t,graph:a?a[1]:r,hash:a?a[2]:``,fullHash:e,parents:[],relativeDate:n,fullDate:l,stats:d,subject:f.join(ZW).trim()}}let s=i.split(` `),[c=``,...l]=s,u=!!(a&&s.length>1&&/^[0-9a-f]{40}$/i.test(c));return{author:``,graph:a?a[1]:r,hash:a?a[2]:``,fullHash:u?c:a?a[2]:``,parents:[],relativeDate:``,fullDate:``,stats:``,subject:(u?l:s).join(` `).trim()}}function $W(e){let t=e.trim();if(!t)return``;let n=KW(t);return!n||n===`now`||!/\bago$/i.test(t)?n:`${n} ago`}var eG=new Intl.DateTimeFormat(void 0,{dateStyle:`full`,timeStyle:`long`});function tG(e){let t=e.trim();if(!t)return``;let n=new Date(t);return Number.isNaN(n.getTime())?t:eG.format(n)}function nG(e,t){let n=t===`insertions`?/(\d+) insertions?\(\+\)/:/(\d+) deletions?\(-\)/,r=e.match(n);return r?Number(r[1]):0}async function rG(e){if(!e)throw Error(`Nothing to copy`);if(window.isSecureContext&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement(`textarea`);t.value=e,t.readOnly=!0,t.setAttribute(`aria-hidden`,`true`),Object.assign(t.style,{position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,opacity:`0`,pointerEvents:`none`}),document.body.appendChild(t),t.select();try{if(!document.execCommand(`copy`))throw Error(`Unable to copy text`)}finally{t.remove()}}async function iG(e){try{return await rG(e),!0}catch(e){return Tn.error(SW(e,`Failed to copy`)),!1}}var aG=768;function oG(){let e=(0,z.c)(2),[t,n]=R.useState(void 0),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(max-width: ${aG-1}px)`),t=()=>{n(window.innerWidth<aG)};return e.addEventListener(`change`,t),n(window.innerWidth<aG),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),R.useEffect(r,i),!!t}var sG=4,cG=.5,lG=.2,uG=20,dG=10,fG=320,pG=256,mG=512;function hG(){if(typeof window>`u`)return`col-resize`;let e=window.navigator.userAgent;return e.includes(`Chrome`)||e.includes(`Firefox`)?`ew-resize`:`col-resize`}function gG(){if(typeof window>`u`)return`row-resize`;let e=window.navigator.userAgent;return e.includes(`Chrome`)||e.includes(`Firefox`)?`ns-resize`:`row-resize`}function _G(){return typeof window>`u`?dG:window.matchMedia(`(pointer:coarse)`).matches?uG:dG}function vG(e){let t=document.createElement(`style`);return t.dataset.resizeCursor=`true`,t.textContent=`*, *:hover { cursor: ${e} !important; }`,document.head.append(t),()=>t.remove()}function yG(e,t){let n=e.trim(),r=Number.parseFloat(n);return Number.isFinite(r)?n.endsWith(`rem`)?r*(typeof window>`u`?16:Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize)||16):r:t}function bG(e,t,n){return Math.min(Math.max(e,t),n)}function xG(e){return e.closest(`[data-slot='sidebar']`)?.dataset.side===`right`?`right`:`left`}function SG(e){return e.closest(`[data-slot='sidebar-wrapper']`)}function CG(e,t){e.latestWidth=t,e.previewElement&&e.previewAnimationFrame===null&&(e.previewAnimationFrame=window.requestAnimationFrame(()=>{e.previewAnimationFrame=null,!(!e.previewElement||!e.latestWidth)&&e.previewElement.style.setProperty(`--sidebar-width`,e.latestWidth)}))}function wG(e){e.previewAnimationFrame!==null&&(window.cancelAnimationFrame(e.previewAnimationFrame),e.previewAnimationFrame=null)}function TG(e,t){let n=t-e.startX;return e.side===`left`?e.startWidth+n:e.startWidth-n}function EG(e,t){return e.side===`left`?t>e.startX:t<e.startX}function DG(e){let t=R.useRef(e);return t.current=e,t}function OG(e){let t=(0,z.c)(20),{enabled:n,expandThreshold:r,isMobile:i,maxWidth:a,minWidth:o,state:s,width:c,onOpenChange:l,onResize:u,onResizeActiveChange:d}=e,f=n===void 0?!0:n,p=r===void 0?lG:r,m;t[0]!==f||t[1]!==p||t[2]!==i||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==u||t[7]!==d||t[8]!==s||t[9]!==c?(m={enabled:f,expandThreshold:p,isMobile:i,maxWidth:a,minWidth:o,state:s,width:c,onOpenChange:l,onResize:u,onResizeActiveChange:d},t[0]=f,t[1]=p,t[2]=i,t[3]=a,t[4]=o,t[5]=l,t[6]=u,t[7]=d,t[8]=s,t[9]=c,t[10]=m):m=t[10];let h=DG(m),g=R.useRef(!1),_=R.useRef(null),v,y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>_.current?.(),y=[],t[11]=v,t[12]=y):(v=t[11],y=t[12]),R.useEffect(v,y);let b;t[13]===h?b=t[14]:(b=e=>{if(g.current){e.preventDefault(),e.stopPropagation(),g.current=!1;return}let{onOpenChange:t,state:n}=h.current;t(n!==`expanded`)},t[13]=h,t[14]=b);let x=b,S;t[15]===h?S=t[16]:(S=e=>{let t=h.current;if(e.defaultPrevented||e.button!==0||t.isMobile||!t.enabled)return;let n=yG(t.minWidth,pG),r=yG(t.maxWidth,mG),i=yG(t.width,fG),a={collapsed:t.state!==`expanded`,latestWidth:null,moved:!1,previewAnimationFrame:null,previewElement:SG(e.currentTarget),previousCursor:document.body.style.cursor,previousUserSelect:document.body.style.userSelect,side:xG(e.currentTarget),startWidth:t.state===`expanded`?i:0,startX:e.clientX};_.current?.();let o=null,s=()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),window.removeEventListener(`pointercancel`,f),o?.(),wG(a),Object.assign(document.body.style,{cursor:a.previousCursor,userSelect:a.previousUserSelect}),a.moved&&h.current.onResizeActiveChange(!1),_.current=null},c=()=>{let e=hG();a.moved=!0,g.current=!0,h.current.onResizeActiveChange(!0),o=vG(e),Object.assign(document.body.style,{cursor:e,userSelect:`none`})},l=e=>{let t=`${Math.round(n)}px`;CG(a,t),h.current.onResize(t),h.current.onOpenChange(!1),a.collapsed=!0,a.startWidth=0,a.startX=e},u=e=>{let t=`${Math.round(n)}px`;CG(a,t),h.current.onResize(t),h.current.onOpenChange(!0),a.collapsed=!1,a.startWidth=n,a.startX=e},d=e=>{let t=Math.abs(e.clientX-a.startX);if(!a.moved&&t<sG)return;a.moved||c(),e.preventDefault();let i=TG(a,e.clientX);if(a.collapsed){let t=n*h.current.expandThreshold;EG(a,e.clientX)&&i>=t&&u(e.clientX);return}if(i<=n*cG){l(e.clientX);return}let o=bG(i,n,r);CG(a,`${Math.round(o)}px`)},f=e=>{a.moved&&(e.preventDefault(),a.latestWidth&&h.current.onResize(a.latestWidth),window.setTimeout(()=>{g.current=!1},0)),s()};_.current=s,window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f),window.addEventListener(`pointercancel`,f)},t[15]=h,t[16]=S);let C=S,w;return t[17]!==x||t[18]!==C?(w={handleClick:x,handlePointerDown:C},t[17]=x,t[18]=C,t[19]=w):w=t[19],w}function kG(e){let t=Array.isArray(e)?e.flatMap(e=>{let t=e.trim();return t?[t]:[]}):[];if(t.length===0)return;if(t.length===1)return t[0];let n=t.slice(0,3),r=t.length-n.length,i=r>0?` + ${r} more`:``;return`${t.length} commits: ${n.join(` · `)}${i}`}function AG({response:e,force:t=!1}){if(!e.ok)return;let n=kG(e.pushedCommitMessages),r=t?`Force pushed changes`:`Pushed changes`;n?Tn.success(r,{description:n}):Tn.success(r)}function jG(e){return Nr(e,{useSymbols:!0})}function MG(e,t){return Pr(e,t)}var NG={message:``,includeUnstaged:!0,generatedReason:``,query:``,selectedCommandId:`commit`,stage:`browse`,pendingRun:null,generating:!1};function PG(e,t){switch(t.type){case`reset-transient`:return{...e,query:``,stage:`browse`};case`set-query`:return{...e,query:t.query};case`set-selected-command-id`:return{...e,selectedCommandId:t.selectedCommandId};case`set-stage`:return{...e,stage:t.stage};case`set-message`:return{...e,message:t.message,generatedReason:t.generatedReason??e.generatedReason};case`set-include-unstaged`:return{...e,includeUnstaged:t.includeUnstaged};case`set-pending-run`:return{...e,pendingRun:t.pendingRun};case`set-generating`:return{...e,generating:t.generating};case`apply-generated-message`:return{...e,message:t.generated.message,generatedReason:t.generated.reason||``};case`clear-message`:return{...e,message:``,generatedReason:``}}}function FG(e){return[e.title,e.description,e.valueLabel??``,...e.keywords]}function IG(e,t){return e===`commit`?t===`commit`?(0,L.jsx)(Ct,{}):(0,L.jsx)($r,{}):e===`commit-push`?t===`push`?(0,L.jsx)(Ct,{}):(0,L.jsx)(ni,{}):e===`commit-force-push`?t===`force-push`?(0,L.jsx)(Ct,{}):(0,L.jsx)(ni,{}):null}function LG(e){let t=(0,z.c)(28),{query:n,selectedCommandId:r,branchName:i,fileSummary:a,lineSummary:o,commandGroups:s,pendingRun:c,onQueryChange:l,onSelectedCommandIdChange:u,onContinueCommit:d}=e,f;t[0]===o?f=t[1]:(f=o.split(` `),t[0]=o,t[1]=f);let[p,m]=f,h=p===void 0?``:p,g=m===void 0?``:m,_;t[2]===d?_=t[3]:(_=e=>{MG(e.nativeEvent,`Control+Enter`)&&(e.preventDefault(),d())},t[2]=d,t[3]=_);let v;t[4]!==l||t[5]!==n?(v=(0,L.jsx)(PE,{value:n,onValueChange:l,placeholder:`Search commit actions`,className:`text-base md:text-sm`}),t[4]=l,t[5]=n,t[6]=v):v=t[6];let y;t[7]!==h||t[8]!==i||t[9]!==a||t[10]!==g?(y=(0,L.jsx)(RG,{branchName:i,fileSummary:a,addedLines:h,removedLines:g}),t[7]=h,t[8]=i,t[9]=a,t[10]=g,t[11]=y):y=t[11];let b;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,L.jsx)(IE,{children:`No commit actions found.`}),t[12]=b):b=t[12];let x;if(t[13]!==s||t[14]!==c){let e;t[16]===c?e=t[17]:(e=e=>(0,L.jsx)(zG,{group:e,pendingRun:c},e.heading),t[16]=c,t[17]=e),x=s.map(e),t[13]=s,t[14]=c,t[15]=x}else x=t[15];let S;t[18]===x?S=t[19]:(S=(0,L.jsxs)(FE,{className:`max-h-none min-h-0 flex-1 md:max-h-[min(50vh,24rem)]`,children:[b,x]}),t[18]=x,t[19]=S);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsxs)(`div`,{className:`hidden border-t border-border/70 px-3 py-2 text-xs text-muted-foreground md:block`,children:[`Use ↑/↓ to select, Enter to run, Esc to close. Press`,` `,jG(`Control+Enter`),` to continue.`]}),t[20]=C):C=t[20];let w;return t[21]!==u||t[22]!==r||t[23]!==_||t[24]!==v||t[25]!==y||t[26]!==S?(w=(0,L.jsxs)(ME,{shouldFilter:!0,loop:!0,value:r,onValueChange:u,onKeyDown:_,className:`min-h-0 flex-1 rounded-none md:rounded-xl`,children:[v,y,S,C]}),t[21]=u,t[22]=r,t[23]=_,t[24]=v,t[25]=y,t[26]=S,t[27]=w):w=t[27],w}function RG(e){let t=(0,z.c)(16),{branchName:n,fileSummary:r,addedLines:i,removedLines:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`div`,{className:`font-semibold`,children:`Branch`}),t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(ei,{className:`size-5 shrink-0`}),t[1]=s):s=t[1];let c;t[2]===n?c=t[3]:(c=(0,L.jsxs)(`div`,{className:`grid grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-4`,children:[o,(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3 text-muted-foreground`,children:[s,(0,L.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:n})]})]}),t[2]=n,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,L.jsx)(`div`,{className:`font-semibold`,children:`Changes`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,L.jsx)(`span`,{className:`shrink-0`,children:r}),t[5]=r,t[6]=u);let d;t[7]!==i||t[8]!==a?(d=i||a?(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`span`,{className:`text-emerald-500`,children:i}),` `,(0,L.jsx)(`span`,{className:`text-red-500`,children:a})]}):null,t[7]=i,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==u||t[11]!==d?(f=(0,L.jsxs)(`div`,{className:`grid grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-4`,children:[l,(0,L.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3 text-muted-foreground tabular-nums`,children:[u,d]})]}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==c||t[14]!==f?(p=(0,L.jsx)(`div`,{className:`grid gap-3 px-3 py-4 text-sm md:px-4`,children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[c,f]})}),t[13]=c,t[14]=f,t[15]=p):p=t[15],p}function zG(e){let t=(0,z.c)(8),{group:n,pendingRun:r}=e,i=n.heading,a;if(t[0]!==n.commands||t[1]!==r){let e;t[3]===r?e=t[4]:(e=e=>(0,L.jsxs)(RE,{value:e.id,keywords:FG(e),disabled:e.disabled,onSelect:()=>{Promise.resolve(e.onSelect()).catch(BG)},className:`items-start py-2`,children:[IG(e.id,r),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,L.jsx)(`span`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:e.description})]}),e.valueLabel?(0,L.jsx)(zE,{className:`inline shrink-0 tracking-normal normal-case`,children:e.valueLabel}):null]},e.id),t[3]=r,t[4]=e),a=n.commands.map(e),t[0]=n.commands,t[1]=r,t[2]=a}else a=t[2];let o;return t[5]!==n.heading||t[6]!==a?(o=(0,L.jsx)(LE,{heading:i,children:a}),t[5]=n.heading,t[6]=a,t[7]=o):o=t[7],o}function BG(e){Tn.error(SW(e,`Failed to run commit action`))}function VG(e){let t=(0,z.c)(36),{message:n,generatedReason:r,busy:i,generating:a,canGenerate:o,onMessageChange:s,onGenerateCommitMessage:c,onContinueCommit:l,onReturnToCommitActions:u}=e,d;t[0]===u?d=t[1]:(d=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),u())},t[0]=u,t[1]=d);let f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsx)(ee,{}),t[2]=f):f=t[2];let p;t[3]===u?p=t[4]:(p=(0,L.jsx)(Rt,{type:`button`,variant:`ghost`,size:`icon`,onClick:u,"aria-label":`Back to commit actions`,children:f}),t[3]=u,t[4]=p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`div`,{className:`truncate text-sm font-medium`,children:`Commit message`}),(0,L.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:`Leave blank to autogenerate before committing.`})]}),t[5]=m):m=t[5];let h=i||!o,g;t[6]===a?g=t[7]:(g=a?(0,L.jsx)(Ct,{}):(0,L.jsx)(ri,{}),t[6]=a,t[7]=g);let _;t[8]!==c||t[9]!==h||t[10]!==g?(_=(0,L.jsxs)(Rt,{type:`button`,variant:`ghost`,disabled:h,onClick:c,children:[g,`Generate`]}),t[8]=c,t[9]=h,t[10]=g,t[11]=_):_=t[11];let v;t[12]!==p||t[13]!==_?(v=(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/70 px-3 py-2`,children:[p,m,_]}),t[12]=p,t[13]=_,t[14]=v):v=t[14];let y;t[15]===s?y=t[16]:(y=e=>s(e.target.value),t[15]=s,t[16]=y);let b;t[17]!==l||t[18]!==c||t[19]!==u?(b=e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),u();return}if(MG(e.nativeEvent,`Control+G`)){e.preventDefault(),e.stopPropagation(),c();return}MG(e.nativeEvent,`Control+Enter`)&&(e.preventDefault(),e.stopPropagation(),l())},t[17]=l,t[18]=c,t[19]=u,t[20]=b):b=t[20];let x;t[21]!==i||t[22]!==n||t[23]!==b||t[24]!==y?(x=(0,L.jsx)(EE,{id:`git-commit-message`,value:n,onChange:y,onKeyDown:b,placeholder:`Leave blank to autogenerate a commit message`,className:`min-h-40 flex-1 resize-none rounded-xl bg-muted/20 px-4 py-3 text-base`,disabled:i}),t[21]=i,t[22]=n,t[23]=b,t[24]=y,t[25]=x):x=t[25];let S;t[26]===r?S=t[27]:(S=r?(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`AI message unavailable, using heuristic fallback: `,r]}):null,t[26]=r,t[27]=S);let C;t[28]!==x||t[29]!==S?(C=(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 p-3`,children:[x,S]}),t[28]=x,t[29]=S,t[30]=C):C=t[30];let w;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,L.jsxs)(`div`,{className:`hidden flex-wrap items-center gap-x-3 gap-y-1 border-t border-border/70 px-3 py-2 text-xs text-muted-foreground md:flex`,children:[(0,L.jsxs)(`span`,{children:[jG(`Control+G`),` Generate`]}),(0,L.jsxs)(`span`,{children:[jG(`Control+Enter`),` Continue`]}),(0,L.jsx)(`span`,{children:`Esc Back`})]}),t[31]=w):w=t[31];let T;return t[32]!==d||t[33]!==C||t[34]!==v?(T=(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,onKeyDownCapture:d,children:[v,C,w]}),t[32]=d,t[33]=C,t[34]=v,t[35]=T):T=t[35],T}function HG(e){let t=(0,z.c)(4),{stage:n,browseProps:r,messageEditorProps:i}=e;if(n===`message`){let e;return t[0]===i?e=t[1]:(e=(0,L.jsx)(VG,{...i}),t[0]=i,t[1]=e),e}let a;return t[2]===r?a=t[3]:(a=(0,L.jsx)(LG,{...r}),t[2]=r,t[3]=a),a}function UG({message:e,includeUnstaged:t,busy:n,files:r,canForcePush:i,onContinueCommit:a,onOpenCommitMessage:o,onIncludeUnstagedChange:s}){let c=e.trim(),l=r.length===0;return[{heading:`Run`,commands:[{id:`commit`,title:`Commit`,description:c?`Commit with the current message.`:`Generate a message automatically, then commit.`,keywords:[`continue`,`run`,`save`,`stage`,`git`],valueLabel:`Commit`,disabled:n||l,onSelect:()=>a(!1)},{id:`commit-push`,title:`Commit and push`,description:c?`Commit with the current message, then push.`:`Generate a message automatically, then commit and push.`,keywords:[`continue`,`run`,`save`,`stage`,`git`,`push`],valueLabel:`Push`,disabled:n||l,onSelect:()=>a(!0)},...i?[{id:`commit-force-push`,title:`Commit and force push`,description:c?`Commit with the current message, then force push with --force-with-lease.`:`Generate a message automatically, then commit and force push with --force-with-lease.`,keywords:[`continue`,`run`,`save`,`stage`,`git`,`push`,`force`,`lease`],valueLabel:`Force push`,disabled:n||l,onSelect:()=>a(!0,!0)}]:[]]},{heading:`Message`,commands:[{id:`edit-message`,title:`Edit commit message`,description:c||`Leave it blank to autogenerate before committing.`,keywords:[`message`,`subject`,`body`,`focus`,`edit`],valueLabel:c?`Custom`:`Blank`,disabled:n,onSelect:o}]},{heading:`Options`,commands:[{id:`include-unstaged`,title:`Include unstaged changes`,description:`Stage unstaged files before committing.`,keywords:[`stage`,`unstaged`,`files`,`working tree`],valueLabel:t?`On`:`Off`,disabled:n,onSelect:()=>s(!t)}]}]}function WG({viewerContextId:e,cwd:t,files:n,gitStatus:r,open:i,onOpenChange:a}){let o=Dn(),s=oG(),[c,l]=R.useReducer(PG,NG),u=R.useRef(!1),d=`${n.length} file${n.length===1?``:`s`}`,f=UW(n),p=r?.detached?`Detached ${r.revision||`HEAD`}`:r?.branch||`Unknown branch`,m=FW(r),h=e=>{l({type:`apply-generated-message`,generated:e}),e.source!==`ai`&&e.reason&&Tn.info(`Using heuristic message: ${e.reason}`)},g=async()=>await Xt(nn(`/api/git-commit-message`,{contextId:e}),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({cwd:t})}),_=ir({mutationFn:async({push:n,forcePush:r,commitMessage:i})=>await Xt(nn(`/api/git-commit`,{contextId:e}),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({cwd:t,message:i,push:n,forcePush:r,includeUnstaged:c.includeUnstaged})}),onSuccess:async(n,r)=>{l({type:`clear-message`}),a(!1),await o.invalidateQueries({queryKey:on.gitStatus(e,t),exact:!0,refetchType:`active`}),await MW({queryClient:o,viewerContextId:e,cwd:t}),Tn.success(r.forcePush?`Committed and force pushed changes`:r.push?`Committed and pushed changes`:`Committed changes`,{description:r.commitMessage})},onError:(e,t)=>{Tn.error(SW(e,t.forcePush?`Failed to commit and force push changes`:t.push?`Failed to commit and push changes`:`Failed to commit changes`))},onSettled:()=>{l({type:`set-pending-run`,pendingRun:null})}}),v=_.isPending||c.generating;R.useEffect(()=>{i||l({type:`reset-transient`})},[i]);let y=()=>{v||!t||n.length===0||(l({type:`set-generating`,generating:!0}),g().then(h).catch(e=>{Tn.error(SW(e,`Failed to generate commit message`))}).finally(()=>{l({type:`set-generating`,generating:!1})}))},b=async(e,t=!1)=>{if(v||n.length===0)return;l({type:`set-pending-run`,pendingRun:t?`force-push`:e?`push`:`commit`});let r=c.message.trim();if(!r)try{l({type:`set-generating`,generating:!0});let e=await g();r=e.message.trim(),h(e)}catch(e){Tn.error(SW(e,`Failed to generate commit message`)),l({type:`set-pending-run`,pendingRun:null});return}finally{l({type:`set-generating`,generating:!1})}if(!r){l({type:`set-pending-run`,pendingRun:null});return}_.mutate({push:e,forcePush:t,commitMessage:r})},x=()=>{l({type:`set-query`,query:``}),l({type:`set-stage`,stage:`message`})},S=()=>{u.current=!0,l({type:`set-stage`,stage:`browse`})},C=UG({message:c.message,includeUnstaged:c.includeUnstaged,busy:v,files:n,canForcePush:m,onContinueCommit:(e,t)=>{b(e,t)},onOpenCommitMessage:x,onIncludeUnstagedChange:e=>l({type:`set-include-unstaged`,includeUnstaged:e})}),w=(0,L.jsx)(HG,{stage:c.stage,browseProps:{query:c.query,selectedCommandId:c.selectedCommandId,branchName:p,fileSummary:d,lineSummary:f,commandGroups:C,pendingRun:c.pendingRun,onQueryChange:e=>l({type:`set-query`,query:e}),onSelectedCommandIdChange:e=>l({type:`set-selected-command-id`,selectedCommandId:e}),onContinueCommit:()=>{b(!1)}},messageEditorProps:{message:c.message,generatedReason:c.generatedReason,busy:v,generating:c.generating,canGenerate:!!(t&&n.length>0),onMessageChange:e=>l({type:`set-message`,message:e,generatedReason:``}),onGenerateCommitMessage:y,onContinueCommit:()=>{b(!1)},onReturnToCommitActions:S}}),T=e=>{if(!e&&(c.stage===`message`||u.current)){u.current=!1,l({type:`set-stage`,stage:`browse`});return}a(e)};return s?(0,L.jsx)(qD,{open:i,onOpenChange:T,autoFocus:!1,children:(0,L.jsxs)(XD,{className:`max-h-[92svh] overflow-hidden`,children:[(0,L.jsxs)(ZD,{className:`sr-only`,children:[(0,L.jsx)($D,{children:`Commit your changes`}),(0,L.jsx)(eO,{children:`Stage and commit changes in this repository.`})]}),(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden px-4 pb-4`,children:w})]})}):(0,L.jsx)(NE,{open:i,onOpenChange:T,title:`Commit your changes`,description:`Search commit actions, edit the message, and choose whether to push.`,className:`sm:max-w-2xl`,initialFocus:!0,children:w})}function GG({viewerContextId:e,cwd:t,openStateRef:n,ref:r}){let i=yW(t),[a,o]=R.useState(!1),s=er({...EW({viewerContextId:e,cwd:i}),enabled:!!(a&&e&&i),select:AW,notifyOnChangeProps:[`data`]}),c=er({...DW({viewerContextId:e,cwd:i,scope:`files`}),enabled:!!(a&&e&&i),select:jW,notifyOnChangeProps:[`data`]}),l=Array.isArray(c.data)?c.data:[],u=R.useCallback(e=>{n.current=e,o(e)},[n]);return R.useEffect(()=>{n.current=a},[a,n]),R.useImperativeHandle(r,()=>({open:()=>{if(!e||!i){Tn.error(`Open a session in a repository before committing.`);return}u(!0)},close:()=>{u(!1)},isOpen:()=>n.current}),[i,n,u,e]),(0,L.jsx)(WG,{viewerContextId:e,cwd:i,files:l,gitStatus:s.data,open:a,onOpenChange:u})}var KG={light:Ae.light,dark:Ae.dark},qG=`
|
|
311
|
+
:host {
|
|
312
|
+
--diffs-addition-color-override: var(--success);
|
|
313
|
+
--diffs-deletion-color-override: var(--danger);
|
|
314
|
+
--diffs-modified-color-override: var(--primary);
|
|
315
|
+
--diffs-bg-addition-emphasis-override: color-mix(in lab, var(--diffs-bg) 42%, var(--diffs-addition-base));
|
|
316
|
+
--diffs-bg-deletion-emphasis-override: color-mix(in lab, var(--diffs-bg) 42%, var(--diffs-deletion-base));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-overflow="wrap"] [data-annotation-content] {
|
|
320
|
+
inline-size: var(--diffs-column-content-width, auto);
|
|
321
|
+
max-inline-size: min(100%, calc(100vw - 1rem));
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[data-line-type="change-addition"]:is(
|
|
325
|
+
[data-gutter-buffer],
|
|
326
|
+
[data-column-number],
|
|
327
|
+
[data-line],
|
|
328
|
+
[data-no-newline]
|
|
329
|
+
) {
|
|
330
|
+
--mix-light: 84%;
|
|
331
|
+
--mix-dark: 76%;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
[data-line-type="change-deletion"]:is(
|
|
335
|
+
[data-gutter-buffer],
|
|
336
|
+
[data-column-number],
|
|
337
|
+
[data-line],
|
|
338
|
+
[data-no-newline]
|
|
339
|
+
) {
|
|
340
|
+
--mix-light: 84%;
|
|
341
|
+
--mix-dark: 76%;
|
|
342
|
+
}
|
|
343
|
+
`;function JG(e,t){if(Bm.has(e))return;let n=wu({name:e,variablePrefix:`--diffs-`,variableDefaults:{...Ie},fontStyle:!1});Km(e,()=>Promise.resolve({...n,type:t}))}function YG(){JG(Ae.light,`light`),JG(Ae.dark,`dark`)}function XG({resolvedTheme:e,systemTheme:t,theme:n}){return ze(n)??ze(e)??(e===`dark`||t===`dark`?`dark`:`light`)}YG();function ZG(){let e=(0,z.c)(6),{resolvedTheme:t,systemTheme:n,theme:r}=gn(),i;e[0]!==t||e[1]!==n||e[2]!==r?(i=XG({resolvedTheme:t,systemTheme:n,theme:r}),e[0]=t,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a;return e[4]===i?a=e[5]:(a={theme:KG,themeType:i,unsafeCSS:qG},e[4]=i,e[5]=a),a}function QG(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(MO,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function $G(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(VO,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function eK(e){let t=(0,z.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=E(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,L.jsx)(vO,{"data-slot":`dropdown-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,L.jsx)(xO,{children:(0,L.jsx)(wO,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function tK(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(fO,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function nK(e){let t=(0,z.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=E(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,L.jsx)(pO,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function rK(e){let t=(0,z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=E(`group/dropdown-menu-item relative flex min-h-8 cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,L.jsx)(mO,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function iK(e){let t=(0,z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(NO,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function aK(e){let t=(0,z.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=E(`flex min-h-8 cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(qr,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,L.jsxs)(GO,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function oK(e){let t=(0,z.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?-3:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=E(`w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;return t[9]!==c||t[10]!==l||t[11]!==r||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,L.jsx)(eK,{"data-slot":`dropdown-menu-sub-content`,className:f,align:c,alignOffset:l,side:u,sideOffset:d,...r}),t[9]=c,t[10]=l,t[11]=r,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function sK(e){let t=(0,z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=E(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(WO,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function cK(e){let t=(0,z.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=E(`ml-auto hidden items-center justify-end text-xs text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground md:inline-flex`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,L.jsx)(We,{children:n}),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,L.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:a,...i,children:o}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}var lK=4,uK={bottomHeight:0,topHeight:0};function dK(e){return Math.max(0,e.scrollHeight-e.scrollTop-e.clientHeight)}function fK(e,t){return Math.min(t,Math.max(0,e))}function pK(e,t){return e?{bottomHeight:fK(dK(e),t),topHeight:fK(e.scrollTop,t)}:uK}function mK(e,t){e(e=>e.bottomHeight===t.bottomHeight&&e.topHeight===t.topHeight?e:t)}function hK({disabled:e=!1,maxHeight:t=lK}={}){let n=R.useRef(null),[r,i]=R.useState(uK),a=R.useCallback((r=n.current)=>{mK(i,e?uK:pK(r,t))},[e,t]),o=R.useCallback(e=>{n.current=e,a(e)},[a]),s=R.useCallback(e=>{a(e.currentTarget)},[a]);return R.useLayoutEffect(()=>{let e=n.current;if(a(e),!e||typeof ResizeObserver>`u`)return;let t=0,r=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{t=0,a(n.current)})});r.observe(e);let i=e.firstElementChild;return i instanceof HTMLElement&&r.observe(i),()=>{window.cancelAnimationFrame(t),r.disconnect()}},[a]),{bottomHeight:r.bottomHeight,onScroll:s,setScrollElement:o,syncScrollGradients:a,topHeight:r.topHeight}}function gK(e){let t=(0,z.c)(21),{bottomClassName:n,bottomHeight:r,className:i,topClassName:a,topHeight:o}=e,s=o>0?`opacity-100`:`opacity-0`,c;t[0]!==i||t[1]!==s||t[2]!==a?(c=E(`pointer-events-none absolute inset-x-0 top-0 z-10 bg-gradient-to-b from-black/10 to-transparent transition-[height,opacity] duration-150`,s,i,a),t[0]=i,t[1]=s,t[2]=a,t[3]=c):c=t[3];let l;t[4]===o?l=t[5]:(l={height:o},t[4]=o,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,L.jsx)(`div`,{className:c,style:l}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d=r>0?`opacity-100`:`opacity-0`,f;t[9]!==n||t[10]!==i||t[11]!==d?(f=E(`pointer-events-none absolute inset-x-0 bottom-0 z-10 bg-gradient-to-t from-black/10 to-transparent transition-[height,opacity] duration-150`,d,i,n),t[9]=n,t[10]=i,t[11]=d,t[12]=f):f=t[12];let p;t[13]===r?p=t[14]:(p={height:r},t[13]=r,t[14]=p);let m;t[15]!==f||t[16]!==p?(m=(0,L.jsx)(`div`,{className:f,style:p}),t[15]=f,t[16]=p,t[17]=m):m=t[17];let h;return t[18]!==u||t[19]!==m?(h=(0,L.jsxs)(L.Fragment,{children:[u,m]}),t[18]=u,t[19]=m,t[20]=h):h=t[20],h}var _K={position:`absolute`,top:0,bottom:0,textAlign:`center`},vK={display:`contents`};function yK(){return null}function bK(e,t){return typeof window>`u`&&t!=null?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,L.jsx)(L.Fragment,{children:e})}var xK=(0,R.createContext)(void 0);function SK(){return(0,R.useContext)(xK)}var CK=(0,R.createContext)(void 0);function wK(e){let t=(0,R.useRef)(e);return(0,R.useInsertionEffect)(()=>void(t.current=e)),(0,R.useCallback)((...e)=>t.current(...e),[])}function TK({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderHoverUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d}){let f=o??s,p=n?.(e),m=r?.(e),h=i?.(e);return(0,L.jsxs)(L.Fragment,{children:[p==null?(0,L.jsxs)(L.Fragment,{children:[m!=null&&(0,L.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,L.jsx)(`div`,{slot:`header-metadata`,children:h})]}):(0,L.jsx)(`div`,{slot:vi,children:p}),a!=null&&l?.map((e,t)=>(0,L.jsx)(`div`,{slot:fh(e),children:a(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=EK(t,e);return(0,L.jsx)(`div`,{slot:n,style:vK,children:c(t,d)},n)}),f!=null&&(0,L.jsx)(`div`,{slot:`gutter-utility-slot`,style:_K,children:f(u)})]})}function EK(e,t){let n=g_(e,t);return n==null?void 0:h_({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var DK=typeof window>`u`?R.useEffect:R.useLayoutEffect;function OK({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:i,metrics:a,hasGutterRenderUtility:o,hasCustomHeader:s,disableWorkerPool:c}){let l=SK(),u=(0,R.useContext)(CK),d=(0,R.useRef)(null),f=wK(r=>{if(r!=null){if(d.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);l==null?d.current=new l_(kK({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c?void 0:u,!0):d.current=new x_(kK({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),l,a,c?void 0:u,!0),d.current.hydrate({fileDiff:e,fileContainer:r,lineAnnotations:n,prerenderedHTML:i})}else{if(d.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);d.current.cleanUp(),d.current=null}});return DK(()=>{let{current:i}=d;if(i==null)return;let a=kK({hasCustomHeader:s,hasGutterRenderUtility:o,options:t}),c=!T_(i.options,a);i.setOptions(a),i.render({forceRender:c,fileDiff:e,lineAnnotations:n}),r!==void 0&&i.setSelectedLines(r)}),{ref:f,getHoveredLine:(0,R.useCallback)(()=>d.current?.getHoveredLine(),[])}}function kK({options:e,hasCustomHeader:t,hasGutterRenderUtility:n}){return n||t?{...e,renderCustomHeader:t?yK:void 0,renderGutterUtility:n?yK:void 0}:e}function AK({patch:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:a,style:o,prerenderedHTML:s,renderAnnotation:c,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderGutterUtility:f,renderHoverUtility:p,disableWorkerPool:m=!1}){let h=jK(e),{ref:g,getHoveredLine:_}=OK({fileDiff:h,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:s,hasGutterRenderUtility:f!=null||p!=null,hasCustomHeader:l!=null,disableWorkerPool:m});return(0,L.jsx)(ai,{ref:g,className:a,style:o,children:bK(TK({fileDiff:h,renderCustomHeader:l,renderHeaderPrefix:u,renderHeaderMetadata:d,renderAnnotation:c,lineAnnotations:r,renderGutterUtility:f,renderHoverUtility:p,getHoveredLine:_}),s)})}function jK(e){return(0,R.useMemo)(()=>D_(e),[e])}export{EW as $,$b as $t,TW as A,Qr as An,CO as At,OW as B,Mr as Bn,IE as Bt,AG as C,a_ as Cn,rk as Ct,vG as D,ti as Dn,RO as Dt,gG as E,ni as En,WO as Et,PW as F,qr as Fn,QD as Ft,zW as G,vr as Gn,zE as Gt,VW as H,Tr as Hn,PE as Ht,NW as I,Kr as In,ZD as It,GW as J,er as Jn,Px as Jt,BW as K,ir as Kn,EE as Kt,DW as L,Gr as Ln,$D as Lt,$W as M,Xr as Mn,qD as Mt,tG as N,Yr as Nn,XD as Nt,OG as O,ei as On,IO as Ot,KW as P,Jr as Pn,eO as Pt,FW as Q,Ax as Qt,nG as R,Fr as Rn,ME as Rt,MG as S,s_ as Sn,tk as St,_G as T,ri as Tn,XO as Tt,kW as U,Er as Un,RE as Ut,HW as V,Ar as Vn,LE as Vt,LW as W,ar as Wn,FE as Wt,qW as X,Ex as Xt,WW as Y,bx as Yt,JW as Z,Hx as Zt,$G as _,V_ as _n,ZO as _t,gK as a,ty as an,xW as at,GG as b,O_ as bn,$O as bt,eK as c,pv as cn,pW as ct,nK as d,sv as dn,yk as dt,yx as en,MW as et,sK as f,av as fn,dk as ft,aK as g,B_ as gn,YO as gt,oK as h,X_ as hn,ok as ht,bK as i,ey as in,bW as it,iG as j,Zr as jn,gO as jt,oG as k,$r as kn,FO as kt,tK as l,dv as ln,vW as lt,iK as m,Z_ as mn,ak as mt,OK as n,ly as nn,jW as nt,hK as o,zv as on,SW as ot,cK as p,tv as pn,sk as pt,RW as q,tr as qn,TE as qt,TK as r,rx as rn,AW as rt,QG as s,uv as sn,yW as st,AK as t,nb as tn,QW as tt,rK as u,fv as un,uW as ut,ZG as v,z_ as vn,QO as vt,hG as w,ai as wn,nk as wt,jG as x,l_ as xn,ik as xt,WG as y,j_ as yn,ek as yt,XW as z,Pr as zn,NE as zt};
|